Re: [RFC PATCH v2] arm64: dts: rockchip: H28K: release RTL8211F reset before MDIO probing

[email protected] Mon, 03 Aug 2026 16:54:12 +0000
Newsgroups org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The pinctrl configuration for the PHY reset GPIO (`&gmac1_rstn_l`) was incorrectly left on the PHY node after the `reset-gpios` control was moved to the MDIO bus node, resulting in the pinmux being applied too late.
--

--- Patch [1]: [RFC PATCH v2] arm64: dts: rockchip: H28K: release RTL8211F reset before MDIO probing ---
commit ed5c8c6d0629795b93f02fb617db0f38d4725c0d
Author: Zhyi <[email protected]>

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

Move the reset-gpios property to the MDIO bus level to ensure the RTL8211F
PHY is released from reset before scanning the bus. This fixes an issue
where the PHY cannot be found during probe.

> diff --git a/arch/arm64/boot/dts/rockchip/rk3528-hinlink-h28k.dts b/arch/arm64/boot/dts/rockchip/rk3528-hinlink-h28k.dts
> index 0ec50e9156eb1..7ba3fa46c8610 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3528-hinlink-h28k.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3528-hinlink-h28k.dts
[ ... ]
>  &mdio1 {
> +	reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
> +	reset-delay-us = <20000>;
> +	reset-post-delay-us = <100000>;
>  	rgmii_phy: ethernet-phy@1 {
>  		compatible = "ethernet-phy-ieee802.3-c22";
>  		reg = <0x1>;
>  		pinctrl-names = "default";
>  		pinctrl-0 = <&gmac1_rstn_l>;

[Severity: Medium]
Will this pinctrl configuration be applied too late since it was left on the
PHY node?

During initialization, mdiobus_register() parses reset-gpios from the &mdio1
node and toggles it before scanning for PHY devices on the bus.

The driver core only applies a device's pinctrl when that specific device
is probed. Since the PHY device is only created and probed after the MDIO
bus scan successfully discovers it, the pinctrl configuration is applied
after the reset phase has already completed.

Should the pinctrl-0 = <&gmac1_rstn_l> property also be moved to the parent
&gmac1 node to ensure it is applied before the MDIO bus reset sequence?

> -		reset-assert-us = <20000>;
> -		reset-deassert-us = <100000>;
> -		reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
>  	};
>  };

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1