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

Siarhei Siamashka siarhei.siamashka at gmail.com
Wed Oct 21 02:09:40 CEST 2015


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?

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
to get this problem resolved for the CONFIG_DM_USB=y configuration,
so there must be something else.

I also don't quite like that the usb parts of the U-Boot dts files
for exynos differ from the Linux dts files.

So far I'm satisfied that the old exynos usb code still works if
its removal is reverted. 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.

> You can use 'dm tree' to see what devices are present
> before and after the 'usb start'.

Thanks, this indeed prints some useful information. Here is the log:

U-Boot 2015.10-00001-g0374f7f-dirty (Jan 01 1970 - 00:00:00 +0000)

CPU:   Exynos4412 @ 1 GHz
Model: Odroid based on Exynos4412
Board: Odroid based on Exynos4412
Model: x
DRAM:  1 GiB
LDO20 at VDDQ_EMMC_1.8V: set 1800000 uV; enabling
LDO22 at VDDQ_EMMC_2.8V: set 2800000 uV; enabling
LDO21 at TFLASH_2.8V: set 2800000 uV; enabling
MMC:   SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1
Net:   No ethernet found.
Hit any key to stop autoboot:  0 
reading boot.scr
215 bytes read in 107 ms (2 KiB/s)
## Executing script at 40408000
=== dm tree before usb start ===
 Class       Probed   Name
