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 A2857C05027 for ; Fri, 17 Feb 2023 20:53:02 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2254185738; Fri, 17 Feb 2023 21:52:59 +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="Jw/tDRVP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D51B0857A8; Fri, 17 Feb 2023 21:52:55 +0100 (CET) Received: from xvfrpbcd.outbound-mail.sendgrid.net (xvfrpbcd.outbound-mail.sendgrid.net [168.245.59.205]) (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 78D6B85651 for ; Fri, 17 Feb 2023 21:52:52 +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:mime-version:to:cc:content-transfer-encoding: content-type:cc:content-type:from:subject:to; s=s1; bh=h+WhzA8dqY+OJjuH8Fx+hGBAu346KLmNnInfcq76tpo=; b=Jw/tDRVPIB/mlbQ3MhpsApfSCEyqW9w7W4CxjlXpZ6MXDd6cXiZqoEtC/tIHifpwB9Bg KM9ODJjG1GQImyx+03cLpXCnYp1ecSssKtZhMBLsdAx+gMU0ir0QB827BcKPeF4swc/7os WYKIPlWoLfqDf4NMLNa+Um1Vfi8w2kBHiOTfeXpbob1y81AfV7sEcu+feyvgSGbVo1UVET lAJAX6OrSsCVrbUYao53nk0QiWjkvhUynNR3DXUJqLtOLUKRrTf3Q5vIx4aaSlHpa2hQFY knZ+ct+i9rsUtmrUT7jU8RUbE7WaH032HUObrtSBhw7KPl6FAgIJNv2DlwoAfb8g== Received: by filterdrecv-7dfc98557c-sb4bp with SMTP id filterdrecv-7dfc98557c-sb4bp-1-63EFE921-21 2023-02-17 20:52:49.985169733 +0000 UTC m=+611749.608012469 Received: from bionic.localdomain (unknown) by geopod-ismtpd-3-0 (SG) with ESMTP id IMjISSZ_T6mn3cN0zUQBKQ Fri, 17 Feb 2023 20:52:49.304 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v3 0/5] rockchip: Use external TPL binary to create a working firmware image Date: Fri, 17 Feb 2023 20:52:50 +0000 (UTC) Message-Id: <20230217205247.3402473-1-jonas@kwiboo.se> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h78gXbuIlERtMWLax?= =?us-ascii?Q?z9IS4QMdyb+D=2F0nWEJy4Gz4bO5TwPMz3w3RGUPI?= =?us-ascii?Q?PqkDFI+L0yUMRzz8UWlpbqyb7sPnL0vX9sgSqmH?= =?us-ascii?Q?FZ0MDcn2hWbr4uZNi38kp0aEBkwcvpYOyRh0bgs?= =?us-ascii?Q?HsyZLqLLfeXyMdYa9v772ORIrYvQ6u4c1FdmtN?= 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 BootRom to load next stage, U-Boot SPL, into DRAM. BootRom then jumps to U-Boot SPL to continue the boot flow. For RK356x there is no support to initialize DRAM using U-Boot TPL and instead an external TPL binary must be used to generate a bootable u-boot-rockchip.bin image. This adds a new rockchip-tpl entry to binman and make use of this new entry in rockchip-u-boot.dtsi. Build U-Boot with ROCKCHIP_TPL=/path/to/ddr.bin to generate a bootable u-boot-rockchip.bin image for RK356x. I have dropped the RFC patch that was related to showing a friendly message instead of a generic file not found message when TPL blob is missing in v3. Will address that in a follow-up series. The last patch that updates evb-rk3568_defconfig is strictly not needed, it updates a few options that seemed relevant during testing. Tested on RK3568 (ODROID-M1, ROCK 3A) and RK3566 (ROCK 3C, Quartz64) boards using evb-rk3568_defconfig. Changes in v3: - Move test function last - Add help text to Kconfig option - Add build step for rk3568 to documentation - Resync init size limit table - Drop missing message RFC patch Changes in v2: - Renamed external-tpl to rockchip-tpl - Renamed EXTERNAL_TPL to ROCKCHIP_TPL - Add CONFIG_ROCKCHIP_EXTERNAL_TPL Kconfig option - New patch to sync init size limit in mkimage - New RFC patch to improve allow-missing/fake-ext-blobs handling for binman mkimage entry Jonas Karlman (5): binman: Add support for a rockchip-tpl entry rockchip: Use an external TPL binary on RK3568 Revert "board: rockchip: Fix binman_init failure on EVB-RK3568" rockchip: mkimage: Update init size limit rockchip: evb-rk3568: Update defconfig Makefile | 1 + arch/arm/dts/rockchip-u-boot.dtsi | 10 ++++++++-- arch/arm/mach-rockchip/Kconfig | 8 ++++++++ configs/evb-rk3568_defconfig | 8 ++++---- doc/board/rockchip/rockchip.rst | 11 +++++++++++ tools/binman/entries.rst | 14 ++++++++++++++ tools/binman/etype/rockchip_tpl.py | 20 ++++++++++++++++++++ tools/binman/ftest.py | 7 +++++++ tools/binman/missing-blob-help | 5 +++++ tools/binman/test/277_rockchip_tpl.dts | 16 ++++++++++++++++ tools/rkcommon.c | 10 +++++----- 11 files changed, 99 insertions(+), 11 deletions(-) create mode 100644 tools/binman/etype/rockchip_tpl.py create mode 100644 tools/binman/test/277_rockchip_tpl.dts -- 2.39.1