linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB
@ 2020-10-01 13:20 Vladimir Oltean
  2020-10-01 13:20 ` [PATCH v3 devicetree 1/2] powerpc: dts: t1040: add bindings for Seville Ethernet switch Vladimir Oltean
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Vladimir Oltean @ 2020-10-01 13:20 UTC (permalink / raw)
  To: robh+dt, shawnguo, mpe, devicetree
  Cc: andrew, madalin.bucur, linux-kernel, radu-andrei.bulie, fido_max,
	paulus, netdev, linuxppc-dev

Seville is a DSA switch that is embedded inside the T1040 SoC, and
supported by the mscc_seville DSA driver inside drivers/net/dsa/ocelot.

This series adds this switch to the SoC's dtsi files and to the T1040RDB
board file.

Vladimir Oltean (2):
  powerpc: dts: t1040: add bindings for Seville Ethernet switch
  powerpc: dts: t1040rdb: add ports for Seville Ethernet switch

 arch/powerpc/boot/dts/fsl/t1040rdb.dts      | 107 ++++++++++++++++++++
 arch/powerpc/boot/dts/fsl/t1040si-post.dtsi |  78 ++++++++++++++
 2 files changed, 185 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 devicetree 1/2] powerpc: dts: t1040: add bindings for Seville Ethernet switch
  2020-10-01 13:20 [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB Vladimir Oltean
@ 2020-10-01 13:20 ` Vladimir Oltean
  2020-10-01 13:23   ` Andrew Lunn
  2020-10-01 13:20 ` [PATCH v3 devicetree 2/2] powerpc: dts: t1040rdb: add ports " Vladimir Oltean
  2020-10-01 20:10 ` [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: Vladimir Oltean @ 2020-10-01 13:20 UTC (permalink / raw)
  To: robh+dt, shawnguo, mpe, devicetree
  Cc: andrew, madalin.bucur, linux-kernel, radu-andrei.bulie, fido_max,
	paulus, netdev, linuxppc-dev

Add the description of the embedded L2 switch inside the SoC dtsi file
for NXP T1040.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Maxim Kochetkov <fido_max@inbox.ru>
---
Changes in v3:
Added definition for frame extraction interrupt, even if the driver
doesn't use it at the moment.

Changes in v2:
Make switch node disabled by default.

 arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 78 +++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
index 315d0557eefc..f58eb820eb5e 100644
--- a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
@@ -628,6 +628,84 @@ mdio@fd000 {
 			status = "disabled";
 		};
 	};
+
+	seville_switch: ethernet-switch@800000 {
+		compatible = "mscc,vsc9953-switch";
+		reg = <0x800000 0x290000>;
+		interrupts = <26 2 0 0>;
+		interrupt-names = "xtr";
+		little-endian;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+
+		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 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 devicetree 2/2] powerpc: dts: t1040rdb: add ports for Seville Ethernet switch
  2020-10-01 13:20 [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB Vladimir Oltean
  2020-10-01 13:20 ` [PATCH v3 devicetree 1/2] powerpc: dts: t1040: add bindings for Seville Ethernet switch Vladimir Oltean
@ 2020-10-01 13:20 ` Vladimir Oltean
  2020-10-01 13:22   ` Andrew Lunn
  2020-10-01 20:10 ` [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB David Miller
  2 siblings, 1 reply; 7+ messages in thread
From: Vladimir Oltean @ 2020-10-01 13:20 UTC (permalink / raw)
  To: robh+dt, shawnguo, mpe, devicetree
  Cc: andrew, madalin.bucur, linux-kernel, radu-andrei.bulie, fido_max,
	paulus, netdev, linuxppc-dev

Define 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 numbering schemes are
shifted by 8.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Maxim Kochetkov <fido_max@inbox.ru>
---
Changes in v3:
Renamed interfaces from swpN to ETHN, as per Andrew Lunn's suggestion.

Changes in v2:
Use the existing way of accessing the mdio bus and not labels.

 arch/powerpc/boot/dts/fsl/t1040rdb.dts | 107 +++++++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/arch/powerpc/boot/dts/fsl/t1040rdb.dts b/arch/powerpc/boot/dts/fsl/t1040rdb.dts
index 65ff34c49025..e4067f3d2980 100644
--- a/arch/powerpc/boot/dts/fsl/t1040rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/t1040rdb.dts
@@ -64,6 +64,40 @@ mdio@fc000 {
 				phy_sgmii_2: ethernet-phy@3 {
 					reg = <0x03>;
 				};
+
+				/* 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>;
+				};
 			};
 		};
 	};
@@ -76,3 +110,76 @@ cpld@3,0 {
 };
 
 #include "t1040si-post.dtsi"
+
+&seville_switch {
+	status = "okay";
+};
+
+&seville_port0 {
+	managed = "in-band-status";
+	phy-handle = <&phy_qsgmii_0>;
+	phy-mode = "qsgmii";
+	label = "ETH4";
+	status = "okay";
+};
+
+&seville_port1 {
+	managed = "in-band-status";
+	phy-handle = <&phy_qsgmii_1>;
+	phy-mode = "qsgmii";
+	label = "ETH5";
+	status = "okay";
+};
+
+&seville_port2 {
+	managed = "in-band-status";
+	phy-handle = <&phy_qsgmii_2>;
+	phy-mode = "qsgmii";
+	label = "ETH6";
+	status = "okay";
+};
+
+&seville_port3 {
+	managed = "in-band-status";
+	phy-handle = <&phy_qsgmii_3>;
+	phy-mode = "qsgmii";
+	label = "ETH7";
+	status = "okay";
+};
+
+&seville_port4 {
+	managed = "in-band-status";
+	phy-handle = <&phy_qsgmii_4>;
+	phy-mode = "qsgmii";
+	label = "ETH8";
+	status = "okay";
+};
+
+&seville_port5 {
+	managed = "in-band-status";
+	phy-handle = <&phy_qsgmii_5>;
+	phy-mode = "qsgmii";
+	label = "ETH9";
+	status = "okay";
+};
+
+&seville_port6 {
+	managed = "in-band-status";
+	phy-handle = <&phy_qsgmii_6>;
+	phy-mode = "qsgmii";
+	label = "ETH10";
+	status = "okay";
+};
+
+&seville_port7 {
+	managed = "in-band-status";
+	phy-handle = <&phy_qsgmii_7>;
+	phy-mode = "qsgmii";
+	label = "ETH11";
+	status = "okay";
+};
+
+&seville_port8 {
+	ethernet = <&enet0>;
+	status = "okay";
+};
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 devicetree 2/2] powerpc: dts: t1040rdb: add ports for Seville Ethernet switch
  2020-10-01 13:20 ` [PATCH v3 devicetree 2/2] powerpc: dts: t1040rdb: add ports " Vladimir Oltean
