15e9fa1c45bc4a29ce8156f4ec822b387c36d738
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_netgear_sercomm_bzv.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "mediatek,mt7621-soc";
11
12 aliases {
13 label-mac-device = &gmac0;
14 led-boot = &led_power_white;
15 led-failsafe = &led_power_orange;
16 led-running = &led_power_white;
17 led-upgrade = &led_power_orange;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 wps {
24 label = "wps";
25 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 rfkill {
30 label = "rfkill";
31 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RFKILL>;
33 };
34
35 reset {
36 label = "reset";
37 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_RESTART>;
39 };
40 };
41
42 leds: leds {
43 compatible = "gpio-leds";
44
45 led_power_orange: power_orange {
46 gpios = <&gpio_expander 0 GPIO_ACTIVE_LOW>;
47 function = LED_FUNCTION_POWER;
48 color = <LED_COLOR_ID_ORANGE>;
49 };
50
51 led_power_white: power_white {
52 gpios = <&gpio_expander 1 GPIO_ACTIVE_LOW>;
53 function = LED_FUNCTION_POWER;
54 color = <LED_COLOR_ID_WHITE>;
55 };
56
57 wan_orange {
58 gpios = <&gpio_expander 2 GPIO_ACTIVE_LOW>;
59 function = LED_FUNCTION_WAN;
60 color = <LED_COLOR_ID_ORANGE>;
61 };
62
63 wan_white {
64 gpios = <&gpio_expander 3 GPIO_ACTIVE_LOW>;
65 function = LED_FUNCTION_WAN;
66 color = <LED_COLOR_ID_WHITE>;
67 };
68
69 wlan2g {
70 gpios = <&gpio_expander 4 GPIO_ACTIVE_LOW>;
71 label = "white:wlan2g";
72 linux,default-trigger = "phy0radio";
73 };
74
75 wlan5g {
76 gpios = <&gpio_expander 5 GPIO_ACTIVE_LOW>;
77 label = "white:wlan5g";
78 linux,default-trigger = "phy1radio";
79 };
80
81 usb3 {
82 gpios = <&gpio_expander 7 GPIO_ACTIVE_LOW>;
83 label = "white:usb3";
84 linux,default-trigger = "usbport";
85 trigger-sources = <&xhci_ehci_port1>;
86 };
87
88 lan1_orange {
89 gpios = <&gpio_expander 8 GPIO_ACTIVE_LOW>;
90 label = "orange:lan1";
91 };
92
93 lan1_white {
94 gpios = <&gpio_expander 9 GPIO_ACTIVE_LOW>;
95 label = "white:lan1";
96 };
97
98 lan2_orange {
99 gpios = <&gpio_expander 10 GPIO_ACTIVE_LOW>;
100 label = "orange:lan2";
101 };
102
103 lan2_white {
104 gpios = <&gpio_expander 11 GPIO_ACTIVE_LOW>;
105 label = "white:lan2";
106 };
107
108 lan3_orange {
109 gpios = <&gpio_expander 12 GPIO_ACTIVE_LOW>;
110 label = "orange:lan3";
111 };
112
113 lan3_white {
114 gpios = <&gpio_expander 13 GPIO_ACTIVE_LOW>;
115 label = "white:lan3";
116 };
117
118 lan4_orange {
119 gpios = <&gpio_expander 14 GPIO_ACTIVE_LOW>;
120 label = "orange:lan4";
121 };
122
123 lan4_white {
124 gpios = <&gpio_expander 15 GPIO_ACTIVE_LOW>;
125 label = "white:lan4";
126 };
127
128 wps {
129 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
130 function = LED_FUNCTION_WPS;
131 color = <LED_COLOR_ID_WHITE>;
132 };
133
134 wlan {
135 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
136 function = LED_FUNCTION_WLAN;
137 color = <LED_COLOR_ID_WHITE>;
138 };
139 };
140 };
141
142 &state_default {
143 gpio {
144 groups = "uart3", "uart2", "jtag", "wdt";
145 function = "gpio";
146 };
147 };
148
149 &pcie {
150 status = "okay";
151 };
152
153 &pcie0 {
154 wifi@0,0 {
155 compatible = "mediatek,mt76";
156 reg = <0x0 0 0 0 0>;
157 nvmem-cells = <&eeprom_factory_0>;
158 nvmem-cell-names = "eeprom";
159 ieee80211-freq-limit = <2400000 2500000>;
160 };
161 };
162
163 &pcie1 {
164 wifi@0,0 {
165 compatible = "mediatek,mt76";
166 reg = <0x0 0 0 0 0>;
167 nvmem-cells = <&eeprom_factory_8000>;
168 nvmem-cell-names = "eeprom";
169 ieee80211-freq-limit = <5000000 6000000>;
170 };
171 };
172
173 &gmac0 {
174 nvmem-cells = <&macaddr_factory_4 0>;
175 nvmem-cell-names = "mac-address";
176 };
177
178 &gmac1 {
179 status = "okay";
180 label = "wan";
181 phy-handle = <&ethphy4>;
182
183 nvmem-cells = <&macaddr_factory_4 2>;
184 nvmem-cell-names = "mac-address";
185 };
186
187 &mdio {
188 ethphy4: ethernet-phy@4 {
189 reg = <4>;
190 };
191 };
192
193 &switch0 {
194 ports {
195 port@0 {
196 status = "okay";
197 label = "lan4";
198 };
199
200 port@1 {
201 status = "okay";
202 label = "lan3";
203 };
204
205 port@2 {
206 status = "okay";
207 label = "lan2";
208 };
209
210 port@3 {
211 status = "okay";
212 label = "lan1";
213 };
214 };
215 };
216
217 &i2c {
218 status = "okay";
219
220 gpio_expander: i2c0gpio-expander@20{
221 #gpio-cells = <2>;
222 #interrupt-cells = <2>;
223 compatible = "semtech,sx1503q";
224 reg = <0x20>;
225
226 gpio-controller;
227 interrupt-controller;
228 };
229 };
230
231 &nand {
232 status = "okay";
233
234 partitions {
235 compatible = "sercomm,sc-partitions", "fixed-partitions";
236 #address-cells = <1>;
237 #size-cells = <1>;
238
239 partition@0 {
240 label = "u-boot";
241 reg = <0x0 0x100000>;
242 sercomm,scpart-id = <0>;
243 read-only;
244 };
245
246 partition@100000 {
247 label = "SC PART_MAP";
248 reg = <0x100000 0x100000>;
249 sercomm,scpart-id = <1>;
250 read-only;
251 };
252
253 partition@200000 {
254 label = "kernel";
255 reg = <0x200000 0x400000>;
256 sercomm,scpart-id = <2>;
257 };
258
259 partition@600000 {
260 label = "ubi";
261 reg = <0x600000 0x2800000>;
262 sercomm,scpart-id = <3>;
263 };
264
265 partition@2e00000 {
266 label = "English UI";
267 reg = <0x2e00000 0x200000>;
268 sercomm,scpart-id = <4>;
269 read-only;
270 };
271
272 partition@3000000 {
273 label = "ML1";
274 reg = <0x3000000 0x200000>;
275 sercomm,scpart-id = <5>;
276 read-only;
277 };
278
279 partition@3200000 {
280 label = "ML2";
281 reg = <0x3200000 0x200000>;
282 sercomm,scpart-id = <6>;
283 read-only;
284 };
285
286 partition@3400000 {
287 label = "ML3";
288 reg = <0x3400000 0x200000>;
289 sercomm,scpart-id = <7>;
290 read-only;
291 };
292
293 partition@3600000 {
294 label = "ML4";
295 reg = <0x3600000 0x200000>;
296 sercomm,scpart-id = <8>;
297 read-only;
298 };
299
300 partition@3800000 {
301 label = "ML5";
302 reg = <0x3800000 0x200000>;
303 sercomm,scpart-id = <9>;
304 read-only;
305 };
306
307 partition@3a00000 {
308 label = "ML6";
309 reg = <0x3a00000 0x200000>;
310 sercomm,scpart-id = <10>;
311 read-only;
312 };
313
314 partition@3c00000 {
315 label = "ML7";
316 reg = <0x3c00000 0x200000>;
317 sercomm,scpart-id = <11>;
318 read-only;
319 };
320
321 partition@3e00000 {
322 label = "ML8";
323 reg = <0x3e00000 0x200000>;
324 sercomm,scpart-id = <12>;
325 read-only;
326 };
327
328 partition@4000000 {
329 label = "ML9";
330 reg = <0x4000000 0x200000>;
331 sercomm,scpart-id = <13>;
332 read-only;
333 };
334
335 partition@4200000 {
336 label = "ML10";
337 reg = <0x4200000 0x200000>;
338 sercomm,scpart-id = <14>;
339 read-only;
340 };
341
342 partition@4400000 {
343 label = "ML11";
344 reg = <0x4400000 0x200000>;
345 sercomm,scpart-id = <15>;
346 read-only;
347 };
348
349 factory: partition@4600000 {
350 label = "factory";
351 reg = <0x4600000 0x200000>;
352 sercomm,scpart-id = <16>;
353 read-only;
354
355 nvmem-layout {
356 compatible = "fixed-layout";
357 #address-cells = <1>;
358 #size-cells = <1>;
359
360 eeprom_factory_0: eeprom@0 {
361 reg = <0x0 0x4da8>;
362 };
363
364 eeprom_factory_8000: eeprom@8000 {
365 reg = <0x8000 0x4da8>;
366 };
367
368 macaddr_factory_4: macaddr@4 {
369 compatible = "mac-base";
370 reg = <0x4 0x6>;
371 #nvmem-cell-cells = <1>;
372 };
373 };
374 };
375
376 partition@4800000 {
377 label = "SC Private Data";
378 reg = <0x4800000 0x200000>;
379 sercomm,scpart-id = <17>;
380 read-only;
381 };
382
383 partition@4a00000 {
384 label = "POT";
385 reg = <0x4a00000 0x200000>;
386 sercomm,scpart-id = <18>;
387 read-only;
388 };
389
390 partition@4c00000 {
391 label = "Traffic Meter";
392 reg = <0x4c00000 0x200000>;
393 sercomm,scpart-id = <19>;
394 read-only;
395 };
396
397 partition@4e00000 {
398 label = "SC PID";
399 reg = <0x4e00000 0x200000>;
400 sercomm,scpart-id = <20>;
401 read-only;
402 };
403
404 partition@5000000 {
405 label = "SC Nvram";
406 reg = <0x5000000 0x200000>;
407 sercomm,scpart-id = <21>;
408 read-only;
409 };
410
411 partition@5200000 {
412 label = "Ralink Nvram";
413 reg = <0x5200000 0x200000>;
414 sercomm,scpart-id = <22>;
415 read-only;
416 };
417
418 partition@5400000 {
419 label = "reserved0";
420 reg = <0x5400000 0x200000>;
421 sercomm,scpart-id = <23>;
422 read-only;
423 };
424
425 partition@5600000 {
426 label = "reserved1";
427 reg = <0x5600000 0x200000>;
428 sercomm,scpart-id = <24>;
429 read-only;
430 };
431
432 partition@5800000 {
433 label = "reserved2";
434 reg = <0x5800000 0x200000>;
435 sercomm,scpart-id = <25>;
436 read-only;
437 };
438
439 partition@5a00000 {
440 label = "reserved3";
441 reg = <0x5a00000 0x200000>;
442 sercomm,scpart-id = <26>;
443 read-only;
444 };
445
446 partition@5c00000 {
447 label = "reserved4";
448 reg = <0x5c00000 0x200000>;
449 sercomm,scpart-id = <27>;
450 read-only;
451 };
452
453 partition@5e00000 {
454 label = "reserved5";
455 reg = <0x5e00000 0x2180000>;
456 sercomm,scpart-id = <28>;
457 read-only;
458 };
459 };
460 };