Skip to content

Commit

Permalink
Disable smartEEE for Ethernet PHY as it causes spurious link down
Browse files Browse the repository at this point in the history
Refer to http://www.trimslice.com/forum/viewtopic.php?f=73&t=1779
Many thanks to pepedog for pointing it
  • Loading branch information
wolfgar committed Apr 21, 2014
1 parent 4eb7ef5 commit 86d55a0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/arm/mach-mx6/board-cm-fx6.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ static int cm_fx6_fec_phy_init(struct phy_device *phydev)
{
unsigned short val;

/* Ar8031 phy SmartEEE feature cause link status generates glitch,
* which cause ethernet link down/up issue, so disable SmartEEE
*/
phy_write(phydev, 0xd, 0x3);
phy_write(phydev, 0xe, 0x805d);
phy_write(phydev, 0xd, 0x4003);
val = phy_read(phydev, 0xe);
val &= ~(0x1 << 8);
phy_write(phydev, 0xe, val);

/* To enable AR8031 ouput a 125MHz clk from CLK_25M */
phy_write(phydev, 0xd, 0x7);
phy_write(phydev, 0xe, 0x8016);
Expand Down

0 comments on commit 86d55a0

Please sign in to comment.