From patchwork Sat Feb 25 19:01:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 1748007 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.a=rsa-sha256 header.s=s1 header.b=bVk5lh4U; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PPGP317MCz240V for ; Sun, 26 Feb 2023 06:03:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E808885B9C; Sat, 25 Feb 2023 20:01: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="bVk5lh4U"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A2B3B85B8A; Sat, 25 Feb 2023 20:01:42 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 Received: from xtrwhxbr.outbound-mail.sendgrid.net (xtrwhxbr.outbound-mail.sendgrid.net [167.89.10.181]) (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 E266B85B85 for ; Sat, 25 Feb 2023 20:01:35 +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=wfCE8D59zm9GTb4YKwfYkn5OdKDcJNfzl8oMUCtwZOs=; b=bVk5lh4U7uJmt6JduZtD+pMoD6/n8JkRsvAZSNDZmCaedcvadBA1V7iwxgi7UfcG6iGN dZRU3Wr3eDljrGCNQ+oq6y4psiGJvuqW4n3vxb9OO8sSptW90BOvmcx7NnvnpsLETxYh1F ua/f3H5IcwAf9JxzeSUix2SxqZrJrO+XiGNp0KexoG2Y04EC0VzS3g1Tz7mQSeROGGvwg2 FTiT2vNUfXAcX5gF9D++8b7utP0sApQzIYjF20ZHncVO2UXlw+TPgboVHO0C1sxsWbxdML NS9qlSUFrC9MPylYXnQ9emHzLCWTsr1FLloy+V9J862yZqqXCTrYli+93mkONciQ== Received: by filterdrecv-5848969764-zpj24 with SMTP id filterdrecv-5848969764-zpj24-1-63FA5B0D-6 2023-02-25 19:01:33.125192929 +0000 UTC m=+329299.364427834 Received: from bionic.localdomain (unknown) by geopod-ismtpd-4-1 (SG) with ESMTP id BbUPSuCwTeepYp0XxkYa5Q Sat, 25 Feb 2023 19:01:32.762 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v5 0/6] rockchip: Use external TPL binary to create a working firmware image Date: Sat, 25 Feb 2023 19:01:33 +0000 (UTC) Message-Id: <20230225190130.2564462-1-jonas@kwiboo.se> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SG-EID: TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxAfZekEeQsTe+RrMu3cja6a0hwpymEI0BC0cTL42l22YGlXDG8R3QbJFC6cLhA7sMrcBMdWyStZS2uEK6d/kMrU51eUHY4UJr1ClEmSt5DUSA7h1UkbbpAxPnUaQJyFwrBqlzXAfC6a6cXFhBxDhbDKlIwtXqL5QpgumvNeszB5OlVXD2N1qeTS2Opz/KNnZxca4 To: Kever Yang , Simon Glass , Philipp Tomsich , Joseph Chen , Alper Nebi Yasak Cc: Quentin Schulz , Jagan Teki , Heinrich Schuchardt , Eugen Hristev , u-boot@lists.denx.de, Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== 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. The last patch fixes an allow-missing issue for mkimage entry, something that needs to be working for CI pipeline. The patch is based on [1] from the "binman: Show missing blob message" series at [2]. Changes in v5: - Add patch to fix issue with allow-missing - Split init size limit patch in two Changes in v4: - Only change init size limit for rk3328 and rk3568 - Drop update evb-rk3568_defconfig patch 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 [1] https://patchwork.ozlabs.org/project/uboot/patch/20230219220158.4160763-7-jonas@kwiboo.se/ [2] https://patchwork.ozlabs.org/project/uboot/cover/20230219220158.4160763-1-jonas@kwiboo.se/ Jonas Karlman (6): 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 for RK3328 rockchip: mkimage: Update init size limit for RK3568 binman: Mark mkimage entry missing when its subnodes is missing Makefile | 1 + arch/arm/dts/rockchip-u-boot.dtsi | 10 ++++++-- arch/arm/mach-rockchip/Kconfig | 8 +++++++ configs/evb-rk3568_defconfig | 1 - doc/board/rockchip/rockchip.rst | 11 +++++++++ tools/binman/entries.rst | 14 +++++++++++ tools/binman/etype/mkimage.py | 24 ++++++++++++++++++- tools/binman/etype/rockchip_tpl.py | 20 ++++++++++++++++ tools/binman/ftest.py | 18 ++++++++++++++ tools/binman/missing-blob-help | 5 ++++ tools/binman/test/277_rockchip_tpl.dts | 16 +++++++++++++ .../test/278_mkimage_missing_multiple.dts | 19 +++++++++++++++ tools/rkcommon.c | 4 ++-- 13 files changed, 145 insertions(+), 6 deletions(-) create mode 100644 tools/binman/etype/rockchip_tpl.py create mode 100644 tools/binman/test/277_rockchip_tpl.dts create mode 100644 tools/binman/test/278_mkimage_missing_multiple.dts