reset-loop on Odroid U2: cros-ec communications failure
Dear maintainers,
U-Boot on my Odroid U2 fails to initialize as of commit e44d7e73fe0d649693d8d0a110cd7632bc919273 (introduced after v2022.10). I get the following output:
U-Boot 2022.10-00565-ge44d7e73fe-dirty (Jan 09 2023 - 01:04:19
+0100)
CPU: Exynos4412 @ 1 GHz
Model: Odroid based on Exynos4412
Type: u3
DRAM: 2 GiB
Core: 101 devices, 12 uclasses, devicetree: separate LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling LDO21@TFLASH_2.8V: set 2800000 uV; enabling
MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0
Loading Environment from MMC... *** Warning - bad CRC, using
default environment
cros-ec communications failure -96
Please reset with Power+Refresh
Cannot init cros-ec device
resetting ...
This repeats indefinitely. I'm building U-Boot using the default config for board odroid and boot the Odroid from an SD card with firmware (bl1, bl2 and tzsw) from Hardkernel's clone of the u-boot repository [1]. There are no peripherals connected apart from the SD card and the serial console. Please let me know if you need more information.
Best, Joost
[1]: https://github.com/hardkernel/u-boot/tree/33e05ffb159141b640571e91470172d83a2a1273/sd_fuse
Hi Joost,
Quoted 29 lines · Joost van Zwieten
Dear maintainers,
U-Boot on my Odroid U2 fails to initialize as of commit
e44d7e73fe0d649693d8d0a110cd7632bc919273(introduced after v2022.10). I get the following output:U-Boot 2022.10-00565-ge44d7e73fe-dirty (Jan 09 2023 - 01:04:19+0100)
CPU: Exynos4412 @ 1 GHz
Model: Odroid based on Exynos4412
Type: u3
DRAM: 2 GiB
Core: 101 devices, 12 uclasses, devicetree: separate LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling LDO21@TFLASH_2.8V: set 2800000 uV; enabling
MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0
Loading Environment from MMC... *** Warning - bad CRC, using
default environmentcros-ec communications failure -96
Please reset with Power+Refresh
Cannot init cros-ec device
resetting ...
Quoted 6 lines
This repeats indefinitely. I'm building U-Boot using the default config for board
odroidand boot the Odroid from an SD card with firmware (bl1,bl2andtzsw) from Hardkernel's clone of the u-boot repository [1]. There are no peripherals connected apart from the SD card and the serial console. Please let me know if you need more information.
board_late_init() is presumably enabled with CONFIG_BOARD_LATE_INIT and the code in board/samsung/common/board.c is being called.
-96 is -EPFNOSUPPORT which means that the CROS_EC uclass is missing.
So either enable CROS_EC so you have the uclass, or disable BOARD_LATE_INIT so it doesn't matter.
Quoted 7 lines
Best, Joost
[1]:
https://github.com/hardkernel/u-boot/tree/33e05ffb159141b640571e91470172d83a2a1273/sd_fuse
Regards,
Simon
Quoted 52 lines · Simon Glass
Hi Joost,
Quoted 30 lines · Joost van Zwieten
Dear maintainers,
U-Boot on my Odroid U2 fails to initialize as of commit
e44d7e73fe0d649693d8d0a110cd7632bc919273(introduced after
v2022.10). I
get the following output:U-Boot 2022.10-00565-ge44d7e73fe-dirty (Jan 09 2023 - 01:04:19+0100)
CPU: Exynos4412 @ 1 GHz
Model: Odroid based on Exynos4412
Type: u3
DRAM: 2 GiB
Core: 101 devices, 12 uclasses, devicetree: separate LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling LDO21@TFLASH_2.8V: set 2800000 uV; enabling
MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0
Loading Environment from MMC... *** Warning - bad CRC, using
default environmentcros-ec communications failure -96
Please reset with Power+Refresh
Cannot init cros-ec device
resetting ...Quoted 7 lines
This repeats indefinitely. I'm building U-Boot using the default
config
for boardodroidand boot the Odroid from an SD card with firmware (bl1,bl2andtzsw) from Hardkernel's clone of the u-boot repository [1]. There are no peripherals connected apart from the SD card and the serial console. Please let me know if you need more information.
board_late_init()is presumably enabled withCONFIG_BOARD_LATE_INITand the code inboard/samsung/common/board.cis being called.-96 is
-EPFNOSUPPORTwhich means that theCROS_ECuclass is missing.So either enable
CROS_ECso you have the uclass, or disableBOARD_LATE_INITso it doesn't matter.Quoted 3 lines
Best, Joost
Quoted 8 lines
Quoted 5 lines
[1]:
https://github.com/hardkernel/u-boot/tree/33e05ffb159141b640571e91470172d83a2a1273/sd_fuse
Regards,
Simon
Hi Simon,
Thanks. Both solutions work. With CROS_EC enabled uclass_first_device_err(UCLASS_CROS_EC, &dev) returns ENODEV. Since board_late_init() seems to do legitimate work for this board (defining the mmcbootdev environment variable) I think enabling CROS_EC is the way to go. Should this be part of the defconfig for odroid? If so, I can send a patch.
Best, Joost
Hi Joost,
Quoted 66 lines · Joost van Zwieten
Quoted 53 lines · Simon Glass
Hi Joost,
Quoted 30 lines · Joost van Zwieten
Dear maintainers,
U-Boot on my Odroid U2 fails to initialize as of commit
e44d7e73fe0d649693d8d0a110cd7632bc919273(introduced after
v2022.10). I
get the following output:U-Boot 2022.10-00565-ge44d7e73fe-dirty (Jan 09 2023 - 01:04:19+0100)
CPU: Exynos4412 @ 1 GHz
Model: Odroid based on Exynos4412
Type: u3
DRAM: 2 GiB
Core: 101 devices, 12 uclasses, devicetree: separate LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling LDO21@TFLASH_2.8V: set 2800000 uV; enabling
MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0
Loading Environment from MMC... *** Warning - bad CRC, using
default environmentcros-ec communications failure -96
Please reset with Power+Refresh
Cannot init cros-ec device
resetting ...Quoted 7 lines
This repeats indefinitely. I'm building U-Boot using the default
config
for boardodroidand boot the Odroid from an SD card with firmware (bl1,bl2andtzsw) from Hardkernel's clone of the u-boot repository [1]. There are no peripherals connected apart from the SD card and the serial console. Please let me know if you need more information.
board_late_init()is presumably enabled withCONFIG_BOARD_LATE_INITand the code inboard/samsung/common/board.cis being called.-96 is
-EPFNOSUPPORTwhich means that theCROS_ECuclass is missing.So either enable
CROS_ECso you have the uclass, or disableBOARD_LATE_INITso it doesn't matter.Quoted 3 lines
Best, Joost
Quoted 8 lines
Quoted 5 lines
[1]:
https://github.com/hardkernel/u-boot/tree/33e05ffb159141b640571e91470172d83a2a1273/sd_fuse
Regards,
Simon
Quoted 8 lines
Hi Simon,
Thanks. Both solutions work. With
CROS_ECenableduclass_first_device_err(UCLASS_CROS_EC, &dev)returnsENODEV. Sinceboard_late_init()seems to do legitimate work for this board (defining themmcbootdevenvironment variable) I think enablingCROS_ECis the way to go. Should this be part of the defconfig for odroid? If so, I can send a patch.
Yes that seems OK to me.
Regards,
Simon
Quoted 85 lines · Simon Glass
Hi Joost,
Quoted 74 lines · Joost van Zwieten
Quoted 13 lines · Simon Glass
Hi Joost,
Quoted 9 lines · Joost van Zwieten
Dear maintainers,
U-Boot on my Odroid U2 fails to initialize as of commit
e44d7e73fe0d649693d8d0a110cd7632bc919273(introduced after
v2022.10). I
get the following output:U-Boot 2022.10-00565-ge44d7e73fe-dirty (Jan 09 2023 -01:04:19
Quoted 16 lines
Quoted 16 lines
+0100)
CPU: Exynos4412 @ 1 GHz
Model: Odroid based on Exynos4412
Type: u3
DRAM: 2 GiB
Core: 101 devices, 12 uclasses, devicetree: separate LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling LDO21@TFLASH_2.8V: set 2800000 uV; enabling
MMC: SAMSUNG SDHCI: 2, EXYNOS DWMMC: 0
Loading Environment from MMC... *** Warning - bad CRC, using
default environmentcros-ec communications failure -96
Quoted 8 lines
Quoted 8 lines
Please reset with Power+Refresh
Cannot init cros-ec device
resetting ...This repeats indefinitely. I'm building U-Boot using the default
config
for boardodroidand boot the Odroid from an SD card withfirmware
Quoted 2 lines
Quoted 2 lines
(
bl1,bl2andtzsw) from Hardkernel's clone of the u-boot repository [1]. There are no peripherals connected apart fromthe SD
Quoted 4 lines
Quoted 2 lines
card and the serial console. Please let me know if you need more information.
board_late_init()is presumably enabled with
CONFIG_BOARD_LATE_INITQuoted 3 lines
and the code in
board/samsung/common/board.cis being called.-96 is
-EPFNOSUPPORTwhich means that theCROS_ECuclass ismissing.
Quoted 10 lines
So either enable
CROS_ECso you have the uclass, or disableBOARD_LATE_INITso it doesn't matter.Quoted 6 lines
Best, Joost
[1]:
https://github.com/hardkernel/u-boot/tree/33e05ffb159141b640571e91470172d83a2a1273/sd_fuse
Quoted 5 lines
Quoted 2 lines
Regards,
SimonHi Simon,
Quoted 7 lines
Thanks. Both solutions work. With
CROS_ECenableduclass_first_device_err(UCLASS_CROS_EC, &dev)returnsENODEV.
Since
board_late_init()seems to do legitimate work for this board (defining themmcbootdevenvironment variable) I think enablingCROS_ECis the way to go. Should this be part of the defconfig for odroid? If so, I can send a patch.
Quoted 4 lines
Yes that seems OK to me.
Regards,
Simon
I've send a patch.
I'm still a bit puzzled by this problem, though. Is it correct that uclass_first_device_err(UCLASS_CROS_EC, ...) always returns -EPFNOSUPPORT when CROS_EC is disabled in the .config? If so, I don't see how U-Boot is going to function properly on any board that hits board_late_init() (board/samsung/common/board.c) with BOARD_LATE_INIT=y and CROS_EC undefined and perhaps the best solution is to run the CROS_EC related statements only if CROS_EC is actually defined. I'm not sure about the implications of this proposal further down the road, though.
Best, Joost