[PATCH] imx: imx7d-sdb: fix ethernet, sync .dts with linux

Tom Rini trini at konsulko.com
Tue Sep 28 14:34:30 CEST 2021


On Tue, Sep 28, 2021 at 12:18:10PM +0200, Rasmus Villemoes wrote:

> On 16/09/2021 18.52, Fabio Estevam wrote:
> > Hi Rasmus,
> > 
> > On Thu, Sep 16, 2021 at 11:53 AM Rasmus Villemoes
> > <rasmus.villemoes at prevas.dk> wrote:
> >>
> >> Commit 0d52bab46 (mx7dsabre: Enable DM_ETH) changed these flags from 0
> >> (aka GPIO_ACTIVE_HIGH) to GPIO_ACTIVE_LOW. It claimed to "Also sync
> >> device tree with v5.5-rc1", but in the linux tree, these gpios have
> >> always been GPIO_ACTIVE_HIGH ever since this node was introduced
> >> around v4.13 (linux commit 184f39b5).
> >>
> >> I'm guessing that the reason for the GPIO_ACTIVE_LOW was to work
> >> around the behaviour of the soft-spi driver back then, which
> >> effectively defaulted to spi-mode 3 and not 0. That was arguably a bug
> >> in the soft-spi driver, which then got fixed in 0e146993bb3 (spi: add
> >> support for all spi modes with soft spi), but that commit then broke
> >> ethernet on this board.
> >>
> >> Fix it by setting the gpios as active high, which as a bonus actually
> >> brings us in sync with the .dts in the linux source tree.
> >>
> >> Without this, one gets
> >>
> >>     Net:   Could not get PHY for FEC0: addr 0
> >>     No ethernet found.
> >>
> >> With this, ethernet (at least ping and tftp) works as expected from
> >> the U-Boot shell.
> >>
> >> Cc: Fabio Estevam <festevam at gmail.com>
> >> Cc: Joris Offouga <offougajoris at gmail.com>
> >> Cc: "Christian Bräuner Sørensen" <yocto at bsorensen.net>
> >> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> > 
> > Thanks for the fix:
> > 
> > Reviewed-by: Fabio Estevam <festevam at gmail.com>
> > 
> 
> Any chance this can make it in before v2021.10 is released?

Yes, I'll pick it up.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210928/3f830120/attachment.sig>


More information about the U-Boot mailing list