Add Seville Ethernet switch to T1040RDB
Subsystems (4)
cover Add Seville Ethernet switch to T1040RDB
Seville is a DSA switch that is embedded inside the T1040 SoC, and supported by the mscc_seville DSA driver. The driver has been accepted this release cycle and is currently available in net-next (and therefore, in linux-next).
This series adds this switch to the SoC's dtsi files and to the T1040RDB board file.
Vladimir Oltean (4):
powerpc: dts: t1040: add bindings for Seville Ethernet switch
powerpc: dts: t1040: label the 2 MDIO controllers
powerpc: dts: t1040rdb: put SGMII PHY under &mdio0 label
powerpc: dts: t1040rdb: add ports for Seville Ethernet switch
arch/powerpc/boot/dts/fsl/t1040rdb.dts | 123 +++++++++++++++++++- arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 79 ++++++++++++- 2 files changed, 194 insertions(+), 8 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/4 powerpc: dts: t1040: add bindings for Seville Ethernet switch
Add the description of the embedded L2 switch inside the SoC dtsi file for NXP T1040.
--- arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 75 +++++++++++++++++++++ 1 file changed, 75 insertions(+)
arch/powerpc/boot/dts/fsl/t1040si-post.dtsi +75 -0
@@ -628,6 +628,81 @@ mdio@fd000 { status = "disabled"; }; }; + + seville_switch: ethernet-switch@800000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "mscc,vsc9953-switch"; + little-endian; + reg = <0x800000 0x290000>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + seville_port0: port@0 { + reg = <0>; + status = "disabled"; + }; + + seville_port1: port@1 { + reg = <1>; + status = "disabled"; + }; + + seville_port2: port@2 { + reg = <2>; + status = "disabled"; + }; + + seville_port3: port@3 { + reg = <3>; + status = "disabled"; + }; + + seville_port4: port@4 { + reg = <4>; + status = "disabled"; + }; + + seville_port5: port@5 { + reg = <5>; + status = "disabled"; + }; + + seville_port6: port@6 { + reg = <6>; + status = "disabled"; + }; + + seville_port7: port@7 { + reg = <7>; + status = "disabled"; + }; + + seville_port8: port@8 { + reg = <8>; + phy-mode = "internal"; + status = "disabled"; + + fixed-link { + speed = <2500>; + full-duplex; + }; + }; + + seville_port9: port@9 { + reg = <9>; + phy-mode = "internal"; + status = "disabled"; + + fixed-link { + speed = <2500>; + full-duplex; + }; + }; + }; + }; }; &qe {
Signature · 1 line
2.25.1
PATCH 2/4 powerpc: dts: t1040: label the 2 MDIO controllers
In reply to Vladimir OlteanIn preparation of referencing the MDIO nodes from board DTS files (so that we can add PHY nodes easier), add labels to mdio0 and mdio1.
--- arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/boot/dts/fsl/t1040si-post.dtsi +2 -2
@@ -620,11 +620,11 @@ enet3: ethernet@e6000 { enet4: ethernet@e8000 { }; - mdio@fc000 { + mdio0: mdio@fc000 { interrupts = <100 1 0 0>; }; - mdio@fd000 { + mdio1: mdio@fd000 { status = "disabled"; }; };
Signature · 1 line
2.25.1
PATCH 3/4 powerpc: dts: t1040rdb: put SGMII PHY under &mdio0 label
In reply to Vladimir OlteanWe're going to add 8 more PHYs in a future patch. It is easier to follow the hardware description if we don't need to fish for the path of the MDIO controllers inside the SoC and just use the labels.
--- arch/powerpc/boot/dts/fsl/t1040rdb.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/powerpc/boot/dts/fsl/t1040rdb.dts +6 -6
@@ -59,12 +59,6 @@ ethernet@e4000 { phy-handle = <&phy_sgmii_2>; phy-connection-type = "sgmii"; }; - - mdio@fc000 { - phy_sgmii_2: ethernet-phy@3 { - reg = <0x03>; - }; - }; }; };
@@ -76,3 +70,9 @@ cpld@3,0 { }; #include "t1040si-post.dtsi" + +&mdio0 { + phy_sgmii_2: ethernet-phy@3 { + reg = <0x3>; + }; +};
Signature · 1 line
2.25.1
RE: [PATCH devicetree 3/4] powerpc: dts: t1040rdb: put SGMII PHY under &mdio0 label
Quoted 12 lines
-----Original Message-----
From: Vladimir Oltean <[email protected]>
Sent: Wednesday, July 22, 2020 8:24 PM
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; linuxppc- [email protected]; [email protected]; [email protected]; Madalin Bucur (OSS) <[email protected]>; Radu-andrei Bulie <[email protected]>; [email protected]
Subject: [PATCH devicetree 3/4] powerpc: dts: t1040rdb: put SGMII PHY under &mdio0 label
Quoted 4 lines
We're going to add 8 more PHYs in a future patch. It is easier to follow the hardware description if we don't need to fish for the path of the MDIO controllers inside the SoC and just use the labels.
Please align to the existing structure, it may be easier to add something without paying attention to that but it's better to keep things organized. This structure is used across all the device trees of the platforms using DPAA, let's not start diverging now.
Quoted 35 lines
Signed-off-by Vladimir Oltean <[email protected]>--- arch/powerpc/boot/dts/fsl/t1040rdb.dts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)arch/powerpc/boot/dts/fsl/t1040rdb.dts +6
-7@@ -59,12 +59,6 @@ ethernet@e4000 { phy-handle = <&phy_sgmii_2>; phy-connection-type = "sgmii"; }; - - mdio@fc000 { - phy_sgmii_2: ethernet-phy@3 { - reg = <0x03>; - }; - }; }; };@@ -76,3 +70,9 @@ cpld@3,0 { }; #include "t1040si-post.dtsi" + +&mdio0 { + phy_sgmii_2: ethernet-phy@3 { + reg = <0x3>; + }; +}; --2.25.1
PATCH 4/4 powerpc: dts: t1040rdb: add ports for Seville Ethernet switch
In reply to Vladimir OlteanDefine the network interface names for the switch ports and hook them up to the 2 QSGMII PHYs that are onboard.
A conscious decision was taken to go along with the numbers that are written on the front panel of the board and not with the hardware numbers of the switch chip ports. The 2 are shifted by 4.
--- arch/powerpc/boot/dts/fsl/t1040rdb.dts | 111 +++++++++++++++++++++++++ 1 file changed, 111 insertions(+)
arch/powerpc/boot/dts/fsl/t1040rdb.dts +111 -0
@@ -75,4 +75,115 @@ &mdio0 { phy_sgmii_2: ethernet-phy@3 { reg = <0x3>; }; + + /* VSC8514 QSGMII PHY */ + phy_qsgmii_0: ethernet-phy@4 { + reg = <0x4>; + }; + + phy_qsgmii_1: ethernet-phy@5 { + reg = <0x5>; + }; + + phy_qsgmii_2: ethernet-phy@6 { + reg = <0x6>; + }; + + phy_qsgmii_3: ethernet-phy@7 { + reg = <0x7>; + }; + + /* VSC8514 QSGMII PHY */ + phy_qsgmii_4: ethernet-phy@8 { + reg = <0x8>; + }; + + phy_qsgmii_5: ethernet-phy@9 { + reg = <0x9>; + }; + + phy_qsgmii_6: ethernet-phy@a { + reg = <0xa>; + }; + + phy_qsgmii_7: ethernet-phy@b { + reg = <0xb>; + }; +}; + +&seville_port0 { + managed = "in-band-status"; + phy-handle = <&phy_qsgmii_0>; + phy-mode = "qsgmii"; + /* ETH4 written on chassis */ + label = "swp4"; + status = "okay"; +}; + +&seville_port1 { + managed = "in-band-status"; + phy-handle = <&phy_qsgmii_1>; + phy-mode = "qsgmii"; + /* ETH5 written on chassis */ + label = "swp5"; + status = "okay"; +}; + +&seville_port2 { + managed = "in-band-status"; + phy-handle = <&phy_qsgmii_2>; + phy-mode = "qsgmii"; + /* ETH6 written on chassis */ + label = "swp6"; + status = "okay"; +}; + +&seville_port3 { + managed = "in-band-status"; + phy-handle = <&phy_qsgmii_3>; + phy-mode = "qsgmii"; + /* ETH7 written on chassis */ + label = "swp7"; + status = "okay"; +}; + +&seville_port4 { + managed = "in-band-status"; + phy-handle = <&phy_qsgmii_4>; + phy-mode = "qsgmii"; + /* ETH8 written on chassis */ + label = "swp8"; + status = "okay"; +}; + +&seville_port5 { + managed = "in-band-status"; + phy-handle = <&phy_qsgmii_5>; + phy-mode = "qsgmii"; + /* ETH9 written on chassis */ + label = "swp9"; + status = "okay"; +}; + +&seville_port6 { + managed = "in-band-status"; + phy-handle = <&phy_qsgmii_6>; + phy-mode = "qsgmii"; + /* ETH10 written on chassis */ + label = "swp10"; + status = "okay"; +}; + +&seville_port7 { + managed = "in-band-status"; + phy-handle = <&phy_qsgmii_7>; + phy-mode = "qsgmii"; + /* ETH11 written on chassis */ + label = "swp11"; + status = "okay"; +}; + +&seville_port8 { + ethernet = <&enet0>; + status = "okay"; };
Signature · 1 line
2.25.1