From: Jonas Karlman <jonas@kwiboo.se>
To: Quentin Schulz <quentin.schulz@theobroma-systems.com>,
Simon Glass <sjg@chromium.org>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Kever Yang <kever.yang@rock-chips.com>,
Joseph Chen <chenjh@rock-chips.com>,
Alper Nebi Yasak <alpernebiyasak@gmail.com>
Cc: Jagan Teki <jagan@edgeble.ai>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
u-boot@lists.denx.de
Subject: Re: [PATCH 2/3] rockchip: Require an external TPL binary when TPL is missing
Date: Mon, 06 Feb 2023 12:51:26 +0000 (UTC) [thread overview]
Message-ID: <a91cc82d-fa97-16ee-e2c7-f0e1a92b2def@kwiboo.se> (raw)
In-Reply-To: <7dfdb217-71fe-a89e-0268-f9efb8941de8@theobroma-systems.com>
Hi Quentin,
On 2023-02-06 12:26, Quentin Schulz wrote:
> Hi Jonas,
>
> On 2/5/23 21:21, Jonas Karlman wrote:
>> Rockchip SoCs typically use U-Boot TPL to initialize DRAM, then jumps
>> back to boot-rom to load the next stage of the boot flow, U-Boot SPL.
>>
>> For RK356x there is currently no support to initialize DRAM using U-Boot
>> TPL and instead an external TPL binary must be used to generate a
>> working u-boot-rockchip.bin image.
>>
>> Use the new external-tpl entry unless CONFIG_TPL=y to indicate that an
>> external TPL binary must be provided to generate a working firmware.
>>
>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>> ---
>> Makefile | 1 +
>> arch/arm/dts/rockchip-u-boot.dtsi | 16 ++++++++++++----
>> tools/binman/missing-blob-help | 5 +++++
>> 3 files changed, 18 insertions(+), 4 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 7eaf45496c1c..7e9272be937f 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1332,6 +1332,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
>> -a opensbi-path=${OPENSBI} \
>> -a default-dt=$(default_dt) \
>> -a scp-path=$(SCP) \
>> + -a external-tpl-path=$(EXTERNAL_TPL) \
>> -a spl-bss-pad=$(if $(CONFIG_SPL_SEPARATE_BSS),,1) \
>> -a tpl-bss-pad=$(if $(CONFIG_TPL_SEPARATE_BSS),,1) \
>> -a spl-dtb=$(CONFIG_SPL_OF_REAL) \
>> diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi
>> index 6c662a72d4f9..bc3bc9bc3e37 100644
>> --- a/arch/arm/dts/rockchip-u-boot.dtsi
>> +++ b/arch/arm/dts/rockchip-u-boot.dtsi
>> @@ -20,12 +20,16 @@
>> mkimage {
>> filename = "idbloader.img";
>> args = "-n", CONFIG_SYS_SOC, "-T", "rksd";
>> -#ifdef CONFIG_TPL
>> multiple-data-files;
>>
>> +#ifdef CONFIG_TPL
>> u-boot-tpl {
>> - };
>> +#else
>> + external-tpl {
>> + filename = "ddr.bin";
>> + missing-msg = "external-tpl-rockchip";
>> #endif
>> + };
>
> NACK. This forces the use of a TPL (either built by U-Boot or external)
> which is not always the case. There are still boards without a TPL which
> work perfectly fine (at least I would hope so :) ).
>
> Basically there are three possible cases:
> SPL
> TPL+SPL
> TPL(external blob)+SPL
>
> Here you remove the ability to have SPL only.
>
> Hence why I suggested we add a new Kconfig option for EXTERNAL_TPL, not
> for the path but to explicit this third possibility.
Thanks for the feedback, I will add a Kconfig option to make this explicit.
We could also add the optional prop in the external-tpl node to only include
the external TPL when it is provided. This will require also fixing the
missing/optional handling for the mkimage entry.
Regards,
Jonas
>
> Cheers,
> Quentin
>
>> u-boot-spl {
>> };
>> };
>> @@ -134,12 +138,16 @@
>> mkimage {
>> filename = "idbloader-spi.img";
>> args = "-n", CONFIG_SYS_SOC, "-T", "rkspi";
>> -#ifdef CONFIG_TPL
>> multiple-data-files;
>>
>> +#ifdef CONFIG_TPL
>> u-boot-tpl {
>> - };
>> +#else
>> + external-tpl {
>> + filename = "ddr.bin";
>> + missing-msg = "external-tpl-rockchip";
>> #endif
>> + };
>> u-boot-spl {
>> };
>> };
>> diff --git a/tools/binman/missing-blob-help b/tools/binman/missing-blob-help
>> index c61ca02a35ee..e850824032dd 100644
>> --- a/tools/binman/missing-blob-help
>> +++ b/tools/binman/missing-blob-help
>> @@ -14,6 +14,11 @@ atf-bl31-sunxi:
>> Please read the section on ARM Trusted Firmware (ATF) in
>> board/sunxi/README.sunxi64
>>
>> +external-tpl-rockchip:
>> +External TPL is required to initialize DRAM. Get external TPL binary and
>> +build with EXTERNAL_TPL=/path/to/ddr.bin. One possible source for
>> +external TPL binary is https://urldefense.com/v3/__https://github.com/rockchip-linux/rkbin__;!!OOPJP91ZZw!jRwonQRHKoxzegx3S3cRYfalkhW1ESLyBCTmVc2c6fnmPaQBOZyxG2I7phwM3pEZxR2QIHQG8Hw3JStyx4tDcMsalwYDCg$ .
>> +
>> scp-sunxi:
>> SCP firmware is required for system suspend, but is otherwise optional.
>> Please read the section on SCP firmware in board/sunxi/README.sunxi64
next prev parent reply other threads:[~2023-02-06 12:51 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-05 20:21 [PATCH 0/3] rockchip: Use external TPL binary to create a working firmware image Jonas Karlman
2023-02-05 20:21 ` [PATCH 1/3] binman: Add support for an external-tpl entry Jonas Karlman
2023-02-07 4:02 ` Simon Glass
2023-02-05 20:21 ` [PATCH 2/3] rockchip: Require an external TPL binary when TPL is missing Jonas Karlman
2023-02-05 20:28 ` Jagan Teki
2023-02-05 20:34 ` Jonas Karlman
2023-02-06 11:26 ` Quentin Schulz
2023-02-06 12:51 ` Jonas Karlman [this message]
2023-02-14 3:45 ` Kever Yang
2023-02-14 10:52 ` Jonas Karlman
2023-02-08 15:41 ` Kever Yang
2023-02-08 16:06 ` Quentin Schulz
2023-02-14 3:42 ` Kever Yang
2023-02-07 4:02 ` Simon Glass
2023-02-05 20:21 ` [PATCH 3/3] Revert "board: rockchip: Fix binman_init failure on EVB-RK3568" Jonas Karlman
2023-02-07 4:02 ` Simon Glass
2023-02-07 4:02 ` [PATCH 0/3] rockchip: Use external TPL binary to create a working firmware image Simon Glass
2023-02-08 14:53 ` Jonas Karlman
2023-02-14 10:33 ` [PATCH v2 0/5] " Jonas Karlman
2023-02-14 10:33 ` [PATCH v2 1/6] binman: Add support for a rockchip-tpl entry Jonas Karlman
2023-02-14 19:48 ` Simon Glass
2023-02-14 20:35 ` Jonas Karlman
2023-02-16 7:50 ` Kever Yang
2023-02-16 11:26 ` Eugen Hristev
2023-02-16 14:02 ` Jonas Karlman
2023-02-14 10:33 ` [PATCH v2 2/6] rockchip: Use an external TPL binary on RK3568 Jonas Karlman
2023-02-14 19:48 ` Simon Glass
2023-02-15 9:54 ` Jonas Karlman
2023-02-16 7:51 ` Kever Yang
2023-02-16 9:06 ` Jagan Teki
2023-02-14 10:33 ` [PATCH v2 3/6] Revert "board: rockchip: Fix binman_init failure on EVB-RK3568" Jonas Karlman
2023-02-16 7:51 ` Kever Yang
2023-02-14 10:33 ` [PATCH v2 4/6] rockchip: mkimage: Update init size limit Jonas Karlman
2023-02-16 7:59 ` Kever Yang
2023-02-16 14:36 ` Jonas Karlman
2023-02-14 10:33 ` [PATCH v2 5/6] rockchip: evb-rk3568: Update defconfig Jonas Karlman
2023-02-14 10:34 ` [PATCH v2 6/6] RFC: binman: Improve allow missing for mkimage entry Jonas Karlman
2023-02-14 19:48 ` Simon Glass
2023-02-15 18:25 ` Jonas Karlman
2023-02-17 2:55 ` Simon Glass
2023-02-17 14:42 ` Jonas Karlman
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=a91cc82d-fa97-16ee-e2c7-f0e1a92b2def@kwiboo.se \
--to=jonas@kwiboo.se \
--cc=alpernebiyasak@gmail.com \
--cc=chenjh@rock-chips.com \
--cc=jagan@edgeble.ai \
--cc=kever.yang@rock-chips.com \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@theobroma-systems.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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