From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 02 Jul 2024 14:28:56 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sOccy-000q8n-1z for lore@lore.pengutronix.de; Tue, 02 Jul 2024 14:28:56 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sOccy-0000re-43; Tue, 02 Jul 2024 14:28:56 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sOccs-0000qe-TN; Tue, 02 Jul 2024 14:28:50 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOccs-006bqw-Gx; Tue, 02 Jul 2024 14:28:50 +0200 Received: from localhost ([::1] helo=dude05.red.stw.pengutronix.de) by dude05.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1sOccs-00GpA8-1Q; Tue, 02 Jul 2024 14:28:50 +0200 From: Ahmad Fatoum To: distrokit@pengutronix.de Date: Tue, 2 Jul 2024 14:28:48 +0200 Message-Id: <20240702122849.4008988-3-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240702122849.4008988-1-a.fatoum@pengutronix.de> References: <20240702122849.4008988-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH 3/4] v7a: images: stm32mp: add support for building SCMI enabled images X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ahmad Fatoum Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false The TF-A images we generate already have SCMI support. To make use of it, we need to change used bootloader and kernel device tree to describe access via SCMI. As the bootloader selects the device tree that matches its own DT compatible, bootloader device tree in the FIP is the only thing that needs to change. Let's do this by adding a @SCMI@ variable that can be defined to be -scmi for boards that want to employ SCMI. We add this suffix to intermediary images as well to avoid stepping on the toes of the non-SCMI image that might be enabled in the same build. Signed-off-by: Ahmad Fatoum --- configs/platform-v7a/config/images/stm32mp.config | 10 +++++----- configs/platform-v7a/rules/image-lxa-mc1.make | 2 +- configs/platform-v7a/rules/image-stm32mp157c-dk2.make | 2 +- configs/platform-v7a/rules/image-stm32mp157c-ev1.make | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config index 45d3c00c9a90..888f83b360b1 100644 --- a/configs/platform-v7a/config/images/stm32mp.config +++ b/configs/platform-v7a/config/images/stm32mp.config @@ -15,7 +15,7 @@ image @IMAGE@ { size = 256K } partition fip { - image = "@STM32MP_BOARD@.fip" + image = "@STM32MP_BOARD@@SCMI@.fip" size = 1M } @@ -33,7 +33,7 @@ image @IMAGE@ { } } -image @STM32MP_BOARD@-emmcboot.img { +image @STM32MP_BOARD@@SCMI@-emmcboot.img { hdimage { partition-table = false } @@ -44,15 +44,15 @@ image @STM32MP_BOARD@-emmcboot.img { } partition fip { - image = "@STM32MP_BOARD@.fip" + image = "@STM32MP_BOARD@@SCMI@.fip" offset = 256K } } -image @STM32MP_BOARD@.fip { +image @STM32MP_BOARD@@SCMI@.fip { fip { fw-config = "stm32mp1-@STM32MP_BOARD@-fw-config.dtb" - hw-config = "@STM32MP_BOARD@.dtb-bb" + hw-config = "@STM32MP_BOARD@@SCMI@.dtb-bb" nt-fw = "barebox-stm32mp-generic-bl33.img" tos-fw = { "stm32mp1-bl32.bin" } tos-fw-config = "stm32mp1-@STM32MP_BOARD@-bl32.dtb" diff --git a/configs/platform-v7a/rules/image-lxa-mc1.make b/configs/platform-v7a/rules/image-lxa-mc1.make index 333a5f606104..98a294304136 100644 --- a/configs/platform-v7a/rules/image-lxa-mc1.make +++ b/configs/platform-v7a/rules/image-lxa-mc1.make @@ -11,7 +11,7 @@ # IMAGE_PACKAGES-$(PTXCONF_IMAGE_LXA_MC1) += image-lxa-mc1 -IMAGE_LXA_MC1_ENV := STM32MP_BOARD=stm32mp157c-lxa-mc1 +IMAGE_LXA_MC1_ENV := STM32MP_BOARD=stm32mp157c-lxa-mc1 SCMI= # # Paths and names diff --git a/configs/platform-v7a/rules/image-stm32mp157c-dk2.make b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make index fb14c7a95fa9..cc6c722a24e7 100644 --- a/configs/platform-v7a/rules/image-stm32mp157c-dk2.make +++ b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make @@ -11,7 +11,7 @@ # IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP157C_DK2) += image-stm32mp157c-dk2 -IMAGE_STM32MP157C_DK2_ENV := STM32MP_BOARD=stm32mp157c-dk2 +IMAGE_STM32MP157C_DK2_ENV := STM32MP_BOARD=stm32mp157c-dk2 SCMI= # # Paths and names diff --git a/configs/platform-v7a/rules/image-stm32mp157c-ev1.make b/configs/platform-v7a/rules/image-stm32mp157c-ev1.make index 297b0f639c7b..081e2d93948c 100644 --- a/configs/platform-v7a/rules/image-stm32mp157c-ev1.make +++ b/configs/platform-v7a/rules/image-stm32mp157c-ev1.make @@ -11,7 +11,7 @@ # IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP157C_EV1) += image-stm32mp157c-ev1 -IMAGE_STM32MP157C_EV1_ENV := STM32MP_BOARD=stm32mp157c-ev1 +IMAGE_STM32MP157C_EV1_ENV := STM32MP_BOARD=stm32mp157c-ev1 SCMI= # # Paths and names -- 2.39.2