Commit aaed2163 authored by Pascal Bos's avatar Pascal Bos

fixed wrong mdio configuration of the phy

parent d3815a08
......@@ -334,13 +334,18 @@ static int ksz9031_config(struct phy_device *phydev)
{
int ret;
ret = ksz9031_of_config(phydev);
if (ret)
return ret;
ret = ksz9031_center_flp_timing(phydev);
if (ret)
return ret;
/* Fix phy */
phy_write(phydev, MDIO_DEVAD_NONE, 0xD, 0x2);
phy_write(phydev, MDIO_DEVAD_NONE, 0xE, 0x8);
phy_write(phydev, MDIO_DEVAD_NONE, 0xD, 0x4002);
phy_write(phydev, MDIO_DEVAD_NONE, 0xE, 0x3fef);
/* add an option to disable the gigabit feature of this PHY */
if (env_get("disable_giga")) {
unsigned features;
......@@ -360,6 +365,7 @@ static int ksz9031_config(struct phy_device *phydev)
/* disable speed 1000 in 1000Base-T Control Register */
phy_write(phydev, MDIO_DEVAD_NONE, MII_CTRL1000, 0);
/* start autoneg */
genphy_config_aneg(phydev);
genphy_restart_aneg(phydev);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment