All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v4 6/7] arm: dts: ls1028a: Add Ethernet switch node and dependencies
Date: Mon, 25 Jan 2021 14:23:56 +0200	[thread overview]
Message-ID: <20210125122357.414742-7-olteanv@gmail.com> (raw)
In-Reply-To: <20210125122357.414742-1-olteanv@gmail.com>

From: Alex Marginean <alexandru.marginean@nxp.com>

The definition follows the DSA binding in kernel and describes the switch,
its ports and PHYs.  The switch node has the same structure as in Linux
and this patch enables it (and relevant ports) for the LS1028A RDB board.

ENETC PF6 is the 2nd Eth controller linked to the switch on LS1028A, it is
not used in U-Boot and was disabled.  Ethernet port aliases were also
added to better manage the multitude of ports available now.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
v4: none.

v3: Added a comment denoting the PHY model present on the RDB.

v2: Switch node structure defined in dtsi now consistent with the Linux
switch node definition. Moved aliases from dtsi to the RDB DTS to
minimize impact on other boards (and for improved flexibility).

 arch/arm/dts/fsl-ls1028a-rdb.dts | 64 ++++++++++++++++++++++++++++++++
 arch/arm/dts/fsl-ls1028a.dtsi    | 56 +++++++++++++++++++++++++++-
 2 files changed, 119 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/fsl-ls1028a-rdb.dts b/arch/arm/dts/fsl-ls1028a-rdb.dts
index 85b4815b2ed7..3432fca35269 100644
--- a/arch/arm/dts/fsl-ls1028a-rdb.dts
+++ b/arch/arm/dts/fsl-ls1028a-rdb.dts
@@ -15,6 +15,12 @@
 	compatible = "fsl,ls1028a-rdb", "fsl,ls1028a";
 	aliases {
 		spi0 = &fspi;
+		eth0 = &enetc0;
+		eth1 = &enetc2;
+		eth2 = &mscc_felix_port0;
+		eth3 = &mscc_felix_port1;
+		eth4 = &mscc_felix_port2;
+		eth5 = &mscc_felix_port3;
 	};
 };
 
@@ -131,9 +137,67 @@
 	phy-handle = <&rdb_phy0>;
 };
 
+&enetc2 {
+	status = "okay";
+};
+
+&mscc_felix {
+	status = "okay";
+};
+
+&mscc_felix_port0 {
+	label = "swp0";
+	phy-handle = <&sw_phy0>;
+	phy-mode = "qsgmii";
+	status = "okay";
+};
+
+&mscc_felix_port1 {
+	label = "swp1";
+	phy-handle = <&sw_phy1>;
+	phy-mode = "qsgmii";
+	status = "okay";
+};
+
+&mscc_felix_port2 {
+	label = "swp2";
+	phy-handle = <&sw_phy2>;
+	phy-mode = "qsgmii";
+	status = "okay";
+};
+
+&mscc_felix_port3 {
+	label = "swp3";
+	phy-handle = <&sw_phy3>;
+	phy-mode = "qsgmii";
+	status = "okay";
+};
+
+&mscc_felix_port4 {
+	ethernet = <&enetc2>;
+	status = "okay";
+};
+
 &mdio0 {
 	status = "okay";
 	rdb_phy0: phy at 2 {
 		reg = <2>;
 	};
+
+	/* VSC8514 QSGMII PHY */
+	sw_phy0: phy at 10 {
+		reg = <0x10>;
+	};
+
+	sw_phy1: phy at 11 {
+		reg = <0x11>;
+	};
+
+	sw_phy2: phy at 12 {
+		reg = <0x12>;
+	};
+
+	sw_phy3: phy at 13 {
+		reg = <0x13>;
+	};
 };
diff --git a/arch/arm/dts/fsl-ls1028a.dtsi b/arch/arm/dts/fsl-ls1028a.dtsi
index d0850237c797..9740006689ca 100644
--- a/arch/arm/dts/fsl-ls1028a.dtsi
+++ b/arch/arm/dts/fsl-ls1028a.dtsi
@@ -151,9 +151,63 @@
 			reg = <0x000300 0 0 0 0>;
 			status = "disabled";
 		};
