linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: Fugang Duan <fugang.duan@nxp.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Fabio Estevam <festevam@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>
Cc: NXP Linux Team <linux-imx@nxp.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>,
	stefan.agner@toradex.com, krzk@kernel.org,
	Shawn Guo <shawnguo@kernel.org>, Lukasz Majewski <lukma@denx.de>
Subject: [RFC 4/4] ARM: dts: imx28: Add description for L2 switch on XEA board
Date: Thu, 26 Nov 2020 00:24:59 +0100	[thread overview]
Message-ID: <20201125232459.378-5-lukma@denx.de> (raw)
In-Reply-To: <20201125232459.378-1-lukma@denx.de>

The 'eth_switch' node is now used to enable support for L2 switch.
Moreover, a separate 'switch' node was introduced to keep the code more
clean.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 arch/arm/boot/dts/imx28-xea.dts | 55 +++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/arch/arm/boot/dts/imx28-xea.dts b/arch/arm/boot/dts/imx28-xea.dts
index 672080485b78..b8a896df02c0 100644
--- a/arch/arm/boot/dts/imx28-xea.dts
+++ b/arch/arm/boot/dts/imx28-xea.dts
@@ -9,6 +9,30 @@
 
 / {
 	model = "XEA";
+
+	switch {
+		compatible = "imx,mtip-l2switch";
+		reg = <0x800f8000 0x400>, <0x800fC000 0x4000>;
+		ports {
+			port0@0 {
+				reg = <0>;
+				label = "lan1";
+				phy-handle = <&ethsw0>;
+			};
+
+			port1@1 {
+				reg = <1>;
+				label = "lan2";
+				phy-handle = <&ethsw1>;
+			};
+
+			port2@2 {
+				reg = <2>;
+				label = "cpu";
+				ethernet = <&eth_switch>;
+			};
+		};
+	};
 };
 
 &can0 {
@@ -23,6 +47,37 @@
 	status = "okay";
 };
 
+&eth_switch {
+	compatible = "fsl,imx28-l2switch";
+	reg = <0x800f0000 0x8000>, <0x800f8400 0x400>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&mac0_pins_a>, <&mac1_pins_a>;
+	phy-mode = "rmii";
+	phy-supply = <&reg_fec_3v3>;
+	phy-reset-gpios = <&gpio2 13 0>;
+	phy-reset-duration = <100>;
+	interrupts = <100>, <101>, <102>;
+	clocks = <&clks 57>, <&clks 57>, <&clks 64>, <&clks 35>;
+	clock-names = "ipg", "ahb", "enet_out", "ptp";
+	local-mac-address = [ 00 11 22 AA BB CC ];
+	status = "okay";
+
+	fixed-link {
+		speed = <100>;
+		full-duplex;
+	};
+
+	mdio {
+		ethsw0: ethernet-phy@0 {
+			reg = <0>;
+		};
+
+		ethsw1: ethernet-phy@1 {
+			reg = <1>;
+		};
+	};
+};
+
 &pinctrl {
 	pinctrl-names = "default";
 	pinctrl-0 = <&hog_pins_a &hog_pins_tiva>;
-- 
2.20.1


  parent reply	other threads:[~2020-11-25 23:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 23:24 [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC Lukasz Majewski
2020-11-25 23:24 ` [RFC 1/4] net: fec: Move some defines to ./drivers/net/ethernet/freescale/fec.h header Lukasz Majewski
2020-11-25 23:24 ` [RFC 2/4] net: dsa: Provide DSA driver for NXP's More Than IP L2 switch Lukasz Majewski
2020-11-25 23:24 ` [RFC 3/4] net: imx: l2switch: Adjust fec_main.c to provide support for " Lukasz Majewski
2020-11-25 23:24 ` Lukasz Majewski [this message]
2020-11-26  0:00 ` [RFC 0/4] net: l2switch: Provide support for L2 switch on i.MX28 SoC Andrew Lunn
2020-11-26  1:30   ` Florian Fainelli
2020-11-26  3:10     ` Andrew Lunn
2020-11-26 10:10       ` Lukasz Majewski
2020-11-26 14:45         ` Andrew Lunn
2020-11-27  0:03           ` Lukasz Majewski
2020-11-26 12:30 ` Vladimir Oltean
2020-11-26 23:35   ` Lukasz Majewski
2020-11-27  0:55     ` Andrew Lunn
2020-11-27  9:16       ` Lukasz Majewski
2020-11-27  1:08     ` Andrew Lunn
2020-11-27  9:25       ` Lukasz Majewski
2020-11-27 15:10         ` Andrew Lunn
2021-06-17 11:08       ` Lukasz Majewski
2021-06-17 13:57         ` Andrew Lunn
2020-11-27 19:29     ` Vladimir Oltean
2020-11-28  0:33       ` Lukasz Majewski
2020-11-28  4:34         ` Florian Fainelli
2020-11-29 21:59           ` Lukasz Majewski

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=20201125232459.378-5-lukma@denx.de \
    --to=lukma@denx.de \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=festevam@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=shawnguo@kernel.org \
    --cc=stefan.agner@toradex.com \
    --cc=vivien.didelot@gmail.com \
    /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 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).