[PATCH v10 32/36] phy: rockchip: usbdp: Drop -EPROBE_DEFER hack
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Fri Jul 3 17:12:22 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The commit message incorrectly claims that the driver performs a reset during its probe routine, which can lead to a permanent DWC3 probe failure when initialized by U-Boot.
--
commit 6fe2e9f6ad72e10da5478abbe129b4525d89b28f
Author: Sebastian Reichel <sebastian.reichel at collabora.com>
phy: rockchip: usbdp: Drop -EPROBE_DEFER hack
This commit removes the -EPROBE_DEFER fallback from rk_udphy_status_check().
It relies on a hardware reset in the probe routine to avoid the PLL locking
timeout.
> The hack to return -EPROBE_DEFER when the lcpll lock timeouts is no
> longer needed. The driver now does a reset during its probe routine
> marking everything as off and later on does a re-init, which avoids
> the problem.
[Severity: High]
Is this description accurate? Looking at rk_udphy_probe(), the hardware reset
appears to be missing.
If the bootloader (U-Boot) initializes and leaves the USB PHY active, and
rk_udphy_probe() fails to assert the hardware resets, the PHY remains active.
When DWC3 later probes and calls phy_init(), it attempts to re-initialize the
PHY.
Because DWC3 registers its PHY notifier after calling phy_init(), it misses
the PHY_NOTIFY_PRE_RESET event and fails to soft-reset the USB MAC. The
active DWC3 MAC can interfere with the PHY's PLL lock, causing the
rk_udphy_status_check() to timeout.
> diff --git a/drivers/phy/rockchip/phy-rockchip-usbdp.c b/drivers/phy/rockchip/phy-rockchip-usbdp.c
> index 5d151fff9eeba..3fb6eea2979b9 100644
> --- a/drivers/phy/rockchip/phy-rockchip-usbdp.c
> +++ b/drivers/phy/rockchip/phy-rockchip-usbdp.c
> @@ -750,17 +750,7 @@ static int rk_udphy_status_check(struct rk_udphy *udphy)
> (val & CMN_ANA_LCPLL_LOCK_DONE), 200, 100000);
> if (ret) {
> dev_err(udphy->dev, "cmn ana lcpll lock timeout\n");
> - /*
> - * If earlier software (U-Boot) enabled USB once already
> - * the PLL may have problems locking on the first try.
> - * It will be successful on the second try, so for the
> - * time being a -EPROBE_DEFER will solve the issue.
> - *
> - * This requires further investigation to understand the
> - * root cause, especially considering that the driver is
> - * asserting all reset lines at probe time.
> - */
> - return -EPROBE_DEFER;
> + return ret;
> }
[Severity: High]
Does propagating this timeout instead of returning -EPROBE_DEFER cause the
DWC3 probe to fail permanently rather than retrying?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260703-rockchip-usbdp-cleanup-v10-0-a392711ca8a9@collabora.com?part=32
More information about the linux-phy
mailing list