DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [DistroKit] [PATCH 3/4] v7a: images: stm32mp: add support for building SCMI enabled images
Date: Tue,  2 Jul 2024 14:28:48 +0200	[thread overview]
Message-ID: <20240702122849.4008988-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240702122849.4008988-1-a.fatoum@pengutronix.de>

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 <a.fatoum@pengutronix.de>
---
 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




  parent reply	other threads:[~2024-07-02 12:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 12:28 [DistroKit] [PATCH 1/4] v7a: barebox: update to v2024.07.0 Ahmad Fatoum
2024-07-02 12:28 ` [DistroKit] [PATCH 2/4] v7a: barebox: derive stable MAC address from machine ID Ahmad Fatoum
2024-07-02 12:28 ` Ahmad Fatoum [this message]
2024-07-02 12:28 ` [DistroKit] [PATCH 4/4] v7a: lxa-mc1: add new image for -scmi variant Ahmad Fatoum
2024-07-03  9:13 ` [DistroKit] [PATCH 1/4] v7a: barebox: update to v2024.07.0 Robert Schwebel
2024-07-03  9:44   ` Ahmad Fatoum
2024-07-03  9:57     ` Robert Schwebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240702122849.4008988-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox