| Message ID | 20230104191804.259256-1-jagan@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-amarula+bncBD7MFH7A7EEBB5VB26OQMGQE2BVVO3A@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D829C3F1DB for <linux-amarula@patchwork.amarulasolutions.com>; Wed, 4 Jan 2023 20:18:15 +0100 (CET) Received: by mail-pg1-f199.google.com with SMTP id s76-20020a632c4f000000b0049ceb0f185esf8569257pgs.7 for <linux-amarula@patchwork.amarulasolutions.com>; Wed, 04 Jan 2023 11:18:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672859894; cv=pass; d=google.com; s=arc-20160816; b=bF3Wk99K1SAXxLrp7JsGewba4nk1GBUG9IsJwfnC7M6ogsNA7/bps7TnyJFz+MsE8P Pk7rjg33ZVZm1Ds/rJJSLC9rE8FosecNdoV+ryS3uRoqDvZx7hu9jD9i8HyYZ2bxxfJD yBQtjQzTNNUO6VY5GH0glXl+fPe1e3wQFdC1y57sQpw6hTs5CDV3/+ybSepIXLdSrLfj KHv1kumypPgBGH6Mv6ct4+JfsjebcThNgj0IVDd3Svc4V6b1NhC+QiyxmiYPLjtp8q0s zzST8Vccb+SjuwE1HMNZDi+3AlSnjmCHF3zfCJR7KBHsHWBnPxBpC0YfMiX/gcnla975 elEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=kD9WNIdRcBShsldPxOKwAsuRTSR2BSQ9TxRBbb/qsJs=; b=Ub5iDv/xF9l794WXjYZRUeJ3Om4gkwzBca0NXQf8h29HT/R13lMq2F7Q4w/9/8e6V0 1oNuPwTYI0pB1z8yGXqJzKKulpCId46dVD4xFKr9/mIBb5FZpzDDIHXsxdKuS/7tilSB 13NL1rwk82v1PxZ3V/4T2ffvOa7CJreFEC7rrYGCVqMPBFvfIYSSz6ugh5+0LTDj6d5M dBip0hLM1AymduqPYl3QJTlfAAqjTlSed5yi1aEpRRaDfhWCZMT5CDcLwJV2aYiKy2e6 5WcRGwuedr9ur9q73eo4G/ImsK7Dgh5yb7Y2FqJ3snky4xcogh7e0OQqjr0Nq1vwQVdi vvwg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jt0F2aok; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=kD9WNIdRcBShsldPxOKwAsuRTSR2BSQ9TxRBbb/qsJs=; b=e3vxurCvyA7DKJNRx6IurLcBYWCdHttNwl5QqpAq5eelAIrSkO10wQNrSVxJzP45UU /Zp+CVc7DX4t5TwPsqxiNAAh3ZpNQ5VtqzovsSSE3arU8q8LB91D/Ftcstb6Cflh39aQ TVkZ5QNYUl7EmnmWKGTk5rKPwM7SHUMHSLVPA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kD9WNIdRcBShsldPxOKwAsuRTSR2BSQ9TxRBbb/qsJs=; b=7oad4WYaixeckMqL7IzZ8V2Am0fRN+vG5MOACfCU+89XcOWuAQghyoTnf0NrBJXD/a JhUh/A0VHtGM2eFB4Hk6983pnO/QQ5VQfngHE4Fy0Uhsmsz7nWzvR7OhneeyOc0esDsE 3iU31xIsERspanrvAUEcY9km95sPeypr20ZhbN0bmeKSmhnZxtn48tD8kVvjggFhHk+b 5+fLQiYtsn+WhCHkMuuYfqkhejyIvCRfl+CbxmCGqaR8+t3lUDkzn3CFqe/WmWA81RCp d/KpUC6jJxZ9hUPgEpaD4lJ1A+60QkYiM2tmieUIfZfUMzQEGaI5CwYfNfSl1tcjTJ3Z 1OPA== X-Gm-Message-State: AFqh2koeTLwvQboOJ+d0pRRHllQ+onXQDbRd4yRxIbaJb1qSOY0jDKN/ sdw2cv06sVkBAJspVB7WL2eHibJS X-Google-Smtp-Source: AMrXdXvNA1X28+6OvXAYAPr4yv3hRCxPw44zjCGAi6t3/jhyr+Aphl834qWGnamqWJokilIhfCE6QQ== X-Received: by 2002:a62:5f43:0:b0:575:b3f2:5523 with SMTP id t64-20020a625f43000000b00575b3f25523mr3787660pfb.82.1672859894513; Wed, 04 Jan 2023 11:18:14 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6a00:cc4:b0:581:8a74:6ede with SMTP id b4-20020a056a000cc400b005818a746edels4643770pfv.3.-pod-prod-gmail; Wed, 04 Jan 2023 11:18:13 -0800 (PST) X-Received: by 2002:a05:6a00:4096:b0:582:7ec8:16cb with SMTP id bw22-20020a056a00409600b005827ec816cbmr12240154pfb.17.1672859893626; Wed, 04 Jan 2023 11:18:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672859893; cv=none; d=google.com; s=arc-20160816; b=kuAvM7L9oYsd3Xf2FU64Ie88ons2tGqMUDJdtUaiPw18H990fwyyzQglySOLd9Snll NYLGdHMqbg2+eB9h9xORT9RNjjIRKQ2Uz6OV3N1k2cIFcxBfWbFNDMMbHxatNxhZ/QwK 5t/5EtXzxdGYQl2eYV+ci7l4QEXh4xvTR7Tj2j54xj1oaOinPESj8zfD5acOEZejofwW hLF7PHZ7Ik6fXbQz34a75Oha31brUnbrpNwfgtTy0loEx5e/yGok7w8YTvA+1F+Mrxvi EM23j8Bwxvg8c+zX6yFZcfXyAlPPryFRJIB1PH21cGN7xKRbCwCSNsm48IDXgY04+ulh 57fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=RwOyg6CtVDtfp5yJj/L25mumQN9YkkUpU9YshNcch9M=; b=iMi9yxOaoNE5V+GxmZOGfObWHLgMWY6OmwR6WonYA04jRso3LSRotqDcPiUAdm+gME 2EvqQi8Q9nBmF123DxwNmGbNLpl1WuazU1t0t/YiEpEAXvLAegDiPH4QqDxHPHypp/+7 yVvqkz+TiY7voOGmeeo7O7TE2hIh8Jw0XKcB/l4I/VAdf3IBYDn6KZ9O9vDDGsz93goC ftvGi0aYFxBUjqEXF1hY+yaiT6SDCOZ6cHkx3UeJccKtULd7GYdrznWIwz4rkeTZRn4O UuZx1mxyrM9IgaO1+xJ3zb4U16AYlhraMCR32YtU7cbQ8rW8nkPtYEZxVmcRVsxQ7R2d 9qOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jt0F2aok; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id i187-20020a6254c4000000b00574aab493e0sor13732971pfb.41.2023.01.04.11.18.13 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Wed, 04 Jan 2023 11:18:13 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a62:2744:0:b0:581:140:f3b6 with SMTP id n65-20020a622744000000b005810140f3b6mr33396876pfn.34.1672859893219; Wed, 04 Jan 2023 11:18:13 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a15f:f638:8355:8500:b2a7]) by smtp.gmail.com with ESMTPSA id c14-20020a621c0e000000b0056bcb102e7bsm22789490pfc.68.2023.01.04.11.18.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Jan 2023 11:18:12 -0800 (PST) From: Jagan Teki <jagan@amarulasolutions.com> To: Kever Yang <kever.yang@rock-chips.com>, Philipp Tomsich <philipp.tomsich@vrull.eu>, Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com> Cc: u-boot@lists.denx.de, linux-amarula@amarulasolutions.com, Jagan Teki <jagan@amarulasolutions.com>, Quentin Schulz <quentin.schulz@theobroma-systems.com> Subject: [PATCH] arm: rockchip: Fix binman_init failure on RK3568 Date: Thu, 5 Jan 2023 00:48:04 +0530 Message-Id: <20230104191804.259256-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jt0F2aok; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
| Series |
arm: rockchip: Fix binman_init failure on RK3568
|
|
Commit Message
Jagan Teki
Jan. 4, 2023, 7:18 p.m. UTC
For some newer SoCs like RK3568, the Rockchip has not released
any DDR drivers yet so idbloader needs to create manually using
DDR binaries offered by rkbin. This indeed no requirement to
enable TPL in the U-Boot source code.
If we mark TPL disabled and mark BINMAN enabled by default then
there would be an issue of binman_init failure during board
relocation. This is true as binman failed to find the top-level
node like u-boot-tpl here.
Here is the boot issue observed in RK3566 board,
U-Boot 2023.01-rc4-00057-gac2505d463-dirty (Jan 04 2023 - 23:44:18 +0530)
Model: Radxa Compute Module 3(CM3) IO Board
DRAM: 2 GiB
binman_init failed:-2
initcall sequence 000000007ffd2008 failed at call 0000000000a18cac (err=-2)
### ERROR ### Please RESET the board ###
This might be fixed via binman node in rockchip-u-boot.dtsi however
disable binman for rk3568 for now as we are at the end of the release
cycle.
Fixes: 05713d570762 ("rockchip: generate u-boot-rockchip.bin with binman
for ARM64 boards")
Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
arch/arm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Jagan, On 1/4/23 20:18, Jagan Teki wrote: > For some newer SoCs like RK3568, the Rockchip has not released > any DDR drivers yet so idbloader needs to create manually using > DDR binaries offered by rkbin. This indeed no requirement to > enable TPL in the U-Boot source code. > > If we mark TPL disabled and mark BINMAN enabled by default then > there would be an issue of binman_init failure during board > relocation. This is true as binman failed to find the top-level > node like u-boot-tpl here. > > Here is the boot issue observed in RK3566 board, > > U-Boot 2023.01-rc4-00057-gac2505d463-dirty (Jan 04 2023 - 23:44:18 +0530) > > Model: Radxa Compute Module 3(CM3) IO Board > DRAM: 2 GiB > binman_init failed:-2 This function seems to not be called if you do NOT define BINMAN_FDT Kconfig option. Is this something you could check? I see that STM32 boards and some Mediatek ones have this disabled. The benefit would be to still have binman build the images like all other rockchip platforms but let your RK336x board boot properly. I'm wondering what this binman_init is needed for? It seems to me that the functions defined in lib/binman.c are actually used only in x86 platforms? Cheers, Quentin
On 2023/1/5 03:18, Jagan Teki wrote: > For some newer SoCs like RK3568, the Rockchip has not released > any DDR drivers yet so idbloader needs to create manually using > DDR binaries offered by rkbin. This indeed no requirement to > enable TPL in the U-Boot source code. > > If we mark TPL disabled and mark BINMAN enabled by default then > there would be an issue of binman_init failure during board > relocation. This is true as binman failed to find the top-level > node like u-boot-tpl here. > > Here is the boot issue observed in RK3566 board, > > U-Boot 2023.01-rc4-00057-gac2505d463-dirty (Jan 04 2023 - 23:44:18 +0530) > > Model: Radxa Compute Module 3(CM3) IO Board > DRAM: 2 GiB > binman_init failed:-2 > initcall sequence 000000007ffd2008 failed at call 0000000000a18cac (err=-2) > ### ERROR ### Please RESET the board ### > > This might be fixed via binman node in rockchip-u-boot.dtsi however > disable binman for rk3568 for now as we are at the end of the release > cycle. > > Fixes: 05713d570762 ("rockchip: generate u-boot-rockchip.bin with binman > for ARM64 boards") > Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > arch/arm/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index cac4fa09fd..0e7a511c79 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -1934,7 +1934,7 @@ config ARCH_STM32MP > config ARCH_ROCKCHIP > bool "Support Rockchip SoCs" > select BLK > - select BINMAN if SPL_OPTEE || SPL > + select BINMAN if SPL_OPTEE || (SPL && !ROCKCHIP_RK3568) BINMAN should be available only when both TPL and SPL are available. if no TPL, means there is no DDR binary available, so not able to use binman to generate the image. Thanks, - Kever > select DM > select DM_GPIO > select DM_I2C
Hi Kever, On 1/5/23 10:41, Kever Yang wrote: > > On 2023/1/5 03:18, Jagan Teki wrote: >> For some newer SoCs like RK3568, the Rockchip has not released >> any DDR drivers yet so idbloader needs to create manually using >> DDR binaries offered by rkbin. This indeed no requirement to >> enable TPL in the U-Boot source code. >> >> If we mark TPL disabled and mark BINMAN enabled by default then >> there would be an issue of binman_init failure during board >> relocation. This is true as binman failed to find the top-level >> node like u-boot-tpl here. >> >> Here is the boot issue observed in RK3566 board, >> >> U-Boot 2023.01-rc4-00057-gac2505d463-dirty (Jan 04 2023 - 23:44:18 >> +0530) >> >> Model: Radxa Compute Module 3(CM3) IO Board >> DRAM: 2 GiB >> binman_init failed:-2 >> initcall sequence 000000007ffd2008 failed at call 0000000000a18cac >> (err=-2) >> ### ERROR ### Please RESET the board ### >> >> This might be fixed via binman node in rockchip-u-boot.dtsi however >> disable binman for rk3568 for now as we are at the end of the release >> cycle. >> >> Fixes: 05713d570762 ("rockchip: generate u-boot-rockchip.bin with binman >> for ARM64 boards") >> Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com> >> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> >> --- >> arch/arm/Kconfig | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig >> index cac4fa09fd..0e7a511c79 100644 >> --- a/arch/arm/Kconfig >> +++ b/arch/arm/Kconfig >> @@ -1934,7 +1934,7 @@ config ARCH_STM32MP >> config ARCH_ROCKCHIP >> bool "Support Rockchip SoCs" >> select BLK >> - select BINMAN if SPL_OPTEE || SPL >> + select BINMAN if SPL_OPTEE || (SPL && !ROCKCHIP_RK3568) > > BINMAN should be available only when both TPL and SPL are available. > > if no TPL, means there is no DDR binary available, so not able to use > binman to generate > > the image. > Binman can still generate u-boot.itb, u-boot-spl.bin and co. The final u-boot-rockchip.bin won't work indeed, until we fix this in another ifdef madness for cases where TPL/SPL is an external blob and not created by U-Boot. In next release (not 2023.01) I have high hopes we can have fully migrated to binman, which makes me a bit sad we go a step back by disabling it for RK356x :/ But since the release is a question of days now, maybe that's fine, I don't know. You're the maintainer :) Cheers, Quentin
Hi Quentin, On Thu, Jan 5, 2023 at 2:58 PM Quentin Schulz <quentin.schulz@theobroma-systems.com> wrote: > > Hi Jagan, > > On 1/4/23 20:18, Jagan Teki wrote: > > For some newer SoCs like RK3568, the Rockchip has not released > > any DDR drivers yet so idbloader needs to create manually using > > DDR binaries offered by rkbin. This indeed no requirement to > > enable TPL in the U-Boot source code. > > > > If we mark TPL disabled and mark BINMAN enabled by default then > > there would be an issue of binman_init failure during board > > relocation. This is true as binman failed to find the top-level > > node like u-boot-tpl here. > > > > Here is the boot issue observed in RK3566 board, > > > > U-Boot 2023.01-rc4-00057-gac2505d463-dirty (Jan 04 2023 - 23:44:18 +0530) > > > > Model: Radxa Compute Module 3(CM3) IO Board > > DRAM: 2 GiB > > binman_init failed:-2 > > This function seems to not be called if you do NOT define BINMAN_FDT > Kconfig option. Is this something you could check? I see that STM32 > boards and some Mediatek ones have this disabled. The benefit would be > to still have binman build the images like all other rockchip platforms > but let your RK336x board boot properly. I did check by disabling BINMAN_FDT before sending this patch, looks like I have tested with the existing build. Now yes, BINMAN_FDT disabled seems to boot fine. I think it makes sense to disable BINMAN_FDT on respective defconfig as we might move binman in the future. Any comments Kever? Jagan.
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cac4fa09fd..0e7a511c79 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1934,7 +1934,7 @@ config ARCH_STM32MP config ARCH_ROCKCHIP bool "Support Rockchip SoCs" select BLK - select BINMAN if SPL_OPTEE || SPL + select BINMAN if SPL_OPTEE || (SPL && !ROCKCHIP_RK3568) select DM select DM_GPIO select DM_I2C