Skip to contentSkip to conversation

Bisected broken Ethernet support on ODROID-X (Exynos4412 board)

U-Boot Siarhei Siamashka 3 participants 6 messages Oct 20, 2015 – Oct 22, 2015

lore
Share & tools
lore
#0 lore raw

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.

Signature · 2 lines
Best regards,
Siarhei Siamashka
#1 lore raw

Hi,

Quoted 49 lines · Siarhei Siamashka

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

Quoted 5 lines

===

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?

Are you able to debug this? You can use 'dm tree' to see what devices are present before and after the 'usb start'.

Regards,
Simon

#2 lore raw
Quoted 53 lines · On Tue, 20 Oct 2015 09:15:07 -0600 Simon Glass <[email protected]> wrote:

Hi,

Quoted 49 lines · Siarhei Siamashka

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

Quoted 7 lines
Quoted 5 lines

===

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

Quoted 1 line

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.

Quoted 2 lines

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
Signature · 2 lines
Best regards,
Siarhei Siamashka
#3 lore raw

Hi Siarhei,

Quoted 59 lines
Quoted 56 lines · On Tue, 20 Oct 2015 09:15:07 -0600 Simon Glass <[email protected]> wrote:

Hi,

Quoted 52 lines · Siarhei Siamashka

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

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

===

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

Quoted 5 lines

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

Quoted 1 line

Are you able to debug this?

Quoted 7 lines

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

Quoted 2 lines

to get this problem resolved for the CONFIG_DM_USB=y configuration, so there must be something else.

+1

Quoted 3 lines

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.

Quoted 3 lines

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.

Quoted 7 lines

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.

Quoted 214 lines
Quoted 3 lines

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
Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
#4 lore raw
Quoted 70 lines · On Wed, 21 Oct 2015 10:06:09 +0200 Lukasz Majewski <[email protected]>…

Hi Siarhei,

Quoted 59 lines
Quoted 56 lines · On Tue, 20 Oct 2015 09:15:07 -0600 Simon Glass <[email protected]> wrote:

Hi,

Quoted 52 lines · Siarhei Siamashka

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

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines

===

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?

Quoted 6 lines

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.

Quoted 23 lines
Quoted 5 lines

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

Quoted 1 line

Are you able to debug this?

Quoted 7 lines

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

Quoted 2 lines

to get this problem resolved for the CONFIG_DM_USB=y configuration, so there must be something else.

+1

Quoted 1 line
Quoted 8 lines
Quoted 2 lines

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?

Quoted 5 lines
Quoted 2 lines

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

Quoted 9 lines
Quoted 7 lines

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.

Signature · 2 lines
Best regards,
Siarhei Siamashka
#5 lore raw

Hi Siarhei,

Quoted 114 lines
Quoted 71 lines · On Wed, 21 Oct 2015 10:06:09 +0200 Lukasz Majewski <[email protected]>…

Hi Siarhei,

Quoted 59 lines
Quoted 56 lines · On Tue, 20 Oct 2015 09:15:07 -0600 Simon Glass <[email protected]> wrote:

Hi,

Quoted 52 lines · Siarhei Siamashka

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

Quoted 9 lines
Quoted 8 lines
Quoted 6 lines

===

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?

Quoted 6 lines

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.

Quoted 31 lines
Quoted 5 lines

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

Quoted 1 line

Are you able to debug this?

Quoted 8 lines

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

Quoted 2 lines

to get this problem resolved for the CONFIG_DM_USB=y configuration, so there must be something else.

+1

Quoted 3 lines

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.

Quoted 7 lines
Quoted 2 lines

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?

We will try to converge to linux kernel, however such process will take some time, since it is almost impossible to change all bindings at once.

Quoted 20 lines
Quoted 6 lines
Quoted 3 lines

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

Quoted 4 lines
Quoted 4 lines

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

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

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.

Thanks,

Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group