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 08/12] v7a: barebox: enable STM32MP135F-DK support
Date: Fri, 15 Mar 2024 22:12:36 +0100	[thread overview]
Message-ID: <20240315211240.3016716-9-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240315211240.3016716-1-a.fatoum@pengutronix.de>

barebox has had support for the STM32MP135F-DK for a while, but only
recently was it extended to support the full shtick of talking to OP-TEE
to control clocks and resets. As the barebox version we have in DistroKit
supports this, let's enable building support for the development kit.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/barebox-stm32mp.config   | 24 ++++++++++++++++---
 .../platform-v7a/barebox-stm32mp.config.diff  | 22 ++++++++++++++++-
 configs/platform-v7a/dts/bootstate.dtsi       |  3 ++-
 .../platform-v7a/rules/barebox-stm32mp.make   |  3 ++-
 4 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/configs/platform-v7a/barebox-stm32mp.config b/configs/platform-v7a/barebox-stm32mp.config
index ba40c44bdb74..f2e61e7165c1 100644
--- a/configs/platform-v7a/barebox-stm32mp.config
+++ b/configs/platform-v7a/barebox-stm32mp.config
@@ -47,8 +47,9 @@ CONFIG_CPU_32v7=y
 #
 # CONFIG_BOOT_ENDIANNESS_SWITCH is not set
 CONFIG_ARCH_NR_GPIO=416
+CONFIG_ARCH_STM32MP13=y
 CONFIG_ARCH_STM32MP157=y
-# CONFIG_MACH_STM32MP13XX_DK is not set
+CONFIG_MACH_STM32MP13XX_DK=y
 CONFIG_MACH_STM32MP15XX_DKX=y
 CONFIG_MACH_LXA_MC1=y
 # CONFIG_MACH_SEEED_ODYSSEY is not set
@@ -216,6 +217,9 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
 #
 # OP-TEE loading
 #
+CONFIG_HAVE_OPTEE=y
+CONFIG_OPTEE_SIZE=0x03000000
+CONFIG_OPTEE_SHM_SIZE=0x400000
 # CONFIG_BOOTM_OPTEE is not set
 # end of OP-TEE loading
 
@@ -633,7 +637,9 @@ CONFIG_HAVE_CLK=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_OF_PROVIDER=y
+CONFIG_COMMON_CLK_STM32MP135=y
 CONFIG_COMMON_CLK_STM32MP157=y
+CONFIG_COMMON_CLK_SCMI=y
 CONFIG_COMMON_CLK_GPIO=y
 
 #
@@ -715,6 +721,7 @@ CONFIG_PWM=y
 CONFIG_PWM_STM32=y
 CONFIG_HWRNG=y
 CONFIG_HWRNG_STM32=y
+CONFIG_HW_RANDOM_OPTEE=y
 
 #
 # DMA support
@@ -752,6 +759,7 @@ CONFIG_NVMEM=y
 # CONFIG_NVMEM_SNVS_LPGPR is not set
 CONFIG_STM32_BSEC=y
 CONFIG_STM32_BSEC_WRITE=y
+CONFIG_STM32_BSEC_OPTEE_TA=y
 
 #
 # Bus devices
@@ -764,6 +772,7 @@ CONFIG_REGULATOR_STM32_PWR=y
 CONFIG_REGULATOR_STM32_VREFBUF=y
 CONFIG_REGULATOR_STPMIC1=y
 # CONFIG_REGULATOR_ANATOP is not set
+CONFIG_REGULATOR_ARM_SCMI=y
 
 #
 # Remoteproc drivers
@@ -776,6 +785,7 @@ CONFIG_ARCH_HAS_RESET_CONTROLLER=y
 CONFIG_RESET_CONTROLLER=y
 CONFIG_RESET_SIMPLE=y
 # CONFIG_RESET_IMX7 is not set
+CONFIG_RESET_SCMI=y
 # CONFIG_RTC_CLASS is not set
 
 #
@@ -786,7 +796,13 @@ CONFIG_RESET_SIMPLE=y
 #
 # ARM System Control and Management Interface Protocol
 #
-# CONFIG_ARM_SCMI_PROTOCOL is not set
+CONFIG_ARM_SCMI_PROTOCOL=y
+CONFIG_ARM_SCMI_HAVE_TRANSPORT=y
+CONFIG_ARM_SCMI_HAVE_SHMEM=y
+CONFIG_ARM_SCMI_HAVE_MSG=y
+CONFIG_ARM_SCMI_TRANSPORT_OPTEE=y
+CONFIG_ARM_SCMI_TRANSPORT_SMC=y
+# CONFIG_ARM_SCMI_POWER_DOMAIN is not set
 # end of ARM System Control and Management Interface Protocol
 # end of Firmware Drivers
 
@@ -851,7 +867,8 @@ CONFIG_STM32_FMC2_EBI=y
 CONFIG_RESET_STM32=y
 # CONFIG_VIRTIO_MENU is not set
 # CONFIG_MAILBOX is not set
-# CONFIG_TEE is not set
+CONFIG_TEE=y
+CONFIG_OPTEE=y
 # end of Drivers
 
 #
@@ -936,6 +953,7 @@ CONFIG_NLS=y
 CONFIG_ARCH_HAS_STACK_DUMP=y
 CONFIG_ARCH_HAS_DATA_ABORT_MASK=y
 CONFIG_ARCH_HAS_ZERO_PAGE=y
+CONFIG_IDR=y
 # end of Library routines
 
 #
diff --git a/configs/platform-v7a/barebox-stm32mp.config.diff b/configs/platform-v7a/barebox-stm32mp.config.diff
index eddcb3a5ef5b..5f8844e02d88 100644
--- a/configs/platform-v7a/barebox-stm32mp.config.diff
+++ b/configs/platform-v7a/barebox-stm32mp.config.diff
@@ -3,6 +3,7 @@
 CONFIG_ARCH_HAS_RESET_CONTROLLER=y
 CONFIG_ARCH_NR_GPIO=416
 CONFIG_ARCH_STM32=y
+CONFIG_ARCH_STM32MP13=y
 CONFIG_ARCH_STM32MP157=y
 CONFIG_ARCH_STM32MP=y
 # CONFIG_ARCH_TEXT_BASE is undefined
@@ -11,6 +12,13 @@ CONFIG_ARM_BOARD_APPEND_ATAG=y
 # CONFIG_ARM_BOARD_PREPEND_ATAG is not set
 CONFIG_ARM_PSCI_CLIENT=y
 CONFIG_ARM_PSCI_OF=y
+CONFIG_ARM_SCMI_HAVE_MSG=y
+CONFIG_ARM_SCMI_HAVE_SHMEM=y
+CONFIG_ARM_SCMI_HAVE_TRANSPORT=y
+# CONFIG_ARM_SCMI_POWER_DOMAIN is not set
+CONFIG_ARM_SCMI_PROTOCOL=y
+CONFIG_ARM_SCMI_TRANSPORT_OPTEE=y
+CONFIG_ARM_SCMI_TRANSPORT_SMC=y
 # CONFIG_ARM_SECURE_MONITOR is undefined
 CONFIG_AT803X_PHY=y
 # CONFIG_BOARD_ARM_GENERIC_DT is not set
@@ -30,6 +38,8 @@ CONFIG_CMD_POWEROFF=y
 # CONFIG_CMD_PWM is not set
 # CONFIG_CMD_SPI is undefined
 # CONFIG_CMD_STACKSMASH is not set
+CONFIG_COMMON_CLK_SCMI=y
+CONFIG_COMMON_CLK_STM32MP135=y
 CONFIG_COMMON_CLK_STM32MP157=y
 CONFIG_COMPILE_LOGLEVEL=6
 # CONFIG_CONSOLE_ACTIVATE_FIRST is not set
@@ -52,11 +62,14 @@ CONFIG_EEPROM_AT24=y
 CONFIG_GENERIC_PHY=y
 # CONFIG_GPIO_74164 is undefined
 # CONFIG_GPIO_RASPBERRYPI_EXP is undefined
+CONFIG_HAVE_OPTEE=y
 CONFIG_HWRNG_STM32=y
+CONFIG_HW_RANDOM_OPTEE=y
 # CONFIG_I2C_ALGOBIT is undefined
 # CONFIG_I2C_BCM283X is undefined
 # CONFIG_I2C_GPIO is not set
 CONFIG_I2C_STM32=y
+CONFIG_IDR=y
 CONFIG_LED_PWM=y
 # CONFIG_LED_TRIGGERS is not set
 # CONFIG_LIBFDT is undefined
@@ -71,7 +84,7 @@ CONFIG_MACH_LXA_MC1=y
 # CONFIG_MACH_RPI_CM3 is undefined
 # CONFIG_MACH_RPI_COMMON is undefined
 # CONFIG_MACH_SEEED_ODYSSEY is not set
-# CONFIG_MACH_STM32MP13XX_DK is not set
+CONFIG_MACH_STM32MP13XX_DK=y
 CONFIG_MACH_STM32MP15XX_DKX=y
 CONFIG_MACH_STM32MP15X_EV1=y
 # CONFIG_MCI_BCM283X is undefined
@@ -108,6 +121,9 @@ CONFIG_NVMEM=y
 # CONFIG_NVMEM_REBOOT_MODE is not set
 # CONFIG_NVMEM_RMEM is not set
 # CONFIG_NVMEM_SNVS_LPGPR is not set
+CONFIG_OPTEE=y
+CONFIG_OPTEE_SHM_SIZE=0x400000
+CONFIG_OPTEE_SIZE=0x03000000
 # CONFIG_PARTITION_DISK_EFI_GPT_COMPARE is not set
 # CONFIG_PARTITION_DISK_EFI_GPT_NO_FORCE is not set
 CONFIG_PBL_CONSOLE=y
@@ -122,6 +138,7 @@ CONFIG_PWM_STM32=y
 CONFIG_REGMAP_FORMATTED=y
 CONFIG_REGMAP_I2C=y
 # CONFIG_REGULATOR_ANATOP is not set
+CONFIG_REGULATOR_ARM_SCMI=y
 # CONFIG_REGULATOR_BCM283X is undefined
 CONFIG_REGULATOR_FIXED=y
 CONFIG_REGULATOR_STM32_PWR=y
@@ -130,6 +147,7 @@ CONFIG_REGULATOR_STPMIC1=y
 CONFIG_REMOTEPROC=y
 CONFIG_RESET_CONTROLLER=y
 # CONFIG_RESET_IMX7 is not set
+CONFIG_RESET_SCMI=y
 CONFIG_RESET_SIMPLE=y
 CONFIG_RESET_STM32=y
 # CONFIG_SPI is not set
@@ -139,6 +157,7 @@ CONFIG_STACKPROTECTOR=y
 CONFIG_STACKPROTECTOR_STRONG=y
 CONFIG_STACK_GUARD_PAGE=y
 CONFIG_STM32_BSEC=y
+CONFIG_STM32_BSEC_OPTEE_TA=y
 CONFIG_STM32_BSEC_WRITE=y
 CONFIG_STM32_FMC2_EBI=y
 CONFIG_STM32_IMAGE=y
@@ -146,6 +165,7 @@ CONFIG_STM32_IWDG_WATCHDOG=y
 CONFIG_STM32_REMOTEPROC=y
 # CONFIG_STPMIC1_WATCHDOG is not set
 # CONFIG_SYSCON_REBOOT_MODE is not set
+CONFIG_TEE=y
 CONFIG_THUMB2_BAREBOX=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_DWC2_GADGET=y
diff --git a/configs/platform-v7a/dts/bootstate.dtsi b/configs/platform-v7a/dts/bootstate.dtsi
index cd24d74d4aea..f65a601d9eee 100644
--- a/configs/platform-v7a/dts/bootstate.dtsi
+++ b/configs/platform-v7a/dts/bootstate.dtsi
@@ -107,7 +107,8 @@
 /** STM32MP1 ******************************************************************/
 #if defined(stm32mp157c_lxa_mc1_dts) || \
     defined(stm32mp157c_dk2_dts) || \
-    defined(stm32mp157c_ev1_dts)
+    defined(stm32mp157c_ev1_dts) || \
+    defined(stm32mp135f_dk_dts)
 / {
 	aliases {
 		state = &state_mmc0;
diff --git a/configs/platform-v7a/rules/barebox-stm32mp.make b/configs/platform-v7a/rules/barebox-stm32mp.make
index 5e4772565f1e..e39d7c12dbc9 100644
--- a/configs/platform-v7a/rules/barebox-stm32mp.make
+++ b/configs/platform-v7a/rules/barebox-stm32mp.make
@@ -50,7 +50,8 @@ BAREBOX_STM32MP_IMAGES := \
 BAREBOX_STM32MP_FIP_DTBS := \
 	stm32mp157c-dk2.dtb \
 	stm32mp157c-ev1.dtb \
-	stm32mp157c-lxa-mc1.dtb
+	stm32mp157c-lxa-mc1.dtb \
+	stm32mp135f-dk.dtb
 
 BAREBOX_STM32MP_IMAGES := $(addprefix $(BAREBOX_STM32MP_BUILD_DIR)/,$(BAREBOX_STM32MP_IMAGES))
 BAREBOX_STM32MP_FIP_DTBS := \
-- 
2.39.2




  parent reply	other threads:[~2024-03-15 21:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add " Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 01/12] ptxdist: migrate 2023.02.0 → 2024.03.0 Ahmad Fatoum
2024-03-16  9:26   ` Alexander Dahl
2024-03-17 19:14     ` Robert Schwebel
2024-03-21  9:37   ` Alexander Dahl
2024-03-25 18:45     ` [DistroKit] [PATCH] blspec-entry: remove superfluous file Roland Hieber
2024-03-25 20:51       ` Robert Schwebel
2024-03-15 21:12 ` [DistroKit] [PATCH 02/12] tf-a: update from v2.8 → v2.10 Ahmad Fatoum
2024-04-24 11:15   ` Alexander Dahl
2024-04-24 11:48     ` Ahmad Fatoum
2024-04-24 11:58       ` Alexander Dahl
2024-03-15 21:12 ` [DistroKit] [PATCH 03/12] v8a: imx8mq-evk: disable PCI nodes Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 04/12] v8a: update kernel from v6.6 → v6.8 Ahmad Fatoum
2024-03-16 11:18   ` Michael Olbrich
2024-03-16 13:09     ` Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 05/12] v8a: barebox: version bump v2023.12.0 → v2024.03.0 Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 06/12] v7a: update kernel from v6.6 → v6.8 Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 07/12] v7a: barebox: version bump v2024.01.0 → v2024.03.0 Ahmad Fatoum
2024-03-15 21:12 ` Ahmad Fatoum [this message]
2024-03-15 21:12 ` [DistroKit] [PATCH 09/12] v7a: build OP-TEE for STM32MP13 Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 10/12] v7a: stm32mp: add TF-A recipe " Ahmad Fatoum
2024-04-26  8:03   ` Alexander Dahl
2024-03-15 21:12 ` [DistroKit] [PATCH 11/12] v7a: kernel: enable STM32MP135F-DK support Ahmad Fatoum
2024-03-18 13:07   ` Michael Olbrich
2024-03-18 14:23     ` Robert Schwebel
2024-03-15 21:12 ` [DistroKit] [PATCH 12/12] v7a: stm32mp: add image recipe for STM32MP135F-DK Ahmad Fatoum
2024-03-17 19:27 ` [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support 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=20240315211240.3016716-9-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