Files
u-boot/drivers
Vladimir Oltean 5faf161d07 net: phy: atheros: avoid error in ar803x_of_init() when PHY has no OF node
A DM_ETH driver may use phy_connect() towards a PHY address on an MDIO
bus which is not specified in the device tree, as evidenced by:

pfe_eth_probe
-> pfe_phy_configure
   -> phy_connect

When this happens, the PHY will have an invalid OF node.

When ar803x_config() runs, it silently fails at ar803x_of_init(), and
therefore, fails to run the rest of the initialization.

This makes MII_BMCR contain what it had after BMCR_RESET (0x8000) has
been written into it by phy_reset(). Since BMCR_RESET is volatile and
self-clearing, the MII_BMCR ends up having a value of 0x0. The further
configuration of this register, which is supposed to be handled by
genphy_config_aneg() lower in ar803x_config(), never gets a chance to
run due to this early error from ar803x_of_init().

As a result of having MII_BMCR as 0, the following symptom appears:

=> setenv ethact pfe_eth0
=> setenv ipaddr 10.0.0.1
=> ping 10.0.0.2
pfe_eth0 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Could not initialize PHY pfe_eth0

Manually writing 0x1140 into register 0 of the PHY makes the connection
work, but it is rather desirable that the port works without any manual
intervention.

Fixes: fe6293a809 ("phy: atheros: add device tree bindings and config")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-04-10 08:44:12 +03:00
..
2021-09-25 09:46:15 -06:00
2021-10-05 08:50:15 -04:00
2022-03-30 13:02:55 -04:00
2022-01-13 07:57:49 -05:00
2022-03-28 12:36:49 -04:00
2022-03-28 08:22:17 -04:00
2022-03-28 12:36:49 -04:00
2022-03-28 12:36:49 -04:00
2022-01-13 07:57:49 -05:00
2022-03-28 20:16:46 +02:00
2022-03-30 13:02:55 -04:00
2022-03-25 13:35:50 -04:00
2022-03-28 12:36:49 -04:00
2022-02-25 01:41:04 -05:00
2022-04-01 16:56:54 -04:00
2022-01-19 18:11:34 +01:00
2022-03-30 13:02:55 -04:00
2022-01-19 18:11:34 +01:00
2022-03-28 20:29:58 +02:00
2022-01-19 18:11:34 +01:00
2021-10-01 21:08:18 -04:00
2021-10-31 08:46:44 -04:00
2021-10-31 08:46:44 -04:00