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 155B7C05027 for ; Tue, 14 Feb 2023 03:45:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 48A8D85805; Tue, 14 Feb 2023 04:45:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id B9F5085805; Tue, 14 Feb 2023 04:45:37 +0100 (CET) Received: from mail-m11874.qiye.163.com (mail-m11874.qiye.163.com [115.236.118.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CF25D857E0 for ; Tue, 14 Feb 2023 04:45:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kever.yang@rock-chips.com Received: from [172.16.12.93] (unknown [58.22.7.114]) by mail-m11874.qiye.163.com (Hmail) with ESMTPA id 5854B3C01A1; Tue, 14 Feb 2023 11:45:21 +0800 (CST) Message-ID: <1a604c0a-bf9b-75bf-e40e-4b59084701f9@rock-chips.com> Date: Tue, 14 Feb 2023 11:45:21 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 2/3] rockchip: Require an external TPL binary when TPL is missing Content-Language: en-US To: Jonas Karlman , Quentin Schulz , Simon Glass , Philipp Tomsich , Joseph Chen , Alper Nebi Yasak Cc: Jagan Teki , Heinrich Schuchardt , u-boot@lists.denx.de References: <20230205202116.2891673-1-jonas@kwiboo.se> <20230205202116.2891673-3-jonas@kwiboo.se> <7dfdb217-71fe-a89e-0268-f9efb8941de8@theobroma-systems.com> From: Kever Yang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGkgaQ1ZPSR4YSRoeGR9JHh5VEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSkpLSEpMVUpLS1VLWQ Y+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MRg6Cxw*Aj0THB82CRNMCzYK GAIKCR1VSlVKTUxNSE9NSElJSkNNVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlOQ1VJSVVMVUpKT1lXWQgBWUFOS0lCNwY+ X-HM-Tid: 0a864e06eacf2eb0kusn5854b3c01a1 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 Jonas, On 2023/2/6 20:51, Jonas Karlman wrote: > 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 >>> --- >>> 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. Could you help to send the new patchset with this update? Thanks, - Kever