uboot-mediatek: add build for mt7981 rfb
[openwrt/staging/robimarko.git] / package / boot / uboot-mediatek / patches / 108-dts-arm64-mt7981-rfb-add-mtd-partitions.patch
1 --- a/arch/arm/dts/mt7981-rfb.dts
2 +++ b/arch/arm/dts/mt7981-rfb.dts
3 @@ -143,6 +143,37 @@
4 compatible = "spi-nand";
5 reg = <0>;
6 spi-max-frequency = <52000000>;
7 +
8 + partitions {
9 + compatible = "fixed-partitions";
10 + #address-cells = <1>;
11 + #size-cells = <1>;
12 +
13 + partition@0 {
14 + label = "BL2";
15 + reg = <0x00000 0x0100000>;
16 + };
17 +
18 + partition@100000 {
19 + label = "u-boot-env";
20 + reg = <0x0100000 0x0080000>;
21 + };
22 +
23 + factory: partition@180000 {
24 + label = "Factory";
25 + reg = <0x180000 0x0200000>;
26 + };
27 +
28 + partition@380000 {
29 + label = "FIP";
30 + reg = <0x380000 0x0200000>;
31 + };
32 +
33 + partition@580000 {
34 + label = "ubi";
35 + reg = <0x580000 0x4000000>;
36 + };
37 + };
38 };
39 };
40
41 @@ -164,6 +195,37 @@
42 compatible = "jedec,spi-nor";
43 reg = <0>;
44 spi-max-frequency = <52000000>;
45 +
46 + partitions {
47 + compatible = "fixed-partitions";
48 + #address-cells = <1>;
49 + #size-cells = <1>;
50 +
51 + partition@00000 {
52 + label = "BL2";
53 + reg = <0x00000 0x0040000>;
54 + };
55 +
56 + partition@40000 {
57 + label = "u-boot-env";
58 + reg = <0x40000 0x0010000>;
59 + };
60 +
61 + partition@50000 {
62 + label = "Factory";
63 + reg = <0x50000 0x00B0000>;
64 + };
65 +
66 + partition@100000 {
67 + label = "FIP";
68 + reg = <0x100000 0x0080000>;
69 + };
70 +
71 + partition@180000 {
72 + label = "firmware";
73 + reg = <0x180000 0xE00000>;
74 + };
75 + };
76 };
77 };
78
79 --- a/arch/arm/dts/mt7981-snfi-nand-rfb.dts
80 +++ b/arch/arm/dts/mt7981-snfi-nand-rfb.dts
81 @@ -107,11 +107,11 @@
82 };
83
84 mmc0_pins_default: mmc0default {
85 - mux {
86 - function = "flash";
87 - groups = "emmc_45";
88 - };
89 - };
90 + mux {
91 + function = "flash";
92 + groups = "emmc_45";
93 + };
94 + };
95 };
96
97 &snand {
98 @@ -119,6 +119,42 @@
99 pinctrl-0 = <&snfi_pins>;
100 status = "okay";
101 quad-spi;
102 +
103 + spi_nand@0 {
104 + compatible = "spi-nand";
105 + reg = <0>;
106 +
107 + partitions {
108 + compatible = "fixed-partitions";
109 + #address-cells = <1>;
110 + #size-cells = <1>;
111 +
112 + partition@0 {
113 + label = "BL2";
114 + reg = <0x00000 0x0100000>;
115 + };
116 +
117 + partition@100000 {
118 + label = "u-boot-env";
119 + reg = <0x0100000 0x0080000>;
120 + };
121 +
122 + factory: partition@180000 {
123 + label = "Factory";
124 + reg = <0x180000 0x0200000>;
125 + };
126 +
127 + partition@380000 {
128 + label = "FIP";
129 + reg = <0x380000 0x0200000>;
130 + };
131 +
132 + partition@580000 {
133 + label = "ubi";
134 + reg = <0x580000 0x4000000>;
135 + };
136 + };
137 + };
138 };
139
140 &pwm {