Skip to content

Commit

Permalink
phy: uniphier-pcie: Set VCOPLL clamp mode in PHY register
Browse files Browse the repository at this point in the history
Set VCOPLL clamp mode to mode 0 to avoid hardware unstable issue.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/1635503947-18250-6-git-send-email-hayashi.kunihiko@socionext.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Kunihiko Hayashi authored and Vinod Koul committed Nov 23, 2021
1 parent 1c1597c commit 25bba42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/phy/socionext/phy-uniphier-pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
#define PCL_PHY_R26 26
#define VCO_CTRL GENMASK(7, 4) /* Tx VCO adjustment value */
#define VCO_CTRL_INIT_VAL 5
#define PCL_PHY_R28 28
#define VCOPLL_CLMP GENMASK(3, 2) /* Tx VCOPLL clamp mode */
#define VCOPLL_CLMP_VAL 0

struct uniphier_pciephy_priv {
void __iomem *base;
Expand Down Expand Up @@ -158,6 +161,8 @@ static int uniphier_pciephy_init(struct phy *phy)
FIELD_PREP(RX_EQ_ADJ, RX_EQ_ADJ_VAL));
uniphier_pciephy_set_param(priv, PCL_PHY_R26, VCO_CTRL,
FIELD_PREP(VCO_CTRL, VCO_CTRL_INIT_VAL));
uniphier_pciephy_set_param(priv, PCL_PHY_R28, VCOPLL_CLMP,
FIELD_PREP(VCOPLL_CLMP, VCOPLL_CLMP_VAL));
usleep_range(1, 10);

uniphier_pciephy_deassert(priv);
Expand Down

0 comments on commit 25bba42

Please sign in to comment.