public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Stefan Roese <sr@denx.de>
Cc: pali@kernel.org, "u-boot@lists.denx.de" <u-boot@lists.denx.de>,
	"Marek Behún" <marek.behun@nic.cz>
Subject: [PATCH u-boot-marvell] arm: mvebu: dts: turris_mox: fix non-working network / MDIO
Date: Tue, 15 Mar 2022 16:37:27 +0100	[thread overview]
Message-ID: <20220315153727.26089-1-kabel@kernel.org> (raw)

From: Marek Behún <marek.behun@nic.cz>

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")
Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
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

diff --git a/arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi b/arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi
new file mode 100644
index 0000000000..2e05b973d2
--- /dev/null
+++ b/arch/arm/dts/armada-3720-turris-mox-u-boot.dtsi
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * 2022 by Marek Behún <kabel@kernel.org>
+ */
+
+/ {
+	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;
-- 
2.34.1


             reply	other threads:[~2022-03-15 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 15:37 Marek Behún [this message]
2022-03-16  6:22 ` [PATCH u-boot-marvell] arm: mvebu: dts: turris_mox: fix non-working network / MDIO Stefan Roese
2022-03-16  9:52 ` Stefan Roese
2022-03-16  9:57 ` Pali Rohár

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=20220315153727.26089-1-kabel@kernel.org \
    --to=kabel@kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=pali@kernel.org \
    --cc=sr@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox