iMX8QXP MEK: no ethernet
Subsystems (2)
Hi,
I cant get ethernet to work on iMX8QXP MEK board with latest sources (tried v2019.01 as well). Is this a bug or work in progress?
---
U-Boot SPL 2019.04-rc2-00134-g783e66816d (Feb 28 2019 - 13:15:40 +0100) Normal Boot
Trying to boot from MMC2_2
U-Boot 2019.04-rc2-00134-g783e66816d (Feb 28 2019 - 13:15:40 +0100)
CPU: NXP i.MX8QXP RevB A35 at 147228 MHz
Model: Freescale i.MX8QXP MEK Board: iMX8QXP MEK Build: SCFW 3301c1a9 Boot: SD1 DRAM: 3 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... OK In: serial at 5a060000 Out: serial at 5a060000 Err: serial at 5a060000 Net: eth-1: ethernet at 5b040000 Hit any key to stop autoboot: 0
=> dhcp
No ethernet found.
---
Best regards,
Andrejs Cainikovs.
Hi,
Quoted 4 lines · On Thu, 28 Feb 2019 12:27:45 +0000 Andrejs Cainikovs Andrejs.Cainikovs at…
Hi,
I cant get ethernet to work on iMX8QXP MEK board with latest sources (tried v2019.01 as well). Is this a bug or work in progress?
This is probably due to the missing delay after PHY reset in fec_gpio_reset().
Please try with attached patch, it worked for me on MEK board with RevA CPU.
--
Anatolij
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-net-fec-delay-after-PHY-reset-when-on-i.MX8QXP-MEK-b.patch
Type: text/x-patch
Size: 952 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190228/68f8097e/attachment.bin>
Hi,
Quoted 7 lines · Anatolij Gustschin
Quoted 3 lines
I cant get ethernet to work on iMX8QXP MEK board with latest sources (tried v2019.01 as well). Is this a bug or work in progress?
This is probably due to the missing delay after PHY reset in
fec_gpio_reset().Please try with attached patch, it worked for me on MEK board with RevA CPU.
Thanks a lot! It works now.
Best regards,
Andrejs Cainikovs.
Hi,
On Fri, 1 Mar 2019 09:50:06 +0000
Andrejs Cainikovs Andrejs.Cainikovs at netmodule.com wrote:
...
Quoted 1 line
Thanks a lot! It works now.
Great, thanks for testing! I don't like the patch however and I'm still not sure how we should fix it in a proper way for upcoming release. Unfortunately, currently I don't have time to work on a suitable fix.
--
Anatolij
Quoted 11 lines · Anatolij Gustschin
Hi,
On Fri, 1 Mar 2019 09:50:06 +0000
Andrejs Cainikovs Andrejs.Cainikovs at netmodule.com wrote:
...Quoted 1 line
Thanks a lot! It works now.
Great, thanks for testing! I don't like the patch however and I'm still not sure how we should fix it in a proper way for upcoming release. Unfortunately, currently I don't have time to work on a suitable fix.
What about to change this in DT ?
(quoted diff) +0 -0
b/arch/arm/dts/fsl-imx8qxp-mek.dts
index 41f7ec1763..b6c4593334 100644
arch/arm/dts/fsl-imx8qxp-mek.dts +1 -1
@@ -223,7 +223,7 @@ fsl,magic-packet; status = "okay"; phy-reset-gpios = <&pca9557_a 4 GPIO_ACTIVE_LOW>; - phy-reset-duration = <10>; + phy-reset-duration = <150>; mdio { #address-cells = <1>;
Best regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
Hi Stefano,
On Fri, 1 Mar 2019 12:19:41 +0100
Stefano Babic sbabic at denx.de wrote:
...
arch/arm/dts/fsl-imx8qxp-mek.dts line 226
Quoted 13 lines
What about to change this in DT ?
arch/arm/dts/fsl-imx8qxp-mek.dts +1
-1@@ -223,7 +223,7 @@ fsl,magic-packet; status = "okay"; phy-reset-gpios = <&pca9557_a 4 GPIO_ACTIVE_LOW>; - phy-reset-duration = <10>; + phy-reset-duration = <150>;
This will extend the time for holding the PHY in reset state, but 10ms was already enough to reset the PHY. The problem is that after reset state is deactivated, the PHY cannot be detected unless we wait about 150 ms in fec_gpio_reset() after removing the reset level. I don't now the reason why this happens.
--
Anatolij
Hi Stefano,
Quoted 10 lines · Stefano Babic
What about to change this in DT ?
arch/arm/dts/fsl-imx8qxp-mek.dts +0
-0
arch/arm/dts/fsl-imx8qxp-mek.dts line 229
Quoted 8 lines
arch/arm/dts/fsl-imx8qxp-mek.dts +1
-1@@ -223,7 +223,7 @@ fsl,magic-packet; status = "okay"; phy-reset-gpios = <&pca9557_a 4 GPIO_ACTIVE_LOW>; - phy-reset-duration = <10>; + phy-reset-duration = <150>; mdio { #address-cells = <1>;
Nope, didn't worked. This parameter is a pulse width of a reset, but the issue is about having a delay *after* reset. However, introducing a new phy-reset-wait is a reasonable option. Thanks for idea, I will make a patch, and then it's up to you and Anatolij to decide whether it is a ok or not.
Best regards,
Andrejs Cainikovs.
Quoted 18 lines · Andrejs Cainikovs
Hi Stefano,
Quoted 15 lines · Stefano Babic
What about to change this in DT ?
arch/arm/dts/fsl-imx8qxp-mek.dts +1
-1@@ -223,7 +223,7 @@ fsl,magic-packet; status = "okay"; phy-reset-gpios = <&pca9557_a 4 GPIO_ACTIVE_LOW>; - phy-reset-duration = <10>; + phy-reset-duration = <150>;
Quoted 7 lines
arch/arm/dts/fsl-imx8qxp-mek.dts line 229
Quoted 3 lines
arch/arm/dts/fsl-imx8qxp-mek.dts +0
-0mdio { #address-cells = <1>;Nope, didn't worked. This parameter is a pulse width of a reset, but the issue is about having a delay *after* reset. However, introducing a new
phy-reset-waitis a reasonable option.
Right, I think this is a way to do.
Quoted 3 lines
Thanks for idea, I will make a
patch, and then it's up to you and Anatolij to decide whether it is a ok or not.
Just post the patch to Joe Hershberger, too, because he's the network maintainer.
Regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
Hi all,
On Fri, 1 Mar 2019 13:36:17 +0100
Stefano Babic sbabic at denx.de wrote:
...
Quoted 5 lines
Quoted 3 lines
Nope, didn't worked. This parameter is a pulse width of a reset, but the issue is about having a delay *after* reset. However, introducing a new
phy-reset-waitis a reasonable option.Right, I think this is a way to do.
yes, this is much better than ifdef. I'd suggest using 'phy-reset-post-delay' property instead of 'phy-reset-wait'. Linux has already such binding, i.e. see Documentation/devicetree/bindings/net/fsl-fec.txt and the driver drivers/net/ethernet/freescale/fec_main.c.
--
Anatolij
Quoted 5 lines · Anatolij Gustschin
Hi all,
Quoted 1 line · On Fri, 1 Mar 2019 13:36:17 +0100 Stefano Babic sbabic at denx.de wrote:
Quoted 7 lines
Quoted 1 line
Right, I think this is a way to do.
yes, this is much better than ifdef. I'd suggest using 'phy-reset-post-delay' property instead of 'phy-reset-wait'. Linux has already such binding, i.e. see
Documentation/devicetree/bindings/net/fsl-fec.txtand the driverdrivers/net/ethernet/freescale/fec_main.c.
Done. Please review.