Let the EQoS in imx8mp handle fixed-phy too.
PATCH v3 1/1 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.
---
changes v2: fix format issues
changes v3: remove {} around single if, add reviewd..
drivers/net/dwc_eth_qos.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/net/dwc_eth_qos.c +15 -3
@@ -788,9 +788,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;
--
2.34.1
Quoted 43 lines
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 at gmx.de>Reviewed-by Marek Vasut <marex at denx.de>---
changes v2: fix format issues
changes v3: remove {} around single if, add reviewd..drivers/net/dwc_eth_qos.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)drivers/net/dwc_eth_qos.c +15
-4@@ -788,9 +788,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; --
Quoted 1 line
2.34.1
I would give a short reminder about the patch. Reviewed by Marek, ok for Ramon. Would be glad to see it in 2023.04.
Thanks
Elmar
Quoted 40 lines · Elmar Psilog
Quoted 40 lines
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 at gmx.de>Reviewed-by Marek Vasut <marex at denx.de>---
changes v2: fix format issues
changes v3: remove {} around single if, add reviewd..
drivers/net/dwc_eth_qos.c| 18 +++++++++++++++---1 file changed, 15 insertions(+), 3 deletions(-)drivers/net/dwc_eth_qos.c +15
-3@@ -788,9 +788,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) {
Quoted 8 lines
Quoted 4 lines
drivers/net/dwc_eth_qos.c +0
-0pr_err("phy_connect() failed"); goto err_stop_resets;Signature · 1 line
2.34.1I would give a short reminder about the patch. Reviewed by Marek, ok for Ramon. Would be glad to see it in 2023.04.
We're already in 2023.04-rc4 , this is material for v2023.07 , i.e. for u-boot/next branch .
Am 19.03.23 um 18:21 schrieb Marek Vasut:
Quoted 50 lines · Elmar Psilog
Quoted 40 lines
Quoted 40 lines
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 at gmx.de>Reviewed-by Marek Vasut <marex at denx.de>---
changes v2: fix format issues
changes v3: remove {} around single if, add reviewd..
drivers/net/dwc_eth_qos.c| 18 +++++++++++++++---1 file changed, 15 insertions(+), 3 deletions(-)drivers/net/dwc_eth_qos.c +15
-3@@ -788,9 +788,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) {Quoted 8 lines
Quoted 4 lines
drivers/net/dwc_eth_qos.c +0
-0pr_err("phy_connect() failed"); goto err_stop_resets;Signature · 1 line
2.34.1I would give a short reminder about the patch. Reviewed by Marek, ok for Ramon. Would be glad to see it in 2023.04.
Quoted 1 line
We're already in 2023.04-rc4 , this is material for v2023.07 , i.e. for u-boot/next branch .
Ok, but does it change anything for the patch itself? As source isn't touched in last weeks it is still needed. Other way asked: Any action (from my side) needed? I just afraid your (@Marek) and my work gets lost. I would expect either an "accepted" or "rejected" (for a reason).
Quoted 52 lines · Elmar Psilog
Am 19.03.23 um 18:21 schrieb Marek Vasut:
Quoted 50 lines · Elmar Psilog
Quoted 48 lines
Quoted 44 lines
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 at gmx.de>Reviewed-by Marek Vasut <marex at denx.de>---
changes v2: fix format issues
changes v3: remove {} around single if, add reviewd..
drivers/net/dwc_eth_qos.c| 18 +++++++++++++++---1 file changed, 15 insertions(+), 3 deletions(-)drivers/net/dwc_eth_qos.c +15
-3@@ -788,9 +788,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;Signature · 1 line
2.34.1I would give a short reminder about the patch. Reviewed by Marek, ok for Ramon. Would be glad to see it in 2023.04.
Quoted 3 lines
Quoted 1 line
We're already in 2023.04-rc4 , this is material for v2023.07 , i.e. for u-boot/next branch .
Ok, but does it change anything for the patch itself?
No, it will be applied to u-boot-net / next and then proceed via PR to u-boot / next .
Quoted 1 line
As source isn't touched in last weeks it is still needed. Other way asked: Any action (from my side) needed?
No, it is up to Ramon now.
Quoted 1 line
I just afraid your (@Marek) and my work gets lost. I would expect either an "accepted" or "rejected" (for a reason).
It's just overloaded/busy maintainers problem, sadly, this does happen from time to time. The patch is tracked by patchwork, so it shouldn't be lost.
Quoted 6 lines · Elmar Psilog
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 at gmx.de>Reviewed-by Marek Vasut <marex at denx.de>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom