0c669dcbfe62c75bb0bf3c191fb7457986c0993b
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8062-wg2600hp3.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qcom-ipq8062-smb208.dtsi"
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 model = "NEC Platforms Aterm WG2600HP3";
9 compatible = "nec,wg2600hp3", "qcom,ipq8062", "qcom,ipq8064";
10
11 memory {
12 device_type = "memory";
13 reg = <0x42000000 0x1e000000>;
14 };
15
16 aliases {
17 label-mac-device = &gmac2;
18
19 led-boot = &led_power_green;
20 led-failsafe = &led_power_red;
21 led-running = &led_power_green;
22 led-upgrade = &led_power_red;
23 };
24
25 keys {
26 compatible = "gpio-keys";
27
28 pinctrl-0 = <&buttons_pins>;
29 pinctrl-names = "default";
30
31 reset {
32 label = "reset";
33 gpios = <&qcom_pinmux 24 GPIO_ACTIVE_LOW>;
34 linux,code = <KEY_RESTART>;
35 debounce-interval = <60>;
36 wakeup-source;
37 };
38
39 wps {
40 label = "wps";
41 gpios = <&qcom_pinmux 22 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_WPS_BUTTON>;
43 debounce-interval = <60>;
44 wakeup-source;
45 };
46
47 mode0 {
48 label = "mode0";
49 gpios = <&qcom_pinmux 40 GPIO_ACTIVE_LOW>;
50 linux,code = <BTN_0>;
51 linux,input-type = <EV_SW>;
52 debounce-interval = <60>;
53 wakeup-source;
54 };
55
56 mode1 {
57 label = "mode1";
58 gpios = <&qcom_pinmux 41 GPIO_ACTIVE_LOW>;
59 linux,code = <BTN_1>;
60 linux,input-type = <EV_SW>;
61 debounce-interval = <60>;
62 wakeup-source;
63 };
64 };
65
66 leds {
67 compatible = "gpio-leds";
68
69 pinctrl-0 = <&leds_pins>;
70 pinctrl-names = "default";
71
72 led_power_green: power_green {
73 label = "green:power";
74 gpios = <&qcom_pinmux 14 GPIO_ACTIVE_HIGH>;
75 };
76
77 led_power_red: power_red {
78 label = "red:power";
79 gpios = <&qcom_pinmux 35 GPIO_ACTIVE_HIGH>;
80 };
81
82 active_green {
83 label = "green:active";
84 gpios = <&qcom_pinmux 42 GPIO_ACTIVE_HIGH>;
85 };
86
87 active_red {
88 label = "red:active";
89 gpios = <&qcom_pinmux 38 GPIO_ACTIVE_HIGH>;
90 };
91
92 wlan2g_green {
93 label = "green:wlan2g";
94 gpios = <&qcom_pinmux 55 GPIO_ACTIVE_HIGH>;
95 linux,default-trigger = "phy1tpt";
96 };
97
98 wlan2g_red {
99 label = "red:wlan2g";
100 gpios = <&qcom_pinmux 56 GPIO_ACTIVE_HIGH>;
101 };
102
103 wlan5g_green {
104 label = "green:wlan5g";
105 gpios = <&qcom_pinmux 57 GPIO_ACTIVE_HIGH>;
106 linux,default-trigger = "phy0tpt";
107 };
108
109 wlan5g_red {
110 label = "red:wlan5g";
111 gpios = <&qcom_pinmux 58 GPIO_ACTIVE_HIGH>;
112 };
113
114 tv_green {
115 label = "green:tv";
116 gpios = <&qcom_pinmux 46 GPIO_ACTIVE_HIGH>;
117 };
118
119 tv_red {
120 label = "red:tv";
121 gpios = <&qcom_pinmux 36 GPIO_ACTIVE_HIGH>;
122 };
123
124 converter_green {
125 label = "green:converter";
126 gpios = <&qcom_pinmux 43 GPIO_ACTIVE_HIGH>;
127 };
128
129 converter_red {
130 label = "red:converter";
131 gpios = <&qcom_pinmux 15 GPIO_ACTIVE_HIGH>;
132 };
133 };
134 };
135
136 /* nand_pins are used for leds_pins, empty the node
137 * from ipq8064.dtsi
138 */
139 &nand_pins {
140 /delete-property/ disable;
141 /delete-property/ pullups;
142 /delete-property/ hold;
143 };
144
145 &qcom_pinmux {
146 pinctrl-0 = <&akro_pins>;
147 pinctrl-names = "default";
148
149 spi_pins: spi_pins {
150 mux {
151 pins = "gpio18", "gpio19", "gpio21";
152 function = "gsbi5";
153 bias-pull-down;
154 };
155
156 data {
157 pins = "gpio18", "gpio19";
158 drive-strength = <10>;
159 };
160
161 cs {
162 pins = "gpio20";
163 drive-strength = <10>;
164 };
165
166 clk {
167 pins = "gpio21";
168 drive-strength = <12>;
169 };
170 };
171
172 buttons_pins: buttons_pins {
173 mux {
174 pins = "gpio22", "gpio24", "gpio40",
175 "gpio41";
176 function = "gpio";
177 drive-strength = <2>;
178 bias-pull-up;
179 };
180 };
181
182 leds_pins: leds_pins {
183 mux {
184 pins = "gpio14", "gpio15", "gpio35",
185 "gpio36", "gpio38", "gpio42",
186 "gpio43", "gpio46", "gpio55",
187 "gpio56", "gpio57", "gpio58";
188 function = "gpio";
189 bias-pull-down;
190 };
191
192 akro2 {
193 pins = "gpio15", "gpio35", "gpio38",
194 "gpio42", "gpio43", "gpio46",
195 "gpio55", "gpio56", "gpio57",
196 "gpio58";
197 drive-strength = <2>;
198 };
199
200 akro4 {
201 pins = "gpio14", "gpio36";
202 drive-strength = <4>;
203 };
204 };
205
206 /*
207 * Stock firmware has the following settings, so let's do the same.
208 * I don't sure why these are required.
209 */
210 akro_pins: akro_pinmux {
211 akro {
212 pins = "gpio17", "gpio26", "gpio47";
213 function = "gpio";
214 drive-strength = <2>;
215 bias-pull-down;
216 };
217
218 reset {
219 pins = "gpio45";
220 function = "gpio";
221 drive-strength = <2>;
222 bias-disable;
223 output-low;
224 };
225
226 gmac0_rgmii {
227 pins = "gpio25";
228 function = "gpio";
229 drive-strength = <8>;
230 bias-disable;
231 };
232 };
233 };
234
235 &gsbi5 {
236 status = "okay";
237 qcom,mode = <GSBI_PROT_SPI>;
238
239 spi@1a280000 {
240 status = "okay";
241
242 pinctrl-0 = <&spi_pins>;
243 pinctrl-names = "default";
244
245 cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
246
247 flash@0 {
248 compatible = "jedec,spi-nor";
249 reg = <0>;
250 spi-max-frequency = <50000000>;
251 m25p,fast-read;
252
253 partitions {
254 compatible = "fixed-partitions";
255 #address-cells = <1>;
256 #size-cells = <1>;
257
258 partition@0 {
259 label = "SBL1";
260 reg = <0x0000000 0x0020000>;
261 read-only;
262 };
263
264 partition@20000 {
265 label = "MIBIB";
266 reg = <0x0020000 0x0020000>;
267 read-only;
268 };
269
270 partition@40000 {
271 label = "SBL2";
272 reg = <0x0040000 0x0040000>;
273 read-only;
274 };
275
276 partition@80000 {
277 label = "SBL3";
278 reg = <0x0080000 0x0080000>;
279 read-only;
280 };
281
282 partition@100000 {
283 label = "DDRCONFIG";
284 reg = <0x0100000 0x0010000>;
285 read-only;
286 };
287
288 partition@110000 {
289 label = "SSD";
290 reg = <0x0110000 0x0010000>;
291 read-only;
292 };
293
294 partition@120000 {
295 label = "TZ";
296 reg = <0x0120000 0x0080000>;
297 read-only;
298 };
299
300 partition@1a0000 {
301 label = "RPM";
302 reg = <0x01a0000 0x0080000>;
303 read-only;
304 };
305
306 partition@220000 {
307 label = "APPSBL";
308 reg = <0x0220000 0x0080000>;
309 read-only;
310 };
311
312 partition@2a0000 {
313 label = "APPSBLENV";
314 reg = <0x02a0000 0x0010000>;
315 read-only;
316 };
317
318 factory: partition@2b0000 {
319 label = "PRODUCTDATA";
320 reg = <0x02b0000 0x0030000>;
321 read-only;
322
323 nvmem-layout {
324 compatible = "fixed-layout";
325 #address-cells = <1>;
326 #size-cells = <1>;
327
328 macaddr_factory_0: macaddr@0 {
329 reg = <0x0 0x6>;
330 };
331
332 macaddr_factory_6: macaddr@6 {
333 reg = <0x6 0x6>;
334 };
335
336 macaddr_PRODUCTDATA_c: macaddr@c {
337 reg = <0xc 0x6>;
338 };
339
340 macaddr_PRODUCTDATA_12: macaddr@12 {
341 reg = <0x12 0x6>;
342 };
343 };
344 };
345
346 partition@2e0000 {
347 label = "ART";
348 reg = <0x02e0000 0x0040000>;
349 read-only;
350
351 nvmem-layout {
352 compatible = "fixed-layout";
353 #address-cells = <1>;
354 #size-cells = <1>;
355
356 precal_ART_1000: precal@1000 {
357 reg = <0x1000 0x2f20>;
358 };
359
360 precal_ART_5000: precal@5000 {
361 reg = <0x5000 0x2f20>;
362 };
363 };
364 };
365
366 partition@320000 {
367 label = "TP";
368 reg = <0x0320000 0x0040000>;
369 read-only;
370 };
371
372 partition@360000 {
373 label = "TINY";
374 reg = <0x0360000 0x0500000>;
375 read-only;
376 };
377
378 partition@860000 {
379 compatible = "denx,uimage";
380 label = "firmware";
381 reg = <0x0860000 0x17a0000>;
382 };
383 };
384 };
385 };
386 };
387
388 &adm_dma {
389 status = "okay";
390 };
391
392 &pcie0 {
393 status = "okay";
394
395 bridge@0,0 {
396 reg = <0x00000000 0 0 0 0>;
397 #address-cells = <3>;
398 #size-cells = <2>;
399 ranges;
400
401 wifi@1,0 {
402 compatible = "qcom,ath10k";
403 reg = <0x00010000 0 0 0 0>;
404
405 qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
406
407 nvmem-cells = <&macaddr_PRODUCTDATA_12>, <&precal_ART_1000>;
408 nvmem-cell-names = "mac-address", "pre-calibration";
409 };
410 };
411 };
412
413 &pcie1 {
414 status = "okay";
415 force_gen1 = <1>;
416
417 bridge@0,0 {
418 reg = <0x00000000 0 0 0 0>;
419 #address-cells = <3>;
420 #size-cells = <2>;
421 ranges;
422
423 wifi@1,0 {
424 compatible = "qcom,ath10k";
425 reg = <0x00010000 0 0 0 0>;
426
427 ieee80211-freq-limit = <2400000 2483000>;
428 qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
429
430 nvmem-cells = <&macaddr_PRODUCTDATA_c>, <&precal_ART_5000>;
431 nvmem-cell-names = "mac-address", "pre-calibration";
432 };
433 };
434 };
435
436 &mdio0 {
437 status = "okay";
438
439 pinctrl-0 = <&mdio0_pins>;
440 pinctrl-names = "default";
441
442 switch@10 {
443 compatible = "qca,qca8337";
444 #address-cells = <1>;
445 #size-cells = <0>;
446 reg = <0x10>;
447
448 ports {
449 #address-cells = <1>;
450 #size-cells = <0>;
451
452 port@0 {
453 reg = <0>;
454 label = "cpu";
455 ethernet = <&gmac1>;
456 phy-mode = "rgmii";
457 tx-internal-delay-ps = <1000>;
458
459 fixed-link {
460 speed = <1000>;
461 full-duplex;
462 };
463 };
464
465 port@1 {
466 reg = <1>;
467 label = "wan";
468 phy-mode = "internal";
469 phy-handle = <&phy_port1>;
470
471 leds {
472 #address-cells = <1>;
473 #size-cells = <0>;
474
475 led@0 {
476 reg = <0>;
477 color = <LED_COLOR_ID_GREEN>;
478 function = LED_FUNCTION_WAN;
479 function-enumerator = <1>;
480 default-state = "keep";
481 };
482
483 led@1 {
484 reg = <1>;
485 color = <LED_COLOR_ID_GREEN>;
486 function = LED_FUNCTION_WAN;
487 function-enumerator = <2>;
488 default-state = "keep";
489 };
490
491 led@2 {
492 reg = <2>;
493 color = <LED_COLOR_ID_GREEN>;
494 function = LED_FUNCTION_WAN;
495 function-enumerator = <3>;
496 default-state = "keep";
497 };
498 };
499 };
500
501 port@2 {
502 reg = <2>;
503 label = "lan1";
504 phy-mode = "internal";
505 phy-handle = <&phy_port2>;
506
507 leds {
508 #address-cells = <1>;
509 #size-cells = <0>;
510
511 led@0 {
512 reg = <0>;
513 color = <LED_COLOR_ID_GREEN>;
514 function = LED_FUNCTION_LAN;
515 function-enumerator = <1>;
516 default-state = "keep";
517 };
518
519 led@1 {
520 reg = <1>;
521 color = <LED_COLOR_ID_GREEN>;
522 function = LED_FUNCTION_LAN;
523 function-enumerator = <2>;
524 default-state = "keep";
525 };
526
527 led@2 {
528 reg = <2>;
529 color = <LED_COLOR_ID_GREEN>;
530 function = LED_FUNCTION_LAN;
531 function-enumerator = <3>;
532 default-state = "keep";
533 };
534 };
535 };
536
537 port@3 {
538 reg = <3>;
539 label = "lan2";
540 phy-mode = "internal";
541 phy-handle = <&phy_port3>;
542
543 leds {
544 #address-cells = <1>;
545 #size-cells = <0>;
546
547 led@0 {
548 reg = <0>;
549 color = <LED_COLOR_ID_GREEN>;
550 function = LED_FUNCTION_LAN;
551 function-enumerator = <1>;
552 default-state = "keep";
553 };
554
555 led@1 {
556 reg = <1>;
557 color = <LED_COLOR_ID_GREEN>;
558 function = LED_FUNCTION_LAN;
559 function-enumerator = <2>;
560 default-state = "keep";
561 };
562
563 led@2 {
564 reg = <2>;
565 color = <LED_COLOR_ID_GREEN>;
566 function = LED_FUNCTION_LAN;
567 function-enumerator = <3>;
568 default-state = "keep";
569 };
570 };
571 };
572
573 port@4 {
574 reg = <4>;
575 label = "lan3";
576 phy-mode = "internal";
577 phy-handle = <&phy_port4>;
578
579 leds {
580 #address-cells = <1>;
581 #size-cells = <0>;
582
583 led@0 {
584 reg = <0>;
585 color = <LED_COLOR_ID_GREEN>;
586 function = LED_FUNCTION_LAN;
587 function-enumerator = <1>;
588 default-state = "keep";
589 };
590
591 led@1 {
592 reg = <1>;
593 color = <LED_COLOR_ID_GREEN>;
594 function = LED_FUNCTION_LAN;
595 function-enumerator = <2>;
596 default-state = "keep";
597 };
598
599 led@2 {
600 reg = <2>;
601 color = <LED_COLOR_ID_GREEN>;
602 function = LED_FUNCTION_LAN;
603 function-enumerator = <3>;
604 default-state = "keep";
605 };
606 };
607 };
608
609 port@5 {
610 reg = <5>;
611 label = "lan4";
612 phy-mode = "internal";
613 phy-handle = <&phy_port5>;
614
615 leds {
616 #address-cells = <1>;
617 #size-cells = <0>;
618
619 led@0 {
620 reg = <0>;
621 color = <LED_COLOR_ID_GREEN>;
622 function = LED_FUNCTION_LAN;
623 function-enumerator = <1>;
624 default-state = "keep";
625 };
626
627 led@1 {
628 reg = <1>;
629 color = <LED_COLOR_ID_GREEN>;
630 function = LED_FUNCTION_LAN;
631 function-enumerator = <2>;
632 default-state = "keep";
633 };
634
635 led@2 {
636 reg = <2>;
637 color = <LED_COLOR_ID_GREEN>;
638 function = LED_FUNCTION_LAN;
639 function-enumerator = <3>;
640 default-state = "keep";
641 };
642 };
643 };
644
645 port@6 {
646 reg = <6>;
647 label = "cpu";
648 ethernet = <&gmac2>;
649 phy-mode = "sgmii";
650 qca,sgmii-enable-pll;
651 qca,sgmii-rxclk-falling-edge;
652
653 fixed-link {
654 speed = <1000>;
655 full-duplex;
656 };
657 };
658 };
659
660 mdio {
661 #address-cells = <1>;
662 #size-cells = <0>;
663
664 phy_port1: phy@0 {
665 reg = <0>;
666 };
667
668 phy_port2: phy@1 {
669 reg = <1>;
670 };
671
672 phy_port3: phy@2 {
673 reg = <2>;
674 };
675
676 phy_port4: phy@3 {
677 reg = <3>;
678 };
679
680 phy_port5: phy@4 {
681 reg = <4>;
682 };
683 };
684 };
685 };
686
687 &gmac1 {
688 status = "okay";
689
690 pinctrl-0 = <&rgmii2_pins>;
691 pinctrl-names = "default";
692
693 phy-mode = "rgmii";
694 qcom,id = <1>;
695 mdiobus = <&mdio0>;
696 nvmem-cells = <&macaddr_factory_0>;
697 nvmem-cell-names = "mac-address";
698
699 fixed-link {
700 speed = <1000>;
701 full-duplex;
702 };
703 };
704
705 &gmac2 {
706 status = "okay";
707 phy-mode = "sgmii";
708 qcom,id = <2>;
709 mdiobus = <&mdio0>;
710 nvmem-cells = <&macaddr_factory_6>;
711 nvmem-cell-names = "mac-address";
712
713 fixed-link {
714 speed = <1000>;
715 full-duplex;
716 };
717 };
718
719 &hs_phy_0 {
720 status = "okay";
721 };
722
723 &ss_phy_0 {
724 status = "okay";
725 };
726
727 &usb3_0 {
728 status = "okay";
729 };
730
731 &hs_phy_1 {
732 status = "okay";
733 };
734
735 &ss_phy_1 {
736 status = "okay";
737 };
738
739 &usb3_1 {
740 status = "okay";
741 };