ipq807x: fix multiple error on ESS switch port define
[openwrt/staging/hauke.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8074-rax120v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include "ipq8074.dtsi"
6 #include "ipq8074-ess.dtsi"
7 #include "ipq8074-hk-cpu.dtsi"
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/gpio/gpio.h>
10 #include <dt-bindings/leds/common.h>
11
12 / {
13 model = "Netgear RAX120v2";
14 compatible = "netgear,rax120v2", "qcom,ipq8074";
15
16 aliases {
17 serial0 = &blsp1_uart5;
18
19 led-running = &led_system_white;
20 led-upgrade = &led_system_white;
21 led-internet = &led_wan_white;
22 label-mac-device = &dp1;
23 };
24
25 chosen {
26 stdout-path = "serial0:115200n8";
27 bootargs-append = " ubi.mtd=rootfs root=/dev/ubiblock0_0";
28 };
29
30 keys {
31 compatible = "gpio-keys";
32
33 rfkill {
34 label = "rfkill";
35 gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RFKILL>;
37 };
38
39 wps {
40 label = "wps";
41 gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_WPS_BUTTON>;
43 };
44
45 reset {
46 label = "reset";
47 gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_RESTART>;
49 };
50 };
51
52 led_spi {
53 compatible = "spi-gpio";
54 #address-cells = <1>;
55 #size-cells = <0>;
56
57 sck-gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
58 mosi-gpios = <&tlmm 19 GPIO_ACTIVE_HIGH>;
59
60 led_gpio: led_gpio@0 {
61 compatible = "fairchild,74hc595";
62 reg = <0>;
63 gpio-controller;
64 #gpio-cells = <2>;
65 registers-number = <2>;
66 enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
67 spi-max-frequency = <1000000>;
68 };
69 };
70
71 leds {
72 compatible = "gpio-leds";
73
74 led_system_white: system-white {
75 label = "white:system";
76 gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
77 color = <LED_COLOR_ID_WHITE>;
78 };
79
80 led_24g_white {
81 label = "white:24g";
82 gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
83 color = <LED_COLOR_ID_WHITE>;
84 linux,default-trigger = "phy1radio";
85 };
86
87 led_5g_white {
88 label = "white:5g";
89 gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
90 color = <LED_COLOR_ID_WHITE>;
91 linux,default-trigger = "phy0radio";
92 };
93
94 led_usb1_white {
95 label = "white:usb1";
96 gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
97 color = <LED_COLOR_ID_WHITE>;
98 };
99
100 led_usb2_white {
101 label = "white:usb2";
102 gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
103 color = <LED_COLOR_ID_WHITE>;
104 };
105
106 led_wan_white: wan-white {
107 label = "white:wan";
108 gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
109 color = <LED_COLOR_ID_WHITE>;
110 };
111
112 led_aqr_green {
113 label = "green:aqr";
114 gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
115 color = <LED_COLOR_ID_GREEN>;
116 };
117
118 led_aqr_red {
119 label = "red:aqr";
120 gpios = <&led_gpio 10 GPIO_ACTIVE_LOW>;
121 color = <LED_COLOR_ID_RED>;
122 };
123
124 led_aqr_white {
125 label = "white:aqr";
126 gpios = <&led_gpio 11 GPIO_ACTIVE_LOW>;
127 color = <LED_COLOR_ID_WHITE>;
128 };
129
130 led_wps_white {
131 label = "white:wps";
132 gpios = <&tlmm 40 GPIO_ACTIVE_HIGH>;
133 color = <LED_COLOR_ID_WHITE>;
134 };
135 };
136 };
137
138 &tlmm {
139 mdio_pins: mdio-pins {
140 mdc {
141 pins = "gpio68";
142 function = "mdc";
143 drive-strength = <8>;
144 bias-pull-up;
145 };
146
147 mdio {
148 pins = "gpio69";
149 function = "mdio";
150 drive-strength = <8>;
151 bias-pull-up;
152 };
153 };
154 };
155
156 &mdio {
157 status = "okay";
158
159 pinctrl-0 = <&mdio_pins>;
160 pinctrl-names = "default";
161 reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
162
163 qca8075_0: ethernet-phy@0 {
164 compatible = "ethernet-phy-ieee802.3-c22";
165 reg = <0>;
166 };
167
168 qca8075_1: ethernet-phy@1 {
169 compatible = "ethernet-phy-ieee802.3-c22";
170 reg = <1>;
171 };
172
173 qca8075_2: ethernet-phy@2 {
174 compatible = "ethernet-phy-ieee802.3-c22";
175 reg = <2>;
176 };
177
178 qca8075_3: ethernet-phy@3 {
179 compatible = "ethernet-phy-ieee802.3-c22";
180 reg = <3>;
181 };
182
183 qca8075_4: ethernet-phy@4 {
184 compatible = "ethernet-phy-ieee802.3-c22";
185 reg = <4>;
186 };
187
188 aqr111b0: ethernet-phy@7 {
189 compatible ="ethernet-phy-ieee802.3-c45";
190 reg = <7>;
191 reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
192 };
193 };
194
195 &switch {
196 status = "okay";
197
198 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT6)>; /* lan port bitmap */
199 switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
200 switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
201 switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/
202
203 qcom,port_phyinfo {
204 port@1 {
205 port_id = <1>;
206 phy_address = <0>;
207 };
208 port@2 {
209 port_id = <2>;
210 phy_address = <1>;
211 };
212 port@3 {
213 port_id = <3>;
214 phy_address = <2>;
215 };
216 port@4 {
217 port_id = <4>;
218 phy_address = <3>;
219 };
220 port@5 {
221 port_id = <5>;
222 phy_address = <4>;
223 };
224 port@6 {
225 port_id = <6>;
226 phy_address = <7>;
227 compatible = "ethernet-phy-ieee802.3-c45";
228 ethernet-phy-ieee802.3-c45;
229 };
230 };
231 };
232
233 &edma {
234 status = "okay";
235 };
236
237 &dp1 {
238 status = "okay";
239 phy-handle = <&qca8075_0>;
240 label = "lan4";
241 nvmem-cells = <&macaddr_dp1>;
242 nvmem-cell-names = "mac-address";
243 };
244
245 &dp2 {
246 status = "okay";
247 phy-handle = <&qca8075_1>;
248 label = "lan3";
249 nvmem-cells = <&macaddr_dp2>;
250 nvmem-cell-names = "mac-address";
251 };
252
253 &dp3 {
254 status = "okay";
255 phy-handle = <&qca8075_2>;
256 label = "lan2";
257 nvmem-cells = <&macaddr_dp3>;
258 nvmem-cell-names = "mac-address";
259 };
260
261 &dp4 {
262 status = "okay";
263 phy-handle = <&qca8075_3>;
264 label = "lan1";
265 nvmem-cells = <&macaddr_dp4>;
266 nvmem-cell-names = "mac-address";
267 };
268
269 &dp5 {
270 status = "okay";
271 phy-handle = <&qca8075_4>;
272 label = "wan";
273 nvmem-cells = <&macaddr_dp5>;
274 nvmem-cell-names = "mac-address";
275 };
276
277 &dp6_syn {
278 status = "okay";
279 phy-handle = <&aqr111b0>;
280 label = "lan5";
281 nvmem-cells = <&macaddr_dp6_syn>;
282 nvmem-cell-names = "mac-address";
283 };
284
285 &blsp1_uart5 {
286 status = "okay";
287 };
288
289 &blsp1_i2c2 {
290 status = "okay";
291
292 g761@3e {
293 compatible = "gmt,g763";
294 reg = <0x3e>;
295 clocks =<&sleep_clk>;
296 fan_gear_mode = <0>;
297 fan_start = <1>;
298 pwm_polarity = <0>;
299 };
300 };
301
302 &qpic_bam {
303 status = "okay";
304 };
305
306 &qpic_nand {
307 status = "okay";
308
309 nand@0 {
310 reg = <0>;
311 nand-ecc-strength = <4>;
312 nand-ecc-step-size = <512>;
313 nand-bus-width = <8>;
314
315 partitions {
316 compatible = "fixed-partitions";
317 #address-cells = <1>;
318 #size-cells = <1>;
319
320 partition@0 {
321 label = "0:sbl1";
322 reg = <0x00 0x100000>;
323 read-only;
324 };
325
326 partition@100000 {
327 label = "0:mibib";
328 reg = <0x100000 0x100000>;
329 read-only;
330 };
331
332 partition@200000 {
333 label = "0:bootconfig";
334 reg = <0x200000 0x80000>;
335 read-only;
336 };
337
338 partition@280000 {
339 label = "0:bootconfig_1";
340 reg = <0x280000 0x80000>;
341 read-only;
342 };
343
344 partition@300000 {
345 label = "0:qsee";
346 reg = <0x300000 0x300000>;
347 read-only;
348 };
349
350 partition@600000 {
351 label = "0:qsee_1";
352 reg = <0x600000 0x300000>;
353 read-only;
354 };
355
356 partition@900000 {
357 label = "0:devcfg";
358 reg = <0x900000 0x80000>;
359 read-only;
360 };
361
362 partition@980000 {
363 label = "0:devcfg_1";
364 reg = <0x980000 0x80000>;
365 read-only;
366 };
367
368 partition@a00000 {
369 label = "0:apdp";
370 reg = <0xa00000 0x80000>;
371 read-only;
372 };
373
374 partition@a80000 {
375 label = "0:apdp_1";
376 reg = <0xa80000 0x80000>;
377 read-only;
378 };
379
380 partition@b00000 {
381 label = "0:rpm";
382 reg = <0xb00000 0x80000>;
383 read-only;
384 };
385
386 partition@b80000 {
387 label = "0:rpm_1";
388 reg = <0xb80000 0x80000>;
389 read-only;
390 };
391
392 partition@c00000 {
393 label = "0:cdt";
394 reg = <0xc00000 0x80000>;
395 read-only;
396 };
397
398 partition@c80000 {
399 label = "0:cdt_1";
400 reg = <0xc80000 0x80000>;
401 read-only;
402 };
403
404 partition@d00000 {
405 label = "0:appsblenv";
406 reg = <0xd00000 0x80000>;
407 };
408
409 partition@d80000 {
410 label = "0:appsbl";
411 reg = <0xd80000 0x100000>;
412 read-only;
413 };
414
415 partition@e80000 {
416 label = "0:appsbl_1";
417 reg = <0xe80000 0x100000>;
418 read-only;
419 };
420
421 partition@f80000 {
422 label = "0:art";
423 reg = <0xf80000 0x80000>;
424 read-only;
425 };
426
427 partition@1000000 {
428 label = "0:art.bak";
429 reg = <0x1000000 0x0080000>;
430 read-only;
431 };
432
433 partition@1080000 {
434 label = "config";
435 reg = <0x1080000 0x0100000>;
436 read-only;
437 };
438
439 partition@1180000 {
440 label = "boarddata1";
441 reg = <0x1180000 0x0100000>;
442 read-only;
443
444 compatible = "nvmem-cells";
445 #address-cells = <1>;
446 #size-cells = <1>;
447
448 macaddr_dp1: macaddr@0 {
449 reg = <0x0 0x6>;
450 };
451
452 macaddr_dp2: macaddr@1 {
453 reg = <0x6 0x6>;
454 };
455
456 macaddr_dp3: macaddr@2 {
457 reg = <0xc 0x6>;
458 };
459
460 macaddr_dp4: macaddr@3 {
461 reg = <0x12 0x6>;
462 };
463
464 macaddr_dp5: macaddr@4 {
465 reg = <0x18 0x6>;
466 };
467
468 macaddr_dp6_syn: macaddr@5 {
469 reg = <0x1e 0x6>;
470 };
471
472 };
473
474 partition@1280000 {
475 label = "boarddata2";
476 reg = <0x1280000 0x0100000>;
477 read-only;
478 };
479
480 partition@1380000 {
481 label = "pot";
482 reg = <0x1380000 0x0100000>;
483 read-only;
484 };
485
486 partition@1480000 {
487 label = "dnidata";
488 reg = <0x1480000 0x0500000>;
489 read-only;
490 };
491
492 partition@1980000 {
493 label = "kernel";
494 reg = <0x1980000 0x1d00000>;
495 };
496
497 partition@7e00000 {
498 label = "ethphyfw";
499 reg = <0x7e00000 0x80000>;
500 };
501
502 partition@e8800000 {
503 label = "rootfs";
504 reg = <0xe880000 0x11780000>;
505 };
506 };
507 };
508 };
509
510 &qusb_phy_0 {
511 status = "okay";
512 };
513
514 &qusb_phy_1 {
515 status = "okay";
516 };
517
518 &ssphy_0 {
519 status = "okay";
520 };
521
522 &ssphy_1 {
523 status = "okay";
524 };
525
526 &usb_0 {
527 status = "okay";
528 };
529
530 &usb_1 {
531 status = "okay";
532 };
533
534 &wifi{
535 status = "okay";
536
537 qcom,ath11k-calibration-variant = "Netgear-RAX120v2";
538 };
539
540 &cryptobam {
541 status = "okay";
542 };
543
544 &crypto {
545 status = "okay";
546 };
547
548 &prng {
549 status = "okay";
550 };