From: Arun Iyengar via B4 Relay <devnull+aiyengar1990.gmail.com@kernel.org>
To: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Philipp Zabel <p.zabel@pengutronix.de>,
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Cc: Damon Ding <damon.ding@rock-chips.com>,
linux-phy@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org,
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
Arun Iyengar <aiyengar1990@gmail.com>
Subject: [PATCH v2] phy: rockchip: samsung-hdptx: Power down the lanes on phy_power_off()
Date: Mon, 30 Nov 2026 22:10:06 +0000 [thread overview]
Message-ID: <20261130-hdptx-lanes-pwroff-v2-1-fee377304ef6@gmail.com> (raw)
From: Arun Iyengar <aiyengar1990@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. DP mode is unchanged.
Fixes: c4b09c562086 ("phy: phy-rockchip-samsung-hdptx: Add clock provider support")
Reviewed-by: Damon Ding <damon.ding@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
Tested on an Orange Pi 5 (RK3588S): 102 HDMI off/on transitions over a
range of TMDS modes, picture back every time, lanes off (LNTOP_REG0207
= 0) while off; three suspend-to-idle cycles resumed normally.
Developed with Claude (Anthropic) as a coding assistant; I reviewed and
tested it.
---
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 | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index 6879eecc5a9f..751bb503dcfe 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -1768,10 +1768,25 @@ 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.
+ */
+ if (phy_get_mode(phy) != PHY_MODE_DP)
+ 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@gmail.com>
next reply other threads:[~2026-11-30 22:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 22:10 Arun Iyengar via B4 Relay [this message]
2026-12-01 22:16 ` Sebastian Reichel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130-hdptx-lanes-pwroff-v2-1-fee377304ef6@gmail.com \
--to=devnull+aiyengar1990.gmail.com@kernel.org \
--cc=aiyengar1990@gmail.com \
--cc=cristian.ciocaltea@collabora.com \
--cc=damon.ding@rock-chips.com \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=neil.armstrong@linaro.org \
--cc=p.zabel@pengutronix.de \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®