[U-Boot] Bisected broken Ethernet support on ODROID-X (Exynos4412 board)

Siarhei Siamashka siarhei.siamashka at gmail.com
Thu Oct 22 12:57:58 CEST 2015


On Wed, 21 Oct 2015 10:06:09 +0200
Lukasz Majewski <l.majewski at samsung.com> wrote:

> Hi Siarhei,
> 
> > On Tue, 20 Oct 2015 09:15:07 -0600
> > Simon Glass <sjg at chromium.org> wrote:
> > 
> > > Hi,
> > > 
> > > On 20 October 2015 at 08:13, Siarhei Siamashka
> > > <siarhei.siamashka at gmail.com> wrote:
> > > > Hello,
> > > >
> > > > Ethernet support does not work anymore when using the current
> > > > U-Boot (version v2014.10) on the ODROID-X board. Bisecting shows
> > > > that this happened starting from commit
> > > > 874dde80169e0a0c00020e2e0bbcd380c61097e3 ("dm: usb: exynos: Use
> > > > driver model for USB"):
> > > > http://git.denx.de/?p=u-boot.git;a=commitdiff;h=874dde80169e0a0c00020e2e0bbcd380c61097e3
> > > >
> > > > Below are the logs from the serial console.
> > > >
> > > > === works properly ==
> > > >
> > > > U-Boot 2015.04-00271-g52e6935-dirty (Oct 20 2015 - 16:38:09)
> > > >
> > > > CPU:    Exynos4412 at 1000MHz
> > > > Model: Odroid based on Exynos4412
> > > > DRAM:  1 GiB
> > > > Board PMIC init
> > > > MMC:   SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1
> > > > Net:   No ethernet found.
> > > > Hit any key to stop autoboot:  0
> > > > reading boot.scr
> > > > 129 bytes read in 11 ms (10.7 KiB/s)
> > > > ## Executing script at 40408000
> > > > starting USB...
> > > > USB0:   USB EHCI 1.00
> > > > scanning bus 0 for devices... 4 USB Device(s) found
> > > >        scanning usb for storage devices... 0 Storage Device(s)
> > > > found scanning usb for ethernet devices... 1 Ethernet Device(s)
> > > > found
> > > >
> > > > === fails ==
> > > >
> > > > U-Boot 2015.04-00273-g78ab40b-dirty (Oct 20 2015 - 16:41:11)
> > > >
> > > > CPU:    Exynos4412 at 1000MHz
> > > > Model: Odroid based on Exynos4412
> > > > DRAM:  1 GiB
> > > > Board PMIC init
> > > > MMC:   SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1
> > > > Net:   No ethernet found.
> > > > Hit any key to stop autoboot:  0
> > > > reading boot.scr
> > > > 129 bytes read in 12 ms (9.8 KiB/s)
> > > > ## Executing script at 40408000
> > > > starting USB...
> > > > USB-1:   USB EHCI 1.00
> > > > scanning bus 0 for devices... 1 USB Device(s) found
> > > >        scanning usb for ethernet devices... 0 Ethernet Device(s)
> > > > found
> > > >
> > > > ===
> > > >
> > > > As a test, reverting f56da290b8df14a058b43735494dbbb0f8521a89
> > > > ("Drop the code that doesn't use driver model for USB.") and
> > > > disabling CONFIG_DM_USB in odroid_defconfig makes it work again.
> > > 
> > > Does this problem happen on the XU3?
> > 
> 
> Yes, It does. 
> 
> I'm struggling to fix this issue for a few days now.
>
> What is interesting though, you can run ethernet by calling:
> "usb start" and afterwards "usb reset".

That's a very interesting observation indeed. 
 
> > I don't have XU3. My only board is ODROID-X (the same as ODROID-X2,
> > but with slower CPU clock speed and less RAM).
> > 
> > > Are you able to debug this?
> > 
> > I'm not sure if I can really spend much time on it. Debugging this
> > issue would require comparing the old exynos usb code and the new
> > dm code to see where exactly they differ. For example, the new
> > 'ehci_usb_probe()' function does not call 'board_usb_init()' while
> > the old 'ehci_hcd_init()' function did:
> >     http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/usb/host/ehci-exynos.c;h=86cf6312febc30b7e142146c3b4763a6a871d5a6;hb=02e4d3fbc54b345883d9bead4f2a911d0f0f59b1#l329
> > And just calling 'board_usb_init()' on ODROID-X is still not enough
> 
> I will say even more - it seems like the issue is not related to any
> "basic" initialization (i.e. the lack of calling
> ehci_usb_probe|reset_usb_phy) called just before calling "usb start".
> 
> > to get this problem resolved for the CONFIG_DM_USB=y configuration,
> > so there must be something else.
> 
> +1
> 
> > 
> > I also don't quite like that the usb parts of the U-Boot dts files
> > for exynos differ from the Linux dts files.
> 
> This is a really good questions. We have discussed it recently on ELCE
> and there is no good solution for it.
> 
> We made a mistake to allow non Linux compliant bindings to slip into
> u-boot. Now we must cope with (or fix) this mess.

OK, I see. Thanks for explaining.

But if the kernel is considered to be the primary source of dts files,
then probably U-Boot needs to be eventually adjusted to match?

> > So far I'm satisfied that the old exynos usb code still works if
> > its removal is reverted.
> 
> As I've stated above - please try "usb start" and "usb reset"
> afterwards.

Thanks, doing "usb start" followed by "usb reset" makes the ethernet
work on ODROID-X with the CONFIG_DM_USB=y configuration if I also
add a missing call to the 'board_usb_init()' function. It does a bit
of necessary setup magic for odroid:
    http://git.denx.de/?p=u-boot.git;a=blob;f=board/samsung/odroid/odroid.c;hb=v2015.10#l467

And if there is no call to 'board_usb_init()', then the ethernet
does not work on ODROID-X after "usb reset".

> > And debugging U-Boot was not my primary
> > intention when fetching this old ODROID-X board from a closet.
> > I had plans to do some other interesting tests with it :-)
> > 
> > If Przemyslaw Marczak (the ODROID boards maintainer) could confirm
> > the problem on ODROID-X2 and take care of it, then this would be
> > the best for me.
> 
> I'm working on this issue now.

This is a very good news. Thanks a lot! I'll be happy to test the
fixes.

-- 
Best regards,
Siarhei Siamashka


More information about the U-Boot mailing list