aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>2020-07-16 18:09:13 +0800
committerTom Rini <trini@konsulko.com>2020-09-24 08:27:44 -0400
commit25a2e24e942e002353d370489cfeaf0bfcbb0159 (patch)
tree79a6f06d56a41b8968cedfbf7bdc78c6887ff82a /drivers/net
parentb4eb9cfc0978fe77c989f7f3dc86ec86d2ee5006 (diff)
downloadu-boot-25a2e24e942e002353d370489cfeaf0bfcbb0159.zip
u-boot-25a2e24e942e002353d370489cfeaf0bfcbb0159.tar.gz
u-boot-25a2e24e942e002353d370489cfeaf0bfcbb0159.tar.bz2
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 <vladimir.oltean@nxp.com> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> [Rebased] Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/tsec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index 6ca3995..af0d27a 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);