Commit 81ac3945 authored by Yuri Tikhonov's avatar Yuri Tikhonov
Browse files

RM-608 stm32 eth: fix-up operating after exiting PHY power-off state

This fixes the network problem we sometimes have if resetting while
the STM32F7-SOM system is in the Low Power state.
Signed-off-by: default avatarYuri Tikhonov <>
parent b42881ad
......@@ -480,6 +480,22 @@ static s32 stm_phy_init(struct stm_eth_dev *mac)
debug("%s: found PHY id = %#x at addr %#x\n", __func__,
mac->phy_id, mac->phy_adr);
* If exiting from PHY power-off state on STM32F7-SOM we may
* sometimes have 16h.0 (MII Override) bit set. Obviously, this
* results to an incorrect PHY operating. So, we always
* set the necessary override val (16h.1 RMII Override) here
rv = stm_phy_read(mac, PHY_PCSR, &val);
if (rv == 0) {
val &= ~(1 << 0); /* Clear MII */
val |= (1 << 1); /* Set RMII */
stm_phy_write(mac, PHY_PCSR, val);
rv = 0;
return rv;
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