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 1815BC38142 for ; Sun, 22 Jan 2023 21:16:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 959A9856C2; Sun, 22 Jan 2023 22:15:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.b="nrmWopAj"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="GKsQeGmr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CA461856BD; Sun, 22 Jan 2023 22:15:42 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3C310856A7 for ; Sun, 22 Jan 2023 22:15:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 651183200392; Sun, 22 Jan 2023 16:15:38 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 22 Jan 2023 16:15:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1674422138; x=1674508538; bh=MG ZbBN6UAkTl6rkERUGUFln5gg/w+/aFgDm8qt07sXA=; b=nrmWopAjAv30Bso0FP nrU4FNWpP1Bpq+vJJkCV8WBmIzN1SwW9TWYklHmRVToouBSDiyEgBY+17EiLY9sX jtAz2CRR86c+4lEt6oiBqr13p7b5/bT51UpNuRgmWRKFm2pxw2/Gto35kSk4GIXJ Of7mvM3DJVpi9OHuHdQoPMvy1YzpHskRmRs7S4weht9ofBVMPtubGllNG+bUoiHs sW/4gp26j9V1W1fXNpVxMxILJC5PvQexnPaDCY5yGtCLuXWBGOSwUeTwW9QcqYUY x4Zv/i7CYvIZXZgLMC7Wh6QkmnnmKXc/XJg2WA4uPkHytm8Hg7O30puplO9RkCKQ QHew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1674422138; x=1674508538; bh=MGZbBN6UAkTl6 rkERUGUFln5gg/w+/aFgDm8qt07sXA=; b=GKsQeGmrAjevzH1sYoRzF5+pJl7xB 7UBRRKn7u43NEzZDeKVtSaiNNSn14cShLOLwlAij68MnNxAuH8V+i0AbyYzogg+X NTBJCeTgOgAJ2YrkapKhaOS+UV9b0Vf12tV9qQS81ZRx5GxZcN4sGr8gIouRipo7 UEpjQour+Mtu5M3SJi31N/SYZWF2jQ4a4b9RQ5uVk8SoXxhk+jp6t9WnAGrg04Ay ZBI3dQ68CaKBhR/7PI8m4XmlGR8OGDelUXH2FMrppO55eB4i3O9EGIIHaXxdWf6G N+XnUJ5oyIAlL1AEqGvoQ/w09URxM6YxuouYh2w4bH9OsPlUi0tnzQYxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudduiedgudeglecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghm uhgvlhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenuc ggtffrrghtthgvrhhnpedukeetueduhedtleetvefguddvvdejhfefudelgfduveeggeeh gfdufeeitdevteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Jan 2023 16:15:37 -0500 (EST) From: Samuel Holland To: Andre Przywara , Jagan Teki Cc: Jesse Taube , Icenowy Zheng , u-boot@lists.denx.de, Samuel Holland Subject: [PATCH v2 3/4] sunxi: binman: Support FIT generation for 32-bit SoCs Date: Sun, 22 Jan 2023 15:15:29 -0600 Message-Id: <20230122211531.23181-4-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20230122211531.23181-1-samuel@sholland.org> References: <20230122211531.23181-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Some 32-bit SoCs can use SCP firmware to implement additional PSCI functionality, such as system suspend. In order to load this firmware from SPL, we need to generate and use a FIT instead of a legacy image. Adjust the binman FIT definition so it does not rely on TF-A BL31, as this is not used on 32-bit SoCs. Instead, after loading the firmware, U-Boot proper is executed directly. Signed-off-by: Samuel Holland --- Changes in v2: - Rely on binman min-size instead of using explicit offsets - Use Kconfig for firmware addresses instead of an #ifdef staircase arch/arm/dts/sunxi-u-boot.dtsi | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi index f38359fd42..c7089b8619 100644 --- a/arch/arm/dts/sunxi-u-boot.dtsi +++ b/arch/arm/dts/sunxi-u-boot.dtsi @@ -1,5 +1,11 @@ #include +#ifdef CONFIG_ARM64 +#define ARCH "arm64" +#else +#define ARCH "arm" +#endif + / { aliases { #ifndef CONFIG_MACH_SUNIV @@ -29,30 +35,32 @@ filename = "spl/sunxi-spl.bin"; }; -#ifdef CONFIG_ARM64 +#ifdef CONFIG_SPL_LOAD_FIT fit { - description = "Configuration to load ATF before U-Boot"; + description = "Configuration to load U-Boot and firmware"; #address-cells = <1>; fit,fdt-list = "of-list"; images { uboot { - description = "U-Boot (64-bit)"; + description = "U-Boot"; type = "standalone"; os = "u-boot"; - arch = "arm64"; + arch = ARCH; compression = "none"; load = ; + entry = ; u-boot-nodtb { }; }; +#if CONFIG_SUNXI_BL31_BASE atf { description = "ARM Trusted Firmware"; type = "firmware"; os = "arm-trusted-firmware"; - arch = "arm64"; + arch = ARCH; compression = "none"; load = ; entry = ; @@ -62,6 +70,7 @@ missing-msg = "atf-bl31-sunxi"; }; }; +#endif #if CONFIG_SUNXI_SCP_BASE scp { @@ -90,7 +99,11 @@ @config-SEQ { description = "NAME"; +#if CONFIG_SUNXI_BL31_BASE firmware = "atf"; +#else + firmware = "uboot"; +#endif #if CONFIG_SUNXI_SCP_BASE loadables = "scp", "uboot"; #else -- 2.37.4