[PATCH v3] phy: rockchip: samsung-hdptx: Power down the lanes on phy_power_off()

Arun Iyengar via B4 Relay devnull+aiyengar1990.gmail.com at kernel.org
Thu Dec 3 23:20:47 PST 2026


From: Arun Iyengar <aiyengar1990 at gmail.com>

Since the PHY became a clock provider, rk_hdptx_phy_power_off() only
drops the usage count, which the consumers of the PHY PLL clock hold
too. On RK3588 the VOP holds it while runtime active, so with another
output in use the HDMI lanes keep driving the link after HDMI is
switched off.

Disable the lanes directly in rk_hdptx_phy_power_off() and keep the PLL
running for the clock consumers.

Fixes: c4b09c562086 ("phy: phy-rockchip-samsung-hdptx: Add clock provider support")
Reviewed-by: Damon Ding <damon.ding at rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko at sntech.de>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam at oss.qualcomm.com>
Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>
---
Tested on an Orange Pi 5 (RK3588S), HDMI only, with KASAN: 20 HDMI
off/on transitions and 6 mode sets from 1600x900 to 3840x2160 at 120,
picture back every time; two s2idle and two deep suspend cycles resumed
with a mode set after each.

DP mode (eDP on RK3588) is not tested: the Orange Pi 5 has no eDP
output and I have no eDP panel. For DP mode the change is reasoned from
the code: the next link training re-enables the lanes (set_lanes) and
deasserts the lane reset (set_voltages) through phy_configure().

Developed with Claude (Anthropic) as a coding assistant; I reviewed and
tested it.
---
Changes in v3:
- Always disable the lanes in power_off, drop the DP check (Sebastian)
- Kept the Reviewed-by tags, this is the only code change
- Link to v2: https://patch.msgid.link/20261130-hdptx-lanes-pwroff-v2-1-fee377304ef6@gmail.com

Changes in v2:
- Shorter commit message (Damon); no code change
- Collected Reviewed-by tags
- Link to v1: https://patch.msgid.link/20261110-hdptx-lanes-pwroff-v1-1-c2f85b7e06a4@gmail.com
---
 drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index 6879eecc5a9f..14bef86635d8 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -1768,10 +1768,24 @@ static int rk_hdptx_phy_power_on(struct phy *phy)
 	return ret;
 }
 
+static void rk_hdptx_lane_disable(struct rk_hdptx_phy *hdptx)
+{
+	regmap_update_bits(hdptx->regmap, LNTOP_REG(0207), LANE_EN_MASK,
+			   FIELD_PREP(LANE_EN_MASK, 0));
+	reset_control_assert(hdptx->rsts[RST_LANE].rstc);
+}
+
 static int rk_hdptx_phy_power_off(struct phy *phy)
 {
 	struct rk_hdptx_phy *hdptx = phy_get_drvdata(phy);
 
+	/*
+	 * The lanes are owned by the PHY consumer alone, hence shut them
+	 * down right away.  The PLL is shared with the clock consumers, so
+	 * leave its fate to the usage count.
+	 */
+	rk_hdptx_lane_disable(hdptx);
+
 	return rk_hdptx_phy_consumer_put(hdptx, false);
 }
 

---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261110-hdptx-lanes-pwroff-5ddc6e3fabb2

Best regards,
--  
Arun Iyengar <aiyengar1990 at gmail.com>





More information about the linux-arm-kernel mailing list