Skip to content

Commit be866e6

Browse files
shawn1221vinodkoul
authored andcommitted
phy: rockchip: naneng-combphy: Fix PCIe L1ss support RK3562
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: f13bff2 ("phy: rockchip-naneng-combo: Support rk3562") 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-2-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent a2a18e5 commit be866e6

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@
106106
#define RK3568_PHYREG18 0x44
107107
#define RK3568_PHYREG18_PLL_LOOP 0x32
108108

109+
#define RK3568_PHYREG30 0x74
110+
#define RK3568_PHYREG30_GATE_TX_PCK_SEL BIT(7)
111+
#define RK3568_PHYREG30_GATE_TX_PCK_DLY_PLL_OFF BIT(7)
112+
109113
#define RK3568_PHYREG32 0x7C
110114
#define RK3568_PHYREG32_SSC_MASK GENMASK(7, 4)
111115
#define RK3568_PHYREG32_SSC_DIR_MASK GENMASK(5, 4)
@@ -664,6 +668,10 @@ static int rk3562_combphy_cfg(struct rockchip_combphy_priv *priv)
664668
case REF_CLOCK_100MHz:
665669
rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_clk_100m, true);
666670
if (priv->type == PHY_TYPE_PCIE) {
671+
/* Gate_tx_pck_sel length select for L1ss support */
672+
rockchip_combphy_updatel(priv, RK3568_PHYREG30_GATE_TX_PCK_SEL,
673+
RK3568_PHYREG30_GATE_TX_PCK_DLY_PLL_OFF,
674+
RK3568_PHYREG30);
667675
/* PLL KVCO tuning fine */
668676
val = FIELD_PREP(RK3568_PHYREG33_PLL_KVCO_MASK,
669677
RK3568_PHYREG33_PLL_KVCO_VALUE);

0 commit comments

Comments
 (0)