All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] iMX8QXP MEK: no ethernet
@ 2019-02-28 12:27 Andrejs Cainikovs
  2019-02-28 22:45 ` Anatolij Gustschin
  0 siblings, 1 reply; 10+ messages in thread
From: Andrejs Cainikovs @ 2019-02-28 12:27 UTC (permalink / raw)
  To: u-boot

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] iMX8QXP MEK: no ethernet
  2019-02-28 12:27 [U-Boot] iMX8QXP MEK: no ethernet Andrejs Cainikovs
@ 2019-02-28 22:45 ` Anatolij Gustschin
  2019-03-01  9:50   ` Andrejs Cainikovs
  0 siblings, 1 reply; 10+ messages in thread
From: Anatolij Gustschin @ 2019-02-28 22:45 UTC (permalink / raw)
  To: u-boot

Hi,

On Thu, 28 Feb 2019 12:27:45 +0000
Andrejs Cainikovs Andrejs.Cainikovs at netmodule.com wrote:

> 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>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] iMX8QXP MEK: no ethernet
  2019-02-28 22:45 ` Anatolij Gustschin
@ 2019-03-01  9:50   ` Andrejs Cainikovs
  2019-03-01 10:05     ` Anatolij Gustschin
  0 siblings, 1 reply; 10+ messages in thread
From: Andrejs Cainikovs @ 2019-03-01  9:50 UTC (permalink / raw)
  To: u-boot

Hi,

On 28/02/2019 23:45, Anatolij Gustschin wrote:
> 
>> 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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] iMX8QXP MEK: no ethernet
  2019-03-01  9:50   ` Andrejs Cainikovs
@ 2019-03-01 10:05     ` Anatolij Gustschin
  2019-03-01 11:19       ` Stefano Babic
  0 siblings, 1 reply; 10+ messages in thread
From: Anatolij Gustschin @ 2019-03-01 10:05 UTC (permalink / raw)
  To: u-boot

Hi,

On Fri, 1 Mar 2019 09:50:06 +0000
Andrejs Cainikovs Andrejs.Cainikovs at netmodule.com wrote:
...
> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] iMX8QXP MEK: no ethernet
  2019-03-01 10:05     ` Anatolij Gustschin
@ 2019-03-01 11:19       ` Stefano Babic
  2019-03-01 12:26         ` Anatolij Gustschin
  2019-03-01 12:30         ` Andrejs Cainikovs
  0 siblings, 2 replies; 10+ messages in thread
From: Stefano Babic @ 2019-03-01 11:19 UTC (permalink / raw)
  To: u-boot

On 01/03/19 11:05, Anatolij Gustschin wrote:
> Hi,
> 
> On Fri, 1 Mar 2019 09:50:06 +0000
> Andrejs Cainikovs Andrejs.Cainikovs at netmodule.com wrote:
> ...
>> 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 ?

diff --git a/arch/arm/dts/fsl-imx8qxp-mek.dts
b/arch/arm/dts/fsl-imx8qxp-mek.dts
index 41f7ec1763..b6c4593334 100644
--- a/arch/arm/dts/fsl-imx8qxp-mek.dts
+++ b/arch/arm/dts/fsl-imx8qxp-mek.dts
@@ -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


-- 
=====================================================================
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
=====================================================================

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [U-Boot] iMX8QXP MEK: no ethernet
  2019-03-01 11:19       ` Stefano Babic
@ 2019-03-01 12:26         ` Anatolij Gustschin
  2019-03-01 12:30         ` Andrejs Cainikovs
  1 sibling, 0 replies; 10+ messages in thread
From: Anatolij Gustschin @ 2019-03-01 12:26 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

On Fri, 1 Mar 2019 12:19:41 +0100
Stefano Babic sbabic at denx.de wrote:
...
> What about to change this in DT ?
> 
> diff --git a/arch/arm/dts/fsl-imx8qxp-mek.dts
> b/arch/arm/dts/fsl-imx8qxp-mek.dts
> index 41f7ec1763..b6c4593334 100644
> --- a/arch/arm/dts/fsl-imx8qxp-mek.dts
> +++ b/arch/arm/dts/fsl-imx8qxp-mek.dts
> @@ -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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] iMX8QXP MEK: no ethernet
  2019-03-01 11:19       ` Stefano Babic
  2019-03-01 12:26         ` Anatolij Gustschin
