[PATCH] arm: dts: imx8mm-venice-gw7901: add dsa phy handles to u-boot dtsi

Tim Harvey tharvey at gateworks.com
Fri Sep 9 23:42:38 CEST 2022


The upstream Linux DSA drivers do not require phy-handle nodes in
the DSA ports yet the U-Boot DSA drivers do. Add a phy-handle and
the mdio nodes to the u-boot.dtsi file so that future dts file
syncrhonization between Linux and U-Boot don't break networking.

Fixes: 24a7a3c1c042 ("imx8mm: synchronise device tree with linux")
Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 arch/arm/dts/imx8mm-venice-gw7901-u-boot.dtsi | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/arch/arm/dts/imx8mm-venice-gw7901-u-boot.dtsi b/arch/arm/dts/imx8mm-venice-gw7901-u-boot.dtsi
index 11c773bb70d6..dc99e7b9ac6c 100644
--- a/arch/arm/dts/imx8mm-venice-gw7901-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-venice-gw7901-u-boot.dtsi
@@ -129,6 +129,57 @@
 	phy-reset-post-delay = <1>;
 };
 
+&switch {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		lan1: port at 0 {
+			phy-handle = <&sw_phy0>;
+		};
+
+		lan2: port at 1 {
+			phy-handle = <&sw_phy1>;
+		};
+
+		lan3: port at 2 {
+			phy-handle = <&sw_phy2>;
+		};
+
+		lan4: port at 3 {
+			phy-handle = <&sw_phy3>;
+		};
+	};
+
+	mdios {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		mdio at 0 {
+			reg = <0>;
+			compatible = "microchip,ksz-mdio";
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			sw_phy0: ethernet-phy at 0 {
+				reg = <0x0>;
+			};
+
+			sw_phy1: ethernet-phy at 1 {
+				reg = <0x1>;
+			};
+
+			sw_phy2: ethernet-phy at 2 {
+				reg = <0x2>;
+			};
+
+			sw_phy3: ethernet-phy at 3 {
+				reg = <0x3>;
+			};
+		};
+	};
+};
+
 &pinctrl_fec1 {
 	u-boot,dm-spl;
 };
-- 
2.25.1



More information about the U-Boot mailing list