diff mbox series

net: phy: marvell: Finalize errata section 5.1 for Alaska PHY

Message ID 20220315064121.1422324-1-sr@denx.de
State New
Delegated to: Ramon Fried
Headers show
Series net: phy: marvell: Finalize errata section 5.1 for Alaska PHY | expand

Commit Message

Stefan Roese March 15, 2022, 6:41 a.m. UTC
From: Leszek Polak <lpolak@arri.de>

As per Errata Section 5.1, if EEE is intended to be used, some register
writes must be done once after every hardware reset. This patch now adds
another register configuration (reg 0x7 in the 0xfb page) which is
currently missing in m88e151x_config(). Exactly as listed in the Marvell
errata.

Without this fix we experience ethernet problems on some of our boards
equipped with a new version of this ethernet PHY (different supplier).

The fix applies to Marvell Alaska 88E1510/88E1518/88E1512/88E1514
Rev. A0.

Signed-off-by: Leszek Polak <lpolak@arri.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
---
 drivers/net/phy/marvell.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index a62c695c5c84..437912b8b4ad 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -344,6 +344,8 @@  static int m88e151x_config(struct phy_device *phydev)
 	phy_write(phydev, MDIO_DEVAD_NONE, 16, 0x214D);
 	phy_write(phydev, MDIO_DEVAD_NONE, 17, 0xCC0C);
 	phy_write(phydev, MDIO_DEVAD_NONE, 16, 0x2159);
+	phy_write(phydev, MDIO_DEVAD_NONE, MIIM_88E1118_PHY_PAGE, 0x00fb);
+	phy_write(phydev, MDIO_DEVAD_NONE, 07, 0xC00D);
 	phy_write(phydev, MDIO_DEVAD_NONE, MIIM_88E1118_PHY_PAGE, 0x0000);
 
 	/* SGMII-to-Copper mode initialization */