All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: u-boot@lists.denx.de, Joe Hershberger <joe.hershberger@ni.com>,
	Ramon Fried <rfried.dev@gmail.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>,
	Bin Meng <bmeng.cn@gmail.com>, Michael Walle <michael@walle.cc>
Subject: [PATCH v2 08/10] arm: dts: ls1021a-tsn: add sja1105 and eth2 bindings
Date: Wed, 29 Sep 2021 18:04:43 +0300	[thread overview]
Message-ID: <20210929150445.1593364-9-vladimir.oltean@nxp.com> (raw)
In-Reply-To: <20210929150445.1593364-1-vladimir.oltean@nxp.com>

The eth aliases are for correct probing order, so that each Ethernet
port will get a predictable MAC address from the environment.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
---
v1->v2: none

 arch/arm/dts/ls1021a-tsn.dts | 103 +++++++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)

diff --git a/arch/arm/dts/ls1021a-tsn.dts b/arch/arm/dts/ls1021a-tsn.dts
index 8e0f4eaf684a..68f5543644ea 100644
--- a/arch/arm/dts/ls1021a-tsn.dts
+++ b/arch/arm/dts/ls1021a-tsn.dts
@@ -14,6 +14,81 @@
 		enet1-sgmii-phy = &sgmii_phy1;
 		spi0 = &qspi;
 		spi1 = &dspi1;
+		ethernet0 = &enet0;
+		ethernet1 = &enet1;
+		ethernet2 = &enet2;
+		ethernet3 = &swp2;
+		ethernet4 = &swp3;
+		ethernet5 = &swp4;
+		ethernet6 = &swp5;
+	};
+};
+
+&dspi0 {
+	bus-num = <0>;
+	status = "okay";
+
+	sja1105: ethernet-switch@1 {
+		reg = <0x1>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "nxp,sja1105t";
+		/* 12 MHz */
+		spi-max-frequency = <12000000>;
+		/* Sample data on trailing clock edge */
+		spi-cpha;
+		/* SPI controller settings for SJA1105 timing requirements */
+		fsl,spi-cs-sck-delay = <1000>;
+		fsl,spi-sck-cs-delay = <1000>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			swp5: port@0 {
+				/* ETH5 written on chassis */
+				label = "swp5";
+				phy-handle = <&rgmii_phy6>;
+				phy-mode = "rgmii-id";
+				reg = <0>;
+			};
+
+			swp2: port@1 {
+				/* ETH2 written on chassis */
+				label = "swp2";
+				phy-handle = <&rgmii_phy3>;
+				phy-mode = "rgmii-id";
+				reg = <1>;
+			};
+
+			swp3: port@2 {
+				/* ETH3 written on chassis */
+				label = "swp3";
+				phy-handle = <&rgmii_phy4>;
+				phy-mode = "rgmii-id";
+				reg = <2>;
+			};
+
+			swp4: port@3 {
+				/* ETH4 written on chassis */
+				label = "swp4";
+				phy-handle = <&rgmii_phy5>;
+				phy-mode = "rgmii-id";
+				reg = <3>;
+			};
+
+			port@4 {
+				/* Internal port connected to eth2 */
+				ethernet = <&enet2>;
+				phy-mode = "rgmii";
+				reg = <4>;
+
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+				};
+			};
+		};
 	};
 };
 
@@ -31,6 +106,17 @@
 	status = "okay";
 };
 
+/* RGMII delays added via PCB traces */
+&enet2 {
+	phy-mode = "rgmii";
+	status = "okay";
+
+	fixed-link {
+		speed = <1000>;
+		full-duplex;
+	};
+};
+
 &i2c0 {
 	status = "okay";
 };
@@ -46,6 +132,23 @@
 		reg = <0x2>;
 	};
 
+	/* BCM5464 quad PHY */
+	rgmii_phy3: ethernet-phy@3 {
+		reg = <0x3>;
+	};
+
+	rgmii_phy4: ethernet-phy@4 {
+		reg = <0x4>;
+	};
+
+	rgmii_phy5: ethernet-phy@5 {
+		reg = <0x5>;
+	};
+
+	rgmii_phy6: ethernet-phy@6 {
+		reg = <0x6>;
+	};
+
 	/* SGMII PCS for enet0 */
 	tbi0: tbi-phy@1f {
 		reg = <0x1f>;
-- 
2.25.1


  parent reply	other threads:[~2021-09-29 15:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 15:04 [PATCH v2 00/10] Support the SJA1105 DSA switch on the NXP LS1021A-TSN board Vladimir Oltean
2021-09-29 15:04 ` [PATCH v2 01/10] net: tsec: add support for promiscuous mode Vladimir Oltean
2021-10-16 18:30   ` Ramon Fried
2021-10-28 18:45     ` Ramon Fried
2021-10-30  7:45       ` Ramon Fried
2021-09-29 15:04 ` [PATCH v2 02/10] include: import if_vlan.h from Linux Vladimir Oltean
2021-09-29 15:04 ` [PATCH v2 03/10] net: dsa: allow drivers to get the port OF node Vladimir Oltean
2021-09-29 15:04 ` [PATCH v2 04/10] net: introduce a helper to determine whether to use in-band autoneg Vladimir Oltean
2021-09-29 23:20   ` Bin Meng
2021-10-16 18:28     ` Ramon Fried
2021-09-29 15:04 ` [PATCH v2 05/10] net: dsa: felix: configure the in-band autoneg property based on OF node info Vladimir Oltean
2021-09-29 15:04 ` [PATCH v2 06/10] net: dsa: add driver for NXP SJA1105 L2 switch Vladimir Oltean
2021-09-29 15:04 ` [PATCH v2 07/10] net: dsa: sja1105: add support for SGMII Vladimir Oltean
2021-09-29 15:04 ` Vladimir Oltean [this message]
2021-09-29 15:04 ` [PATCH v2 09/10] configs: ls1021a-tsn: enable sja1105 switch driver Vladimir Oltean
2021-09-29 15:04 ` [PATCH v2 10/10] configs: ls1021a-tsn: enable the generation of random Ethernet MAC addresses 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=20210929150445.1593364-9-vladimir.oltean@nxp.com \
    --to=vladimir.oltean@nxp.com \
    --cc=bmeng.cn@gmail.com \
    --cc=joe.hershberger@ni.com \
    --cc=michael@walle.cc \
    --cc=priyanka.jain@nxp.com \
    --cc=rfried.dev@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.