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 99580C05027 for ; Thu, 26 Jan 2023 19:35:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DF8158554E; Thu, 26 Jan 2023 20:35:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=edgeble.ai 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; unprotected) header.d=edgeble-ai.20210112.gappssmtp.com header.i=@edgeble-ai.20210112.gappssmtp.com header.b="H1kE7lPf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E2846855B5; Thu, 26 Jan 2023 20:35:36 +0100 (CET) Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 450568554E for ; Thu, 26 Jan 2023 20:35:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=edgeble.ai Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jagan@edgeble.ai Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-4a263c4ddbaso38337067b3.0 for ; Thu, 26 Jan 2023 11:35:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=edgeble-ai.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=An7qvXo25HSdjGS6Cb8S8+nGhuQFqW/GyA91uCh8uxA=; b=H1kE7lPfS271l90nItrZxj0nvZuLRRBWYdJsP3KxlODmEWS+/fmzahjR4J3H9lmTcB 62PuH5ZYSY1+1yMhruVHFtJ9KztWsdM/1rEccrqBDALC6DOuuuIRt6xGJV8mZQI69CqW bkB25h6pRsGcZouqfSVz07SZNB+oXP+iDVK98P285gfOvZNyxQxX5f6/YUV1Ge9c0QXP U0UELko6aIZzNT1eIuq7DdrII7xSLk/P9J4BIXGP8UcEbI0NRYOezGThiTQuoB7/zGSz 4AtNB3Y/oqL4fVPHxwQqo57bgci+PGBAPyXrSdkP0SmxNRHA80sM1RDQbrmCiYqroAwN 5N9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=An7qvXo25HSdjGS6Cb8S8+nGhuQFqW/GyA91uCh8uxA=; b=uMRaA3XjyhASiwH/9AQmZ7HBKnxIOuripjV0+1oN1112txDcZN1fJcRVckYgMOKvFq ApHaD9FlTvXmFAVgizU9OsLkubgia9FmOFYDklKBPoo79QN7jNVuNTqp0KKk+8mcFcgw Q1fwDBJcd1pm6+Z+Gxb/UL6pkfRgJJjA1MsTpXuLzuFNnNYnA1OQA/wyCvweD2uPIISg nz9YeRrIfbHLST7TrPol5LdM1Jiq9UeGuTjuV3WXEhMLY5nb9mU4eC5GtgJQoKmIY8Rz AguC6zO0MlAbOWnw0QH1MF3A69336F8ifJPCAet9InU9/1nsfgxGpu+UfF+4AuTyDTZK A3Cw== X-Gm-Message-State: AO0yUKWfWtDx9ZKfxuyxJY6KXYHrvKHXdqp/SaF13Jqf6UjeLVKCS/jW GbTbUGo5jyPXByPl3TOYuie/v1tZl3UWOVHfDMRxCQ== X-Google-Smtp-Source: AK7set+Nnpru3ksLXjOw4VdXy5c/zCQ4vhoFRYeXOkJ0eVNYhH8K91fHYSdbfGAfNZuqurcLoy+XLqrluVl+HizDawE= X-Received: by 2002:a81:6cd6:0:b0:507:b797:f1b with SMTP id h205-20020a816cd6000000b00507b7970f1bmr642807ywc.468.1674761717781; Thu, 26 Jan 2023 11:35:17 -0800 (PST) MIME-Version: 1.0 References: <20230125222741.303259-1-jagan@edgeble.ai> <2efd56b6-4dc9-cd77-3792-e60142faa6ae@kwiboo.se> <64443c40-03b1-bfe2-23fe-ad61236d7dde@kwiboo.se> In-Reply-To: From: Jagan Teki Date: Fri, 27 Jan 2023 01:05:06 +0530 Message-ID: Subject: Re: [RFC PATCH 00/16] arm: Add Rockchip RK3588 support To: Simon Glass Cc: Jonas Karlman , Kever Yang , Philipp Tomsich , fatorangecat@189.cn, u-boot@lists.denx.de Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hi Simon, On Fri, 27 Jan 2023 at 00:45, Simon Glass wrote: > > Hi Jagan, > > On Thu, 26 Jan 2023 at 11:27, Jagan Teki wrote: > > > > Hi Simon, > > > > On Thu, 26 Jan 2023 at 23:34, Simon Glass wrote: > > > > > > Hi Jagan, > > > > > > On Thu, 26 Jan 2023 at 10:42, Jagan Teki wrote: > > > > > > > > On Thu, 26 Jan 2023 at 22:28, Jonas Karlman wrote= : > > > > > > > > > > Hi Jagan, > > > > > On 2023-01-26 17:51, Jagan Teki wrote: > > > > > > Hi Jonas, > > > > > > > > > > > > On Thu, 26 Jan 2023 at 04:17, Jonas Karlman w= rote: > > > > > >> > > > > > >> Hi Jagan, > > > > > >> > > > > > >> On 2023-01-25 23:27, Jagan Teki wrote: > > > > > >>> This series support Rockchip RK3588. All the device tree file= s are > > > > > >>> synced from linux-next with the proper SHA1 mentioned in the = commit > > > > > >>> messages. > > > > > >>> > > > > > >>> Unfortunately, the BL31 from rkbin is not compatible with U-B= oot so > > > > > >>> it is failing to load ATF entry from SPL and hang. > > > > > >>> > > > > > >>> Verified below BL31 versions, > > > > > >>> bl31-v1.15 > > > > > >>> bl31-v1.21 > > > > > >>> bl31-v1.22 > > > > > >>> bl31-v1.23 > > > > > >>> bl31-v1.24 > > > > > >>> bl31-v1.25 > > > > > >>> bl31-v1.26 > > > > > >>> > > > > > >>> Rever-engineered with respect to rockchip u-boot by using the= same > > > > > >>> FIT_GENERATOR being used in Mainline, rockchip u-boot is boot= ing but > > > > > >>> mainline showing the same issue. > > > > > >>> > > > > > >>> Log: > > > > > >>> > > > > > >>> LPDDR4X, 2112MHz01-00642-g6bdfd31756-dirty (Jan 26 2023 =EF= =BF=BD=EF=BF=BD=EF=BF=BD3:44:34 +0530) > > > > > >>> channel[0] BW=3D16 Col=3D10 Bk=3D8 CS0 Row=3D17 CS1 Row=3D17 = CS=3D2 Die BW=3D8 Size=3D4096MB > > > > > >>> channel[1] BW=3D16 Col=3D10 Bk=3D8 CS0 Row=3D17 CS1 Row=3D17 = CS=3D2 Die BW=3D8 Size=3D4096MB > > > > > >>> channel[2] BW=3D16 Col=3D10 Bk=3D8 CS0 Row=3D17 CS1 Row=3D17 = CS=3D2 Die BW=3D8 Size=3D4096MB > > > > > >>> channel[3] BW=3D16 Col=3D10 Bk=3D8 CS0 Row=3D17 CS1 Row=3D17 = CS=3D2 Die BW=3D8 Size=3D4096MB > > > > > >>> change to F1: 528MHz > > > > > >>> change to F2: 1068MHz > > > > > >>> change to F3: 1560MHz > > > > > >>> change to F0: 2112MHz > > > > > >>> out > > > > > >>> > > > > > >>> U-Boot SPL 2023.01-00642-g6bdfd31756-dirty (Jan 26 2023 - 03:= 44:34 +0530) > > > > > >>> Trying to boot from MMC1 > > > > > >>> bl31_entry: atf_entry start > > > > > >>> << hang >> > > > > > >>> > > > > > >>> Any information on BL31 for RK3588 please share. > > > > > >> > > > > > >> I had a similar strange booing issue with RK3568 and mainline = U-Boot, > > > > > >> turned out to be related to all parts of ATF not being properl= y loaded > > > > > >> into PMU SRAM. > > > > > >> > > > > > >> Using my series at [1] I managed to get ATF to be fully loaded= into > > > > > >> PMU SRAM. Using CONFIG_SPL_FIT_SIGNATURE=3Dy helped me finding= out that > > > > > >> the segment being loaded ended up corrupted. > > > > > >> > > > > > >> The use of 512 bytes alignment of the FIT helped mitigate that= issue. > > > > > >> Vendor U-Boot use a bounce buffer for all parts that is writte= n into > > > > > >> SRAM (anything loaded outside the gd->ram_base to gd->ram_top = range). > > > > > >> > > > > > >> You can also find newer bl31 at [2], up to version v1.32. > > > > > >> > > > > > >> [1] https://patchwork.ozlabs.org/project/uboot/list/?series=3D= 337891>>> [2] https://gitlab.com/rk3588_linux/rk/rkbin/-/tree/linux-5.10-ge= n-rkr3.5/bin/rk35>> > > > > > > Thanks for the details. I did apply this set on the master. No = change > > > > > > in the behavior, used BL31 and ddr from [2] as well as in > > > > > > rkbin/master. > > > > > > > > > > I did some tests on my Radxa ROCK 3 Model B with CONFIG_SPL_FIT_S= IGNATURE=3Dy > > > > > and it looked like it failed to read data into memory, see below. > > > > > > > > > > It also looks like the sdhci compatible is not supported by the d= river. > > > > > Something that may need to be added to driver to properly read da= ta? > > > > > > > > > > > > > > > DDR V1.09 a930779e06 typ 22/11/21-17:50:56 > > > > > LPDDR4X, 2112MHz > > > > > channel[0] BW=3D16 Col=3D10 Bk=3D8 CS0 Row=3D16 CS1 Row=3D16 CS= =3D2 Die BW=3D16 Size=3D2048MB > > > > > channel[1] BW=3D16 Col=3D10 Bk=3D8 CS0 Row=3D16 CS1 Row=3D16 CS= =3D2 Die BW=3D16 Size=3D2048MB > > > > > channel[2] BW=3D16 Col=3D10 Bk=3D8 CS0 Row=3D16 CS1 Row=3D16 CS= =3D2 Die BW=3D16 Size=3D2048MB > > > > > channel[3] BW=3D16 Col=3D10 Bk=3D8 CS0 Row=3D16 CS1 Row=3D16 CS= =3D2 Die BW=3D16 Size=3D2048MB > > > > > Manufacturer ID:0x6 > > > > > CH0 RX Vref:31.7%, TX Vref:21.8%,20.8% > > > > > CH1 RX Vref:31.7%, TX Vref:21.8%,21.8% > > > > > CH2 RX Vref:32.7%, TX Vref:22.8%,21.8% > > > > > CH3 RX Vref:32.7%, TX Vref:21.8%,20.8% > > > > > change to F1: 528MHz > > > > > change to F2: 1068MHz > > > > > change to F3: 1560MHz > > > > > change to F0: 2112MHz > > > > > out > > > > > > > > > > U-Boot SPL 2023.01 (Jan 26 2023 - 00:24:53 +0000) > > > > > Trying to boot from MMC1 > > > > > ## Checking hash(es) for config config_1 ... OK > > > > > ## Checking hash(es) for Image atf_1 ... sha256 error! > > > > > Bad hash value for 'hash' hash node in 'atf_1' image node > > > > > mmc_load_image_raw_sector: mmc block read error > > > > > Trying to boot from MMC1 > > > > > ## Checking hash(es) for config config_1 ... OK > > > > > ## Checking hash(es) for Image atf_1 ... sha256 error! > > > > > Bad hash value for 'hash' hash node in 'atf_1' image node > > > > > > > > Look like this is something wrong with your patch series or master > > > > changes on binman, not with the driver. I have observed the same if= I > > > > enable CONFIG_SPL_FIT_SIGNATURE. > > > > > > There are some more changes in dm/master that I'm about to pull in. > > > One of them from Jonas Karlman adds hash nodes so may be involved. > > > > I found the same issue on the dm/master > > > > U-Boot SPL 2023.01-00176-gb21fb7a9c0 (Jan 26 2023 - 23:55:11 +0530) > > Trying to boot from MMC1 > > ## Checking hash(es) for config config-1 ... OK > > ## Checking hash(es) for Image atf-1 ... sha256 error! > > Bad hash value for 'hash' hash node in 'atf-1' image node > > mmc_load_image_raw_sector: mmc block read error > > SPL: failed to boot from all boot devices > > ### ERROR ### Please RESET the board ### > > Is the FIT image broken? You can use check_sign or dump_image to see. This seems okay, let me know if you see any issue. > ./tools/fit_check_sign -f u-boot.itb -k arch/arm/dts/rk3588-edgeble-neu6a= -io.dtb Verifying Hash Integrity for node 'config-1'... Verified OK, loading images ## Loading kernel from FIT Image at 7f98532c7000 ... Using 'config-1' configuration Verifying Hash Integrity ... OK Could not find subimage node type 'kernel' ## Loading fdt from FIT Image at 7f98532c7000 ... Using 'config-1' configuration Verifying Hash Integrity ... OK Trying 'fdt-1' fdt subimage Description: fdt-rk3588-edgeble-neu6a-io Created: Fri Jan 27 01:01:31 2023 Type: Flat Device Tree Compression: uncompressed Data Size: 41408 Bytes =3D 40.44 KiB =3D 0.04 MiB Architecture: Unknown Architecture Hash algo: sha256 Hash value: a5de5505624412d216c6e985fb3669e84785b3675765bc85f08d8b0dbeffdbd7 Verifying Hash Integrity ... sha256+ OK Decrypting Data ... OK Loading Flat Device Tree ## Loading ramdisk from FIT Image at 7f98532c7000 ... Using 'config-1' configuration Verifying Hash Integrity ... OK Could not find subimage node type 'ramdisk' Signature check OK Thanks, Jagan.