[PATCH v5 3/8] phy: rockchip-samsung-dcphy: Move block-level setup to runtime resume

sashiko-bot at kernel.org sashiko-bot at kernel.org
Fri Oct 16 02:09:46 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] phy: dcphy: PLL left enabled on lock failure, preventing recovery
--

commit 0436bfe5522a31ef65724b71dd2f683f01ebeaa1
Author: Jason Yang <jason98166 at gmail.com>

phy: rockchip-samsung-dcphy: Move block-level setup to runtime resume

This commit moves the block-level APB reset and BIAS configuration
from the power-on path to runtime resume. This prevents resetting
the block underneath a PHY that is already running when multiple
consumers are present.

> diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
> index 7382043e1f319..1471a1563d2a1 100644
> --- a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c

[ ... ]

> @@ -1362,10 +1361,6 @@ static int samsung_mipi_dcphy_power_on(struct phy *phy)
>  {
>  	struct samsung_mipi_dcphy *samsung = phy_get_drvdata(phy);
>  
> -	reset_control_assert(samsung->apb_rst);
> -	udelay(1);
> -	reset_control_deassert(samsung->apb_rst);
> -

[Severity: Medium]
If samsung_mipi_dcphy_pll_enable() fails to lock, it returns without clearing
the PLL_EN bit in PLL_CON0:

drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c:samsung_mipi_dcphy_pll_enable() {
	regmap_update_bits(samsung->regmap, PLL_CON0, PLL_EN, PLL_EN);

	ret = regmap_read_poll_timeout(samsung->regmap, PLL_STAT0,
				       sts, (sts & PLL_LOCK), 1000, 20000);
	if (ret < 0)
		dev_err(samsung->dev, "DC-PHY pll failed to lock\n");

	return ret;
}

Because this patch removes the apb_rst sequence from the power_on path, the
stale PLL_EN bit is no longer cleared by the hardware reset on subsequent
retries.

Does this leave the hardware in an active but failed state, potentially
causing undefined behavior or preventing the PLL from locking during the
next power_on attempt?

>  	switch (samsung->type) {
>  	case PHY_TYPE_DPHY:
>  		return samsung_mipi_dphy_power_on(samsung);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261016-dcphy-rx-v1-v5-0-e63b49eabe2d@gmail.com?part=3



More information about the linux-phy mailing list