[PATCH v6 3/9] phy: rockchip-samsung-dcphy: Unwind power-on on PLL lock failure
Jason Yang
jason98166 at gmail.com
Tue Nov 10 00:18:06 PST 2026
samsung_mipi_dphy_power_on() returns on a PLL lock timeout with PLL_EN
set and m_phy_rst still asserted, and the PHY core does not call
power_off after a failed power_on.
Today the APB reset at the start of the next power_on cleans this up.
A later change moves that reset to runtime resume, so the leftover
PLL_EN would stay set, and regmap_update_bits() would not even write
it again.
Unwind the power-on before returning the error.
Reported-by: Sashiko <sashiko-bot at kernel.org>
Closes: https://lore.kernel.org/linux-phy/sashiko-outbox-174059@kernel.org/
Signed-off-by: Jason Yang <jason98166 at gmail.com>
---
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
index 7382043e1f31..ce1bc62497c5 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
@@ -1343,8 +1343,11 @@ static int samsung_mipi_dphy_power_on(struct samsung_mipi_dcphy *samsung)
samsung_mipi_dphy_clk_lane_timing_init(samsung);
samsung_mipi_dphy_data_lane_timing_init(samsung);
ret = samsung_mipi_dcphy_pll_enable(samsung);
- if (ret < 0)
+ if (ret < 0) {
+ samsung_mipi_dcphy_pll_disable(samsung);
+ reset_control_deassert(samsung->m_phy_rst);
return ret;
+ }
samsung_mipi_dphy_lane_enable(samsung);
--
2.43.0
More information about the Linux-rockchip
mailing list