* [PATCH] phy: rockchip: naneng-combphy: Fix overwritten PLL SSC control bit
@ 2026-10-15 3:59 Shawn Lin
2026-10-17 20:02 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Shawn Lin @ 2026-10-15 3:59 UTC (permalink / raw)
To: Neil Armstrong, Vinod Koul
Cc: linux-rockchip, linux-phy, linux-kernel, Shawn Lin
rk_combphy_common_cfg_ssc() first sets RK3568_PHYREG33_PLL_SSC_CTRL on the
RK3588 and RK3576 SoCs, then, for PCIe at 24MHz, programs the PLL KVCO
adjust field. The latter used a plain writel() of the FIELD_PREP() value,
which cleared all the other bits of RK3568_PHYREG33, including the
PLL_SSC_CTRL bit that had just been set a few lines above.
Use rockchip_combphy_updatel() so that only the KVCO field is updated and
the SSC control bit is preserved, as the comment and the pre-consolidation
code intended.
Fixes: 0b31f297557f ("phy: rockchip: naneng-combphy: Consolidate SSC configuration")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
index 3102a99..b6cc010 100644
--- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
@@ -526,7 +526,8 @@ static void rk_combphy_common_cfg_ssc(struct rockchip_combphy_priv *priv, unsign
val = FIELD_PREP(RK3568_PHYREG33_PLL_KVCO_MASK,
RK3576_PHYREG33_PLL_KVCO_VALUE);
- writel(val, priv->mmio + RK3568_PHYREG33);
+ rockchip_combphy_updatel(priv, RK3568_PHYREG33_PLL_KVCO_MASK,
+ val, RK3568_PHYREG33);
}
}
--
2.7.4
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] phy: rockchip: naneng-combphy: Fix overwritten PLL SSC control bit
2026-10-15 3:59 [PATCH] phy: rockchip: naneng-combphy: Fix overwritten PLL SSC control bit Shawn Lin
@ 2026-10-17 20:02 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2026-10-17 20:02 UTC (permalink / raw)
To: Shawn Lin
Cc: Neil Armstrong, Vinod Koul, linux-rockchip, linux-phy,
linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1651 bytes --]
Hi,
On Thu, Oct 15, 2026 at 11:59:47AM +0800, Shawn Lin wrote:
> rk_combphy_common_cfg_ssc() first sets RK3568_PHYREG33_PLL_SSC_CTRL on the
> RK3588 and RK3576 SoCs, then, for PCIe at 24MHz, programs the PLL KVCO
> adjust field. The latter used a plain writel() of the FIELD_PREP() value,
> which cleared all the other bits of RK3568_PHYREG33, including the
> PLL_SSC_CTRL bit that had just been set a few lines above.
>
> Use rockchip_combphy_updatel() so that only the KVCO field is updated and
> the SSC control bit is preserved, as the comment and the pre-consolidation
> code intended.
>
> Fixes: 0b31f297557f ("phy: rockchip: naneng-combphy: Consolidate SSC configuration")
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
> ---
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Greetings,
-- Sebastian
>
> drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> index 3102a99..b6cc010 100644
> --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
> @@ -526,7 +526,8 @@ static void rk_combphy_common_cfg_ssc(struct rockchip_combphy_priv *priv, unsign
>
> val = FIELD_PREP(RK3568_PHYREG33_PLL_KVCO_MASK,
> RK3576_PHYREG33_PLL_KVCO_VALUE);
> - writel(val, priv->mmio + RK3568_PHYREG33);
> + rockchip_combphy_updatel(priv, RK3568_PHYREG33_PLL_KVCO_MASK,
> + val, RK3568_PHYREG33);
> }
> }
>
> --
> 2.7.4
>
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 112 bytes --]
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-17 20:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 3:59 [PATCH] phy: rockchip: naneng-combphy: Fix overwritten PLL SSC control bit Shawn Lin
2026-10-17 20:02 ` Sebastian Reichel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox