Skip to content

Commit

Permalink
Only enable TX for Pine64
Browse files Browse the repository at this point in the history
This changed is based on a patch i received from Pine64 which is supposed to completely disable RX delay and by this should fix 1000Mbit NIC issues with certain Pine64+ boards.
  • Loading branch information
longsleep committed Oct 28, 2016
1 parent 45be9eb commit 93f7e67
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/ethernet/allwinner/sunxi-gmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,15 @@ static int geth_phy_init(struct net_device *ndev)
}

#endif
#ifdef CONFIG_ARCH_SUN50IW1P1
//init ephy
printk("init ephy for pine64\n");
phy_write(phydev, 0x1f, 0x0007);//sel ext page
phy_write(phydev, 0x1e, 0x00a4);//sel page 164
phy_write(phydev, 0x1c, 0xd591);//only enable TX
phy_write(phydev, 0x1f, 0x0000);//sel page 0
#endif

phy_write(phydev, MII_BMCR, BMCR_RESET);
while (BMCR_RESET & phy_read(phydev, MII_BMCR))
msleep(30);
Expand Down

1 comment on commit 93f7e67

@longsleep
Copy link
Owner Author

@longsleep longsleep commented on 93f7e67 Dec 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this has some effect it does not completely solve the issue.

Seems like flipping the bit 14 and 13 from the previous Allwinner suggestion (0xd591). This two bits seems undocumented and we are asking Realtek folk to release or explain.

We might want to try

+    phy_write(phydev, 28, 0xb591);//only enable TX

instead.

Please sign in to comment.