linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Kavyasree Kotagiri <kavyasree.kotagiri@microchip.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
	soc@kernel.org, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Tudor.Ambarus@microchip.com,
	Horatiu Vultur <horatiu.vultur@microchip.com>,
	Michael Walle <michael@walle.cc>
Subject: [PATCH v4 13/13] ARM: dts: kswitch-d10: enable networking
Date: Tue,  3 May 2022 00:41:27 +0200	[thread overview]
Message-ID: <20220502224127.2604333-14-michael@walle.cc> (raw)
In-Reply-To: <20220502224127.2604333-1-michael@walle.cc>

Enable all the necessary network related nodes, wire the pinctrl
configurations, add the PHYs and connect them to the corresponding
network ports.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 ...lan966x-kontron-kswitch-d10-mmt-6g-2gs.dts | 16 +++
 .../lan966x-kontron-kswitch-d10-mmt-8g.dts    | 26 +++++
 .../dts/lan966x-kontron-kswitch-d10-mmt.dtsi  | 97 +++++++++++++++++++
 3 files changed, 139 insertions(+)

diff --git a/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-6g-2gs.dts b/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-6g-2gs.dts
index 7b12cbe11c58..0f555eb45bda 100644
--- a/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-6g-2gs.dts
+++ b/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-6g-2gs.dts
@@ -76,3 +76,19 @@ fc4_b_pins: fc4-b-i2c-pins {
 		function = "fc4_b";
 	};
 };
+
+&port2 {
+	phys = <&serdes 2 SERDES6G(0)>;
+	sfp = <&sfp0>;
+	managed = "in-band-status";
+	phy-mode = "sgmii";
+	status = "okay";
+};
+
+&port3 {
+	phys = <&serdes 3 SERDES6G(1)>;
+	sfp = <&sfp1>;
+	managed = "in-band-status";
+	phy-mode = "sgmii";
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-8g.dts b/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-8g.dts
index 4b35f6c46e7f..5feef9a59a79 100644
--- a/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-8g.dts
+++ b/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-8g.dts
@@ -11,3 +11,29 @@ / {
 	compatible = "kontron,kswitch-d10-mmt-8g", "kontron,s1921",
 		     "microchip,lan9668", "microchip,lan966";
 };
+
+&mdio0 {
+	phy2: ethernet-phy@3 {
+		reg = <3>;
+	};
+
+	phy3: ethernet-phy@4 {
+		reg = <4>;
+	};
+};
+
+&port2 {
+	phys = <&serdes 2 SERDES6G(0)>;
+	phy-handle = <&phy2>;
+	phy-mode = "sgmii";
+	managed = "in-band-status";
+	status = "okay";
+};
+
+&port3 {
+	phys = <&serdes 3 SERDES6G(1)>;
+	phy-handle = <&phy3>;
+	phy-mode = "sgmii";
+	managed = "in-band-status";
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt.dtsi b/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt.dtsi
index 4c1ebb4aa5b0..4cab1b3b3b29 100644
--- a/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt.dtsi
+++ b/arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt.dtsi
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 #include "lan966x.dtsi"
+#include "dt-bindings/phy/phy-lan966x-serdes.h"
 
 / {
 	aliases {
@@ -52,6 +53,12 @@ fc3_b_pins: fc3-b-pins {
 		function = "fc3_b";
 	};
 
+	miim_c_pins: miim-c-pins {
+		/* MDC, MDIO */
+		pins = "GPIO_59", "GPIO_60";
+		function = "miim_c";
+	};
+
 	sgpio_a_pins: sgpio-a-pins {
 		/* SCK, D0, D1 */
 		pins = "GPIO_32", "GPIO_33", "GPIO_34";
@@ -71,6 +78,92 @@ usart0_pins: usart0-pins {
 	};
 };
 
+&mdio0 {
+	pinctrl-0 = <&miim_c_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
+	clock-frequency = <2500000>;
+	status = "okay";
+
+	phy4: ethernet-phy@5 {
+		reg = <5>;
+		coma-mode-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
+	};
+
+	phy5: ethernet-phy@6 {
+		reg = <6>;
+		coma-mode-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
+	};
+
+	phy6: ethernet-phy@7 {
+		reg = <7>;
+		coma-mode-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
+	};
+
+	phy7: ethernet-phy@8 {
+		reg = <8>;
+		coma-mode-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&mdio1 {
+	status = "okay";
+};
+
+&phy0 {
+	status = "okay";
+};
+
+&phy1 {
+	status = "okay";
+};
+
+&port0 {
+	phys = <&serdes 0 CU(0)>;
+	phy-handle = <&phy0>;
+	phy-mode = "gmii";
+	status = "okay";
+};
+
+&port1 {
+	phys = <&serdes 1 CU(1)>;
+	phy-handle = <&phy1>;
+	phy-mode = "gmii";
+	status = "okay";
+};
+
+&port4 {
+	phys = <&serdes 4 SERDES6G(2)>;
+	phy-handle = <&phy4>;
+	phy-mode = "qsgmii";
+	status = "okay";
+};
+
+&port5 {
+	phys = <&serdes 5 SERDES6G(2)>;
+	phy-handle = <&phy5>;
+	phy-mode = "qsgmii";
+	status = "okay";
+};
+
+&port6 {
+	phys = <&serdes 6 SERDES6G(2)>;
+	phy-handle = <&phy6>;
+	phy-mode = "qsgmii";
+	status = "okay";
+};
+
+&port7 {
+	phys = <&serdes 7 SERDES6G(2)>;
+	phy-handle = <&phy7>;
+	phy-mode = "qsgmii";
+	status = "okay";
+};
+
+&serdes {
+	status = "okay";
+};
+
 &sgpio {
 	pinctrl-0 = <&sgpio_a_pins>, <&sgpio_b_pins>;
 	pinctrl-names = "default";
@@ -88,6 +181,10 @@ sgpio_out: gpio@1 {
 	};
 };
 
+&switch {
+	status = "okay";
+};
+
 &watchdog {
 	status = "okay";
 };
-- 
2.30.2


  parent reply	other threads:[~2022-05-02 22:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 22:41 [PATCH v4 00/13] ARM: dts: lan966x: dtsi improvements and KSwitch D10 support Michael Walle
2022-05-02 22:41 ` [PATCH v4 01/13] ARM: dts: lan966x: swap dma channels for crypto node Michael Walle
2022-05-02 22:41 ` [PATCH v4 02/13] ARM: dts: lan966x: add sgpio node Michael Walle
2022-05-02 22:41 ` [PATCH v4 03/13] ARM: dts: lan966x: add missing uart DMA channel Michael Walle
2022-05-02 22:41 ` [PATCH v4 04/13] ARM: dts: lan966x: add all flexcom usart nodes Michael Walle
2022-05-02 22:41 ` [PATCH v4 05/13] ARM: dts: lan966x: add flexcom SPI nodes Michael Walle
2022-05-02 22:41 ` [PATCH v4 06/13] ARM: dts: lan966x: add flexcom I2C nodes Michael Walle
2022-05-02 22:41 ` [PATCH v4 07/13] ARM: dts: lan966x: add basic Kontron KSwitch D10 support Michael Walle
2022-05-02 22:41 ` [PATCH v4 08/13] ARM: dts: lan966x: add hwmon node Michael Walle
2022-05-09  6:25   ` Claudiu.Beznea
2022-05-02 22:41 ` [PATCH v4 09/13] ARM: dts: lan966x: add MIIM nodes Michael Walle
2022-05-09  6:26   ` Claudiu.Beznea
2022-05-02 22:41 ` [PATCH v4 10/13] ARM: dts: lan966x: add reset switch reset node Michael Walle
2022-05-09  6:26   ` Claudiu.Beznea
2022-05-02 22:41 ` [PATCH v4 11/13] ARM: dts: lan966x: add serdes node Michael Walle
2022-05-09  6:26   ` Claudiu.Beznea
2022-05-02 22:41 ` [PATCH v4 12/13] ARM: dts: lan966x: add switch node Michael Walle
2022-05-09  6:27   ` Claudiu.Beznea
2022-05-02 22:41 ` Michael Walle [this message]
2022-05-09  6:27   ` [PATCH v4 13/13] ARM: dts: kswitch-d10: enable networking Claudiu.Beznea
2022-05-04 10:16 ` [PATCH v4 00/13] ARM: dts: lan966x: dtsi improvements and KSwitch D10 support Horatiu Vultur
2022-05-11  9:07 ` Michael Walle

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=20220502224127.2604333-14-michael@walle.cc \
    --to=michael@walle.cc \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=claudiu.beznea@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=horatiu.vultur@microchip.com \
    --cc=kavyasree.kotagiri@microchip.com \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=soc@kernel.org \
    /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).