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 1D85CECAAD1 for ; Thu, 1 Sep 2022 13:06:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C1B5D84A26; Thu, 1 Sep 2022 15:06:37 +0200 (CEST) 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 3A4D2849E9; Thu, 1 Sep 2022 15:06:36 +0200 (CEST) Received: from mail-m11876.qiye.163.com (mail-m11876.qiye.163.com [115.236.118.76]) (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 ADE70848C1 for ; Thu, 1 Sep 2022 15:06:29 +0200 (CEST) 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-m11876.qiye.163.com (Hmail) with ESMTPA id 95D5B3C03CE; Thu, 1 Sep 2022 21:06:16 +0800 (CST) Message-ID: <9ff25bf3-ef4f-4e90-eefe-b4bc8c2ec182@rock-chips.com> Date: Thu, 1 Sep 2022 21:06:16 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 12/12] rockchip: puma-rk3399: migrate to u-boot-rockchip-spi.bin Content-Language: en-US To: Quentin Schulz Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, klaus.goger@theobroma-systems.com, knaerzche@gmail.com, u-boot@lists.denx.de, Quentin Schulz References: <20220722160655.3904213-1-foss+uboot@0leil.net> <20220722160655.3904213-13-foss+uboot@0leil.net> From: Kever Yang In-Reply-To: <20220722160655.3904213-13-foss+uboot@0leil.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFJSktLSjdXWS1ZQUlXWQ8JGhUIEh9ZQVlCHU4ZVh4ZQ05NGUhIT08eGlUTARMWGhIXJB QOD1lXWRgSC1lBWU5DVUlJVUxVSkpPWVdZFhoPEhUdFFlBWU9LSFVKSktITk9VSktLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OBw6OAw4Tj0rEUMcOEIcNxg9 CDowCy5VSlVKTU1JS0hMTkxMSU9JVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlOQ1VJSVVMVUpKT1lXWQgBWUFPTE5KNwY+ X-HM-Tid: 0a82f928cc502eb2kusn95d5b3c03ce 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 2022/7/23 00:06, Quentin Schulz wrote: > From: Quentin Schulz > > Now that a single binary containing TPL/SPL correctly formatted for SPI > flashes and U-Boot proper, can be generated by binman, let's do it. > > Also update the documentation to tell the user to use this newly > generated file instead of manually generating and flashing the binaries. > > Cc: Quentin Schulz > Signed-off-by: Quentin Schulz Reviewed-by: Kever Yang Thanks, - Kever > --- > > Depends on follwing patch series: > https://lore.kernel.org/u-boot/20220722113505.3875669-1-foss+uboot@0leil.net/ > > arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi | 11 +++++++++++ > board/theobroma-systems/puma_rk3399/README | 11 ++--------- > configs/puma-rk3399_defconfig | 1 + > 3 files changed, 14 insertions(+), 9 deletions(-) > > diff --git a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi > index 27a792fe6d..bfc504b952 100644 > --- a/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi > +++ b/arch/arm/dts/rk3399-puma-haikou-u-boot.dtsi > @@ -44,6 +44,17 @@ > }; > }; > > +#ifdef CONFIG_ROCKCHIP_SPI_IMAGE > +&binman { > + simple-bin-spi { > + blob { > + /* same as u-boot,spl-payload-offset */ > + offset = <0x80000>; > + }; > + }; > +}; > +#endif > + > &gpio1 { > u-boot,dm-pre-reloc; > }; > diff --git a/board/theobroma-systems/puma_rk3399/README b/board/theobroma-systems/puma_rk3399/README > index 2e3785c986..649aa3c543 100644 > --- a/board/theobroma-systems/puma_rk3399/README > +++ b/board/theobroma-systems/puma_rk3399/README > @@ -44,17 +44,11 @@ Compile the U-Boot > > cd ../u-boot > > make CROSS_COMPILE=aarch64-linux-gnu- puma-rk3399_defconfig all > > -Package the image > -================= > - > -Creating an SPL image for SPI-NOR: > - > tools/mkimage -n rk3399 -T rkspi -d tpl/u-boot-tpl.bin:spl/u-boot-spl.bin idbloader-spi.img > - > Flash the image > =============== > > Copy u-boot-rockchip.bin to offset 32k for SD/eMMC. > -Copy the SPL to offset 0 and the FIT image to offset 512k for NOR-Flash. > +Copy u-boot-rockchip-spi.bin to offset 0 for NOR-flash. > > SD-Card > ------- > @@ -92,5 +86,4 @@ help of the Rockchip loader binary. > > cd .. > > ./rkdeveloptool db rkbin/rk3399_loader_spinor_v1.25.114.bin > > ./rkdeveloptool ef > - > ./rkdeveloptool wl 0 ../idbloader-spi.img > - > ./rkdeveloptool wl 1024 ../u-boot.itb > + > ./rkdeveloptool wl 0 ../u-boot-rockchip-spi.bin > diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig > index c70dbe9ed5..0f532b2776 100644 > --- a/configs/puma-rk3399_defconfig > +++ b/configs/puma-rk3399_defconfig > @@ -9,6 +9,7 @@ CONFIG_ENV_OFFSET=0x3F8000 > CONFIG_DEFAULT_DEVICE_TREE="rk3399-puma-haikou" > CONFIG_ROCKCHIP_RK3399=y > CONFIG_ROCKCHIP_BOOT_MODE_REG=0x0 > +CONFIG_ROCKCHIP_SPI_IMAGE=y > CONFIG_TARGET_PUMA_RK3399=y > CONFIG_DEBUG_UART_BASE=0xFF180000 > CONFIG_DEBUG_UART_CLOCK=24000000