Skip to content

Commit a2a18e5

Browse files
shawn1221vinodkoul
authored andcommitted
phy: rockchip: naneng-combphy: Fix PCIe L1ss support RK3528
When PCIe link enters L1 PM substates, the PHY will turn off its PLL for power-saving. However, it turns off the PLL too fast which leads the PHY to be broken. According to the PHY document, we need to delay PLL turnoff time. Fixes: bbcca4f ("phy: rockchip: naneng-combphy: Add RK3528 support") Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patch.msgid.link/1763459526-35004-1-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 942a7a6 commit a2a18e5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/phy/rockchip/phy-rockchip-naneng-combphy.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
#define REF_CLOCK_100MHz (100 * HZ_PER_MHZ)
2222

2323
/* RK3528 COMBO PHY REG */
24+
#define RK3528_PHYREG5 0x14
25+
#define RK3528_PHYREG5_GATE_TX_PCK_SEL BIT(3)
26+
#define RK3528_PHYREG5_GATE_TX_PCK_DLY_PLL_OFF BIT(3)
2427
#define RK3528_PHYREG6 0x18
2528
#define RK3528_PHYREG6_PLL_KVCO GENMASK(12, 10)
2629
#define RK3528_PHYREG6_PLL_KVCO_VALUE 0x2
@@ -504,6 +507,10 @@ static int rk3528_combphy_cfg(struct rockchip_combphy_priv *priv)
504507
case REF_CLOCK_100MHz:
505508
rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_100m, true);
506509
if (priv->type == PHY_TYPE_PCIE) {
510+
/* Gate_tx_pck_sel length select for L1ss support */
511+
rockchip_combphy_updatel(priv, RK3528_PHYREG5_GATE_TX_PCK_SEL,
512+
RK3528_PHYREG5_GATE_TX_PCK_DLY_PLL_OFF, RK3528_PHYREG5);
513+
507514
/* PLL KVCO tuning fine */
508515
val = FIELD_PREP(RK3528_PHYREG6_PLL_KVCO, RK3528_PHYREG6_PLL_KVCO_VALUE);
509516
rockchip_combphy_updatel(priv, RK3528_PHYREG6_PLL_KVCO, val,

0 commit comments

Comments
 (0)