fa2f21af5325041decf20f4498701f31a81a6890
[openwrt/staging/xback.git] /
1 From ba4aebce23b2affb810b8a60eae853674d2cded2 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Mon, 5 Jun 2023 15:21:09 +0200
4 Subject: [PATCH] ARM: dts: BCM5301X: Describe switch ports in the main DTS
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 All Northstar SoCs have BCM5301x switches (BCM53011, BCM53012) with 8
10 ports (0-8 without 6). By design 3 switch ports (5, 7 and 8) are
11 hardwired to 3 on-SoC Ethernet interfaces. Switch port 8 requires
12 forcing link state.
13
14 It seems that global Northstar .dtsi file is the best place to describe
15 those hw details. Only device specific bits (like labels) should go to
16 device .dts files.
17
18 This seems to fit well with a tiny exception of Asus RT-AC88U which
19 somehow was designed to have switch 5 connected to an extra switch. This
20 case was simply handled with a /delete-property/.
21
22 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
23 Reviewed-by: Christian Lamparter <chunkeey@gmail.com> (MR32+MR26)
24 Link: https://lore.kernel.org/r/20230605132109.7933-1-zajec5@gmail.com
25 Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
26 ---
27 arch/arm/boot/dts/bcm-ns.dtsi | 41 ++++++++++++++++++-
28 .../bcm4708-buffalo-wzr-1166dhp-common.dtsi | 7 ----
29 arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts | 4 --
30 arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts | 3 --
31 arch/arm/boot/dts/bcm4708-netgear-r6250.dts | 7 ----
32 arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts | 7 ----
33 .../boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 7 ----
34 arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts | 3 --
35 arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts | 7 ----
36 arch/arm/boot/dts/bcm4709-netgear-r8000.dts | 12 ------
37 arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 17 +-------
38 arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 12 ------
39 arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts | 12 ------
40 .../boot/dts/bcm47094-linksys-panamera.dts | 34 ++++-----------
41 arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts | 7 ----
42 arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts | 4 --
43 arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts | 7 ----
44 arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts | 3 --
45 arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts | 7 ----
46 .../boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 7 ----
47 arch/arm/boot/dts/bcm53015-meraki-mr26.dts | 3 --
48 arch/arm/boot/dts/bcm53016-meraki-mr32.dts | 3 --
49 22 files changed, 51 insertions(+), 163 deletions(-)
50
51 --- a/arch/arm/boot/dts/bcm-ns.dtsi
52 +++ b/arch/arm/boot/dts/bcm-ns.dtsi
53 @@ -304,10 +304,49 @@
54
55 status = "disabled";
56
57 - /* ports are defined in board DTS */
58 ports {
59 #address-cells = <1>;
60 #size-cells = <0>;
61 +
62 + port@0 {
63 + reg = <0>;
64 + };
65 +
66 + port@1 {
67 + reg = <1>;
68 + };
69 +
70 + port@2 {
71 + reg = <2>;
72 + };
73 +
74 + port@3 {
75 + reg = <3>;
76 + };
77 +
78 + port@4 {
79 + reg = <4>;
80 + };
81 +
82 + port@5 {
83 + reg = <5>;
84 + ethernet = <&gmac0>;
85 + };
86 +
87 + port@7 {
88 + reg = <7>;
89 + ethernet = <&gmac1>;
90 + };
91 +
92 + port@8 {
93 + reg = <8>;
94 + ethernet = <&gmac2>;
95 +
96 + fixed-link {
97 + speed = <1000>;
98 + full-duplex;
99 + };
100 + };
101 };
102 };
103
104 --- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi
105 +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi
106 @@ -159,34 +159,27 @@
107
108 ports {
109 port@0 {
110 - reg = <0>;
111 label = "lan1";
112 };
113
114 port@1 {
115 - reg = <1>;
116 label = "lan2";
117 };
118
119 port@2 {
120 - reg = <2>;
121 label = "lan3";
122 };
123
124 port@3 {
125 - reg = <3>;
126 label = "lan4";
127 };
128
129 port@4 {
130 - reg = <4>;
131 label = "wan";
132 };
133
134 port@5 {
135 - reg = <5>;
136 label = "cpu";
137 - ethernet = <&gmac0>;
138 };
139 };
140 };
141 --- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
142 +++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
143 @@ -75,19 +75,15 @@
144
145 ports {
146 port@0 {
147 - reg = <0>;
148 label = "poe";
149 };
150
151 port@4 {
152 - reg = <4>;
153 label = "lan";
154 };
155
156 port@5 {
157 - reg = <5>;
158 label = "cpu";
159 - ethernet = <&gmac0>;
160 };
161 };
162 };
163 --- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
164 +++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
165 @@ -82,14 +82,11 @@
166
167 ports {
168 port@4 {
169 - reg = <4>;
170 label = "lan";
171 };
172
173 port@5 {
174 - reg = <5>;
175 label = "cpu";
176 - ethernet = <&gmac0>;
177 };
178 };
179 };
180 --- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
181 +++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
182 @@ -100,34 +100,27 @@
183
184 ports {
185 port@0 {
186 - reg = <0>;
187 label = "lan4";
188 };
189
190 port@1 {
191 - reg = <1>;
192 label = "lan3";
193 };
194
195 port@2 {
196 - reg = <2>;
197 label = "lan2";
198 };
199
200 port@3 {
201 - reg = <3>;
202 label = "lan1";
203 };
204
205 port@4 {
206 - reg = <4>;
207 label = "wan";
208 };
209
210 port@5 {
211 - reg = <5>;
212 label = "cpu";
213 - ethernet = <&gmac0>;
214 };
215 };
216 };
217 --- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
218 +++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
219 @@ -123,34 +123,27 @@
220
221 ports {
222 port@0 {
223 - reg = <0>;
224 label = "lan4";
225 };
226
227 port@1 {
228 - reg = <1>;
229 label = "lan3";
230 };
231
232 port@2 {
233 - reg = <2>;
234 label = "lan2";
235 };
236
237 port@3 {
238 - reg = <3>;
239 label = "lan1";
240 };
241
242 port@4 {
243 - reg = <4>;
244 label = "wan";
245 };
246
247 port@5 {
248 - reg = <5>;
249 label = "cpu";
250 - ethernet = <&gmac0>;
251 };
252 };
253 };
254 --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
255 +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
256 @@ -123,34 +123,27 @@
257
258 ports {
259 port@0 {
260 - reg = <0>;
261 label = "lan1";
262 };
263
264 port@1 {
265 - reg = <1>;
266 label = "lan2";
267 };
268
269 port@2 {
270 - reg = <2>;
271 label = "lan3";
272 };
273
274 port@3 {
275 - reg = <3>;
276 label = "lan4";
277 };
278
279 port@4 {
280 - reg = <4>;
281 label = "wan";
282 };
283
284 port@5 {
285 - reg = <5>;
286 label = "cpu";
287 - ethernet = <&gmac0>;
288 };
289 };
290 };
291 --- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
292 +++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
293 @@ -75,14 +75,11 @@
294
295 ports {
296 port@4 {
297 - reg = <4>;
298 label = "poe";
299 };
300
301 port@5 {
302 - reg = <5>;
303 label = "cpu";
304 - ethernet = <&gmac0>;
305 };
306 };
307 };
308 --- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
309 +++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
310 @@ -124,36 +124,29 @@
311
312 ports {
313 port@0 {
314 - reg = <0>;
315 label = "lan4";
316 };
317
318 port@1 {
319 - reg = <1>;
320 label = "lan3";
321 };
322
323 port@2 {
324 - reg = <2>;
325 label = "lan2";
326 };
327
328 port@3 {
329 - reg = <3>;
330 label = "lan1";
331 };
332
333 port@4 {
334 - reg = <4>;
335 label = "wan";
336 nvmem-cells = <&et0macaddr 5>;
337 nvmem-cell-names = "mac-address";
338 };
339
340 port@5 {
341 - reg = <5>;
342 label = "cpu";
343 - ethernet = <&gmac0>;
344 };
345 };
346 };
347 --- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
348 +++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
349 @@ -191,39 +191,27 @@
350
351 ports {
352 port@0 {
353 - reg = <0>;
354 label = "lan1";
355 };
356
357 port@1 {
358 - reg = <1>;
359 label = "lan2";
360 };
361
362 port@2 {
363 - reg = <2>;
364 label = "lan3";
365 };
366
367 port@3 {
368 - reg = <3>;
369 label = "lan4";
370 };
371
372 port@4 {
373 - reg = <4>;
374 label = "wan";
375 };
376
377 port@8 {
378 - reg = <8>;
379 label = "cpu";
380 - ethernet = <&gmac2>;
381 -
382 - fixed-link {
383 - speed = <1000>;
384 - full-duplex;
385 - };
386 };
387 };
388 };
389 --- a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
390 +++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
391 @@ -181,32 +181,28 @@
392
393 ports {
394 port@0 {
395 - reg = <0>;
396 label = "lan4";
397 };
398
399 port@1 {
400 - reg = <1>;
401 label = "lan3";
402 };
403
404 port@2 {
405 - reg = <2>;
406 label = "lan2";
407 };
408
409 port@3 {
410 - reg = <3>;
411 label = "lan1";
412 };
413
414 port@4 {
415 - reg = <4>;
416 label = "wan";
417 };
418
419 sw0_p5: port@5 {
420 - reg = <5>;
421 + /delete-property/ethernet;
422 +
423 label = "extsw";
424 phy-mode = "rgmii";
425
426 @@ -218,8 +214,6 @@
427 };
428
429 port@7 {
430 - reg = <7>;
431 - ethernet = <&gmac1>;
432 label = "cpu";
433
434 fixed-link {
435 @@ -229,14 +223,7 @@
436 };
437
438 port@8 {
439 - reg = <8>;
440 - ethernet = <&gmac2>;
441 label = "cpu";
442 -
443 - fixed-link {
444 - speed = <1000>;
445 - full-duplex;
446 - };
447 };
448 };
449 };
450 --- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
451 +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
452 @@ -124,39 +124,27 @@
453
454 ports {
455 port@0 {
456 - reg = <0>;
457 label = "lan4";
458 };
459
460 port@1 {
461 - reg = <1>;
462 label = "lan3";
463 };
464
465 port@2 {
466 - reg = <2>;
467 label = "lan2";
468 };
469
470 port@3 {
471 - reg = <3>;
472 label = "lan1";
473 };
474
475 port@4 {
476 - reg = <4>;
477 label = "wan";
478 };
479
480 port@8 {
481 - reg = <8>;
482 label = "cpu";
483 - ethernet = <&gmac2>;
484 -
485 - fixed-link {
486 - speed = <1000>;
487 - full-duplex;
488 - };
489 };
490 };
491 };
492 --- a/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts
493 +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts
494 @@ -172,40 +172,28 @@
495
496 ports {
497 port@0 {
498 - reg = <0>;
499 label = "lan1";
500 };
501
502 port@1 {
503 - reg = <1>;
504 label = "lan2";
505 };
506
507 port@2 {
508 - reg = <2>;
509 label = "lan3";
510 };
511
512 port@3 {
513 - reg = <3>;
514 label = "lan4";
515 };
516
517 port@4 {
518 - reg = <4>;
519 label = "wan";
520 };
521
522 port@8 {
523 - reg = <8>;
524 label = "cpu";
525 - ethernet = <&gmac2>;
526 phy-mode = "rgmii";
527 -
528 - fixed-link {
529 - speed = <1000>;
530 - full-duplex;
531 - };
532 };
533 };
534 };
535 --- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
536 +++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
537 @@ -207,29 +207,32 @@
538 dsa,member = <0 0>;
539
540 ports {
541 + sw0_p0: port@0 {
542 + label = "extsw";
543 +
544 + fixed-link {
545 + speed = <1000>;
546 + full-duplex;
547 + };
548 + };
549 +
550 port@1 {
551 - reg = <1>;
552 label = "lan7";
553 };
554
555 port@2 {
556 - reg = <2>;
557 label = "lan4";
558 };
559
560 port@3 {
561 - reg = <3>;
562 label = "lan8";
563 };
564
565 port@4 {
566 - reg = <4>;
567 label = "wan";
568 };
569
570 port@5 {
571 - reg = <5>;
572 - ethernet = <&gmac0>;
573 label = "cpu";
574 status = "disabled";
575
576 @@ -240,8 +243,6 @@
577 };
578
579 port@7 {
580 - reg = <7>;
581 - ethernet = <&gmac1>;
582 label = "cpu";
583 status = "disabled";
584
585 @@ -252,24 +253,7 @@
586 };
587
588 port@8 {
589 - reg = <8>;
590 - ethernet = <&gmac2>;
591 label = "cpu";
592 -
593 - fixed-link {
594 - speed = <1000>;
595 - full-duplex;
596 - };
597 - };
598 -
599 - sw0_p0: port@0 {
600 - reg = <0>;
601 - label = "extsw";
602 -
603 - fixed-link {
604 - speed = <1000>;
605 - full-duplex;
606 - };
607 };
608 };
609 };
610 --- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
611 +++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
612 @@ -83,36 +83,29 @@
613
614 ports {
615 port@0 {
616 - reg = <0>;
617 label = "wan";
618 nvmem-cells = <&et0macaddr 1>;
619 nvmem-cell-names = "mac-address";
620 };
621
622 port@1 {
623 - reg = <1>;
624 label = "lan4";
625 };
626
627 port@2 {
628 - reg = <2>;
629 label = "lan3";
630 };
631
632 port@3 {
633 - reg = <3>;
634 label = "lan2";
635 };
636
637 port@4 {
638 - reg = <4>;
639 label = "lan1";
640 };
641
642 port@5 {
643 - reg = <5>;
644 label = "cpu";
645 - ethernet = <&gmac0>;
646 };
647 };
648 };
649 --- a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
650 +++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
651 @@ -73,19 +73,15 @@
652
653 ports {
654 port@0 {
655 - reg = <0>;
656 label = "poe";
657 };
658
659 port@1 {
660 - reg = <1>;
661 label = "lan";
662 };
663
664 port@5 {
665 - reg = <5>;
666 label = "cpu";
667 - ethernet = <&gmac0>;
668 };
669 };
670 };
671 --- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
672 +++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
673 @@ -83,36 +83,29 @@
674
675 ports {
676 port@0 {
677 - reg = <0>;
678 label = "wan";
679 nvmem-cells = <&et0macaddr 1>;
680 nvmem-cell-names = "mac-address";
681 };
682
683 port@1 {
684 - reg = <1>;
685 label = "lan4";
686 };
687
688 port@2 {
689 - reg = <2>;
690 label = "lan3";
691 };
692
693 port@3 {
694 - reg = <3>;
695 label = "lan2";
696 };
697
698 port@4 {
699 - reg = <4>;
700 label = "lan1";
701 };
702
703 port@5 {
704 - reg = <5>;
705 label = "cpu";
706 - ethernet = <&gmac0>;
707 };
708 };
709 };
710 --- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
711 +++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
712 @@ -69,14 +69,11 @@
713
714 ports {
715 port@0 {
716 - reg = <0>;
717 label = "lan";
718 };
719
720 port@5 {
721 - reg = <5>;
722 label = "cpu";
723 - ethernet = <&gmac0>;
724 };
725 };
726 };
727 --- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
728 +++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
729 @@ -123,36 +123,29 @@
730
731 ports {
732 port@0 {
733 - reg = <0>;
734 label = "lan4";
735 };
736
737 port@1 {
738 - reg = <1>;
739 label = "lan3";
740 };
741
742 port@2 {
743 - reg = <2>;
744 label = "lan2";
745 };
746
747 port@3 {
748 - reg = <3>;
749 label = "lan1";
750 };
751
752 port@4 {
753 - reg = <4>;
754 label = "wan";
755 nvmem-cells = <&et0macaddr 5>;
756 nvmem-cell-names = "mac-address";
757 };
758
759 port@5 {
760 - reg = <5>;
761 label = "cpu";
762 - ethernet = <&gmac0>;
763 };
764 };
765 };
766 --- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
767 +++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
768 @@ -98,36 +98,29 @@
769
770 ports {
771 port@0 {
772 - reg = <0>;
773 label = "lan4";
774 };
775
776 port@1 {
777 - reg = <1>;
778 label = "lan3";
779 };
780
781 port@2 {
782 - reg = <2>;
783 label = "lan2";
784 };
785
786 port@3 {
787 - reg = <3>;
788 label = "lan1";
789 };
790
791 port@4 {
792 - reg = <4>;
793 label = "wan";
794 nvmem-cells = <&et0macaddr 5>;
795 nvmem-cell-names = "mac-address";
796 };
797
798 port@5 {
799 - reg = <5>;
800 label = "cpu";
801 - ethernet = <&gmac0>;
802 };
803 };
804 };
805 --- a/arch/arm/boot/dts/bcm53015-meraki-mr26.dts
806 +++ b/arch/arm/boot/dts/bcm53015-meraki-mr26.dts
807 @@ -115,14 +115,11 @@
808
809 ports {
810 port@0 {
811 - reg = <0>;
812 label = "poe";
813 };
814
815 port@5 {
816 - reg = <5>;
817 label = "cpu";
818 - ethernet = <&gmac0>;
819
820 fixed-link {
821 speed = <1000>;
822 --- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
823 +++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
824 @@ -176,14 +176,11 @@
825
826 ports {
827 port@0 {
828 - reg = <0>;
829 label = "poe";
830 };
831
832 port@5 {
833 - reg = <5>;
834 label = "cpu";
835 - ethernet = <&gmac0>;
836
837 fixed-link {
838 speed = <1000>;