diff options
author | Elmar Psilog <epsi@gmx.de> | 2023-02-20 16:03:15 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-05-05 17:48:37 -0400 |
commit | 96d58ecac89eeb24e16e0dffb35ddefce59c18a3 (patch) | |
tree | fa3edee9508e02200a82e7ceae9a8060adfcee49 | |
parent | 5e541c48a7d34e6b6e426bf5b50d7111d7e680f6 (diff) | |
download | u-boot-96d58ecac89eeb24e16e0dffb35ddefce59c18a3.zip u-boot-96d58ecac89eeb24e16e0dffb35ddefce59c18a3.tar.gz u-boot-96d58ecac89eeb24e16e0dffb35ddefce59c18a3.tar.bz2 |
Let the EQoS in imx8mp handle fixed-phy too.
Without that patch it lost track to the node to scan
speed and duplex.
Patch was created by Marek Vasut, just tested by me.
Signed-off-by: Elmar Psilog <epsi@gmx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
-rw-r--r-- | drivers/net/dwc_eth_qos.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index ec58697..9bbba6e 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -794,9 +794,21 @@ static int eqos_start(struct udevice *dev) */ if (!eqos->phy) { int addr = -1; - addr = eqos_get_phy_addr(eqos, dev); - eqos->phy = phy_connect(eqos->mii, addr, dev, - eqos->config->interface(dev)); + ofnode fixed_node; + + if (IS_ENABLED(CONFIG_PHY_FIXED)) { + fixed_node = ofnode_find_subnode(dev_ofnode(dev), + "fixed-link"); + if (ofnode_valid(fixed_node)) + eqos->phy = fixed_phy_create(dev_ofnode(dev)); + } + + if (!eqos->phy) { + addr = eqos_get_phy_addr(eqos, dev); + eqos->phy = phy_connect(eqos->mii, addr, dev, + eqos->config->interface(dev)); + } + if (!eqos->phy) { pr_err("phy_connect() failed"); goto err_stop_resets; |