----------------------------------------
 root        [ + ]    root_driver
 serial      [   ]    |-- serial at 13800000
 serial      [ + ]    |-- serial at 13810000
 serial      [   ]    |-- serial at 13820000
 serial      [   ]    |-- serial at 13830000
 serial      [   ]    |-- serial at 13840000
 i2c         [ + ]    |-- i2c at 13860000
 pmic        [ + ]    |   `-- max77686_pmic at 09
 regulator   [   ]    |       |-- LDO1
 regulator   [   ]    |       |-- LDO2
 regulator   [   ]    |       |-- LDO3
 regulator   [   ]    |       |-- LDO4
 regulator   [   ]    |       |-- LDO5
 regulator   [   ]    |       |-- LDO6
 regulator   [   ]    |       |-- LDO7
 regulator   [   ]    |       |-- LDO8
 regulator   [   ]    |       |-- LDO10
 regulator   [   ]    |       |-- LDO11
 regulator   [   ]    |       |-- LDO12
 regulator   [   ]    |       |-- LDO13
 regulator   [   ]    |       |-- LDO14
 regulator   [   ]    |       |-- LDO15
 regulator   [   ]    |       |-- LDO16
 regulator   [   ]    |       |-- LDO17
 regulator   [ + ]    |       |-- LDO20
 regulator   [ + ]    |       |-- LDO21
 regulator   [ + ]    |       |-- LDO22
 regulator   [   ]    |       |-- LDO25
 regulator   [   ]    |       |-- BUCK1
 regulator   [   ]    |       |-- BUCK2
 regulator   [   ]    |       |-- BUCK3
 regulator   [   ]    |       |-- BUCK4
 regulator   [   ]    |       |-- BUCK5
 regulator   [   ]    |       |-- BUCK6
 regulator   [   ]    |       |-- BUCK7
 regulator   [   ]    |       `-- BUCK8
 i2c         [   ]    |-- i2c at 13870000
 i2c         [   ]    |-- i2c at 13880000
 i2c         [   ]    |-- i2c at 13890000
 i2c         [   ]    |-- i2c at 138a0000
 i2c         [   ]    |-- i2c at 138b0000
 i2c         [   ]    |-- i2c at 138c0000
 i2c         [   ]    |-- i2c at 138d0000
 gpio        [ + ]    |-- pinctrl at 11400000
 gpio        [ + ]    |   |-- gpa0
 gpio        [ + ]    |   |-- gpa1
 gpio        [ + ]    |   |-- gpb
 gpio        [ + ]    |   |-- gpc0
 gpio        [ + ]    |   |-- gpc1
 gpio        [ + ]    |   |-- gpd0
 gpio        [ + ]    |   |-- gpd1
 gpio        [ + ]    |   |-- gpf0
 gpio        [ + ]    |   |-- gpf1
 gpio        [ + ]    |   |-- gpf2
 gpio        [ + ]    |   |-- gpf3
 gpio        [ + ]    |   |-- gpj0
 gpio        [ + ]    |   `-- gpj1
 gpio        [ + ]    |-- pinctrl at 11000000
 gpio        [ + ]    |   |-- gpk0
 gpio        [ + ]    |   |-- gpk1
 gpio        [ + ]    |   |-- gpk2
 gpio        [ + ]    |   |-- gpk3
 gpio        [ + ]    |   |-- gpl0
 gpio        [ + ]    |   |-- gpl1
 gpio        [ + ]    |   |-- gpl2
 gpio        [ + ]    |   |-- gpy0
 gpio        [ + ]    |   |-- gpy1
 gpio        [ + ]    |   |-- gpy2
 gpio        [ + ]    |   |-- gpy3
 gpio        [ + ]    |   |-- gpy4
 gpio        [ + ]    |   |-- gpy5
 gpio        [ + ]    |   |-- gpy6
 gpio        [ + ]    |   |-- gpm0
 gpio        [ + ]    |   |-- gpm1
 gpio        [ + ]    |   |-- gpm2
 gpio        [ + ]    |   |-- gpm3
 gpio        [ + ]    |   |-- gpm4
 gpio        [ + ]    |   |-- gpx0
 gpio        [ + ]    |   |-- gpx1
 gpio        [ + ]    |   |-- gpx2
 gpio        [ + ]    |   `-- gpx3
 gpio        [   ]    |-- pinctrl at 03860000
 gpio        [   ]    |   `-- gpz
 gpio        [   ]    |-- pinctrl at 106E0000
 gpio        [   ]    |   |-- gpv0
 gpio        [   ]    |   |-- gpv1
 gpio        [   ]    |   |-- gpv2
 gpio        [   ]    |   |-- gpv3
 gpio        [   ]    |   `-- gpv4
 usb         [   ]    `-- ehci at 12580000
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
=== dm tree after usb start ===
 Class       Probed   Name
----------------------------------------
 root        [ + ]    root_driver
 serial      [   ]    |-- serial at 13800000
 serial      [ + ]    |-- serial at 13810000
 serial      [   ]    |-- serial at 13820000
 serial      [   ]    |-- serial at 13830000
 serial      [   ]    |-- serial at 13840000
 i2c         [ + ]    |-- i2c at 13860000
 pmic        [ + ]    |   `-- max77686_pmic at 09
 regulator   [   ]    |       |-- LDO1
 regulator   [   ]    |       |-- LDO2
 regulator   [   ]    |       |-- LDO3
 regulator   [   ]    |       |-- LDO4
 regulator   [   ]    |       |-- LDO5
 regulator   [   ]    |       |-- LDO6
 regulator   [   ]    |       |-- LDO7
 regulator   [   ]    |       |-- LDO8
 regulator   [   ]    |       |-- LDO10
 regulator   [   ]    |       |-- LDO11
 regulator   [   ]    |       |-- LDO12
 regulator   [   ]    |       |-- LDO13
 regulator   [   ]    |       |-- LDO14
 regulator   [   ]    |       |-- LDO15
 regulator   [   ]    |       |-- LDO16
 regulator   [   ]    |       |-- LDO17
 regulator   [ + ]    |       |-- LDO20
 regulator   [ + ]    |       |-- LDO21
 regulator   [ + ]    |       |-- LDO22
 regulator   [   ]    |       |-- LDO25
 regulator   [   ]    |       |-- BUCK1
 regulator   [   ]    |       |-- BUCK2
 regulator   [   ]    |       |-- BUCK3
 regulator   [   ]    |       |-- BUCK4
 regulator   [   ]    |       |-- BUCK5
 regulator   [   ]    |       |-- BUCK6
 regulator   [   ]    |       |-- BUCK7
 regulator   [   ]    |       `-- BUCK8
 i2c         [   ]    |-- i2c at 13870000
 i2c         [   ]    |-- i2c at 13880000
 i2c         [   ]    |-- i2c at 13890000
 i2c         [   ]    |-- i2c at 138a0000
 i2c         [   ]    |-- i2c at 138b0000
 i2c         [   ]    |-- i2c at 138c0000
 i2c         [   ]    |-- i2c at 138d0000
 gpio        [ + ]    |-- pinctrl at 11400000
 gpio        [ + ]    |   |-- gpa0
 gpio        [ + ]    |   |-- gpa1
 gpio        [ + ]    |   |-- gpb
 gpio        [ + ]    |   |-- gpc0
 gpio        [ + ]    |   |-- gpc1
 gpio        [ + ]    |   |-- gpd0
 gpio        [ + ]    |   |-- gpd1
 gpio        [ + ]    |   |-- gpf0
 gpio        [ + ]    |   |-- gpf1
 gpio        [ + ]    |   |-- gpf2
 gpio        [ + ]    |   |-- gpf3
 gpio        [ + ]    |   |-- gpj0
 gpio        [ + ]    |   `-- gpj1
 gpio        [ + ]    |-- pinctrl at 11000000
 gpio        [ + ]    |   |-- gpk0
 gpio        [ + ]    |   |-- gpk1
 gpio        [ + ]    |   |-- gpk2
 gpio        [ + ]    |   |-- gpk3
 gpio        [ + ]    |   |-- gpl0
 gpio        [ + ]    |   |-- gpl1
 gpio        [ + ]    |   |-- gpl2
 gpio        [ + ]    |   |-- gpy0
 gpio        [ + ]    |   |-- gpy1
 gpio        [ + ]    |   |-- gpy2
 gpio        [ + ]    |   |-- gpy3
 gpio        [ + ]    |   |-- gpy4
 gpio        [ + ]    |   |-- gpy5
 gpio        [ + ]    |   |-- gpy6
 gpio        [ + ]    |   |-- gpm0
 gpio        [ + ]    |   |-- gpm1
 gpio        [ + ]    |   |-- gpm2
 gpio        [ + ]    |   |-- gpm3
 gpio        [ + ]    |   |-- gpm4
 gpio        [ + ]    |   |-- gpx0
 gpio        [ + ]    |   |-- gpx1
 gpio        [ + ]    |   |-- gpx2
 gpio        [ + ]    |   `-- gpx3
 gpio        [   ]    |-- pinctrl at 03860000
 gpio        [   ]    |   `-- gpz
 gpio        [   ]    |-- pinctrl at 106E0000
 gpio        [   ]    |   |-- gpv0
 gpio        [   ]    |   |-- gpv1
 gpio        [   ]    |   |-- gpv2
 gpio        [   ]    |   |-- gpv3
 gpio        [   ]    |   `-- gpv4
 usb         [ + ]    `-- ehci at 12580000
 usb_hub     [ + ]        `-- usb_hub


-- 
Best regards,
Siarhei Siamashka


More information about the U-Boot mailing list