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 DFBE7C05027 for ; Sun, 19 Feb 2023 15:06:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D77158547B; Sun, 19 Feb 2023 16:06:41 +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="VQHms8CE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3D93885748; Sun, 19 Feb 2023 16:06:39 +0100 (CET) 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 C999B84D2D for ; Sun, 19 Feb 2023 16:06: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=3+eToqJ+0XGKE+xhExttzTxa0RQctHiKLdp2o1ZpGeA=; b=VQHms8CEZG7iESt14k1Oy/SxgRo42URq3CirdT/WFQPYff2VcOuKIVqtX3k6phpQQRE8 kJzTZqI9A+soewW3ZMzJc+DfkgeF7Y2jWJ+V6n4tktqSRxDF6VS7+nU5I7bfZTKAkXYyaW NY3No/2WPOmMtCp7Fp7ySEI6eQzCEXXztH+kJgQ5mLVs2yQ5GhDk1C7W1tq4EX39Kb/PD9 mFFOqWbFwQ3AaGtUKGoEuIUc6Jn1rLt8bwLHpOYwQhwqx9TB4TIXrOugr1HMXIQNXuOH2L /61gh8jx+tLthDl5Wd8seM0jeNmDYEGkH23IjBBgwQn7X3P4dM5LsFSbmS13wR0g== Received: by filterdrecv-8dd65bbd4-9vwcx with SMTP id filterdrecv-8dd65bbd4-9vwcx-1-63F23AF9-7 2023-02-19 15:06:33.120954016 +0000 UTC m=+763789.900231428 Received: from bionic.localdomain (unknown) by geopod-ismtpd-1-1 (SG) with ESMTP id blPAKmNUQ6KcxDVFJT9qhg Sun, 19 Feb 2023 15:06:32.726 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v4 0/4] rockchip: Use external TPL binary to create a working firmware image Date: Sun, 19 Feb 2023 15:06:33 +0000 (UTC) Message-Id: <20230219150629.4012377-1-jonas@kwiboo.se> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h=2FCNtqwOYVmMwHjHn?= =?us-ascii?Q?6K+UNhWYylmiZvmMzWv8k2wCaP8xTVh3TpXwBZb?= =?us-ascii?Q?QVlMlLOH1Y59SF8LMEOSW=2FxmNL0vBCr+6EnsPob?= =?us-ascii?Q?kw4iW5Urh9=2FJgPbdY+gLVrZ=2FmgbDCD1jq3NYfLt?= =?us-ascii?Q?j7LWiJVdhKBYogPRRKeqtIdLhvza1cYi8r+51U?= 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 was dropped in v4. Will address that and more config options in a follow-up series. 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 Jonas Karlman (4): 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 and RK3568 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/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 | 4 ++-- 11 files changed, 92 insertions(+), 5 deletions(-) create mode 100644 tools/binman/etype/rockchip_tpl.py create mode 100644 tools/binman/test/277_rockchip_tpl.dts -- 2.39.2