Skip to content

Commit

Permalink
net: phy: mscc: adding LCPLL reset to VSC8514
Browse files Browse the repository at this point in the history
At Power-On Reset, transients may cause the LCPLL to lock onto a
clock that is momentarily unstable. This is normally seen in QSGMII
setups where the higher speed 6G SerDes is being used.
This patch adds an initial LCPLL Reset to the PHY (first instance)
to avoid this issue.

Fixes: e4f9ba6 ("net: phy: mscc: add support for VSC8514 PHY.")
Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: Bjarni Jonasson <bjarni.jonasson@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Bjarni Jonasson authored and David S. Miller committed Feb 16, 2021
1 parent 455843d commit 3cc2c64
Show file tree
Hide file tree
Showing 2 changed files with 236 additions and 122 deletions.
8 changes: 8 additions & 0 deletions drivers/net/phy/mscc/mscc.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ enum rgmii_clock_delay {
#define PHY_MCB_S6G_READ BIT(30)

#define PHY_S6G_PLL5G_CFG0 0x06
#define PHY_S6G_PLL5G_CFG2 0x08
#define PHY_S6G_LCPLL_CFG 0x11
#define PHY_S6G_PLL_CFG 0x2b
#define PHY_S6G_COMMON_CFG 0x2c
Expand All @@ -121,6 +122,9 @@ enum rgmii_clock_delay {
#define PHY_S6G_PLL_FSM_CTRL_DATA_POS 8
#define PHY_S6G_PLL_FSM_ENA_POS 7

#define PHY_S6G_CFG2_FSM_DIS 1
#define PHY_S6G_CFG2_FSM_CLK_BP 23

#define MSCC_EXT_PAGE_ACCESS 31
#define MSCC_PHY_PAGE_STANDARD 0x0000 /* Standard registers */
#define MSCC_PHY_PAGE_EXTENDED 0x0001 /* Extended registers */
Expand Down Expand Up @@ -412,6 +416,10 @@ struct vsc8531_edge_rate_table {
};
#endif /* CONFIG_OF_MDIO */

enum csr_target {
MACRO_CTRL = 0x07,
};

#if IS_ENABLED(CONFIG_MACSEC)
int vsc8584_macsec_init(struct phy_device *phydev);
void vsc8584_handle_macsec_interrupt(struct phy_device *phydev);
Expand Down
Loading

0 comments on commit 3cc2c64

Please sign in to comment.