diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c index 28bbde5bfb85..175080969024 100644 --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c @@ -886,6 +886,15 @@ static void rockchip_hdptx_phy_reset(struct rockchip_hdptx_phy *hdptx) FIELD_PREP(BGR_EN, 0)); } +static bool rockchip_hdptx_phy_enabled(struct rockchip_hdptx_phy *hdptx) +{ + u32 status; + + regmap_read(hdptx->grf, HDPTXPHY_GRF_STATUS0, &status); + + return FIELD_GET(SB_RDY, status); +} + static int rockchip_hdptx_phy_power_on(struct phy *phy) { struct rockchip_hdptx_phy *hdptx = phy_get_drvdata(phy); @@ -897,6 +906,9 @@ static int rockchip_hdptx_phy_power_on(struct phy *phy) if (ret) return ret; + if (rockchip_hdptx_phy_enabled(hdptx)) + return 0; + rockchip_hdptx_phy_reset(hdptx); reset_control_assert(hdptx->apb_reset);