aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-05-02 19:00:42 -0400
committerTom Rini <trini@konsulko.com>2022-05-02 19:00:42 -0400
commit2406a91734eb4eeeb50fdfaeff65d0b7f464dba9 (patch)
treefa542b95605c994f96abedb8f3186a5cd82ee8dc /drivers
parentc70c0102af5413cadde6bf90044cb75aefef0584 (diff)
parent08dc62c1527ec7401cc98719cde50ca47533a7c2 (diff)
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- Misc turris_omnia/mox related Fixes and impovements (Pali) - Turris Omnia: Add support for configuring mSATA and WWAN slots via env variables (Pali) - net: mvgbe: Set PHY page 0 before phy_connect (Tony) - kirkwood: nsa310s: Use Marvell uclass mvgbe and PHY driver (Tony) - mvebu: turris_omnia: Fix SYS_RSTOUT_* macro names (Pali) - mvebu: clearfog_defconfig: enable setexpr command (Josef) - mvebu: x530: set MPP55 to gpio (Chris)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/mvgbe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index bf5ed5513b..a77c057432 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -43,6 +43,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define MV_PHY_ADR_REQUEST 0xee
#define MVGBE_SMI_REG (((struct mvgbe_registers *)MVGBE0_BASE)->smi)
+#define MVGBE_PGADR_REG 22
#if defined(CONFIG_PHYLIB) || defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
static int smi_wait_ready(struct mvgbe_device *dmvgbe)
@@ -745,6 +746,9 @@ static struct phy_device *__mvgbe_phy_init(struct eth_device *dev,
miiphy_write(dev->name, MV_PHY_ADR_REQUEST, MV_PHY_ADR_REQUEST,
phyid);
+ /* Make sure the selected PHY page is 0 before connecting */
+ miiphy_write(dev->name, phyid, MVGBE_PGADR_REG, 0);
+
phydev = phy_connect(bus, phyid, dev, phy_interface);
if (!phydev) {
printf("phy_connect failed\n");