]> git.baikalelectronics.ru Git - uboot.git/commit
net: fec: add support for DM_MDIO
authorTim Harvey <tharvey@gateworks.com>
Wed, 30 Nov 2022 17:42:49 +0000 (09:42 -0800)
committerTom Rini <trini@konsulko.com>
Thu, 2 Feb 2023 19:44:51 +0000 (14:44 -0500)
commitbf72c41db6066f856917b1490dc0b691bb7dc421
tree91fbd55ad429c1ec58cc94284e5068a032f6d50f
parent82aa39a1520dab5b7b9153d8148ded47978d0fb1
net: fec: add support for DM_MDIO

Add support for DM_MDIO by registering a UCLASS_MDIO driver and
attempting to use it. This is necessary if wanting to use a DSA
driver for example hanging off of the FEC MAC.

Care is taken to fallback to non DM_MDIO mii bus as several boards define
DM_MDIO without having the proper device-tree configuration necessary
such as an mdio subnode, a phy-mode prop, and either a valid phy-handle
prop or fixed-phy subnode which will cause dm_eth_phy_connect() to fail.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
drivers/net/fec_mxc.c