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 AB920C636CD for ; Sun, 5 Feb 2023 20:22:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 278698590C; Sun, 5 Feb 2023 21:21:56 +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="XjauR3bg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1DEF685347; Sun, 5 Feb 2023 21:21:40 +0100 (CET) Received: from xvfrqvdb.outbound-mail.sendgrid.net (xvfrqvdb.outbound-mail.sendgrid.net [168.245.72.219]) (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 D627F857EF for ; Sun, 5 Feb 2023 21:21:31 +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=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=7Egm+pj4g5sIGxRyJ7gp9f48IYuw3DNP7k20XfNwa+g=; b=XjauR3bgE3vondjwMh/Hfg0AVg++7AARU5w/NjCb0lhMh100p974NCaE4Bwx4zm5Q+xD bIaD3O/Lbs2uT4cVRFZcaCefF6/N3cZv1FuaQkrqGTQPbIgxxtAu+AWLicgDdlnFNWVBMT eiWhw/xs4lPJ3J1dvG8Vx2NYFykM9+eCEbx2+97opy4oyoci7mnIeyk2gar5i9CDz37jmj 7tQ/CnCGKtVSsFg4SqEpXJBbkTGlCjFm9joC/J8l2Xt6df+Zd3tEd85c6ihG6uF/fAO3d9 mgcKDjN2Sc/oXCzhKuSxpYqUTMC0+Kd1HQIdCZi8BpOmyF1xddajVj0p56dpNsXA== Received: by filterdrecv-69c5db5cf4-rhmnr with SMTP id filterdrecv-69c5db5cf4-rhmnr-1-63E00FCA-5 2023-02-05 20:21:30.408160699 +0000 UTC m=+3145477.195932217 Received: from bionic.localdomain (unknown) by geopod-ismtpd-5-2 (SG) with ESMTP id s-O3vlJHTbeg4FpwVYkT1g Sun, 05 Feb 2023 20:21:21.242 +0000 (UTC) From: Jonas Karlman Subject: [PATCH 2/3] rockchip: Require an external TPL binary when TPL is missing Date: Sun, 05 Feb 2023 20:21:30 +0000 (UTC) Message-Id: <20230205202116.2891673-3-jonas@kwiboo.se> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230205202116.2891673-1-jonas@kwiboo.se> References: <20230205202116.2891673-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h5hYhaN7ExvAov0OH?= =?us-ascii?Q?De2SJDP+n8pfQsOwnJXG7WmpxKFRdbvynU3538d?= =?us-ascii?Q?Ldp5K=2FdsWTjYjY1Nl8aBx3iF7baGoP2+eRffCvp?= =?us-ascii?Q?A1g29RnNsFiZ1owtA8x2GIbRCXc9XMFrtPvPwur?= =?us-ascii?Q?kUrG2LbZF0OpDxrYe8e+ft1mh40DsODY0kW5NM?= To: Simon Glass , Philipp Tomsich , Kever Yang , Joseph Chen , Alper Nebi Yasak Cc: Quentin Schulz , Jagan Teki , Heinrich Schuchardt , u-boot@lists.denx.de, Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 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 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 + }; 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://github.com/rockchip-linux/rkbin. + 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 -- 2.39.1