Commit ba4aebce authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Florian Fainelli

ARM: dts: BCM5301X: Describe switch ports in the main DTS

All Northstar SoCs have BCM5301x switches (BCM53011, BCM53012) with 8
ports (0-8 without 6). By design 3 switch ports (5, 7 and 8) are
hardwired to 3 on-SoC Ethernet interfaces. Switch port 8 requires
forcing link state.

It seems that global Northstar .dtsi file is the best place to describe
those hw details. Only device specific bits (like labels) should go to
device .dts files.

This seems to fit well with a tiny exception of Asus RT-AC88U which
somehow was designed to have switch 5 connected to an extra switch. This
case was simply handled with a /delete-property/.
Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Reviewed-by: Christian Lamparter <chunkeey@gmail.com> (MR32+MR26)
Link: https://lore.kernel.org/r/20230605132109.7933-1-zajec5@gmail.comSigned-off-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
parent 1d5682cc
...@@ -304,10 +304,49 @@ srab: ethernet-switch@18007000 { ...@@ -304,10 +304,49 @@ srab: ethernet-switch@18007000 {
status = "disabled"; status = "disabled";
/* ports are defined in board DTS */
ports { ports {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
port@0 {
reg = <0>;
};
port@1 {
reg = <1>;
};
port@2 {
reg = <2>;
};
port@3 {
reg = <3>;
};
port@4 {
reg = <4>;
};
port@5 {
reg = <5>;
ethernet = <&gmac0>;
};
port@7 {
reg = <7>;
ethernet = <&gmac1>;
};
port@8 {
reg = <8>;
ethernet = <&gmac2>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
}; };
}; };
......
...@@ -159,34 +159,27 @@ &srab { ...@@ -159,34 +159,27 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan1"; label = "lan1";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan2"; label = "lan2";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan3"; label = "lan3";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan4"; label = "lan4";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -75,19 +75,15 @@ &srab { ...@@ -75,19 +75,15 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "poe"; label = "poe";
}; };
port@4 { port@4 {
reg = <4>;
label = "lan"; label = "lan";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -82,14 +82,11 @@ &srab { ...@@ -82,14 +82,11 @@ &srab {
ports { ports {
port@4 { port@4 {
reg = <4>;
label = "lan"; label = "lan";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -100,34 +100,27 @@ &srab { ...@@ -100,34 +100,27 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan4"; label = "lan4";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan3"; label = "lan3";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan2"; label = "lan2";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan1"; label = "lan1";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -123,34 +123,27 @@ &srab { ...@@ -123,34 +123,27 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan4"; label = "lan4";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan3"; label = "lan3";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan2"; label = "lan2";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan1"; label = "lan1";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
......
...@@ -123,34 +123,27 @@ &srab { ...@@ -123,34 +123,27 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan1"; label = "lan1";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan2"; label = "lan2";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan3"; label = "lan3";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan4"; label = "lan4";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -75,14 +75,11 @@ &srab { ...@@ -75,14 +75,11 @@ &srab {
ports { ports {
port@4 { port@4 {
reg = <4>;
label = "poe"; label = "poe";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -124,36 +124,29 @@ &srab { ...@@ -124,36 +124,29 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan4"; label = "lan4";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan3"; label = "lan3";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan2"; label = "lan2";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan1"; label = "lan1";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
nvmem-cells = <&et0macaddr 5>; nvmem-cells = <&et0macaddr 5>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -191,39 +191,27 @@ &srab { ...@@ -191,39 +191,27 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan1"; label = "lan1";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan2"; label = "lan2";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan3"; label = "lan3";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan4"; label = "lan4";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
}; };
port@8 { port@8 {
reg = <8>;
label = "cpu"; label = "cpu";
ethernet = <&gmac2>;
fixed-link {
speed = <1000>;
full-duplex;
};
}; };
}; };
}; };
...@@ -181,32 +181,28 @@ &srab { ...@@ -181,32 +181,28 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan4"; label = "lan4";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan3"; label = "lan3";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan2"; label = "lan2";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan1"; label = "lan1";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
}; };
sw0_p5: port@5 { sw0_p5: port@5 {
reg = <5>; /delete-property/ethernet;
label = "extsw"; label = "extsw";
phy-mode = "rgmii"; phy-mode = "rgmii";
...@@ -218,8 +214,6 @@ fixed-link { ...@@ -218,8 +214,6 @@ fixed-link {
}; };
port@7 { port@7 {
reg = <7>;
ethernet = <&gmac1>;
label = "cpu"; label = "cpu";
fixed-link { fixed-link {
...@@ -229,14 +223,7 @@ fixed-link { ...@@ -229,14 +223,7 @@ fixed-link {
}; };
port@8 { port@8 {
reg = <8>;
ethernet = <&gmac2>;
label = "cpu"; label = "cpu";
fixed-link {
speed = <1000>;
full-duplex;
};
}; };
}; };
}; };
......
...@@ -124,39 +124,27 @@ &srab { ...@@ -124,39 +124,27 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan4"; label = "lan4";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan3"; label = "lan3";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan2"; label = "lan2";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan1"; label = "lan1";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
}; };
port@8 { port@8 {
reg = <8>;
label = "cpu"; label = "cpu";
ethernet = <&gmac2>;
fixed-link {
speed = <1000>;
full-duplex;
};
}; };
}; };
}; };
...@@ -172,40 +172,28 @@ &srab { ...@@ -172,40 +172,28 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan1"; label = "lan1";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan2"; label = "lan2";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan3"; label = "lan3";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan4"; label = "lan4";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
}; };
port@8 { port@8 {
reg = <8>;
label = "cpu"; label = "cpu";
ethernet = <&gmac2>;
phy-mode = "rgmii"; phy-mode = "rgmii";
fixed-link {
speed = <1000>;
full-duplex;
};
}; };
}; };
}; };
...@@ -207,29 +207,32 @@ &srab { ...@@ -207,29 +207,32 @@ &srab {
dsa,member = <0 0>; dsa,member = <0 0>;
ports { ports {
sw0_p0: port@0 {
label = "extsw";
fixed-link {
speed = <1000>;
full-duplex;
};
};
port@1 { port@1 {
reg = <1>;
label = "lan7"; label = "lan7";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan4"; label = "lan4";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan8"; label = "lan8";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
}; };
port@5 { port@5 {
reg = <5>;
ethernet = <&gmac0>;
label = "cpu"; label = "cpu";
status = "disabled"; status = "disabled";
...@@ -240,8 +243,6 @@ fixed-link { ...@@ -240,8 +243,6 @@ fixed-link {
}; };
port@7 { port@7 {
reg = <7>;
ethernet = <&gmac1>;
label = "cpu"; label = "cpu";
status = "disabled"; status = "disabled";
...@@ -252,24 +253,7 @@ fixed-link { ...@@ -252,24 +253,7 @@ fixed-link {
}; };
port@8 { port@8 {
reg = <8>;
ethernet = <&gmac2>;
label = "cpu"; label = "cpu";
fixed-link {
speed = <1000>;
full-duplex;
};
};
sw0_p0: port@0 {
reg = <0>;
label = "extsw";
fixed-link {
speed = <1000>;
full-duplex;
};
}; };
}; };
}; };
......
...@@ -83,36 +83,29 @@ &srab { ...@@ -83,36 +83,29 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "wan"; label = "wan";
nvmem-cells = <&et0macaddr 1>; nvmem-cells = <&et0macaddr 1>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan4"; label = "lan4";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan3"; label = "lan3";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan2"; label = "lan2";
}; };
port@4 { port@4 {
reg = <4>;
label = "lan1"; label = "lan1";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -73,19 +73,15 @@ &srab { ...@@ -73,19 +73,15 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "poe"; label = "poe";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan"; label = "lan";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -83,36 +83,29 @@ &srab { ...@@ -83,36 +83,29 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "wan"; label = "wan";
nvmem-cells = <&et0macaddr 1>; nvmem-cells = <&et0macaddr 1>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan4"; label = "lan4";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan3"; label = "lan3";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan2"; label = "lan2";
}; };
port@4 { port@4 {
reg = <4>;
label = "lan1"; label = "lan1";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -69,14 +69,11 @@ &srab { ...@@ -69,14 +69,11 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan"; label = "lan";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -123,36 +123,29 @@ &srab { ...@@ -123,36 +123,29 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan4"; label = "lan4";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan3"; label = "lan3";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan2"; label = "lan2";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan1"; label = "lan1";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
nvmem-cells = <&et0macaddr 5>; nvmem-cells = <&et0macaddr 5>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -98,36 +98,29 @@ &srab { ...@@ -98,36 +98,29 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "lan4"; label = "lan4";
}; };
port@1 { port@1 {
reg = <1>;
label = "lan3"; label = "lan3";
}; };
port@2 { port@2 {
reg = <2>;
label = "lan2"; label = "lan2";
}; };
port@3 { port@3 {
reg = <3>;
label = "lan1"; label = "lan1";
}; };
port@4 { port@4 {
reg = <4>;
label = "wan"; label = "wan";
nvmem-cells = <&et0macaddr 5>; nvmem-cells = <&et0macaddr 5>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
}; };
}; };
}; };
...@@ -115,14 +115,11 @@ &srab { ...@@ -115,14 +115,11 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "poe"; label = "poe";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
......
...@@ -176,14 +176,11 @@ &srab { ...@@ -176,14 +176,11 @@ &srab {
ports { ports {
port@0 { port@0 {
reg = <0>;
label = "poe"; label = "poe";
}; };
port@5 { port@5 {
reg = <5>;
label = "cpu"; label = "cpu";
ethernet = <&gmac0>;
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment