[U-Boot] [PATCH 1/3] net: phy: marvell: Fix init function for m88e1145

Commit a058052c changed the generic phy_reset() to clear all bits in BMCR. This inevitably clears the ANEG bit. m88e1145 requires any change to ANEG bit to be followed by a software reset. This seems to be different from other PHYs. Implemente read-modify-write prodecure for this PHY init.
Signed-off-by: York Sun york.sun@nxp.com --- This issue was observed on MPC8548CDS. The fix has been verified on the same board.
drivers/net/phy/marvell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index ab0c443..4722fd3 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -439,7 +439,10 @@ static int m88e1145_config(struct phy_device *phydev)
genphy_config_aneg(phydev);
- phy_reset(phydev); + /* soft reset */ + reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR); + reg |= BMCR_RESET; + phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, reg);
return 0; }

Signed-off-by: York Sun york.sun@nxp.com ---
board/freescale/mpc8548cds/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/freescale/mpc8548cds/MAINTAINERS b/board/freescale/mpc8548cds/MAINTAINERS index 6f22922..a99f84b 100644 --- a/board/freescale/mpc8548cds/MAINTAINERS +++ b/board/freescale/mpc8548cds/MAINTAINERS @@ -1,5 +1,5 @@ MPC8548CDS BOARD -#M: - +M: York Sun york.sun@nxp.com S: Maintained F: board/freescale/mpc8548cds/ F: include/configs/MPC8548CDS.h

Signed-off-by: York Sun york.sun@nxp.com ---
configs/MPC8548CDS_36BIT_defconfig | 1 + configs/MPC8548CDS_defconfig | 1 + 2 files changed, 2 insertions(+)
diff --git a/configs/MPC8548CDS_36BIT_defconfig b/configs/MPC8548CDS_36BIT_defconfig index 65a339f..dfb9532 100644 --- a/configs/MPC8548CDS_36BIT_defconfig +++ b/configs/MPC8548CDS_36BIT_defconfig @@ -6,6 +6,7 @@ CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=10 CONFIG_HUSH_PARSER=y +CONFIG_CMD_DHCP=y CONFIG_CMD_I2C=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y diff --git a/configs/MPC8548CDS_defconfig b/configs/MPC8548CDS_defconfig index 3b194e0..8fcd782 100644 --- a/configs/MPC8548CDS_defconfig +++ b/configs/MPC8548CDS_defconfig @@ -5,6 +5,7 @@ CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=10 CONFIG_HUSH_PARSER=y +CONFIG_CMD_DHCP=y CONFIG_CMD_I2C=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y

On 06/06/2017 09:43 AM, York Sun wrote:
Commit a058052c changed the generic phy_reset() to clear all bits in BMCR. This inevitably clears the ANEG bit. m88e1145 requires any change to ANEG bit to be followed by a software reset. This seems to be different from other PHYs. Implemente read-modify-write prodecure for this PHY init.
Looks like I got some typos here.
Signed-off-by: York Sun york.sun@nxp.com
This issue was observed on MPC8548CDS. The fix has been verified on the same board.
drivers/net/phy/marvell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Joe,
Please take a look. I can bring it in with you ack (with typo fixed).
York

On Tue, Jun 6, 2017 at 11:43 AM, York Sun york.sun@nxp.com wrote:
Commit a058052c changed the generic phy_reset() to clear all bits in BMCR. This inevitably clears the ANEG bit. m88e1145 requires any change to ANEG bit to be followed by a software reset. This seems to be different from other PHYs. Implemente read-modify-write prodecure for this PHY init.
Signed-off-by: York Sun york.sun@nxp.com
Acked-by: Joe Hershberger joe.hershberger@ni.com
participants (2)
-
Joe Hershberger
-
York Sun