From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF69AC05027 for ; Fri, 20 Jan 2023 22:00:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6B3CD854F1; Fri, 20 Jan 2023 23:00:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=diskos.nl Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=diskos.nl header.i=@diskos.nl header.b="baQkxcgt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2B24F85509; Fri, 20 Jan 2023 23:00:23 +0100 (CET) Received: from smtp.delft.diskos.nl (smtp.delft.diskos.nl [45.80.169.141]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6ED9C854DF for ; Fri, 20 Jan 2023 23:00:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=diskos.nl Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=joost@diskos.nl Received: from [10.135.128.1] (smtp.delft.diskos.nl [45.80.169.141]) by smtp.delft.diskos.nl (Postfix) with ESMTPSA id 6F1508F322; Fri, 20 Jan 2023 23:00:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=diskos.nl; s=mail; t=1674252018; bh=k7ZuEokVHwMJe5MRTZje5waLv92ZY2VqCOmiJLDc8X8=; h=Date:From:Subject:To:Cc:In-Reply-To:References:From; b=baQkxcgtOOczepYng8t2h62Shg+rzhk/q21bKyYG4pmcK+UNe2yItOBpI09fot9A3 qSK26Sn//kgdH78q0eMB9OaBrg6PuJHcU4TDwEjjaX6QK99RNE39vdtcwM4K+LXvPW Q+q1mmG7sv0JG++3dYG+UalWpexNI+/+o4WSM2iV1y8gLA+AB2Vg+E7iOsrGulsJ2N T4tZzxMaV89jlr0va/2voMPrDer/BAS8jUQyIXVbXqOuJAasO1FHAjsVwxBm5RzCLo 1dVT1utjB7wtOGNIVsOsSdAn1s2aEPkrkm6+u4fPSSNcjXxo/MPpHRP8gz/XknP9AG RESGfwhhzqwsQ== Date: Fri, 20 Jan 2023 23:00:12 +0100 From: Joost van Zwieten Subject: Re: reset-loop on Odroid U2: cros-ec communications failure To: Simon Glass Cc: u-boot@lists.denx.de Message-Id: In-Reply-To: References: X-Mailer: geary/3.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Fri, Jan 13, 2023 at 11:00, Simon Glass wrote: > Hi Joost, > > On Mon, 9 Jan 2023 at 06:31, Joost van Zwieten > 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. Best, Joost