@ 2019-03-01 12:30         ` Andrejs Cainikovs
  2019-03-01 12:36           ` Stefano Babic
  1 sibling, 1 reply; 10+ messages in thread
From: Andrejs Cainikovs @ 2019-03-01 12:30 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

On 01/03/2019 12:19, Stefano Babic wrote:
> 
> What about to change this in DT ?
> 
> diff --git a/arch/arm/dts/fsl-imx8qxp-mek.dts
> b/arch/arm/dts/fsl-imx8qxp-mek.dts
> index 41f7ec1763..b6c4593334 100644
> --- a/arch/arm/dts/fsl-imx8qxp-mek.dts
> +++ b/arch/arm/dts/fsl-imx8qxp-mek.dts
> @@ -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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] iMX8QXP MEK: no ethernet
  2019-03-01 12:30         ` Andrejs Cainikovs
@ 2019-03-01 12:36           ` Stefano Babic
  2019-03-01 13:00             ` Anatolij Gustschin
  0 siblings, 1 reply; 10+ messages in thread
From: Stefano Babic @ 2019-03-01 12:36 UTC (permalink / raw)
  To: u-boot

On 01/03/19 13:30, Andrejs Cainikovs wrote:
> Hi Stefano,
> 
> On 01/03/2019 12:19, Stefano Babic wrote:
>>
>> What about to change this in DT ?
>>
>> diff --git a/arch/arm/dts/fsl-imx8qxp-mek.dts
>> b/arch/arm/dts/fsl-imx8qxp-mek.dts
>> index 41f7ec1763..b6c4593334 100644
>> --- a/arch/arm/dts/fsl-imx8qxp-mek.dts
>> +++ b/arch/arm/dts/fsl-imx8qxp-mek.dts
>> @@ -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. 

Right, I think this is a way to do.

> 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


-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] iMX8QXP MEK: no ethernet
  2019-03-01 12:36           ` Stefano Babic
@ 2019-03-01 13:00             ` Anatolij Gustschin
  2019-03-01 13:37               ` Andrejs Cainikovs
  0 siblings, 1 reply; 10+ messages in thread
From: Anatolij Gustschin @ 2019-03-01 13:00 UTC (permalink / raw)
  To: u-boot

Hi all,

On Fri, 1 Mar 2019 13:36:17 +0100
Stefano Babic sbabic at denx.de wrote:
...
> > 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.   
> 
> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] iMX8QXP MEK: no ethernet
  2019-03-01 13:00             ` Anatolij Gustschin
@ 2019-03-01 13:37               ` Andrejs Cainikovs
  0 siblings, 0 replies; 10+ messages in thread
From: Andrejs Cainikovs @ 2019-03-01 13:37 UTC (permalink / raw)
  To: u-boot

On 01/03/2019 14:00, Anatolij Gustschin wrote:
> Hi all,
> 
> On Fri, 1 Mar 2019 13:36:17 +0100
> Stefano Babic sbabic at denx.de wrote:
>>
>> 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.
> 

Done. Please review.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-03-01 13:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-28 12:27 [U-Boot] iMX8QXP MEK: no ethernet Andrejs Cainikovs
2019-02-28 22:45 ` Anatolij Gustschin
2019-03-01  9:50   ` Andrejs Cainikovs
2019-03-01 10:05     ` Anatolij Gustschin
2019-03-01 11:19       ` Stefano Babic
2019-03-01 12:26         ` Anatolij Gustschin
2019-03-01 12:30         ` Andrejs Cainikovs
2019-03-01 12:36           ` Stefano Babic
2019-03-01 13:00             ` Anatolij Gustschin
2019-03-01 13:37               ` Andrejs Cainikovs

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.