devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] arm64: dts: rockchip: H28K: release RTL8211F reset before MDIO probing
@ 2026-08-03 10:46 Zhyi
  2026-08-03 11:10 ` sashiko-bot
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Zhyi @ 2026-08-03 10:46 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Zhyi, linux-rockchip, linux-arm-kernel, linux-kernel, devicetree,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Lunn,
	Chukun Pan

arm64: dts: rockchip: H28K: release RTL8211F reset before MDIO probing

The RTL8211F on the HINLINK H28K (RK3528) is held in reset at power-on:
its reset line (gpio4 RK_PC2, pin 146) is left unconfigured and reads
low. The PHY node's reset-gpios are only acted upon after the PHY has
been found on MDIO (fwnode_mdiobus_register_phy() reads the PHY ID
before it requests and toggles the reset GPIO), so the first probe
deadlocks and eth0 never gets a link:

    mdio_bus stmmac-0: MDIO device at address 1 is missing.
    rk_gmac-dwmac ffbe0000.ethernet eth0: cannot attach to PHY (error: -ENODEV)

Release the reset from the MAC node via snps,reset-gpios so it is
deasserted before MDIO scanning, and drop the PHY-node reset-gpios (a
second consumer on the same GPIO is rejected with -EBUSY).

This is an RFC: snps,reset-gpios is deprecated in favour of the
ethernet-PHY reset bindings, so feedback on the preferred way to release
the reset early is welcome.

Fixes: 145d4af4b204 ("arm64: dts: rockchip: Add HINLINK H28K")
Signed-off-by: Zhyi <zyheihei_123@163.com>
---
diff --git a/arch/arm64/boot/dts/rockchip/rk3528-hinlink-h28k.dts b/arch/arm64/boot/dts/rockchip/rk3528-hinlink-h28k.dts
index 0ec50e9..9d7e33a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3528-hinlink-h28k.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3528-hinlink-h28k.dts
@@ -191,6 +191,8 @@
 		    <&rgmii_rx_bus2>,
 		    <&rgmii_rgmii_clk>,
 		    <&rgmii_rgmii_bus>;
+	snps,reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
+	snps,reset-delays-us = <0 20000 100000>;
 	status = "okay";
 };
 
@@ -205,9 +207,6 @@
 		reg = <0x1>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&gmac1_rstn_l>;
-		reset-assert-us = <20000>;
-		reset-deassert-us = <100000>;
-		reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
 	};
 };
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread
[parent not found: <SJ2PR04MB851017E50140354C2F5B3FF3B5D52@SJ2PR04MB8510.namprd04.prod.outlook.com>]
* Re: [RFC PATCH] arm64: dts: rockchip: H28K: release RTL8211F reset before MDIO probing
@ 2026-08-03 16:42 Zhyi
  0 siblings, 0 replies; 9+ messages in thread
From: Zhyi @ 2026-08-03 16:42 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: linux-rockchip, linux-arm-kernel, linux-kernel, devicetree,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Andrew Lunn,
	Chukun Pan

Hi all,

apologies for the duplicate: this v1 was accidentally sent twice. The
revised [RFC PATCH v2] is on the main thread:

https://lore.kernel.org/all/20260803104646.26836-1-zyheihei_123@163.com/

Please follow up there instead.

Thanks,
Zhyi <zyheihei_123@163.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-08-03 23:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 10:46 [RFC PATCH] arm64: dts: rockchip: H28K: release RTL8211F reset before MDIO probing Zhyi
2026-08-03 11:10 ` sashiko-bot
2026-08-03 12:40 ` Chukun Pan
2026-08-03 16:42 ` [RFC PATCH v2] " Zhyi
2026-08-03 16:54   ` sashiko-bot
2026-08-03 18:16   ` Jonas Karlman
2026-08-03 23:49     ` Zhyi
     [not found] <SJ2PR04MB851017E50140354C2F5B3FF3B5D52@SJ2PR04MB8510.namprd04.prod.outlook.com>
2026-08-03 12:58 ` [RFC PATCH] " Andrew Lunn
  -- strict thread matches above, loose matches on Subject: below --
2026-08-03 16:42 Zhyi

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).