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 25A53C05027 for ; Thu, 26 Jan 2023 23:43:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DB17E856C7; Fri, 27 Jan 2023 00:43:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=kwiboo.se 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=kwiboo.se header.i=@kwiboo.se header.b="XXVdjPrn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5A193856E7; Fri, 27 Jan 2023 00:43:50 +0100 (CET) Received: from wrqvxttq.outbound-mail.sendgrid.net (wrqvxttq.outbound-mail.sendgrid.net [149.72.167.116]) (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 92D858560A for ; Fri, 27 Jan 2023 00:43:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=mime-version:subject:from:references:in-reply-to:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=77an3zmipwDsIdURfS3CtEdPtqy3V/a/wtJAU5PCk4w=; b=XXVdjPrnIY/6r6bgugSijZgiURVSxtqnZ+UZMAwl/J+gXGMf+Y8KglJVOO0HCDiyg4X4 t0rU4XYTGvEFYwFwUGi/t38fF2UA21Ad5JwkNrahWqYbmiB7fUGj70Uvb3u+UZ1ep66/Rx KXF3TSmICLlKvuAG0cHACoA+8eKy1bCWGIsuD4ci33DK7RO5HB6PO2bV7/PhAjPp1I0y3K aTy4i89cOvCfCXozzL/UpPNDDnxGknFIODDGFgAYZtU6kI9FBNde6tdxyDbOBy6nlUavje 4VZPb0V40HCAO72vseaXNzEZsQ3S7M/PkS6Eec/Xopb6E8soRMLFOhFzd0bTM45g== Received: by filterdrecv-6c4ccfbdd8-vlc7h with SMTP id filterdrecv-6c4ccfbdd8-vlc7h-1-63D3102E-1 2023-01-26 23:43:42.188165714 +0000 UTC m=+6050286.286677674 Received: from [192.168.1.50] (unknown) by geopod-ismtpd-5-1 (SG) with ESMTP id 9n3qumaNSoylap6ceKC1aA Thu, 26 Jan 2023 23:43:41.635 +0000 (UTC) Message-ID: <7f4bdd74-c2df-0c8e-2527-b192040d3977@kwiboo.se> Date: Thu, 26 Jan 2023 23:43:42 +0000 (UTC) MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [RFC PATCH 00/16] arm: Add Rockchip RK3588 support Content-Language: en-US From: Jonas Karlman References: <20230125222741.303259-1-jagan@edgeble.ai> <2efd56b6-4dc9-cd77-3792-e60142faa6ae@kwiboo.se> <64443c40-03b1-bfe2-23fe-ad61236d7dde@kwiboo.se> <516c84b9-4867-b2ea-46ad-30decc62194a@kwiboo.se> <1e370ab2-8407-b724-2afd-24ddb23c638c@kwiboo.se> In-Reply-To: <1e370ab2-8407-b724-2afd-24ddb23c638c@kwiboo.se> X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h9Qkumz6JMv2R11KR?= =?us-ascii?Q?Iw2P6IY3+srQcCPTkjo1uVc4uO4Fu28qVeA1IsR?= =?us-ascii?Q?hztaQxOAuhbyjkP6l=2F5zwkZ9qIp53GH00SribLS?= =?us-ascii?Q?jGALcR=2F0SKUrUCPrDqliduyJeEp10H9e5NQnqdD?= =?us-ascii?Q?Ir7jiQkv3mIrtFmRNgDa1IfA7pX4LQxJgEkjgy?= To: Jagan Teki Cc: Simon Glass , Kever Yang , Philipp Tomsich , fatorangecat@189.cn, u-boot@lists.denx.de X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 2023-01-26 23:16, Jonas Karlman wrote: > Hi Jagan, > On 2023-01-26 20:17, Jagan Teki wrote: >> On Fri, 27 Jan 2023 at 00:33, Jonas Karlman wrote: >>> >>> On 2023-01-26 19:26, 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 wrote: >>>>>>>>> >>>>>>>>> Hi Jagan, >>>>>>>>> >>>>>>>>> On 2023-01-25 23:27, Jagan Teki wrote: >>>>>>>>>> This series support Rockchip RK3588. All the device tree files are >>>>>>>>>> synced from linux-next with the proper SHA1 mentioned in the commit >>>>>>>>>> messages. >>>>>>>>>> >>>>>>>>>> Unfortunately, the BL31 from rkbin is not compatible with U-Boot 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 booting but >>>>>>>>>> mainline showing the same issue. >>>>>>>>>> >>>>>>>>>> Log: >>>>>>>>>> >>>>>>>>>> LPDDR4X, 2112MHz01-00642-g6bdfd31756-dirty (Jan 26 2023 ���3:44:34 +0530) >>>>>>>>>> channel[0] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB >>>>>>>>>> channel[1] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB >>>>>>>>>> channel[2] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB >>>>>>>>>> channel[3] BW=16 Col=10 Bk=8 CS0 Row=17 CS1 Row=17 CS=2 Die BW=8 Size=4096MB >>>>>>>>>> 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 properly 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=y 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 written 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=337891 [2] https://gitlab.com/rk3588_linux/rk/rkbin/-/tree/linux-5.10-gen-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_SIGNATURE=y >>>>>>> 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 driver. >>>>>>> Something that may need to be added to driver to properly read data? >>>>>>> >>>>>>> >>>>>>> DDR V1.09 a930779e06 typ 22/11/21-17:50:56 >>>>>>> LPDDR4X, 2112MHz >>>>>>> channel[0] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB >>>>>>> channel[1] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB >>>>>>> channel[2] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB >>>>>>> channel[3] BW=16 Col=10 Bk=8 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=2048MB >>>>>>> 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 ### >>> >>> On my RK3568 ROCK 3A board this is working correctly, see below. >>> >>> This was using u-boot master 17e8e58fe62c019b2cc26af221b6defc3368229f >>> with a few patches on top, see [1]. >>> >>> ------------- >>> U-Boot SPL 2023.01 (Jan 26 2023 - 18:29:56 +0000) >>> Trying to boot from MMC1 >>> ## Checking hash(es) for config config-1 ... OK >>> ## Checking hash(es) for Image atf-1 ... sha256+ OK >>> ## Checking hash(es) for Image u-boot ... sha256+ OK >>> ## Checking hash(es) for Image fdt-1 ... sha256+ OK >>> ## Checking hash(es) for Image atf-2 ... sha256+ OK >>> ## Checking hash(es) for Image atf-3 ... sha256+ OK >>> ## Checking hash(es) for Image atf-4 ... sha256+ OK >>> ## Checking hash(es) for Image atf-5 ... sha256+ OK >>> ## Checking hash(es) for Image atf-6 ... sha256+ OK >>> INFO: Preloader serial: 2 >>> NOTICE: BL31: v2.3():v2.3-460-g2c8be93f9:huan.he >>> NOTICE: BL31: Built : 19:45:17, Nov 8 2022 >>> INFO: GICv3 without legacy support detected. >>> INFO: ARM GICv3 driver initialized in EL3 >>> INFO: pmu v1 is valid 220114 >>> INFO: dfs DDR fsp_param[0].freq_mhz= 1560MHz >>> INFO: dfs DDR fsp_param[1].freq_mhz= 324MHz >>> INFO: dfs DDR fsp_param[2].freq_mhz= 528MHz >>> INFO: dfs DDR fsp_param[3].freq_mhz= 780MHz >>> INFO: Using opteed sec cpu_context! >>> INFO: boot cpu mask: 0 >>> INFO: BL31: Initializing runtime services >>> WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK >>> ERROR: Error initializing runtime service opteed_fast >>> INFO: BL31: Preparing for EL3 exit to normal world >>> INFO: Entry point address = 0xa00000 >>> INFO: SPSR = 0x3c9 >>> >>> >>> U-Boot 2023.01 (Jan 26 2023 - 18:29:56 +0000) >>> >>> Model: Rockchip RK3568 EVB1 DDR4 V10 Board >>> DRAM: 8 GiB (effective 7.7 GiB) >>> Core: 58 devices, 17 uclasses, devicetree: separate >>> MMC: mmc@fe2b0000: 1, mmc@fe310000: 0 >>> ... >>> ------------- >>> >>> However, on my RK3588 ROCK 5B device I get a similar error you get. >>> Seems to be the mmc reading that times out all of sudden. >>> >>> It can read the FIP and config, and then some mmc command/transfer times out. >>> See below for details with LOG_DEBUG defined at top of include/log.h >>> >>> This was trying to boot from a SD-card, trying to use eMMC fails earlier. >>> Because there is no driver for emmc compatible, SPL only tries to boot from SD-card. >>> >>> I believe this is related to your << hang >>, reading atf >>> from mmc fails in the background and there is no error message. >>> >>> That is why I suggested trying with CONFIG_SPL_FIT_SIGNATURE=y, >>> to see if there is any hidden issue trying to load ATF. >>> >>> ------------- >>> Trying to boot from MMC1 >>> ## Checking hash(es) for config config-1 ... OK >>> mmc_load_image_raw_sector: mmc block read error >>> Trying to boot from MMC1 >>> mmc_load_image_raw_sector: mmc block read error >>> SPL: failed to boot from all boot devices >>> ### ERROR ### Please RESET the board ### >>> ------------- >>> Trying to boot from MMC1 >>> 0 >>> - 0 'mmc@fe2c0000' >>> - found >>> blk_find_device: uclass_id=67, devnum=0: mmc@fe2c0000.blk, 67, 0 >>> clock is disabled (0Hz) >>> Buswidth = 0, clock: 0 >>> Buswidth = 1, clock: 0 >>> clock is enabled (400000Hz) >>> Buswidth = 1, clock: 400000 >>> Sending CMD0 >>> Sending CMD8 >>> Sending CMD55 >>> Sending CMD41 >>> Sending CMD55 >>> Sending CMD41 >>> Sending CMD2 >>> Sending CMD3 >>> Sending CMD9 >>> Sending CMD7 >>> Sending CMD55 >>> Sending CMD51 >>> Sending CMD6 >>> Sending CMD55 >>> Sending CMD6 >>> Buswidth = 4, clock: 400000 >>> Sending CMD6 >>> clock is enabled (50000000Hz) >>> Buswidth = 4, clock: 50000000 >>> clk_set_rate(clk=500000, rate=50000000) >>> rockchip_dwmmc_get_mmc_clk: err=-2 >>> spl: mmc boot mode: raw >>> blk_find_device: uclass_id=67, devnum=0: mmc@fe2c0000.blk, 67, 0 >>> Sending CMD16 >>> Sending CMD17 >>> hdr read sector 4000, count=1 >>> Found FIT >>> size=a00, ptr=ac0, limit=100000: aligned to 5000c0 >>> blk_find_device: uclass_id=67, devnum=0: mmc@fe2c0000.blk, 67, 0 >>> Sending CMD16 >>> Sending CMD18 >>> Sending CMD12 >>> fit read sector 4000, sectors=5, dst=5000c0, count=5, size=0xa00 >>> Selecting default config 'rk3588-evb.dtb' >>> ## Checking hash(es) for config config-1 ... fit_config_verify_required_keys: No signature node found: FDT_ERR_NOTFOUND >>> OK >>> firmware: 'atf-1' >>> blk_find_device: uclass_id=67, devnum=0: mmc@fe2c0000.blk, 67, 0 >>> Sending CMD16 >>> Sending CMD18 >>> dwmci_data_transfer: Timeout waiting for data! >>> mmc_load_image_raw_sector: mmc block read error >>> spl: mmc boot mode: fs >>> Trying to boot from MMC1 >>> 0 >>> - 0 'mmc@fe2c0000' >>> - found >>> blk_find_device: uclass_id=67, devnum=0: mmc@fe2c0000.blk, 67, 0 >>> spl: mmc boot mode: raw >>> blk_find_device: uclass_id=67, devnum=0: mmc@fe2c0000.blk, 67, 0 >>> Sending CMD16 >>> dwmci_send_cmd: Response Timeout. >>> hdr read sector 4000, count=0 >>> mmc_load_image_raw_sector: mmc block read error >>> spl: mmc boot mode: fs >>> SPL: failed to boot from all boot devices >>> ### ERROR ### Please RESET the board ### >> >> I'm thinking this is fit/binman issue rather than mmc. >> >> U-Boot SPL 2023.01-00176-gb21fb7a9c0-dirty (Jan 27 2023 - 00:43:52 +0530) >> SPL malloc() before relocation used 0xbe0 bytes (2 KB) >>>> SPL: board_init_r() >> spl_init >> size=a0, ptr=a0, limit=100000: 500000 >> size=8, ptr=a8, limit=100000: 5000a0 >> fdtdec_get_addr_size_auto_parent: na=2, ns=2, >> fdtdec_get_addr_size_fixed: reg: addr=00000000x >> ofnode_read_u32_index: bus-width: x (4) >> ofnode_read_bool: non-removable: false >> ofnode_read_u32_index: fifo-depth: x (256) >> ofnode_read_bool: fifo-mode: false >> ofnode_read_bool: u-boot,spl-fifo-mode: false >> ofnode_read_u32_array: clock-freq-min-max: fdtdec_get_int_array: >> clock-freq-min-max >> get_prop_check_min_len: clock-freq-min-max >> ofnode_read_u32_index: max-frequency: x (200000000) >> clk_set_defaults(mmc@fe2c0000) >> clk_set_default_parents: could not read assigned-clock-parents for 3f60700 >> ofnode_read_prop: assigned-clock-rates: >> fdtdec_get_int: #clock-cells: x (1) >> fdtdec_get_int: #clock-cells: x (1) >> Looking for clock-controller@fd7c0000 >> Looking for clock-controller@fd7c0000 >> - checking clock-1 >> - checking clock-controller@fd7c0000 >> - result for clock-controller@fd7c0000: clock-controller@fd7c0000 (ret=0) >> - result for clock-controller@fd7c0000: clock-controller@fd7c0000 (ret=0) >> clk_of_xlate_default(clk=500000) >> clk_request(dev=3f60320, clk=500000) >> clk_set_rate(clk=500000, rate=400000) >> rockchip_dwmmc_get_mmc_clk: err=-2 >> Trying to boot from MMC1 >> 0 >> - 0 'mmc@fe2c0000' >> - found >> blk_find_device: uclass_id=67, devnum=0: mmc@fe2c0000.blk, 67, 0 >> clock is disabled (0Hz) >> Buswidth = 0, clock: 0 >> Buswidth = 1, clock: 0 >> clock is enabled (400000Hz) >> Buswidth = 1, clock: 400000 >> Sending CMD0 >> Sending CMD8 >> Sending CMD55 >> Sending CMD41 >> Sending CMD55 >> Sending CMD41 >> Sending CMD55 >> Sending CMD41 >> Sending CMD2 >> Sending CMD3 >> Sending CMD9 >> Sending CMD7 >> Sending CMD55 >> Unaligned buffer length u >> size=40, ptr=100, limit=100000: aligned to 5000c0 >> Sending CMD51 >> Sending CMD6 >> Sending CMD55 >> Sending CMD6 >> Buswidth = 4, clock: 400000 >> Sending CMD6 >> clock is enabled (50000000Hz) >> Buswidth = 4, clock: 50000000 >> clk_set_rate(clk=500000, rate=50000000) >> rockchip_dwmmc_get_mmc_clk: err=-2 >> spl: mmc boot mode: raw >> blk_find_device: uclass_id=67, devnum=0: mmc@fe2c0000.blk, 67, 0 >> Sending CMD16 >> Sending CMD17 >> hdr read sector 4000, count=1 >> Found FIT >> size=a00, ptr=b00, limit=100000: aligned to 500100 >> blk_find_device: uclass_id=67, devnum=0: mmc@fe2c0000.blk, 67, 0 >> Sending CMD16 >> Sending CMD18 >> Sending CMD12 >> fit read sector 4000, sectors=5, dst=500100, count=5, size=0xa00 >> Selecting default config 'rk3588-edgeble-neu6a-io.dtb' >> ## Checking hash(es) for config config-1 ... >> fit_config_verify_required_keys: No signature node found: >> FDT_ERR_NOTFOUND >> OK >> firmware: 'atf-1' >> blk_find_device: uclass_id=67, devnum=0: mmc@fe2c0000.blk, 67, 0 >> Sending CMD16 >> Sending CMD18 >> dwmci_data_transfer: Timeout waiting for data! >> Sending CMD12 >> External data: dst=40000, offset=ad200, size=2e940 >> ## Checking hash(es) for Image atf-1 ... >> fit_image_verify_required_sigs: No signature node found: >> FDT_ERR_NOTFOUND >> sha256 error! >> Bad hash value for 'hash' hash node in 'atf-1' image node >> mmc_load_image_raw_sector: mmc block read error >> spl: mmc boot mode: fs >> SPL: failed to boot from all boot devices >> ### ERROR ### Please RESET the board ### > > As you can see in the logs above there is timeout waiting for data. > > I managed to find the issue and have a workaround that gets me longer > in the boot process, there still seem to be other issue with the rk3588 > startup. > > -------- > U-Boot SPL 2023.01 (Jan 26 2023 - 22:03:00 +0000) > Trying to boot from MMC1 > ## Checking hash(es) for config config-1 ... OK > ## Checking hash(es) for Image atf-1 ... sha256+ OK > ## Checking hash(es) for Image u-boot ... sha256+ OK > ## Checking hash(es) for Image fdt-1 ... sha256+ OK > ## Checking hash(es) for Image atf-2 ... sha256+ OK > ## Checking hash(es) for Image atf-3 ... sha256+ OK > INFO: Preloader serial: 2 > NOTICE: BL31: v2.3():v2.3-468-ge529a2760:derrick.huang > NOTICE: BL31: Built : 09:59:49, Nov 21 2022 > INFO: spec: 0x1 > INFO: ext 32k is not valid > INFO: ddr: stride-en 4CH > INFO: GICv3 without legacy support detected. > INFO: ARM GICv3 driver initialized in EL3 > INFO: valid_cpu_msk=0xff bcore0_rst = 0x0, bcore1_rst = 0x0 > INFO: system boots from cpu-hwid-0 > INFO: idle_st=0x21fff, pd_st=0x11fff9, repair_st=0xfff70001 > INFO: dfs DDR fsp_params[0].freq_mhz= 2112MHz > INFO: dfs DDR fsp_params[1].freq_mhz= 528MHz > INFO: dfs DDR fsp_params[2].freq_mhz= 1068MHz > INFO: dfs DDR fsp_params[3].freq_mhz= 1560MHz > INFO: BL31: Initialising Exception Handling Framework > INFO: BL31: Initializing runtime services > WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK > ERROR: Error initializing runtime service opteed_fast > INFO: BL31: Preparing for EL3 exit to normal world > INFO: Entry point address = 0xa00000 > INFO: SPSR = 0x3c9 > "Synchronous Abort" handler, esr 0x96000000 > elr: 0000000000a23650 lr : 0000000000a24d9c > x0 : 0000000000b7fbe8 x1 : 350003402a0003f3 > x2 : 0000000000000000 x3 : 0000000000b80ff0 > x4 : 0000000000b80ff0 x5 : 0000000000b80e88 > x6 : 0000000000000054 x7 : 0000000000000044 > x8 : 000000000000000a x9 : 0000000000000000 > x10: 0000000000000034 x11: 0000000000000002 > x12: 0000000000001988 x13: 0000000000b7fadc > x14: 0000000000a7e808 x15: 0000000000a7e808 > x16: 0000000000000000 x17: 0000000000000000 > x18: 0000000000b7fe50 x19: 0000000000b7fbe8 > x20: 000000003c14dc00 x21: 000000003c14dc00 > x22: 0000000000a7e808 x23: 0000000000000000 > x24: 0000000000000000 x25: 0000000000000000 > x26: 0000000000000000 x27: 0000000000000000 > x28: 0000000000000000 x29: 0000000000b7fb80 > > Code: f90013f5 f9400001 b4000201 f9400021 (f9403435) > Resetting CPU ... > -------- > > This was running on top of u-boot-dm/master 060a65e899859dcbf42049a18be20ce7118e7c0e > with some rk3568 patches and this series, see [1]. > > The last 3 commits contains workaround to issue with sdmmc clock. > dwmmc driver set sclk to (uint)-2, my workaround just adds a > fallback to default 400khz clock. > > Next issue is the sync abort, looks it happens when u-boot > tries to set clock rates based on devicetree. this is the > last debug line before the crash. > > clk_set_rate(clk=0000000000b7fba8, rate=1008000000) With the commit at [2] I can now successfully run U-Boot proper. Source of the two main issues to get this series to run have been the scmi clocks. Vendor u-boot first load its scmi driver before trying to set the cpu clocks. We can just remove it and leave setting a faster cpu rate to linux. I also noticed that my sdram size series only detect the first two channels of memory, will respin a v2 of that series to add detection of all 4 channels of memory. [2] https://github.com/Kwiboo/u-boot-rockchip/commit/7e4fee945e725c0ec9ef3905c41ce367e77833b3 Regards, Jonas > > [1] https://github.com/Kwiboo/u-boot-rockchip/compare/060a65e899859dcbf42049a18be20ce7118e7c0e...be21c34067d6e3a2036ce70d571700170c59d270 > > Regards, > Jonas > >> >> Please check this repo, it is on top of the dm/master >> https://github.com/edgeble/u-boot/tree/neu6-v1 >> >> Jagan. >