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 12467C636CD for ; Tue, 7 Feb 2023 04:03:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 536A485D0F; Tue, 7 Feb 2023 05:03:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="geGJipna"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22A7A85D13; Tue, 7 Feb 2023 05:03:34 +0100 (CET) Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (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 9F90385C38 for ; Tue, 7 Feb 2023 05:03:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-yb1-xb31.google.com with SMTP id 23so10010133ybf.10 for ; Mon, 06 Feb 2023 20:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mDsKup8vfqxynDT/anvapu70hl34VyL5qaksdfyERlU=; b=geGJipna6R8rHSe1SaxWr2T7XjvGN6W3tNPrThan2S7i/Eh8fft4BXmihK3nYTrRjB gPV0955ed7q7UNrUGeXwknv57XwiDBlDam0VGx4wfZBmDz63s57ykhHcj7p1s2jqO7o6 pQTQshSB8+jeF1ze9pSW7gfgU+/dd3o3wQZhQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mDsKup8vfqxynDT/anvapu70hl34VyL5qaksdfyERlU=; b=oPxRxzAeMk6XTeLQJzA0RMfnYRa4/+l1Q/vyanU0HUFlzTRpXGgO3FovbQ9ZkQyPtn dsaxtjWy4zuWdDAf9VwVZdy9Ly2siDqLhmqOj9pvmjVuAbigf5Ypr/JiFCFJEtNKg9ZY 72xA+BRASbgKKVmohyFyvko/ioP2u70iU1bE0LGGoS2MdzSyIaKmFp7F9IJRBT5QdUCq GUPt/zU4wWQf0dnyNH9abXb3qBe0gspB+4wVsPfgU8vEuZxFqqV4RoOCkpP+Y4BmIg83 BSh6HmJ0t0ZyUdpsRHZtpQ2SX2DT3xsz5iLv4L8Etj4A50CL8V2quwRnkmBICwryweAg 7BtA== X-Gm-Message-State: AO0yUKXpaw2Sl41ejss3BB79B1cWagNZrUxLbr2jfyQCJYGkQDHQPOB8 6fiDSS8deQSEHXCjtqoSbMggAGpym2dBpV696o/HOw== X-Google-Smtp-Source: AK7set/f6b1byvKByKof1+7XNk1iGgj6zNayne8lccPWWaxqKuz8yFhtg4JtbqvPf5IIVYEus1c2Kuonw49CpUAP12M= X-Received: by 2002:a05:6902:527:b0:8a2:8c60:b711 with SMTP id y7-20020a056902052700b008a28c60b711mr202150ybs.545.1675742608879; Mon, 06 Feb 2023 20:03:28 -0800 (PST) MIME-Version: 1.0 References: <20230205202116.2891673-1-jonas@kwiboo.se> <20230205202116.2891673-3-jonas@kwiboo.se> In-Reply-To: <20230205202116.2891673-3-jonas@kwiboo.se> From: Simon Glass Date: Mon, 6 Feb 2023 21:02:23 -0700 Message-ID: Subject: Re: [PATCH 2/3] rockchip: Require an external TPL binary when TPL is missing To: Jonas Karlman Cc: Philipp Tomsich , Kever Yang , Joseph Chen , Alper Nebi Yasak , Quentin Schulz , Jagan Teki , Heinrich Schuchardt , u-boot@lists.denx.de Content-Type: text/plain; charset="UTF-8" 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 Sun, 5 Feb 2023 at 13: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) \ rockchip-tpl-path > -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 As you said, this needs an explicit config > 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 > Regards, Simon