Re: [PATCH] phy: exynos5-usbdrd: fix HS phy init count imbalance on Exynos2200

From: Manivannan Sadhasivam

Date: Fri Nov 27 2026 - 06:59:48 EST


On 2026-11-09 22:15 +0000, Soheyb wrote:
> exynos2200_usbdrd_utmi_init() calls phy_init() on the high-speed phy,
> but exynos2200_usbdrd_phy_exit() never calls phy_exit() on it. The init
> count of the high-speed phy therefore never drops back to zero: after
> the first init, every later phy_init() of it returns early, and its
> clocks and supplies stay enabled across an exit of the UTMI phy.
>
> When the high-speed phy loses power while the controller is suspended,
> it is thus not set up again on resume, and the DWC3 core soft reset
> times out:
>
> dwc3 11210000.usb: DWC3 controller soft reset failed
>
> Exit the high-speed phy when the UTMI phy exits, first, in the reverse
> order of the init.
>
> Fixes: cc52a697f87e ("phy: exynos5-usbdrd: support Exynos USBDRD 3.2 4nm controller")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Soheyb <soheyb_boulaa@xxxxxxxxx>
> ---
> Tested on a Google Pixel 9 (Tensor G4) with an out-of-tree port that
> uses the Exynos2200 phy ops and powers the USB block off in system
> sleep: without this change the soft reset failed on the first resume;
> with it, USB came back after each of two system sleeps. Not tested on
> Exynos2200 hardware.
>
> drivers/phy/samsung/phy-exynos5-usbdrd.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> index 087d552..0bee928 100644
> --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
> +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> @@ -1486,6 +1486,13 @@ static int exynos2200_usbdrd_phy_exit(struct phy *phy)
> u32 reg;
> int ret;
>
> + /*
> + * The UTMI init initializes the high-speed phy; exit it in turn, so
> + * that the next init sets it up again after it lost power.
> + */

Same comment as Ivaylo. Code is self explanatory, so comment here is a noise.
LLMs tend to insert comments even when not needed. So you should trim them or
ask them to not add comments where not really needed.

With the comment removed,

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>

Please respin.

- Mani