
On Fri, Jan 20, 2023 at 15:11, Simon Glass sjg@chromium.org wrote:
Hi Joost,
On Fri, 20 Jan 2023 at 15:00, Joost van Zwieten joost@diskos.nl wrote:
On Fri, Jan 13, 2023 at 11:00, Simon Glass sjg@chromium.org wrote:
Hi Joost,
On Mon, 9 Jan 2023 at 06:31, Joost van Zwieten joost@diskos.nl wrote:
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.
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.
Best, Joost
[1]:
https://github.com/hardkernel/u-boot/tree/33e05ffb159141b640571e91470172d83a...
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.
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