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