+
+		mscc_felix: pci at 0,5 {
+			reg = <0x000500 0 0 0 0>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				mscc_felix_port0: port at 0 {
+					reg = <0>;
+					status = "disabled";
+				};
+
+				mscc_felix_port1: port at 1 {
+					reg = <1>;
+					status = "disabled";
+				};
+
+				mscc_felix_port2: port at 2 {
+					reg = <2>;
+					status = "disabled";
+				};
+
+				mscc_felix_port3: port at 3 {
+					reg = <3>;
+					status = "disabled";
+				};
+
+				mscc_felix_port4: port at 4 {
+					reg = <4>;
+					phy-mode = "internal";
+					status = "disabled";
+
+					fixed-link {
+						speed = <2500>;
+						full-duplex;
+					};
+				};
+
+				mscc_felix_port5: port at 5 {
+					reg = <5>;
+					phy-mode = "internal";
+					status = "disabled";
+
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+					};
+
+				};
+			};
+		};
+
 		enetc6: pci at 0,6 {
 			reg = <0x000600 0 0 0 0>;
-			status = "okay";
+			status = "disabled";
 			phy-mode = "internal";
 		};
 	};
-- 
2.25.1

  parent reply	other threads:[~2021-01-25 12:23 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 12:23 [PATCH v4 0/7] Introduce DSA Ethernet switch class and Felix driver Vladimir Oltean
2021-01-25 12:23 ` [PATCH v4 1/7] net: phy: fixed: support speeds of 2500 and 10000 Vladimir Oltean
2021-01-27  8:04   ` Claudiu Manoil
2021-02-16 21:55   ` Tom Rini
2021-01-25 12:23 ` [PATCH v4 2/7] net: phy: introduce fixed_phy_create for DSA CPU ports Vladimir Oltean
2021-01-27  8:05   ` Claudiu Manoil
2021-02-16 21:55   ` Tom Rini
2021-01-25 12:23 ` [PATCH v4 3/7] net: Introduce DSA class for Ethernet switches Vladimir Oltean
2021-02-16 21:55   ` Tom Rini
2021-01-25 12:23 ` [PATCH v4 4/7] sandbox: Add a DSA sandbox driver and unit test Vladimir Oltean
2021-02-16 18:14   ` Tom Rini
2021-02-16 21:02     ` Vladimir Oltean
2021-02-16 21:13       ` Tom Rini
2021-02-16 21:21         ` Vladimir Oltean
2021-02-16 21:33           ` Michael Walle
2021-02-16 21:38             ` Tom Rini
2021-02-16 21:53               ` Vladimir Oltean
2021-02-16 21:55                 ` Tom Rini
2021-02-16 21:58               ` Michael Walle
2021-02-16 22:15                 ` Michael Walle
2021-02-16 22:23                   ` Vladimir Oltean
2021-01-25 12:23 ` [PATCH v4 5/7] drivers: net: Add Felix DSA switch driver Vladimir Oltean
2021-02-16 21:55   ` Tom Rini
2021-01-25 12:23 ` Vladimir Oltean [this message]
2021-01-25 12:33   ` [PATCH v4 6/7] arm: dts: ls1028a: Add Ethernet switch node and dependencies Michael Walle
2021-02-16 21:56   ` Tom Rini
2021-01-25 12:23 ` [PATCH v4 7/7] configs: ls1028a: Enable the Ethernet switch driver in defconfig Vladimir Oltean
2021-02-16 21:56   ` Tom Rini
2021-01-25 13:02 ` [PATCH v4 0/7] Introduce DSA Ethernet switch class and Felix driver Michael Walle
2021-01-25 13:04   ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210125122357.414742-7-olteanv@gmail.com \
    --to=olteanv@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.