Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-29 Thread Joris OFFOUGA
Hi Fabio,




Le mer. 29 janv. 2020 à 15:43, Fabio Estevam  a écrit :

> On Mon, Jan 27, 2020 at 3:31 PM Fabio Estevam  wrote:
>
> > Running "dm tree" says that soft_spi has not been probed:
> >
> >  spi   0  [   ]   soft_spi  |-- spi4
> >
> > Not sure why soft_spi does not get probed though.
> >
> > The IO expander is on the soft_spi bus, so we need to get soft_spi to
> > get probed first.
>
> I managed to get Ethernet working again with this patch:
> https://lists.denx.de/pipermail/u-boot/2020-January/398438.html

I good catch, I will test your patch soon
Best regards
Joris Offouga

>
>


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-29 Thread Fabio Estevam
On Mon, Jan 27, 2020 at 3:31 PM Fabio Estevam  wrote:

> Running "dm tree" says that soft_spi has not been probed:
>
>  spi   0  [   ]   soft_spi  |-- spi4
>
> Not sure why soft_spi does not get probed though.
>
> The IO expander is on the soft_spi bus, so we need to get soft_spi to
> get probed first.

I managed to get Ethernet working again with this patch:
https://lists.denx.de/pipermail/u-boot/2020-January/398438.html


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-27 Thread Fabio Estevam
On Mon, Jan 27, 2020 at 2:57 PM Fabio Estevam  wrote:
>
> Hi Joris,
>
> On Mon, Jan 27, 2020 at 1:16 PM Joris OFFOUGA  wrote:
>
> > I can't find a fix yet.  If you find one it would be great.
>
> I noticed that the Ethernet regression happens because the ENET_RST_B
> signal keeps always at 0, which makes the PHY to never becomes active.
>
> The Ethernet PHY reset comes from a GPIO expander (74LV595PW), which
> is connected to SPI GPIO lines.
>
> Both the GPIO expander driver (CONFIG_DM_74X164) as well as the SPI
> GPIO driver (CONFIG_SOFT_SPI) are enabled at
> configs/mx7dsabresd_defconfig.
>
> The device tree has:
>
>  {
> 
> phy-reset-gpios = <_io 5 GPIO_ACTIVE_LOW>;
>
> Port 5 of the 74LV595PW is the Ethernet PHY reset pin.
>
> However, this is what we get in U-Boot:
>
> Net:   Could not get PHY for FEC0: addr 0
> No ethernet found.
>
> Not sure why DM is not properly bringing the Ethernet PHY back to 1.

Running "dm tree" says that soft_spi has not been probed:

 spi   0  [   ]   soft_spi  |-- spi4

Not sure why soft_spi does not get probed though.

The IO expander is on the soft_spi bus, so we need to get soft_spi to
get probed first.

Thanks


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-27 Thread Fabio Estevam
Hi Joris,

On Mon, Jan 27, 2020 at 1:16 PM Joris OFFOUGA  wrote:

> I can't find a fix yet.  If you find one it would be great.

I noticed that the Ethernet regression happens because the ENET_RST_B
signal keeps always at 0, which makes the PHY to never becomes active.

The Ethernet PHY reset comes from a GPIO expander (74LV595PW), which
is connected to SPI GPIO lines.

Both the GPIO expander driver (CONFIG_DM_74X164) as well as the SPI
GPIO driver (CONFIG_SOFT_SPI) are enabled at
configs/mx7dsabresd_defconfig.

The device tree has:

 {

phy-reset-gpios = <_io 5 GPIO_ACTIVE_LOW>;

Port 5 of the 74LV595PW is the Ethernet PHY reset pin.

However, this is what we get in U-Boot:

Net:   Could not get PHY for FEC0: addr 0
No ethernet found.

Not sure why DM is not properly bringing the Ethernet PHY back to 1.

Any ideas?

Thanks


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-27 Thread Joris OFFOUGA
Hi Fabio,

Le lun. 27 janv. 2020 à 16:58, Fabio Estevam  a écrit :

> Hi Joris,
>
> On Mon, Jan 20, 2020 at 5:37 PM Fabio Estevam  wrote:
> >
> > Hi Joris,
> >
> > On Mon, Jan 20, 2020 at 5:32 PM Joris Offouga 
> wrote:
> >
> > > This thread :
> > > https://lists.denx.de/pipermail/u-boot/2020-January/395560.html
> >
> > This is an unrelated issue. wandboard support several versions and
> > this issue happens with imx6dl-wandboard-revd1.
> >
> > Ethernet does not work because revd1 is not properly detected (this is
> > the root cause).
>
> Just to avoid duplicate work: do you plan to fix Ethernet support on
> this board after DM_ETH conversion?


> I can't find a fix yet.  If you find one it would be great.

Best regards,
Joris

>
> Thanks
>


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-27 Thread Fabio Estevam
Hi Joris,

On Mon, Jan 20, 2020 at 5:37 PM Fabio Estevam  wrote:
>
> Hi Joris,
>
> On Mon, Jan 20, 2020 at 5:32 PM Joris Offouga  wrote:
>
> > This thread :
> > https://lists.denx.de/pipermail/u-boot/2020-January/395560.html
>
> This is an unrelated issue. wandboard support several versions and
> this issue happens with imx6dl-wandboard-revd1.
>
> Ethernet does not work because revd1 is not properly detected (this is
> the root cause).

Just to avoid duplicate work: do you plan to fix Ethernet support on
this board after DM_ETH conversion?

Thanks


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-20 Thread Fabio Estevam
Hi Joris,

On Mon, Jan 20, 2020 at 5:32 PM Joris Offouga  wrote:

> This thread :
> https://lists.denx.de/pipermail/u-boot/2020-January/395560.html

This is an unrelated issue. wandboard support several versions and
this issue happens with imx6dl-wandboard-revd1.

Ethernet does not work because revd1 is not properly detected (this is
the root cause).


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-20 Thread Joris Offouga

Hi Fabio,

Le 20/01/2020 à 21:28, Fabio Estevam a écrit :

Hi Joris,

On Mon, Jan 20, 2020 at 5:26 PM Joris Offouga  wrote:


I think this bug is similar to the wandboard, I looked at this thread
fairly quickly, did you finally fix it?

Which wandboard issue are you referring to?
This thread : 
https://lists.denx.de/pipermail/u-boot/2020-January/395560.html


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-20 Thread Fabio Estevam
Hi Joris,

On Mon, Jan 20, 2020 at 5:26 PM Joris Offouga  wrote:

> I think this bug is similar to the wandboard, I looked at this thread
> fairly quickly, did you finally fix it?

Which wandboard issue are you referring to?


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-20 Thread Joris Offouga

Hi Fabio,

Le 20/01/2020 à 21:22, Fabio Estevam a écrit :

Hi Joris,

On Mon, Jan 20, 2020 at 5:21 PM Joris Offouga  wrote:


Sorry for that indeed I should have made two different commit for this,
I have the idea to revert the commit and I will send it split in two

No need to revert. Let's focus on getting Ethernet to work again :-)


Thanks for your comprehension :-)

I think this bug is similar to the wandboard, I looked at this thread 
fairly quickly, did you finally fix it?


Thanks



Thanks


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-20 Thread Fabio Estevam
Hi Joris,

On Mon, Jan 20, 2020 at 5:21 PM Joris Offouga  wrote:

> Sorry for that indeed I should have made two different commit for this,
> I have the idea to revert the commit and I will send it split in two

No need to revert. Let's focus on getting Ethernet to work again :-)

Thanks


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-20 Thread Joris Offouga

Hi Fabio,

Le 20/01/2020 à 19:48, Fabio Estevam a écrit :

Hi Joris,

Has this patch been tested on the real hardware?
I tested and validate it before sending it, there must have been a 
problem with the merge.


This is what we currently see:

U-Boot 2020.01-00620-g2d2f91a480 (Jan 20 2020 - 15:41:31 -0300)

CPU:   Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 35C
Reset cause: POR
Model: Freescale i.MX7 SabreSD Board
Board: i.MX7D SABRESD in secure mode
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
Video: 480x272x24
In:serial
Out:   serial
Err:   serial
Net:   Could not get PHY for FEC0: addr 0
No ethernet found.

So Ethernet is not functional at all.

Do you plan to fix Ethernet on this board?

On Sun, Dec 8, 2019 at 2:02 PM Joris Offouga  wrote:

Also sync device tree with v5.5-rc1
Signed-off-by: Joris Offouga 
---
  arch/arm/dts/imx7d-sdb-u-boot.dtsi|   3 +
  arch/arm/dts/imx7d-sdb.dts| 785 --

Also, not happy that the dts sync was part of the same commit that
converted to DM_ETH.


Sorry for that indeed I should have made two different commit for this, 
I have the idea to revert the commit and I will send it split in two


Best regards,

Joris



Thanks


Re: [PATCH 2/3] mx7dsabre: Enable DM_ETH

2020-01-20 Thread Fabio Estevam
Hi Joris,

Has this patch been tested on the real hardware?

This is what we currently see:

U-Boot 2020.01-00620-g2d2f91a480 (Jan 20 2020 - 15:41:31 -0300)

CPU:   Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 35C
Reset cause: POR
Model: Freescale i.MX7 SabreSD Board
Board: i.MX7D SABRESD in secure mode
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
Video: 480x272x24
In:serial
Out:   serial
Err:   serial
Net:   Could not get PHY for FEC0: addr 0
No ethernet found.

So Ethernet is not functional at all.

Do you plan to fix Ethernet on this board?

On Sun, Dec 8, 2019 at 2:02 PM Joris Offouga  wrote:
>
> Also sync device tree with v5.5-rc1
> Signed-off-by: Joris Offouga 
> ---
>  arch/arm/dts/imx7d-sdb-u-boot.dtsi|   3 +
>  arch/arm/dts/imx7d-sdb.dts| 785 --

Also, not happy that the dts sync was part of the same commit that
converted to DM_ETH.

Thanks