Skip to content

Commit

Permalink
net/phy: extra delay only for RGMII interfaces for IC+ IP 1001
Browse files Browse the repository at this point in the history
The extra delay of 2ns to adjust RX clock phase is actually needed
in RGMII mode. Tested on the HDK7108 (STx7108c2).

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Giuseppe CAVALLARO authored and David S. Miller committed Oct 19, 2011
1 parent 2425717 commit a4886d5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/net/phy/icplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,15 @@ static int ip1001_config_init(struct phy_device *phydev)
if (c < 0)
return c;

/* Additional delay (2ns) used to adjust RX clock phase
* at GMII/ RGMII interface */
c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
c |= IP1001_PHASE_SEL_MASK;
if (phydev->interface == PHY_INTERFACE_MODE_RGMII) {
/* Additional delay (2ns) used to adjust RX clock phase
* at RGMII interface */
c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
c |= IP1001_PHASE_SEL_MASK;
c = phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c);
}

return phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c);
return c;
}

static int ip101a_config_init(struct phy_device *phydev)
Expand Down

0 comments on commit a4886d5

Please sign in to comment.