@ 2020-10-01 13:22   ` Andrew Lunn
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2020-10-01 13:22 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: devicetree, madalin.bucur, radu-andrei.bulie, linuxppc-dev,
	linux-kernel, fido_max, robh+dt, paulus, shawnguo, netdev

On Thu, Oct 01, 2020 at 04:20:13PM +0300, Vladimir Oltean wrote:
> Define 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 numbering schemes are
> shifted by 8.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> Reviewed-by: Maxim Kochetkov <fido_max@inbox.ru>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 devicetree 1/2] powerpc: dts: t1040: add bindings for Seville Ethernet switch
  2020-10-01 13:20 ` [PATCH v3 devicetree 1/2] powerpc: dts: t1040: add bindings for Seville Ethernet switch Vladimir Oltean
@ 2020-10-01 13:23   ` Andrew Lunn
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2020-10-01 13:23 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: devicetree, madalin.bucur, radu-andrei.bulie, linuxppc-dev,
	linux-kernel, fido_max, robh+dt, paulus, shawnguo, netdev

On Thu, Oct 01, 2020 at 04:20:12PM +0300, Vladimir Oltean wrote:
> Add the description of the embedded L2 switch inside the SoC dtsi file
> for NXP T1040.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> Reviewed-by: Maxim Kochetkov <fido_max@inbox.ru>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB
  2020-10-01 13:20 [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB Vladimir Oltean
  2020-10-01 13:20 ` [PATCH v3 devicetree 1/2] powerpc: dts: t1040: add bindings for Seville Ethernet switch Vladimir Oltean
  2020-10-01 13:20 ` [PATCH v3 devicetree 2/2] powerpc: dts: t1040rdb: add ports " Vladimir Oltean
@ 2020-10-01 20:10 ` David Miller
  2020-10-02  0:50   ` Vladimir Oltean
  2 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2020-10-01 20:10 UTC (permalink / raw)
  To: vladimir.oltean
  Cc: devicetree, andrew, madalin.bucur, radu-andrei.bulie,
	linuxppc-dev, linux-kernel, fido_max, robh+dt, paulus, shawnguo,
	netdev

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: Thu,  1 Oct 2020 16:20:11 +0300

> Seville is a DSA switch that is embedded inside the T1040 SoC, and
> supported by the mscc_seville DSA driver inside drivers/net/dsa/ocelot.
> 
> This series adds this switch to the SoC's dtsi files and to the T1040RDB
> board file.

I am assuming the devicetree folks will pick this series up.

Thanks.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB
  2020-10-01 20:10 ` [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB David Miller
@ 2020-10-02  0:50   ` Vladimir Oltean
  0 siblings, 0 replies; 7+ messages in thread
From: Vladimir Oltean @ 2020-10-02  0:50 UTC (permalink / raw)
  To: David Miller
  Cc: devicetree, andrew, Madalin Bucur (OSS),
	Radu-andrei Bulie, linuxppc-dev, linux-kernel, fido_max, robh+dt,
	paulus, shawnguo, netdev

On Thu, Oct 01, 2020 at 01:10:05PM -0700, David Miller wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> Date: Thu,  1 Oct 2020 16:20:11 +0300
> 
> > Seville is a DSA switch that is embedded inside the T1040 SoC, and
> > supported by the mscc_seville DSA driver inside drivers/net/dsa/ocelot.
> > 
> > This series adds this switch to the SoC's dtsi files and to the T1040RDB
> > board file.
> 
> I am assuming the devicetree folks will pick this series up.
> 
> Thanks.
> 

I can also resend via net-next if that's easier (the last commit on
arch/powerpc/boot/dts/fsl/t104*, as per today's linux-next, has been in
2018, so there is no conflict).

I need to resend anyway, due to an epic failure where I got the port
numbering wrong...

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-10-02  0:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 13:20 [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB Vladimir Oltean
2020-10-01 13:20 ` [PATCH v3 devicetree 1/2] powerpc: dts: t1040: add bindings for Seville Ethernet switch Vladimir Oltean
2020-10-01 13:23   ` Andrew Lunn
2020-10-01 13:20 ` [PATCH v3 devicetree 2/2] powerpc: dts: t1040rdb: add ports " Vladimir Oltean
2020-10-01 13:22   ` Andrew Lunn
2020-10-01 20:10 ` [PATCH v3 devicetree 0/2] Add Seville Ethernet switch to T1040RDB David Miller
2020-10-02  0:50   ` Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).