From: Hou Zhiqiang Date: Thu, 16 Jul 2020 10:09:13 +0000 (+0800) Subject: net: tsec: Add fixed-link PHY support X-Git-Tag: v2025.01-rc5-pxa1908~2192^2~12^2~24 X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/%7B%7B%20%24image.RelPermalink%20%7D%7D?a=commitdiff_plain;h=25a2e24e942e002353d370489cfeaf0bfcbb0159;p=u-boot.git net: tsec: Add fixed-link PHY support The info of fixed-link PHY is described in DT node instead of getting from MII, so detect the fixed-link PHY DT node first, if it doesn't exist then probe the MII. Signed-off-by: Vladimir Oltean Signed-off-by: Hou Zhiqiang [Rebased] Signed-off-by: Priyanka Jain --- diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 6ca399532e..af0d27a8e3 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -683,7 +683,10 @@ static int init_phy(struct tsec_private *priv) tsec_configure_serdes(priv); #if defined(CONFIG_DM_ETH) && defined(CONFIG_DM_MDIO) - phydev = dm_eth_phy_connect(priv->dev); + if (ofnode_valid(ofnode_find_subnode(priv->dev->node, "fixed-link"))) + phydev = phy_connect(NULL, 0, priv->dev, priv->interface); + else + phydev = dm_eth_phy_connect(priv->dev); #else phydev = phy_connect(priv->bus, priv->phyaddr, priv->dev, priv->interface);