Skip to contentSkip to conversation

arm: mvebu: dts: turris_mox: fix non-working network / MDIO

PATCH In review Marek Behún 3 participants 4 messages Mar 15, 2022 – Mar 16, 2022 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mvebu: dts: turris_mox: fix non-working network / MDIO

From: Marek Behún <[email protected]>

Commit 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel") ported Linux's device-tree files for Armada 3720 SOCs. This broke network on Turris MOX, because the SOC's MDIO bus in U-Boot currently isn't probed via DM as it's own device, but is registered as part of mvneta's driver, which means that pinctrl definitions are not parsed for the MDIO bus node. Also mvneta driver does not consider "phy-handle" property, only "phy".

For now, fix this by adding armada-3720-turris-mox-u-boot.dtsi file returning the MDIO to how it was defined previously.

A better solution (using proper mvmdio DM driver) is being work on, but will need testing on various boards, and we need the bug fixed now for the upcoming release.

Fixes 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel")

---
Dear Stefan,

this fix is needed for the upcoming release, is it still possible? Thanks.

Marek

---
 .../dts/armada-3720-turris-mox-u-boot.dtsi    | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi
arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi new file +23 -0
new file mode 100644
index 0000000000..2e05b973d2
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * 2022 by Marek Behún <[email protected]>
+ */
+
+/ {
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		old_binding_phy1: ethernet-phy@1 {
+			reg = <1>;
+		};
+	};
+};
+
+&eth0 {
+	pinctrl-0 = <&rgmii_pins>, <&smi_pins>;
+	/delete-property/ phy-handle;
+	phy = <&old_binding_phy1>;
+};
+
+/delete-node/ &mdio;
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Marek Behún

From: Marek Behún <[email protected]>

Commit 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel") ported Linux's device-tree files for Armada 3720 SOCs. This broke network on Turris MOX, because the SOC's MDIO bus in U-Boot currently isn't probed via DM as it's own device, but is registered as part of mvneta's driver, which means that pinctrl definitions are not parsed for the MDIO bus node. Also mvneta driver does not consider "phy-handle" property, only "phy".

For now, fix this by adding armada-3720-turris-mox-u-boot.dtsi file returning the MDIO to how it was defined previously.

Quoted 6 lines

A better solution (using proper mvmdio DM driver) is being work on, but will need testing on various boards, and we need the bug fixed now for the upcoming release.

Fixes 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel")

As a temporary fix for this release:

Quoted 5 lines

---
Dear Stefan,

this fix is needed for the upcoming release, is it still possible? Thanks.

Yes, I think this should be possible.

Thanks,
Stefan

Quoted 25 lines

Marek

---
  .../dts/armada-3720-turris-mox-u-boot.dtsi    | 23 +++++++++++++++++++
  1 file changed, 23 insertions(+)

create mode 100644 arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi

arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi new file +13 -0
new file mode 100644
index 0000000000..2e05b973d2
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * 2022 by Marek Behún <[email protected]>
+ */
+
+/ {
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		old_binding_phy1: ethernet-phy@1 {
+			reg = <1>;
+		};

arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi line 23

Quoted 10 lines
arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi new file +10 -0
+	};
+};
+
+&eth0 {
+	pinctrl-0 = <&rgmii_pins>, <&smi_pins>;
+	/delete-property/ phy-handle;
+	phy = <&old_binding_phy1>;
+};
+
+/delete-node/ &mdio;

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#2 lore raw
In reply to Marek Behún
Quoted 17 lines · Marek Behún

From: Marek Behún <[email protected]>

Commit 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel") ported Linux's device-tree files for Armada 3720 SOCs. This broke network on Turris MOX, because the SOC's MDIO bus in U-Boot currently isn't probed via DM as it's own device, but is registered as part of mvneta's driver, which means that pinctrl definitions are not parsed for the MDIO bus node. Also mvneta driver does not consider "phy-handle" property, only "phy".

For now, fix this by adding armada-3720-turris-mox-u-boot.dtsi file returning the MDIO to how it was defined previously.

A better solution (using proper mvmdio DM driver) is being work on, but will need testing on various boards, and we need the bug fixed now for the upcoming release.

Quoted 7 lines
Fixes 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel")

---
Dear Stefan,

this fix is needed for the upcoming release, is it still possible? Thanks.

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 25 lines

Marek

---
  .../dts/armada-3720-turris-mox-u-boot.dtsi    | 23 +++++++++++++++++++
  1 file changed, 23 insertions(+)

create mode 100644 arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi

arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi new file +13 -0
new file mode 100644
index 0000000000..2e05b973d2
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * 2022 by Marek Behún <[email protected]>
+ */
+
+/ {
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		old_binding_phy1: ethernet-phy@1 {
+			reg = <1>;
+		};

arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi line 23

Quoted 10 lines
arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi new file +10 -0
+	};
+};
+
+&eth0 {
+	pinctrl-0 = <&rgmii_pins>, <&smi_pins>;
+	/delete-property/ phy-handle;
+	phy = <&old_binding_phy1>;
+};
+
+/delete-node/ &mdio;

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Reviewed-by on v1 1/1
#3 lore raw
In reply to Marek Behún
Quoted 13 lines · On Tuesday 15 March 2022 16:37:27 Marek Behún wrote:

From: Marek Behún <[email protected]>

Commit 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel") ported Linux's device-tree files for Armada 3720 SOCs. This broke network on Turris MOX, because the SOC's MDIO bus in U-Boot currently isn't probed via DM as it's own device, but is registered as part of mvneta's driver, which means that pinctrl definitions are not parsed for the MDIO bus node. Also mvneta driver does not consider "phy-handle" property, only "phy".

For now, fix this by adding armada-3720-turris-mox-u-boot.dtsi file returning the MDIO to how it was defined previously.

Quoted 6 lines

A better solution (using proper mvmdio DM driver) is being work on, but will need testing on various boards, and we need the bug fixed now for the upcoming release.

Fixes 0934dddc6436 ("arm: a37xx: Update DTS files to version from upstream Linux kernel")

This is my mistake as I probably tested network with my patch series only on EspressoBin. EspressoBin is not really affected by this issue as it uses fixed settings in DT. Network is really working fine with U-Boot master branch.

Quoted 44 lines

---
Dear Stefan,

this fix is needed for the upcoming release, is it still possible? Thanks.

Marek

---
 .../dts/armada-3720-turris-mox-u-boot.dtsi    | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi
arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi new file +23 -0
new file mode 100644
index 0000000000..2e05b973d2
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * 2022 by Marek Behún <[email protected]>
+ */
+
+/ {
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		old_binding_phy1: ethernet-phy@1 {
+			reg = <1>;
+		};
+	};
+};
+
+&eth0 {
+	pinctrl-0 = <&rgmii_pins>, <&smi_pins>;
+	/delete-property/ phy-handle;
+	phy = <&old_binding_phy1>;
+};
+
+/delete-node/ &mdio;
Signature · 1 line
2.34.1