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 F01DBC636CC for ; Sun, 5 Feb 2023 20:28:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DA96D85757; Sun, 5 Feb 2023 21:28:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com 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=amarulasolutions.com header.i=@amarulasolutions.com header.b="eQ9Oh9+c"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3B67685755; Sun, 5 Feb 2023 21:28:55 +0100 (CET) Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) (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 ED6E085757 for ; Sun, 5 Feb 2023 21:28:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jagan@amarulasolutions.com Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-523e3a0300eso114988607b3.4 for ; Sun, 05 Feb 2023 12:28:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; 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=UmJ3Vfzij69A+QoERh4wxJVhZLGCDsnFZyzOdqPEOss=; b=eQ9Oh9+c8kFx3ioWwjepwhuzfAzk5mVL1jt1Q6oTy7Vd7+tuzVFeD8QhzIP22noEDJ +/ilRGQBU9QgqqoMWDq9WQAPUjMF1PUdTCK9SIczdDns8qeqtkUGe+qmm5lTD/tNjlCJ ycSznmAzmRB9chOPyKc+nTZSxH67pQwZJdZkc= 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=UmJ3Vfzij69A+QoERh4wxJVhZLGCDsnFZyzOdqPEOss=; b=0oyqfllv+uvlkTv4ChAy4f+VnwQ40H0Dgyl8Qu8SBhGFfJsy4A5gfB2Gvd8XjjwHWi Ns4SUQkWVpD+MCWo6MA1Kzzaes7iD2zpmE6pnXOM6lxxuMgYMi1ylAOkghht6gI2q3Oy YvrDE7tMvosZdHi8Ya3CXSlz6UiBj8tVoIYcDuIjpU8aviOKd7EV+5dkXCBM27I9qO4d Q8fyDZ1amoI0u1840cwVOwfOcldyj/Txy/k+KIL9J9KhV8gXdQOVTWR+4TW/QqAf+Eri UT5pX9jKxUQSHoHNnEWN9bo9P91MZjgovHrYgMmIK1ZqTPG9+AlmHoTkr16MBYt8idyB FLgA== X-Gm-Message-State: AO0yUKUDn9sNJZyBeqelTAk/sXWrUJs2j/2dnF+gdiWo5xZE8dtiUAK4 tnvIAiI/6jLs40a3GXduI3tk7rjX/fa/Gp23ELrJJA== X-Google-Smtp-Source: AK7set9okOW3tD4JcdolhQYE4l4T6S22ZyKXOjKFPx+ad2q0EGwzTK8TUxli3xmh9dnGhdDMubMQ+9oTuBdE9Bdyf9I= X-Received: by 2002:a81:1601:0:b0:524:3769:8844 with SMTP id 1-20020a811601000000b0052437698844mr1277584yww.515.1675628930640; Sun, 05 Feb 2023 12:28:50 -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: Jagan Teki Date: Mon, 6 Feb 2023 01:58:39 +0530 Message-ID: Subject: Re: [PATCH 2/3] rockchip: Require an external TPL binary when TPL is missing To: Jonas Karlman Cc: Simon Glass , 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 On Mon, Feb 6, 2023 at 1:52 AM 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 > + }; > 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 Look like this requires DDR bin renaming every time, Is there any possibility to use a direct ddr bin name instead of ddr.bin as we did for BL31 elf? $ export EXTERNAL_TPL=rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.08.bin Jagan.