From: Joost van Zwieten <joost@diskos.nl>
To: Simon Glass <sjg@chromium.org>
Cc: u-boot@lists.denx.de
Subject: Re: reset-loop on Odroid U2: cros-ec communications failure
Date: Sat, 21 Jan 2023 22:04:04 +0100 [thread overview]
Message-ID: <S6TUOR.OVTF7RVSSLJH1@diskos.nl> (raw)
In-Reply-To: <CAPnjgZ2O2JtKcoAKDKxfk-uBeffCafgnFB+gC7TiSUJc_30+EA@mail.gmail.com>
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/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.
>
> 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
prev parent reply other threads:[~2023-01-21 21:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 9:11 reset-loop on Odroid U2: cros-ec communications failure Joost van Zwieten
2023-01-13 18:00 ` Simon Glass
2023-01-20 22:00 ` Joost van Zwieten
2023-01-20 22:11 ` Simon Glass
2023-01-21 21:04 ` Joost van Zwieten [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=S6TUOR.OVTF7RVSSLJH1@diskos.nl \
--to=joost@diskos.nl \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox