ramips: mt7621: convert NETGEAR devices EEPROM to NVMEM format
[openwrt/staging/dangole.git] / target / linux / ramips / dts / mt7621_netgear_sercomm_chj.dtsi
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "mediatek,mt7621-soc";
10
11 aliases {
12 led-boot = &led_power;
13 led-failsafe = &led_power;
14 led-running = &led_power;
15 led-upgrade = &led_power;
16 label-mac-device = &gmac0;
17 };
18
19 leds {
20 compatible = "gpio-leds";
21
22 led_power: power {
23 label = "green:power";
24 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
25 };
26
27 usb {
28 label = "green:usb";
29 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
30 trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
31 linux,default-trigger = "usbport";
32 };
33
34 internet {
35 label = "green:wan";
36 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
37 };
38
39 wifi {
40 label = "green:wifi";
41 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
42 linux,default-trigger = "phy0tpt";
43 };
44 };
45
46 keys {
47 compatible = "gpio-keys";
48
49 wps {
50 label = "wps";
51 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
52 linux,code = <KEY_WPS_BUTTON>;
53 };
54
55 reset {
56 label = "reset";
57 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_RESTART>;
59 };
60 };
61
62 reg_usb_vbus: regulator {
63 compatible = "regulator-fixed";
64 regulator-name = "usb_vbus";
65 regulator-min-microvolt = <5000000>;
66 regulator-max-microvolt = <5000000>;
67 gpio = <&gpio 10 GPIO_ACTIVE_HIGH>;
68 enable-active-high;
69 };
70 };
71
72 &xhci {
73 vbus-supply = <&reg_usb_vbus>;
74 };
75
76 &pcie {
77 status = "okay";
78 };
79
80 &pcie0 {
81 wifi@0,0 {
82 compatible = "mediatek,mt76";
83 reg = <0x0 0 0 0 0>;
84 nvmem-cells = <&eeprom_factory_8000>;
85 nvmem-cell-names = "eeprom";
86 ieee80211-freq-limit = <5000000 6000000>;
87 };
88 };
89
90 &pcie1 {
91 wifi@0,0 {
92 compatible = "mediatek,mt76";
93 reg = <0x0 0 0 0 0>;
94 nvmem-cells = <&eeprom_factory_0>;
95 nvmem-cell-names = "eeprom";
96 ieee80211-freq-limit = <2400000 2500000>;
97 };
98 };
99
100 &gmac0 {
101 nvmem-cells = <&macaddr_factory_4 0>;
102 nvmem-cell-names = "mac-address";
103 };
104
105 &gmac1 {
106 status = "okay";
107 label = "wan";
108 phy-handle = <&ethphy4>;
109
110 nvmem-cells = <&macaddr_factory_4 2>;
111 nvmem-cell-names = "mac-address";
112 };
113
114 &mdio {
115 ethphy4: ethernet-phy@4 {
116 reg = <4>;
117 };
118 };
119
120 &switch0 {
121 ports {
122 port@0 {
123 status = "okay";
124 label = "lan4";
125 };
126
127 port@1 {
128 status = "okay";
129 label = "lan3";
130 };
131
132 port@2 {
133 status = "okay";
134 label = "lan2";
135 };
136
137 port@3 {
138 status = "okay";
139 label = "lan1";
140 };
141 };
142 };
143
144 &state_default {
145 gpio {
146 groups = "uart3", "uart2", "jtag", "wdt";
147 function = "gpio";
148 };
149 };
150
151 &nand {
152 status = "okay";
153
154 partitions {
155 compatible = "sercomm,sc-partitions", "fixed-partitions";
156 #address-cells = <1>;
157 #size-cells = <1>;
158
159 partition@0 {
160 label = "u-boot";
161 reg = <0x0 0x100000>;
162 sercomm,scpart-id = <0>;
163 read-only;
164 };
165
166 partition@100000 {
167 label = "SC PART_MAP";
168 reg = <0x100000 0x100000>;
169 sercomm,scpart-id = <1>;
170 read-only;
171 };
172
173 partition@200000 {
174 label = "kernel";
175 reg = <0x200000 0x400000>;
176 sercomm,scpart-id = <2>;
177 };
178
179 partition@600000 {
180 label = "ubi";
181 reg = <0x600000 0x2800000>;
182 sercomm,scpart-id = <3>;
183 };
184
185 partition@2e00000 {
186 label = "English UI";
187 reg = <0x2e00000 0x200000>;
188 sercomm,scpart-id = <4>;
189 read-only;
190 };
191
192 partition@3000000 {
193 label = "ML1";
194 reg = <0x3000000 0x200000>;
195 sercomm,scpart-id = <5>;
196 read-only;
197 };
198
199 partition@3200000 {
200 label = "ML2";
201 reg = <0x3200000 0x200000>;
202 sercomm,scpart-id = <6>;
203 read-only;
204 };
205
206 partition@3400000 {
207 label = "ML3";
208 reg = <0x3400000 0x200000>;
209 sercomm,scpart-id = <7>;
210 read-only;
211 };
212
213 partition@3600000 {
214 label = "ML4";
215 reg = <0x3600000 0x200000>;
216 sercomm,scpart-id = <8>;
217 read-only;
218 };
219
220 partition@3800000 {
221 label = "ML5";
222 reg = <0x3800000 0x200000>;
223 sercomm,scpart-id = <9>;
224 read-only;
225 };
226
227 partition@3a00000 {
228 label = "ML6";
229 reg = <0x3a00000 0x200000>;
230 sercomm,scpart-id = <10>;
231 read-only;
232 };
233
234 partition@3c00000 {
235 label = "ML7";
236 reg = <0x3c00000 0x200000>;
237 sercomm,scpart-id = <11>;
238 read-only;
239 };
240
241 partition@3e00000 {
242 label = "ML8";
243 reg = <0x3e00000 0x200000>;
244 sercomm,scpart-id = <12>;
245 read-only;
246 };
247
248 partition@4000000 {
249 label = "ML9";
250 reg = <0x4000000 0x200000>;
251 sercomm,scpart-id = <13>;
252 read-only;
253 };
254
255 partition@4200000 {
256 label = "ML10";
257 reg = <0x4200000 0x200000>;
258 sercomm,scpart-id = <14>;
259 read-only;
260 };
261
262 partition@4400000 {
263 label = "ML11";
264 reg = <0x4400000 0x200000>;
265 sercomm,scpart-id = <15>;
266 read-only;
267 };
268
269 factory: partition@4600000 {
270 label = "factory";
271 reg = <0x4600000 0x200000>;
272 sercomm,scpart-id = <16>;
273 read-only;
274
275 nvmem-layout {
276 compatible = "fixed-layout";
277 #address-cells = <1>;
278 #size-cells = <1>;
279
280 eeprom_factory_0: eeprom@0 {
281 reg = <0x0 0x400>;
282 };
283
284 eeprom_factory_8000: eeprom@8000 {
285 reg = <0x8000 0x4da8>;
286 };
287
288 macaddr_factory_4: macaddr@4 {
289 compatible = "mac-base";
290 reg = <0x4 0x6>;
291 #nvmem-cell-cells = <1>;
292 };
293 };
294 };
295
296 partition@4800000 {
297 label = "SC Private Data";
298 reg = <0x4800000 0x200000>;
299 sercomm,scpart-id = <17>;
300 read-only;
301 };
302
303 partition@4a00000 {
304 label = "POT";
305 reg = <0x4a00000 0x200000>;
306 sercomm,scpart-id = <18>;
307 read-only;
308 };
309
310 partition@4c00000 {
311 label = "Traffic Meter";
312 reg = <0x4c00000 0x200000>;
313 sercomm,scpart-id = <19>;
314 read-only;
315 };
316
317 partition@4e00000 {
318 label = "SC PID";
319 reg = <0x4e00000 0x200000>;
320 sercomm,scpart-id = <20>;
321 read-only;
322 };
323
324 partition@5000000 {
325 label = "SC Nvram";
326 reg = <0x5000000 0x200000>;
327 sercomm,scpart-id = <21>;
328 read-only;
329 };
330
331 partition@5200000 {
332 label = "Ralink Nvram";
333 reg = <0x5200000 0x200000>;
334 sercomm,scpart-id = <22>;
335 read-only;
336 };
337
338 partition@5400000 {
339 label = "reserved0";
340 reg = <0x5400000 0x200000>;
341 sercomm,scpart-id = <23>;
342 read-only;
343 };
344
345 partition@5600000 {
346 label = "reserved1";
347 reg = <0x5600000 0x200000>;
348 sercomm,scpart-id = <24>;
349 read-only;
350 };
351
352 partition@5800000 {
353 label = "reserved2";
354 reg = <0x5800000 0x200000>;
355 sercomm,scpart-id = <25>;
356 read-only;
357 };
358
359 partition@5a00000 {
360 label = "reserved3";
361 reg = <0x5a00000 0x200000>;
362 sercomm,scpart-id = <26>;
363 read-only;
364 };
365
366 partition@5c00000 {
367 label = "reserved4";
368 reg = <0x5c00000 0x200000>;
369 sercomm,scpart-id = <27>;
370 read-only;
371 };
372
373 partition@5e00000 {
374 label = "reserved5";
375 reg = <0x5e00000 0x2180000>;
376 sercomm,scpart-id = <28>;
377 read-only;
378 };
379 };
380 };