DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support
@ 2024-03-15 21:12 Ahmad Fatoum
  2024-03-15 21:12 ` [DistroKit] [PATCH 01/12] ptxdist: migrate 2023.02.0 → 2024.03.0 Ahmad Fatoum
                   ` (12 more replies)
  0 siblings, 13 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit

This series updates core components: PTXdist, TF-A, barebox and kernel
to their newest versions and then adds OP-TEE support to enable booting
DistroKit on the new STM32MP135F-DK.

Ahmad Fatoum (12):
  ptxdist: migrate 2023.02.0 → 2024.03.0
  tf-a: update from v2.8 → v2.10
  v8a: imx8mq-evk: disable PCI nodes
  v8a: update kernel from v6.6 → v6.8
  v8a: barebox: version bump v2023.12.0 → v2024.03.0
  v7a: update kernel from v6.6 → v6.8
  v7a: barebox: version bump v2024.01.0 → v2024.03.0
  v7a: barebox: enable STM32MP135F-DK support
  v7a: build OP-TEE for STM32MP13
  v7a: stm32mp: add TF-A recipe for STM32MP13
  v7a: kernel: enable STM32MP135F-DK support
  v7a: stm32mp: add image recipe for STM32MP135F-DK

 configs/platform-mips/platformconfig          |   4 +-
 configs/platform-mipsel/platformconfig        |   4 +-
 configs/platform-rpi1/platformconfig          |   4 +-
 .../platform-v7a/barebox-am335x-mlo.config    |  17 +-
 configs/platform-v7a/barebox-am335x.config    |  19 +-
 .../platform-v7a/barebox-am335x.config.diff   |   4 +-
 configs/platform-v7a/barebox-at91.config      |  18 +-
 configs/platform-v7a/barebox-at91.config.diff |   4 +-
 configs/platform-v7a/barebox-mx6.config       |  18 +-
 configs/platform-v7a/barebox-mx6.config.diff  |   2 +-
 configs/platform-v7a/barebox-rpi2.config      |  18 +-
 configs/platform-v7a/barebox-rpi2.config.diff |   2 +-
 configs/platform-v7a/barebox-stm32mp.config   |  42 ++-
 .../platform-v7a/barebox-stm32mp.config.diff  |  24 +-
 configs/platform-v7a/barebox-vexpress.config  |  18 +-
 .../platform-v7a/barebox-vexpress.config.diff |   2 +-
 configs/platform-v7a/barebox.config           |  18 +-
 .../config/images/stm32mp-optee.config        |  60 ++++
 configs/platform-v7a/dts/bootstate.dtsi       |   3 +-
 configs/platform-v7a/kernelconfig             | 129 +++++---
 ...ression-booting-without-VideoCore-DT.patch | 130 --------
 .../patches/barebox-2024.01.0/series          |   1 -
 configs/platform-v7a/platformconfig           |  27 +-
 .../platforms/image-stm32mp135f-dk.in         |  13 +
 .../platform-v7a/platforms/tf-a-stm32mp13.in  |  12 +
 .../platform-v7a/rules/barebox-stm32mp.make   |   3 +-
 .../rules/image-stm32mp135f-dk.make           |  34 ++
 .../platform-v7a/rules/tf-a-stm32mp13.make    | 110 +++++++
 configs/platform-v7a_noneon/platformconfig    |   4 +-
 .../init/disable-imx8mq-pci                   |   7 +
 configs/platform-v8a/barebox.config           |  36 ++-
 configs/platform-v8a/kernelconfig             | 121 +++++--
 configs/platform-v8a/platformconfig           |  16 +-
 configs/platform-x86_64/platformconfig        |   4 +-
 configs/ptxconfig                             |   8 +-
 ...DRAM-retention-by-default-on-i.MX8MQ.patch | 182 +++++++++++
 ...kage-on-ARMv7-CPUs-with-SP_min-as-BL.patch |  61 ++++
 ...ct-console-base-address-during-runti.patch |  69 ++++
 ...mx-disable-DRAM-retention-by-default.patch | 174 ++++++++++
 ...ct-console-base-address-during-runti.patch |  72 +++++
 ...kage-on-ARMv7-CPUs-with-SP_min-as-BL.patch |  57 ++++
 ...tomers-pengutronix-distrokit-2024031.patch |  21 ++
 patches/tf-a-v2.10/series                     |  19 ++
 ...-add-helper-to-detect-linker-options.patch |  35 --
 ...dd-support-for-new-binutils-versions.patch |  54 ----
 ...-IMX_BOOT_UART_BASE-configurable-via.patch |  41 ---
 ...remove-empty-bl31_plat_runtime_setup.patch |  30 --
 ...03-feat-imx8mq-always-set-up-console.patch |  51 ---
 ...imx8mq-make-use-of-setup_page_tables.patch |  53 ---
 ...-refactor-imx8mq-introduce-BL31_SIZE.patch |  54 ----
 ...106-feat-imx8mq-add-BL31-PIE-support.patch |  55 ----
 ...feat-imx8mq-add-support-for-gcc-12.x.patch |  45 ---
 ...t-console-base-address-during-runtim.patch | 304 ------------------
 ...MX_BOOT_UART_BASE-autodetection-opti.patch | 172 ----------
 ...omers-pengutronix-distrokit-20240117.patch |  21 --
 patches/tf-a-v2.8/series                      |  27 --
 56 files changed, 1322 insertions(+), 1211 deletions(-)
 create mode 100644 configs/platform-v7a/config/images/stm32mp-optee.config
 delete mode 100644 configs/platform-v7a/patches/barebox-2024.01.0/0001-ARM-rpi-fix-regression-booting-without-VideoCore-DT.patch
 delete mode 100644 configs/platform-v7a/patches/barebox-2024.01.0/series
 create mode 100644 configs/platform-v7a/platforms/image-stm32mp135f-dk.in
 create mode 100644 configs/platform-v7a/platforms/tf-a-stm32mp13.in
 create mode 100644 configs/platform-v7a/rules/image-stm32mp135f-dk.make
 create mode 100644 configs/platform-v7a/rules/tf-a-stm32mp13.make
 create mode 100755 configs/platform-v8a/barebox-common-defaultenv/init/disable-imx8mq-pci
 create mode 100644 patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8MQ.patch
 create mode 100644 patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
 create mode 100644 patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-runti.patch
 create mode 100644 patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
 create mode 100644 patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-runti.patch
 create mode 100644 patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
 create mode 100644 patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024031.patch
 create mode 100644 patches/tf-a-v2.10/series
 delete mode 100644 patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options.patch
 delete mode 100644 patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.patch
 delete mode 100644 patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via.patch
 delete mode 100644 patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.patch
 delete mode 100644 patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
 delete mode 100644 patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patch
 delete mode 100644 patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
 delete mode 100644 patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
 delete mode 100644 patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
 delete mode 100644 patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runtim.patch
 delete mode 100644 patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti.patch
 delete mode 100644 patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-20240117.patch
 delete mode 100644 patches/tf-a-v2.8/series

-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 01/12] ptxdist: migrate 2023.02.0 → 2024.03.0
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
@ 2024-03-15 21:12 ` Ahmad Fatoum
  2024-03-16  9:26   ` Alexander Dahl
  2024-03-21  9:37   ` Alexander Dahl
  2024-03-15 21:12 ` [DistroKit] [PATCH 02/12] tf-a: update from v2.8 → v2.10 Ahmad Fatoum
                   ` (11 subsequent siblings)
  12 siblings, 2 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

This lets us make use of the updated OP-TEE packages for the incoming
STM32MP13 support. Support in OP-TEE 3.20 is incomplete and will lead to
a crash on boot up:

  I/TC: Platform stm32mp1: flavor 135F_DK - DT stm32mp135f-dk.dts
  I/TC: Non-secure SYSRAM [0xddfff000 0xddffffff]
  I/TC: DTB enables console (non-secure)
  I/TC: Primary CPU switching to normal world boot
  E/TC:0   tzc_it_handler:26 TZC permission failure
  E/TC:0   dump_fail_filter:420 Permission violation on filter 0
  E/TC:0   dump_fail_filter:425 Violation @0xfcff7fe0, non-secure privileged write, AXI ID 420
  E/TC:0   Panic at core/arch/arm/plat-stm32mp1/plat_tzc400.c:30 <tzc_it_handler>
  E/TC:0   TEE load address @ 0xde000000
  E/TC:0   Call stack:
  E/TC:0    0xde00316d
  E/TC:0    0xde011b37
  E/TC:0    0xde005245
  E/TC:0    0xde011201
  E/TC:0    0xde037155
  E/TC:0    0xde000350

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-mips/platformconfig       | 4 ++--
 configs/platform-mipsel/platformconfig     | 4 ++--
 configs/platform-rpi1/platformconfig       | 4 ++--
 configs/platform-v7a/platformconfig        | 4 ++--
 configs/platform-v7a_noneon/platformconfig | 4 ++--
 configs/platform-v8a/platformconfig        | 4 ++--
 configs/platform-x86_64/platformconfig     | 4 ++--
 configs/ptxconfig                          | 8 ++++++--
 8 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/configs/platform-mips/platformconfig b/configs/platform-mips/platformconfig
index e81b89202920..a7483befeccc 100644
--- a/configs/platform-mips/platformconfig
+++ b/configs/platform-mips/platformconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# PTXdist 2024.02.0
+# PTXdist 2024.03.0
 #
 PTXCONF__platformconfig_MAGIC__=y
 
@@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
 PTXCONF_RUNTIME=y
 PTXCONF_BUILDTIME=y
 PTXCONF_VIRTUAL=y
-PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
+PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
 
 #
 # architecture                  
diff --git a/configs/platform-mipsel/platformconfig b/configs/platform-mipsel/platformconfig
index 292295087547..5e134a3f151f 100644
--- a/configs/platform-mipsel/platformconfig
+++ b/configs/platform-mipsel/platformconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# PTXdist 2024.02.0
+# PTXdist 2024.03.0
 #
 PTXCONF__platformconfig_MAGIC__=y
 
@@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
 PTXCONF_RUNTIME=y
 PTXCONF_BUILDTIME=y
 PTXCONF_VIRTUAL=y
-PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
+PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
 
 #
 # architecture                  
diff --git a/configs/platform-rpi1/platformconfig b/configs/platform-rpi1/platformconfig
index 919eb0251f6a..e0d0611313c7 100644
--- a/configs/platform-rpi1/platformconfig
+++ b/configs/platform-rpi1/platformconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# PTXdist 2024.02.0
+# PTXdist 2024.03.0
 #
 PTXCONF__platformconfig_MAGIC__=y
 
@@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
 PTXCONF_RUNTIME=y
 PTXCONF_BUILDTIME=y
 PTXCONF_VIRTUAL=y
-PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
+PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
 
 #
 # architecture                  
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 3525657da32c..f2b4d2b7a922 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# PTXdist 2024.02.0
+# PTXdist 2024.03.0
 #
 PTXCONF__platformconfig_MAGIC__=y
 
@@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
 PTXCONF_RUNTIME=y
 PTXCONF_BUILDTIME=y
 PTXCONF_VIRTUAL=y
-PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
+PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
 
 #
 # architecture                  
diff --git a/configs/platform-v7a_noneon/platformconfig b/configs/platform-v7a_noneon/platformconfig
index 5e0388e37e34..52fa2abf474f 100644
--- a/configs/platform-v7a_noneon/platformconfig
+++ b/configs/platform-v7a_noneon/platformconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# PTXdist 2024.02.0
+# PTXdist 2024.03.0
 #
 PTXCONF__platformconfig_MAGIC__=y
 
@@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
 PTXCONF_RUNTIME=y
 PTXCONF_BUILDTIME=y
 PTXCONF_VIRTUAL=y
-PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
+PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
 
 #
 # architecture                  
diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
index d91255f18b0e..f9168a8bc599 100644
--- a/configs/platform-v8a/platformconfig
+++ b/configs/platform-v8a/platformconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# PTXdist 2024.02.0
+# PTXdist 2024.03.0
 #
 PTXCONF__platformconfig_MAGIC__=y
 
@@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
 PTXCONF_RUNTIME=y
 PTXCONF_BUILDTIME=y
 PTXCONF_VIRTUAL=y
-PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
+PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
 
 #
 # architecture                  
diff --git a/configs/platform-x86_64/platformconfig b/configs/platform-x86_64/platformconfig
index a44daa041199..918bf8a375b0 100644
--- a/configs/platform-x86_64/platformconfig
+++ b/configs/platform-x86_64/platformconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# PTXdist 2024.02.0
+# PTXdist 2024.03.0
 #
 PTXCONF__platformconfig_MAGIC__=y
 
@@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
 PTXCONF_RUNTIME=y
 PTXCONF_BUILDTIME=y
 PTXCONF_VIRTUAL=y
-PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
+PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
 
 #
 # architecture                  
diff --git a/configs/ptxconfig b/configs/ptxconfig
index cb5e93990425..b5f4475d2c70 100644
--- a/configs/ptxconfig
+++ b/configs/ptxconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# PTXdist 2024.02.0
+# PTXdist 2024.03.0
 #
 PTXCONF_DATAPARTITION=y
 PTXCONF_RAUC_UDEV=y
@@ -69,7 +69,7 @@ PTXCONF_BSP=y
 PTXCONF_RUNTIME=y
 PTXCONF_BUILDTIME=y
 PTXCONF_VIRTUAL=y
-PTXCONF_CONFIGFILE_VERSION="2024.02.0"
+PTXCONF_CONFIGFILE_VERSION="2024.03.0"
 PTXCONF__ptxconfig_MAGIC__=y
 
 #
@@ -96,6 +96,7 @@ PTXCONF_HOST_QEMU_USR=y
 # PTXCONF_HOST_TESTFRAMEWORK is not set
 PTXCONF_HOST_ACL=y
 PTXCONF_HOST_CMAKE=y
+PTXCONF_HOST_DTC=y
 PTXCONF_HOST_FIGLET=y
 PTXCONF_HOST_FILE=y
 PTXCONF_HOST_FLEX=y
@@ -1815,6 +1816,7 @@ PTXCONF_ZSTD=y
 # PTXCONF_PYTHON3_PYBIND11 is not set
 # PTXCONF_PYTHON3_PYCPARSER is not set
 # PTXCONF_PYTHON3_PYCRYPTODOMEX is not set
+# PTXCONF_PYTHON3_PYOPENSSL is not set
 # PTXCONF_PYTHON3_PYPARSING is not set
 # PTXCONF_PYTHON3_PYRO is not set
 # PTXCONF_PYTHON3_PYSMI is not set
@@ -2241,6 +2243,7 @@ PTXCONF_RAUC_BAREBOX=y
 #
 # System Libraries              
 #
+# PTXCONF_ABSEIL_CPP is not set
 # PTXCONF_AML is not set
 # PTXCONF_ARGTABLE2 is not set
 # PTXCONF_ARMADILLO is not set
@@ -2714,6 +2717,7 @@ PTXCONF_JSON_GLIB=y
 # PTXCONF_TWOLAME is not set
 # PTXCONF_VORBIS_TOOLS is not set
 # PTXCONF_WEBRTC_AUDIO_PROCESSING is not set
+# PTXCONF_WEBRTC_AUDIO_PROCESSING1 is not set
 # end of sound                         
 
 #
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 02/12] tf-a: update from v2.8 → v2.10
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
  2024-03-15 21:12 ` [DistroKit] [PATCH 01/12] ptxdist: migrate 2023.02.0 → 2024.03.0 Ahmad Fatoum
@ 2024-03-15 21:12 ` Ahmad Fatoum
  2024-04-24 11:15   ` Alexander Dahl
  2024-03-15 21:12 ` [DistroKit] [PATCH 03/12] v8a: imx8mq-evk: disable PCI nodes Ahmad Fatoum
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

This lets us git rid of a fair number of patches we have, but in return
requires us to import three patches:

  - Fix link error for imx8mq-evk: The image got too big with addition
    of DRAM retention support, so this is now disabled by default:
    https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/27277

  - Support for automatic console base detection on i.MX8MQ. This was
    already in our patch stack, but wasn't submitted upstream, unlike
    the support for i.MX8MM, i.MX8MN and i.MXP. This has been rectified:
    https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/27278

  - STM32MP1 support with SP_min as BL31 instead of OP-TEE is broken
    since v2.10 was first released. This is due to PMU changes that
    were apparently only tested on ARMv8. Fixed here:
    https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/27162

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/platformconfig           |   4 +-
 configs/platform-v8a/platformconfig           |   4 +-
 ...DRAM-retention-by-default-on-i.MX8MQ.patch | 182 +++++++++++
 ...kage-on-ARMv7-CPUs-with-SP_min-as-BL.patch |  61 ++++
 ...ct-console-base-address-during-runti.patch |  69 ++++
 ...mx-disable-DRAM-retention-by-default.patch | 174 ++++++++++
 ...ct-console-base-address-during-runti.patch |  72 +++++
 ...kage-on-ARMv7-CPUs-with-SP_min-as-BL.patch |  57 ++++
 ...tomers-pengutronix-distrokit-2024031.patch |  21 ++
 patches/tf-a-v2.10/series                     |  19 ++
 ...-add-helper-to-detect-linker-options.patch |  35 --
 ...dd-support-for-new-binutils-versions.patch |  54 ----
 ...-IMX_BOOT_UART_BASE-configurable-via.patch |  41 ---
 ...remove-empty-bl31_plat_runtime_setup.patch |  30 --
 ...03-feat-imx8mq-always-set-up-console.patch |  51 ---
 ...imx8mq-make-use-of-setup_page_tables.patch |  53 ---
 ...-refactor-imx8mq-introduce-BL31_SIZE.patch |  54 ----
 ...106-feat-imx8mq-add-BL31-PIE-support.patch |  55 ----
 ...feat-imx8mq-add-support-for-gcc-12.x.patch |  45 ---
 ...t-console-base-address-during-runtim.patch | 304 ------------------
 ...MX_BOOT_UART_BASE-autodetection-opti.patch | 172 ----------
 ...omers-pengutronix-distrokit-20240117.patch |  21 --
 patches/tf-a-v2.8/series                      |  27 --
 23 files changed, 659 insertions(+), 946 deletions(-)
 create mode 100644 patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8MQ.patch
 create mode 100644 patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
 create mode 100644 patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-runti.patch
 create mode 100644 patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
 create mode 100644 patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-runti.patch
 create mode 100644 patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
 create mode 100644 patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024031.patch
 create mode 100644 patches/tf-a-v2.10/series
 delete mode 100644 patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options.patch
 delete mode 100644 patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.patch
 delete mode 100644 patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via.patch
 delete mode 100644 patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.patch
 delete mode 100644 patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
 delete mode 100644 patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patch
 delete mode 100644 patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
 delete mode 100644 patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
 delete mode 100644 patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
 delete mode 100644 patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runtim.patch
 delete mode 100644 patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti.patch
 delete mode 100644 patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-20240117.patch
 delete mode 100644 patches/tf-a-v2.8/series

diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index f2b4d2b7a922..80632f625c9b 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -202,8 +202,8 @@ PTXCONF_BOOTLOADER=y
 # PTXCONF_OPTEE is not set
 PTXCONF_TF_A=y
 PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot"
-PTXCONF_TF_A_VERSION="v2.8"
-PTXCONF_TF_A_MD5="784a1e94d4b1e938927372e3bc12d12e"
+PTXCONF_TF_A_VERSION="v2.10"
+PTXCONF_TF_A_MD5="641f42080967e05d687ef2fa9f8f3bc3"
 PTXCONF_TF_A_ARCH_STRING="aarch32"
 PTXCONF_TF_A_ARM_ARCH_MAJOR_7=y
 # PTXCONF_TF_A_ARM_ARCH_MAJOR_8_32_BIT is not set
diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
index f9168a8bc599..675874fc4a3c 100644
--- a/configs/platform-v8a/platformconfig
+++ b/configs/platform-v8a/platformconfig
@@ -206,8 +206,8 @@ PTXCONF_BOOTLOADER=y
 # PTXCONF_HOST_MXS_UTILS is not set
 PTXCONF_TF_A=y
 PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot"
-PTXCONF_TF_A_VERSION="v2.8"
-PTXCONF_TF_A_MD5="784a1e94d4b1e938927372e3bc12d12e"
+PTXCONF_TF_A_VERSION="v2.10"
+PTXCONF_TF_A_MD5="641f42080967e05d687ef2fa9f8f3bc3"
 PTXCONF_TF_A_ARCH_STRING="aarch64"
 PTXCONF_TF_A_ARM_ARCH_MAJOR_8=y
 PTXCONF_TF_A_ARM_ARCH_MAJOR=8
diff --git a/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8MQ.patch b/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8MQ.patch
new file mode 100644
index 000000000000..cab995bda37a
--- /dev/null
+++ b/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8MQ.patch
@@ -0,0 +1,182 @@
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Wed, 13 Mar 2024 08:08:13 +0100
+Subject: [PATCH] fix(imx): disable DRAM retention by default on i.MX8MQ
+
+Building the default upstream configuration for the imx8mq-evk is no longer
+possible: The linker will complain that the TF-A image would no longer
+fit On-Chip SRAM.
+
+In order to make the i.MX8MQ Image buildable again, let's make the DRAM
+retention feature optional: It was added in v2.9 and it's possible to
+boot the systems without it. Users that make space elsewhere and wish to
+enable it can use the newly introduced IMX_DRAM_RETENTION parameter to
+configure it. The parameter is added to all i.MX8M variants, but only
+for i.MX8MQ, we disable it by default, as that's the one that currently
+has binary size problems.
+
+Change-Id: I714f8ea96f18154db02390ba500f4a2dc5329ee7
+Fixes: dd108c3c1fe3 ("feat(imx8mq): add the dram retention support for imx8mq")
+Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
+---
+ plat/imx/common/include/imx_sip_svc.h | 8 ++++++++
+ plat/imx/imx8m/imx8mm/platform.mk     | 9 ++++++++-
+ plat/imx/imx8m/imx8mn/platform.mk     | 9 ++++++++-
+ plat/imx/imx8m/imx8mp/platform.mk     | 9 ++++++++-
+ plat/imx/imx8m/imx8mq/platform.mk     | 9 ++++++++-
+ plat/imx/imx8m/include/dram.h         | 8 +++++++-
+ 6 files changed, 47 insertions(+), 5 deletions(-)
+
+diff --git a/plat/imx/common/include/imx_sip_svc.h b/plat/imx/common/include/imx_sip_svc.h
+index 0e91c7174a52..5015eb6a1f11 100644
+--- a/plat/imx/common/include/imx_sip_svc.h
++++ b/plat/imx/common/include/imx_sip_svc.h
+@@ -57,8 +57,16 @@ int imx_soc_info_handler(uint32_t smc_fid, u_register_t x1,
+ 			 u_register_t x2, u_register_t x3);
+ int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
+ 		    u_register_t x2, u_register_t x3);
++#if IMX_DRAM_RETENTION
+ int dram_dvfs_handler(uint32_t smc_fid, void *handle,
+ 	u_register_t x1, u_register_t x2, u_register_t x3);
++#else
++static inline int dram_dvfs_handler(uint32_t smc_fid, void *handle,
++		u_register_t x1, u_register_t x2, u_register_t x3)
++{
++	SMC_RET1(handle, SMC_UNK);
++}
++#endif
+ #endif
+ #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
+ int dram_dvfs_handler(uint32_t smc_fid, void *handle,
+diff --git a/plat/imx/imx8m/imx8mm/platform.mk b/plat/imx/imx8m/imx8mm/platform.mk
+index 97f4f248824d..849ae5e4ca36 100644
+--- a/plat/imx/imx8m/imx8mm/platform.mk
++++ b/plat/imx/imx8m/imx8mm/platform.mk
+@@ -52,7 +52,6 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
+ 				drivers/delay_timer/delay_timer.c		\
+ 				drivers/delay_timer/generic_delay_timer.c	\
+ 				${XLAT_TABLES_LIB_SRCS}				\
+-				${IMX_DRAM_SOURCES}				\
+ 				${IMX_GIC_SOURCES}
+ 
+ ifeq (${NEED_BL2},yes)
+@@ -153,6 +152,14 @@ ERRATA_A53_835769	:=	1
+ ERRATA_A53_843419	:=	1
+ ERRATA_A53_855873	:=	1
+ 
++IMX_DRAM_RETENTION	?=	1
++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
++$(eval $(call add_define,IMX_DRAM_RETENTION))
++
++ifeq (${IMX_DRAM_RETENTION},1)
++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
++endif
++
+ BL32_BASE		?=	0xbe000000
+ $(eval $(call add_define,BL32_BASE))
+ 
+diff --git a/plat/imx/imx8m/imx8mn/platform.mk b/plat/imx/imx8m/imx8mn/platform.mk
+index e0826e29a88c..94d31a2681aa 100644
+--- a/plat/imx/imx8m/imx8mn/platform.mk
++++ b/plat/imx/imx8m/imx8mn/platform.mk
+@@ -46,7 +46,6 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
+ 				drivers/arm/tzc/tzc380.c			\
+ 				drivers/delay_timer/delay_timer.c		\
+ 				drivers/delay_timer/generic_delay_timer.c	\
+-				${IMX_DRAM_SOURCES}				\
+ 				${IMX_GIC_SOURCES}				\
+ 				${XLAT_TABLES_LIB_SRCS}
+ 
+@@ -59,6 +58,14 @@ ERRATA_A53_835769	:=	1
+ ERRATA_A53_843419	:=	1
+ ERRATA_A53_855873	:=	1
+ 
++IMX_DRAM_RETENTION	?=	1
++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
++$(eval $(call add_define,IMX_DRAM_RETENTION))
++
++ifeq (${IMX_DRAM_RETENTION},1)
++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
++endif
++
+ BL32_BASE		?=	0xbe000000
+ $(eval $(call add_define,BL32_BASE))
+ 
+diff --git a/plat/imx/imx8m/imx8mp/platform.mk b/plat/imx/imx8m/imx8mp/platform.mk
+index ce6907195152..1f699c4f26f0 100644
+--- a/plat/imx/imx8m/imx8mp/platform.mk
++++ b/plat/imx/imx8m/imx8mp/platform.mk
+@@ -47,7 +47,6 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
+ 				drivers/arm/tzc/tzc380.c			\
+ 				drivers/delay_timer/delay_timer.c		\
+ 				drivers/delay_timer/generic_delay_timer.c	\
+-				${IMX_DRAM_SOURCES}				\
+ 				${IMX_GIC_SOURCES}				\
+ 				${XLAT_TABLES_LIB_SRCS}
+ 
+@@ -150,6 +149,14 @@ ERRATA_A53_835769	:=	1
+ ERRATA_A53_843419	:=	1
+ ERRATA_A53_855873	:=	1
+ 
++IMX_DRAM_RETENTION	?=	1
++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
++$(eval $(call add_define,IMX_DRAM_RETENTION))
++
++ifeq (${IMX_DRAM_RETENTION},1)
++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
++endif
++
+ BL32_BASE		?=	0x56000000
+ $(eval $(call add_define,BL32_BASE))
+ 
+diff --git a/plat/imx/imx8m/imx8mq/platform.mk b/plat/imx/imx8m/imx8mq/platform.mk
+index b1c189fa09f5..b48449725791 100644
+--- a/plat/imx/imx8m/imx8mq/platform.mk
++++ b/plat/imx/imx8m/imx8mq/platform.mk
+@@ -42,7 +42,6 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
+ 				drivers/delay_timer/delay_timer.c		\
+ 				drivers/delay_timer/generic_delay_timer.c	\
+ 				${XLAT_TABLES_LIB_SRCS}				\
+-				${IMX_DRAM_SOURCES}				\
+ 				${IMX_GIC_SOURCES}
+ 
+ ENABLE_PIE		:=	1
+@@ -55,6 +54,14 @@ ERRATA_A53_835769	:=	1
+ ERRATA_A53_843419	:=	1
+ ERRATA_A53_855873	:=	1
+ 
++IMX_DRAM_RETENTION	?=	0
++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
++$(eval $(call add_define,IMX_DRAM_RETENTION))
++
++ifeq (${IMX_DRAM_RETENTION},1)
++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
++endif
++
+ BL32_BASE		?=	0xfe000000
+ $(eval $(call add_define,BL32_BASE))
+ 
+diff --git a/plat/imx/imx8m/include/dram.h b/plat/imx/imx8m/include/dram.h
+index 719c39063778..1cf0666e9cad 100644
+--- a/plat/imx/imx8m/include/dram.h
++++ b/plat/imx/imx8m/include/dram.h
+@@ -70,13 +70,19 @@ struct dram_info {
+ 
+ extern struct dram_info dram_info;
+ 
+-void dram_info_init(unsigned long dram_timing_base);
+ void dram_umctl2_init(struct dram_timing_info *timing);
+ void dram_phy_init(struct dram_timing_info *timing);
+ 
+ /* dram retention */
++#if IMX_DRAM_RETENTION
++void dram_info_init(unsigned long dram_timing_base);
+ void dram_enter_retention(void);
+ void dram_exit_retention(void);
++#else
++static inline void dram_info_init(unsigned long dram_timing_base) {}
++static inline void dram_enter_retention(void) {}
++static inline void dram_exit_retention(void) {}
++#endif
+ 
+ void dram_clock_switch(unsigned int target_drate, bool bypass_mode);
+ 
diff --git a/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch b/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
new file mode 100644
index 000000000000..745e171b40e3
--- /dev/null
+++ b/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
@@ -0,0 +1,61 @@
+From 44f35b67ee4f89b05408ecfe7b4b2c1ae5366b72 Mon Sep 17 00:00:00 2001
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Tue, 12 Mar 2024 18:36:46 +0100
+Subject: [PATCH 1/3] fix(pmu): fix breakage on ARMv7 CPUs with SP_min as BL32
+
+While comments introduced with the original commit claim that
+pmuv3_disable_el3()/pmuv3_init_el3() are compatible with PMUv2 and
+PMUv1, this is not true in practice: The function accesses the Secure
+Debug Control Register (SDCR), which only available to ARMv8 CPUs.
+
+ARMv8 CPUs executing in AArch32 mode would thus be able to disable
+their PMUv3, while ARMv7 CPUs would hang trying to access the SDCR.
+
+Fix this by only doing PMUv3 handling when we know a PMUv3 to be
+available. This resolves boot hanging on all STM32MP15 platforms
+that use SP_min as BL32 instead of OP-TEE.
+
+Change-Id: I40f7611cf46b89a30243cc55bf55a8d9c9de93c8
+Fixes: c73686a11cea ("feat(pmu): introduce pmuv3 lib/extensions folder")
+Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
+---
+ lib/el3_runtime/aarch32/context_mgmt.c | 7 ++-----
+ lib/extensions/pmuv3/aarch32/pmuv3.c   | 4 ----
+ 2 files changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/lib/el3_runtime/aarch32/context_mgmt.c b/lib/el3_runtime/aarch32/context_mgmt.c
+index b60b8e0f05d0..72af43d3dcb0 100644
+--- a/lib/el3_runtime/aarch32/context_mgmt.c
++++ b/lib/el3_runtime/aarch32/context_mgmt.c
+@@ -149,11 +149,8 @@ static void enable_extensions_nonsecure(bool el2_unused)
+ 		trf_init_el3();
+ 	}
+ 
+-	/*
+-	 * Also applies to PMU < v3. The PMU is only disabled for EL3 and Secure
+-	 * state execution. This does not affect lower NS ELs.
+-	 */
+-	pmuv3_init_el3();
++	if (read_feat_pmuv3_id_field() >= 3)
++		pmuv3_init_el3();
+ #endif /*  IMAGE_BL32 */
+ }
+ 
+diff --git a/lib/extensions/pmuv3/aarch32/pmuv3.c b/lib/extensions/pmuv3/aarch32/pmuv3.c
+index effb7e02dc29..456a48efb0fb 100644
+--- a/lib/extensions/pmuv3/aarch32/pmuv3.c
++++ b/lib/extensions/pmuv3/aarch32/pmuv3.c
+@@ -25,10 +25,6 @@ static u_register_t mtpmu_disable_el3(u_register_t sdcr)
+ 	return sdcr;
+ }
+ 
+-/*
+- * Applies to all PMU versions. Name is PMUv3 for compatibility with aarch64 and
+- * to not clash with platforms which reuse the PMU name
+- */
+ void pmuv3_init_el3(void)
+ {
+ 	u_register_t sdcr = read_sdcr();
+-- 
+2.39.2
+
diff --git a/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-runti.patch b/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-runti.patch
new file mode 100644
index 000000000000..c48833730753
--- /dev/null
+++ b/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-runti.patch
@@ -0,0 +1,69 @@
+From aeb68be64c5c47142de3c95a8961749f7b33030a Mon Sep 17 00:00:00 2001
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Wed, 13 Mar 2024 02:08:54 +0100
+Subject: [PATCH 2/3] feat(imx8mq): detect console base address during runtime
+
+Change-Id: I9ba70f7068e762da979bd103390fa006c3a5d480
+---
+ plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 8 +++++++-
+ plat/imx/imx8m/imx8mq/platform.mk         | 4 ++++
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
+index 7065a658614f..70c2def7d18b 100644
+--- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
++++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
+@@ -26,6 +26,7 @@
+ #include <imx_aipstz.h>
+ #include <imx_uart.h>
+ #include <imx8m_caam.h>
++#include <imx8m_ccm.h>
+ #include <plat_imx8.h>
+ 
+ #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
+@@ -145,6 +146,7 @@ static void bl31_tz380_setup(void)
+ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+ 			u_register_t arg2, u_register_t arg3)
+ {
++	unsigned int console_base = IMX_BOOT_UART_BASE;
+ 	static console_t console;
+ 	int i;
+ 	/* enable CSU NS access permission */
+@@ -154,7 +156,11 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+ 
+ 	imx_aipstz_init(aipstz);
+ 
+-	console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
++	if (console_base == 0U) {
++		console_base = imx8m_uart_get_base();
++	}
++
++	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
+ 		IMX_CONSOLE_BAUDRATE, &console);
+ 	/* This console is only used for boot stage */
+ 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
+diff --git a/plat/imx/imx8m/imx8mq/platform.mk b/plat/imx/imx8m/imx8mq/platform.mk
+index b1c189fa09f5..648159eb3d10 100644
+--- a/plat/imx/imx8m/imx8mq/platform.mk
++++ b/plat/imx/imx8m/imx8mq/platform.mk
+@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
+ 				plat/imx/imx8m/gpc_common.c			\
+ 				plat/imx/imx8m/imx_aipstz.c			\
+ 				plat/imx/imx8m/imx8m_caam.c			\
++				plat/imx/imx8m/imx8m_ccm.c			\
+ 				plat/imx/imx8m/imx8m_psci_common.c		\
+ 				plat/imx/imx8m/imx8mq/gpc.c			\
+ 				plat/imx/common/imx8_topology.c			\
+@@ -62,6 +63,9 @@ BL32_SIZE		?=	0x2000000
+ $(eval $(call add_define,BL32_SIZE))
+ 
+ IMX_BOOT_UART_BASE	?=	0x30860000
++ifeq (${IMX_BOOT_UART_BASE},auto)
++    override IMX_BOOT_UART_BASE	:=	0
++endif
+ $(eval $(call add_define,IMX_BOOT_UART_BASE))
+ 
+ ifeq (${SPD},trusty)
+-- 
+2.39.2
+
diff --git a/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch b/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
new file mode 100644
index 000000000000..7d2b36119599
--- /dev/null
+++ b/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
@@ -0,0 +1,174 @@
+From 5d2f3f48a66a1f3f90d35679920832569100ed35 Mon Sep 17 00:00:00 2001
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Wed, 13 Mar 2024 08:08:13 +0100
+Subject: [PATCH 3/3] imx: disable DRAM retention by default
+
+Building the default upstream configuration is no longer possible
+
+Change-Id: I714f8ea96f18154db02390ba500f4a2dc5329ee7
+---
+ plat/imx/common/include/imx_sip_svc.h | 8 ++++++++
+ plat/imx/imx8m/imx8mm/platform.mk     | 9 ++++++++-
+ plat/imx/imx8m/imx8mn/platform.mk     | 9 ++++++++-
+ plat/imx/imx8m/imx8mp/platform.mk     | 9 ++++++++-
+ plat/imx/imx8m/imx8mq/platform.mk     | 9 ++++++++-
+ plat/imx/imx8m/include/dram.h         | 8 +++++++-
+ 6 files changed, 47 insertions(+), 5 deletions(-)
+
+diff --git a/plat/imx/common/include/imx_sip_svc.h b/plat/imx/common/include/imx_sip_svc.h
+index 0e91c7174a52..5015eb6a1f11 100644
+--- a/plat/imx/common/include/imx_sip_svc.h
++++ b/plat/imx/common/include/imx_sip_svc.h
+@@ -57,8 +57,16 @@ int imx_soc_info_handler(uint32_t smc_fid, u_register_t x1,
+ 			 u_register_t x2, u_register_t x3);
+ int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
+ 		    u_register_t x2, u_register_t x3);
++#if IMX_DRAM_RETENTION
+ int dram_dvfs_handler(uint32_t smc_fid, void *handle,
+ 	u_register_t x1, u_register_t x2, u_register_t x3);
++#else
++static inline int dram_dvfs_handler(uint32_t smc_fid, void *handle,
++		u_register_t x1, u_register_t x2, u_register_t x3)
++{
++	SMC_RET1(handle, SMC_UNK);
++}
++#endif
+ #endif
+ #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
+ int dram_dvfs_handler(uint32_t smc_fid, void *handle,
+diff --git a/plat/imx/imx8m/imx8mm/platform.mk b/plat/imx/imx8m/imx8mm/platform.mk
+index 97f4f248824d..849ae5e4ca36 100644
+--- a/plat/imx/imx8m/imx8mm/platform.mk
++++ b/plat/imx/imx8m/imx8mm/platform.mk
+@@ -52,7 +52,6 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
+ 				drivers/delay_timer/delay_timer.c		\
+ 				drivers/delay_timer/generic_delay_timer.c	\
+ 				${XLAT_TABLES_LIB_SRCS}				\
+-				${IMX_DRAM_SOURCES}				\
+ 				${IMX_GIC_SOURCES}
+ 
+ ifeq (${NEED_BL2},yes)
+@@ -153,6 +152,14 @@ ERRATA_A53_835769	:=	1
+ ERRATA_A53_843419	:=	1
+ ERRATA_A53_855873	:=	1
+ 
++IMX_DRAM_RETENTION	?=	1
++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
++$(eval $(call add_define,IMX_DRAM_RETENTION))
++
++ifeq (${IMX_DRAM_RETENTION},1)
++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
++endif
++
+ BL32_BASE		?=	0xbe000000
+ $(eval $(call add_define,BL32_BASE))
+ 
+diff --git a/plat/imx/imx8m/imx8mn/platform.mk b/plat/imx/imx8m/imx8mn/platform.mk
+index e0826e29a88c..94d31a2681aa 100644
+--- a/plat/imx/imx8m/imx8mn/platform.mk
++++ b/plat/imx/imx8m/imx8mn/platform.mk
+@@ -46,7 +46,6 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
+ 				drivers/arm/tzc/tzc380.c			\
+ 				drivers/delay_timer/delay_timer.c		\
+ 				drivers/delay_timer/generic_delay_timer.c	\
+-				${IMX_DRAM_SOURCES}				\
+ 				${IMX_GIC_SOURCES}				\
+ 				${XLAT_TABLES_LIB_SRCS}
+ 
+@@ -59,6 +58,14 @@ ERRATA_A53_835769	:=	1
+ ERRATA_A53_843419	:=	1
+ ERRATA_A53_855873	:=	1
+ 
++IMX_DRAM_RETENTION	?=	1
++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
++$(eval $(call add_define,IMX_DRAM_RETENTION))
++
++ifeq (${IMX_DRAM_RETENTION},1)
++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
++endif
++
+ BL32_BASE		?=	0xbe000000
+ $(eval $(call add_define,BL32_BASE))
+ 
+diff --git a/plat/imx/imx8m/imx8mp/platform.mk b/plat/imx/imx8m/imx8mp/platform.mk
+index ce6907195152..1f699c4f26f0 100644
+--- a/plat/imx/imx8m/imx8mp/platform.mk
++++ b/plat/imx/imx8m/imx8mp/platform.mk
+@@ -47,7 +47,6 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
+ 				drivers/arm/tzc/tzc380.c			\
+ 				drivers/delay_timer/delay_timer.c		\
+ 				drivers/delay_timer/generic_delay_timer.c	\
+-				${IMX_DRAM_SOURCES}				\
+ 				${IMX_GIC_SOURCES}				\
+ 				${XLAT_TABLES_LIB_SRCS}
+ 
+@@ -150,6 +149,14 @@ ERRATA_A53_835769	:=	1
+ ERRATA_A53_843419	:=	1
+ ERRATA_A53_855873	:=	1
+ 
++IMX_DRAM_RETENTION	?=	1
++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
++$(eval $(call add_define,IMX_DRAM_RETENTION))
++
++ifeq (${IMX_DRAM_RETENTION},1)
++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
++endif
++
+ BL32_BASE		?=	0x56000000
+ $(eval $(call add_define,BL32_BASE))
+ 
+diff --git a/plat/imx/imx8m/imx8mq/platform.mk b/plat/imx/imx8m/imx8mq/platform.mk
+index 648159eb3d10..f61620bd4224 100644
+--- a/plat/imx/imx8m/imx8mq/platform.mk
++++ b/plat/imx/imx8m/imx8mq/platform.mk
+@@ -43,7 +43,6 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
+ 				drivers/delay_timer/delay_timer.c		\
+ 				drivers/delay_timer/generic_delay_timer.c	\
+ 				${XLAT_TABLES_LIB_SRCS}				\
+-				${IMX_DRAM_SOURCES}				\
+ 				${IMX_GIC_SOURCES}
+ 
+ ENABLE_PIE		:=	1
+@@ -56,6 +55,14 @@ ERRATA_A53_835769	:=	1
+ ERRATA_A53_843419	:=	1
+ ERRATA_A53_855873	:=	1
+ 
++IMX_DRAM_RETENTION	?=	0
++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
++$(eval $(call add_define,IMX_DRAM_RETENTION))
++
++ifeq (${IMX_DRAM_RETENTION},1)
++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
++endif
++
+ BL32_BASE		?=	0xfe000000
+ $(eval $(call add_define,BL32_BASE))
+ 
+diff --git a/plat/imx/imx8m/include/dram.h b/plat/imx/imx8m/include/dram.h
+index 719c39063778..1cf0666e9cad 100644
+--- a/plat/imx/imx8m/include/dram.h
++++ b/plat/imx/imx8m/include/dram.h
+@@ -70,13 +70,19 @@ struct dram_info {
+ 
+ extern struct dram_info dram_info;
+ 
+-void dram_info_init(unsigned long dram_timing_base);
+ void dram_umctl2_init(struct dram_timing_info *timing);
+ void dram_phy_init(struct dram_timing_info *timing);
+ 
+ /* dram retention */
++#if IMX_DRAM_RETENTION
++void dram_info_init(unsigned long dram_timing_base);
+ void dram_enter_retention(void);
+ void dram_exit_retention(void);
++#else
++static inline void dram_info_init(unsigned long dram_timing_base) {}
++static inline void dram_enter_retention(void) {}
++static inline void dram_exit_retention(void) {}
++#endif
+ 
+ void dram_clock_switch(unsigned int target_drate, bool bypass_mode);
+ 
+-- 
+2.39.2
+
diff --git a/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-runti.patch b/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-runti.patch
new file mode 100644
index 000000000000..d375a45c1598
--- /dev/null
+++ b/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-runti.patch
@@ -0,0 +1,72 @@
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Wed, 13 Mar 2024 02:08:54 +0100
+Subject: [PATCH] feat(imx8mq): detect console base address during runtime
+
+On the i.MX8M SoCs, TF-A doesn't itself initialize the UART, but depends
+on BL2 to set it up beforehand. To allow using the same TF-A binary on
+boards with different UART assignment, TF-A On i.MX8M M/N/P supports
+dynamically determining the UART in use. The code is also applicable to
+the i.MX8MQ, so enable it there too.
+
+Change-Id: I9ba70f7068e762da979bd103390fa006c3a5d480
+Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
+---
+ plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 8 +++++++-
+ plat/imx/imx8m/imx8mq/platform.mk         | 4 ++++
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
+index 7065a658614f..70c2def7d18b 100644
+--- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
++++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
+@@ -26,6 +26,7 @@
+ #include <imx_aipstz.h>
+ #include <imx_uart.h>
+ #include <imx8m_caam.h>
++#include <imx8m_ccm.h>
+ #include <plat_imx8.h>
+ 
+ #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
+@@ -145,6 +146,7 @@ static void bl31_tz380_setup(void)
+ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+ 			u_register_t arg2, u_register_t arg3)
+ {
++	unsigned int console_base = IMX_BOOT_UART_BASE;
+ 	static console_t console;
+ 	int i;
+ 	/* enable CSU NS access permission */
+@@ -154,7 +156,11 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
+ 
+ 	imx_aipstz_init(aipstz);
+ 
+-	console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
++	if (console_base == 0U) {
++		console_base = imx8m_uart_get_base();
++	}
++
++	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
+ 		IMX_CONSOLE_BAUDRATE, &console);
+ 	/* This console is only used for boot stage */
+ 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
+diff --git a/plat/imx/imx8m/imx8mq/platform.mk b/plat/imx/imx8m/imx8mq/platform.mk
+index b48449725791..f61620bd4224 100644
+--- a/plat/imx/imx8m/imx8mq/platform.mk
++++ b/plat/imx/imx8m/imx8mq/platform.mk
+@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
+ 				plat/imx/imx8m/gpc_common.c			\
+ 				plat/imx/imx8m/imx_aipstz.c			\
+ 				plat/imx/imx8m/imx8m_caam.c			\
++				plat/imx/imx8m/imx8m_ccm.c			\
+ 				plat/imx/imx8m/imx8m_psci_common.c		\
+ 				plat/imx/imx8m/imx8mq/gpc.c			\
+ 				plat/imx/common/imx8_topology.c			\
+@@ -69,6 +70,9 @@ BL32_SIZE		?=	0x2000000
+ $(eval $(call add_define,BL32_SIZE))
+ 
+ IMX_BOOT_UART_BASE	?=	0x30860000
++ifeq (${IMX_BOOT_UART_BASE},auto)
++    override IMX_BOOT_UART_BASE	:=	0
++endif
+ $(eval $(call add_define,IMX_BOOT_UART_BASE))
+ 
+ ifeq (${SPD},trusty)
diff --git a/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch b/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
new file mode 100644
index 000000000000..60abc4862d7c
--- /dev/null
+++ b/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
@@ -0,0 +1,57 @@
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Tue, 12 Mar 2024 18:36:46 +0100
+Subject: [PATCH] fix(pmu): fix breakage on ARMv7 CPUs with SP_min as BL32
+
+While comments introduced with the original commit claim that
+pmuv3_disable_el3()/pmuv3_init_el3() are compatible with PMUv2 and
+PMUv1, this is not true in practice: The function accesses the Secure
+Debug Control Register (SDCR), which only available to ARMv8 CPUs.
+
+ARMv8 CPUs executing in AArch32 mode would thus be able to disable
+their PMUv3, while ARMv7 CPUs would hang trying to access the SDCR.
+
+Fix this by only doing PMUv3 handling when we know a PMUv3 to be
+available. This resolves boot hanging on all STM32MP15 platforms
+that use SP_min as BL32 instead of OP-TEE.
+
+Change-Id: I40f7611cf46b89a30243cc55bf55a8d9c9de93c8
+Fixes: c73686a11cea ("feat(pmu): introduce pmuv3 lib/extensions folder")
+Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
+---
+ lib/el3_runtime/aarch32/context_mgmt.c | 7 ++-----
+ lib/extensions/pmuv3/aarch32/pmuv3.c   | 4 ----
+ 2 files changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/lib/el3_runtime/aarch32/context_mgmt.c b/lib/el3_runtime/aarch32/context_mgmt.c
+index b60b8e0f05d0..72af43d3dcb0 100644
+--- a/lib/el3_runtime/aarch32/context_mgmt.c
++++ b/lib/el3_runtime/aarch32/context_mgmt.c
+@@ -149,11 +149,8 @@ static void enable_extensions_nonsecure(bool el2_unused)
+ 		trf_init_el3();
+ 	}
+ 
+-	/*
+-	 * Also applies to PMU < v3. The PMU is only disabled for EL3 and Secure
+-	 * state execution. This does not affect lower NS ELs.
+-	 */
+-	pmuv3_init_el3();
++	if (read_feat_pmuv3_id_field() >= 3)
++		pmuv3_init_el3();
+ #endif /*  IMAGE_BL32 */
+ }
+ 
+diff --git a/lib/extensions/pmuv3/aarch32/pmuv3.c b/lib/extensions/pmuv3/aarch32/pmuv3.c
+index effb7e02dc29..456a48efb0fb 100644
+--- a/lib/extensions/pmuv3/aarch32/pmuv3.c
++++ b/lib/extensions/pmuv3/aarch32/pmuv3.c
+@@ -25,10 +25,6 @@ static u_register_t mtpmu_disable_el3(u_register_t sdcr)
+ 	return sdcr;
+ }
+ 
+-/*
+- * Applies to all PMU versions. Name is PMUv3 for compatibility with aarch64 and
+- * to not clash with platforms which reuse the PMU name
+- */
+ void pmuv3_init_el3(void)
+ {
+ 	u_register_t sdcr = read_sdcr();
diff --git a/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024031.patch b/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024031.patch
new file mode 100644
index 000000000000..58cbc06803cb
--- /dev/null
+++ b/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024031.patch
@@ -0,0 +1,21 @@
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Fri, 15 Mar 2024 21:18:29 +0100
+Subject: [PATCH] Release 2.10/customers/pengutronix/distrokit/20240315-1
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 97c3c1548a78..56556db0be78 100644
+--- a/Makefile
++++ b/Makefile
+@@ -222,7 +222,7 @@ endif #(Debug)
+ ifeq (${BUILD_STRING},)
+ 	BUILD_STRING  :=  $(shell git describe --always --dirty --tags 2> /dev/null)
+ endif
+-VERSION_STRING    :=  v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}
++VERSION_STRING    :=  v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}-20240315-1
+ 
+ ifeq (${AARCH32_INSTRUCTION_SET},A32)
+ 	TF_CFLAGS_aarch32	+=	-marm
diff --git a/patches/tf-a-v2.10/series b/patches/tf-a-v2.10/series
new file mode 100644
index 000000000000..4dd620f0aa06
--- /dev/null
+++ b/patches/tf-a-v2.10/series
@@ -0,0 +1,19 @@
+# umpf-base: v2.10
+# umpf-name: 2.10/customers/pengutronix/distrokit
+# umpf-version: 2.10/customers/pengutronix/distrokit/20240315-1
+# umpf-topic: v2.10/topic/imx8mq-size
+# umpf-hashinfo: a972970be20be852b0d48576dfb1c233612efbdd
+# umpf-topic-range: b6c0948400594e3cc4dbb5a4ef04b815d2675808..6c0660bf6047f288628c282e44b9b1b06bd1d33a
+0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8MQ.patch
+# umpf-topic: v2.10/topic/imx8mq-console
+# umpf-hashinfo: 252b1100fb3c424e0fe1043e60414c3d7e0fa675
+# umpf-topic-range: 6c0660bf6047f288628c282e44b9b1b06bd1d33a..ec9b46be3c0c561ed61f113dc3c15085dbce5bf7
+0101-feat-imx8mq-detect-console-base-address-during-runti.patch
+# umpf-topic: v2.10/topic/stm32mp1
+# umpf-hashinfo: 44f35b67ee4f89b05408ecfe7b4b2c1ae5366b72
+# umpf-topic-range: ec9b46be3c0c561ed61f113dc3c15085dbce5bf7..10dfac53fdfff2f98d8140863f583df472483f1d
+0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
+# umpf-release: 2.10/customers/pengutronix/distrokit/20240315-1
+# umpf-topic-range: 10dfac53fdfff2f98d8140863f583df472483f1d..288664026c3117bda3f8f2275e76bb97be116b89
+0301-Release-2.10-customers-pengutronix-distrokit-2024031.patch
+# umpf-end
diff --git a/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options.patch b/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options.patch
deleted file mode 100644
index e86f31b8858a..000000000000
--- a/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From: Marco Felsch <m.felsch@pengutronix.de>
-Date: Thu, 24 Nov 2022 11:02:05 +0100
-Subject: [PATCH] build(makefile): add helper to detect linker options
-
-This is a small helper to check for possible linker options. If the
-linker supports the requested option it is returned and if not nothing
-will be returned, e.g.:
-
-  TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
-
-can be called unconditional.
-
-Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
-Change-Id: I236800852ece49948ff53a0b91fddba53c8f0f95
----
- make_helpers/build_macros.mk | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
-index 426e344941d9..7d0b0a511226 100644
---- a/make_helpers/build_macros.mk
-+++ b/make_helpers/build_macros.mk
-@@ -86,6 +86,12 @@ define assert_numerics
-     $(foreach num,$1,$(eval $(call assert_numeric,$(num))))
- endef
- 
-+# Convenience function to check for a given linker option. An call to
-+# $(call ld_option, --no-XYZ) will return --no-XYZ if supported by the linker
-+define ld_option
-+	$(shell if $(LD) $(1) -v >/dev/null 2>&1; then echo $(1); fi )
-+endef
-+
- # CREATE_SEQ is a recursive function to create sequence of numbers from 1 to
- # $(2) and assign the sequence to $(1)
- define CREATE_SEQ
diff --git a/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.patch b/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.patch
deleted file mode 100644
index b254a578d7d4..000000000000
--- a/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From: Marco Felsch <m.felsch@pengutronix.de>
-Date: Wed, 9 Nov 2022 12:59:09 +0100
-Subject: [PATCH] feat(build): add support for new binutils versions
-
-Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
-of a new warning when linking the bl*.elf in the form:
-
-  ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack
-  ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
-  ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions
-  ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions
-
-These new warnings are enbaled by default to secure elf binaries:
- - https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
- - https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774
-
-Fix it in a similar way to what the Linux kernel does, see:
-https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.com/
-
-Following the reasoning there, we set "-z noexecstack" for all linkers
-(although LLVM's LLD defaults to it) and optional add
---no-warn-rwx-segments since this a ld.bfd related.
-
-Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
-Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
-Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
----
- Makefile | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/Makefile b/Makefile
-index 1ddb7b84417d..1bfff716485a 100644
---- a/Makefile
-+++ b/Makefile
-@@ -416,6 +416,8 @@ endif
- 
- GCC_V_OUTPUT		:=	$(shell $(CC) -v 2>&1)
- 
-+TF_LDFLAGS		+=	-z noexecstack
-+
- # LD = armlink
- ifneq ($(findstring armlink,$(notdir $(LD))),)
- TF_LDFLAGS		+=	--diag_error=warning --lto_level=O1
-@@ -451,6 +453,10 @@ TF_LDFLAGS		+=	$(TF_LDFLAGS_$(ARCH))
- endif
- endif
- 
-+# With ld.bfd version 2.29 and newer new warnings are added. Skip those since we
-+# are not loaded by a elf loader.
-+TF_LDFLAGS		+=	$(call ld_option, --no-warn-rwx-segments)
-+
- DTC_FLAGS		+=	-I dts -O dtb
- DTC_CPPFLAGS		+=	-P -nostdinc -Iinclude -Ifdts -undef \
- 				-x assembler-with-cpp $(DEFINES)
diff --git a/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via.patch b/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via.patch
deleted file mode 100644
index 958b7fda325a..000000000000
--- a/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From: Lucas Stach <l.stach@pengutronix.de>
-Date: Thu, 8 Dec 2022 15:54:26 +0100
-Subject: [PATCH] feat(imx8mq): make IMX_BOOT_UART_BASE configurable via build
- parameter
-
-This aligns the i.MX8MQ build with the other i.MX8M platforms by allowing
-to override the default IMX_BOOT_UART_BASE value via a make parameter.
-
-Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-Change-Id: Iad9b844517209fc7d051c61767f71ac9fa2b55c7
----
- plat/imx/imx8m/imx8mq/include/platform_def.h | 1 -
- plat/imx/imx8m/imx8mq/platform.mk            | 3 +++
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h b/plat/imx/imx8m/imx8mq/include/platform_def.h
-index 1dd22d952305..4671cd3afa40 100644
---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
-+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
-@@ -54,7 +54,6 @@
- 
- #define HAB_RVT_BASE			U(0x00000880) /* HAB_RVT for i.MX8MQ */
- 
--#define IMX_BOOT_UART_BASE		U(0x30860000)
- #define IMX_BOOT_UART_CLK_IN_HZ		25000000 /* Select 25Mhz oscillator */
- #define PLAT_CRASH_UART_BASE		IMX_BOOT_UART_BASE
- #define PLAT_CRASH_UART_CLK_IN_HZ	25000000
-diff --git a/plat/imx/imx8m/imx8mq/platform.mk b/plat/imx/imx8m/imx8mq/platform.mk
-index 7b6df920c924..f62d3aa5be15 100644
---- a/plat/imx/imx8m/imx8mq/platform.mk
-+++ b/plat/imx/imx8m/imx8mq/platform.mk
-@@ -52,6 +52,9 @@ $(eval $(call add_define,BL32_BASE))
- BL32_SIZE		?=	0x2000000
- $(eval $(call add_define,BL32_SIZE))
- 
-+IMX_BOOT_UART_BASE	?=	0x30860000
-+$(eval $(call add_define,IMX_BOOT_UART_BASE))
-+
- ifeq (${SPD},trusty)
- 	BL31_CFLAGS    +=      -DPLAT_XLAT_TABLES_DYNAMIC=1
- endif
diff --git a/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.patch b/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.patch
deleted file mode 100644
index 0b1bc7e8c82b..000000000000
--- a/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Lucas Stach <l.stach@pengutronix.de>
-Date: Thu, 8 Dec 2022 17:51:17 +0100
-Subject: [PATCH] feat(imx8mq): remove empty bl31_plat_runtime_setup
-
-Having this empty definition is actively harmful, as it prevents the
-default weak function to be used, which does a switch of the console
-state.
-
-Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-Change-Id: I3b78e0c524c4907714036dba573a44d8f9c48b09
----
- plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-index 59c3779abb7f..0feb6d7fbad2 100644
---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-@@ -227,11 +227,6 @@ unsigned int plat_get_syscnt_freq2(void)
- 	return COUNTER_FREQUENCY;
- }
- 
--void bl31_plat_runtime_setup(void)
--{
--	return;
--}
--
- #ifdef SPD_trusty
- void plat_trusty_set_boot_args(aapcs64_params_t *args)
- {
diff --git a/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch b/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
deleted file mode 100644
index 3a44ae3a149d..000000000000
--- a/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From: Lucas Stach <l.stach@pengutronix.de>
-Date: Thu, 8 Dec 2022 16:00:04 +0100
-Subject: [PATCH] feat(imx8mq): always set up console
-
-This aligns the i.MX8MQ platform behaviour with the other i.MX8M*
-platforms by always setting up the console UART.
-
-Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-Change-Id: I1279d9cb4feb6e789422b9844cab711b8daae74e
----
- plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c    | 7 +++----
- plat/imx/imx8m/imx8mq/include/platform_def.h | 1 -
- 2 files changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-index 0feb6d7fbad2..0972c35e9554 100644
---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-@@ -124,6 +124,7 @@ static void bl31_tz380_setup(void)
- void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 			u_register_t arg2, u_register_t arg3)
- {
-+	static console_t console;
- 	int i;
- 	/* enable CSU NS access permission */
- 	for (i = 0; i < 64; i++) {
-@@ -132,12 +133,10 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 
- 	imx_aipstz_init(aipstz);
- 
--#if DEBUG_CONSOLE
--	static console_t console;
--
- 	console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
- 		IMX_CONSOLE_BAUDRATE, &console);
--#endif
-+	/* This console is only used for boot stage */
-+	console_set_scope(&console, CONSOLE_FLAG_BOOT);
- 
- 	imx8m_caam_init();
- 
-diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h b/plat/imx/imx8m/imx8mq/include/platform_def.h
-index 4671cd3afa40..103f2e4087e2 100644
---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
-+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
-@@ -127,5 +127,4 @@
- 
- #define COUNTER_FREQUENCY		8333333 /* 25MHz / 3 */
- 
--#define DEBUG_CONSOLE			0
- #define IMX_WDOG_B_RESET
diff --git a/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patch b/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patch
deleted file mode 100644
index 6cf2dc18deb2..000000000000
--- a/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From: Lucas Stach <l.stach@pengutronix.de>
-Date: Thu, 8 Dec 2022 16:35:11 +0100
-Subject: [PATCH] refactor(imx8mq): make use of setup_page_tables()
-
-Improve code readability and align with other i.MX8M* platforms.
-
-Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-Change-Id: Ifd29b74872e3a567288d208de4827403078164e9
----
- plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 28 +++++++++++++---------------
- 1 file changed, 13 insertions(+), 15 deletions(-)
-
-diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-index 0972c35e9554..c7eddf430197 100644
---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-@@ -175,23 +175,21 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 
- void bl31_plat_arch_setup(void)
- {
--	mmap_add_region(BL31_BASE, BL31_BASE, (BL31_LIMIT - BL31_BASE),
--		MT_MEMORY | MT_RW | MT_SECURE);
--	mmap_add_region(BL_CODE_BASE, BL_CODE_BASE, (BL_CODE_END - BL_CODE_BASE),
--		MT_MEMORY | MT_RO | MT_SECURE);
--
--	/* Map TEE memory */
--	mmap_add_region(BL32_BASE, BL32_BASE, BL32_SIZE, MT_MEMORY | MT_RW);
--
--	mmap_add(imx_mmap);
--
-+	const mmap_region_t bl_regions[] = {
-+        	MAP_REGION_FLAT(BL31_BASE, BL31_LIMIT - BL31_BASE,
-+				MT_MEMORY | MT_RW | MT_SECURE),
-+		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - BL_CODE_BASE,
-+				MT_MEMORY | MT_RO | MT_SECURE),
- #if USE_COHERENT_MEM
--	mmap_add_region(BL_COHERENT_RAM_BASE, BL_COHERENT_RAM_BASE,
--		BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE,
--		MT_DEVICE | MT_RW | MT_SECURE);
-+		MAP_REGION_FLAT(BL_COHERENT_RAM_BASE,
-+				BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE,
-+				MT_DEVICE | MT_RW | MT_SECURE),
- #endif
--	/* setup xlat table */
--	init_xlat_tables();
-+		MAP_REGION_FLAT(BL32_BASE, BL32_SIZE, MT_MEMORY | MT_RW),
-+		{0},
-+	};
-+
-+	setup_page_tables(bl_regions, imx_mmap);
- 	/* enable the MMU */
- 	enable_mmu_el3(0);
- }
diff --git a/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch b/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
deleted file mode 100644
index 960d7265cc08..000000000000
--- a/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From: Lucas Stach <l.stach@pengutronix.de>
-Date: Thu, 8 Dec 2022 16:37:44 +0100
-Subject: [PATCH] refactor(imx8mq): introduce BL31_SIZE
-
-No functional change.
-
-Introduce BL31_SIZE define and calculate the limits based on the
-BL31_BASE and the BL31_SIZE define. Also make use of SZ_64K to make it
-easier to read. This is required for later BL31 PIE support since it
-drops the calculation based on the BL31_LIMIT and BL31_BASE.
-
-Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-Change-Id: I517074b866b5bf11841b51777f87c926b304488d
----
- plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c    | 2 +-
- plat/imx/imx8m/imx8mq/include/platform_def.h | 5 ++++-
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-index c7eddf430197..bbdb4d899a39 100644
---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-@@ -176,7 +176,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- void bl31_plat_arch_setup(void)
- {
- 	const mmap_region_t bl_regions[] = {
--        	MAP_REGION_FLAT(BL31_BASE, BL31_LIMIT - BL31_BASE,
-+        	MAP_REGION_FLAT(BL31_BASE, BL31_SIZE,
- 				MT_MEMORY | MT_RW | MT_SECURE),
- 		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - BL_CODE_BASE,
- 				MT_MEMORY | MT_RO | MT_SECURE),
-diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h b/plat/imx/imx8m/imx8mq/include/platform_def.h
-index 103f2e4087e2..bb570748f573 100644
---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
-+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
-@@ -4,6 +4,8 @@
-  * SPDX-License-Identifier: BSD-3-Clause
-  */
- 
-+#include <plat/common/common_def.h>
-+
- #define PLATFORM_LINKER_FORMAT		"elf64-littleaarch64"
- #define PLATFORM_LINKER_ARCH		aarch64
- 
-@@ -31,7 +33,8 @@
- #define PLAT_STOP_OFF_STATE		U(3)
- 
- #define BL31_BASE			U(0x910000)
--#define BL31_LIMIT			U(0x920000)
-+#define BL31_SIZE			SZ_64K
-+#define BL31_LIMIT			(BL31_BASE + BL31_SIZE)
- 
- /* non-secure uboot base */
- #define PLAT_NS_IMAGE_OFFSET		U(0x40200000)
diff --git a/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch b/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
deleted file mode 100644
index 25d2aaae70fd..000000000000
--- a/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From: Lucas Stach <l.stach@pengutronix.de>
-Date: Thu, 8 Dec 2022 16:44:00 +0100
-Subject: [PATCH] feat(imx8mq): add BL31 PIE support
-
-Enable PIE support so the BL31 firmware can be loaded from anywhere
-within the OCRAM (SRAM). For the PIE support we only need to replace the
-BL31_BASE define by the BL31_START symbol which is a relocatable and we
-need to enable it by setting ENABLE_PIE := 1.
-
-Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-Change-Id: Ie6a13e4ae0fdc6627a94798d7a86df7d5b310896
----
- plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 2 +-
- plat/imx/imx8m/imx8mq/imx8mq_psci.c       | 2 +-
- plat/imx/imx8m/imx8mq/platform.mk         | 1 +
- 3 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-index bbdb4d899a39..3c2d223fef21 100644
---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-@@ -176,7 +176,7 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- void bl31_plat_arch_setup(void)
- {
- 	const mmap_region_t bl_regions[] = {
--        	MAP_REGION_FLAT(BL31_BASE, BL31_SIZE,
-+        	MAP_REGION_FLAT(BL31_START, BL31_SIZE,
- 				MT_MEMORY | MT_RW | MT_SECURE),
- 		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - BL_CODE_BASE,
- 				MT_MEMORY | MT_RO | MT_SECURE),
-diff --git a/plat/imx/imx8m/imx8mq/imx8mq_psci.c b/plat/imx/imx8m/imx8mq/imx8mq_psci.c
-index 662017d6fe4a..01582afe490c 100644
---- a/plat/imx/imx8m/imx8mq/imx8mq_psci.c
-+++ b/plat/imx/imx8m/imx8mq/imx8mq_psci.c
-@@ -41,7 +41,7 @@ int imx_validate_power_state(unsigned int power_state,
- 
- void imx_domain_suspend(const psci_power_state_t *target_state)
- {
--	uint64_t base_addr = BL31_BASE;
-+	uint64_t base_addr = BL31_START;
- 	uint64_t mpidr = read_mpidr_el1();
- 	unsigned int core_id = MPIDR_AFFLVL0_VAL(mpidr);
- 
-diff --git a/plat/imx/imx8m/imx8mq/platform.mk b/plat/imx/imx8m/imx8mq/platform.mk
-index f62d3aa5be15..901a974a591e 100644
---- a/plat/imx/imx8m/imx8mq/platform.mk
-+++ b/plat/imx/imx8m/imx8mq/platform.mk
-@@ -38,6 +38,7 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
- 				${XLAT_TABLES_LIB_SRCS}				\
- 				${IMX_GIC_SOURCES}
- 
-+ENABLE_PIE		:=	1
- USE_COHERENT_MEM	:=	1
- RESET_TO_BL31		:=	1
- A53_DISABLE_NON_TEMPORAL_HINT := 0
diff --git a/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch b/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
deleted file mode 100644
index 24a5b80ca473..000000000000
--- a/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Marco Felsch <m.felsch@pengutronix.de>
-Date: Fri, 10 Feb 2023 12:14:26 +0100
-Subject: [PATCH] feat(imx8mq): add support for gcc >= 12.x
-
-Starting with GCC >= 12.x the -Wall option includes -Werror=array-bounds
-checks. Per default GCC threads all memory accesses below 4096 as NULL,
-so access to ROMAPI causes the following warning:
-
-In file included from plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:20:
-In function 'mmio_read_8',
-    inlined from 'imx8mq_soc_info_init' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:70:16,
-    inlined from 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:206:2:
-include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
-   19 |         return *(volatile uint8_t*)addr;
-      |                ^~~~~~~~~~~~~~~~~~~~~~~~
-In function 'mmio_read_8',
-    inlined from 'imx8mq_soc_info_init' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:74:16,
-    inlined from 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:206:2:
-include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]
-   19 |         return *(volatile uint8_t*)addr;
-      |                ^~~~~~~~~~~~~~~~~~~~~~~~
-cc1: all warnings being treated as errors
-
-Fix this by setting the default min-pagesize to 0 instead of 4096, so
-the ROMAPI access will not trigger the warning. Don't set this option
-for all files since it is unkown how it affects code
-generation/optimizations.
-
-Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
-Change-Id: Ibcca65ca69750e1a1bca3d528c80e5b445d2f90f
----
- plat/imx/imx8m/imx8mq/platform.mk | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/plat/imx/imx8m/imx8mq/platform.mk b/plat/imx/imx8m/imx8mq/platform.mk
-index 901a974a591e..985be71725f7 100644
---- a/plat/imx/imx8m/imx8mq/platform.mk
-+++ b/plat/imx/imx8m/imx8mq/platform.mk
-@@ -59,3 +59,6 @@ $(eval $(call add_define,IMX_BOOT_UART_BASE))
- ifeq (${SPD},trusty)
- 	BL31_CFLAGS    +=      -DPLAT_XLAT_TABLES_DYNAMIC=1
- endif
-+
-+# Required with gcc version >= 12
-+$(BUILD_PLAT)/bl31/imx8mq_bl31_setup.o: CFLAGS += --param=min-pagesize=0
diff --git a/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runtim.patch b/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runtim.patch
deleted file mode 100644
index 68f36aca7aa1..000000000000
--- a/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runtim.patch
+++ /dev/null
@@ -1,304 +0,0 @@
-From: Marco Felsch <m.felsch@pengutronix.de>
-Date: Mon, 24 Jul 2023 15:05:58 +0200
-Subject: [PATCH] feat(imx8m): detect console base address during runtime
-
-Provide a helper to detect the enabled UART device during runtime. This
-lower the integration effort and make it more straight forward for
-'simple' use-cases with a single UART enabled. If multiple UARTs are
-enabled the first enabled is returned.
-
-The auto-detection is enabled by setting IMX_BOOT_UART_BASE=0 to keep
-the backward compatibility. For more advanced use-cases (multiple UARTs
-are enabled) the user still has to provide the correct base address.
-
-Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
-Change-Id: I300a167e1a10f9aa991c8d1c3efe2c6b23f56c47
----
- plat/imx/imx8m/imx8m_ccm.c                | 58 +++++++++++++++++++++++++++++++
- plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 11 +++++-
- plat/imx/imx8m/imx8mm/platform.mk         |  1 +
- plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 11 +++++-
- plat/imx/imx8m/imx8mn/platform.mk         |  1 +
- plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c | 11 +++++-
- plat/imx/imx8m/imx8mp/platform.mk         |  1 +
- plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 11 +++++-
- plat/imx/imx8m/imx8mq/platform.mk         |  1 +
- plat/imx/imx8m/include/imx8m_ccm.h        | 12 +++++++
- 10 files changed, 114 insertions(+), 4 deletions(-)
- create mode 100644 plat/imx/imx8m/imx8m_ccm.c
- create mode 100644 plat/imx/imx8m/include/imx8m_ccm.h
-
-diff --git a/plat/imx/imx8m/imx8m_ccm.c b/plat/imx/imx8m/imx8m_ccm.c
-new file mode 100644
-index 000000000000..10a00c990031
---- /dev/null
-+++ b/plat/imx/imx8m/imx8m_ccm.c
-@@ -0,0 +1,58 @@
-+/*
-+ * Copyright (c) 2023, Pengutronix. All rights reserved.
-+ *
-+ * SPDX-License-Identifier: BSD-3-Clause
-+ */
-+
-+#include <lib/mmio.h>
-+#include <platform_def.h>
-+
-+#define UCR1    		0x80
-+#define UCR1_UARTEN		BIT(0)
-+#define DOMAIN0_RUNNING(d)	(((d) & 0x3) != 0)
-+
-+static struct imx_uart {
-+	unsigned int ccm_reg;
-+	unsigned int uart_base;
-+} imx8m_uart_info[] = {
-+	{	/* UART 1 */
-+		.ccm_reg = 0x4490,
-+		.uart_base = 0x30860000,
-+	}, {	/* UART 2 */
-+		.ccm_reg = 0x44a0,
-+		.uart_base = 0x30890000,
-+	}, {	/* UART 3 */
-+		.ccm_reg = 0x44b0,
-+		.uart_base = 0x30880000,
-+	}, {	/* UART 4 */
-+		.ccm_reg = 0x44c0,
-+		.uart_base = 0x30a60000,
-+	}
-+};
-+
-+unsigned int imx8m_uart_get_base(void)
-+{
-+	unsigned int i;
-+
-+	for (i = 0; i < ARRAY_SIZE(imx8m_uart_info); i++) {
-+		uint32_t val;
-+
-+		/*
-+		 * At least check that the clock-gate is ungated before we
-+		 * access the UART register.
-+		 */
-+		val = mmio_read_32(IMX_CCM_BASE + imx8m_uart_info[i].ccm_reg);
-+		if (DOMAIN0_RUNNING(val)) {
-+			val = mmio_read_32(imx8m_uart_info[i].uart_base + UCR1);
-+			if (val & UCR1_UARTEN) {
-+				return imx8m_uart_info[i].uart_base;
-+			}
-+		}
-+	}
-+
-+	/*
-+	 * We should return an error and inform the user but we can't do it
-+	 * this early.
-+	 */
-+	return 0;
-+}
-diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
-index 67bfd3651dfe..8e6636147438 100644
---- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
-@@ -27,6 +27,7 @@
- #include <imx_uart.h>
- #include <imx_rdc.h>
- #include <imx8m_caam.h>
-+#include <imx8m_ccm.h>
- #include <imx8m_csu.h>
- #include <plat_imx8.h>
- 
-@@ -130,6 +131,7 @@ void bl31_tzc380_setup(void)
- void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 		u_register_t arg2, u_register_t arg3)
- {
-+	unsigned int console_base = 0U;
- 	static console_t console;
- 	int i;
- 
-@@ -144,7 +146,14 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 
- 	imx_csu_init(csu_cfg);
- 
--	console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
-+#if IMX_BOOT_UART_BASE
-+	console_base = IMX_BOOT_UART_BASE;
-+#endif
-+	if (console_base == 0U) {
-+		console_base = imx8m_uart_get_base();
-+	}
-+
-+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
- 		IMX_CONSOLE_BAUDRATE, &console);
- 	/* This console is only used for boot stage */
- 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
-diff --git a/plat/imx/imx8m/imx8mm/platform.mk b/plat/imx/imx8m/imx8mm/platform.mk
-index 7a42554f5739..22791fda4c2c 100644
---- a/plat/imx/imx8m/imx8mm/platform.mk
-+++ b/plat/imx/imx8m/imx8mm/platform.mk
-@@ -37,6 +37,7 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
- 				plat/imx/imx8m/imx_rdc.c			\
- 				plat/imx/imx8m/imx8m_csu.c			\
- 				plat/imx/imx8m/imx8m_caam.c			\
-+				plat/imx/imx8m/imx8m_ccm.c			\
- 				plat/imx/imx8m/imx8m_psci_common.c		\
- 				plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c	\
- 				plat/imx/imx8m/imx8mm/imx8mm_psci.c		\
-diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
-index eff198dd741c..aeb1cbf2945f 100644
---- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
-@@ -25,6 +25,7 @@
- #include <imx_uart.h>
- #include <imx_rdc.h>
- #include <imx8m_caam.h>
-+#include <imx8m_ccm.h>
- #include <imx8m_csu.h>
- #include <platform_def.h>
- #include <plat_imx8.h>
-@@ -121,6 +122,7 @@ static void bl31_tzc380_setup(void)
- void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 		u_register_t arg2, u_register_t arg3)
- {
-+	unsigned int console_base = 0U;
- 	static console_t console;
- 	unsigned int val;
- 	int i;
-@@ -141,7 +143,14 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 0x2c);
- 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
- 
--	console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
-+#if IMX_BOOT_UART_BASE
-+	console_base = IMX_BOOT_UART_BASE;
-+#endif
-+	if (console_base == 0U) {
-+		console_base = imx8m_uart_get_base();
-+	}
-+
-+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
- 		IMX_CONSOLE_BAUDRATE, &console);
- 	/* This console is only used for boot stage */
- 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
-diff --git a/plat/imx/imx8m/imx8mn/platform.mk b/plat/imx/imx8m/imx8mn/platform.mk
-index 1c0ad4f3bc23..46516104f16d 100644
---- a/plat/imx/imx8m/imx8mn/platform.mk
-+++ b/plat/imx/imx8m/imx8mn/platform.mk
-@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
- 				plat/imx/imx8m/imx_aipstz.c			\
- 				plat/imx/imx8m/imx_rdc.c			\
- 				plat/imx/imx8m/imx8m_caam.c			\
-+				plat/imx/imx8m/imx8m_ccm.c			\
- 				plat/imx/imx8m/imx8m_csu.c			\
- 				plat/imx/imx8m/imx8m_psci_common.c		\
- 				plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c	\
-diff --git a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
-index 4c31fa28dab7..e25668b879b3 100644
---- a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
-@@ -25,6 +25,7 @@
- #include <imx_uart.h>
- #include <imx_rdc.h>
- #include <imx8m_caam.h>
-+#include <imx8m_ccm.h>
- #include <imx8m_csu.h>
- #include <platform_def.h>
- #include <plat_imx8.h>
-@@ -117,6 +118,7 @@ static void bl31_tzc380_setup(void)
- void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 		u_register_t arg2, u_register_t arg3)
- {
-+	unsigned int console_base = 0U;
- 	static console_t console;
- 	unsigned int val;
- 	unsigned int i;
-@@ -137,7 +139,14 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 0x2c);
- 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
- 
--	console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
-+#if IMX_BOOT_UART_BASE
-+	console_base = IMX_BOOT_UART_BASE;
-+#endif
-+	if (console_base == 0U) {
-+		console_base = imx8m_uart_get_base();
-+	}
-+
-+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
- 		IMX_CONSOLE_BAUDRATE, &console);
- 	/* This console is only used for boot stage */
- 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
-diff --git a/plat/imx/imx8m/imx8mp/platform.mk b/plat/imx/imx8m/imx8mp/platform.mk
-index 5414c0a5732d..cdb504de0f3d 100644
---- a/plat/imx/imx8m/imx8mp/platform.mk
-+++ b/plat/imx/imx8m/imx8mp/platform.mk
-@@ -32,6 +32,7 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
- 				plat/imx/imx8m/imx_aipstz.c			\
- 				plat/imx/imx8m/imx_rdc.c			\
- 				plat/imx/imx8m/imx8m_caam.c			\
-+				plat/imx/imx8m/imx8m_ccm.c			\
- 				plat/imx/imx8m/imx8m_csu.c			\
- 				plat/imx/imx8m/imx8m_psci_common.c		\
- 				plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c	\
-diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-index 3c2d223fef21..1cb2d2a25b54 100644
---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-@@ -25,6 +25,7 @@
- #include <imx_aipstz.h>
- #include <imx_uart.h>
- #include <imx8m_caam.h>
-+#include <imx8m_ccm.h>
- #include <plat_imx8.h>
- 
- #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
-@@ -124,6 +125,7 @@ static void bl31_tz380_setup(void)
- void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 			u_register_t arg2, u_register_t arg3)
- {
-+	unsigned int console_base = 0U;
- 	static console_t console;
- 	int i;
- 	/* enable CSU NS access permission */
-@@ -133,7 +135,14 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 
- 	imx_aipstz_init(aipstz);
- 
--	console_imx_uart_register(IMX_BOOT_UART_BASE, IMX_BOOT_UART_CLK_IN_HZ,
-+#if IMX_BOOT_UART_BASE
-+	console_base = IMX_BOOT_UART_BASE;
-+#endif
-+	if (console_base == 0U) {
-+		console_base = imx8m_uart_get_base();
-+	}
-+
-+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
- 		IMX_CONSOLE_BAUDRATE, &console);
- 	/* This console is only used for boot stage */
- 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
-diff --git a/plat/imx/imx8m/imx8mq/platform.mk b/plat/imx/imx8m/imx8mq/platform.mk
-index 985be71725f7..0c34c10bdcb4 100644
---- a/plat/imx/imx8m/imx8mq/platform.mk
-+++ b/plat/imx/imx8m/imx8mq/platform.mk
-@@ -25,6 +25,7 @@ BL31_SOURCES		+=	plat/imx/common/imx8_helpers.S			\
- 				plat/imx/imx8m/gpc_common.c			\
- 				plat/imx/imx8m/imx_aipstz.c			\
- 				plat/imx/imx8m/imx8m_caam.c			\
-+				plat/imx/imx8m/imx8m_ccm.c			\
- 				plat/imx/imx8m/imx8m_psci_common.c		\
- 				plat/imx/imx8m/imx8mq/gpc.c			\
- 				plat/imx/common/imx8_topology.c			\
-diff --git a/plat/imx/imx8m/include/imx8m_ccm.h b/plat/imx/imx8m/include/imx8m_ccm.h
-new file mode 100644
-index 000000000000..acbd135cb314
---- /dev/null
-+++ b/plat/imx/imx8m/include/imx8m_ccm.h
-@@ -0,0 +1,12 @@
-+/*
-+ * Copyright (c) 2023, Pengutronix. All rights reserved.
-+ *
-+ * SPDX-License-Identifier: BSD-3-Clause
-+ */
-+
-+#ifndef IMX8M_CCM_H
-+#define IMX8M_CCM_H
-+
-+unsigned int imx8m_uart_get_base(void);
-+
-+#endif /* IMX8M_CCM_H */
diff --git a/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti.patch b/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti.patch
deleted file mode 100644
index 9fae10905edd..000000000000
--- a/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From: Marco Felsch <m.felsch@pengutronix.de>
-Date: Wed, 2 Aug 2023 08:11:35 +0200
-Subject: [PATCH] fix(imx8m): make IMX_BOOT_UART_BASE autodetection option more
- obvious
-
-Switch from IMX_BOOT_UART_BASE=0 to IMX_BOOT_UART_BASE=auto to make it
-more obvious that the detection is based on the runtime autodetection.
-
-In addition this moves the evaluation of IMX_BOOT_UART_BASE into the
-makefile which removes the ugly conditional compilation as well.
-
-Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
-Change-Id: I92c13607bf81c6267f4b6aee829d74902b7f72d2
----
- plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 5 +----
- plat/imx/imx8m/imx8mm/platform.mk         | 3 +++
- plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 5 +----
- plat/imx/imx8m/imx8mn/platform.mk         | 3 +++
- plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c | 5 +----
- plat/imx/imx8m/imx8mp/platform.mk         | 3 +++
- plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 5 +----
- plat/imx/imx8m/imx8mq/platform.mk         | 3 +++
- 8 files changed, 16 insertions(+), 16 deletions(-)
-
-diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
-index 8e6636147438..c8a3adf8f333 100644
---- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
-@@ -131,7 +131,7 @@ void bl31_tzc380_setup(void)
- void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 		u_register_t arg2, u_register_t arg3)
- {
--	unsigned int console_base = 0U;
-+	unsigned int console_base = IMX_BOOT_UART_BASE;
- 	static console_t console;
- 	int i;
- 
-@@ -146,9 +146,6 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 
- 	imx_csu_init(csu_cfg);
- 
--#if IMX_BOOT_UART_BASE
--	console_base = IMX_BOOT_UART_BASE;
--#endif
- 	if (console_base == 0U) {
- 		console_base = imx8m_uart_get_base();
- 	}
-diff --git a/plat/imx/imx8m/imx8mm/platform.mk b/plat/imx/imx8m/imx8mm/platform.mk
-index 22791fda4c2c..1b4a1f2f37c7 100644
---- a/plat/imx/imx8m/imx8mm/platform.mk
-+++ b/plat/imx/imx8m/imx8mm/platform.mk
-@@ -159,6 +159,9 @@ BL32_SIZE		?=	0x2000000
- $(eval $(call add_define,BL32_SIZE))
- 
- IMX_BOOT_UART_BASE	?=	0x30890000
-+ifeq (${IMX_BOOT_UART_BASE},auto)
-+    override IMX_BOOT_UART_BASE	:=	0
-+endif
- $(eval $(call add_define,IMX_BOOT_UART_BASE))
- 
- EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
-diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
-index aeb1cbf2945f..147249ee5e56 100644
---- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
-@@ -122,7 +122,7 @@ static void bl31_tzc380_setup(void)
- void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 		u_register_t arg2, u_register_t arg3)
- {
--	unsigned int console_base = 0U;
-+	unsigned int console_base = IMX_BOOT_UART_BASE;
- 	static console_t console;
- 	unsigned int val;
- 	int i;
-@@ -143,9 +143,6 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 0x2c);
- 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
- 
--#if IMX_BOOT_UART_BASE
--	console_base = IMX_BOOT_UART_BASE;
--#endif
- 	if (console_base == 0U) {
- 		console_base = imx8m_uart_get_base();
- 	}
-diff --git a/plat/imx/imx8m/imx8mn/platform.mk b/plat/imx/imx8m/imx8mn/platform.mk
-index 46516104f16d..a6b43f213506 100644
---- a/plat/imx/imx8m/imx8mn/platform.mk
-+++ b/plat/imx/imx8m/imx8mn/platform.mk
-@@ -65,6 +65,9 @@ BL32_SIZE		?=	0x2000000
- $(eval $(call add_define,BL32_SIZE))
- 
- IMX_BOOT_UART_BASE	?=	0x30890000
-+ifeq (${IMX_BOOT_UART_BASE},auto)
-+    override IMX_BOOT_UART_BASE	:=	0
-+endif
- $(eval $(call add_define,IMX_BOOT_UART_BASE))
- 
- EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
-diff --git a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
-index e25668b879b3..b0a41c741c17 100644
---- a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
-@@ -118,7 +118,7 @@ static void bl31_tzc380_setup(void)
- void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 		u_register_t arg2, u_register_t arg3)
- {
--	unsigned int console_base = 0U;
-+	unsigned int console_base = IMX_BOOT_UART_BASE;
- 	static console_t console;
- 	unsigned int val;
- 	unsigned int i;
-@@ -139,9 +139,6 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 0x2c);
- 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
- 
--#if IMX_BOOT_UART_BASE
--	console_base = IMX_BOOT_UART_BASE;
--#endif
- 	if (console_base == 0U) {
- 		console_base = imx8m_uart_get_base();
- 	}
-diff --git a/plat/imx/imx8m/imx8mp/platform.mk b/plat/imx/imx8m/imx8mp/platform.mk
-index cdb504de0f3d..0169144f4a1a 100644
---- a/plat/imx/imx8m/imx8mp/platform.mk
-+++ b/plat/imx/imx8m/imx8mp/platform.mk
-@@ -156,6 +156,9 @@ BL32_SIZE		?=	0x2000000
- $(eval $(call add_define,BL32_SIZE))
- 
- IMX_BOOT_UART_BASE	?=	0x30890000
-+ifeq (${IMX_BOOT_UART_BASE},auto)
-+    override IMX_BOOT_UART_BASE	:=	0
-+endif
- $(eval $(call add_define,IMX_BOOT_UART_BASE))
- 
- EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
-diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-index 1cb2d2a25b54..a2c81610b353 100644
---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
-@@ -125,7 +125,7 @@ static void bl31_tz380_setup(void)
- void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 			u_register_t arg2, u_register_t arg3)
- {
--	unsigned int console_base = 0U;
-+	unsigned int console_base = IMX_BOOT_UART_BASE;
- 	static console_t console;
- 	int i;
- 	/* enable CSU NS access permission */
-@@ -135,9 +135,6 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
- 
- 	imx_aipstz_init(aipstz);
- 
--#if IMX_BOOT_UART_BASE
--	console_base = IMX_BOOT_UART_BASE;
--#endif
- 	if (console_base == 0U) {
- 		console_base = imx8m_uart_get_base();
- 	}
-diff --git a/plat/imx/imx8m/imx8mq/platform.mk b/plat/imx/imx8m/imx8mq/platform.mk
-index 0c34c10bdcb4..6ee7d23d4882 100644
---- a/plat/imx/imx8m/imx8mq/platform.mk
-+++ b/plat/imx/imx8m/imx8mq/platform.mk
-@@ -55,6 +55,9 @@ BL32_SIZE		?=	0x2000000
- $(eval $(call add_define,BL32_SIZE))
- 
- IMX_BOOT_UART_BASE	?=	0x30860000
-+ifeq (${IMX_BOOT_UART_BASE},auto)
-+    override IMX_BOOT_UART_BASE	:=	0
-+endif
- $(eval $(call add_define,IMX_BOOT_UART_BASE))
- 
- ifeq (${SPD},trusty)
diff --git a/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-20240117.patch b/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-20240117.patch
deleted file mode 100644
index 1d1a9b9471bb..000000000000
--- a/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-20240117.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= <l.goehrs@pengutronix.de>
-Date: Wed, 17 Jan 2024 11:13:01 +0100
-Subject: [PATCH] Release 2.8/customers/pengutronix/distrokit/20240117-1
-
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 1bfff716485a..f39eb940a024 100644
---- a/Makefile
-+++ b/Makefile
-@@ -327,7 +327,7 @@ endif
- ifeq (${BUILD_STRING},)
-         BUILD_STRING  :=  $(shell git describe --always --dirty --tags 2> /dev/null)
- endif
--VERSION_STRING    :=  v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}
-+VERSION_STRING    :=  v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}-20240117-1
- 
- ifeq (${AARCH32_INSTRUCTION_SET},A32)
- TF_CFLAGS_aarch32	+=	-marm
diff --git a/patches/tf-a-v2.8/series b/patches/tf-a-v2.8/series
deleted file mode 100644
index 7a73fce4ff94..000000000000
--- a/patches/tf-a-v2.8/series
+++ /dev/null
@@ -1,27 +0,0 @@
-# umpf-base: v2.8
-# umpf-name: 2.8/customers/pengutronix/distrokit
-# umpf-version: 2.8/customers/pengutronix/distrokit/20240117-1
-# umpf-topic: v2.8/topic/fix-build-warnings
-# umpf-hashinfo: 4730b4b80206cf2fc27787f43cefd3169a6f8a2f
-# umpf-topic-range: 9881bb93a3bc0a3ea37e9f093e09ab4b360a9e48..da1b5e74dc7c2b3e7a2d9a1adb7e23beeba079e3
-0001-build-makefile-add-helper-to-detect-linker-options.patch
-0002-feat-build-add-support-for-new-binutils-versions.patch
-# umpf-topic: v2.8/topic/imx8mq
-# umpf-hashinfo: 651310b67fd269e8118285e9ed44e8ad6cc52941
-# umpf-topic-range: da1b5e74dc7c2b3e7a2d9a1adb7e23beeba079e3..be7bcbebf5b22958e8b88564ca0865b4591263e7
-0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via.patch
-0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.patch
-0103-feat-imx8mq-always-set-up-console.patch
-0104-refactor-imx8mq-make-use-of-setup_page_tables.patch
-0105-refactor-imx8mq-introduce-BL31_SIZE.patch
-0106-feat-imx8mq-add-BL31-PIE-support.patch
-0107-feat-imx8mq-add-support-for-gcc-12.x.patch
-# umpf-topic: v2.8/topic/uart-runtime-detection
-# umpf-hashinfo: b59093eaea88fddf1c893eb8f45a3eadf1f570cc
-# umpf-topic-range: be7bcbebf5b22958e8b88564ca0865b4591263e7..015b0b19a839d0d4beb01babbe1af81917fcfb57
-0201-feat-imx8m-detect-console-base-address-during-runtim.patch
-0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti.patch
-# umpf-release: 2.8/customers/pengutronix/distrokit/20240117-1
-# umpf-topic-range: 015b0b19a839d0d4beb01babbe1af81917fcfb57..070499680453a1c6a358828e4bd7cf6c9629ef6b
-0301-Release-2.8-customers-pengutronix-distrokit-20240117.patch
-# umpf-end
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 03/12] v8a: imx8mq-evk: disable PCI nodes
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
  2024-03-15 21:12 ` [DistroKit] [PATCH 01/12] ptxdist: migrate 2023.02.0 → 2024.03.0 Ahmad Fatoum
  2024-03-15 21:12 ` [DistroKit] [PATCH 02/12] tf-a: update from v2.8 → v2.10 Ahmad Fatoum
@ 2024-03-15 21:12 ` Ahmad Fatoum
  2024-03-15 21:12 ` [DistroKit] [PATCH 04/12] v8a: update kernel from v6.6 → v6.8 Ahmad Fatoum
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

When Linux probed the PCI on the i.MX8M-EVK, the system hangs
completely. We've seen the same effect with other i.MX8M EVKs too,
where between EVK revisions, NXP changed how the PCI PHY is clocked
and because the DT only supported one variant, probing PCI on the
other variant led to system hang while probing the PCI address space.

If this turns out to be the issue on the i.MX8M-EVK as well, we should
probably try to identify what variant we run on and then fix up the DT
in the bootloader. For now though, just take the easy route and disable
PCI, which we don't use anyway.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../barebox-common-defaultenv/init/disable-imx8mq-pci      | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100755 configs/platform-v8a/barebox-common-defaultenv/init/disable-imx8mq-pci

diff --git a/configs/platform-v8a/barebox-common-defaultenv/init/disable-imx8mq-pci b/configs/platform-v8a/barebox-common-defaultenv/init/disable-imx8mq-pci
new file mode 100755
index 000000000000..68536e7baa5f
--- /dev/null
+++ b/configs/platform-v8a/barebox-common-defaultenv/init/disable-imx8mq-pci
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if of_compatible -k fsl,imx8mq-evk; then
+	echo "Disabling PCI to avoid issues with older EVK revisions"
+	of_property -fs /soc@0/pcie@33800000 status disabled
+	of_property -fs /soc@0/pcie@33c00000 status disabled
+fi
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 04/12] v8a: update kernel from v6.6 → v6.8
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
                   ` (2 preceding siblings ...)
  2024-03-15 21:12 ` [DistroKit] [PATCH 03/12] v8a: imx8mq-evk: disable PCI nodes Ahmad Fatoum
@ 2024-03-15 21:12 ` Ahmad Fatoum
  2024-03-16 11:18   ` Michael Olbrich
  2024-03-15 21:12 ` [DistroKit] [PATCH 05/12] v8a: barebox: version bump v2023.12.0 → v2024.03.0 Ahmad Fatoum
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

config changes are those of olddefconfig with the notable exception of
CONFIG_BLK_DEV_WRITE_MOUNTED: This is enabled by default as not to break
some existing userspace, but we shouldn't have any of that, so disable it.
This will cause the kernel to refuse writes to mounted block devices.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v8a/kernelconfig   | 121 ++++++++++++++++++++--------
 configs/platform-v8a/platformconfig |   4 +-
 2 files changed, 89 insertions(+), 36 deletions(-)

diff --git a/configs/platform-v8a/kernelconfig b/configs/platform-v8a/kernelconfig
index 425a247ac2ab..4daf8080f717 100644
--- a/configs/platform-v8a/kernelconfig
+++ b/configs/platform-v8a/kernelconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm64 6.6 Kernel Configuration
+# Linux/arm64 6.8 Kernel Configuration
 #
 CONFIG_CC_VERSION_TEXT="aarch64-v8a-linux-gnu-gcc (OSELAS.Toolchain-2023.07.0 13-20230624) 13.1.1 20230624"
 CONFIG_CC_IS_GCC=y
@@ -15,6 +15,7 @@ CONFIG_CC_CAN_LINK=y
 CONFIG_CC_CAN_LINK_STATIC=y
 CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
 CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_CC_HAS_ASM_INLINE=y
 CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
 CONFIG_PAHOLE_VERSION=0
@@ -160,8 +161,10 @@ CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
 CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
 CONFIG_CC_HAS_INT128=y
 CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
-CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
 CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_NO_STRINGOP_OVERFLOW=y
+CONFIG_CC_NO_STRINGOP_OVERFLOW=y
 CONFIG_ARCH_SUPPORTS_INT128=y
 CONFIG_CGROUPS=y
 CONFIG_PAGE_COUNTER=y
@@ -237,17 +240,17 @@ CONFIG_AIO=y
 CONFIG_IO_URING=y
 CONFIG_ADVISE_SYSCALLS=y
 CONFIG_MEMBARRIER=y
+CONFIG_KCMP=y
+CONFIG_RSEQ=y
+# CONFIG_DEBUG_RSEQ is not set
+CONFIG_CACHESTAT_SYSCALL=y
+# CONFIG_PC104 is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_SELFTEST is not set
 CONFIG_KALLSYMS_ALL=y
 CONFIG_KALLSYMS_BASE_RELATIVE=y
 CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
-CONFIG_KCMP=y
-CONFIG_RSEQ=y
-CONFIG_CACHESTAT_SYSCALL=y
-# CONFIG_DEBUG_RSEQ is not set
 CONFIG_HAVE_PERF_EVENTS=y
-# CONFIG_PC104 is not set
 
 #
 # Kernel Performance Events And Counters
@@ -264,6 +267,7 @@ CONFIG_TRACEPOINTS=y
 # Kexec and crash features
 #
 # CONFIG_KEXEC_FILE is not set
+# CONFIG_CRASH_DUMP is not set
 # end of Kexec and crash features
 # end of General setup
 
@@ -319,6 +323,7 @@ CONFIG_ARCH_MXC=y
 # CONFIG_ARCH_S32 is not set
 # CONFIG_ARCH_MA35 is not set
 # CONFIG_ARCH_NPCM is not set
+# CONFIG_ARCH_PENSANDO is not set
 # CONFIG_ARCH_QCOM is not set
 # CONFIG_ARCH_REALTEK is not set
 # CONFIG_ARCH_RENESAS is not set
@@ -376,6 +381,7 @@ CONFIG_ARM64_ERRATUM_1508412=y
 # CONFIG_ARM64_ERRATUM_2441009 is not set
 # CONFIG_ARM64_ERRATUM_2645198 is not set
 # CONFIG_ARM64_ERRATUM_2966298 is not set
+# CONFIG_ARM64_ERRATUM_3117295 is not set
 # CONFIG_CAVIUM_ERRATUM_22375 is not set
 # CONFIG_CAVIUM_ERRATUM_23154 is not set
 # CONFIG_CAVIUM_ERRATUM_27456 is not set
@@ -684,6 +690,7 @@ CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
 CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y
 CONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y
+CONFIG_ARCH_HAS_HW_PTE_YOUNG=y
 
 #
 # GCOV-based kernel profiling
@@ -726,6 +733,7 @@ CONFIG_BLK_ICQ=y
 CONFIG_BLK_DEV_BSGLIB=y
 CONFIG_BLK_DEV_INTEGRITY=y
 CONFIG_BLK_DEV_INTEGRITY_T10=y
+# CONFIG_BLK_DEV_WRITE_MOUNTED is not set
 # CONFIG_BLK_DEV_ZONED is not set
 # CONFIG_BLK_DEV_THROTTLING is not set
 # CONFIG_BLK_WBT is not set
@@ -795,9 +803,8 @@ CONFIG_COREDUMP=y
 # CONFIG_SWAP is not set
 
 #
-# SLAB allocator options
+# Slab allocator options
 #
-# CONFIG_SLAB_DEPRECATED is not set
 CONFIG_SLUB=y
 # CONFIG_SLUB_TINY is not set
 CONFIG_SLAB_MERGE_DEFAULT=y
@@ -806,7 +813,7 @@ CONFIG_SLAB_FREELIST_RANDOM=y
 # CONFIG_SLUB_STATS is not set
 CONFIG_SLUB_CPU_PARTIAL=y
 # CONFIG_RANDOM_KMALLOC_CACHES is not set
-# end of SLAB allocator options
+# end of Slab allocator options
 
 # CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set
 # CONFIG_COMPAT_BRK is not set
@@ -829,6 +836,7 @@ CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
 CONFIG_PAGE_REPORTING=y
 CONFIG_MIGRATION=y
 CONFIG_CONTIG_ALLOC=y
+CONFIG_PCP_BATCH_SCALE_MAX=5
 CONFIG_PHYS_ADDR_T_64BIT=y
 # CONFIG_KSM is not set
 CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
@@ -916,6 +924,7 @@ CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_AO is not set
 # CONFIG_TCP_MD5SIG is not set
 CONFIG_IPV6=y
 # CONFIG_IPV6_ROUTER_PREF is not set
@@ -1116,7 +1125,6 @@ CONFIG_IP6_NF_TARGET_MASQUERADE=m
 
 CONFIG_NF_DEFRAG_IPV6=m
 # CONFIG_NF_CONNTRACK_BRIDGE is not set
-# CONFIG_BPFILTER is not set
 # CONFIG_IP_DCCP is not set
 # CONFIG_IP_SCTP is not set
 # CONFIG_RDS is not set
@@ -1304,7 +1312,6 @@ CONFIG_PCI_HOST_GENERIC=y
 # Cadence-based PCIe controllers
 #
 # CONFIG_PCIE_CADENCE_PLAT_HOST is not set
-# CONFIG_PCI_J721E_HOST is not set
 # end of Cadence-based PCIe controllers
 
 #
@@ -1373,6 +1380,7 @@ CONFIG_DEV_COREDUMP=y
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
 # CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
+CONFIG_GENERIC_CPU_DEVICES=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_CPU_VULNERABILITIES=y
 CONFIG_SOC_BUS=y
@@ -1389,7 +1397,6 @@ CONFIG_GENERIC_ARCH_TOPOLOGY=y
 #
 # Bus devices
 #
-# CONFIG_BRCMSTB_GISB_ARB is not set
 # CONFIG_MOXTET is not set
 # CONFIG_IMX_WEIM is not set
 # CONFIG_VEXPRESS_CONFIG is not set
@@ -1422,12 +1429,10 @@ CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y
 CONFIG_ARM_SCMI_TRANSPORT_SMC=y
 # CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE is not set
 # CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set
-CONFIG_ARM_SCMI_POWER_DOMAIN=y
 CONFIG_ARM_SCMI_POWER_CONTROL=y
 # end of ARM System Control and Management Interface Protocol
 
 CONFIG_ARM_SCPI_PROTOCOL=y
-CONFIG_ARM_SCPI_POWER_DOMAIN=y
 # CONFIG_FIRMWARE_MEMMAP is not set
 # CONFIG_FW_CFG_SYSFS is not set
 # CONFIG_TURRIS_MOX_RWTM is not set
@@ -1436,6 +1441,12 @@ CONFIG_ARM_SCPI_POWER_DOMAIN=y
 # CONFIG_IMX_DSP is not set
 # CONFIG_IMX_SCU is not set
 CONFIG_ARM_PSCI_FW=y
+
+#
+# Qualcomm firmware drivers
+#
+# end of Qualcomm firmware drivers
+
 CONFIG_HAVE_ARM_SMCCC=y
 CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y
 CONFIG_ARM_SMCCC_SOC_ID=y
@@ -1453,7 +1464,6 @@ CONFIG_MTD=y
 #
 # Partition parsers
 #
-# CONFIG_MTD_AR7_PARTS is not set
 # CONFIG_MTD_CMDLINE_PARTS is not set
 CONFIG_MTD_OF_PARTS=y
 # CONFIG_MTD_AFS_PARTS is not set
@@ -1658,6 +1668,7 @@ CONFIG_SRAM=y
 # CONFIG_HISI_HIKEY_USB is not set
 # CONFIG_OPEN_DICE is not set
 # CONFIG_VCPU_STALL_DETECTOR is not set
+# CONFIG_NSM is not set
 # CONFIG_C2PORT is not set
 
 #
@@ -1665,7 +1676,6 @@ CONFIG_SRAM=y
 #
 CONFIG_EEPROM_AT24=m
 CONFIG_EEPROM_AT25=m
-# CONFIG_EEPROM_LEGACY is not set
 # CONFIG_EEPROM_MAX6875 is not set
 # CONFIG_EEPROM_93CX6 is not set
 # CONFIG_EEPROM_93XX46 is not set
@@ -1872,6 +1882,7 @@ CONFIG_NET_CORE=y
 # CONFIG_VETH is not set
 CONFIG_VIRTIO_NET=y
 # CONFIG_NLMON is not set
+# CONFIG_NETKIT is not set
 # CONFIG_ARCNET is not set
 CONFIG_ETHERNET=y
 # CONFIG_NET_VENDOR_3COM is not set
@@ -1965,7 +1976,6 @@ CONFIG_DWMAC_GENERIC=y
 CONFIG_DWMAC_ROCKCHIP=y
 CONFIG_DWMAC_IMX8=y
 # CONFIG_DWMAC_INTEL_PLAT is not set
-# CONFIG_DWMAC_LOONGSON is not set
 # CONFIG_STMMAC_PCI is not set
 # CONFIG_NET_VENDOR_SUN is not set
 # CONFIG_NET_VENDOR_SYNOPSYS is not set
@@ -2037,6 +2047,7 @@ CONFIG_ROCKCHIP_PHY=y
 CONFIG_DP83867_PHY=y
 # CONFIG_DP83869_PHY is not set
 # CONFIG_DP83TD510_PHY is not set
+# CONFIG_DP83TG720_PHY is not set
 # CONFIG_VITESSE_PHY is not set
 # CONFIG_XILINX_GMII2RGMII is not set
 # CONFIG_MICREL_KS8995MA is not set
@@ -2189,6 +2200,7 @@ CONFIG_SERIAL_8250_16550A_VARIANTS=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_DMA=y
 # CONFIG_SERIAL_8250_PCI is not set
+# CONFIG_SERIAL_8250_EXAR is not set
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 # CONFIG_SERIAL_8250_EXTENDED is not set
@@ -2584,7 +2596,6 @@ CONFIG_GPIO_MAX77620=y
 
 # CONFIG_W1 is not set
 CONFIG_POWER_RESET=y
-# CONFIG_POWER_RESET_BRCMSTB is not set
 # CONFIG_POWER_RESET_GPIO is not set
 # CONFIG_POWER_RESET_GPIO_RESTART is not set
 # CONFIG_POWER_RESET_LINKSTATION is not set
@@ -2612,7 +2623,6 @@ CONFIG_POWER_SUPPLY_HWMON=y
 # CONFIG_CHARGER_SBS is not set
 # CONFIG_MANAGER_SBS is not set
 # CONFIG_BATTERY_BQ27XXX is not set
-# CONFIG_BATTERY_MAX17040 is not set
 # CONFIG_BATTERY_MAX17042 is not set
 # CONFIG_CHARGER_ISP1704 is not set
 # CONFIG_CHARGER_MAX8903 is not set
@@ -2642,6 +2652,7 @@ CONFIG_POWER_SUPPLY_HWMON=y
 # CONFIG_CHARGER_UCS1002 is not set
 # CONFIG_CHARGER_BD99954 is not set
 # CONFIG_BATTERY_UG3105 is not set
+# CONFIG_FUEL_GAUGE_MM8013 is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_DEBUG_CHIP is not set
 
@@ -2689,12 +2700,14 @@ CONFIG_SENSORS_ARM_SCPI=y
 # CONFIG_SENSORS_HS3001 is not set
 # CONFIG_SENSORS_IT87 is not set
 # CONFIG_SENSORS_JC42 is not set
+# CONFIG_SENSORS_POWERZ is not set
 # CONFIG_SENSORS_POWR1220 is not set
 # CONFIG_SENSORS_LINEAGE is not set
 # CONFIG_SENSORS_LTC2945 is not set
 # CONFIG_SENSORS_LTC2947_I2C is not set
 # CONFIG_SENSORS_LTC2947_SPI is not set
 # CONFIG_SENSORS_LTC2990 is not set
+# CONFIG_SENSORS_LTC2991 is not set
 # CONFIG_SENSORS_LTC2992 is not set
 # CONFIG_SENSORS_LTC4151 is not set
 # CONFIG_SENSORS_LTC4215 is not set
@@ -2804,6 +2817,7 @@ CONFIG_SENSORS_LM90=m
 CONFIG_THERMAL=y
 # CONFIG_THERMAL_NETLINK is not set
 # CONFIG_THERMAL_STATISTICS is not set
+CONFIG_THERMAL_DEBUGFS=y
 CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
 CONFIG_THERMAL_HWMON=y
 CONFIG_THERMAL_OF=y
@@ -2958,7 +2972,6 @@ CONFIG_MFD_SEC_CORE=y
 # CONFIG_MFD_SKY81452 is not set
 # CONFIG_MFD_STMPE is not set
 CONFIG_MFD_SYSCON=y
-# CONFIG_MFD_TI_AM335X_TSCADC is not set
 # CONFIG_MFD_LP3943 is not set
 # CONFIG_MFD_LP8788 is not set
 # CONFIG_MFD_TI_LMU is not set
@@ -3012,6 +3025,7 @@ CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
 # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
+# CONFIG_REGULATOR_NETLINK_EVENTS is not set
 # CONFIG_REGULATOR_88PG86X is not set
 # CONFIG_REGULATOR_ACT8865 is not set
 # CONFIG_REGULATOR_AD5398 is not set
@@ -3038,6 +3052,7 @@ CONFIG_REGULATOR_GPIO=y
 # CONFIG_REGULATOR_LTC3589 is not set
 # CONFIG_REGULATOR_LTC3676 is not set
 # CONFIG_REGULATOR_MAX1586 is not set
+# CONFIG_REGULATOR_MAX77503 is not set
 # CONFIG_REGULATOR_MAX77620 is not set
 # CONFIG_REGULATOR_MAX77857 is not set
 # CONFIG_REGULATOR_MAX8649 is not set
@@ -3346,6 +3361,7 @@ CONFIG_USB_CHIPIDEA=y
 CONFIG_USB_CHIPIDEA_UDC=y
 CONFIG_USB_CHIPIDEA_HOST=y
 # CONFIG_USB_CHIPIDEA_MSM is not set
+# CONFIG_USB_CHIPIDEA_NPCM is not set
 CONFIG_USB_CHIPIDEA_IMX=y
 CONFIG_USB_CHIPIDEA_GENERIC=y
 # CONFIG_USB_CHIPIDEA_TEGRA is not set
@@ -3464,6 +3480,8 @@ CONFIG_TYPEC_TCPCI=y
 # CONFIG_TYPEC_MUX_GPIO_SBU is not set
 # CONFIG_TYPEC_MUX_PI3USB30532 is not set
 # CONFIG_TYPEC_MUX_NB7VPQ904M is not set
+# CONFIG_TYPEC_MUX_PTN36502 is not set
+# CONFIG_TYPEC_MUX_WCD939X_USBSS is not set
 # end of USB Type-C Multiplexer/DeMultiplexer Switch support
 
 #
@@ -3519,8 +3537,6 @@ CONFIG_MMC_CQHCI=y
 # CONFIG_MMC_TOSHIBA_PCI is not set
 # CONFIG_MMC_MTK is not set
 CONFIG_MMC_SDHCI_XENON=y
-# CONFIG_MMC_SDHCI_OMAP is not set
-# CONFIG_MMC_SDHCI_AM654 is not set
 # CONFIG_SCSI_UFSHCD is not set
 # CONFIG_MEMSTICK is not set
 CONFIG_NEW_LEDS=y
@@ -3595,6 +3611,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
 CONFIG_LEDS_TRIGGER_CPU=y
 # CONFIG_LEDS_TRIGGER_ACTIVITY is not set
+# CONFIG_LEDS_TRIGGER_GPIO is not set
 CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
 
 #
@@ -3644,6 +3661,7 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_DS1672 is not set
 CONFIG_RTC_DRV_HYM8563=y
 # CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_MAX31335 is not set
 # CONFIG_RTC_DRV_MAX77686 is not set
 # CONFIG_RTC_DRV_NCT3018Y is not set
 CONFIG_RTC_DRV_RK808=y
@@ -3958,7 +3976,6 @@ CONFIG_IMX_REMOTEPROC=y
 #
 # Broadcom SoC drivers
 #
-# CONFIG_SOC_BRCMSTB is not set
 # end of Broadcom SoC drivers
 
 #
@@ -3976,10 +3993,8 @@ CONFIG_FSL_GUTS=y
 #
 # i.MX SoC drivers
 #
-CONFIG_IMX_GPCV2_PM_DOMAINS=y
 CONFIG_SOC_IMX8M=y
 # CONFIG_SOC_IMX9 is not set
-CONFIG_IMX8M_BLK_CTRL=y
 # end of i.MX SoC drivers
 
 #
@@ -3997,7 +4012,6 @@ CONFIG_IMX8M_BLK_CTRL=y
 
 CONFIG_ROCKCHIP_GRF=y
 CONFIG_ROCKCHIP_IODOMAIN=y
-CONFIG_ROCKCHIP_PM_DOMAINS=y
 # CONFIG_SOC_TI is not set
 
 #
@@ -4006,6 +4020,39 @@ CONFIG_ROCKCHIP_PM_DOMAINS=y
 # end of Xilinx SoC drivers
 # end of SOC (System On Chip) specific Drivers
 
+#
+# PM Domains
+#
+
+#
+# Amlogic PM Domains
+#
+# end of Amlogic PM Domains
+
+# CONFIG_ARM_SCMI_PERF_DOMAIN is not set
+CONFIG_ARM_SCMI_POWER_DOMAIN=y
+CONFIG_ARM_SCPI_POWER_DOMAIN=y
+
+#
+# Broadcom PM Domains
+#
+# end of Broadcom PM Domains
+
+#
+# i.MX PM Domains
+#
+CONFIG_IMX_GPCV2_PM_DOMAINS=y
+CONFIG_IMX8M_BLK_CTRL=y
+# end of i.MX PM Domains
+
+#
+# Qualcomm PM Domains
+#
+# end of Qualcomm PM Domains
+
+CONFIG_ROCKCHIP_PM_DOMAINS=y
+# end of PM Domains
+
 CONFIG_PM_DEVFREQ=y
 
 #
@@ -4156,6 +4203,7 @@ CONFIG_FSL_IMX8_DDR_PMU=y
 # CONFIG_ARM_SPE_PMU is not set
 # CONFIG_HISI_PCIE_PMU is not set
 # CONFIG_HNS3_PMU is not set
+# CONFIG_DWC_PCIE_PMU is not set
 # CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU is not set
 # end of Performance monitor support
 
@@ -4172,6 +4220,7 @@ CONFIG_RAS=y
 # CONFIG_DAX is not set
 CONFIG_NVMEM=y
 CONFIG_NVMEM_SYSFS=y
+CONFIG_NVMEM_LAYOUTS=y
 
 #
 # Layout Types
@@ -4233,6 +4282,7 @@ CONFIG_INTERCONNECT_IMX8MP=y
 CONFIG_DCACHE_WORD_ACCESS=y
 # CONFIG_VALIDATE_FS_PARSER is not set
 CONFIG_FS_IOMAP=y
+CONFIG_FS_STACK=y
 CONFIG_BUFFER_HEAD=y
 CONFIG_LEGACY_DIRECT_IO=y
 # CONFIG_EXT2_FS is not set
@@ -4253,6 +4303,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_BTRFS_FS is not set
 # CONFIG_NILFS2_FS is not set
 # CONFIG_F2FS_FS is not set
+# CONFIG_BCACHEFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 CONFIG_EXPORTFS=y
 # CONFIG_EXPORTFS_BLOCK_OPS is not set
@@ -4392,6 +4443,7 @@ CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
 # CONFIG_NFS_V4_1_MIGRATION is not set
 CONFIG_NFS_V4_SECURITY_LABEL=y
 CONFIG_ROOT_NFS=y
+# CONFIG_NFS_FSCACHE is not set
 # CONFIG_NFS_USE_LEGACY_DNS is not set
 CONFIG_NFS_USE_KERNEL_DNS=y
 CONFIG_NFS_DISABLE_UDP_SUPPORT=y
@@ -4598,14 +4650,12 @@ CONFIG_CRYPTO_SM4_GENERIC=m
 # CONFIG_CRYPTO_ADIANTUM is not set
 CONFIG_CRYPTO_CHACHA20=y
 CONFIG_CRYPTO_CBC=y
-# CONFIG_CRYPTO_CFB is not set
 CONFIG_CRYPTO_CTR=m
 # CONFIG_CRYPTO_CTS is not set
 CONFIG_CRYPTO_ECB=y
 # CONFIG_CRYPTO_HCTR2 is not set
 # CONFIG_CRYPTO_KEYWRAP is not set
 # CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_OFB is not set
 # CONFIG_CRYPTO_PCBC is not set
 CONFIG_CRYPTO_XTS=y
 # end of Length-preserving ciphers and modes
@@ -4677,7 +4727,9 @@ CONFIG_CRYPTO_DRBG_HMAC=y
 # CONFIG_CRYPTO_DRBG_CTR is not set
 CONFIG_CRYPTO_DRBG=y
 CONFIG_CRYPTO_JITTERENTROPY=y
-# CONFIG_CRYPTO_JITTERENTROPY_TESTINTERFACE is not set
+CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
+CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
+CONFIG_CRYPTO_JITTERENTROPY_OSR=1
 # end of Random number generation
 
 #
@@ -4747,6 +4799,7 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_PRNG_API=y
 # CONFIG_CRYPTO_DEV_QAT_C3XXX is not set
 # CONFIG_CRYPTO_DEV_QAT_C62X is not set
 # CONFIG_CRYPTO_DEV_QAT_4XXX is not set
+# CONFIG_CRYPTO_DEV_QAT_420XX is not set
 # CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set
 # CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set
 # CONFIG_CRYPTO_DEV_QAT_C62XVF is not set
@@ -4846,7 +4899,6 @@ CONFIG_ZSTD_DECOMPRESS=y
 CONFIG_XZ_DEC=y
 CONFIG_XZ_DEC_X86=y
 CONFIG_XZ_DEC_POWERPC=y
-CONFIG_XZ_DEC_IA64=y
 CONFIG_XZ_DEC_ARM=y
 CONFIG_XZ_DEC_ARMTHUMB=y
 CONFIG_XZ_DEC_SPARC=y
@@ -4901,6 +4953,7 @@ CONFIG_NLATTR=y
 CONFIG_CLZ_TAB=y
 CONFIG_IRQ_POLL=y
 CONFIG_MPILIB=y
+CONFIG_DIMLIB=y
 CONFIG_LIBFDT=y
 CONFIG_OID_REGISTRY=y
 CONFIG_HAVE_GENERIC_VDSO=y
@@ -4909,7 +4962,9 @@ CONFIG_GENERIC_VDSO_TIME_NS=y
 CONFIG_SG_POOL=y
 CONFIG_ARCH_STACKWALK=y
 CONFIG_STACKDEPOT=y
+CONFIG_STACKDEPOT_MAX_FRAMES=64
 CONFIG_SBITMAP=y
+# CONFIG_LWQ_TEST is not set
 # end of Library routines
 
 CONFIG_GENERIC_IOREMAP=y
@@ -4942,7 +4997,7 @@ CONFIG_DEBUG_MISC=y
 # Compile-time checks and compiler options
 #
 CONFIG_DEBUG_INFO=y
-CONFIG_AS_HAS_NON_CONST_LEB128=y
+CONFIG_AS_HAS_NON_CONST_ULEB128=y
 # CONFIG_DEBUG_INFO_NONE is not set
 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
 # CONFIG_DEBUG_INFO_DWARF4 is not set
@@ -5107,8 +5162,6 @@ CONFIG_STACKTRACE=y
 # CONFIG_DEBUG_MAPLE_TREE is not set
 # end of Debug kernel data structures
 
-# CONFIG_DEBUG_CREDENTIALS is not set
-
 #
 # RCU Debugging
 #
diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
index 675874fc4a3c..7653891e537d 100644
--- a/configs/platform-v8a/platformconfig
+++ b/configs/platform-v8a/platformconfig
@@ -121,8 +121,8 @@ PTXCONF_KERNEL_INSTALL=y
 PTXCONF_KERNEL_MODULES=y
 PTXCONF_KERNEL_MODULES_INSTALL=y
 # PTXCONF_KERNEL_MODULES_SIGN is not set
-PTXCONF_KERNEL_VERSION="6.6"
-PTXCONF_KERNEL_MD5="452098d80ba925af3a4ab35998f3aef5"
+PTXCONF_KERNEL_VERSION="6.8"
+PTXCONF_KERNEL_MD5="72d623b959a11850b57406f0b9fe3946"
 # PTXCONF_KERNEL_IMAGE_BZ is not set
 # PTXCONF_KERNEL_IMAGE_Z is not set
 # PTXCONF_KERNEL_IMAGE_XIP is not set
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 05/12] v8a: barebox: version bump v2023.12.0 → v2024.03.0
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
                   ` (3 preceding siblings ...)
  2024-03-15 21:12 ` [DistroKit] [PATCH 04/12] v8a: update kernel from v6.6 → v6.8 Ahmad Fatoum
@ 2024-03-15 21:12 ` Ahmad Fatoum
  2024-03-15 21:12 ` [DistroKit] [PATCH 06/12] v7a: update kernel from v6.6 → v6.8 Ahmad Fatoum
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

v2023.12.0 first broke i.MX8MQ support by mistake. This was fixed in
v2024.03.0, so update to this version.

The config changes are those of olddefconfig with the exception of
CONFIG_CMD_PARTED: This command allows us to partition block devices
from within the barebox shell.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v8a/barebox.config | 36 ++++++++++++++++++++++++-----
 configs/platform-v8a/platformconfig |  4 ++--
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/configs/platform-v8a/barebox.config b/configs/platform-v8a/barebox.config
index fc4f64358007..26be35533173 100644
--- a/configs/platform-v8a/barebox.config
+++ b/configs/platform-v8a/barebox.config
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Barebox/arm 2023.12.0 Configuration
+# Barebox/arm 2024.03.0 Configuration
 #
 CONFIG_ARM=y
 CONFIG_ARM_LINUX=y
@@ -11,11 +11,11 @@ CONFIG_TEXT_BASE=0x0
 # System Type
 #
 CONFIG_ARCH_MULTIARCH=y
-# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_ARM64_VIRT is not set
 # CONFIG_ARCH_BCM283X is not set
 CONFIG_ARCH_IMX=y
 # CONFIG_ARCH_K3 is not set
+# CONFIG_ARCH_LAYERSCAPE is not set
 CONFIG_ARCH_ROCKCHIP=y
 # CONFIG_ARCH_ZYNQMP is not set
 
@@ -36,6 +36,7 @@ CONFIG_ARCH_IMX_IMXIMAGE=y
 CONFIG_USB_GADGET_DRIVER_ARC_PBL=y
 CONFIG_ARCH_IMX_ATF=y
 CONFIG_ARCH_IMX_ROMAPI=y
+CONFIG_ARCH_IMX_SCRATCHMEM=y
 
 #
 # i.MX boards
@@ -67,7 +68,7 @@ CONFIG_MACH_TQ_MBA8MPXL=y
 #
 # i.MX93 boards
 #
-# CONFIG_MACH_TQ_MBA9XXXCA is not set
+# CONFIG_MACH_TQMA93XX is not set
 # end of i.MX boards
 
 #
@@ -225,6 +226,7 @@ CONFIG_CONSOLE_ALLOW_COLOR=y
 CONFIG_PBL_CONSOLE=y
 # CONFIG_CONSOLE_RATP is not set
 CONFIG_PARTITION=y
+CONFIG_PARTITION_MANIPULATION=y
 CONFIG_PARTITION_DISK=y
 CONFIG_PARTITION_DISK_DOS=y
 CONFIG_PARTITION_DISK_EFI=y
@@ -253,7 +255,6 @@ CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
 #
 # OP-TEE loading
 #
-# CONFIG_BOOTM_OPTEE is not set
 # CONFIG_PBL_OPTEE is not set
 # end of OP-TEE loading
 
@@ -278,6 +279,8 @@ CONFIG_DEBUG_ROCKCHIP_UART_PORT=2
 # CONFIG_DEBUG_INITCALLS is not set
 # CONFIG_DEBUG_PBL is not set
 # CONFIG_DEBUG_PROBES is not set
+# CONFIG_DMA_API_DEBUG is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_PBL_BREAK is not set
 # CONFIG_PRINTF_FULL is not set
 # CONFIG_UBSAN is not set
@@ -348,6 +351,7 @@ CONFIG_CMD_BOOTCHOOSER=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_AUTOMOUNT=y
 CONFIG_CMD_MOUNT=y
+CONFIG_CMD_PARTED=y
 CONFIG_CMD_UMOUNT=y
 # end of Partition
 
@@ -511,6 +515,7 @@ CONFIG_NET_FASTBOOT=y
 #
 CONFIG_PM_GENERIC_DOMAINS=y
 CONFIG_FEATURE_CONTROLLER=y
+CONFIG_SOC_BUS=y
 CONFIG_REGMAP_FORMATTED=y
 CONFIG_REGMAP_I2C=y
 CONFIG_OFTREE=y
@@ -573,6 +578,7 @@ CONFIG_DRIVER_NET_FEC_IMX=y
 # CONFIG_DAVICOM_PHY is not set
 CONFIG_DP83867_PHY=y
 # CONFIG_DP83TD510_PHY is not set
+# CONFIG_DP83TG720_PHY is not set
 # CONFIG_LXT_PHY is not set
 # CONFIG_MARVELL_PHY is not set
 CONFIG_MICREL_PHY=y
@@ -906,8 +912,13 @@ CONFIG_RTC_DRV_DS1307=y
 # Firmware Drivers
 #
 # CONFIG_FIRMWARE_ALTERA_SERIAL is not set
-# CONFIG_ARM_SCMI_PROTOCOL is not set
 # CONFIG_QEMU_FW_CFG is not set
+
+#
+# ARM System Control and Management Interface Protocol
+#
+# CONFIG_ARM_SCMI_PROTOCOL is not set
+# end of ARM System Control and Management Interface Protocol
 # end of Firmware Drivers
 
 #
@@ -940,7 +951,6 @@ CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y
 #
 # i.MX SoC drivers
 #
-CONFIG_IMX_GPCV2_PM_DOMAINS=y
 CONFIG_IMX8M_FEATCTRL=y
 # end of i.MX SoC drivers
 
@@ -956,6 +966,18 @@ CONFIG_IMX8M_FEATCTRL=y
 # end of Rockchip SoC drivers
 # end of SoC drivers
 
+#
+# PM Domains
+#
+
+#
+# i.MX PM Domains
+#
+CONFIG_IMX_GPCV2_PM_DOMAINS=y
+CONFIG_IMX8M_BLK_CTRL=y
+# end of i.MX PM Domains
+# end of PM Domains
+
 #
 # NVME Support
 #
@@ -978,6 +1000,7 @@ CONFIG_SYSCON_REBOOT_MODE=y
 # CONFIG_POWER_RESET_GPIO_RESTART is not set
 # CONFIG_VIRTIO_MENU is not set
 # CONFIG_MAILBOX is not set
+# CONFIG_TEE is not set
 # end of Drivers
 
 #
@@ -1069,6 +1092,7 @@ CONFIG_ARCH_HAS_ZERO_PAGE=y
 #
 # Hardening options
 #
+# CONFIG_BUG_ON_DATA_CORRUPTION is not set
 # CONFIG_STACK_GUARD_PAGE is not set
 CONFIG_STACKPROTECTOR_NONE=y
 # CONFIG_STACKPROTECTOR_STRONG is not set
diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
index 7653891e537d..b250a69c6feb 100644
--- a/configs/platform-v8a/platformconfig
+++ b/configs/platform-v8a/platformconfig
@@ -177,10 +177,10 @@ PTXCONF_CONSOLE_SPEED="115200"
 PTXCONF_BAREBOX_ARCH_STRING="arm"
 PTXCONF_BAREBOX_DEPENDENCIES=y
 PTXCONF_BAREBOX=y
-PTXCONF_BAREBOX_VERSION="2023.12.0"
+PTXCONF_BAREBOX_VERSION="2024.03.0"
 PTXCONF_BAREBOX_CONFIG_BUILDSYSTEM_VERSION=y
 PTXCONF_BAREBOX_BUILDSYSTEM_VERSION="${PTXDIST_VCS_VERSION}"
-PTXCONF_BAREBOX_MD5="e1513be5a2995203b75ac45043eac6d0"
+PTXCONF_BAREBOX_MD5="dcb443c48b64662b52974502c502427e"
 PTXCONF_BAREBOX_CONFIG="barebox.config"
 PTXCONF_BAREBOX_FIRMWARE=y
 PTXCONF_BAREBOX_EXTRA_ENV=y
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 06/12] v7a: update kernel from v6.6 → v6.8
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
                   ` (4 preceding siblings ...)
  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 ` Ahmad Fatoum
  2024-03-15 21:12 ` [DistroKit] [PATCH 07/12] v7a: barebox: version bump v2024.01.0 → v2024.03.0 Ahmad Fatoum
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

Like done for v8a, also update the v7a kernel to the latest release.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/kernelconfig   | 119 +++++++++++++++++++---------
 configs/platform-v7a/platformconfig |   4 +-
 2 files changed, 84 insertions(+), 39 deletions(-)

diff --git a/configs/platform-v7a/kernelconfig b/configs/platform-v7a/kernelconfig
index cca78250847c..c65bdb8da3d9 100644
--- a/configs/platform-v7a/kernelconfig
+++ b/configs/platform-v7a/kernelconfig
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm 6.6 Kernel Configuration
+# Linux/arm 6.8 Kernel Configuration
 #
 CONFIG_CC_VERSION_TEXT="arm-v7a-linux-gnueabihf-gcc (OSELAS.Toolchain-2023.07.0 13-20230624) 13.1.1 20230624"
 CONFIG_CC_IS_GCC=y
@@ -15,6 +15,7 @@ CONFIG_CC_CAN_LINK=y
 CONFIG_CC_CAN_LINK_STATIC=y
 CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
 CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_CC_HAS_ASM_INLINE=y
 CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
 CONFIG_PAHOLE_VERSION=0
@@ -99,7 +100,6 @@ CONFIG_HAVE_EBPF_JIT=y
 CONFIG_BPF_SYSCALL=y
 # CONFIG_BPF_JIT is not set
 # CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set
-CONFIG_USERMODE_DRIVER=y
 # CONFIG_BPF_PRELOAD is not set
 # end of BPF subsystem
 
@@ -155,8 +155,10 @@ CONFIG_GENERIC_SCHED_CLOCK=y
 # end of Scheduler features
 
 CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
-CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
 CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_NO_STRINGOP_OVERFLOW=y
+CONFIG_CC_NO_STRINGOP_OVERFLOW=y
 CONFIG_CGROUPS=y
 CONFIG_PAGE_COUNTER=y
 # CONFIG_CGROUP_FAVOR_DYNMODS is not set
@@ -229,18 +231,18 @@ CONFIG_AIO=y
 CONFIG_IO_URING=y
 CONFIG_ADVISE_SYSCALLS=y
 CONFIG_MEMBARRIER=y
+# CONFIG_KCMP is not set
+CONFIG_RSEQ=y
+# CONFIG_DEBUG_RSEQ is not set
+CONFIG_CACHESTAT_SYSCALL=y
+# CONFIG_PC104 is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_SELFTEST is not set
 CONFIG_KALLSYMS_ALL=y
 CONFIG_KALLSYMS_BASE_RELATIVE=y
 CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
-# CONFIG_KCMP is not set
-CONFIG_RSEQ=y
-CONFIG_CACHESTAT_SYSCALL=y
-# CONFIG_DEBUG_RSEQ is not set
 CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_PERF_USE_VMALLOC=y
-# CONFIG_PC104 is not set
 
 #
 # Kernel Performance Events And Counters
@@ -255,6 +257,7 @@ CONFIG_TRACEPOINTS=y
 #
 # Kexec and crash features
 #
+# CONFIG_CRASH_DUMP is not set
 # end of Kexec and crash features
 # end of General setup
 
@@ -296,6 +299,9 @@ CONFIG_ARCH_MULTI_V6_V7=y
 
 # CONFIG_ARCH_VIRT is not set
 # CONFIG_ARCH_AIROHA is not set
+# CONFIG_ARCH_RDA is not set
+# CONFIG_ARCH_SUNPLUS is not set
+# CONFIG_ARCH_UNIPHIER is not set
 # CONFIG_ARCH_ACTIONS is not set
 # CONFIG_ARCH_ALPINE is not set
 # CONFIG_ARCH_ARTPEC is not set
@@ -420,7 +426,6 @@ CONFIG_MACH_OMAP_GENERIC=y
 # end of TI OMAP/AM/DM/DRA Family
 
 # CONFIG_ARCH_QCOM is not set
-# CONFIG_ARCH_RDA is not set
 # CONFIG_ARCH_REALTEK is not set
 # CONFIG_ARCH_ROCKCHIP is not set
 # CONFIG_ARCH_S5PV210 is not set
@@ -431,10 +436,8 @@ CONFIG_MACH_OMAP_GENERIC=y
 CONFIG_ARCH_STM32=y
 CONFIG_MACH_STM32MP157=y
 CONFIG_MACH_STM32MP13=y
-# CONFIG_ARCH_SUNPLUS is not set
 # CONFIG_ARCH_SUNXI is not set
 # CONFIG_ARCH_TEGRA is not set
-# CONFIG_ARCH_UNIPHIER is not set
 # CONFIG_ARCH_U8500 is not set
 # CONFIG_ARCH_REALVIEW is not set
 CONFIG_ARCH_VEXPRESS=y
@@ -788,6 +791,7 @@ CONFIG_BLOCK=y
 # CONFIG_BLOCK_LEGACY_AUTOLOAD is not set
 # CONFIG_BLK_DEV_BSGLIB is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set
+# CONFIG_BLK_DEV_WRITE_MOUNTED is not set
 # CONFIG_BLK_DEV_ZONED is not set
 # CONFIG_BLK_DEV_THROTTLING is not set
 # CONFIG_BLK_WBT is not set
@@ -849,9 +853,8 @@ CONFIG_COREDUMP=y
 # CONFIG_SWAP is not set
 
 #
-# SLAB allocator options
+# Slab allocator options
 #
-# CONFIG_SLAB_DEPRECATED is not set
 CONFIG_SLUB=y
 # CONFIG_SLUB_TINY is not set
 CONFIG_SLAB_MERGE_DEFAULT=y
@@ -860,7 +863,7 @@ CONFIG_SLAB_FREELIST_RANDOM=y
 # CONFIG_SLUB_STATS is not set
 CONFIG_SLUB_CPU_PARTIAL=y
 # CONFIG_RANDOM_KMALLOC_CACHES is not set
-# end of SLAB allocator options
+# end of Slab allocator options
 
 # CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set
 # CONFIG_COMPAT_BRK is not set
@@ -877,6 +880,7 @@ CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
 # CONFIG_PAGE_REPORTING is not set
 CONFIG_MIGRATION=y
 CONFIG_CONTIG_ALLOC=y
+CONFIG_PCP_BATCH_SCALE_MAX=5
 CONFIG_BOUNCE=y
 # CONFIG_KSM is not set
 CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
@@ -900,6 +904,8 @@ CONFIG_MEMFD_CREATE=y
 # CONFIG_ANON_VMA_NAME is not set
 # CONFIG_USERFAULTFD is not set
 # CONFIG_LRU_GEN is not set
+CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y
+CONFIG_PER_VMA_LOCK=y
 CONFIG_LOCK_MM_AND_FIND_VMA=y
 
 #
@@ -1032,8 +1038,6 @@ CONFIG_NETFILTER_BPF_LINK=y
 # CONFIG_IP6_NF_IPTABLES is not set
 # end of IPv6: Netfilter Configuration
 
-CONFIG_BPFILTER=y
-# CONFIG_BPFILTER_UMH is not set
 # CONFIG_IP_DCCP is not set
 # CONFIG_IP_SCTP is not set
 # CONFIG_RDS is not set
@@ -1215,7 +1219,6 @@ CONFIG_GENERIC_ARCH_TOPOLOGY=y
 #
 # Bus devices
 #
-# CONFIG_BRCMSTB_GISB_ARB is not set
 # CONFIG_MOXTET is not set
 # CONFIG_IMX_WEIM is not set
 CONFIG_OMAP_INTERCONNECT=y
@@ -1249,7 +1252,6 @@ CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y
 CONFIG_ARM_SCMI_TRANSPORT_SMC=y
 # CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE is not set
 # CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set
-CONFIG_ARM_SCMI_POWER_DOMAIN=y
 # CONFIG_ARM_SCMI_POWER_CONTROL is not set
 # end of ARM System Control and Management Interface Protocol
 
@@ -1261,6 +1263,12 @@ CONFIG_RASPBERRYPI_FIRMWARE=y
 # CONFIG_IMX_DSP is not set
 # CONFIG_IMX_SCU is not set
 CONFIG_ARM_PSCI_FW=y
+
+#
+# Qualcomm firmware drivers
+#
+# end of Qualcomm firmware drivers
+
 CONFIG_HAVE_ARM_SMCCC=y
 CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y
 CONFIG_ARM_SMCCC_SOC_ID=y
@@ -1278,7 +1286,6 @@ CONFIG_MTD=y
 #
 # Partition parsers
 #
-# CONFIG_MTD_AR7_PARTS is not set
 # CONFIG_MTD_CMDLINE_PARTS is not set
 CONFIG_MTD_OF_PARTS=y
 # CONFIG_MTD_AFS_PARTS is not set
@@ -1469,6 +1476,7 @@ CONFIG_SRAM_EXEC=y
 # CONFIG_HISI_HIKEY_USB is not set
 # CONFIG_OPEN_DICE is not set
 # CONFIG_VCPU_STALL_DETECTOR is not set
+# CONFIG_NSM is not set
 # CONFIG_C2PORT is not set
 
 #
@@ -1476,7 +1484,6 @@ CONFIG_SRAM_EXEC=y
 #
 CONFIG_EEPROM_AT24=y
 # CONFIG_EEPROM_AT25 is not set
-# CONFIG_EEPROM_LEGACY is not set
 # CONFIG_EEPROM_MAX6875 is not set
 CONFIG_EEPROM_93CX6=y
 # CONFIG_EEPROM_93XX46 is not set
@@ -1563,6 +1570,7 @@ CONFIG_WIREGUARD=y
 # CONFIG_VETH is not set
 # CONFIG_VIRTIO_NET is not set
 # CONFIG_NLMON is not set
+# CONFIG_NETKIT is not set
 CONFIG_ETHERNET=y
 # CONFIG_NET_VENDOR_ALACRITECH is not set
 # CONFIG_ALTERA_TSE is not set
@@ -1643,7 +1651,6 @@ CONFIG_TI_CPTS=y
 # CONFIG_NET_VENDOR_WIZNET is not set
 CONFIG_NET_VENDOR_XILINX=y
 # CONFIG_XILINX_EMACLITE is not set
-# CONFIG_XILINX_AXI_EMAC is not set
 # CONFIG_XILINX_LL_TEMAC is not set
 CONFIG_PHYLINK=y
 CONFIG_PHYLIB=y
@@ -1705,6 +1712,7 @@ CONFIG_SMSC_PHY=y
 # CONFIG_DP83867_PHY is not set
 # CONFIG_DP83869_PHY is not set
 # CONFIG_DP83TD510_PHY is not set
+# CONFIG_DP83TG720_PHY is not set
 # CONFIG_VITESSE_PHY is not set
 # CONFIG_XILINX_GMII2RGMII is not set
 # CONFIG_MICREL_KS8995MA is not set
@@ -2035,7 +2043,6 @@ CONFIG_SPI_OMAP24XX=y
 # CONFIG_SPI_MXIC is not set
 # CONFIG_SPI_XCOMM is not set
 # CONFIG_SPI_XILINX is not set
-# CONFIG_SPI_ZYNQMP_GQSPI is not set
 # CONFIG_SPI_AMD is not set
 
 #
@@ -2210,7 +2217,6 @@ CONFIG_POWER_RESET_AT91_POWEROFF=y
 CONFIG_POWER_RESET_AT91_RESET=y
 CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
 # CONFIG_POWER_RESET_BRCMKONA is not set
-# CONFIG_POWER_RESET_BRCMSTB is not set
 # CONFIG_POWER_RESET_GPIO is not set
 # CONFIG_POWER_RESET_GPIO_RESTART is not set
 # CONFIG_POWER_RESET_LTC2952 is not set
@@ -2235,7 +2241,6 @@ CONFIG_POWER_SUPPLY=y
 # CONFIG_BATTERY_SBS is not set
 # CONFIG_CHARGER_SBS is not set
 # CONFIG_BATTERY_BQ27XXX is not set
-# CONFIG_BATTERY_MAX17040 is not set
 # CONFIG_BATTERY_MAX17042 is not set
 # CONFIG_CHARGER_ISP1704 is not set
 # CONFIG_CHARGER_MAX8903 is not set
@@ -2265,10 +2270,12 @@ CONFIG_POWER_SUPPLY=y
 # CONFIG_CHARGER_UCS1002 is not set
 # CONFIG_CHARGER_BD99954 is not set
 # CONFIG_BATTERY_UG3105 is not set
+# CONFIG_FUEL_GAUGE_MM8013 is not set
 # CONFIG_HWMON is not set
 CONFIG_THERMAL=y
 # CONFIG_THERMAL_NETLINK is not set
 CONFIG_THERMAL_STATISTICS=y
+CONFIG_THERMAL_DEBUGFS=y
 CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
 CONFIG_THERMAL_OF=y
 # CONFIG_THERMAL_WRITABLE_TRIPS is not set
@@ -2489,6 +2496,7 @@ CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
 # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
+# CONFIG_REGULATOR_NETLINK_EVENTS is not set
 # CONFIG_REGULATOR_88PG86X is not set
 # CONFIG_REGULATOR_ACT8865 is not set
 # CONFIG_REGULATOR_AD5398 is not set
@@ -2510,6 +2518,7 @@ CONFIG_REGULATOR_GPIO=y
 # CONFIG_REGULATOR_LTC3589 is not set
 # CONFIG_REGULATOR_LTC3676 is not set
 # CONFIG_REGULATOR_MAX1586 is not set
+# CONFIG_REGULATOR_MAX77503 is not set
 # CONFIG_REGULATOR_MAX77857 is not set
 # CONFIG_REGULATOR_MAX8649 is not set
 # CONFIG_REGULATOR_MAX8660 is not set
@@ -2805,6 +2814,7 @@ CONFIG_USB_DWC2_HOST=y
 CONFIG_USB_CHIPIDEA=y
 CONFIG_USB_CHIPIDEA_HOST=y
 CONFIG_USB_CHIPIDEA_MSM=y
+CONFIG_USB_CHIPIDEA_NPCM=y
 CONFIG_USB_CHIPIDEA_IMX=y
 CONFIG_USB_CHIPIDEA_GENERIC=y
 CONFIG_USB_CHIPIDEA_TEGRA=y
@@ -2902,7 +2912,6 @@ CONFIG_MMC_BCM2835=y
 # CONFIG_MMC_MTK is not set
 # CONFIG_MMC_SDHCI_XENON is not set
 CONFIG_MMC_SDHCI_OMAP=y
-# CONFIG_MMC_SDHCI_AM654 is not set
 CONFIG_MMC_SDHCI_EXTERNAL_DMA=y
 # CONFIG_MEMSTICK is not set
 CONFIG_NEW_LEDS=y
@@ -2976,6 +2985,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 CONFIG_LEDS_TRIGGER_BACKLIGHT=y
 CONFIG_LEDS_TRIGGER_CPU=y
 # CONFIG_LEDS_TRIGGER_ACTIVITY is not set
+# CONFIG_LEDS_TRIGGER_GPIO is not set
 CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
 
 #
@@ -3025,6 +3035,7 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_DRV_DS1672 is not set
 # CONFIG_RTC_DRV_HYM8563 is not set
 # CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_MAX31335 is not set
 # CONFIG_RTC_DRV_NCT3018Y is not set
 # CONFIG_RTC_DRV_RS5C372 is not set
 # CONFIG_RTC_DRV_ISL1208 is not set
@@ -3223,6 +3234,7 @@ CONFIG_COMMON_CLK_SCMI=y
 # CONFIG_COMMON_CLK_CDCE706 is not set
 # CONFIG_COMMON_CLK_CDCE925 is not set
 # CONFIG_COMMON_CLK_CS2000_CP is not set
+# CONFIG_CLK_TWL is not set
 # CONFIG_CLK_TWL6040 is not set
 # CONFIG_COMMON_CLK_AXI_CLKGEN is not set
 CONFIG_COMMON_CLK_PALMAS=y
@@ -3232,8 +3244,6 @@ CONFIG_COMMON_CLK_PALMAS=y
 # CONFIG_COMMON_CLK_VC3 is not set
 # CONFIG_COMMON_CLK_VC5 is not set
 # CONFIG_COMMON_CLK_VC7 is not set
-CONFIG_COMMON_CLK_STM32MP135=y
-CONFIG_COMMON_CLK_STM32MP157=y
 # CONFIG_COMMON_CLK_FIXED_MMIO is not set
 CONFIG_CLK_BCM2711_DVP=y
 CONFIG_CLK_BCM2835=y
@@ -3247,6 +3257,9 @@ CONFIG_CLK_IMX6SX=y
 # CONFIG_CLK_IMX8MQ is not set
 # CONFIG_CLK_IMX8ULP is not set
 # CONFIG_CLK_IMX93 is not set
+CONFIG_COMMON_CLK_STM32MP=y
+CONFIG_COMMON_CLK_STM32MP135=y
+CONFIG_COMMON_CLK_STM32MP157=y
 # CONFIG_COMMON_CLK_TI_ADPLL is not set
 # CONFIG_XILINX_VCU is not set
 # CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set
@@ -3326,9 +3339,6 @@ CONFIG_AT91_SOC_ID=y
 #
 # Broadcom SoC drivers
 #
-CONFIG_BCM2835_POWER=y
-CONFIG_RASPBERRYPI_POWER=y
-# CONFIG_SOC_BRCMSTB is not set
 # end of Broadcom SoC drivers
 
 #
@@ -3346,7 +3356,6 @@ CONFIG_FSL_GUTS=y
 #
 # i.MX SoC drivers
 #
-# CONFIG_IMX_GPCV2_PM_DOMAINS is not set
 # CONFIG_SOC_IMX8M is not set
 # CONFIG_SOC_IMX9 is not set
 # end of i.MX SoC drivers
@@ -3373,6 +3382,39 @@ CONFIG_SOC_TI=y
 # end of Xilinx SoC drivers
 # end of SOC (System On Chip) specific Drivers
 
+#
+# PM Domains
+#
+
+#
+# Amlogic PM Domains
+#
+# end of Amlogic PM Domains
+
+# CONFIG_ARM_SCMI_PERF_DOMAIN is not set
+CONFIG_ARM_SCMI_POWER_DOMAIN=y
+
+#
+# Broadcom PM Domains
+#
+CONFIG_BCM2835_POWER=y
+CONFIG_RASPBERRYPI_POWER=y
+# end of Broadcom PM Domains
+
+#
+# i.MX PM Domains
+#
+# CONFIG_IMX_GPCV2_PM_DOMAINS is not set
+# end of i.MX PM Domains
+
+#
+# Qualcomm PM Domains
+#
+# end of Qualcomm PM Domains
+
+CONFIG_OMAP2PLUS_PRM=y
+# end of PM Domains
+
 CONFIG_PM_DEVFREQ=y
 
 #
@@ -3521,6 +3563,7 @@ CONFIG_ARM_PMU=y
 # CONFIG_DAX is not set
 CONFIG_NVMEM=y
 CONFIG_NVMEM_SYSFS=y
+CONFIG_NVMEM_LAYOUTS=y
 
 #
 # Layout Types
@@ -3600,6 +3643,7 @@ CONFIG_FS_MBCACHE=y
 # CONFIG_BTRFS_FS is not set
 # CONFIG_NILFS2_FS is not set
 # CONFIG_F2FS_FS is not set
+# CONFIG_BCACHEFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 CONFIG_EXPORTFS=y
 # CONFIG_EXPORTFS_BLOCK_OPS is not set
@@ -3718,6 +3762,7 @@ CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 # CONFIG_NFS_V4_1 is not set
 CONFIG_ROOT_NFS=y
+# CONFIG_NFS_FSCACHE is not set
 # CONFIG_NFS_USE_LEGACY_DNS is not set
 CONFIG_NFS_USE_KERNEL_DNS=y
 CONFIG_NFS_DISABLE_UDP_SUPPORT=y
@@ -3915,14 +3960,12 @@ CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_ADIANTUM is not set
 # CONFIG_CRYPTO_CHACHA20 is not set
 CONFIG_CRYPTO_CBC=y
-# CONFIG_CRYPTO_CFB is not set
 # CONFIG_CRYPTO_CTR is not set
 # CONFIG_CRYPTO_CTS is not set
 CONFIG_CRYPTO_ECB=y
 # CONFIG_CRYPTO_HCTR2 is not set
 # CONFIG_CRYPTO_KEYWRAP is not set
 # CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_OFB is not set
 # CONFIG_CRYPTO_PCBC is not set
 CONFIG_CRYPTO_XTS=y
 # end of Length-preserving ciphers and modes
@@ -4126,7 +4169,6 @@ CONFIG_ZSTD_DECOMPRESS=y
 CONFIG_XZ_DEC=y
 # CONFIG_XZ_DEC_X86 is not set
 # CONFIG_XZ_DEC_POWERPC is not set
-# CONFIG_XZ_DEC_IA64 is not set
 CONFIG_XZ_DEC_ARM=y
 # CONFIG_XZ_DEC_ARMTHUMB is not set
 # CONFIG_XZ_DEC_SPARC is not set
@@ -4147,6 +4189,7 @@ CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y
 CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y
 CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y
 CONFIG_DMA_NONCOHERENT_MMAP=y
+CONFIG_ARCH_HAS_DMA_ALLOC=y
 CONFIG_DMA_CMA=y
 
 #
@@ -4179,7 +4222,9 @@ CONFIG_GENERIC_VDSO_32=y
 CONFIG_SG_SPLIT=y
 CONFIG_ARCH_STACKWALK=y
 CONFIG_STACKDEPOT=y
+CONFIG_STACKDEPOT_MAX_FRAMES=64
 CONFIG_SBITMAP=y
+# CONFIG_LWQ_TEST is not set
 # end of Library routines
 
 CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
@@ -4211,7 +4256,7 @@ CONFIG_DEBUG_MISC=y
 # Compile-time checks and compiler options
 #
 CONFIG_DEBUG_INFO=y
-CONFIG_AS_HAS_NON_CONST_LEB128=y
+CONFIG_AS_HAS_NON_CONST_ULEB128=y
 # CONFIG_DEBUG_INFO_NONE is not set
 CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
 # CONFIG_DEBUG_INFO_DWARF4 is not set
@@ -4273,6 +4318,7 @@ CONFIG_SLUB_DEBUG=y
 # CONFIG_DEBUG_WX is not set
 CONFIG_HAVE_DEBUG_KMEMLEAK=y
 # CONFIG_DEBUG_KMEMLEAK is not set
+# CONFIG_PER_VMA_LOCK_STATS is not set
 # CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_SHRINKER_DEBUG is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
@@ -4363,8 +4409,6 @@ CONFIG_STACKTRACE=y
 # CONFIG_DEBUG_MAPLE_TREE is not set
 # end of Debug kernel data structures
 
-# CONFIG_DEBUG_CREDENTIALS is not set
-
 #
 # RCU Debugging
 #
@@ -4502,6 +4546,7 @@ CONFIG_RUNTIME_TESTING_MENU=y
 # CONFIG_TEST_MEMCAT_P is not set
 # CONFIG_TEST_MEMINIT is not set
 # CONFIG_TEST_FREE_PAGES is not set
+# CONFIG_TEST_OBJPOOL is not set
 CONFIG_ARCH_USE_MEMTEST=y
 # CONFIG_MEMTEST is not set
 # end of Kernel Testing and Coverage
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 80632f625c9b..bdeb0525d27d 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -124,8 +124,8 @@ PTXCONF_KERNEL_INSTALL=y
 PTXCONF_KERNEL_MODULES=y
 PTXCONF_KERNEL_MODULES_INSTALL=y
 # PTXCONF_KERNEL_MODULES_SIGN is not set
-PTXCONF_KERNEL_VERSION="6.6"
-PTXCONF_KERNEL_MD5="452098d80ba925af3a4ab35998f3aef5"
+PTXCONF_KERNEL_VERSION="6.8"
+PTXCONF_KERNEL_MD5="72d623b959a11850b57406f0b9fe3946"
 # PTXCONF_KERNEL_IMAGE_BZ is not set
 PTXCONF_KERNEL_IMAGE_Z=y
 # PTXCONF_KERNEL_IMAGE_XIP is not set
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 07/12] v7a: barebox: version bump v2024.01.0 → v2024.03.0
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
                   ` (5 preceding siblings ...)
  2024-03-15 21:12 ` [DistroKit] [PATCH 06/12] v7a: update kernel from v6.6 → v6.8 Ahmad Fatoum
@ 2024-03-15 21:12 ` Ahmad Fatoum
  2024-03-15 21:12 ` [DistroKit] [PATCH 08/12] v7a: barebox: enable STM32MP135F-DK support Ahmad Fatoum
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

The latest barebox release incorporates the single patch we had on top
of v2024.01.0, so let's drop it by updating.

Config changes are those of olddefconfig with the exception of
CONFIG_CMD_PARTED.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../platform-v7a/barebox-am335x-mlo.config    |  17 ++-
 configs/platform-v7a/barebox-am335x.config    |  19 ++-
 .../platform-v7a/barebox-am335x.config.diff   |   4 +-
 configs/platform-v7a/barebox-at91.config      |  18 ++-
 configs/platform-v7a/barebox-at91.config.diff |   4 +-
 configs/platform-v7a/barebox-mx6.config       |  18 ++-
 configs/platform-v7a/barebox-mx6.config.diff  |   2 +-
 configs/platform-v7a/barebox-rpi2.config      |  18 ++-
 configs/platform-v7a/barebox-rpi2.config.diff |   2 +-
 configs/platform-v7a/barebox-stm32mp.config   |  18 ++-
 .../platform-v7a/barebox-stm32mp.config.diff  |   2 +-
 configs/platform-v7a/barebox-vexpress.config  |  18 ++-
 .../platform-v7a/barebox-vexpress.config.diff |   2 +-
 configs/platform-v7a/barebox.config           |  18 ++-
 ...ression-booting-without-VideoCore-DT.patch | 130 ------------------
 .../patches/barebox-2024.01.0/series          |   1 -
 configs/platform-v7a/platformconfig           |   4 +-
 17 files changed, 139 insertions(+), 156 deletions(-)
 delete mode 100644 configs/platform-v7a/patches/barebox-2024.01.0/0001-ARM-rpi-fix-regression-booting-without-VideoCore-DT.patch
 delete mode 100644 configs/platform-v7a/patches/barebox-2024.01.0/series

diff --git a/configs/platform-v7a/barebox-am335x-mlo.config b/configs/platform-v7a/barebox-am335x-mlo.config
index 12707b759ab4..2261f70340f1 100644
--- a/configs/platform-v7a/barebox-am335x-mlo.config
+++ b/configs/platform-v7a/barebox-am335x-mlo.config
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Barebox/arm 2024.01.0 Configuration
+# Barebox/arm 2024.03.0 Configuration
 #
 CONFIG_ARM=y
 CONFIG_ARM_USE_COMPRESSED_DTB=y
@@ -16,7 +16,6 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_DIGIC is not set
 # CONFIG_ARCH_EP93XX is not set
-# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_MVEBU is not set
 # CONFIG_ARCH_MXS is not set
 # CONFIG_ARCH_NOMADIK is not set
@@ -28,6 +27,7 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_ZYNQ is not set
 # CONFIG_ARCH_BCM283X is not set
 # CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_LAYERSCAPE is not set
 CONFIG_ARCH_OMAP_MULTI=y
 # CONFIG_ARCH_ROCKCHIP is not set
 # CONFIG_ARCH_STM32MP is not set
@@ -189,6 +189,7 @@ CONFIG_DEBUG_OMAP_UART_PORT=1
 # CONFIG_DEBUG_INITCALLS is not set
 # CONFIG_DEBUG_PROBES is not set
 # CONFIG_DMA_API_DEBUG is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_PBL_BREAK is not set
 # CONFIG_PRINTF_FULL is not set
 # CONFIG_UBSAN is not set
@@ -313,6 +314,7 @@ CONFIG_MCI_OMAP_HSMMC=y
 # CONFIG_MCI_ARASAN is not set
 # CONFIG_MCI_AM654 is not set
 # CONFIG_MCI_SPI is not set
+# CONFIG_COMMON_CLK is not set
 
 #
 # Clocksource
@@ -454,6 +456,16 @@ CONFIG_TI_SYSC=y
 # end of KVX SoC drivers
 # end of SoC drivers
 
+#
+# PM Domains
+#
+
+#
+# i.MX PM Domains
+#
+# end of i.MX PM Domains
+# end of PM Domains
+
 #
 # NVME Support
 #
@@ -553,6 +565,7 @@ CONFIG_ARCH_HAS_ZERO_PAGE=y
 #
 # Hardening options
 #
+# CONFIG_BUG_ON_DATA_CORRUPTION is not set
 # CONFIG_STACK_GUARD_PAGE is not set
 CONFIG_STACKPROTECTOR_NONE=y
 # CONFIG_STACKPROTECTOR_STRONG is not set
diff --git a/configs/platform-v7a/barebox-am335x.config b/configs/platform-v7a/barebox-am335x.config
index c1ed4742a879..c0f8c11e3039 100644
--- a/configs/platform-v7a/barebox-am335x.config
+++ b/configs/platform-v7a/barebox-am335x.config
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Barebox/arm 2024.01.0 Configuration
+# Barebox/arm 2024.03.0 Configuration
 #
 CONFIG_ARM=y
 CONFIG_ARM_LINUX=y
@@ -17,7 +17,6 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_DIGIC is not set
 # CONFIG_ARCH_EP93XX is not set
-# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_MVEBU is not set
 # CONFIG_ARCH_MXS is not set
 # CONFIG_ARCH_NOMADIK is not set
@@ -29,6 +28,7 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_ZYNQ is not set
 # CONFIG_ARCH_BCM283X is not set
 # CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_LAYERSCAPE is not set
 CONFIG_ARCH_OMAP_MULTI=y
 # CONFIG_ARCH_ROCKCHIP is not set
 # CONFIG_ARCH_STM32MP is not set
@@ -199,6 +199,7 @@ CONFIG_CONSOLE_ALLOW_COLOR=y
 # CONFIG_PBL_CONSOLE is not set
 # CONFIG_CONSOLE_RATP is not set
 CONFIG_PARTITION=y
+CONFIG_PARTITION_MANIPULATION=y
 CONFIG_PARTITION_DISK=y
 CONFIG_PARTITION_DISK_DOS=y
 CONFIG_PARTITION_DISK_EFI=y
@@ -247,6 +248,7 @@ CONFIG_DEBUG_OMAP_UART_PORT=1
 # CONFIG_DEBUG_INITCALLS is not set
 # CONFIG_DEBUG_PROBES is not set
 # CONFIG_DMA_API_DEBUG is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_PBL_BREAK is not set
 # CONFIG_PRINTF_FULL is not set
 # CONFIG_UBSAN is not set
@@ -318,6 +320,7 @@ CONFIG_CMD_BOOTCHOOSER=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_AUTOMOUNT=y
 CONFIG_CMD_MOUNT=y
+CONFIG_CMD_PARTED=y
 CONFIG_CMD_UMOUNT=y
 # end of Partition
 
@@ -684,6 +687,7 @@ CONFIG_MCI_OMAP_HSMMC=y
 # CONFIG_MCI_ARASAN is not set
 # CONFIG_MCI_AM654 is not set
 # CONFIG_MCI_SPI is not set
+# CONFIG_COMMON_CLK is not set
 
 #
 # Clocksource
@@ -864,6 +868,16 @@ CONFIG_REGULATOR_FIXED=y
 # end of KVX SoC drivers
 # end of SoC drivers
 
+#
+# PM Domains
+#
+
+#
+# i.MX PM Domains
+#
+# end of i.MX PM Domains
+# end of PM Domains
+
 #
 # NVME Support
 #
@@ -975,6 +989,7 @@ CONFIG_ARCH_HAS_ZERO_PAGE=y
 #
 # Hardening options
 #
+# CONFIG_BUG_ON_DATA_CORRUPTION is not set
 # CONFIG_STACK_GUARD_PAGE is not set
 CONFIG_STACKPROTECTOR_NONE=y
 # CONFIG_STACKPROTECTOR_STRONG is not set
diff --git a/configs/platform-v7a/barebox-am335x.config.diff b/configs/platform-v7a/barebox-am335x.config.diff
index 08263f1550e4..c0fb0f8c6e55 100644
--- a/configs/platform-v7a/barebox-am335x.config.diff
+++ b/configs/platform-v7a/barebox-am335x.config.diff
@@ -1,4 +1,4 @@
-d3e92d2ec90d9be624961ebc5d6342c0
+7b026e83521009fb334bf433e0530043
 # CONFIG_AM33XX_NET_BOOT is not set
 CONFIG_ARCH_AM33XX=y
 # CONFIG_ARCH_BCM283X is not set
@@ -25,7 +25,7 @@ CONFIG_CMD_NAND=y
 # CONFIG_CMD_NAND_BITFLIP is not set
 # CONFIG_CMD_NVMEM is not set
 # CONFIG_CMD_SMC is undefined
-# CONFIG_COMMON_CLK is undefined
+# CONFIG_COMMON_CLK is not set
 # CONFIG_COMMON_CLK_GPIO is undefined
 # CONFIG_COMMON_CLK_OF_PROVIDER is undefined
 # CONFIG_CONSOLE_ACTIVATE_FIRST is not set
diff --git a/configs/platform-v7a/barebox-at91.config b/configs/platform-v7a/barebox-at91.config
index e72af942d5e1..90ca63089cee 100644
--- a/configs/platform-v7a/barebox-at91.config
+++ b/configs/platform-v7a/barebox-at91.config
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Barebox/arm 2024.01.0 Configuration
+# Barebox/arm 2024.03.0 Configuration
 #
 CONFIG_ARM=y
 CONFIG_ARM_LINUX=y
@@ -16,7 +16,6 @@ CONFIG_ARCH_AT91=y
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_DIGIC is not set
 # CONFIG_ARCH_EP93XX is not set
-# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_MVEBU is not set
 # CONFIG_ARCH_MXS is not set
 # CONFIG_ARCH_NOMADIK is not set
@@ -54,6 +53,7 @@ CONFIG_HAVE_AT91_DDRAMC=y
 CONFIG_AT91_MCI_PBL=y
 CONFIG_AT91SAM9_SMC=y
 CONFIG_HAVE_AT91SAM9_RST=y
+CONFIG_SOC_SAM_V7=y
 CONFIG_SOC_SAMA5=y
 CONFIG_SOC_SAMA5_MULTI=y
 CONFIG_SOC_SAMA5D2=y
@@ -207,6 +207,7 @@ CONFIG_CONSOLE_ALLOW_COLOR=y
 CONFIG_PBL_CONSOLE=y
 # CONFIG_CONSOLE_RATP is not set
 CONFIG_PARTITION=y
+CONFIG_PARTITION_MANIPULATION=y
 CONFIG_PARTITION_DISK=y
 CONFIG_PARTITION_DISK_DOS=y
 CONFIG_PARTITION_DISK_EFI=y
@@ -257,6 +258,7 @@ CONFIG_DEBUG_AT91_UART_BASE=0xfc069000
 # CONFIG_DEBUG_PBL is not set
 # CONFIG_DEBUG_PROBES is not set
 # CONFIG_DMA_API_DEBUG is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_PBL_BREAK is not set
 # CONFIG_PRINTF_FULL is not set
 # CONFIG_UBSAN is not set
@@ -330,6 +332,7 @@ CONFIG_CMD_BOOTCHOOSER=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_AUTOMOUNT=y
 CONFIG_CMD_MOUNT=y
+CONFIG_CMD_PARTED=y
 CONFIG_CMD_UBI=y
 CONFIG_CMD_UBIFORMAT=y
 CONFIG_CMD_UMOUNT=y
@@ -870,6 +873,16 @@ CONFIG_ATMEL_EBI=y
 # end of KVX SoC drivers
 # end of SoC drivers
 
+#
+# PM Domains
+#
+
+#
+# i.MX PM Domains
+#
+# end of i.MX PM Domains
+# end of PM Domains
+
 #
 # NVME Support
 #
@@ -982,6 +995,7 @@ CONFIG_GENERIC_ALLOCATOR=y
 #
 # Hardening options
 #
+# CONFIG_BUG_ON_DATA_CORRUPTION is not set
 # CONFIG_STACK_GUARD_PAGE is not set
 CONFIG_STACKPROTECTOR_NONE=y
 # CONFIG_STACKPROTECTOR_STRONG is not set
diff --git a/configs/platform-v7a/barebox-at91.config.diff b/configs/platform-v7a/barebox-at91.config.diff
index b79f60e95cd2..3ee11b6754a7 100644
--- a/configs/platform-v7a/barebox-at91.config.diff
+++ b/configs/platform-v7a/barebox-at91.config.diff
@@ -1,7 +1,8 @@
-d3e92d2ec90d9be624961ebc5d6342c0
+7b026e83521009fb334bf433e0530043
 CONFIG_ARCH_AT91=y
 # CONFIG_ARCH_BCM283X is not set
 # CONFIG_ARCH_IMX is undefined
+# CONFIG_ARCH_LAYERSCAPE is undefined
 # CONFIG_ARCH_MULTIARCH is not set
 # CONFIG_ARCH_OMAP_MULTI is undefined
 # CONFIG_ARCH_ROCKCHIP is undefined
@@ -139,6 +140,7 @@ CONFIG_SOC_SAMA5=y
 CONFIG_SOC_SAMA5D2=y
 CONFIG_SOC_SAMA5D4=y
 CONFIG_SOC_SAMA5_MULTI=y
+CONFIG_SOC_SAM_V7=y
 CONFIG_SPI_ATMEL_QUADSPI=y
 # CONFIG_SPI_CADENCE_QUADSPI is not set
 CONFIG_SPI_MEM=y
diff --git a/configs/platform-v7a/barebox-mx6.config b/configs/platform-v7a/barebox-mx6.config
index 42d90a59ee41..bafa946749aa 100644
--- a/configs/platform-v7a/barebox-mx6.config
+++ b/configs/platform-v7a/barebox-mx6.config
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Barebox/arm 2024.01.0 Configuration
+# Barebox/arm 2024.03.0 Configuration
 #
 CONFIG_ARM=y
 CONFIG_ARM_LINUX=y
@@ -15,7 +15,6 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_DIGIC is not set
 # CONFIG_ARCH_EP93XX is not set
-# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_MVEBU is not set
 # CONFIG_ARCH_MXS is not set
 # CONFIG_ARCH_NOMADIK is not set
@@ -27,6 +26,7 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_ZYNQ is not set
 # CONFIG_ARCH_BCM283X is not set
 CONFIG_ARCH_IMX=y
+# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_OMAP_MULTI is not set
 # CONFIG_ARCH_ROCKCHIP is not set
 # CONFIG_ARCH_STM32MP is not set
@@ -291,6 +291,7 @@ CONFIG_CONSOLE_ALLOW_COLOR=y
 # CONFIG_PBL_CONSOLE is not set
 # CONFIG_CONSOLE_RATP is not set
 CONFIG_PARTITION=y
+CONFIG_PARTITION_MANIPULATION=y
 CONFIG_PARTITION_DISK=y
 CONFIG_PARTITION_DISK_DOS=y
 CONFIG_PARTITION_DISK_EFI=y
@@ -340,6 +341,7 @@ CONFIG_DEBUG_IMX_UART_PORT=1
 # CONFIG_DEBUG_INITCALLS is not set
 # CONFIG_DEBUG_PROBES is not set
 # CONFIG_DMA_API_DEBUG is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_PBL_BREAK is not set
 # CONFIG_PRINTF_FULL is not set
 # CONFIG_UBSAN is not set
@@ -412,6 +414,7 @@ CONFIG_CMD_BOOTCHOOSER=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_AUTOMOUNT=y
 CONFIG_CMD_MOUNT=y
+CONFIG_CMD_PARTED=y
 CONFIG_CMD_UBI=y
 CONFIG_CMD_UBIFORMAT=y
 CONFIG_CMD_UMOUNT=y
@@ -1034,6 +1037,16 @@ CONFIG_USB_NOP_XCEIV=y
 # end of KVX SoC drivers
 # end of SoC drivers
 
+#
+# PM Domains
+#
+
+#
+# i.MX PM Domains
+#
+# end of i.MX PM Domains
+# end of PM Domains
+
 #
 # NVME Support
 #
@@ -1162,6 +1175,7 @@ CONFIG_ARCH_HAS_ZERO_PAGE=y
 #
 # Hardening options
 #
+# CONFIG_BUG_ON_DATA_CORRUPTION is not set
 # CONFIG_STACK_GUARD_PAGE is not set
 CONFIG_STACKPROTECTOR_NONE=y
 # CONFIG_STACKPROTECTOR_STRONG is not set
diff --git a/configs/platform-v7a/barebox-mx6.config.diff b/configs/platform-v7a/barebox-mx6.config.diff
index 80ca60d3c9f6..b98585bbc6f3 100644
--- a/configs/platform-v7a/barebox-mx6.config.diff
+++ b/configs/platform-v7a/barebox-mx6.config.diff
@@ -1,4 +1,4 @@
-d3e92d2ec90d9be624961ebc5d6342c0
+7b026e83521009fb334bf433e0530043
 # CONFIG_ARCH_BCM283X is not set
 CONFIG_ARCH_HAS_FEC_IMX=y
 CONFIG_ARCH_HAS_IMX_GPT=y
diff --git a/configs/platform-v7a/barebox-rpi2.config b/configs/platform-v7a/barebox-rpi2.config
index 6ed303661e5e..f79b68eced96 100644
--- a/configs/platform-v7a/barebox-rpi2.config
+++ b/configs/platform-v7a/barebox-rpi2.config
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Barebox/arm 2024.01.0 Configuration
+# Barebox/arm 2024.03.0 Configuration
 #
 CONFIG_ARM=y
 CONFIG_ARM_LINUX=y
@@ -16,7 +16,6 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_DIGIC is not set
 # CONFIG_ARCH_EP93XX is not set
-# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_MVEBU is not set
 # CONFIG_ARCH_MXS is not set
 # CONFIG_ARCH_NOMADIK is not set
@@ -28,6 +27,7 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_ZYNQ is not set
 CONFIG_ARCH_BCM283X=y
 # CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_OMAP_MULTI is not set
 # CONFIG_ARCH_ROCKCHIP is not set
 # CONFIG_ARCH_STM32MP is not set
@@ -192,6 +192,7 @@ CONFIG_CONSOLE_ALLOW_COLOR=y
 # CONFIG_PBL_CONSOLE is not set
 # CONFIG_CONSOLE_RATP is not set
 CONFIG_PARTITION=y
+CONFIG_PARTITION_MANIPULATION=y
 CONFIG_PARTITION_DISK=y
 CONFIG_PARTITION_DISK_DOS=y
 CONFIG_PARTITION_DISK_EFI=y
@@ -239,6 +240,7 @@ CONFIG_DEFAULT_LOGLEVEL=6
 # CONFIG_DEBUG_INITCALLS is not set
 # CONFIG_DEBUG_PROBES is not set
 # CONFIG_DMA_API_DEBUG is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_PBL_BREAK is not set
 # CONFIG_PRINTF_FULL is not set
 # CONFIG_UBSAN is not set
@@ -310,6 +312,7 @@ CONFIG_CMD_BOOTCHOOSER=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_AUTOMOUNT=y
 CONFIG_CMD_MOUNT=y
+CONFIG_CMD_PARTED=y
 CONFIG_CMD_UMOUNT=y
 # end of Partition
 
@@ -845,6 +848,16 @@ CONFIG_USB_NOP_XCEIV=y
 # end of KVX SoC drivers
 # end of SoC drivers
 
+#
+# PM Domains
+#
+
+#
+# i.MX PM Domains
+#
+# end of i.MX PM Domains
+# end of PM Domains
+
 #
 # NVME Support
 #
@@ -956,6 +969,7 @@ CONFIG_ARCH_HAS_ZERO_PAGE=y
 #
 # Hardening options
 #
+# CONFIG_BUG_ON_DATA_CORRUPTION is not set
 # CONFIG_STACK_GUARD_PAGE is not set
 CONFIG_STACKPROTECTOR_NONE=y
 # CONFIG_STACKPROTECTOR_STRONG is not set
diff --git a/configs/platform-v7a/barebox-rpi2.config.diff b/configs/platform-v7a/barebox-rpi2.config.diff
index 9b287d415fd5..c42da95432cd 100644
--- a/configs/platform-v7a/barebox-rpi2.config.diff
+++ b/configs/platform-v7a/barebox-rpi2.config.diff
@@ -1,4 +1,4 @@
-d3e92d2ec90d9be624961ebc5d6342c0
+7b026e83521009fb334bf433e0530043
 CONFIG_ARM_ASM_UNIFIED=y
 # CONFIG_CMD_NVMEM is not set
 CONFIG_DRIVER_NET_BCMGENET=y
diff --git a/configs/platform-v7a/barebox-stm32mp.config b/configs/platform-v7a/barebox-stm32mp.config
index 69fd19862896..ba40c44bdb74 100644
--- a/configs/platform-v7a/barebox-stm32mp.config
+++ b/configs/platform-v7a/barebox-stm32mp.config
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Barebox/arm 2024.01.0 Configuration
+# Barebox/arm 2024.03.0 Configuration
 #
 CONFIG_ARM=y
 CONFIG_ARM_LINUX=y
@@ -17,7 +17,6 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_DIGIC is not set
 # CONFIG_ARCH_EP93XX is not set
-# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_MVEBU is not set
 # CONFIG_ARCH_MXS is not set
 # CONFIG_ARCH_NOMADIK is not set
@@ -29,6 +28,7 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_ZYNQ is not set
 # CONFIG_ARCH_BCM283X is not set
 # CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_OMAP_MULTI is not set
 # CONFIG_ARCH_ROCKCHIP is not set
 CONFIG_ARCH_STM32MP=y
@@ -188,6 +188,7 @@ CONFIG_CONSOLE_ALLOW_COLOR=y
 CONFIG_PBL_CONSOLE=y
 # CONFIG_CONSOLE_RATP is not set
 CONFIG_PARTITION=y
+CONFIG_PARTITION_MANIPULATION=y
 CONFIG_PARTITION_DISK=y
 CONFIG_PARTITION_DISK_DOS=y
 CONFIG_PARTITION_DISK_EFI=y
@@ -236,6 +237,7 @@ CONFIG_DEFAULT_LOGLEVEL=7
 # CONFIG_DEBUG_PBL is not set
 # CONFIG_DEBUG_PROBES is not set
 # CONFIG_DMA_API_DEBUG is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_PBL_BREAK is not set
 # CONFIG_PRINTF_FULL is not set
 # CONFIG_UBSAN is not set
@@ -307,6 +309,7 @@ CONFIG_CMD_BOOTCHOOSER=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_AUTOMOUNT=y
 CONFIG_CMD_MOUNT=y
+CONFIG_CMD_PARTED=y
 CONFIG_CMD_UMOUNT=y
 # end of Partition
 
@@ -824,6 +827,16 @@ CONFIG_STM32_FMC2_EBI=y
 # end of KVX SoC drivers
 # end of SoC drivers
 
+#
+# PM Domains
+#
+
+#
+# i.MX PM Domains
+#
+# end of i.MX PM Domains
+# end of PM Domains
+
 #
 # NVME Support
 #
@@ -928,6 +941,7 @@ CONFIG_ARCH_HAS_ZERO_PAGE=y
 #
 # Hardening options
 #
+# CONFIG_BUG_ON_DATA_CORRUPTION is not set
 CONFIG_STACK_GUARD_PAGE=y
 CONFIG_STACKPROTECTOR=y
 # CONFIG_STACKPROTECTOR_NONE is not set
diff --git a/configs/platform-v7a/barebox-stm32mp.config.diff b/configs/platform-v7a/barebox-stm32mp.config.diff
index 3536924668d3..eddcb3a5ef5b 100644
--- a/configs/platform-v7a/barebox-stm32mp.config.diff
+++ b/configs/platform-v7a/barebox-stm32mp.config.diff
@@ -1,4 +1,4 @@
-d3e92d2ec90d9be624961ebc5d6342c0
+7b026e83521009fb334bf433e0530043
 # CONFIG_ARCH_BCM283X is not set
 CONFIG_ARCH_HAS_RESET_CONTROLLER=y
 CONFIG_ARCH_NR_GPIO=416
diff --git a/configs/platform-v7a/barebox-vexpress.config b/configs/platform-v7a/barebox-vexpress.config
index 06b9ee62b7ef..33acadf69bcf 100644
--- a/configs/platform-v7a/barebox-vexpress.config
+++ b/configs/platform-v7a/barebox-vexpress.config
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Barebox/arm 2024.01.0 Configuration
+# Barebox/arm 2024.03.0 Configuration
 #
 CONFIG_ARM=y
 CONFIG_ARM_LINUX=y
@@ -15,7 +15,6 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_DIGIC is not set
 # CONFIG_ARCH_EP93XX is not set
-# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_MVEBU is not set
 # CONFIG_ARCH_MXS is not set
 # CONFIG_ARCH_NOMADIK is not set
@@ -27,6 +26,7 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_ZYNQ is not set
 # CONFIG_ARCH_BCM283X is not set
 # CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_OMAP_MULTI is not set
 # CONFIG_ARCH_ROCKCHIP is not set
 # CONFIG_ARCH_STM32MP is not set
@@ -175,6 +175,7 @@ CONFIG_CONSOLE_ALLOW_COLOR=y
 CONFIG_PBL_CONSOLE=y
 # CONFIG_CONSOLE_RATP is not set
 CONFIG_PARTITION=y
+CONFIG_PARTITION_MANIPULATION=y
 CONFIG_PARTITION_DISK=y
 CONFIG_PARTITION_DISK_DOS=y
 CONFIG_PARTITION_DISK_EFI=y
@@ -224,6 +225,7 @@ CONFIG_DEFAULT_LOGLEVEL=6
 # CONFIG_DEBUG_PBL is not set
 # CONFIG_DEBUG_PROBES is not set
 # CONFIG_DMA_API_DEBUG is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_PBL_BREAK is not set
 # CONFIG_PRINTF_FULL is not set
 # CONFIG_UBSAN is not set
@@ -294,6 +296,7 @@ CONFIG_CMD_BOOTCHOOSER=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_AUTOMOUNT=y
 CONFIG_CMD_MOUNT=y
+CONFIG_CMD_PARTED=y
 CONFIG_CMD_UMOUNT=y
 # end of Partition
 
@@ -788,6 +791,16 @@ CONFIG_REGULATOR=y
 # end of KVX SoC drivers
 # end of SoC drivers
 
+#
+# PM Domains
+#
+
+#
+# i.MX PM Domains
+#
+# end of i.MX PM Domains
+# end of PM Domains
+
 #
 # NVME Support
 #
@@ -896,6 +909,7 @@ CONFIG_ARCH_HAS_ZERO_PAGE=y
 #
 # Hardening options
 #
+# CONFIG_BUG_ON_DATA_CORRUPTION is not set
 # CONFIG_STACK_GUARD_PAGE is not set
 CONFIG_STACKPROTECTOR_NONE=y
 # CONFIG_STACKPROTECTOR_STRONG is not set
diff --git a/configs/platform-v7a/barebox-vexpress.config.diff b/configs/platform-v7a/barebox-vexpress.config.diff
index 9ed9b5a6e4d3..3186417803a3 100644
--- a/configs/platform-v7a/barebox-vexpress.config.diff
+++ b/configs/platform-v7a/barebox-vexpress.config.diff
@@ -1,4 +1,4 @@
-d3e92d2ec90d9be624961ebc5d6342c0
+7b026e83521009fb334bf433e0530043
 CONFIG_AMBA_SP804=y
 # CONFIG_ARCH_BCM283X is not set
 CONFIG_ARCH_VEXPRESS=y
diff --git a/configs/platform-v7a/barebox.config b/configs/platform-v7a/barebox.config
index a4ee3a1c619a..855e83cd98a4 100644
--- a/configs/platform-v7a/barebox.config
+++ b/configs/platform-v7a/barebox.config
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Barebox/arm 2024.01.0 Configuration
+# Barebox/arm 2024.03.0 Configuration
 #
 CONFIG_ARM=y
 CONFIG_ARM_LINUX=y
@@ -16,7 +16,6 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_DAVINCI is not set
 # CONFIG_ARCH_DIGIC is not set
 # CONFIG_ARCH_EP93XX is not set
-# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_MVEBU is not set
 # CONFIG_ARCH_MXS is not set
 # CONFIG_ARCH_NOMADIK is not set
@@ -28,6 +27,7 @@ CONFIG_ARCH_MULTIARCH=y
 # CONFIG_ARCH_ZYNQ is not set
 CONFIG_ARCH_BCM283X=y
 # CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_LAYERSCAPE is not set
 # CONFIG_ARCH_OMAP_MULTI is not set
 # CONFIG_ARCH_ROCKCHIP is not set
 # CONFIG_ARCH_STM32MP is not set
@@ -191,6 +191,7 @@ CONFIG_CONSOLE_ALLOW_COLOR=y
 # CONFIG_PBL_CONSOLE is not set
 # CONFIG_CONSOLE_RATP is not set
 CONFIG_PARTITION=y
+CONFIG_PARTITION_MANIPULATION=y
 CONFIG_PARTITION_DISK=y
 CONFIG_PARTITION_DISK_DOS=y
 CONFIG_PARTITION_DISK_EFI=y
@@ -239,6 +240,7 @@ CONFIG_DEFAULT_LOGLEVEL=6
 # CONFIG_DEBUG_INITCALLS is not set
 # CONFIG_DEBUG_PROBES is not set
 # CONFIG_DMA_API_DEBUG is not set
+# CONFIG_DEBUG_LIST is not set
 # CONFIG_PBL_BREAK is not set
 # CONFIG_PRINTF_FULL is not set
 # CONFIG_UBSAN is not set
@@ -309,6 +311,7 @@ CONFIG_CMD_BOOTCHOOSER=y
 CONFIG_CMD_PARTITION=y
 CONFIG_CMD_AUTOMOUNT=y
 CONFIG_CMD_MOUNT=y
+CONFIG_CMD_PARTED=y
 CONFIG_CMD_UMOUNT=y
 # end of Partition
 
@@ -837,6 +840,16 @@ CONFIG_REGULATOR_BCM283X=y
 # end of KVX SoC drivers
 # end of SoC drivers
 
+#
+# PM Domains
+#
+
+#
+# i.MX PM Domains
+#
+# end of i.MX PM Domains
+# end of PM Domains
+
 #
 # NVME Support
 #
@@ -947,6 +960,7 @@ CONFIG_ARCH_HAS_ZERO_PAGE=y
 #
 # Hardening options
 #
+# CONFIG_BUG_ON_DATA_CORRUPTION is not set
 # CONFIG_STACK_GUARD_PAGE is not set
 CONFIG_STACKPROTECTOR_NONE=y
 # CONFIG_STACKPROTECTOR_STRONG is not set
diff --git a/configs/platform-v7a/patches/barebox-2024.01.0/0001-ARM-rpi-fix-regression-booting-without-VideoCore-DT.patch b/configs/platform-v7a/patches/barebox-2024.01.0/0001-ARM-rpi-fix-regression-booting-without-VideoCore-DT.patch
deleted file mode 100644
index 6f261b86cd68..000000000000
--- a/configs/platform-v7a/patches/barebox-2024.01.0/0001-ARM-rpi-fix-regression-booting-without-VideoCore-DT.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 3ff500b014f4e7901721e5e581d50d7b5a7ff337 Mon Sep 17 00:00:00 2001
-From: Ahmad Fatoum <a.fatoum@pengutronix.de>
-Date: Tue, 5 Mar 2024 10:31:22 +0100
-Subject: [PATCH] ARM: rpi: fix regression booting without VideoCore DT
-
-The Raspberry Pi firmware running prior to barebox can load a kernel
-directly and thus can boot barebox-dt-2nd.img straight without having to
-use the Raspberry Pi specific entry points.
-
-However, the Raspberry Pi specific entry points, store the VideoCore DT
-into a handover area for earlier extraction of fixups done by the
-VideoCore firmware. This doesn't happen with barebox-dt-2nd.img.
-
-Commit 5ea6e19737e1 ("raspi: support to read vc values via dt-2nd boot")
-worked around this by using the barebox-internal DT, when a VideoCore DT
-wasn't saved, but this in turn added a slew of warnings to the valid setup
-of having no VideoCore DT at all and just using a proper Raspberry Pi
-PBL with their embedded DTs:
-
-    WARNING: no property 'serial-number' found in vc fdt's '' node
-    no '/system' node found in vc fdt
-    no '/axi' node found in vc fdt
-    no '/hat' node found in vc fdt
-    no '/chosen/bootloader' node found in vc fdt
-    WARNING: no property 'bootargs' found in vc fdt's '/chosen' node
-    WARNING: no property 'overlay_prefix' found in vc fdt's '/chosen' node
-    WARNING: no property 'os_prefix' found in vc fdt's '/chosen' node
-    WARNING: 'pm_rsts' value not found in vc fdt
-    ERROR: Won't delete root device node
-
-Fix this by not calling rpi_vc_fdt_parse on the barebox DT if a previous
-Raspberry Pi PBL has written VIDEOCORE_FDT_ERROR into the handoff area
-to indicate a missing VideoCore DT.
-
-Fixes: 5ea6e19737e1 ("raspi: support to read vc values via dt-2nd boot")
-Reported-by: Roland Hieber <rhi@pengutronix.de>
-Cc: Denis Osterland-Heim <denis.osterland@gmail.com>
-Link: https://lore.barebox.org/barebox/20240219191400.do7ib5rxy7tupv4i@pengutronix.de/
-Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
----
- arch/arm/boards/raspberry-pi/rpi-common.c | 43 +++++++++++++++++------
- 1 file changed, 33 insertions(+), 10 deletions(-)
-
-diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
-index 1dfd0b0a10f4..7c82c740e256 100644
---- a/arch/arm/boards/raspberry-pi/rpi-common.c
-+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
-@@ -332,7 +332,7 @@ static void rpi_vc_fdt_parse(struct device_node *root)
- 	chosen = register_vc_fixup(root, "/chosen");
- 	if (!chosen) {
- 		pr_err("no '/chosen' node found in vc fdt\n");
--		goto out;
-+		return;
- 	}
- 
- 	bootloader = of_find_node_by_name(chosen, "bootloader");
-@@ -385,13 +385,20 @@ static void rpi_vc_fdt_parse(struct device_node *root)
- 
- 		of_add_memory(memory, false);
- 	}
--
--out:
--	if (root)
--		of_delete_node(root);
--	return;
- }
- 
-+/**
-+ * rpi_vc_fdt - unflatten VideoCore provided DT
-+ *
-+ * If configured via config.txt, the VideoCore firmware will pass barebox PBL
-+ * a device-tree in a register. This is saved to a handover memory area by
-+ * the Raspberry Pi PBL, which is parsed here. barebox-dt-2nd doesn't
-+ * populate this area, instead it uses the VideoCore DT as its own DT.
-+ *
-+ * Return: an unflattened DT on success, an error pointer if parsing the DT
-+ * fails and NULL if a Raspberry Pi PBL has run, but no VideoCore FDT was
-+ * saved.
-+ */
- static struct device_node *rpi_vc_fdt(void)
- {
- 	void *saved_vc_fdt;
-@@ -408,7 +415,7 @@ static struct device_node *rpi_vc_fdt(void)
- 		if (oftree->totalsize)
- 			pr_err("there was an error copying fdt in pbl: %d\n",
- 					be32_to_cpu(oftree->totalsize));
--		return ERR_PTR(-EINVAL);
-+		return NULL;
- 	}
- 
- 	if (magic != FDT_MAGIC)
-@@ -481,7 +488,7 @@ static int rpi_devices_probe(struct device *dev)
- 	const struct rpi_machine_data *dcfg;
- 	struct regulator *reg;
- 	struct rpi_priv *priv;
--	struct device_node *root;
-+	struct device_node *vc_root;
- 	const char *name, *ptr;
- 	char *hostname;
- 	int ret;
-@@ -510,8 +517,24 @@ static int rpi_devices_probe(struct device *dev)
- 	bcm2835_register_fb();
- 	armlinux_set_architecture(MACH_TYPE_BCM2708);
- 	rpi_env_init();
--	root = rpi_vc_fdt();
--	rpi_vc_fdt_parse(IS_ERR(root) ? priv->dev->device_node : root);
-+
-+	vc_root = rpi_vc_fdt();
-+	if (!vc_root) {
-+		dev_dbg(dev, "No VideoCore FDT was provided\n");
-+	} else if (!IS_ERR(vc_root)) {
-+		dev_dbg(dev, "VideoCore FDT was provided\n");
-+		rpi_vc_fdt_parse(vc_root);
-+		of_delete_node(vc_root);
-+	} else if (IS_ERR(vc_root)) {
-+		/* This is intentionally at a higher logging level, because we can't
-+		 * be sure that the external DT is indeed a barebox DT (and not a
-+		 * kernel DT that happened to be in the partition). So for ease
-+		 * of debugging, we report this at info log level.
-+		 */
-+		dev_info(dev, "barebox FDT will be used for VideoCore FDT\n");
-+		rpi_vc_fdt_parse(priv->dev->device_node);
-+	}
-+
- 	rpi_set_kernel_name();
- 
- 	if (dcfg && dcfg->init)
--- 
-2.39.2
-
diff --git a/configs/platform-v7a/patches/barebox-2024.01.0/series b/configs/platform-v7a/patches/barebox-2024.01.0/series
deleted file mode 100644
index 6822bd532ad5..000000000000
--- a/configs/platform-v7a/patches/barebox-2024.01.0/series
+++ /dev/null
@@ -1 +0,0 @@
-0001-ARM-rpi-fix-regression-booting-without-VideoCore-DT.patch
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index bdeb0525d27d..2efae02cb241 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -183,8 +183,8 @@ PTXCONF_AT91BOOTSTRAP2_MD5="ef321a80bf428bfd6cb642c96126ef6c"
 PTXCONF_AT91BOOTSTRAP2_CONFIG="at91bootstrap-wifx-l1.config"
 PTXCONF_BAREBOX_COMMON_ARCH_STRING="arm"
 PTXCONF_BAREBOX_COMMON=y
-PTXCONF_BAREBOX_COMMON_VERSION="2024.01.0"
-PTXCONF_BAREBOX_COMMON_MD5="8a94bdde5eaa1362b6c752f975f9e954"
+PTXCONF_BAREBOX_COMMON_VERSION="2024.03.0"
+PTXCONF_BAREBOX_COMMON_MD5="dcb443c48b64662b52974502c502427e"
 PTXCONF_BAREBOX_COMMON_NEEDS_HOST_LZOP=y
 PTXCONF_BAREBOX_AM335X_MLO=y
 PTXCONF_BAREBOX_AM335X=y
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 08/12] v7a: barebox: enable STM32MP135F-DK support
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
                   ` (6 preceding siblings ...)
  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
  2024-03-15 21:12 ` [DistroKit] [PATCH 09/12] v7a: build OP-TEE for STM32MP13 Ahmad Fatoum
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

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




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 09/12] v7a: build OP-TEE for STM32MP13
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
                   ` (7 preceding siblings ...)
  2024-03-15 21:12 ` [DistroKit] [PATCH 08/12] v7a: barebox: enable STM32MP135F-DK support Ahmad Fatoum
@ 2024-03-15 21:12 ` Ahmad Fatoum
  2024-03-15 21:12 ` [DistroKit] [PATCH 10/12] v7a: stm32mp: add TF-A recipe " Ahmad Fatoum
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

For the STM32MP13, ST decided that everyone should be using OP-TEE as
System Control and Management Interface (SCMI) provider and the kernel
driver for the reset and clock control (RCC) peripheral will talk to
the SCMI provider. Therefore let's enable OP-TEE, so we can make use of
this.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/platformconfig | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 2efae02cb241..c502a5e44b40 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -199,7 +199,10 @@ PTXCONF_BAREBOX_ARCH_STRING="arm"
 PTXCONF_BOOTLOADER=y
 # PTXCONF_GRUB is not set
 # PTXCONF_HOST_MXS_UTILS is not set
-# PTXCONF_OPTEE is not set
+PTXCONF_OPTEE=y
+PTXCONF_OPTEE_PLATFORM="stm32mp1"
+PTXCONF_OPTEE_PLATFORM_FLAVOUR="135F_DK"
+PTXCONF_OPTEE_CFG="CFG_TEE_CORE_LOG_LEVEL=2 CFG_WITH_PAGER=n"
 PTXCONF_TF_A=y
 PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot"
 PTXCONF_TF_A_VERSION="v2.10"
@@ -349,7 +352,9 @@ PTXCONF_HOST_SYSTEM_PYTHON3_PYPROJECT_HOOKS=y
 PTXCONF_HOST_SYSTEM_PYTHON3_TOMLI=y
 PTXCONF_HOST_SYSTEM_PYTHON3_WHEEL=y
 PTXCONF_HOST_SYSTEM_PYTHON3=y
+PTXCONF_HOST_SYSTEM_PYTHON3_CRYPTOGRAPHY=y
 PTXCONF_HOST_SYSTEM_PYTHON3_SETUPTOOLS=y
+PTXCONF_HOST_SYSTEM_PYTHON3_PYELFTOOLS=y
 PTXCONF_HOST_UTIL_LINUX=y
 PTXCONF_HOST_ZLIB=y
 PTXCONF_HOST_TF_A=y
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 10/12] v7a: stm32mp: add TF-A recipe for STM32MP13
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
                   ` (8 preceding siblings ...)
  2024-03-15 21:12 ` [DistroKit] [PATCH 09/12] v7a: build OP-TEE for STM32MP13 Ahmad Fatoum
@ 2024-03-15 21:12 ` 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
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

We have two ways of doing multi-image builds with TF-A:

  - STM32MP15-specific: Multiple device trees can be supplied and TF-A
    is built once and linked with each DT in turn. This was contributed
    to TF-A for DistroKit purposes, but ST broke the compatibility for
    STM32MP13, which requires to be built separately.

  - PTXdist-specific: The PTXdist rule can built multiple platforms in
    different build directories. This requires however that the options
    used are the same, except for platform. We unfortunately need to
    change the option between our two TF-A build though.

Therefore, let's duplicate the upstream TF-A rule for the STM32MP13 and
configure it for use with OP-TEE.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/platformconfig           |   1 +
 .../platform-v7a/platforms/tf-a-stm32mp13.in  |  12 ++
 .../platform-v7a/rules/tf-a-stm32mp13.make    | 110 ++++++++++++++++++
 3 files changed, 123 insertions(+)
 create mode 100644 configs/platform-v7a/platforms/tf-a-stm32mp13.in
 create mode 100644 configs/platform-v7a/rules/tf-a-stm32mp13.make

diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index c502a5e44b40..1ff25470bfd6 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -203,6 +203,7 @@ PTXCONF_OPTEE=y
 PTXCONF_OPTEE_PLATFORM="stm32mp1"
 PTXCONF_OPTEE_PLATFORM_FLAVOUR="135F_DK"
 PTXCONF_OPTEE_CFG="CFG_TEE_CORE_LOG_LEVEL=2 CFG_WITH_PAGER=n"
+# PTXCONF_TF_A_STM32MP13 is not set
 PTXCONF_TF_A=y
 PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot"
 PTXCONF_TF_A_VERSION="v2.10"
diff --git a/configs/platform-v7a/platforms/tf-a-stm32mp13.in b/configs/platform-v7a/platforms/tf-a-stm32mp13.in
new file mode 100644
index 000000000000..0dd58041ec19
--- /dev/null
+++ b/configs/platform-v7a/platforms/tf-a-stm32mp13.in
@@ -0,0 +1,12 @@
+## SECTION=bootloader
+
+menuconfig TF_A_STM32MP13
+	select BOOTLOADER
+	select HOST_DTC
+	prompt "ARM Trusted Firmware-A for STM32MP13 with OP-TEE"
+	depends on ARCH_ARM
+	bool
+	help
+	  ARM Trusted Firmware-A for STM32MP13 series SoCs with OP-TEE enabled.
+	  Currently, these can't be built in the same build as the
+	  STM32MP15 with SP_min.
diff --git a/configs/platform-v7a/rules/tf-a-stm32mp13.make b/configs/platform-v7a/rules/tf-a-stm32mp13.make
new file mode 100644
index 000000000000..36feb25e6e76
--- /dev/null
+++ b/configs/platform-v7a/rules/tf-a-stm32mp13.make
@@ -0,0 +1,110 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Rouven Czerwinski <r.czerwinski@pengutronix.de>
+#               2019 by Ahmad Fatoum <a.fatoum@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_TF_A_STM32MP13) += tf-a-stm32mp13
+
+#
+# Paths and names
+#
+TF_A_STM32MP13_VERSION	:= $(call ptx/config-version, PTXCONF_TF_A)
+TF_A_STM32MP13_MD5	:= $(call ptx/config-md5, PTXCONF_TF_A)
+TF_A_STM32MP13		:= tf-a-stm32mp13-$(TF_A_STM32MP13_VERSION)
+TF_A_STM32MP13_SUFFIX	:= tar.gz
+TF_A_STM32MP13_URL	:= https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/$(TF_A_STM32MP13_VERSION).$(TF_A_STM32MP13_SUFFIX)
+TF_A_STM32MP13_SOURCE	:= $(SRCDIR)/$(TF_A_STM32MP13).$(TF_A_STM32MP13_SUFFIX)
+TF_A_STM32MP13_DIR	:= $(BUILDDIR)/$(TF_A_STM32MP13)
+TF_A_STM32MP13_BUILDDIR	:= $(TF_A_STM32MP13_DIR)/build
+TF_A_STM32MP13_BUILD_OOT	:= YES
+TF_A_STM32MP13_LICENSE	:= BSD-3-Clause AND BSD-2-Clause \
+		   AND (GPL-2.0-or-later OR BSD-2-Clause) \
+		   AND (NCSA OR MIT) \
+		   AND Zlib \
+		   AND (GPL-2.0-or-later OR BSD-3-Clause)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+TF_A_STM32MP13_PLATFORMS		:= stm32mp1
+TF_A_STM32MP13_ARTIFACTS		:= tf-a-*.stm32 fdts/*-fw-config.dtb
+
+TF_A_STM32MP13_WRAPPER_BLACKLIST	:= \
+	$(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST)
+
+TF_A_STM32MP13_PATH	:= PATH=$(CROSS_PATH)
+TF_A_STM32MP13_MAKE_OPT	:= \
+	-C $(TF_A_STM32MP13_DIR) \
+	CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
+	HOSTCC=$(HOSTCC) \
+	ARCH=aarch32 \
+	ARM_ARCH_MAJOR=7 \
+	BUILD_STRING=$(TF_A_STM32MP13_VERSION) \
+	DTB_FILE_NAME='stm32mp135f-dk.dtb' \
+	STM32MP_EMMC=1 STM32MP_SDMMC=1 \
+	STM32MP_RAW_NAND=1 STM32MP_SPI_NAND=1 STM32MP_SPI_NOR=1 \
+	STM32MP_USB_PROGRAMMER=1 \
+	AARCH32_SP=optee \
+	all
+
+TF_A_STM32MP13_CONF_TOOL	:= NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+TF_A_STM32MP13_MAKE_ENV	:= $(CROSS_ENV)
+
+$(STATEDIR)/tf-a-stm32mp13.compile:
+	@$(call targetinfo)
+
+	@$(foreach plat, $(TF_A_STM32MP13_PLATFORMS), \
+		$(call compile, TF_A_STM32MP13, \
+		$(TF_A_STM32MP13_MAKE_OPT) PLAT=$(plat))$(ptx/nl))
+
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+tf-a-stm32mp13/inst_plat = $(foreach artifact, \
+	$(foreach pattern, $(TF_A_STM32MP13_ARTIFACTS), \
+	$(wildcard $(TF_A_STM32MP13_BUILDDIR)/$(1)/$(if $(filter DEBUG=1,TF_A_STM32MP13_MAKE_OPT),debug,release)/$(pattern))), \
+	install -v -D -m 644 $(artifact) \
+		$(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
+
+tf-a-stm32mp13/inst_bins = $(foreach plat, $(TF_A_STM32MP13_PLATFORMS), $(call tf-a-stm32mp13/inst_plat,$(plat),$(1)))
+
+$(STATEDIR)/tf-a-stm32mp13.install:
+	@$(call targetinfo)
+	@$(call tf-a-stm32mp13/inst_bins,$(TF_A_STM32MP13_PKGDIR)/usr/lib/firmware)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tf-a-stm32mp13.targetinstall:
+	@$(call targetinfo)
+	@$(call tf-a-stm32mp13/inst_bins,$(IMAGEDIR))
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tf-a-stm32mp13.clean:
+	@$(call targetinfo)
+	@rm -vf $(addprefix $(IMAGEDIR)/, $(notdir $(TF_A_STM32MP13_ARTIFACTS_SRC)))
+	@$(call clean_pkg, TF_A_STM32MP13)
+
+# vim: syntax=make
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 11/12] v7a: kernel: enable STM32MP135F-DK support
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
                   ` (9 preceding siblings ...)
  2024-03-15 21:12 ` [DistroKit] [PATCH 10/12] v7a: stm32mp: add TF-A recipe " Ahmad Fatoum
@ 2024-03-15 21:12 ` Ahmad Fatoum
  2024-03-18 13:07   ` Michael Olbrich
  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
  12 siblings, 1 reply; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

The STM32MP13 shared many kernel config options with the STM32MP15, but
it requires some additional options to support SCMI-over-OP-TEE. Enable
these options as well as support for OTP-over-OPTEE and rng-over-OPTEE.

With the SCMI options enabled, it's possible to boot the STM32MP135F-DK,
so enable build of its device tree for inclusion into the image in the
follow-up commit.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/kernelconfig   | 10 ++++++++--
 configs/platform-v7a/platformconfig |  2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/configs/platform-v7a/kernelconfig b/configs/platform-v7a/kernelconfig
index c65bdb8da3d9..0984c8a1900c 100644
--- a/configs/platform-v7a/kernelconfig
+++ b/configs/platform-v7a/kernelconfig
@@ -1248,7 +1248,9 @@ CONFIG_ARM_SCMI_PROTOCOL=y
 # CONFIG_ARM_SCMI_RAW_MODE_SUPPORT is not set
 CONFIG_ARM_SCMI_HAVE_TRANSPORT=y
 CONFIG_ARM_SCMI_HAVE_SHMEM=y
+CONFIG_ARM_SCMI_HAVE_MSG=y
 CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y
+CONFIG_ARM_SCMI_TRANSPORT_OPTEE=y
 CONFIG_ARM_SCMI_TRANSPORT_SMC=y
 # CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE is not set
 # CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set
@@ -1931,6 +1933,7 @@ CONFIG_HW_RANDOM_IPROC_RNG200=y
 CONFIG_HW_RANDOM_OMAP=y
 CONFIG_HW_RANDOM_VIRTIO=y
 CONFIG_HW_RANDOM_STM32=y
+CONFIG_HW_RANDOM_OPTEE=y
 # CONFIG_HW_RANDOM_CCTRNG is not set
 # CONFIG_HW_RANDOM_XIPHERA is not set
 # CONFIG_HW_RANDOM_ARM_SMCCC_TRNG is not set
@@ -3106,6 +3109,7 @@ CONFIG_RTC_I2C_AND_SPI=y
 # CONFIG_RTC_DRV_M48T59 is not set
 # CONFIG_RTC_DRV_MSM6242 is not set
 # CONFIG_RTC_DRV_RP5C01 is not set
+# CONFIG_RTC_DRV_OPTEE is not set
 # CONFIG_RTC_DRV_ZYNQMP is not set
 
 #
@@ -3578,6 +3582,7 @@ CONFIG_NVMEM_IMX_OCOTP_ELE=y
 # CONFIG_NVMEM_MICROCHIP_OTPC is not set
 CONFIG_NVMEM_RMEM=y
 # CONFIG_NVMEM_SNVS_LPGPR is not set
+CONFIG_NVMEM_STM32_BSEC_OPTEE_TA=y
 CONFIG_NVMEM_STM32_ROMEM=y
 # CONFIG_NVMEM_U_BOOT_ENV is not set
 
@@ -3590,7 +3595,8 @@ CONFIG_NVMEM_STM32_ROMEM=y
 
 # CONFIG_FPGA is not set
 # CONFIG_FSI is not set
-# CONFIG_TEE is not set
+CONFIG_TEE=y
+CONFIG_OPTEE=y
 CONFIG_MULTIPLEXER=y
 
 #
@@ -3994,7 +4000,7 @@ CONFIG_CRYPTO_XTS=y
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_POLY1305 is not set
 # CONFIG_CRYPTO_RMD160 is not set
-# CONFIG_CRYPTO_SHA1 is not set
+CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA256=y
 # CONFIG_CRYPTO_SHA512 is not set
 # CONFIG_CRYPTO_SHA3 is not set
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 1ff25470bfd6..797b4cb72664 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -138,7 +138,7 @@ PTXCONF_KERNEL_IMAGE_Z=y
 PTXCONF_KERNEL_IMAGE="zImage"
 PTXCONF_KERNEL_DTB=y
 PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
-PTXCONF_KERNEL_DTS="ti/omap/am335x-bone.dts ti/omap/am335x-boneblack.dts arm/vexpress-v2p-ca9.dts broadcom/bcm2836-rpi-2-b.dts nxp/imx/imx6q-sabrelite.dts nxp/imx/imx6sx-udoo-neo-full.dts nxp/imx/imx6dl-riotboard.dts nxp/imx/imx6q-nitrogen6x.dts nxp/imx/imx6qp-nitrogen6_max.dts broadcom/bcm2837-rpi-3-b.dts broadcom/bcm2837-rpi-cm3-io3.dts broadcom/bcm2711-rpi-4-b.dts broadcom/bcm2711-rpi-400.dts st/stm32mp157c-dk2.dts st/stm32mp157c-ev1.dts st/stm32mp157c-lxa-mc1.dts microchip/at91-sama5d27_som1_ek.dts at91-sama5d27_giantboard.dts at91-sama5d4_wifx_l1.dts"
+PTXCONF_KERNEL_DTS="ti/omap/am335x-bone.dts ti/omap/am335x-boneblack.dts arm/vexpress-v2p-ca9.dts broadcom/bcm2836-rpi-2-b.dts nxp/imx/imx6q-sabrelite.dts nxp/imx/imx6sx-udoo-neo-full.dts nxp/imx/imx6dl-riotboard.dts nxp/imx/imx6q-nitrogen6x.dts nxp/imx/imx6qp-nitrogen6_max.dts broadcom/bcm2837-rpi-3-b.dts broadcom/bcm2837-rpi-cm3-io3.dts broadcom/bcm2711-rpi-4-b.dts broadcom/bcm2711-rpi-400.dts st/stm32mp157c-dk2.dts st/stm32mp157c-ev1.dts st/stm32mp157c-lxa-mc1.dts st/stm32mp135f-dk.dts microchip/at91-sama5d27_som1_ek.dts at91-sama5d27_giantboard.dts at91-sama5d4_wifx_l1.dts"
 # PTXCONF_KERNEL_DTBO is not set
 # PTXCONF_KERNEL_CODE_SIGNING is not set
 # PTXCONF_KERNEL_ZSTD is not set
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH 12/12] v7a: stm32mp: add image recipe for STM32MP135F-DK
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
                   ` (10 preceding siblings ...)
  2024-03-15 21:12 ` [DistroKit] [PATCH 11/12] v7a: kernel: enable STM32MP135F-DK support Ahmad Fatoum
@ 2024-03-15 21:12 ` Ahmad Fatoum
  2024-03-17 19:27 ` [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Robert Schwebel
  12 siblings, 0 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-15 21:12 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

Now, that we have TF-A, OP-TEE, barebox and kernel in-place, let's build
an image that combines all of them that can be booted by writing to the
SD-Card of the STM32MP135F-DK.

Notably missing is Ethernet support as that's not mainline yet.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../config/images/stm32mp-optee.config        | 60 +++++++++++++++++++
 configs/platform-v7a/platformconfig           |  3 +-
 .../platforms/image-stm32mp135f-dk.in         | 13 ++++
 .../rules/image-stm32mp135f-dk.make           | 34 +++++++++++
 4 files changed, 109 insertions(+), 1 deletion(-)
 create mode 100644 configs/platform-v7a/config/images/stm32mp-optee.config
 create mode 100644 configs/platform-v7a/platforms/image-stm32mp135f-dk.in
 create mode 100644 configs/platform-v7a/rules/image-stm32mp135f-dk.make

diff --git a/configs/platform-v7a/config/images/stm32mp-optee.config b/configs/platform-v7a/config/images/stm32mp-optee.config
new file mode 100644
index 000000000000..f9c16a237f82
--- /dev/null
+++ b/configs/platform-v7a/config/images/stm32mp-optee.config
@@ -0,0 +1,60 @@
+image @IMAGE@ {
+	hdimage {
+		align = 1M
+		partition-table-type = gpt
+		gpt-no-backup = true
+	}
+
+	/* below three partitions are unused when booting from eMMC boot partition */
+	partition fsbl1 {
+		image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32"
+		size = 256K
+	}
+	partition fsbl2 {
+		image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32"
+		size = 256K
+	}
+	partition fip {
+		image = "@STM32MP_BOARD@.fip"
+		size = 2M
+	}
+
+	partition barebox-environment {
+		size = 1M
+	}
+	partition barebox-state {
+		partition-type-uuid = "4778ed65-bf42-45fa-9c5b-287a1dc4aab1"
+		size = 1M
+	}
+	partition root-A {
+		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
+		image = root.ext2
+	}
+}
+
+image @STM32MP_BOARD@-emmcboot.img {
+	hdimage {
+		partition-table = false
+	}
+
+	partition fsbl {
+		image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32"
+		size = 256K
+	}
+
+	partition fip {
+		image = "@STM32MP_BOARD@.fip"
+		offset = 256K
+	}
+}
+
+image @STM32MP_BOARD@.fip {
+	fip {
+		fw-config = "stm32mp1-@STM32MP_BOARD@-fw-config.dtb"
+		hw-config = "@STM32MP_BOARD@.dtb-bb"
+		nt-fw = "barebox-stm32mp-generic-bl33.img"
+		tos-fw = { "tee-header_v2.bin", "tee-pager_v2.bin", "tee-pageable_v2.bin" }
+	}
+	size = 2M
+}
+/* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 797b4cb72664..83d2e5f7102a 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -203,7 +203,7 @@ PTXCONF_OPTEE=y
 PTXCONF_OPTEE_PLATFORM="stm32mp1"
 PTXCONF_OPTEE_PLATFORM_FLAVOUR="135F_DK"
 PTXCONF_OPTEE_CFG="CFG_TEE_CORE_LOG_LEVEL=2 CFG_WITH_PAGER=n"
-# PTXCONF_TF_A_STM32MP13 is not set
+PTXCONF_TF_A_STM32MP13=y
 PTXCONF_TF_A=y
 PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot"
 PTXCONF_TF_A_VERSION="v2.10"
@@ -293,6 +293,7 @@ PTXCONF_IMAGE_RPI2=y
 PTXCONF_IMAGE_SABRELITE=y
 PTXCONF_IMAGE_SAMA5D27_GIANTBOARD=y
 PTXCONF_IMAGE_SAMA5D27_SOM1_EK=y
+PTXCONF_IMAGE_STM32MP135F_DK=y
 PTXCONF_IMAGE_STM32MP157C_DK2=y
 PTXCONF_IMAGE_STM32MP157C_EV1=y
 PTXCONF_IMAGE_UDOO_NEO=y
diff --git a/configs/platform-v7a/platforms/image-stm32mp135f-dk.in b/configs/platform-v7a/platforms/image-stm32mp135f-dk.in
new file mode 100644
index 000000000000..4b06817a7dfc
--- /dev/null
+++ b/configs/platform-v7a/platforms/image-stm32mp135f-dk.in
@@ -0,0 +1,13 @@
+## SECTION=image
+
+config IMAGE_STM32MP135F_DK
+	tristate
+	select HOST_GENIMAGE
+	select HOST_TF_A
+	select IMAGE_ROOT_EXT
+	select TF_A_STM32MP13
+	select OPTEE
+	select BAREBOX_STM32MP
+	prompt "Generate images/stm32mp135f-dk.hdimg"
+	help
+	  Generate GPT image for the STM32MP135F-DK
diff --git a/configs/platform-v7a/rules/image-stm32mp135f-dk.make b/configs/platform-v7a/rules/image-stm32mp135f-dk.make
new file mode 100644
index 000000000000..c7fefb2f0432
--- /dev/null
+++ b/configs/platform-v7a/rules/image-stm32mp135f-dk.make
@@ -0,0 +1,34 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP135F_DK) += image-stm32mp135f-dk
+
+IMAGE_STM32MP135F_DK_ENV := STM32MP_BOARD=stm32mp135f-dk
+
+#
+# Paths and names
+#
+IMAGE_STM32MP135F_DK		:= image-stm32mp135f-dk
+IMAGE_STM32MP135F_DK_DIR	:= $(BUILDDIR)/$(IMAGE_STM32MP135F_DK)
+IMAGE_STM32MP135F_DK_IMAGE	:= $(IMAGEDIR)/stm32mp135f-dk.hdimg
+IMAGE_STM32MP135F_DK_FILES	:= $(IMAGEDIR)/root.tgz
+IMAGE_STM32MP135F_DK_CONFIG	:= stm32mp-optee.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+$(IMAGE_STM32MP135F_DK_IMAGE):
+	@$(call targetinfo)
+	@$(call image/genimage, IMAGE_STM32MP135F_DK)
+	@$(call finish)
+
+# vim: syntax=make
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit]  [PATCH 01/12] ptxdist: migrate 2023.02.0 → 2024.03.0
  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
  1 sibling, 1 reply; 27+ messages in thread
From: Alexander Dahl @ 2024-03-16  9:26 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

[-- Attachment #1: Type: text/plain, Size: 8422 bytes --]

Hello Ahmad,

typo in subject, should be 2024.02.0 instead of 2023.02.0.

Greets
Alex

Am Fri, Mar 15, 2024 at 10:12:29PM +0100 schrieb Ahmad Fatoum:
> This lets us make use of the updated OP-TEE packages for the incoming
> STM32MP13 support. Support in OP-TEE 3.20 is incomplete and will lead to
> a crash on boot up:
> 
>   I/TC: Platform stm32mp1: flavor 135F_DK - DT stm32mp135f-dk.dts
>   I/TC: Non-secure SYSRAM [0xddfff000 0xddffffff]
>   I/TC: DTB enables console (non-secure)
>   I/TC: Primary CPU switching to normal world boot
>   E/TC:0   tzc_it_handler:26 TZC permission failure
>   E/TC:0   dump_fail_filter:420 Permission violation on filter 0
>   E/TC:0   dump_fail_filter:425 Violation @0xfcff7fe0, non-secure privileged write, AXI ID 420
>   E/TC:0   Panic at core/arch/arm/plat-stm32mp1/plat_tzc400.c:30 <tzc_it_handler>
>   E/TC:0   TEE load address @ 0xde000000
>   E/TC:0   Call stack:
>   E/TC:0    0xde00316d
>   E/TC:0    0xde011b37
>   E/TC:0    0xde005245
>   E/TC:0    0xde011201
>   E/TC:0    0xde037155
>   E/TC:0    0xde000350
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-mips/platformconfig       | 4 ++--
>  configs/platform-mipsel/platformconfig     | 4 ++--
>  configs/platform-rpi1/platformconfig       | 4 ++--
>  configs/platform-v7a/platformconfig        | 4 ++--
>  configs/platform-v7a_noneon/platformconfig | 4 ++--
>  configs/platform-v8a/platformconfig        | 4 ++--
>  configs/platform-x86_64/platformconfig     | 4 ++--
>  configs/ptxconfig                          | 8 ++++++--
>  8 files changed, 20 insertions(+), 16 deletions(-)
> 
> diff --git a/configs/platform-mips/platformconfig b/configs/platform-mips/platformconfig
> index e81b89202920..a7483befeccc 100644
> --- a/configs/platform-mips/platformconfig
> +++ b/configs/platform-mips/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-mipsel/platformconfig b/configs/platform-mipsel/platformconfig
> index 292295087547..5e134a3f151f 100644
> --- a/configs/platform-mipsel/platformconfig
> +++ b/configs/platform-mipsel/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-rpi1/platformconfig b/configs/platform-rpi1/platformconfig
> index 919eb0251f6a..e0d0611313c7 100644
> --- a/configs/platform-rpi1/platformconfig
> +++ b/configs/platform-rpi1/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
> index 3525657da32c..f2b4d2b7a922 100644
> --- a/configs/platform-v7a/platformconfig
> +++ b/configs/platform-v7a/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-v7a_noneon/platformconfig b/configs/platform-v7a_noneon/platformconfig
> index 5e0388e37e34..52fa2abf474f 100644
> --- a/configs/platform-v7a_noneon/platformconfig
> +++ b/configs/platform-v7a_noneon/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
> index d91255f18b0e..f9168a8bc599 100644
> --- a/configs/platform-v8a/platformconfig
> +++ b/configs/platform-v8a/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-x86_64/platformconfig b/configs/platform-x86_64/platformconfig
> index a44daa041199..918bf8a375b0 100644
> --- a/configs/platform-x86_64/platformconfig
> +++ b/configs/platform-x86_64/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/ptxconfig b/configs/ptxconfig
> index cb5e93990425..b5f4475d2c70 100644
> --- a/configs/ptxconfig
> +++ b/configs/ptxconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF_DATAPARTITION=y
>  PTXCONF_RAUC_UDEV=y
> @@ -69,7 +69,7 @@ PTXCONF_BSP=y
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_CONFIGFILE_VERSION="2024.02.0"
> +PTXCONF_CONFIGFILE_VERSION="2024.03.0"
>  PTXCONF__ptxconfig_MAGIC__=y
>  
>  #
> @@ -96,6 +96,7 @@ PTXCONF_HOST_QEMU_USR=y
>  # PTXCONF_HOST_TESTFRAMEWORK is not set
>  PTXCONF_HOST_ACL=y
>  PTXCONF_HOST_CMAKE=y
> +PTXCONF_HOST_DTC=y
>  PTXCONF_HOST_FIGLET=y
>  PTXCONF_HOST_FILE=y
>  PTXCONF_HOST_FLEX=y
> @@ -1815,6 +1816,7 @@ PTXCONF_ZSTD=y
>  # PTXCONF_PYTHON3_PYBIND11 is not set
>  # PTXCONF_PYTHON3_PYCPARSER is not set
>  # PTXCONF_PYTHON3_PYCRYPTODOMEX is not set
> +# PTXCONF_PYTHON3_PYOPENSSL is not set
>  # PTXCONF_PYTHON3_PYPARSING is not set
>  # PTXCONF_PYTHON3_PYRO is not set
>  # PTXCONF_PYTHON3_PYSMI is not set
> @@ -2241,6 +2243,7 @@ PTXCONF_RAUC_BAREBOX=y
>  #
>  # System Libraries              
>  #
> +# PTXCONF_ABSEIL_CPP is not set
>  # PTXCONF_AML is not set
>  # PTXCONF_ARGTABLE2 is not set
>  # PTXCONF_ARMADILLO is not set
> @@ -2714,6 +2717,7 @@ PTXCONF_JSON_GLIB=y
>  # PTXCONF_TWOLAME is not set
>  # PTXCONF_VORBIS_TOOLS is not set
>  # PTXCONF_WEBRTC_AUDIO_PROCESSING is not set
> +# PTXCONF_WEBRTC_AUDIO_PROCESSING1 is not set
>  # end of sound                         
>  
>  #
> -- 
> 2.39.2

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit]  [PATCH 04/12] v8a: update kernel from v6.6 → v6.8
  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
  0 siblings, 1 reply; 27+ messages in thread
From: Michael Olbrich @ 2024-03-16 11:18 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Fri, Mar 15, 2024 at 10:12:32PM +0100, Ahmad Fatoum wrote:
> config changes are those of olddefconfig with the notable exception of

Huh, I tried to do the same but got different results.

> CONFIG_BLK_DEV_WRITE_MOUNTED: This is enabled by default as not to break
> some existing userspace, but we shouldn't have any of that, so disable it.
> This will cause the kernel to refuse writes to mounted block devices.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-v8a/kernelconfig   | 121 ++++++++++++++++++++--------
>  configs/platform-v8a/platformconfig |   4 +-
>  2 files changed, 89 insertions(+), 36 deletions(-)
> 
> diff --git a/configs/platform-v8a/kernelconfig b/configs/platform-v8a/kernelconfig
> index 425a247ac2ab..4daf8080f717 100644
> --- a/configs/platform-v8a/kernelconfig
> +++ b/configs/platform-v8a/kernelconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# Linux/arm64 6.6 Kernel Configuration
> +# Linux/arm64 6.8 Kernel Configuration
>  #
>  CONFIG_CC_VERSION_TEXT="aarch64-v8a-linux-gnu-gcc (OSELAS.Toolchain-2023.07.0 13-20230624) 13.1.1 20230624"
>  CONFIG_CC_IS_GCC=y
> @@ -15,6 +15,7 @@ CONFIG_CC_CAN_LINK=y
>  CONFIG_CC_CAN_LINK_STATIC=y
>  CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
>  CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
> +CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
>  CONFIG_CC_HAS_ASM_INLINE=y
>  CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
>  CONFIG_PAHOLE_VERSION=0
> @@ -160,8 +161,10 @@ CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
>  CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
>  CONFIG_CC_HAS_INT128=y
>  CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
> -CONFIG_GCC11_NO_ARRAY_BOUNDS=y
> +CONFIG_GCC10_NO_ARRAY_BOUNDS=y
>  CONFIG_CC_NO_ARRAY_BOUNDS=y
> +CONFIG_GCC_NO_STRINGOP_OVERFLOW=y
> +CONFIG_CC_NO_STRINGOP_OVERFLOW=y
>  CONFIG_ARCH_SUPPORTS_INT128=y
>  CONFIG_CGROUPS=y
>  CONFIG_PAGE_COUNTER=y
> @@ -237,17 +240,17 @@ CONFIG_AIO=y
>  CONFIG_IO_URING=y
>  CONFIG_ADVISE_SYSCALLS=y
>  CONFIG_MEMBARRIER=y
> +CONFIG_KCMP=y
> +CONFIG_RSEQ=y
> +# CONFIG_DEBUG_RSEQ is not set
> +CONFIG_CACHESTAT_SYSCALL=y
> +# CONFIG_PC104 is not set
>  CONFIG_KALLSYMS=y
>  # CONFIG_KALLSYMS_SELFTEST is not set
>  CONFIG_KALLSYMS_ALL=y
>  CONFIG_KALLSYMS_BASE_RELATIVE=y
>  CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
> -CONFIG_KCMP=y
> -CONFIG_RSEQ=y
> -CONFIG_CACHESTAT_SYSCALL=y
> -# CONFIG_DEBUG_RSEQ is not set
>  CONFIG_HAVE_PERF_EVENTS=y
> -# CONFIG_PC104 is not set
>  
>  #
>  # Kernel Performance Events And Counters
> @@ -264,6 +267,7 @@ CONFIG_TRACEPOINTS=y
>  # Kexec and crash features
>  #
>  # CONFIG_KEXEC_FILE is not set
> +# CONFIG_CRASH_DUMP is not set
>  # end of Kexec and crash features
>  # end of General setup
>  
> @@ -319,6 +323,7 @@ CONFIG_ARCH_MXC=y
>  # CONFIG_ARCH_S32 is not set
>  # CONFIG_ARCH_MA35 is not set
>  # CONFIG_ARCH_NPCM is not set
> +# CONFIG_ARCH_PENSANDO is not set
>  # CONFIG_ARCH_QCOM is not set
>  # CONFIG_ARCH_REALTEK is not set
>  # CONFIG_ARCH_RENESAS is not set
> @@ -376,6 +381,7 @@ CONFIG_ARM64_ERRATUM_1508412=y
>  # CONFIG_ARM64_ERRATUM_2441009 is not set
>  # CONFIG_ARM64_ERRATUM_2645198 is not set
>  # CONFIG_ARM64_ERRATUM_2966298 is not set
> +# CONFIG_ARM64_ERRATUM_3117295 is not set

This was enabled for my, but disabling it is correct here.
It's for Cortex-A510.

>  # CONFIG_CAVIUM_ERRATUM_22375 is not set
>  # CONFIG_CAVIUM_ERRATUM_23154 is not set
>  # CONFIG_CAVIUM_ERRATUM_27456 is not set
> @@ -684,6 +690,7 @@ CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
>  CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
>  CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y
>  CONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y
> +CONFIG_ARCH_HAS_HW_PTE_YOUNG=y
>  
>  #
>  # GCOV-based kernel profiling
> @@ -726,6 +733,7 @@ CONFIG_BLK_ICQ=y
>  CONFIG_BLK_DEV_BSGLIB=y
>  CONFIG_BLK_DEV_INTEGRITY=y
>  CONFIG_BLK_DEV_INTEGRITY_T10=y
> +# CONFIG_BLK_DEV_WRITE_MOUNTED is not set
>  # CONFIG_BLK_DEV_ZONED is not set
>  # CONFIG_BLK_DEV_THROTTLING is not set
>  # CONFIG_BLK_WBT is not set
> @@ -795,9 +803,8 @@ CONFIG_COREDUMP=y
>  # CONFIG_SWAP is not set
>  
>  #
> -# SLAB allocator options
> +# Slab allocator options
>  #
> -# CONFIG_SLAB_DEPRECATED is not set
>  CONFIG_SLUB=y
>  # CONFIG_SLUB_TINY is not set
>  CONFIG_SLAB_MERGE_DEFAULT=y
> @@ -806,7 +813,7 @@ CONFIG_SLAB_FREELIST_RANDOM=y
>  # CONFIG_SLUB_STATS is not set
>  CONFIG_SLUB_CPU_PARTIAL=y
>  # CONFIG_RANDOM_KMALLOC_CACHES is not set
> -# end of SLAB allocator options
> +# end of Slab allocator options
>  
>  # CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set
>  # CONFIG_COMPAT_BRK is not set
> @@ -829,6 +836,7 @@ CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
>  CONFIG_PAGE_REPORTING=y
>  CONFIG_MIGRATION=y
>  CONFIG_CONTIG_ALLOC=y
> +CONFIG_PCP_BATCH_SCALE_MAX=5
>  CONFIG_PHYS_ADDR_T_64BIT=y
>  # CONFIG_KSM is not set
>  CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
> @@ -916,6 +924,7 @@ CONFIG_INET_TCP_DIAG=y
>  # CONFIG_TCP_CONG_ADVANCED is not set
>  CONFIG_TCP_CONG_CUBIC=y
>  CONFIG_DEFAULT_TCP_CONG="cubic"
> +# CONFIG_TCP_AO is not set
>  # CONFIG_TCP_MD5SIG is not set
>  CONFIG_IPV6=y
>  # CONFIG_IPV6_ROUTER_PREF is not set
> @@ -1116,7 +1125,6 @@ CONFIG_IP6_NF_TARGET_MASQUERADE=m
>  
>  CONFIG_NF_DEFRAG_IPV6=m
>  # CONFIG_NF_CONNTRACK_BRIDGE is not set
> -# CONFIG_BPFILTER is not set
>  # CONFIG_IP_DCCP is not set
>  # CONFIG_IP_SCTP is not set
>  # CONFIG_RDS is not set
> @@ -1304,7 +1312,6 @@ CONFIG_PCI_HOST_GENERIC=y
>  # Cadence-based PCIe controllers
>  #
>  # CONFIG_PCIE_CADENCE_PLAT_HOST is not set
> -# CONFIG_PCI_J721E_HOST is not set
>  # end of Cadence-based PCIe controllers
>  
>  #
> @@ -1373,6 +1380,7 @@ CONFIG_DEV_COREDUMP=y
>  # CONFIG_DEBUG_DEVRES is not set
>  # CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
>  # CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
> +CONFIG_GENERIC_CPU_DEVICES=y
>  CONFIG_GENERIC_CPU_AUTOPROBE=y
>  CONFIG_GENERIC_CPU_VULNERABILITIES=y
>  CONFIG_SOC_BUS=y
> @@ -1389,7 +1397,6 @@ CONFIG_GENERIC_ARCH_TOPOLOGY=y
>  #
>  # Bus devices
>  #
> -# CONFIG_BRCMSTB_GISB_ARB is not set
>  # CONFIG_MOXTET is not set
>  # CONFIG_IMX_WEIM is not set
>  # CONFIG_VEXPRESS_CONFIG is not set
> @@ -1422,12 +1429,10 @@ CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y
>  CONFIG_ARM_SCMI_TRANSPORT_SMC=y
>  # CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE is not set
>  # CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set
> -CONFIG_ARM_SCMI_POWER_DOMAIN=y
>  CONFIG_ARM_SCMI_POWER_CONTROL=y
>  # end of ARM System Control and Management Interface Protocol
>  
>  CONFIG_ARM_SCPI_PROTOCOL=y
> -CONFIG_ARM_SCPI_POWER_DOMAIN=y
>  # CONFIG_FIRMWARE_MEMMAP is not set
>  # CONFIG_FW_CFG_SYSFS is not set
>  # CONFIG_TURRIS_MOX_RWTM is not set
> @@ -1436,6 +1441,12 @@ CONFIG_ARM_SCPI_POWER_DOMAIN=y
>  # CONFIG_IMX_DSP is not set
>  # CONFIG_IMX_SCU is not set
>  CONFIG_ARM_PSCI_FW=y
> +
> +#
> +# Qualcomm firmware drivers
> +#
> +# end of Qualcomm firmware drivers
> +
>  CONFIG_HAVE_ARM_SMCCC=y
>  CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y
>  CONFIG_ARM_SMCCC_SOC_ID=y
> @@ -1453,7 +1464,6 @@ CONFIG_MTD=y
>  #
>  # Partition parsers
>  #
> -# CONFIG_MTD_AR7_PARTS is not set
>  # CONFIG_MTD_CMDLINE_PARTS is not set
>  CONFIG_MTD_OF_PARTS=y
>  # CONFIG_MTD_AFS_PARTS is not set
> @@ -1658,6 +1668,7 @@ CONFIG_SRAM=y
>  # CONFIG_HISI_HIKEY_USB is not set
>  # CONFIG_OPEN_DICE is not set
>  # CONFIG_VCPU_STALL_DETECTOR is not set
> +# CONFIG_NSM is not set
>  # CONFIG_C2PORT is not set
>  
>  #
> @@ -1665,7 +1676,6 @@ CONFIG_SRAM=y
>  #
>  CONFIG_EEPROM_AT24=m
>  CONFIG_EEPROM_AT25=m
> -# CONFIG_EEPROM_LEGACY is not set
>  # CONFIG_EEPROM_MAX6875 is not set
>  # CONFIG_EEPROM_93CX6 is not set
>  # CONFIG_EEPROM_93XX46 is not set
> @@ -1872,6 +1882,7 @@ CONFIG_NET_CORE=y
>  # CONFIG_VETH is not set
>  CONFIG_VIRTIO_NET=y
>  # CONFIG_NLMON is not set
> +# CONFIG_NETKIT is not set
>  # CONFIG_ARCNET is not set
>  CONFIG_ETHERNET=y
>  # CONFIG_NET_VENDOR_3COM is not set
> @@ -1965,7 +1976,6 @@ CONFIG_DWMAC_GENERIC=y
>  CONFIG_DWMAC_ROCKCHIP=y
>  CONFIG_DWMAC_IMX8=y
>  # CONFIG_DWMAC_INTEL_PLAT is not set
> -# CONFIG_DWMAC_LOONGSON is not set
>  # CONFIG_STMMAC_PCI is not set
>  # CONFIG_NET_VENDOR_SUN is not set
>  # CONFIG_NET_VENDOR_SYNOPSYS is not set
> @@ -2037,6 +2047,7 @@ CONFIG_ROCKCHIP_PHY=y
>  CONFIG_DP83867_PHY=y
>  # CONFIG_DP83869_PHY is not set
>  # CONFIG_DP83TD510_PHY is not set
> +# CONFIG_DP83TG720_PHY is not set
>  # CONFIG_VITESSE_PHY is not set
>  # CONFIG_XILINX_GMII2RGMII is not set
>  # CONFIG_MICREL_KS8995MA is not set
> @@ -2189,6 +2200,7 @@ CONFIG_SERIAL_8250_16550A_VARIANTS=y
>  CONFIG_SERIAL_8250_CONSOLE=y
>  CONFIG_SERIAL_8250_DMA=y
>  # CONFIG_SERIAL_8250_PCI is not set
> +# CONFIG_SERIAL_8250_EXAR is not set
>  CONFIG_SERIAL_8250_NR_UARTS=4
>  CONFIG_SERIAL_8250_RUNTIME_UARTS=4
>  # CONFIG_SERIAL_8250_EXTENDED is not set
> @@ -2584,7 +2596,6 @@ CONFIG_GPIO_MAX77620=y
>  
>  # CONFIG_W1 is not set
>  CONFIG_POWER_RESET=y
> -# CONFIG_POWER_RESET_BRCMSTB is not set
>  # CONFIG_POWER_RESET_GPIO is not set
>  # CONFIG_POWER_RESET_GPIO_RESTART is not set
>  # CONFIG_POWER_RESET_LINKSTATION is not set
> @@ -2612,7 +2623,6 @@ CONFIG_POWER_SUPPLY_HWMON=y
>  # CONFIG_CHARGER_SBS is not set
>  # CONFIG_MANAGER_SBS is not set
>  # CONFIG_BATTERY_BQ27XXX is not set
> -# CONFIG_BATTERY_MAX17040 is not set
>  # CONFIG_BATTERY_MAX17042 is not set
>  # CONFIG_CHARGER_ISP1704 is not set
>  # CONFIG_CHARGER_MAX8903 is not set
> @@ -2642,6 +2652,7 @@ CONFIG_POWER_SUPPLY_HWMON=y
>  # CONFIG_CHARGER_UCS1002 is not set
>  # CONFIG_CHARGER_BD99954 is not set
>  # CONFIG_BATTERY_UG3105 is not set
> +# CONFIG_FUEL_GAUGE_MM8013 is not set
>  CONFIG_HWMON=y
>  # CONFIG_HWMON_DEBUG_CHIP is not set
>  
> @@ -2689,12 +2700,14 @@ CONFIG_SENSORS_ARM_SCPI=y
>  # CONFIG_SENSORS_HS3001 is not set
>  # CONFIG_SENSORS_IT87 is not set
>  # CONFIG_SENSORS_JC42 is not set
> +# CONFIG_SENSORS_POWERZ is not set
>  # CONFIG_SENSORS_POWR1220 is not set
>  # CONFIG_SENSORS_LINEAGE is not set
>  # CONFIG_SENSORS_LTC2945 is not set
>  # CONFIG_SENSORS_LTC2947_I2C is not set
>  # CONFIG_SENSORS_LTC2947_SPI is not set
>  # CONFIG_SENSORS_LTC2990 is not set
> +# CONFIG_SENSORS_LTC2991 is not set
>  # CONFIG_SENSORS_LTC2992 is not set
>  # CONFIG_SENSORS_LTC4151 is not set
>  # CONFIG_SENSORS_LTC4215 is not set
> @@ -2804,6 +2817,7 @@ CONFIG_SENSORS_LM90=m
>  CONFIG_THERMAL=y
>  # CONFIG_THERMAL_NETLINK is not set
>  # CONFIG_THERMAL_STATISTICS is not set
> +CONFIG_THERMAL_DEBUGFS=y

Is was disabled by default for me and I would prefer it that way.

>  CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
>  CONFIG_THERMAL_HWMON=y
>  CONFIG_THERMAL_OF=y
> @@ -2958,7 +2972,6 @@ CONFIG_MFD_SEC_CORE=y
>  # CONFIG_MFD_SKY81452 is not set
>  # CONFIG_MFD_STMPE is not set
>  CONFIG_MFD_SYSCON=y
> -# CONFIG_MFD_TI_AM335X_TSCADC is not set
>  # CONFIG_MFD_LP3943 is not set
>  # CONFIG_MFD_LP8788 is not set
>  # CONFIG_MFD_TI_LMU is not set
> @@ -3012,6 +3025,7 @@ CONFIG_REGULATOR=y
>  CONFIG_REGULATOR_FIXED_VOLTAGE=y
>  # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
>  # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
> +# CONFIG_REGULATOR_NETLINK_EVENTS is not set
>  # CONFIG_REGULATOR_88PG86X is not set
>  # CONFIG_REGULATOR_ACT8865 is not set
>  # CONFIG_REGULATOR_AD5398 is not set
> @@ -3038,6 +3052,7 @@ CONFIG_REGULATOR_GPIO=y
>  # CONFIG_REGULATOR_LTC3589 is not set
>  # CONFIG_REGULATOR_LTC3676 is not set
>  # CONFIG_REGULATOR_MAX1586 is not set
> +# CONFIG_REGULATOR_MAX77503 is not set
>  # CONFIG_REGULATOR_MAX77620 is not set
>  # CONFIG_REGULATOR_MAX77857 is not set
>  # CONFIG_REGULATOR_MAX8649 is not set
> @@ -3346,6 +3361,7 @@ CONFIG_USB_CHIPIDEA=y
>  CONFIG_USB_CHIPIDEA_UDC=y
>  CONFIG_USB_CHIPIDEA_HOST=y
>  # CONFIG_USB_CHIPIDEA_MSM is not set
> +# CONFIG_USB_CHIPIDEA_NPCM is not set
>  CONFIG_USB_CHIPIDEA_IMX=y
>  CONFIG_USB_CHIPIDEA_GENERIC=y
>  # CONFIG_USB_CHIPIDEA_TEGRA is not set
> @@ -3464,6 +3480,8 @@ CONFIG_TYPEC_TCPCI=y
>  # CONFIG_TYPEC_MUX_GPIO_SBU is not set
>  # CONFIG_TYPEC_MUX_PI3USB30532 is not set
>  # CONFIG_TYPEC_MUX_NB7VPQ904M is not set
> +# CONFIG_TYPEC_MUX_PTN36502 is not set
> +# CONFIG_TYPEC_MUX_WCD939X_USBSS is not set
>  # end of USB Type-C Multiplexer/DeMultiplexer Switch support
>  
>  #
> @@ -3519,8 +3537,6 @@ CONFIG_MMC_CQHCI=y
>  # CONFIG_MMC_TOSHIBA_PCI is not set
>  # CONFIG_MMC_MTK is not set
>  CONFIG_MMC_SDHCI_XENON=y
> -# CONFIG_MMC_SDHCI_OMAP is not set
> -# CONFIG_MMC_SDHCI_AM654 is not set
>  # CONFIG_SCSI_UFSHCD is not set
>  # CONFIG_MEMSTICK is not set
>  CONFIG_NEW_LEDS=y
> @@ -3595,6 +3611,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y
>  # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
>  CONFIG_LEDS_TRIGGER_CPU=y
>  # CONFIG_LEDS_TRIGGER_ACTIVITY is not set
> +# CONFIG_LEDS_TRIGGER_GPIO is not set
>  CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
>  
>  #
> @@ -3644,6 +3661,7 @@ CONFIG_RTC_INTF_DEV=y
>  # CONFIG_RTC_DRV_DS1672 is not set
>  CONFIG_RTC_DRV_HYM8563=y
>  # CONFIG_RTC_DRV_MAX6900 is not set
> +# CONFIG_RTC_DRV_MAX31335 is not set
>  # CONFIG_RTC_DRV_MAX77686 is not set
>  # CONFIG_RTC_DRV_NCT3018Y is not set
>  CONFIG_RTC_DRV_RK808=y
> @@ -3958,7 +3976,6 @@ CONFIG_IMX_REMOTEPROC=y
>  #
>  # Broadcom SoC drivers
>  #
> -# CONFIG_SOC_BRCMSTB is not set
>  # end of Broadcom SoC drivers
>  
>  #
> @@ -3976,10 +3993,8 @@ CONFIG_FSL_GUTS=y
>  #
>  # i.MX SoC drivers
>  #
> -CONFIG_IMX_GPCV2_PM_DOMAINS=y
>  CONFIG_SOC_IMX8M=y
>  # CONFIG_SOC_IMX9 is not set
> -CONFIG_IMX8M_BLK_CTRL=y
>  # end of i.MX SoC drivers
>  
>  #
> @@ -3997,7 +4012,6 @@ CONFIG_IMX8M_BLK_CTRL=y
>  
>  CONFIG_ROCKCHIP_GRF=y
>  CONFIG_ROCKCHIP_IODOMAIN=y
> -CONFIG_ROCKCHIP_PM_DOMAINS=y
>  # CONFIG_SOC_TI is not set
>  
>  #
> @@ -4006,6 +4020,39 @@ CONFIG_ROCKCHIP_PM_DOMAINS=y
>  # end of Xilinx SoC drivers
>  # end of SOC (System On Chip) specific Drivers
>  
> +#
> +# PM Domains
> +#
> +
> +#
> +# Amlogic PM Domains
> +#
> +# end of Amlogic PM Domains
> +
> +# CONFIG_ARM_SCMI_PERF_DOMAIN is not set

This defaults to y, but I have no clue when this is needed.

The rest looks good to me.

Michael

> +CONFIG_ARM_SCMI_POWER_DOMAIN=y
> +CONFIG_ARM_SCPI_POWER_DOMAIN=y
> +
> +#
> +# Broadcom PM Domains
> +#
> +# end of Broadcom PM Domains
> +
> +#
> +# i.MX PM Domains
> +#
> +CONFIG_IMX_GPCV2_PM_DOMAINS=y
> +CONFIG_IMX8M_BLK_CTRL=y
> +# end of i.MX PM Domains
> +
> +#
> +# Qualcomm PM Domains
> +#
> +# end of Qualcomm PM Domains
> +
> +CONFIG_ROCKCHIP_PM_DOMAINS=y
> +# end of PM Domains
> +
>  CONFIG_PM_DEVFREQ=y
>  
>  #
> @@ -4156,6 +4203,7 @@ CONFIG_FSL_IMX8_DDR_PMU=y
>  # CONFIG_ARM_SPE_PMU is not set
>  # CONFIG_HISI_PCIE_PMU is not set
>  # CONFIG_HNS3_PMU is not set
> +# CONFIG_DWC_PCIE_PMU is not set
>  # CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU is not set
>  # end of Performance monitor support
>  
> @@ -4172,6 +4220,7 @@ CONFIG_RAS=y
>  # CONFIG_DAX is not set
>  CONFIG_NVMEM=y
>  CONFIG_NVMEM_SYSFS=y
> +CONFIG_NVMEM_LAYOUTS=y
>  
>  #
>  # Layout Types
> @@ -4233,6 +4282,7 @@ CONFIG_INTERCONNECT_IMX8MP=y
>  CONFIG_DCACHE_WORD_ACCESS=y
>  # CONFIG_VALIDATE_FS_PARSER is not set
>  CONFIG_FS_IOMAP=y
> +CONFIG_FS_STACK=y
>  CONFIG_BUFFER_HEAD=y
>  CONFIG_LEGACY_DIRECT_IO=y
>  # CONFIG_EXT2_FS is not set
> @@ -4253,6 +4303,7 @@ CONFIG_FS_MBCACHE=y
>  # CONFIG_BTRFS_FS is not set
>  # CONFIG_NILFS2_FS is not set
>  # CONFIG_F2FS_FS is not set
> +# CONFIG_BCACHEFS_FS is not set
>  CONFIG_FS_POSIX_ACL=y
>  CONFIG_EXPORTFS=y
>  # CONFIG_EXPORTFS_BLOCK_OPS is not set
> @@ -4392,6 +4443,7 @@ CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
>  # CONFIG_NFS_V4_1_MIGRATION is not set
>  CONFIG_NFS_V4_SECURITY_LABEL=y
>  CONFIG_ROOT_NFS=y
> +# CONFIG_NFS_FSCACHE is not set
>  # CONFIG_NFS_USE_LEGACY_DNS is not set
>  CONFIG_NFS_USE_KERNEL_DNS=y
>  CONFIG_NFS_DISABLE_UDP_SUPPORT=y
> @@ -4598,14 +4650,12 @@ CONFIG_CRYPTO_SM4_GENERIC=m
>  # CONFIG_CRYPTO_ADIANTUM is not set
>  CONFIG_CRYPTO_CHACHA20=y
>  CONFIG_CRYPTO_CBC=y
> -# CONFIG_CRYPTO_CFB is not set
>  CONFIG_CRYPTO_CTR=m
>  # CONFIG_CRYPTO_CTS is not set
>  CONFIG_CRYPTO_ECB=y
>  # CONFIG_CRYPTO_HCTR2 is not set
>  # CONFIG_CRYPTO_KEYWRAP is not set
>  # CONFIG_CRYPTO_LRW is not set
> -# CONFIG_CRYPTO_OFB is not set
>  # CONFIG_CRYPTO_PCBC is not set
>  CONFIG_CRYPTO_XTS=y
>  # end of Length-preserving ciphers and modes
> @@ -4677,7 +4727,9 @@ CONFIG_CRYPTO_DRBG_HMAC=y
>  # CONFIG_CRYPTO_DRBG_CTR is not set
>  CONFIG_CRYPTO_DRBG=y
>  CONFIG_CRYPTO_JITTERENTROPY=y
> -# CONFIG_CRYPTO_JITTERENTROPY_TESTINTERFACE is not set
> +CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
> +CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
> +CONFIG_CRYPTO_JITTERENTROPY_OSR=1
>  # end of Random number generation
>  
>  #
> @@ -4747,6 +4799,7 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_PRNG_API=y
>  # CONFIG_CRYPTO_DEV_QAT_C3XXX is not set
>  # CONFIG_CRYPTO_DEV_QAT_C62X is not set
>  # CONFIG_CRYPTO_DEV_QAT_4XXX is not set
> +# CONFIG_CRYPTO_DEV_QAT_420XX is not set
>  # CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set
>  # CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set
>  # CONFIG_CRYPTO_DEV_QAT_C62XVF is not set
> @@ -4846,7 +4899,6 @@ CONFIG_ZSTD_DECOMPRESS=y
>  CONFIG_XZ_DEC=y
>  CONFIG_XZ_DEC_X86=y
>  CONFIG_XZ_DEC_POWERPC=y
> -CONFIG_XZ_DEC_IA64=y
>  CONFIG_XZ_DEC_ARM=y
>  CONFIG_XZ_DEC_ARMTHUMB=y
>  CONFIG_XZ_DEC_SPARC=y
> @@ -4901,6 +4953,7 @@ CONFIG_NLATTR=y
>  CONFIG_CLZ_TAB=y
>  CONFIG_IRQ_POLL=y
>  CONFIG_MPILIB=y
> +CONFIG_DIMLIB=y
>  CONFIG_LIBFDT=y
>  CONFIG_OID_REGISTRY=y
>  CONFIG_HAVE_GENERIC_VDSO=y
> @@ -4909,7 +4962,9 @@ CONFIG_GENERIC_VDSO_TIME_NS=y
>  CONFIG_SG_POOL=y
>  CONFIG_ARCH_STACKWALK=y
>  CONFIG_STACKDEPOT=y
> +CONFIG_STACKDEPOT_MAX_FRAMES=64
>  CONFIG_SBITMAP=y
> +# CONFIG_LWQ_TEST is not set
>  # end of Library routines
>  
>  CONFIG_GENERIC_IOREMAP=y
> @@ -4942,7 +4997,7 @@ CONFIG_DEBUG_MISC=y
>  # Compile-time checks and compiler options
>  #
>  CONFIG_DEBUG_INFO=y
> -CONFIG_AS_HAS_NON_CONST_LEB128=y
> +CONFIG_AS_HAS_NON_CONST_ULEB128=y
>  # CONFIG_DEBUG_INFO_NONE is not set
>  CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
>  # CONFIG_DEBUG_INFO_DWARF4 is not set
> @@ -5107,8 +5162,6 @@ CONFIG_STACKTRACE=y
>  # CONFIG_DEBUG_MAPLE_TREE is not set
>  # end of Debug kernel data structures
>  
> -# CONFIG_DEBUG_CREDENTIALS is not set
> -
>  #
>  # RCU Debugging
>  #
> diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
> index 675874fc4a3c..7653891e537d 100644
> --- a/configs/platform-v8a/platformconfig
> +++ b/configs/platform-v8a/platformconfig
> @@ -121,8 +121,8 @@ PTXCONF_KERNEL_INSTALL=y
>  PTXCONF_KERNEL_MODULES=y
>  PTXCONF_KERNEL_MODULES_INSTALL=y
>  # PTXCONF_KERNEL_MODULES_SIGN is not set
> -PTXCONF_KERNEL_VERSION="6.6"
> -PTXCONF_KERNEL_MD5="452098d80ba925af3a4ab35998f3aef5"
> +PTXCONF_KERNEL_VERSION="6.8"
> +PTXCONF_KERNEL_MD5="72d623b959a11850b57406f0b9fe3946"
>  # PTXCONF_KERNEL_IMAGE_BZ is not set
>  # PTXCONF_KERNEL_IMAGE_Z is not set
>  # PTXCONF_KERNEL_IMAGE_XIP is not set
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit]  [PATCH 04/12] v8a: update kernel from v6.6 → v6.8
  2024-03-16 11:18   ` Michael Olbrich
@ 2024-03-16 13:09     ` Ahmad Fatoum
  0 siblings, 0 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2024-03-16 13:09 UTC (permalink / raw)
  To: distrokit

Hello Michael,

On 16.03.24 12:18, Michael Olbrich wrote:
> On Fri, Mar 15, 2024 at 10:12:32PM +0100, Ahmad Fatoum wrote:
>> config changes are those of olddefconfig with the notable exception of
> 
> Huh, I tried to do the same but got different results.

You're right. I wrote the commit message a while later than doing the olddefconfig
and the changes you noted slipped my mind.

>> +# CONFIG_ARM64_ERRATUM_3117295 is not set
> 
> This was enabled for my, but disabling it is correct here.
> It's for Cortex-A510.

This is intentional.

>> +CONFIG_THERMAL_DEBUGFS=y
> 
> Is was disabled by default for me and I would prefer it that way.

Why? We enable other debugfs stuff too. I thought it might be useful.

>> +# CONFIG_ARM_SCMI_PERF_DOMAIN is not set
> 
> This defaults to y, but I have no clue when this is needed.

Ye, this is unneeded. We shouldn't have any platforms that make use
of this.

> The rest looks good to me.

Thanks for checking,
Ahmad

> 
> Michael
> 
>> +CONFIG_ARM_SCMI_POWER_DOMAIN=y
>> +CONFIG_ARM_SCPI_POWER_DOMAIN=y
>> +
>> +#
>> +# Broadcom PM Domains
>> +#
>> +# end of Broadcom PM Domains
>> +
>> +#
>> +# i.MX PM Domains
>> +#
>> +CONFIG_IMX_GPCV2_PM_DOMAINS=y
>> +CONFIG_IMX8M_BLK_CTRL=y
>> +# end of i.MX PM Domains
>> +
>> +#
>> +# Qualcomm PM Domains
>> +#
>> +# end of Qualcomm PM Domains
>> +
>> +CONFIG_ROCKCHIP_PM_DOMAINS=y
>> +# end of PM Domains
>> +
>>  CONFIG_PM_DEVFREQ=y
>>  
>>  #
>> @@ -4156,6 +4203,7 @@ CONFIG_FSL_IMX8_DDR_PMU=y
>>  # CONFIG_ARM_SPE_PMU is not set
>>  # CONFIG_HISI_PCIE_PMU is not set
>>  # CONFIG_HNS3_PMU is not set
>> +# CONFIG_DWC_PCIE_PMU is not set
>>  # CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU is not set
>>  # end of Performance monitor support
>>  
>> @@ -4172,6 +4220,7 @@ CONFIG_RAS=y
>>  # CONFIG_DAX is not set
>>  CONFIG_NVMEM=y
>>  CONFIG_NVMEM_SYSFS=y
>> +CONFIG_NVMEM_LAYOUTS=y
>>  
>>  #
>>  # Layout Types
>> @@ -4233,6 +4282,7 @@ CONFIG_INTERCONNECT_IMX8MP=y
>>  CONFIG_DCACHE_WORD_ACCESS=y
>>  # CONFIG_VALIDATE_FS_PARSER is not set
>>  CONFIG_FS_IOMAP=y
>> +CONFIG_FS_STACK=y
>>  CONFIG_BUFFER_HEAD=y
>>  CONFIG_LEGACY_DIRECT_IO=y
>>  # CONFIG_EXT2_FS is not set
>> @@ -4253,6 +4303,7 @@ CONFIG_FS_MBCACHE=y
>>  # CONFIG_BTRFS_FS is not set
>>  # CONFIG_NILFS2_FS is not set
>>  # CONFIG_F2FS_FS is not set
>> +# CONFIG_BCACHEFS_FS is not set
>>  CONFIG_FS_POSIX_ACL=y
>>  CONFIG_EXPORTFS=y
>>  # CONFIG_EXPORTFS_BLOCK_OPS is not set
>> @@ -4392,6 +4443,7 @@ CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
>>  # CONFIG_NFS_V4_1_MIGRATION is not set
>>  CONFIG_NFS_V4_SECURITY_LABEL=y
>>  CONFIG_ROOT_NFS=y
>> +# CONFIG_NFS_FSCACHE is not set
>>  # CONFIG_NFS_USE_LEGACY_DNS is not set
>>  CONFIG_NFS_USE_KERNEL_DNS=y
>>  CONFIG_NFS_DISABLE_UDP_SUPPORT=y
>> @@ -4598,14 +4650,12 @@ CONFIG_CRYPTO_SM4_GENERIC=m
>>  # CONFIG_CRYPTO_ADIANTUM is not set
>>  CONFIG_CRYPTO_CHACHA20=y
>>  CONFIG_CRYPTO_CBC=y
>> -# CONFIG_CRYPTO_CFB is not set
>>  CONFIG_CRYPTO_CTR=m
>>  # CONFIG_CRYPTO_CTS is not set
>>  CONFIG_CRYPTO_ECB=y
>>  # CONFIG_CRYPTO_HCTR2 is not set
>>  # CONFIG_CRYPTO_KEYWRAP is not set
>>  # CONFIG_CRYPTO_LRW is not set
>> -# CONFIG_CRYPTO_OFB is not set
>>  # CONFIG_CRYPTO_PCBC is not set
>>  CONFIG_CRYPTO_XTS=y
>>  # end of Length-preserving ciphers and modes
>> @@ -4677,7 +4727,9 @@ CONFIG_CRYPTO_DRBG_HMAC=y
>>  # CONFIG_CRYPTO_DRBG_CTR is not set
>>  CONFIG_CRYPTO_DRBG=y
>>  CONFIG_CRYPTO_JITTERENTROPY=y
>> -# CONFIG_CRYPTO_JITTERENTROPY_TESTINTERFACE is not set
>> +CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
>> +CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
>> +CONFIG_CRYPTO_JITTERENTROPY_OSR=1
>>  # end of Random number generation
>>  
>>  #
>> @@ -4747,6 +4799,7 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_PRNG_API=y
>>  # CONFIG_CRYPTO_DEV_QAT_C3XXX is not set
>>  # CONFIG_CRYPTO_DEV_QAT_C62X is not set
>>  # CONFIG_CRYPTO_DEV_QAT_4XXX is not set
>> +# CONFIG_CRYPTO_DEV_QAT_420XX is not set
>>  # CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set
>>  # CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set
>>  # CONFIG_CRYPTO_DEV_QAT_C62XVF is not set
>> @@ -4846,7 +4899,6 @@ CONFIG_ZSTD_DECOMPRESS=y
>>  CONFIG_XZ_DEC=y
>>  CONFIG_XZ_DEC_X86=y
>>  CONFIG_XZ_DEC_POWERPC=y
>> -CONFIG_XZ_DEC_IA64=y
>>  CONFIG_XZ_DEC_ARM=y
>>  CONFIG_XZ_DEC_ARMTHUMB=y
>>  CONFIG_XZ_DEC_SPARC=y
>> @@ -4901,6 +4953,7 @@ CONFIG_NLATTR=y
>>  CONFIG_CLZ_TAB=y
>>  CONFIG_IRQ_POLL=y
>>  CONFIG_MPILIB=y
>> +CONFIG_DIMLIB=y
>>  CONFIG_LIBFDT=y
>>  CONFIG_OID_REGISTRY=y
>>  CONFIG_HAVE_GENERIC_VDSO=y
>> @@ -4909,7 +4962,9 @@ CONFIG_GENERIC_VDSO_TIME_NS=y
>>  CONFIG_SG_POOL=y
>>  CONFIG_ARCH_STACKWALK=y
>>  CONFIG_STACKDEPOT=y
>> +CONFIG_STACKDEPOT_MAX_FRAMES=64
>>  CONFIG_SBITMAP=y
>> +# CONFIG_LWQ_TEST is not set
>>  # end of Library routines
>>  
>>  CONFIG_GENERIC_IOREMAP=y
>> @@ -4942,7 +4997,7 @@ CONFIG_DEBUG_MISC=y
>>  # Compile-time checks and compiler options
>>  #
>>  CONFIG_DEBUG_INFO=y
>> -CONFIG_AS_HAS_NON_CONST_LEB128=y
>> +CONFIG_AS_HAS_NON_CONST_ULEB128=y
>>  # CONFIG_DEBUG_INFO_NONE is not set
>>  CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
>>  # CONFIG_DEBUG_INFO_DWARF4 is not set
>> @@ -5107,8 +5162,6 @@ CONFIG_STACKTRACE=y
>>  # CONFIG_DEBUG_MAPLE_TREE is not set
>>  # end of Debug kernel data structures
>>  
>> -# CONFIG_DEBUG_CREDENTIALS is not set
>> -
>>  #
>>  # RCU Debugging
>>  #
>> diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
>> index 675874fc4a3c..7653891e537d 100644
>> --- a/configs/platform-v8a/platformconfig
>> +++ b/configs/platform-v8a/platformconfig
>> @@ -121,8 +121,8 @@ PTXCONF_KERNEL_INSTALL=y
>>  PTXCONF_KERNEL_MODULES=y
>>  PTXCONF_KERNEL_MODULES_INSTALL=y
>>  # PTXCONF_KERNEL_MODULES_SIGN is not set
>> -PTXCONF_KERNEL_VERSION="6.6"
>> -PTXCONF_KERNEL_MD5="452098d80ba925af3a4ab35998f3aef5"
>> +PTXCONF_KERNEL_VERSION="6.8"
>> +PTXCONF_KERNEL_MD5="72d623b959a11850b57406f0b9fe3946"
>>  # PTXCONF_KERNEL_IMAGE_BZ is not set
>>  # PTXCONF_KERNEL_IMAGE_Z is not set
>>  # PTXCONF_KERNEL_IMAGE_XIP is not set
>> -- 
>> 2.39.2
>>
>>
>>
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit]  [PATCH 01/12] ptxdist: migrate 2023.02.0 → 2024.03.0
  2024-03-16  9:26   ` Alexander Dahl
@ 2024-03-17 19:14     ` Robert Schwebel
  0 siblings, 0 replies; 27+ messages in thread
From: Robert Schwebel @ 2024-03-17 19:14 UTC (permalink / raw)
  To: Ahmad Fatoum, distrokit

On Sat, Mar 16, 2024 at 10:26:26AM +0100, Alexander Dahl wrote:
> typo in subject, should be 2024.02.0 instead of 2023.02.0.

Fixed while applying.

> Greets
> Alex
> 
> Am Fri, Mar 15, 2024 at 10:12:29PM +0100 schrieb Ahmad Fatoum:
> > This lets us make use of the updated OP-TEE packages for the incoming
> > STM32MP13 support. Support in OP-TEE 3.20 is incomplete and will lead to
> > a crash on boot up:
> > 
> >   I/TC: Platform stm32mp1: flavor 135F_DK - DT stm32mp135f-dk.dts
> >   I/TC: Non-secure SYSRAM [0xddfff000 0xddffffff]
> >   I/TC: DTB enables console (non-secure)
> >   I/TC: Primary CPU switching to normal world boot
> >   E/TC:0   tzc_it_handler:26 TZC permission failure
> >   E/TC:0   dump_fail_filter:420 Permission violation on filter 0
> >   E/TC:0   dump_fail_filter:425 Violation @0xfcff7fe0, non-secure privileged write, AXI ID 420
> >   E/TC:0   Panic at core/arch/arm/plat-stm32mp1/plat_tzc400.c:30 <tzc_it_handler>
> >   E/TC:0   TEE load address @ 0xde000000
> >   E/TC:0   Call stack:
> >   E/TC:0    0xde00316d
> >   E/TC:0    0xde011b37
> >   E/TC:0    0xde005245
> >   E/TC:0    0xde011201
> >   E/TC:0    0xde037155
> >   E/TC:0    0xde000350
> > 
> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> > ---
> >  configs/platform-mips/platformconfig       | 4 ++--
> >  configs/platform-mipsel/platformconfig     | 4 ++--
> >  configs/platform-rpi1/platformconfig       | 4 ++--
> >  configs/platform-v7a/platformconfig        | 4 ++--
> >  configs/platform-v7a_noneon/platformconfig | 4 ++--
> >  configs/platform-v8a/platformconfig        | 4 ++--
> >  configs/platform-x86_64/platformconfig     | 4 ++--
> >  configs/ptxconfig                          | 8 ++++++--
> >  8 files changed, 20 insertions(+), 16 deletions(-)
> > 
> > diff --git a/configs/platform-mips/platformconfig b/configs/platform-mips/platformconfig
> > index e81b89202920..a7483befeccc 100644
> > --- a/configs/platform-mips/platformconfig
> > +++ b/configs/platform-mips/platformconfig
> > @@ -1,6 +1,6 @@
> >  #
> >  # Automatically generated file; DO NOT EDIT.
> > -# PTXdist 2024.02.0
> > +# PTXdist 2024.03.0
> >  #
> >  PTXCONF__platformconfig_MAGIC__=y
> >  
> > @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
> >  PTXCONF_RUNTIME=y
> >  PTXCONF_BUILDTIME=y
> >  PTXCONF_VIRTUAL=y
> > -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> > +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
> >  
> >  #
> >  # architecture                  
> > diff --git a/configs/platform-mipsel/platformconfig b/configs/platform-mipsel/platformconfig
> > index 292295087547..5e134a3f151f 100644
> > --- a/configs/platform-mipsel/platformconfig
> > +++ b/configs/platform-mipsel/platformconfig
> > @@ -1,6 +1,6 @@
> >  #
> >  # Automatically generated file; DO NOT EDIT.
> > -# PTXdist 2024.02.0
> > +# PTXdist 2024.03.0
> >  #
> >  PTXCONF__platformconfig_MAGIC__=y
> >  
> > @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
> >  PTXCONF_RUNTIME=y
> >  PTXCONF_BUILDTIME=y
> >  PTXCONF_VIRTUAL=y
> > -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> > +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
> >  
> >  #
> >  # architecture                  
> > diff --git a/configs/platform-rpi1/platformconfig b/configs/platform-rpi1/platformconfig
> > index 919eb0251f6a..e0d0611313c7 100644
> > --- a/configs/platform-rpi1/platformconfig
> > +++ b/configs/platform-rpi1/platformconfig
> > @@ -1,6 +1,6 @@
> >  #
> >  # Automatically generated file; DO NOT EDIT.
> > -# PTXdist 2024.02.0
> > +# PTXdist 2024.03.0
> >  #
> >  PTXCONF__platformconfig_MAGIC__=y
> >  
> > @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
> >  PTXCONF_RUNTIME=y
> >  PTXCONF_BUILDTIME=y
> >  PTXCONF_VIRTUAL=y
> > -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> > +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
> >  
> >  #
> >  # architecture                  
> > diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
> > index 3525657da32c..f2b4d2b7a922 100644
> > --- a/configs/platform-v7a/platformconfig
> > +++ b/configs/platform-v7a/platformconfig
> > @@ -1,6 +1,6 @@
> >  #
> >  # Automatically generated file; DO NOT EDIT.
> > -# PTXdist 2024.02.0
> > +# PTXdist 2024.03.0
> >  #
> >  PTXCONF__platformconfig_MAGIC__=y
> >  
> > @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
> >  PTXCONF_RUNTIME=y
> >  PTXCONF_BUILDTIME=y
> >  PTXCONF_VIRTUAL=y
> > -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> > +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
> >  
> >  #
> >  # architecture                  
> > diff --git a/configs/platform-v7a_noneon/platformconfig b/configs/platform-v7a_noneon/platformconfig
> > index 5e0388e37e34..52fa2abf474f 100644
> > --- a/configs/platform-v7a_noneon/platformconfig
> > +++ b/configs/platform-v7a_noneon/platformconfig
> > @@ -1,6 +1,6 @@
> >  #
> >  # Automatically generated file; DO NOT EDIT.
> > -# PTXdist 2024.02.0
> > +# PTXdist 2024.03.0
> >  #
> >  PTXCONF__platformconfig_MAGIC__=y
> >  
> > @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
> >  PTXCONF_RUNTIME=y
> >  PTXCONF_BUILDTIME=y
> >  PTXCONF_VIRTUAL=y
> > -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> > +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
> >  
> >  #
> >  # architecture                  
> > diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
> > index d91255f18b0e..f9168a8bc599 100644
> > --- a/configs/platform-v8a/platformconfig
> > +++ b/configs/platform-v8a/platformconfig
> > @@ -1,6 +1,6 @@
> >  #
> >  # Automatically generated file; DO NOT EDIT.
> > -# PTXdist 2024.02.0
> > +# PTXdist 2024.03.0
> >  #
> >  PTXCONF__platformconfig_MAGIC__=y
> >  
> > @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
> >  PTXCONF_RUNTIME=y
> >  PTXCONF_BUILDTIME=y
> >  PTXCONF_VIRTUAL=y
> > -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> > +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
> >  
> >  #
> >  # architecture                  
> > diff --git a/configs/platform-x86_64/platformconfig b/configs/platform-x86_64/platformconfig
> > index a44daa041199..918bf8a375b0 100644
> > --- a/configs/platform-x86_64/platformconfig
> > +++ b/configs/platform-x86_64/platformconfig
> > @@ -1,6 +1,6 @@
> >  #
> >  # Automatically generated file; DO NOT EDIT.
> > -# PTXdist 2024.02.0
> > +# PTXdist 2024.03.0
> >  #
> >  PTXCONF__platformconfig_MAGIC__=y
> >  
> > @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
> >  PTXCONF_RUNTIME=y
> >  PTXCONF_BUILDTIME=y
> >  PTXCONF_VIRTUAL=y
> > -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> > +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
> >  
> >  #
> >  # architecture                  
> > diff --git a/configs/ptxconfig b/configs/ptxconfig
> > index cb5e93990425..b5f4475d2c70 100644
> > --- a/configs/ptxconfig
> > +++ b/configs/ptxconfig
> > @@ -1,6 +1,6 @@
> >  #
> >  # Automatically generated file; DO NOT EDIT.
> > -# PTXdist 2024.02.0
> > +# PTXdist 2024.03.0
> >  #
> >  PTXCONF_DATAPARTITION=y
> >  PTXCONF_RAUC_UDEV=y
> > @@ -69,7 +69,7 @@ PTXCONF_BSP=y
> >  PTXCONF_RUNTIME=y
> >  PTXCONF_BUILDTIME=y
> >  PTXCONF_VIRTUAL=y
> > -PTXCONF_CONFIGFILE_VERSION="2024.02.0"
> > +PTXCONF_CONFIGFILE_VERSION="2024.03.0"
> >  PTXCONF__ptxconfig_MAGIC__=y
> >  
> >  #
> > @@ -96,6 +96,7 @@ PTXCONF_HOST_QEMU_USR=y
> >  # PTXCONF_HOST_TESTFRAMEWORK is not set
> >  PTXCONF_HOST_ACL=y
> >  PTXCONF_HOST_CMAKE=y
> > +PTXCONF_HOST_DTC=y
> >  PTXCONF_HOST_FIGLET=y
> >  PTXCONF_HOST_FILE=y
> >  PTXCONF_HOST_FLEX=y
> > @@ -1815,6 +1816,7 @@ PTXCONF_ZSTD=y
> >  # PTXCONF_PYTHON3_PYBIND11 is not set
> >  # PTXCONF_PYTHON3_PYCPARSER is not set
> >  # PTXCONF_PYTHON3_PYCRYPTODOMEX is not set
> > +# PTXCONF_PYTHON3_PYOPENSSL is not set
> >  # PTXCONF_PYTHON3_PYPARSING is not set
> >  # PTXCONF_PYTHON3_PYRO is not set
> >  # PTXCONF_PYTHON3_PYSMI is not set
> > @@ -2241,6 +2243,7 @@ PTXCONF_RAUC_BAREBOX=y
> >  #
> >  # System Libraries              
> >  #
> > +# PTXCONF_ABSEIL_CPP is not set
> >  # PTXCONF_AML is not set
> >  # PTXCONF_ARGTABLE2 is not set
> >  # PTXCONF_ARMADILLO is not set
> > @@ -2714,6 +2717,7 @@ PTXCONF_JSON_GLIB=y
> >  # PTXCONF_TWOLAME is not set
> >  # PTXCONF_VORBIS_TOOLS is not set
> >  # PTXCONF_WEBRTC_AUDIO_PROCESSING is not set
> > +# PTXCONF_WEBRTC_AUDIO_PROCESSING1 is not set
> >  # end of sound                         
> >  
> >  #
> > -- 
> > 2.39.2
> 
> -- 
> /"\ ASCII RIBBON | »With the first link, the chain is forged. The first
> \ / CAMPAIGN     | speech censured, the first thought forbidden, the
>  X  AGAINST      | first freedom denied, chains us all irrevocably.«
> / \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)



-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support
  2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
                   ` (11 preceding siblings ...)
  2024-03-15 21:12 ` [DistroKit] [PATCH 12/12] v7a: stm32mp: add image recipe for STM32MP135F-DK Ahmad Fatoum
@ 2024-03-17 19:27 ` Robert Schwebel
  12 siblings, 0 replies; 27+ messages in thread
From: Robert Schwebel @ 2024-03-17 19:27 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Fri, Mar 15, 2024 at 10:12:28PM +0100, Ahmad Fatoum wrote:
> This series updates core components: PTXdist, TF-A, barebox and kernel
> to their newest versions and then adds OP-TEE support to enable booting
> DistroKit on the new STM32MP135F-DK.

Applied series to next.

> Ahmad Fatoum (12):
>   ptxdist: migrate 2023.02.0 → 2024.03.0
>   tf-a: update from v2.8 → v2.10
>   v8a: imx8mq-evk: disable PCI nodes
>   v8a: update kernel from v6.6 → v6.8
>   v8a: barebox: version bump v2023.12.0 → v2024.03.0
>   v7a: update kernel from v6.6 → v6.8
>   v7a: barebox: version bump v2024.01.0 → v2024.03.0
>   v7a: barebox: enable STM32MP135F-DK support
>   v7a: build OP-TEE for STM32MP13
>   v7a: stm32mp: add TF-A recipe for STM32MP13
>   v7a: kernel: enable STM32MP135F-DK support
>   v7a: stm32mp: add image recipe for STM32MP135F-DK
> 
>  configs/platform-mips/platformconfig          |   4 +-
>  configs/platform-mipsel/platformconfig        |   4 +-
>  configs/platform-rpi1/platformconfig          |   4 +-
>  .../platform-v7a/barebox-am335x-mlo.config    |  17 +-
>  configs/platform-v7a/barebox-am335x.config    |  19 +-
>  .../platform-v7a/barebox-am335x.config.diff   |   4 +-
>  configs/platform-v7a/barebox-at91.config      |  18 +-
>  configs/platform-v7a/barebox-at91.config.diff |   4 +-
>  configs/platform-v7a/barebox-mx6.config       |  18 +-
>  configs/platform-v7a/barebox-mx6.config.diff  |   2 +-
>  configs/platform-v7a/barebox-rpi2.config      |  18 +-
>  configs/platform-v7a/barebox-rpi2.config.diff |   2 +-
>  configs/platform-v7a/barebox-stm32mp.config   |  42 ++-
>  .../platform-v7a/barebox-stm32mp.config.diff  |  24 +-
>  configs/platform-v7a/barebox-vexpress.config  |  18 +-
>  .../platform-v7a/barebox-vexpress.config.diff |   2 +-
>  configs/platform-v7a/barebox.config           |  18 +-
>  .../config/images/stm32mp-optee.config        |  60 ++++
>  configs/platform-v7a/dts/bootstate.dtsi       |   3 +-
>  configs/platform-v7a/kernelconfig             | 129 +++++---
>  ...ression-booting-without-VideoCore-DT.patch | 130 --------
>  .../patches/barebox-2024.01.0/series          |   1 -
>  configs/platform-v7a/platformconfig           |  27 +-
>  .../platforms/image-stm32mp135f-dk.in         |  13 +
>  .../platform-v7a/platforms/tf-a-stm32mp13.in  |  12 +
>  .../platform-v7a/rules/barebox-stm32mp.make   |   3 +-
>  .../rules/image-stm32mp135f-dk.make           |  34 ++
>  .../platform-v7a/rules/tf-a-stm32mp13.make    | 110 +++++++
>  configs/platform-v7a_noneon/platformconfig    |   4 +-
>  .../init/disable-imx8mq-pci                   |   7 +
>  configs/platform-v8a/barebox.config           |  36 ++-
>  configs/platform-v8a/kernelconfig             | 121 +++++--
>  configs/platform-v8a/platformconfig           |  16 +-
>  configs/platform-x86_64/platformconfig        |   4 +-
>  configs/ptxconfig                             |   8 +-
>  ...DRAM-retention-by-default-on-i.MX8MQ.patch | 182 +++++++++++
>  ...kage-on-ARMv7-CPUs-with-SP_min-as-BL.patch |  61 ++++
>  ...ct-console-base-address-during-runti.patch |  69 ++++
>  ...mx-disable-DRAM-retention-by-default.patch | 174 ++++++++++
>  ...ct-console-base-address-during-runti.patch |  72 +++++
>  ...kage-on-ARMv7-CPUs-with-SP_min-as-BL.patch |  57 ++++
>  ...tomers-pengutronix-distrokit-2024031.patch |  21 ++
>  patches/tf-a-v2.10/series                     |  19 ++
>  ...-add-helper-to-detect-linker-options.patch |  35 --
>  ...dd-support-for-new-binutils-versions.patch |  54 ----
>  ...-IMX_BOOT_UART_BASE-configurable-via.patch |  41 ---
>  ...remove-empty-bl31_plat_runtime_setup.patch |  30 --
>  ...03-feat-imx8mq-always-set-up-console.patch |  51 ---
>  ...imx8mq-make-use-of-setup_page_tables.patch |  53 ---
>  ...-refactor-imx8mq-introduce-BL31_SIZE.patch |  54 ----
>  ...106-feat-imx8mq-add-BL31-PIE-support.patch |  55 ----
>  ...feat-imx8mq-add-support-for-gcc-12.x.patch |  45 ---
>  ...t-console-base-address-during-runtim.patch | 304 ------------------
>  ...MX_BOOT_UART_BASE-autodetection-opti.patch | 172 ----------
>  ...omers-pengutronix-distrokit-20240117.patch |  21 --
>  patches/tf-a-v2.8/series                      |  27 --
>  56 files changed, 1322 insertions(+), 1211 deletions(-)
>  create mode 100644 configs/platform-v7a/config/images/stm32mp-optee.config
>  delete mode 100644 configs/platform-v7a/patches/barebox-2024.01.0/0001-ARM-rpi-fix-regression-booting-without-VideoCore-DT.patch
>  delete mode 100644 configs/platform-v7a/patches/barebox-2024.01.0/series
>  create mode 100644 configs/platform-v7a/platforms/image-stm32mp135f-dk.in
>  create mode 100644 configs/platform-v7a/platforms/tf-a-stm32mp13.in
>  create mode 100644 configs/platform-v7a/rules/image-stm32mp135f-dk.make
>  create mode 100644 configs/platform-v7a/rules/tf-a-stm32mp13.make
>  create mode 100755 configs/platform-v8a/barebox-common-defaultenv/init/disable-imx8mq-pci
>  create mode 100644 patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8MQ.patch
>  create mode 100644 patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
>  create mode 100644 patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-runti.patch
>  create mode 100644 patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
>  create mode 100644 patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-runti.patch
>  create mode 100644 patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
>  create mode 100644 patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024031.patch
>  create mode 100644 patches/tf-a-v2.10/series
>  delete mode 100644 patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options.patch
>  delete mode 100644 patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.patch
>  delete mode 100644 patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via.patch
>  delete mode 100644 patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.patch
>  delete mode 100644 patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
>  delete mode 100644 patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patch
>  delete mode 100644 patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
>  delete mode 100644 patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
>  delete mode 100644 patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
>  delete mode 100644 patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runtim.patch
>  delete mode 100644 patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti.patch
>  delete mode 100644 patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-20240117.patch
>  delete mode 100644 patches/tf-a-v2.8/series
> 
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit] [PATCH 11/12] v7a: kernel: enable STM32MP135F-DK support
  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
  0 siblings, 1 reply; 27+ messages in thread
From: Michael Olbrich @ 2024-03-18 13:07 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Fri, Mar 15, 2024 at 10:12:39PM +0100, Ahmad Fatoum wrote:
> The STM32MP13 shared many kernel config options with the STM32MP15, but
> it requires some additional options to support SCMI-over-OP-TEE. Enable
> these options as well as support for OTP-over-OPTEE and rng-over-OPTEE.
> 
> With the SCMI options enabled, it's possible to boot the STM32MP135F-DK,
> so enable build of its device tree for inclusion into the image in the
> follow-up commit.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-v7a/kernelconfig   | 10 ++++++++--
>  configs/platform-v7a/platformconfig |  2 +-
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/configs/platform-v7a/kernelconfig b/configs/platform-v7a/kernelconfig
> index c65bdb8da3d9..0984c8a1900c 100644
> --- a/configs/platform-v7a/kernelconfig
> +++ b/configs/platform-v7a/kernelconfig
> @@ -1248,7 +1248,9 @@ CONFIG_ARM_SCMI_PROTOCOL=y
>  # CONFIG_ARM_SCMI_RAW_MODE_SUPPORT is not set
>  CONFIG_ARM_SCMI_HAVE_TRANSPORT=y
>  CONFIG_ARM_SCMI_HAVE_SHMEM=y
> +CONFIG_ARM_SCMI_HAVE_MSG=y
>  CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y
> +CONFIG_ARM_SCMI_TRANSPORT_OPTEE=y
>  CONFIG_ARM_SCMI_TRANSPORT_SMC=y
>  # CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE is not set
>  # CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set
> @@ -1931,6 +1933,7 @@ CONFIG_HW_RANDOM_IPROC_RNG200=y
>  CONFIG_HW_RANDOM_OMAP=y
>  CONFIG_HW_RANDOM_VIRTIO=y
>  CONFIG_HW_RANDOM_STM32=y
> +CONFIG_HW_RANDOM_OPTEE=y
>  # CONFIG_HW_RANDOM_CCTRNG is not set
>  # CONFIG_HW_RANDOM_XIPHERA is not set
>  # CONFIG_HW_RANDOM_ARM_SMCCC_TRNG is not set
> @@ -3106,6 +3109,7 @@ CONFIG_RTC_I2C_AND_SPI=y
>  # CONFIG_RTC_DRV_M48T59 is not set
>  # CONFIG_RTC_DRV_MSM6242 is not set
>  # CONFIG_RTC_DRV_RP5C01 is not set
> +# CONFIG_RTC_DRV_OPTEE is not set
>  # CONFIG_RTC_DRV_ZYNQMP is not set
>  
>  #
> @@ -3578,6 +3582,7 @@ CONFIG_NVMEM_IMX_OCOTP_ELE=y
>  # CONFIG_NVMEM_MICROCHIP_OTPC is not set
>  CONFIG_NVMEM_RMEM=y
>  # CONFIG_NVMEM_SNVS_LPGPR is not set
> +CONFIG_NVMEM_STM32_BSEC_OPTEE_TA=y
>  CONFIG_NVMEM_STM32_ROMEM=y
>  # CONFIG_NVMEM_U_BOOT_ENV is not set
>  
> @@ -3590,7 +3595,8 @@ CONFIG_NVMEM_STM32_ROMEM=y
>  
>  # CONFIG_FPGA is not set
>  # CONFIG_FSI is not set
> -# CONFIG_TEE is not set
> +CONFIG_TEE=y
> +CONFIG_OPTEE=y
>  CONFIG_MULTIPLEXER=y
>  
>  #
> @@ -3994,7 +4000,7 @@ CONFIG_CRYPTO_XTS=y
>  # CONFIG_CRYPTO_MICHAEL_MIC is not set
>  # CONFIG_CRYPTO_POLY1305 is not set
>  # CONFIG_CRYPTO_RMD160 is not set
> -# CONFIG_CRYPTO_SHA1 is not set
> +CONFIG_CRYPTO_SHA1=y

Please enable the optimized sha1 implementations for ARM as well.

Michael

>  CONFIG_CRYPTO_SHA256=y
>  # CONFIG_CRYPTO_SHA512 is not set
>  # CONFIG_CRYPTO_SHA3 is not set
> diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
> index 1ff25470bfd6..797b4cb72664 100644
> --- a/configs/platform-v7a/platformconfig
> +++ b/configs/platform-v7a/platformconfig
> @@ -138,7 +138,7 @@ PTXCONF_KERNEL_IMAGE_Z=y
>  PTXCONF_KERNEL_IMAGE="zImage"
>  PTXCONF_KERNEL_DTB=y
>  PTXCONF_KERNEL_DTS_PATH="${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
> -PTXCONF_KERNEL_DTS="ti/omap/am335x-bone.dts ti/omap/am335x-boneblack.dts arm/vexpress-v2p-ca9.dts broadcom/bcm2836-rpi-2-b.dts nxp/imx/imx6q-sabrelite.dts nxp/imx/imx6sx-udoo-neo-full.dts nxp/imx/imx6dl-riotboard.dts nxp/imx/imx6q-nitrogen6x.dts nxp/imx/imx6qp-nitrogen6_max.dts broadcom/bcm2837-rpi-3-b.dts broadcom/bcm2837-rpi-cm3-io3.dts broadcom/bcm2711-rpi-4-b.dts broadcom/bcm2711-rpi-400.dts st/stm32mp157c-dk2.dts st/stm32mp157c-ev1.dts st/stm32mp157c-lxa-mc1.dts microchip/at91-sama5d27_som1_ek.dts at91-sama5d27_giantboard.dts at91-sama5d4_wifx_l1.dts"
> +PTXCONF_KERNEL_DTS="ti/omap/am335x-bone.dts ti/omap/am335x-boneblack.dts arm/vexpress-v2p-ca9.dts broadcom/bcm2836-rpi-2-b.dts nxp/imx/imx6q-sabrelite.dts nxp/imx/imx6sx-udoo-neo-full.dts nxp/imx/imx6dl-riotboard.dts nxp/imx/imx6q-nitrogen6x.dts nxp/imx/imx6qp-nitrogen6_max.dts broadcom/bcm2837-rpi-3-b.dts broadcom/bcm2837-rpi-cm3-io3.dts broadcom/bcm2711-rpi-4-b.dts broadcom/bcm2711-rpi-400.dts st/stm32mp157c-dk2.dts st/stm32mp157c-ev1.dts st/stm32mp157c-lxa-mc1.dts st/stm32mp135f-dk.dts microchip/at91-sama5d27_som1_ek.dts at91-sama5d27_giantboard.dts at91-sama5d4_wifx_l1.dts"
>  # PTXCONF_KERNEL_DTBO is not set
>  # PTXCONF_KERNEL_CODE_SIGNING is not set
>  # PTXCONF_KERNEL_ZSTD is not set
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit] [PATCH 11/12] v7a: kernel: enable STM32MP135F-DK support
  2024-03-18 13:07   ` Michael Olbrich
@ 2024-03-18 14:23     ` Robert Schwebel
  0 siblings, 0 replies; 27+ messages in thread
From: Robert Schwebel @ 2024-03-18 14:23 UTC (permalink / raw)
  To: Ahmad Fatoum, distrokit

On Mon, Mar 18, 2024 at 02:07:35PM +0100, Michael Olbrich wrote:
> > @@ -3994,7 +4000,7 @@ CONFIG_CRYPTO_XTS=y
> >  # CONFIG_CRYPTO_MICHAEL_MIC is not set
> >  # CONFIG_CRYPTO_POLY1305 is not set
> >  # CONFIG_CRYPTO_RMD160 is not set
> > -# CONFIG_CRYPTO_SHA1 is not set
> > +CONFIG_CRYPTO_SHA1=y
>
> Please enable the optimized sha1 implementations for ARM as well.

Done in next.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit]  [PATCH 01/12] ptxdist: migrate 2023.02.0 → 2024.03.0
  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-21  9:37   ` Alexander Dahl
  2024-03-25 18:45     ` [DistroKit] [PATCH] blspec-entry: remove superfluous file Roland Hieber
  1 sibling, 1 reply; 27+ messages in thread
From: Alexander Dahl @ 2024-03-21  9:37 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

Hello Ahmad,

Am Fri, Mar 15, 2024 at 10:12:29PM +0100 schrieb Ahmad Fatoum:
> This lets us make use of the updated OP-TEE packages for the incoming
> STM32MP13 support. Support in OP-TEE 3.20 is incomplete and will lead to
> a crash on boot up:
> 
>   I/TC: Platform stm32mp1: flavor 135F_DK - DT stm32mp135f-dk.dts
>   I/TC: Non-secure SYSRAM [0xddfff000 0xddffffff]
>   I/TC: DTB enables console (non-secure)
>   I/TC: Primary CPU switching to normal world boot
>   E/TC:0   tzc_it_handler:26 TZC permission failure
>   E/TC:0   dump_fail_filter:420 Permission violation on filter 0
>   E/TC:0   dump_fail_filter:425 Violation @0xfcff7fe0, non-secure privileged write, AXI ID 420
>   E/TC:0   Panic at core/arch/arm/plat-stm32mp1/plat_tzc400.c:30 <tzc_it_handler>
>   E/TC:0   TEE load address @ 0xde000000
>   E/TC:0   Call stack:
>   E/TC:0    0xde00316d
>   E/TC:0    0xde011b37
>   E/TC:0    0xde005245
>   E/TC:0    0xde011201
>   E/TC:0    0xde037155
>   E/TC:0    0xde000350
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-mips/platformconfig       | 4 ++--
>  configs/platform-mipsel/platformconfig     | 4 ++--
>  configs/platform-rpi1/platformconfig       | 4 ++--
>  configs/platform-v7a/platformconfig        | 4 ++--
>  configs/platform-v7a_noneon/platformconfig | 4 ++--
>  configs/platform-v8a/platformconfig        | 4 ++--
>  configs/platform-x86_64/platformconfig     | 4 ++--
>  configs/ptxconfig                          | 8 ++++++--
>  8 files changed, 20 insertions(+), 16 deletions(-)

I think after this change the file rules/blspec-entry.make can be
removed from DistroKit because it is identical to the one in ptxdist
2024.03.0.

Maybe a post migrate help to check for such cases would be helpful?

Greets
Alex

> 
> diff --git a/configs/platform-mips/platformconfig b/configs/platform-mips/platformconfig
> index e81b89202920..a7483befeccc 100644
> --- a/configs/platform-mips/platformconfig
> +++ b/configs/platform-mips/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-mipsel/platformconfig b/configs/platform-mipsel/platformconfig
> index 292295087547..5e134a3f151f 100644
> --- a/configs/platform-mipsel/platformconfig
> +++ b/configs/platform-mipsel/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-rpi1/platformconfig b/configs/platform-rpi1/platformconfig
> index 919eb0251f6a..e0d0611313c7 100644
> --- a/configs/platform-rpi1/platformconfig
> +++ b/configs/platform-rpi1/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
> index 3525657da32c..f2b4d2b7a922 100644
> --- a/configs/platform-v7a/platformconfig
> +++ b/configs/platform-v7a/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-v7a_noneon/platformconfig b/configs/platform-v7a_noneon/platformconfig
> index 5e0388e37e34..52fa2abf474f 100644
> --- a/configs/platform-v7a_noneon/platformconfig
> +++ b/configs/platform-v7a_noneon/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-v8a/platformconfig b/configs/platform-v8a/platformconfig
> index d91255f18b0e..f9168a8bc599 100644
> --- a/configs/platform-v8a/platformconfig
> +++ b/configs/platform-v8a/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/platform-x86_64/platformconfig b/configs/platform-x86_64/platformconfig
> index a44daa041199..918bf8a375b0 100644
> --- a/configs/platform-x86_64/platformconfig
> +++ b/configs/platform-x86_64/platformconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF__platformconfig_MAGIC__=y
>  
> @@ -20,7 +20,7 @@ PTXCONF_PLATFORM_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_PLATFORMCONFIG_VERSION="2024.02.0"
> +PTXCONF_PLATFORMCONFIG_VERSION="2024.03.0"
>  
>  #
>  # architecture                  
> diff --git a/configs/ptxconfig b/configs/ptxconfig
> index cb5e93990425..b5f4475d2c70 100644
> --- a/configs/ptxconfig
> +++ b/configs/ptxconfig
> @@ -1,6 +1,6 @@
>  #
>  # Automatically generated file; DO NOT EDIT.
> -# PTXdist 2024.02.0
> +# PTXdist 2024.03.0
>  #
>  PTXCONF_DATAPARTITION=y
>  PTXCONF_RAUC_UDEV=y
> @@ -69,7 +69,7 @@ PTXCONF_BSP=y
>  PTXCONF_RUNTIME=y
>  PTXCONF_BUILDTIME=y
>  PTXCONF_VIRTUAL=y
> -PTXCONF_CONFIGFILE_VERSION="2024.02.0"
> +PTXCONF_CONFIGFILE_VERSION="2024.03.0"
>  PTXCONF__ptxconfig_MAGIC__=y
>  
>  #
> @@ -96,6 +96,7 @@ PTXCONF_HOST_QEMU_USR=y
>  # PTXCONF_HOST_TESTFRAMEWORK is not set
>  PTXCONF_HOST_ACL=y
>  PTXCONF_HOST_CMAKE=y
> +PTXCONF_HOST_DTC=y
>  PTXCONF_HOST_FIGLET=y
>  PTXCONF_HOST_FILE=y
>  PTXCONF_HOST_FLEX=y
> @@ -1815,6 +1816,7 @@ PTXCONF_ZSTD=y
>  # PTXCONF_PYTHON3_PYBIND11 is not set
>  # PTXCONF_PYTHON3_PYCPARSER is not set
>  # PTXCONF_PYTHON3_PYCRYPTODOMEX is not set
> +# PTXCONF_PYTHON3_PYOPENSSL is not set
>  # PTXCONF_PYTHON3_PYPARSING is not set
>  # PTXCONF_PYTHON3_PYRO is not set
>  # PTXCONF_PYTHON3_PYSMI is not set
> @@ -2241,6 +2243,7 @@ PTXCONF_RAUC_BAREBOX=y
>  #
>  # System Libraries              
>  #
> +# PTXCONF_ABSEIL_CPP is not set
>  # PTXCONF_AML is not set
>  # PTXCONF_ARGTABLE2 is not set
>  # PTXCONF_ARMADILLO is not set
> @@ -2714,6 +2717,7 @@ PTXCONF_JSON_GLIB=y
>  # PTXCONF_TWOLAME is not set
>  # PTXCONF_VORBIS_TOOLS is not set
>  # PTXCONF_WEBRTC_AUDIO_PROCESSING is not set
> +# PTXCONF_WEBRTC_AUDIO_PROCESSING1 is not set
>  # end of sound                         
>  
>  #
> -- 
> 2.39.2
> 
> 



^ permalink raw reply	[flat|nested] 27+ messages in thread

* [DistroKit] [PATCH] blspec-entry: remove superfluous file
  2024-03-21  9:37   ` Alexander Dahl
@ 2024-03-25 18:45     ` Roland Hieber
  2024-03-25 20:51       ` Robert Schwebel
  0 siblings, 1 reply; 27+ messages in thread
From: Roland Hieber @ 2024-03-25 18:45 UTC (permalink / raw)
  To: distrokit; +Cc: Alexander Dahl, Ahmad Fatoum, Roland Hieber

After upstreaming our changes, the file in PTXdist 2024.02.0 is now the
same as ours, so we can remove it here.

Suggested-by: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
 rules/blspec-entry.make | 73 -----------------------------------------
 1 file changed, 73 deletions(-)
 delete mode 100644 rules/blspec-entry.make

diff --git a/rules/blspec-entry.make b/rules/blspec-entry.make
deleted file mode 100644
index 4421594016e1..000000000000
--- a/rules/blspec-entry.make
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*-makefile-*-
-#
-# Copyright (C) 2014 by Michael Olbrich <m.olbrich@pengutronix.de>
-#
-# For further information about the PTXdist project and license conditions
-# see the README file.
-#
-
-#
-# We provide this package
-#
-PACKAGES-$(PTXCONF_BLSPEC_ENTRY) += blspec-entry
-
-BLSPEC_ENTRY_VERSION	:= $(KERNEL_VERSION)
-
-# ----------------------------------------------------------------------------
-# Target-Install
-# ----------------------------------------------------------------------------
-
-BLSPEC_ENTRY_TITLE	:= PTXdist - $(call remove_quotes,$(PTXCONF_PROJECT_VENDOR)-$(PTXCONF_PROJECT))
-ifdef PTXCONF_BLSPEC_ENTRY_DEVICETREE
-BLSPEC_ENTRY_NAMES	= $(basename $(notdir $(KERNEL_DTS)))
-blspec/title		= $(BLSPEC_ENTRY_TITLE) $(strip $(1))
-blspec/devicetree	= devicetree\t/boot/$(strip $(1)).dtb
-else
-BLSPEC_ENTRY_NAMES	= default
-blspec/title		= $(BLSPEC_ENTRY_TITLE)
-blspec/devicetree	=
-endif
-BLSPEC_ENTRY_LICENSE	= ignore
-
-ifdef PTXCONF_KERNEL_FIT
-BLSPEC_KERNEL_IMAGE	= linux.fit
-else
-BLSPEC_KERNEL_IMAGE	= $(KERNEL_IMAGE)
-endif
-
-ifdef PTXCONF_BLSPEC_ENTRY_APPENDROOT
-BLSPEC_APPENDROOT	= linux-appendroot\ttrue
-else
-BLSPEC_APPENDROOT	=
-endif
-
-$(STATEDIR)/blspec-entry.targetinstall:
-	@$(call targetinfo)
-
-	@$(call install_init, blspec-entry)
-	@$(call install_fixup,blspec-entry,PRIORITY,optional)
-	@$(call install_fixup,blspec-entry,SECTION,base)
-	@$(call install_fixup,blspec-entry,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
-	@$(call install_fixup,blspec-entry,DESCRIPTION,missing)
-
-	@$(foreach name, $(BLSPEC_ENTRY_NAMES), \
-		$(call install_alternative, blspec-entry, 0, 0, 0644, \
-			/loader/entries/default.conf,n,/loader/entries/$(name).conf)$(ptx/nl) \
-		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
-			@TITLE@,'$(call blspec/title,$(name))')$(ptx/nl) \
-		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
-			@VERSION@,'$(BLSPEC_ENTRY_VERSION)')$(ptx/nl) \
-		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
-			@CMDLINE@,$(PTXCONF_BLSPEC_ENTRY_CMDLINE))$(ptx/nl) \
-		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
-			@KERNEL@,'/boot/$(BLSPEC_KERNEL_IMAGE)')$(ptx/nl) \
-		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
-			@DEVICETREE@,'$(call blspec/devicetree,$(name))')$(ptx/nl) \
-		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
-			@LINUXAPPENDROOT@,'$(BLSPEC_APPENDROOT)')$(ptx/nl))
-
-	@$(call install_finish,blspec-entry)
-
-	@$(call touch)
-
-# vim: syntax=make
-- 
2.39.2




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit] [PATCH] blspec-entry: remove superfluous file
  2024-03-25 18:45     ` [DistroKit] [PATCH] blspec-entry: remove superfluous file Roland Hieber
@ 2024-03-25 20:51       ` Robert Schwebel
  0 siblings, 0 replies; 27+ messages in thread
From: Robert Schwebel @ 2024-03-25 20:51 UTC (permalink / raw)
  To: Roland Hieber; +Cc: Alexander Dahl, distrokit, Ahmad Fatoum

Applied to next.

On Mon, Mar 25, 2024 at 07:45:09PM +0100, Roland Hieber wrote:
> After upstreaming our changes, the file in PTXdist 2024.02.0 is now the
> same as ours, so we can remove it here.
> 
> Suggested-by: Alexander Dahl <ada@thorsis.com>
> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
> ---
>  rules/blspec-entry.make | 73 -----------------------------------------
>  1 file changed, 73 deletions(-)
>  delete mode 100644 rules/blspec-entry.make
> 
> diff --git a/rules/blspec-entry.make b/rules/blspec-entry.make
> deleted file mode 100644
> index 4421594016e1..000000000000
> --- a/rules/blspec-entry.make
> +++ /dev/null
> @@ -1,73 +0,0 @@
> -# -*-makefile-*-
> -#
> -# Copyright (C) 2014 by Michael Olbrich <m.olbrich@pengutronix.de>
> -#
> -# For further information about the PTXdist project and license conditions
> -# see the README file.
> -#
> -
> -#
> -# We provide this package
> -#
> -PACKAGES-$(PTXCONF_BLSPEC_ENTRY) += blspec-entry
> -
> -BLSPEC_ENTRY_VERSION	:= $(KERNEL_VERSION)
> -
> -# ----------------------------------------------------------------------------
> -# Target-Install
> -# ----------------------------------------------------------------------------
> -
> -BLSPEC_ENTRY_TITLE	:= PTXdist - $(call remove_quotes,$(PTXCONF_PROJECT_VENDOR)-$(PTXCONF_PROJECT))
> -ifdef PTXCONF_BLSPEC_ENTRY_DEVICETREE
> -BLSPEC_ENTRY_NAMES	= $(basename $(notdir $(KERNEL_DTS)))
> -blspec/title		= $(BLSPEC_ENTRY_TITLE) $(strip $(1))
> -blspec/devicetree	= devicetree\t/boot/$(strip $(1)).dtb
> -else
> -BLSPEC_ENTRY_NAMES	= default
> -blspec/title		= $(BLSPEC_ENTRY_TITLE)
> -blspec/devicetree	=
> -endif
> -BLSPEC_ENTRY_LICENSE	= ignore
> -
> -ifdef PTXCONF_KERNEL_FIT
> -BLSPEC_KERNEL_IMAGE	= linux.fit
> -else
> -BLSPEC_KERNEL_IMAGE	= $(KERNEL_IMAGE)
> -endif
> -
> -ifdef PTXCONF_BLSPEC_ENTRY_APPENDROOT
> -BLSPEC_APPENDROOT	= linux-appendroot\ttrue
> -else
> -BLSPEC_APPENDROOT	=
> -endif
> -
> -$(STATEDIR)/blspec-entry.targetinstall:
> -	@$(call targetinfo)
> -
> -	@$(call install_init, blspec-entry)
> -	@$(call install_fixup,blspec-entry,PRIORITY,optional)
> -	@$(call install_fixup,blspec-entry,SECTION,base)
> -	@$(call install_fixup,blspec-entry,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
> -	@$(call install_fixup,blspec-entry,DESCRIPTION,missing)
> -
> -	@$(foreach name, $(BLSPEC_ENTRY_NAMES), \
> -		$(call install_alternative, blspec-entry, 0, 0, 0644, \
> -			/loader/entries/default.conf,n,/loader/entries/$(name).conf)$(ptx/nl) \
> -		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
> -			@TITLE@,'$(call blspec/title,$(name))')$(ptx/nl) \
> -		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
> -			@VERSION@,'$(BLSPEC_ENTRY_VERSION)')$(ptx/nl) \
> -		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
> -			@CMDLINE@,$(PTXCONF_BLSPEC_ENTRY_CMDLINE))$(ptx/nl) \
> -		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
> -			@KERNEL@,'/boot/$(BLSPEC_KERNEL_IMAGE)')$(ptx/nl) \
> -		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
> -			@DEVICETREE@,'$(call blspec/devicetree,$(name))')$(ptx/nl) \
> -		$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
> -			@LINUXAPPENDROOT@,'$(BLSPEC_APPENDROOT)')$(ptx/nl))
> -
> -	@$(call install_finish,blspec-entry)
> -
> -	@$(call touch)
> -
> -# vim: syntax=make
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit]  [PATCH 02/12] tf-a: update from v2.8 → v2.10
  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
  0 siblings, 1 reply; 27+ messages in thread
From: Alexander Dahl @ 2024-04-24 11:15 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

Hello Ahmad,

Am Freitag, 15. März 2024, 22:12:30 CEST schrieb Ahmad Fatoum:
> This lets us git rid of a fair number of patches we have, but in return
> requires us to import three patches:
> 
>   - Fix link error for imx8mq-evk: The image got too big with addition
>     of DRAM retention support, so this is now disabled by default:
>     https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/27277
> 
>   - Support for automatic console base detection on i.MX8MQ. This was
>     already in our patch stack, but wasn't submitted upstream, unlike
>     the support for i.MX8MM, i.MX8MN and i.MXP. This has been rectified:
>     https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/27278
> 
>   - STM32MP1 support with SP_min as BL31 instead of OP-TEE is broken
>     since v2.10 was first released. This is due to PMU changes that
>     were apparently only tested on ARMv8. Fixed here:
>     https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/27162
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-v7a/platformconfig           |   4 +-
>  configs/platform-v8a/platformconfig           |   4 +-
>  ...DRAM-retention-by-default-on-i.MX8MQ.patch | 182 +++++++++++
>  ...kage-on-ARMv7-CPUs-with-SP_min-as-BL.patch |  61 ++++
>  ...ct-console-base-address-during-runti.patch |  69 ++++
>  ...mx-disable-DRAM-retention-by-default.patch | 174 ++++++++++
>  ...ct-console-base-address-during-runti.patch |  72 +++++
>  ...kage-on-ARMv7-CPUs-with-SP_min-as-BL.patch |  57 ++++
>  ...tomers-pengutronix-distrokit-2024031.patch |  21 ++
>  patches/tf-a-v2.10/series                     |  19 ++
>  ...-add-helper-to-detect-linker-options.patch |  35 --
>  ...dd-support-for-new-binutils-versions.patch |  54 ----
>  ...-IMX_BOOT_UART_BASE-configurable-via.patch |  41 ---
>  ...remove-empty-bl31_plat_runtime_setup.patch |  30 --
>  ...03-feat-imx8mq-always-set-up-console.patch |  51 ---
>  ...imx8mq-make-use-of-setup_page_tables.patch |  53 ---
>  ...-refactor-imx8mq-introduce-BL31_SIZE.patch |  54 ----
>  ...106-feat-imx8mq-add-BL31-PIE-support.patch |  55 ----
>  ...feat-imx8mq-add-support-for-gcc-12.x.patch |  45 ---
>  ...t-console-base-address-during-runtim.patch | 304 ------------------
>  ...MX_BOOT_UART_BASE-autodetection-opti.patch | 172 ----------
>  ...omers-pengutronix-distrokit-20240117.patch |  21 --
>  patches/tf-a-v2.8/series                      |  27 --
>  23 files changed, 659 insertions(+), 946 deletions(-)
>  create mode 100644
> patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8M
> Q.patch create mode 100644
> patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-B
> L.patch create mode 100644
> patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-runt
> i.patch create mode 100644
> patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch create
> mode 100644
> patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-runt
> i.patch create mode 100644
> patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-B
> L.patch create mode 100644
> patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-202403
> 1.patch create mode 100644 patches/tf-a-v2.10/series
>  delete mode 100644
> patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options.p
> atch delete mode 100644
> patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.pat
> ch delete mode 100644
> patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via
> .patch delete mode 100644
> patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.pat
> ch delete mode 100644
> patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch delete mode
> 100644
> patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patch
> delete mode 100644
> patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch delete
> mode 100644 patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
> delete mode 100644
> patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch delete
> mode 100644
> patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runtim
> .patch delete mode 100644
> patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti
> .patch delete mode 100644
> patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-20240117
> .patch delete mode 100644 patches/tf-a-v2.8/series
> 
> diff --git a/configs/platform-v7a/platformconfig
> b/configs/platform-v7a/platformconfig index f2b4d2b7a922..80632f625c9b
> 100644
> --- a/configs/platform-v7a/platformconfig
> +++ b/configs/platform-v7a/platformconfig
> @@ -202,8 +202,8 @@ PTXCONF_BOOTLOADER=y
>  # PTXCONF_OPTEE is not set
>  PTXCONF_TF_A=y
>  PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.g
> it/snapshot" -PTXCONF_TF_A_VERSION="v2.8"
> -PTXCONF_TF_A_MD5="784a1e94d4b1e938927372e3bc12d12e"
> +PTXCONF_TF_A_VERSION="v2.10"
> +PTXCONF_TF_A_MD5="641f42080967e05d687ef2fa9f8f3bc3"
>  PTXCONF_TF_A_ARCH_STRING="aarch32"
>  PTXCONF_TF_A_ARM_ARCH_MAJOR_7=y
>  # PTXCONF_TF_A_ARM_ARCH_MAJOR_8_32_BIT is not set
> diff --git a/configs/platform-v8a/platformconfig
> b/configs/platform-v8a/platformconfig index f9168a8bc599..675874fc4a3c
> 100644
> --- a/configs/platform-v8a/platformconfig
> +++ b/configs/platform-v8a/platformconfig
> @@ -206,8 +206,8 @@ PTXCONF_BOOTLOADER=y
>  # PTXCONF_HOST_MXS_UTILS is not set
>  PTXCONF_TF_A=y
>  PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.g
> it/snapshot" -PTXCONF_TF_A_VERSION="v2.8"
> -PTXCONF_TF_A_MD5="784a1e94d4b1e938927372e3bc12d12e"
> +PTXCONF_TF_A_VERSION="v2.10"
> +PTXCONF_TF_A_MD5="641f42080967e05d687ef2fa9f8f3bc3"

Download fails like this:


-------------------------
target: tf-a-v2.10.tar.gz
-------------------------

--2024-04-24 13:09:40--  https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/v2.10.tar.gz
Resolving git.trustedfirmware.org (git.trustedfirmware.org)... 51.159.18.17
Connecting to git.trustedfirmware.org (git.trustedfirmware.org)|51.159.18.17|:
443... connected.
HTTP request sent, awaiting response... 401 Unauthorized

Username/Password Authentication Failed.
--2024-04-24 13:09:40--  http://www.pengutronix.de/software/ptxdist/temporary-src/tf-a-v2.10.tar.gz
Resolving www.pengutronix.de (www.pengutronix.de)... 2a01:4f9:2a:
2c17:5054:ff:fe65:8c93, 95.216.103.100
Connecting to www.pengutronix.de (www.pengutronix.de)|2a01:4f9:2a:
2c17:5054:ff:fe65:8c93|:80... connected.
HTTP request sent, awaiting response... 307 Temporary Redirect
Location: https://www.pengutronix.de/software/ptxdist/temporary-src/tf-a-v2.10.tar.gz [following]
--2024-04-24 13:09:40--  https://www.pengutronix.de/software/ptxdist/
temporary-src/tf-a-v2.10.tar.gz
Connecting to www.pengutronix.de (www.pengutronix.de)|2a01:4f9:2a:
2c17:5054:ff:fe65:8c93|:443... connected.
HTTP request sent, awaiting response... 307 Temporary Redirect
Location: https://public.pengutronix.de/mirror/software/ptxdist/temporary-src/
tf-a-v2.10.tar.gz [following]
--2024-04-24 13:09:41--  https://public.pengutronix.de/mirror/software/
ptxdist/temporary-src/tf-a-v2.10.tar.gz
Resolving public.pengutronix.de (public.pengutronix.de)... 2a01:4f9:2a:
2c17:5054:ff:fe65:8c93, 95.216.103.100
Connecting to public.pengutronix.de (public.pengutronix.de)|2a01:4f9:2a:
2c17:5054:ff:fe65:8c93|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-04-24 13:09:41 ERROR 404: Not Found.


Could not download package
URL: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/
v2.10.tar.gz

make: *** [/usr/local/lib/ptxdist-2024.03.0/rules/post/
ptxd_make_world_get.make:16: /home/adahl/mnt/bagend-src_archive/tf-a-
v2.10.tar.gz] Error 1


Greets
Alex

>  PTXCONF_TF_A_ARCH_STRING="aarch64"
>  PTXCONF_TF_A_ARM_ARCH_MAJOR_8=y
>  PTXCONF_TF_A_ARM_ARCH_MAJOR=8
> diff --git
> a/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX
> 8MQ.patch
> b/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX
> 8MQ.patch new file mode 100644
> index 000000000000..cab995bda37a
> --- /dev/null
> +++
> b/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX
> 8MQ.patch @@ -0,0 +1,182 @@
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Wed, 13 Mar 2024 08:08:13 +0100
> +Subject: [PATCH] fix(imx): disable DRAM retention by default on i.MX8MQ
> +
> +Building the default upstream configuration for the imx8mq-evk is no longer
> +possible: The linker will complain that the TF-A image would no longer
> +fit On-Chip SRAM.
> +
> +In order to make the i.MX8MQ Image buildable again, let's make the DRAM
> +retention feature optional: It was added in v2.9 and it's possible to
> +boot the systems without it. Users that make space elsewhere and wish to
> +enable it can use the newly introduced IMX_DRAM_RETENTION parameter to
> +configure it. The parameter is added to all i.MX8M variants, but only
> +for i.MX8MQ, we disable it by default, as that's the one that currently
> +has binary size problems.
> +
> +Change-Id: I714f8ea96f18154db02390ba500f4a2dc5329ee7
> +Fixes: dd108c3c1fe3 ("feat(imx8mq): add the dram retention support for
> imx8mq") +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +---
> + plat/imx/common/include/imx_sip_svc.h | 8 ++++++++
> + plat/imx/imx8m/imx8mm/platform.mk     | 9 ++++++++-
> + plat/imx/imx8m/imx8mn/platform.mk     | 9 ++++++++-
> + plat/imx/imx8m/imx8mp/platform.mk     | 9 ++++++++-
> + plat/imx/imx8m/imx8mq/platform.mk     | 9 ++++++++-
> + plat/imx/imx8m/include/dram.h         | 8 +++++++-
> + 6 files changed, 47 insertions(+), 5 deletions(-)
> +
> +diff --git a/plat/imx/common/include/imx_sip_svc.h
> b/plat/imx/common/include/imx_sip_svc.h +index 0e91c7174a52..5015eb6a1f11
> 100644
> +--- a/plat/imx/common/include/imx_sip_svc.h
> ++++ b/plat/imx/common/include/imx_sip_svc.h
> +@@ -57,8 +57,16 @@ int imx_soc_info_handler(uint32_t smc_fid, u_register_t
> x1, + 			 u_register_t x2, u_register_t x3);
> + int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
> + 		    u_register_t x2, u_register_t x3);
> ++#if IMX_DRAM_RETENTION
> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> + 	u_register_t x1, u_register_t x2, u_register_t x3);
> ++#else
> ++static inline int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> ++		u_register_t x1, u_register_t x2, u_register_t x3)
> ++{
> ++	SMC_RET1(handle, SMC_UNK);
> ++}
> ++#endif
> + #endif
> + #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> +diff --git a/plat/imx/imx8m/imx8mm/platform.mk
> b/plat/imx/imx8m/imx8mm/platform.mk +index 97f4f248824d..849ae5e4ca36
> 100644
> +--- a/plat/imx/imx8m/imx8mm/platform.mk
> ++++ b/plat/imx/imx8m/imx8mm/platform.mk
> +@@ -52,7 +52,6 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> + 				drivers/delay_timer/delay_timer.c		
\
> + 				drivers/delay_timer/
generic_delay_timer.c	\
> + 				${XLAT_TABLES_LIB_SRCS}		
		\
> +-				${IMX_DRAM_SOURCES}			
	\
> + 				${IMX_GIC_SOURCES}
> +
> + ifeq (${NEED_BL2},yes)
> +@@ -153,6 +152,14 @@ ERRATA_A53_835769	:=	1
> + ERRATA_A53_843419	:=	1
> + ERRATA_A53_855873	:=	1
> +
> ++IMX_DRAM_RETENTION	?=	1
> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> ++
> ++ifeq (${IMX_DRAM_RETENTION},1)
> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> ++endif
> ++
> + BL32_BASE		?=	0xbe000000
> + $(eval $(call add_define,BL32_BASE))
> +
> +diff --git a/plat/imx/imx8m/imx8mn/platform.mk
> b/plat/imx/imx8m/imx8mn/platform.mk +index e0826e29a88c..94d31a2681aa
> 100644
> +--- a/plat/imx/imx8m/imx8mn/platform.mk
> ++++ b/plat/imx/imx8m/imx8mn/platform.mk
> +@@ -46,7 +46,6 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> + 				drivers/arm/tzc/tzc380.c		
	\
> + 				drivers/delay_timer/delay_timer.c		
\
> + 				drivers/delay_timer/
generic_delay_timer.c	\
> +-				${IMX_DRAM_SOURCES}			
	\
> + 				${IMX_GIC_SOURCES}			
	\
> + 				${XLAT_TABLES_LIB_SRCS}
> +
> +@@ -59,6 +58,14 @@ ERRATA_A53_835769	:=	1
> + ERRATA_A53_843419	:=	1
> + ERRATA_A53_855873	:=	1
> +
> ++IMX_DRAM_RETENTION	?=	1
> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> ++
> ++ifeq (${IMX_DRAM_RETENTION},1)
> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> ++endif
> ++
> + BL32_BASE		?=	0xbe000000
> + $(eval $(call add_define,BL32_BASE))
> +
> +diff --git a/plat/imx/imx8m/imx8mp/platform.mk
> b/plat/imx/imx8m/imx8mp/platform.mk +index ce6907195152..1f699c4f26f0
> 100644
> +--- a/plat/imx/imx8m/imx8mp/platform.mk
> ++++ b/plat/imx/imx8m/imx8mp/platform.mk
> +@@ -47,7 +47,6 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> + 				drivers/arm/tzc/tzc380.c		
	\
> + 				drivers/delay_timer/delay_timer.c		
\
> + 				drivers/delay_timer/
generic_delay_timer.c	\
> +-				${IMX_DRAM_SOURCES}			
	\
> + 				${IMX_GIC_SOURCES}			
	\
> + 				${XLAT_TABLES_LIB_SRCS}
> +
> +@@ -150,6 +149,14 @@ ERRATA_A53_835769	:=	1
> + ERRATA_A53_843419	:=	1
> + ERRATA_A53_855873	:=	1
> +
> ++IMX_DRAM_RETENTION	?=	1
> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> ++
> ++ifeq (${IMX_DRAM_RETENTION},1)
> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> ++endif
> ++
> + BL32_BASE		?=	0x56000000
> + $(eval $(call add_define,BL32_BASE))
> +
> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> b/plat/imx/imx8m/imx8mq/platform.mk +index b1c189fa09f5..b48449725791
> 100644
> +--- a/plat/imx/imx8m/imx8mq/platform.mk
> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
> +@@ -42,7 +42,6 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> + 				drivers/delay_timer/delay_timer.c		
\
> + 				drivers/delay_timer/
generic_delay_timer.c	\
> + 				${XLAT_TABLES_LIB_SRCS}		
		\
> +-				${IMX_DRAM_SOURCES}			
	\
> + 				${IMX_GIC_SOURCES}
> +
> + ENABLE_PIE		:=	1
> +@@ -55,6 +54,14 @@ ERRATA_A53_835769	:=	1
> + ERRATA_A53_843419	:=	1
> + ERRATA_A53_855873	:=	1
> +
> ++IMX_DRAM_RETENTION	?=	0
> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> ++
> ++ifeq (${IMX_DRAM_RETENTION},1)
> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> ++endif
> ++
> + BL32_BASE		?=	0xfe000000
> + $(eval $(call add_define,BL32_BASE))
> +
> +diff --git a/plat/imx/imx8m/include/dram.h b/plat/imx/imx8m/include/dram.h
> +index 719c39063778..1cf0666e9cad 100644
> +--- a/plat/imx/imx8m/include/dram.h
> ++++ b/plat/imx/imx8m/include/dram.h
> +@@ -70,13 +70,19 @@ struct dram_info {
> +
> + extern struct dram_info dram_info;
> +
> +-void dram_info_init(unsigned long dram_timing_base);
> + void dram_umctl2_init(struct dram_timing_info *timing);
> + void dram_phy_init(struct dram_timing_info *timing);
> +
> + /* dram retention */
> ++#if IMX_DRAM_RETENTION
> ++void dram_info_init(unsigned long dram_timing_base);
> + void dram_enter_retention(void);
> + void dram_exit_retention(void);
> ++#else
> ++static inline void dram_info_init(unsigned long dram_timing_base) {}
> ++static inline void dram_enter_retention(void) {}
> ++static inline void dram_exit_retention(void) {}
> ++#endif
> +
> + void dram_clock_switch(unsigned int target_drate, bool bypass_mode);
> +
> diff --git
> a/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
> -BL.patch
> b/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
> -BL.patch new file mode 100644
> index 000000000000..745e171b40e3
> --- /dev/null
> +++
> b/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
> -BL.patch @@ -0,0 +1,61 @@
> +From 44f35b67ee4f89b05408ecfe7b4b2c1ae5366b72 Mon Sep 17 00:00:00 2001
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Tue, 12 Mar 2024 18:36:46 +0100
> +Subject: [PATCH 1/3] fix(pmu): fix breakage on ARMv7 CPUs with SP_min as
> BL32 +
> +While comments introduced with the original commit claim that
> +pmuv3_disable_el3()/pmuv3_init_el3() are compatible with PMUv2 and
> +PMUv1, this is not true in practice: The function accesses the Secure
> +Debug Control Register (SDCR), which only available to ARMv8 CPUs.
> +
> +ARMv8 CPUs executing in AArch32 mode would thus be able to disable
> +their PMUv3, while ARMv7 CPUs would hang trying to access the SDCR.
> +
> +Fix this by only doing PMUv3 handling when we know a PMUv3 to be
> +available. This resolves boot hanging on all STM32MP15 platforms
> +that use SP_min as BL32 instead of OP-TEE.
> +
> +Change-Id: I40f7611cf46b89a30243cc55bf55a8d9c9de93c8
> +Fixes: c73686a11cea ("feat(pmu): introduce pmuv3 lib/extensions folder")
> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +---
> + lib/el3_runtime/aarch32/context_mgmt.c | 7 ++-----
> + lib/extensions/pmuv3/aarch32/pmuv3.c   | 4 ----
> + 2 files changed, 2 insertions(+), 9 deletions(-)
> +
> +diff --git a/lib/el3_runtime/aarch32/context_mgmt.c
> b/lib/el3_runtime/aarch32/context_mgmt.c +index b60b8e0f05d0..72af43d3dcb0
> 100644
> +--- a/lib/el3_runtime/aarch32/context_mgmt.c
> ++++ b/lib/el3_runtime/aarch32/context_mgmt.c
> +@@ -149,11 +149,8 @@ static void enable_extensions_nonsecure(bool
> el2_unused) + 		trf_init_el3();
> + 	}
> +
> +-	/*
> +-	 * Also applies to PMU < v3. The PMU is only disabled for EL3 and 
Secure
> +-	 * state execution. This does not affect lower NS ELs.
> +-	 */
> +-	pmuv3_init_el3();
> ++	if (read_feat_pmuv3_id_field() >= 3)
> ++		pmuv3_init_el3();
> + #endif /*  IMAGE_BL32 */
> + }
> +
> +diff --git a/lib/extensions/pmuv3/aarch32/pmuv3.c
> b/lib/extensions/pmuv3/aarch32/pmuv3.c +index effb7e02dc29..456a48efb0fb
> 100644
> +--- a/lib/extensions/pmuv3/aarch32/pmuv3.c
> ++++ b/lib/extensions/pmuv3/aarch32/pmuv3.c
> +@@ -25,10 +25,6 @@ static u_register_t mtpmu_disable_el3(u_register_t sdcr)
> + 	return sdcr;
> + }
> +
> +-/*
> +- * Applies to all PMU versions. Name is PMUv3 for compatibility with
> aarch64 and +- * to not clash with platforms which reuse the PMU name
> +- */
> + void pmuv3_init_el3(void)
> + {
> + 	u_register_t sdcr = read_sdcr();
> +--
> +2.39.2
> +
> diff --git
> a/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-ru
> nti.patch
> b/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-ru
> nti.patch new file mode 100644
> index 000000000000..c48833730753
> --- /dev/null
> +++
> b/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-ru
> nti.patch @@ -0,0 +1,69 @@
> +From aeb68be64c5c47142de3c95a8961749f7b33030a Mon Sep 17 00:00:00 2001
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Wed, 13 Mar 2024 02:08:54 +0100
> +Subject: [PATCH 2/3] feat(imx8mq): detect console base address during
> runtime +
> +Change-Id: I9ba70f7068e762da979bd103390fa006c3a5d480
> +---
> + plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 8 +++++++-
> + plat/imx/imx8m/imx8mq/platform.mk         | 4 ++++
> + 2 files changed, 11 insertions(+), 1 deletion(-)
> +
> +diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c +index
> 7065a658614f..70c2def7d18b 100644
> +--- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> ++++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> +@@ -26,6 +26,7 @@
> + #include <imx_aipstz.h>
> + #include <imx_uart.h>
> + #include <imx8m_caam.h>
> ++#include <imx8m_ccm.h>
> + #include <plat_imx8.h>
> +
> + #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
> +@@ -145,6 +146,7 @@ static void bl31_tz380_setup(void)
> + void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> + 			u_register_t arg2, u_register_t arg3)
> + {
> ++	unsigned int console_base = IMX_BOOT_UART_BASE;
> + 	static console_t console;
> + 	int i;
> + 	/* enable CSU NS access permission */
> +@@ -154,7 +156,11 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, +
> + 	imx_aipstz_init(aipstz);
> +
> +-	console_imx_uart_register(IMX_BOOT_UART_BASE, 
IMX_BOOT_UART_CLK_IN_HZ,
> ++	if (console_base == 0U) {
> ++		console_base = imx8m_uart_get_base();
> ++	}
> ++
> ++	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> + 		IMX_CONSOLE_BAUDRATE, &console);
> + 	/* This console is only used for boot stage */
> + 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> b/plat/imx/imx8m/imx8mq/platform.mk +index b1c189fa09f5..648159eb3d10
> 100644
> +--- a/plat/imx/imx8m/imx8mq/platform.mk
> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
> +@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> + 				plat/imx/imx8m/gpc_common.c		
	\
> + 				plat/imx/imx8m/imx_aipstz.c		
	\
> + 				plat/imx/imx8m/imx8m_caam.c		
	\
> ++				plat/imx/imx8m/imx8m_ccm.c		
	\
> + 				plat/imx/imx8m/imx8m_psci_common.c	
	\
> + 				plat/imx/imx8m/imx8mq/gpc.c		
	\
> + 				plat/imx/common/imx8_topology.c		
	\
> +@@ -62,6 +63,9 @@ BL32_SIZE		?=	0x2000000
> + $(eval $(call add_define,BL32_SIZE))
> +
> + IMX_BOOT_UART_BASE	?=	0x30860000
> ++ifeq (${IMX_BOOT_UART_BASE},auto)
> ++    override IMX_BOOT_UART_BASE	:=	0
> ++endif
> + $(eval $(call add_define,IMX_BOOT_UART_BASE))
> +
> + ifeq (${SPD},trusty)
> +--
> +2.39.2
> +
> diff --git
> a/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
> b/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch new
> file mode 100644
> index 000000000000..7d2b36119599
> --- /dev/null
> +++ b/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
> @@ -0,0 +1,174 @@
> +From 5d2f3f48a66a1f3f90d35679920832569100ed35 Mon Sep 17 00:00:00 2001
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Wed, 13 Mar 2024 08:08:13 +0100
> +Subject: [PATCH 3/3] imx: disable DRAM retention by default
> +
> +Building the default upstream configuration is no longer possible
> +
> +Change-Id: I714f8ea96f18154db02390ba500f4a2dc5329ee7
> +---
> + plat/imx/common/include/imx_sip_svc.h | 8 ++++++++
> + plat/imx/imx8m/imx8mm/platform.mk     | 9 ++++++++-
> + plat/imx/imx8m/imx8mn/platform.mk     | 9 ++++++++-
> + plat/imx/imx8m/imx8mp/platform.mk     | 9 ++++++++-
> + plat/imx/imx8m/imx8mq/platform.mk     | 9 ++++++++-
> + plat/imx/imx8m/include/dram.h         | 8 +++++++-
> + 6 files changed, 47 insertions(+), 5 deletions(-)
> +
> +diff --git a/plat/imx/common/include/imx_sip_svc.h
> b/plat/imx/common/include/imx_sip_svc.h +index 0e91c7174a52..5015eb6a1f11
> 100644
> +--- a/plat/imx/common/include/imx_sip_svc.h
> ++++ b/plat/imx/common/include/imx_sip_svc.h
> +@@ -57,8 +57,16 @@ int imx_soc_info_handler(uint32_t smc_fid, u_register_t
> x1, + 			 u_register_t x2, u_register_t x3);
> + int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
> + 		    u_register_t x2, u_register_t x3);
> ++#if IMX_DRAM_RETENTION
> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> + 	u_register_t x1, u_register_t x2, u_register_t x3);
> ++#else
> ++static inline int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> ++		u_register_t x1, u_register_t x2, u_register_t x3)
> ++{
> ++	SMC_RET1(handle, SMC_UNK);
> ++}
> ++#endif
> + #endif
> + #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> +diff --git a/plat/imx/imx8m/imx8mm/platform.mk
> b/plat/imx/imx8m/imx8mm/platform.mk +index 97f4f248824d..849ae5e4ca36
> 100644
> +--- a/plat/imx/imx8m/imx8mm/platform.mk
> ++++ b/plat/imx/imx8m/imx8mm/platform.mk
> +@@ -52,7 +52,6 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> + 				drivers/delay_timer/delay_timer.c		
\
> + 				drivers/delay_timer/
generic_delay_timer.c	\
> + 				${XLAT_TABLES_LIB_SRCS}		
		\
> +-				${IMX_DRAM_SOURCES}			
	\
> + 				${IMX_GIC_SOURCES}
> +
> + ifeq (${NEED_BL2},yes)
> +@@ -153,6 +152,14 @@ ERRATA_A53_835769	:=	1
> + ERRATA_A53_843419	:=	1
> + ERRATA_A53_855873	:=	1
> +
> ++IMX_DRAM_RETENTION	?=	1
> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> ++
> ++ifeq (${IMX_DRAM_RETENTION},1)
> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> ++endif
> ++
> + BL32_BASE		?=	0xbe000000
> + $(eval $(call add_define,BL32_BASE))
> +
> +diff --git a/plat/imx/imx8m/imx8mn/platform.mk
> b/plat/imx/imx8m/imx8mn/platform.mk +index e0826e29a88c..94d31a2681aa
> 100644
> +--- a/plat/imx/imx8m/imx8mn/platform.mk
> ++++ b/plat/imx/imx8m/imx8mn/platform.mk
> +@@ -46,7 +46,6 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> + 				drivers/arm/tzc/tzc380.c		
	\
> + 				drivers/delay_timer/delay_timer.c		
\
> + 				drivers/delay_timer/
generic_delay_timer.c	\
> +-				${IMX_DRAM_SOURCES}			
	\
> + 				${IMX_GIC_SOURCES}			
	\
> + 				${XLAT_TABLES_LIB_SRCS}
> +
> +@@ -59,6 +58,14 @@ ERRATA_A53_835769	:=	1
> + ERRATA_A53_843419	:=	1
> + ERRATA_A53_855873	:=	1
> +
> ++IMX_DRAM_RETENTION	?=	1
> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> ++
> ++ifeq (${IMX_DRAM_RETENTION},1)
> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> ++endif
> ++
> + BL32_BASE		?=	0xbe000000
> + $(eval $(call add_define,BL32_BASE))
> +
> +diff --git a/plat/imx/imx8m/imx8mp/platform.mk
> b/plat/imx/imx8m/imx8mp/platform.mk +index ce6907195152..1f699c4f26f0
> 100644
> +--- a/plat/imx/imx8m/imx8mp/platform.mk
> ++++ b/plat/imx/imx8m/imx8mp/platform.mk
> +@@ -47,7 +47,6 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> + 				drivers/arm/tzc/tzc380.c		
	\
> + 				drivers/delay_timer/delay_timer.c		
\
> + 				drivers/delay_timer/
generic_delay_timer.c	\
> +-				${IMX_DRAM_SOURCES}			
	\
> + 				${IMX_GIC_SOURCES}			
	\
> + 				${XLAT_TABLES_LIB_SRCS}
> +
> +@@ -150,6 +149,14 @@ ERRATA_A53_835769	:=	1
> + ERRATA_A53_843419	:=	1
> + ERRATA_A53_855873	:=	1
> +
> ++IMX_DRAM_RETENTION	?=	1
> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> ++
> ++ifeq (${IMX_DRAM_RETENTION},1)
> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> ++endif
> ++
> + BL32_BASE		?=	0x56000000
> + $(eval $(call add_define,BL32_BASE))
> +
> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> b/plat/imx/imx8m/imx8mq/platform.mk +index 648159eb3d10..f61620bd4224
> 100644
> +--- a/plat/imx/imx8m/imx8mq/platform.mk
> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
> +@@ -43,7 +43,6 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> + 				drivers/delay_timer/delay_timer.c		
\
> + 				drivers/delay_timer/
generic_delay_timer.c	\
> + 				${XLAT_TABLES_LIB_SRCS}		
		\
> +-				${IMX_DRAM_SOURCES}			
	\
> + 				${IMX_GIC_SOURCES}
> +
> + ENABLE_PIE		:=	1
> +@@ -56,6 +55,14 @@ ERRATA_A53_835769	:=	1
> + ERRATA_A53_843419	:=	1
> + ERRATA_A53_855873	:=	1
> +
> ++IMX_DRAM_RETENTION	?=	0
> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> ++
> ++ifeq (${IMX_DRAM_RETENTION},1)
> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> ++endif
> ++
> + BL32_BASE		?=	0xfe000000
> + $(eval $(call add_define,BL32_BASE))
> +
> +diff --git a/plat/imx/imx8m/include/dram.h b/plat/imx/imx8m/include/dram.h
> +index 719c39063778..1cf0666e9cad 100644
> +--- a/plat/imx/imx8m/include/dram.h
> ++++ b/plat/imx/imx8m/include/dram.h
> +@@ -70,13 +70,19 @@ struct dram_info {
> +
> + extern struct dram_info dram_info;
> +
> +-void dram_info_init(unsigned long dram_timing_base);
> + void dram_umctl2_init(struct dram_timing_info *timing);
> + void dram_phy_init(struct dram_timing_info *timing);
> +
> + /* dram retention */
> ++#if IMX_DRAM_RETENTION
> ++void dram_info_init(unsigned long dram_timing_base);
> + void dram_enter_retention(void);
> + void dram_exit_retention(void);
> ++#else
> ++static inline void dram_info_init(unsigned long dram_timing_base) {}
> ++static inline void dram_enter_retention(void) {}
> ++static inline void dram_exit_retention(void) {}
> ++#endif
> +
> + void dram_clock_switch(unsigned int target_drate, bool bypass_mode);
> +
> +--
> +2.39.2
> +
> diff --git
> a/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-ru
> nti.patch
> b/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-ru
> nti.patch new file mode 100644
> index 000000000000..d375a45c1598
> --- /dev/null
> +++
> b/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-ru
> nti.patch @@ -0,0 +1,72 @@
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Wed, 13 Mar 2024 02:08:54 +0100
> +Subject: [PATCH] feat(imx8mq): detect console base address during runtime
> +
> +On the i.MX8M SoCs, TF-A doesn't itself initialize the UART, but depends
> +on BL2 to set it up beforehand. To allow using the same TF-A binary on
> +boards with different UART assignment, TF-A On i.MX8M M/N/P supports
> +dynamically determining the UART in use. The code is also applicable to
> +the i.MX8MQ, so enable it there too.
> +
> +Change-Id: I9ba70f7068e762da979bd103390fa006c3a5d480
> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +---
> + plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 8 +++++++-
> + plat/imx/imx8m/imx8mq/platform.mk         | 4 ++++
> + 2 files changed, 11 insertions(+), 1 deletion(-)
> +
> +diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c +index
> 7065a658614f..70c2def7d18b 100644
> +--- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> ++++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> +@@ -26,6 +26,7 @@
> + #include <imx_aipstz.h>
> + #include <imx_uart.h>
> + #include <imx8m_caam.h>
> ++#include <imx8m_ccm.h>
> + #include <plat_imx8.h>
> +
> + #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
> +@@ -145,6 +146,7 @@ static void bl31_tz380_setup(void)
> + void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> + 			u_register_t arg2, u_register_t arg3)
> + {
> ++	unsigned int console_base = IMX_BOOT_UART_BASE;
> + 	static console_t console;
> + 	int i;
> + 	/* enable CSU NS access permission */
> +@@ -154,7 +156,11 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, +
> + 	imx_aipstz_init(aipstz);
> +
> +-	console_imx_uart_register(IMX_BOOT_UART_BASE, 
IMX_BOOT_UART_CLK_IN_HZ,
> ++	if (console_base == 0U) {
> ++		console_base = imx8m_uart_get_base();
> ++	}
> ++
> ++	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> + 		IMX_CONSOLE_BAUDRATE, &console);
> + 	/* This console is only used for boot stage */
> + 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> b/plat/imx/imx8m/imx8mq/platform.mk +index b48449725791..f61620bd4224
> 100644
> +--- a/plat/imx/imx8m/imx8mq/platform.mk
> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
> +@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> + 				plat/imx/imx8m/gpc_common.c		
	\
> + 				plat/imx/imx8m/imx_aipstz.c		
	\
> + 				plat/imx/imx8m/imx8m_caam.c		
	\
> ++				plat/imx/imx8m/imx8m_ccm.c		
	\
> + 				plat/imx/imx8m/imx8m_psci_common.c	
	\
> + 				plat/imx/imx8m/imx8mq/gpc.c		
	\
> + 				plat/imx/common/imx8_topology.c		
	\
> +@@ -69,6 +70,9 @@ BL32_SIZE		?=	0x2000000
> + $(eval $(call add_define,BL32_SIZE))
> +
> + IMX_BOOT_UART_BASE	?=	0x30860000
> ++ifeq (${IMX_BOOT_UART_BASE},auto)
> ++    override IMX_BOOT_UART_BASE	:=	0
> ++endif
> + $(eval $(call add_define,IMX_BOOT_UART_BASE))
> +
> + ifeq (${SPD},trusty)
> diff --git
> a/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
> -BL.patch
> b/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
> -BL.patch new file mode 100644
> index 000000000000..60abc4862d7c
> --- /dev/null
> +++
> b/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
> -BL.patch @@ -0,0 +1,57 @@
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Tue, 12 Mar 2024 18:36:46 +0100
> +Subject: [PATCH] fix(pmu): fix breakage on ARMv7 CPUs with SP_min as BL32
> +
> +While comments introduced with the original commit claim that
> +pmuv3_disable_el3()/pmuv3_init_el3() are compatible with PMUv2 and
> +PMUv1, this is not true in practice: The function accesses the Secure
> +Debug Control Register (SDCR), which only available to ARMv8 CPUs.
> +
> +ARMv8 CPUs executing in AArch32 mode would thus be able to disable
> +their PMUv3, while ARMv7 CPUs would hang trying to access the SDCR.
> +
> +Fix this by only doing PMUv3 handling when we know a PMUv3 to be
> +available. This resolves boot hanging on all STM32MP15 platforms
> +that use SP_min as BL32 instead of OP-TEE.
> +
> +Change-Id: I40f7611cf46b89a30243cc55bf55a8d9c9de93c8
> +Fixes: c73686a11cea ("feat(pmu): introduce pmuv3 lib/extensions folder")
> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +---
> + lib/el3_runtime/aarch32/context_mgmt.c | 7 ++-----
> + lib/extensions/pmuv3/aarch32/pmuv3.c   | 4 ----
> + 2 files changed, 2 insertions(+), 9 deletions(-)
> +
> +diff --git a/lib/el3_runtime/aarch32/context_mgmt.c
> b/lib/el3_runtime/aarch32/context_mgmt.c +index b60b8e0f05d0..72af43d3dcb0
> 100644
> +--- a/lib/el3_runtime/aarch32/context_mgmt.c
> ++++ b/lib/el3_runtime/aarch32/context_mgmt.c
> +@@ -149,11 +149,8 @@ static void enable_extensions_nonsecure(bool
> el2_unused) + 		trf_init_el3();
> + 	}
> +
> +-	/*
> +-	 * Also applies to PMU < v3. The PMU is only disabled for EL3 and 
Secure
> +-	 * state execution. This does not affect lower NS ELs.
> +-	 */
> +-	pmuv3_init_el3();
> ++	if (read_feat_pmuv3_id_field() >= 3)
> ++		pmuv3_init_el3();
> + #endif /*  IMAGE_BL32 */
> + }
> +
> +diff --git a/lib/extensions/pmuv3/aarch32/pmuv3.c
> b/lib/extensions/pmuv3/aarch32/pmuv3.c +index effb7e02dc29..456a48efb0fb
> 100644
> +--- a/lib/extensions/pmuv3/aarch32/pmuv3.c
> ++++ b/lib/extensions/pmuv3/aarch32/pmuv3.c
> +@@ -25,10 +25,6 @@ static u_register_t mtpmu_disable_el3(u_register_t sdcr)
> + 	return sdcr;
> + }
> +
> +-/*
> +- * Applies to all PMU versions. Name is PMUv3 for compatibility with
> aarch64 and +- * to not clash with platforms which reuse the PMU name
> +- */
> + void pmuv3_init_el3(void)
> + {
> + 	u_register_t sdcr = read_sdcr();
> diff --git
> a/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024
> 031.patch
> b/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024
> 031.patch new file mode 100644
> index 000000000000..58cbc06803cb
> --- /dev/null
> +++
> b/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024
> 031.patch @@ -0,0 +1,21 @@
> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> +Date: Fri, 15 Mar 2024 21:18:29 +0100
> +Subject: [PATCH] Release 2.10/customers/pengutronix/distrokit/20240315-1
> +
> +---
> + Makefile | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 97c3c1548a78..56556db0be78 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -222,7 +222,7 @@ endif #(Debug)
> + ifeq (${BUILD_STRING},)
> + 	BUILD_STRING  :=  $(shell git describe --always --dirty --tags 2>
> /dev/null) + endif
> +-VERSION_STRING    :=  v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}
> ++VERSION_STRING    := 
> v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}-20240315-1 +
> + ifeq (${AARCH32_INSTRUCTION_SET},A32)
> + 	TF_CFLAGS_aarch32	+=	-marm
> diff --git a/patches/tf-a-v2.10/series b/patches/tf-a-v2.10/series
> new file mode 100644
> index 000000000000..4dd620f0aa06
> --- /dev/null
> +++ b/patches/tf-a-v2.10/series
> @@ -0,0 +1,19 @@
> +# umpf-base: v2.10
> +# umpf-name: 2.10/customers/pengutronix/distrokit
> +# umpf-version: 2.10/customers/pengutronix/distrokit/20240315-1
> +# umpf-topic: v2.10/topic/imx8mq-size
> +# umpf-hashinfo: a972970be20be852b0d48576dfb1c233612efbdd
> +# umpf-topic-range:
> b6c0948400594e3cc4dbb5a4ef04b815d2675808..6c0660bf6047f288628c282e44b9b1b06
> bd1d33a +0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8MQ.patch
> +# umpf-topic: v2.10/topic/imx8mq-console
> +# umpf-hashinfo: 252b1100fb3c424e0fe1043e60414c3d7e0fa675
> +# umpf-topic-range:
> 6c0660bf6047f288628c282e44b9b1b06bd1d33a..ec9b46be3c0c561ed61f113dc3c15085d
> bce5bf7 +0101-feat-imx8mq-detect-console-base-address-during-runti.patch
> +# umpf-topic: v2.10/topic/stm32mp1
> +# umpf-hashinfo: 44f35b67ee4f89b05408ecfe7b4b2c1ae5366b72
> +# umpf-topic-range:
> ec9b46be3c0c561ed61f113dc3c15085dbce5bf7..10dfac53fdfff2f98d8140863f583df47
> 2483f1d +0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
> +# umpf-release: 2.10/customers/pengutronix/distrokit/20240315-1
> +# umpf-topic-range:
> 10dfac53fdfff2f98d8140863f583df472483f1d..288664026c3117bda3f8f2275e76bb97b
> e116b89 +0301-Release-2.10-customers-pengutronix-distrokit-2024031.patch
> +# umpf-end
> diff --git
> a/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options
> .patch
> b/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options
> .patch deleted file mode 100644
> index e86f31b8858a..000000000000
> ---
> a/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options
> .patch +++ /dev/null
> @@ -1,35 +0,0 @@
> -From: Marco Felsch <m.felsch@pengutronix.de>
> -Date: Thu, 24 Nov 2022 11:02:05 +0100
> -Subject: [PATCH] build(makefile): add helper to detect linker options
> -
> -This is a small helper to check for possible linker options. If the
> -linker supports the requested option it is returned and if not nothing
> -will be returned, e.g.:
> -
> -  TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
> -
> -can be called unconditional.
> -
> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> -Change-Id: I236800852ece49948ff53a0b91fddba53c8f0f95
> ----
> - make_helpers/build_macros.mk | 6 ++++++
> - 1 file changed, 6 insertions(+)
> -
> -diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
> -index 426e344941d9..7d0b0a511226 100644
> ---- a/make_helpers/build_macros.mk
> -+++ b/make_helpers/build_macros.mk
> -@@ -86,6 +86,12 @@ define assert_numerics
> -     $(foreach num,$1,$(eval $(call assert_numeric,$(num))))
> - endef
> -
> -+# Convenience function to check for a given linker option. An call to
> -+# $(call ld_option, --no-XYZ) will return --no-XYZ if supported by the
> linker -+define ld_option
> -+	$(shell if $(LD) $(1) -v >/dev/null 2>&1; then echo $(1); fi )
> -+endef
> -+
> - # CREATE_SEQ is a recursive function to create sequence of numbers from 1
> to - # $(2) and assign the sequence to $(1)
> - define CREATE_SEQ
> diff --git
> a/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.p
> atch
> b/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.p
> atch deleted file mode 100644
> index b254a578d7d4..000000000000
> ---
> a/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.p
> atch +++ /dev/null
> @@ -1,54 +0,0 @@
> -From: Marco Felsch <m.felsch@pengutronix.de>
> -Date: Wed, 9 Nov 2022 12:59:09 +0100
> -Subject: [PATCH] feat(build): add support for new binutils versions
> -
> -Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
> -of a new warning when linking the bl*.elf in the form:
> -
> -  ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section
> implies executable stack -  ld.bfd: NOTE: This behaviour is deprecated and
> will be removed in a future version of the linker -  ld.bfd: warning:
> bl2.elf has a LOAD segment with RWX permissions -  ld.bfd: warning:
> bl32.elf has a LOAD segment with RWX permissions -
> -These new warnings are enbaled by default to secure elf binaries:
> - -
> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01
> a6e8434126b8fac7aa75107 - -
> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b
> 4500c9277a8e9d0f07e6774 -
> -Fix it in a similar way to what the Linux kernel does, see:
> -https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.co
> m/ -
> -Following the reasoning there, we set "-z noexecstack" for all linkers
> -(although LLVM's LLD defaults to it) and optional add
> ---no-warn-rwx-segments since this a ld.bfd related.
> -
> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> -Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> -Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
> ----
> - Makefile | 6 ++++++
> - 1 file changed, 6 insertions(+)
> -
> -diff --git a/Makefile b/Makefile
> -index 1ddb7b84417d..1bfff716485a 100644
> ---- a/Makefile
> -+++ b/Makefile
> -@@ -416,6 +416,8 @@ endif
> -
> - GCC_V_OUTPUT		:=	$(shell $(CC) -v 2>&1)
> -
> -+TF_LDFLAGS		+=	-z noexecstack
> -+
> - # LD = armlink
> - ifneq ($(findstring armlink,$(notdir $(LD))),)
> - TF_LDFLAGS		+=	--diag_error=warning --
lto_level=O1
> -@@ -451,6 +453,10 @@ TF_LDFLAGS		+=	$
(TF_LDFLAGS_$(ARCH))
> - endif
> - endif
> -
> -+# With ld.bfd version 2.29 and newer new warnings are added. Skip those
> since we -+# are not loaded by a elf loader.
> -+TF_LDFLAGS		+=	$(call ld_option, --no-warn-rwx-
segments)
> -+
> - DTC_FLAGS		+=	-I dts -O dtb
> - DTC_CPPFLAGS		+=	-P -nostdinc -Iinclude -Ifdts -
undef \
> - 				-x assembler-with-cpp $(DEFINES)
> diff --git
> a/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-v
> ia.patch
> b/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-v
> ia.patch deleted file mode 100644
> index 958b7fda325a..000000000000
> ---
> a/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-v
> ia.patch +++ /dev/null
> @@ -1,41 +0,0 @@
> -From: Lucas Stach <l.stach@pengutronix.de>
> -Date: Thu, 8 Dec 2022 15:54:26 +0100
> -Subject: [PATCH] feat(imx8mq): make IMX_BOOT_UART_BASE configurable via
> build - parameter
> -
> -This aligns the i.MX8MQ build with the other i.MX8M platforms by allowing
> -to override the default IMX_BOOT_UART_BASE value via a make parameter.
> -
> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> -Change-Id: Iad9b844517209fc7d051c61767f71ac9fa2b55c7
> ----
> - plat/imx/imx8m/imx8mq/include/platform_def.h | 1 -
> - plat/imx/imx8m/imx8mq/platform.mk            | 3 +++
> - 2 files changed, 3 insertions(+), 1 deletion(-)
> -
> -diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h
> b/plat/imx/imx8m/imx8mq/include/platform_def.h -index
> 1dd22d952305..4671cd3afa40 100644
> ---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
> -+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
> -@@ -54,7 +54,6 @@
> -
> - #define HAB_RVT_BASE			U(0x00000880) /* 
HAB_RVT for i.MX8MQ */
> -
> --#define IMX_BOOT_UART_BASE		U(0x30860000)
> - #define IMX_BOOT_UART_CLK_IN_HZ		25000000 /* Select 
25Mhz oscillator */
> - #define PLAT_CRASH_UART_BASE		IMX_BOOT_UART_BASE
> - #define PLAT_CRASH_UART_CLK_IN_HZ	25000000
> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> b/plat/imx/imx8m/imx8mq/platform.mk -index 7b6df920c924..f62d3aa5be15
> 100644
> ---- a/plat/imx/imx8m/imx8mq/platform.mk
> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
> -@@ -52,6 +52,9 @@ $(eval $(call add_define,BL32_BASE))
> - BL32_SIZE		?=	0x2000000
> - $(eval $(call add_define,BL32_SIZE))
> -
> -+IMX_BOOT_UART_BASE	?=	0x30860000
> -+$(eval $(call add_define,IMX_BOOT_UART_BASE))
> -+
> - ifeq (${SPD},trusty)
> - 	BL31_CFLAGS    +=      -DPLAT_XLAT_TABLES_DYNAMIC=1
> - endif
> diff --git
> a/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.p
> atch
> b/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.p
> atch deleted file mode 100644
> index 0b1bc7e8c82b..000000000000
> ---
> a/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.p
> atch +++ /dev/null
> @@ -1,30 +0,0 @@
> -From: Lucas Stach <l.stach@pengutronix.de>
> -Date: Thu, 8 Dec 2022 17:51:17 +0100
> -Subject: [PATCH] feat(imx8mq): remove empty bl31_plat_runtime_setup
> -
> -Having this empty definition is actively harmful, as it prevents the
> -default weak function to be used, which does a switch of the console
> -state.
> -
> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> -Change-Id: I3b78e0c524c4907714036dba573a44d8f9c48b09
> ----
> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 5 -----
> - 1 file changed, 5 deletions(-)
> -
> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> 59c3779abb7f..0feb6d7fbad2 100644
> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -@@ -227,11 +227,6 @@ unsigned int plat_get_syscnt_freq2(void)
> - 	return COUNTER_FREQUENCY;
> - }
> -
> --void bl31_plat_runtime_setup(void)
> --{
> --	return;
> --}
> --
> - #ifdef SPD_trusty
> - void plat_trusty_set_boot_args(aapcs64_params_t *args)
> - {
> diff --git a/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
> b/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch deleted
> file mode 100644
> index 3a44ae3a149d..000000000000
> --- a/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
> +++ /dev/null
> @@ -1,51 +0,0 @@
> -From: Lucas Stach <l.stach@pengutronix.de>
> -Date: Thu, 8 Dec 2022 16:00:04 +0100
> -Subject: [PATCH] feat(imx8mq): always set up console
> -
> -This aligns the i.MX8MQ platform behaviour with the other i.MX8M*
> -platforms by always setting up the console UART.
> -
> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> -Change-Id: I1279d9cb4feb6e789422b9844cab711b8daae74e
> ----
> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c    | 7 +++----
> - plat/imx/imx8m/imx8mq/include/platform_def.h | 1 -
> - 2 files changed, 3 insertions(+), 5 deletions(-)
> -
> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> 0feb6d7fbad2..0972c35e9554 100644
> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -@@ -124,6 +124,7 @@ static void bl31_tz380_setup(void)
> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> - 			u_register_t arg2, u_register_t arg3)
> - {
> -+	static console_t console;
> - 	int i;
> - 	/* enable CSU NS access permission */
> - 	for (i = 0; i < 64; i++) {
> -@@ -132,12 +133,10 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, -
> - 	imx_aipstz_init(aipstz);
> -
> --#if DEBUG_CONSOLE
> --	static console_t console;
> --
> - 	console_imx_uart_register(IMX_BOOT_UART_BASE, 
IMX_BOOT_UART_CLK_IN_HZ,
> - 		IMX_CONSOLE_BAUDRATE, &console);
> --#endif
> -+	/* This console is only used for boot stage */
> -+	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> -
> - 	imx8m_caam_init();
> -
> -diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h
> b/plat/imx/imx8m/imx8mq/include/platform_def.h -index
> 4671cd3afa40..103f2e4087e2 100644
> ---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
> -+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
> -@@ -127,5 +127,4 @@
> -
> - #define COUNTER_FREQUENCY		8333333 /* 25MHz / 3 */
> -
> --#define DEBUG_CONSOLE			0
> - #define IMX_WDOG_B_RESET
> diff --git
> a/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patc
> h
> b/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patc
> h deleted file mode 100644
> index 6cf2dc18deb2..000000000000
> ---
> a/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patc
> h +++ /dev/null
> @@ -1,53 +0,0 @@
> -From: Lucas Stach <l.stach@pengutronix.de>
> -Date: Thu, 8 Dec 2022 16:35:11 +0100
> -Subject: [PATCH] refactor(imx8mq): make use of setup_page_tables()
> -
> -Improve code readability and align with other i.MX8M* platforms.
> -
> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> -Change-Id: Ifd29b74872e3a567288d208de4827403078164e9
> ----
> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 28
> +++++++++++++--------------- - 1 file changed, 13 insertions(+), 15
> deletions(-)
> -
> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> 0972c35e9554..c7eddf430197 100644
> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -@@ -175,23 +175,21 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, -
> - void bl31_plat_arch_setup(void)
> - {
> --	mmap_add_region(BL31_BASE, BL31_BASE, (BL31_LIMIT - BL31_BASE),
> --		MT_MEMORY | MT_RW | MT_SECURE);
> --	mmap_add_region(BL_CODE_BASE, BL_CODE_BASE, (BL_CODE_END - 
BL_CODE_BASE),
> --		MT_MEMORY | MT_RO | MT_SECURE);
> --
> --	/* Map TEE memory */
> --	mmap_add_region(BL32_BASE, BL32_BASE, BL32_SIZE, MT_MEMORY | 
MT_RW);
> --
> --	mmap_add(imx_mmap);
> --
> -+	const mmap_region_t bl_regions[] = {
> -+        	MAP_REGION_FLAT(BL31_BASE, BL31_LIMIT - BL31_BASE,
> -+				MT_MEMORY | MT_RW | MT_SECURE),
> -+		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - 
BL_CODE_BASE,
> -+				MT_MEMORY | MT_RO | MT_SECURE),
> - #if USE_COHERENT_MEM
> --	mmap_add_region(BL_COHERENT_RAM_BASE, BL_COHERENT_RAM_BASE,
> --		BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE,
> --		MT_DEVICE | MT_RW | MT_SECURE);
> -+		MAP_REGION_FLAT(BL_COHERENT_RAM_BASE,
> -+				BL_COHERENT_RAM_END - 
BL_COHERENT_RAM_BASE,
> -+				MT_DEVICE | MT_RW | MT_SECURE),
> - #endif
> --	/* setup xlat table */
> --	init_xlat_tables();
> -+		MAP_REGION_FLAT(BL32_BASE, BL32_SIZE, MT_MEMORY | 
MT_RW),
> -+		{0},
> -+	};
> -+
> -+	setup_page_tables(bl_regions, imx_mmap);
> - 	/* enable the MMU */
> - 	enable_mmu_el3(0);
> - }
> diff --git
> a/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
> b/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch deleted
> file mode 100644
> index 960d7265cc08..000000000000
> --- a/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
> +++ /dev/null
> @@ -1,54 +0,0 @@
> -From: Lucas Stach <l.stach@pengutronix.de>
> -Date: Thu, 8 Dec 2022 16:37:44 +0100
> -Subject: [PATCH] refactor(imx8mq): introduce BL31_SIZE
> -
> -No functional change.
> -
> -Introduce BL31_SIZE define and calculate the limits based on the
> -BL31_BASE and the BL31_SIZE define. Also make use of SZ_64K to make it
> -easier to read. This is required for later BL31 PIE support since it
> -drops the calculation based on the BL31_LIMIT and BL31_BASE.
> -
> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> -Change-Id: I517074b866b5bf11841b51777f87c926b304488d
> ----
> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c    | 2 +-
> - plat/imx/imx8m/imx8mq/include/platform_def.h | 5 ++++-
> - 2 files changed, 5 insertions(+), 2 deletions(-)
> -
> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> c7eddf430197..bbdb4d899a39 100644
> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -@@ -176,7 +176,7 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, - void bl31_plat_arch_setup(void)
> - {
> - 	const mmap_region_t bl_regions[] = {
> --        	MAP_REGION_FLAT(BL31_BASE, BL31_LIMIT - BL31_BASE,
> -+        	MAP_REGION_FLAT(BL31_BASE, BL31_SIZE,
> - 				MT_MEMORY | MT_RW | MT_SECURE),
> - 		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - 
BL_CODE_BASE,
> - 				MT_MEMORY | MT_RO | MT_SECURE),
> -diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h
> b/plat/imx/imx8m/imx8mq/include/platform_def.h -index
> 103f2e4087e2..bb570748f573 100644
> ---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
> -+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
> -@@ -4,6 +4,8 @@
> -  * SPDX-License-Identifier: BSD-3-Clause
> -  */
> -
> -+#include <plat/common/common_def.h>
> -+
> - #define PLATFORM_LINKER_FORMAT		"elf64-littleaarch64"
> - #define PLATFORM_LINKER_ARCH		aarch64
> -
> -@@ -31,7 +33,8 @@
> - #define PLAT_STOP_OFF_STATE		U(3)
> -
> - #define BL31_BASE			U(0x910000)
> --#define BL31_LIMIT			U(0x920000)
> -+#define BL31_SIZE			SZ_64K
> -+#define BL31_LIMIT			(BL31_BASE + BL31_SIZE)
> -
> - /* non-secure uboot base */
> - #define PLAT_NS_IMAGE_OFFSET		U(0x40200000)
> diff --git a/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
> b/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch deleted
> file mode 100644
> index 25d2aaae70fd..000000000000
> --- a/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
> +++ /dev/null
> @@ -1,55 +0,0 @@
> -From: Lucas Stach <l.stach@pengutronix.de>
> -Date: Thu, 8 Dec 2022 16:44:00 +0100
> -Subject: [PATCH] feat(imx8mq): add BL31 PIE support
> -
> -Enable PIE support so the BL31 firmware can be loaded from anywhere
> -within the OCRAM (SRAM). For the PIE support we only need to replace the
> -BL31_BASE define by the BL31_START symbol which is a relocatable and we
> -need to enable it by setting ENABLE_PIE := 1.
> -
> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> -Change-Id: Ie6a13e4ae0fdc6627a94798d7a86df7d5b310896
> ----
> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 2 +-
> - plat/imx/imx8m/imx8mq/imx8mq_psci.c       | 2 +-
> - plat/imx/imx8m/imx8mq/platform.mk         | 1 +
> - 3 files changed, 3 insertions(+), 2 deletions(-)
> -
> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> bbdb4d899a39..3c2d223fef21 100644
> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -@@ -176,7 +176,7 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, - void bl31_plat_arch_setup(void)
> - {
> - 	const mmap_region_t bl_regions[] = {
> --        	MAP_REGION_FLAT(BL31_BASE, BL31_SIZE,
> -+        	MAP_REGION_FLAT(BL31_START, BL31_SIZE,
> - 				MT_MEMORY | MT_RW | MT_SECURE),
> - 		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - 
BL_CODE_BASE,
> - 				MT_MEMORY | MT_RO | MT_SECURE),
> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_psci.c
> b/plat/imx/imx8m/imx8mq/imx8mq_psci.c -index 662017d6fe4a..01582afe490c
> 100644
> ---- a/plat/imx/imx8m/imx8mq/imx8mq_psci.c
> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_psci.c
> -@@ -41,7 +41,7 @@ int imx_validate_power_state(unsigned int power_state,
> -
> - void imx_domain_suspend(const psci_power_state_t *target_state)
> - {
> --	uint64_t base_addr = BL31_BASE;
> -+	uint64_t base_addr = BL31_START;
> - 	uint64_t mpidr = read_mpidr_el1();
> - 	unsigned int core_id = MPIDR_AFFLVL0_VAL(mpidr);
> -
> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> b/plat/imx/imx8m/imx8mq/platform.mk -index f62d3aa5be15..901a974a591e
> 100644
> ---- a/plat/imx/imx8m/imx8mq/platform.mk
> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
> -@@ -38,6 +38,7 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> - 				${XLAT_TABLES_LIB_SRCS}		
		\
> - 				${IMX_GIC_SOURCES}
> -
> -+ENABLE_PIE		:=	1
> - USE_COHERENT_MEM	:=	1
> - RESET_TO_BL31		:=	1
> - A53_DISABLE_NON_TEMPORAL_HINT := 0
> diff --git
> a/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
> b/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch deleted
> file mode 100644
> index 24a5b80ca473..000000000000
> --- a/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -From: Marco Felsch <m.felsch@pengutronix.de>
> -Date: Fri, 10 Feb 2023 12:14:26 +0100
> -Subject: [PATCH] feat(imx8mq): add support for gcc >= 12.x
> -
> -Starting with GCC >= 12.x the -Wall option includes -Werror=array-bounds
> -checks. Per default GCC threads all memory accesses below 4096 as NULL,
> -so access to ROMAPI causes the following warning:
> -
> -In file included from plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:20:
> -In function 'mmio_read_8',
> -    inlined from 'imx8mq_soc_info_init' at
> plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:70:16, -    inlined from
> 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:206:2:
> -include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds
> of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'}
> [-Werror=array-bounds] -   19 |         return *(volatile uint8_t*)addr;
> -      |                ^~~~~~~~~~~~~~~~~~~~~~~~
> -In function 'mmio_read_8',
> -    inlined from 'imx8mq_soc_info_init' at
> plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:74:16, -    inlined from
> 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:206:2:
> -include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds
> of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'}
> [-Werror=array-bounds] -   19 |         return *(volatile uint8_t*)addr;
> -      |                ^~~~~~~~~~~~~~~~~~~~~~~~
> -cc1: all warnings being treated as errors
> -
> -Fix this by setting the default min-pagesize to 0 instead of 4096, so
> -the ROMAPI access will not trigger the warning. Don't set this option
> -for all files since it is unkown how it affects code
> -generation/optimizations.
> -
> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> -Change-Id: Ibcca65ca69750e1a1bca3d528c80e5b445d2f90f
> ----
> - plat/imx/imx8m/imx8mq/platform.mk | 3 +++
> - 1 file changed, 3 insertions(+)
> -
> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> b/plat/imx/imx8m/imx8mq/platform.mk -index 901a974a591e..985be71725f7
> 100644
> ---- a/plat/imx/imx8m/imx8mq/platform.mk
> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
> -@@ -59,3 +59,6 @@ $(eval $(call add_define,IMX_BOOT_UART_BASE))
> - ifeq (${SPD},trusty)
> - 	BL31_CFLAGS    +=      -DPLAT_XLAT_TABLES_DYNAMIC=1
> - endif
> -+
> -+# Required with gcc version >= 12
> -+$(BUILD_PLAT)/bl31/imx8mq_bl31_setup.o: CFLAGS += --param=min-pagesize=0
> diff --git
> a/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runt
> im.patch
> b/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runt
> im.patch deleted file mode 100644
> index 68f36aca7aa1..000000000000
> ---
> a/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runt
> im.patch +++ /dev/null
> @@ -1,304 +0,0 @@
> -From: Marco Felsch <m.felsch@pengutronix.de>
> -Date: Mon, 24 Jul 2023 15:05:58 +0200
> -Subject: [PATCH] feat(imx8m): detect console base address during runtime
> -
> -Provide a helper to detect the enabled UART device during runtime. This
> -lower the integration effort and make it more straight forward for
> -'simple' use-cases with a single UART enabled. If multiple UARTs are
> -enabled the first enabled is returned.
> -
> -The auto-detection is enabled by setting IMX_BOOT_UART_BASE=0 to keep
> -the backward compatibility. For more advanced use-cases (multiple UARTs
> -are enabled) the user still has to provide the correct base address.
> -
> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> -Change-Id: I300a167e1a10f9aa991c8d1c3efe2c6b23f56c47
> ----
> - plat/imx/imx8m/imx8m_ccm.c                | 58
> +++++++++++++++++++++++++++++++ - plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> | 11 +++++-
> - plat/imx/imx8m/imx8mm/platform.mk         |  1 +
> - plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 11 +++++-
> - plat/imx/imx8m/imx8mn/platform.mk         |  1 +
> - plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c | 11 +++++-
> - plat/imx/imx8m/imx8mp/platform.mk         |  1 +
> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 11 +++++-
> - plat/imx/imx8m/imx8mq/platform.mk         |  1 +
> - plat/imx/imx8m/include/imx8m_ccm.h        | 12 +++++++
> - 10 files changed, 114 insertions(+), 4 deletions(-)
> - create mode 100644 plat/imx/imx8m/imx8m_ccm.c
> - create mode 100644 plat/imx/imx8m/include/imx8m_ccm.h
> -
> -diff --git a/plat/imx/imx8m/imx8m_ccm.c b/plat/imx/imx8m/imx8m_ccm.c
> -new file mode 100644
> -index 000000000000..10a00c990031
> ---- /dev/null
> -+++ b/plat/imx/imx8m/imx8m_ccm.c
> -@@ -0,0 +1,58 @@
> -+/*
> -+ * Copyright (c) 2023, Pengutronix. All rights reserved.
> -+ *
> -+ * SPDX-License-Identifier: BSD-3-Clause
> -+ */
> -+
> -+#include <lib/mmio.h>
> -+#include <platform_def.h>
> -+
> -+#define UCR1    		0x80
> -+#define UCR1_UARTEN		BIT(0)
> -+#define DOMAIN0_RUNNING(d)	(((d) & 0x3) != 0)
> -+
> -+static struct imx_uart {
> -+	unsigned int ccm_reg;
> -+	unsigned int uart_base;
> -+} imx8m_uart_info[] = {
> -+	{	/* UART 1 */
> -+		.ccm_reg = 0x4490,
> -+		.uart_base = 0x30860000,
> -+	}, {	/* UART 2 */
> -+		.ccm_reg = 0x44a0,
> -+		.uart_base = 0x30890000,
> -+	}, {	/* UART 3 */
> -+		.ccm_reg = 0x44b0,
> -+		.uart_base = 0x30880000,
> -+	}, {	/* UART 4 */
> -+		.ccm_reg = 0x44c0,
> -+		.uart_base = 0x30a60000,
> -+	}
> -+};
> -+
> -+unsigned int imx8m_uart_get_base(void)
> -+{
> -+	unsigned int i;
> -+
> -+	for (i = 0; i < ARRAY_SIZE(imx8m_uart_info); i++) {
> -+		uint32_t val;
> -+
> -+		/*
> -+		 * At least check that the clock-gate is ungated before 
we
> -+		 * access the UART register.
> -+		 */
> -+		val = mmio_read_32(IMX_CCM_BASE + 
imx8m_uart_info[i].ccm_reg);
> -+		if (DOMAIN0_RUNNING(val)) {
> -+			val = 
mmio_read_32(imx8m_uart_info[i].uart_base + UCR1);
> -+			if (val & UCR1_UARTEN) {
> -+				return 
imx8m_uart_info[i].uart_base;
> -+			}
> -+		}
> -+	}
> -+
> -+	/*
> -+	 * We should return an error and inform the user but we can't do it
> -+	 * this early.
> -+	 */
> -+	return 0;
> -+}
> -diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c -index
> 67bfd3651dfe..8e6636147438 100644
> ---- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> -@@ -27,6 +27,7 @@
> - #include <imx_uart.h>
> - #include <imx_rdc.h>
> - #include <imx8m_caam.h>
> -+#include <imx8m_ccm.h>
> - #include <imx8m_csu.h>
> - #include <plat_imx8.h>
> -
> -@@ -130,6 +131,7 @@ void bl31_tzc380_setup(void)
> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> - 		u_register_t arg2, u_register_t arg3)
> - {
> -+	unsigned int console_base = 0U;
> - 	static console_t console;
> - 	int i;
> -
> -@@ -144,7 +146,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, -
> - 	imx_csu_init(csu_cfg);
> -
> --	console_imx_uart_register(IMX_BOOT_UART_BASE, 
IMX_BOOT_UART_CLK_IN_HZ,
> -+#if IMX_BOOT_UART_BASE
> -+	console_base = IMX_BOOT_UART_BASE;
> -+#endif
> -+	if (console_base == 0U) {
> -+		console_base = imx8m_uart_get_base();
> -+	}
> -+
> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> - 		IMX_CONSOLE_BAUDRATE, &console);
> - 	/* This console is only used for boot stage */
> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> -diff --git a/plat/imx/imx8m/imx8mm/platform.mk
> b/plat/imx/imx8m/imx8mm/platform.mk -index 7a42554f5739..22791fda4c2c
> 100644
> ---- a/plat/imx/imx8m/imx8mm/platform.mk
> -+++ b/plat/imx/imx8m/imx8mm/platform.mk
> -@@ -37,6 +37,7 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> - 				plat/imx/imx8m/imx_rdc.c		
	\
> - 				plat/imx/imx8m/imx8m_csu.c		
	\
> - 				plat/imx/imx8m/imx8m_caam.c		
	\
> -+				plat/imx/imx8m/imx8m_ccm.c		
	\
> - 				plat/imx/imx8m/imx8m_psci_common.c	
	\
> - 				plat/imx/imx8m/imx8mm/
imx8mm_bl31_setup.c	\
> - 				plat/imx/imx8m/imx8mm/
imx8mm_psci.c		\
> -diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c -index
> eff198dd741c..aeb1cbf2945f 100644
> ---- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> -@@ -25,6 +25,7 @@
> - #include <imx_uart.h>
> - #include <imx_rdc.h>
> - #include <imx8m_caam.h>
> -+#include <imx8m_ccm.h>
> - #include <imx8m_csu.h>
> - #include <platform_def.h>
> - #include <plat_imx8.h>
> -@@ -121,6 +122,7 @@ static void bl31_tzc380_setup(void)
> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> - 		u_register_t arg2, u_register_t arg3)
> - {
> -+	unsigned int console_base = 0U;
> - 	static console_t console;
> - 	unsigned int val;
> - 	int i;
> -@@ -141,7 +143,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 
0x2c);
> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
> -
> --	console_imx_uart_register(IMX_BOOT_UART_BASE, 
IMX_BOOT_UART_CLK_IN_HZ,
> -+#if IMX_BOOT_UART_BASE
> -+	console_base = IMX_BOOT_UART_BASE;
> -+#endif
> -+	if (console_base == 0U) {
> -+		console_base = imx8m_uart_get_base();
> -+	}
> -+
> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> - 		IMX_CONSOLE_BAUDRATE, &console);
> - 	/* This console is only used for boot stage */
> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> -diff --git a/plat/imx/imx8m/imx8mn/platform.mk
> b/plat/imx/imx8m/imx8mn/platform.mk -index 1c0ad4f3bc23..46516104f16d
> 100644
> ---- a/plat/imx/imx8m/imx8mn/platform.mk
> -+++ b/plat/imx/imx8m/imx8mn/platform.mk
> -@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> - 				plat/imx/imx8m/imx_aipstz.c		
	\
> - 				plat/imx/imx8m/imx_rdc.c		
	\
> - 				plat/imx/imx8m/imx8m_caam.c		
	\
> -+				plat/imx/imx8m/imx8m_ccm.c		
	\
> - 				plat/imx/imx8m/imx8m_csu.c		
	\
> - 				plat/imx/imx8m/imx8m_psci_common.c	
	\
> - 				plat/imx/imx8m/imx8mn/
imx8mn_bl31_setup.c	\
> -diff --git a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c -index
> 4c31fa28dab7..e25668b879b3 100644
> ---- a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> -@@ -25,6 +25,7 @@
> - #include <imx_uart.h>
> - #include <imx_rdc.h>
> - #include <imx8m_caam.h>
> -+#include <imx8m_ccm.h>
> - #include <imx8m_csu.h>
> - #include <platform_def.h>
> - #include <plat_imx8.h>
> -@@ -117,6 +118,7 @@ static void bl31_tzc380_setup(void)
> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> - 		u_register_t arg2, u_register_t arg3)
> - {
> -+	unsigned int console_base = 0U;
> - 	static console_t console;
> - 	unsigned int val;
> - 	unsigned int i;
> -@@ -137,7 +139,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 
0x2c);
> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
> -
> --	console_imx_uart_register(IMX_BOOT_UART_BASE, 
IMX_BOOT_UART_CLK_IN_HZ,
> -+#if IMX_BOOT_UART_BASE
> -+	console_base = IMX_BOOT_UART_BASE;
> -+#endif
> -+	if (console_base == 0U) {
> -+		console_base = imx8m_uart_get_base();
> -+	}
> -+
> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> - 		IMX_CONSOLE_BAUDRATE, &console);
> - 	/* This console is only used for boot stage */
> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> -diff --git a/plat/imx/imx8m/imx8mp/platform.mk
> b/plat/imx/imx8m/imx8mp/platform.mk -index 5414c0a5732d..cdb504de0f3d
> 100644
> ---- a/plat/imx/imx8m/imx8mp/platform.mk
> -+++ b/plat/imx/imx8m/imx8mp/platform.mk
> -@@ -32,6 +32,7 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> - 				plat/imx/imx8m/imx_aipstz.c		
	\
> - 				plat/imx/imx8m/imx_rdc.c		
	\
> - 				plat/imx/imx8m/imx8m_caam.c		
	\
> -+				plat/imx/imx8m/imx8m_ccm.c		
	\
> - 				plat/imx/imx8m/imx8m_csu.c		
	\
> - 				plat/imx/imx8m/imx8m_psci_common.c	
	\
> - 				plat/imx/imx8m/imx8mp/
imx8mp_bl31_setup.c	\
> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> 3c2d223fef21..1cb2d2a25b54 100644
> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -@@ -25,6 +25,7 @@
> - #include <imx_aipstz.h>
> - #include <imx_uart.h>
> - #include <imx8m_caam.h>
> -+#include <imx8m_ccm.h>
> - #include <plat_imx8.h>
> -
> - #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
> -@@ -124,6 +125,7 @@ static void bl31_tz380_setup(void)
> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> - 			u_register_t arg2, u_register_t arg3)
> - {
> -+	unsigned int console_base = 0U;
> - 	static console_t console;
> - 	int i;
> - 	/* enable CSU NS access permission */
> -@@ -133,7 +135,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, -
> - 	imx_aipstz_init(aipstz);
> -
> --	console_imx_uart_register(IMX_BOOT_UART_BASE, 
IMX_BOOT_UART_CLK_IN_HZ,
> -+#if IMX_BOOT_UART_BASE
> -+	console_base = IMX_BOOT_UART_BASE;
> -+#endif
> -+	if (console_base == 0U) {
> -+		console_base = imx8m_uart_get_base();
> -+	}
> -+
> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> - 		IMX_CONSOLE_BAUDRATE, &console);
> - 	/* This console is only used for boot stage */
> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> b/plat/imx/imx8m/imx8mq/platform.mk -index 985be71725f7..0c34c10bdcb4
> 100644
> ---- a/plat/imx/imx8m/imx8mq/platform.mk
> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
> -@@ -25,6 +25,7 @@ BL31_SOURCES		+=	plat/imx/common/
imx8_helpers.S			\
> - 				plat/imx/imx8m/gpc_common.c		
	\
> - 				plat/imx/imx8m/imx_aipstz.c		
	\
> - 				plat/imx/imx8m/imx8m_caam.c		
	\
> -+				plat/imx/imx8m/imx8m_ccm.c		
	\
> - 				plat/imx/imx8m/imx8m_psci_common.c	
	\
> - 				plat/imx/imx8m/imx8mq/gpc.c		
	\
> - 				plat/imx/common/imx8_topology.c		
	\
> -diff --git a/plat/imx/imx8m/include/imx8m_ccm.h
> b/plat/imx/imx8m/include/imx8m_ccm.h -new file mode 100644
> -index 000000000000..acbd135cb314
> ---- /dev/null
> -+++ b/plat/imx/imx8m/include/imx8m_ccm.h
> -@@ -0,0 +1,12 @@
> -+/*
> -+ * Copyright (c) 2023, Pengutronix. All rights reserved.
> -+ *
> -+ * SPDX-License-Identifier: BSD-3-Clause
> -+ */
> -+
> -+#ifndef IMX8M_CCM_H
> -+#define IMX8M_CCM_H
> -+
> -+unsigned int imx8m_uart_get_base(void);
> -+
> -+#endif /* IMX8M_CCM_H */
> diff --git
> a/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-op
> ti.patch
> b/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-op
> ti.patch deleted file mode 100644
> index 9fae10905edd..000000000000
> ---
> a/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-op
> ti.patch +++ /dev/null
> @@ -1,172 +0,0 @@
> -From: Marco Felsch <m.felsch@pengutronix.de>
> -Date: Wed, 2 Aug 2023 08:11:35 +0200
> -Subject: [PATCH] fix(imx8m): make IMX_BOOT_UART_BASE autodetection option
> more - obvious
> -
> -Switch from IMX_BOOT_UART_BASE=0 to IMX_BOOT_UART_BASE=auto to make it
> -more obvious that the detection is based on the runtime autodetection.
> -
> -In addition this moves the evaluation of IMX_BOOT_UART_BASE into the
> -makefile which removes the ugly conditional compilation as well.
> -
> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> -Change-Id: I92c13607bf81c6267f4b6aee829d74902b7f72d2
> ----
> - plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 5 +----
> - plat/imx/imx8m/imx8mm/platform.mk         | 3 +++
> - plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 5 +----
> - plat/imx/imx8m/imx8mn/platform.mk         | 3 +++
> - plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c | 5 +----
> - plat/imx/imx8m/imx8mp/platform.mk         | 3 +++
> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 5 +----
> - plat/imx/imx8m/imx8mq/platform.mk         | 3 +++
> - 8 files changed, 16 insertions(+), 16 deletions(-)
> -
> -diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c -index
> 8e6636147438..c8a3adf8f333 100644
> ---- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> -@@ -131,7 +131,7 @@ void bl31_tzc380_setup(void)
> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> - 		u_register_t arg2, u_register_t arg3)
> - {
> --	unsigned int console_base = 0U;
> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
> - 	static console_t console;
> - 	int i;
> -
> -@@ -146,9 +146,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, -
> - 	imx_csu_init(csu_cfg);
> -
> --#if IMX_BOOT_UART_BASE
> --	console_base = IMX_BOOT_UART_BASE;
> --#endif
> - 	if (console_base == 0U) {
> - 		console_base = imx8m_uart_get_base();
> - 	}
> -diff --git a/plat/imx/imx8m/imx8mm/platform.mk
> b/plat/imx/imx8m/imx8mm/platform.mk -index 22791fda4c2c..1b4a1f2f37c7
> 100644
> ---- a/plat/imx/imx8m/imx8mm/platform.mk
> -+++ b/plat/imx/imx8m/imx8mm/platform.mk
> -@@ -159,6 +159,9 @@ BL32_SIZE		?=	0x2000000
> - $(eval $(call add_define,BL32_SIZE))
> -
> - IMX_BOOT_UART_BASE	?=	0x30890000
> -+ifeq (${IMX_BOOT_UART_BASE},auto)
> -+    override IMX_BOOT_UART_BASE	:=	0
> -+endif
> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
> -
> - EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
> -diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c -index
> aeb1cbf2945f..147249ee5e56 100644
> ---- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> -@@ -122,7 +122,7 @@ static void bl31_tzc380_setup(void)
> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> - 		u_register_t arg2, u_register_t arg3)
> - {
> --	unsigned int console_base = 0U;
> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
> - 	static console_t console;
> - 	unsigned int val;
> - 	int i;
> -@@ -143,9 +143,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 
0x2c);
> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
> -
> --#if IMX_BOOT_UART_BASE
> --	console_base = IMX_BOOT_UART_BASE;
> --#endif
> - 	if (console_base == 0U) {
> - 		console_base = imx8m_uart_get_base();
> - 	}
> -diff --git a/plat/imx/imx8m/imx8mn/platform.mk
> b/plat/imx/imx8m/imx8mn/platform.mk -index 46516104f16d..a6b43f213506
> 100644
> ---- a/plat/imx/imx8m/imx8mn/platform.mk
> -+++ b/plat/imx/imx8m/imx8mn/platform.mk
> -@@ -65,6 +65,9 @@ BL32_SIZE		?=	0x2000000
> - $(eval $(call add_define,BL32_SIZE))
> -
> - IMX_BOOT_UART_BASE	?=	0x30890000
> -+ifeq (${IMX_BOOT_UART_BASE},auto)
> -+    override IMX_BOOT_UART_BASE	:=	0
> -+endif
> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
> -
> - EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
> -diff --git a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c -index
> e25668b879b3..b0a41c741c17 100644
> ---- a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> -@@ -118,7 +118,7 @@ static void bl31_tzc380_setup(void)
> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> - 		u_register_t arg2, u_register_t arg3)
> - {
> --	unsigned int console_base = 0U;
> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
> - 	static console_t console;
> - 	unsigned int val;
> - 	unsigned int i;
> -@@ -139,9 +139,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 
0x2c);
> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
> -
> --#if IMX_BOOT_UART_BASE
> --	console_base = IMX_BOOT_UART_BASE;
> --#endif
> - 	if (console_base == 0U) {
> - 		console_base = imx8m_uart_get_base();
> - 	}
> -diff --git a/plat/imx/imx8m/imx8mp/platform.mk
> b/plat/imx/imx8m/imx8mp/platform.mk -index cdb504de0f3d..0169144f4a1a
> 100644
> ---- a/plat/imx/imx8m/imx8mp/platform.mk
> -+++ b/plat/imx/imx8m/imx8mp/platform.mk
> -@@ -156,6 +156,9 @@ BL32_SIZE		?=	0x2000000
> - $(eval $(call add_define,BL32_SIZE))
> -
> - IMX_BOOT_UART_BASE	?=	0x30890000
> -+ifeq (${IMX_BOOT_UART_BASE},auto)
> -+    override IMX_BOOT_UART_BASE	:=	0
> -+endif
> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
> -
> - EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> 1cb2d2a25b54..a2c81610b353 100644
> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> -@@ -125,7 +125,7 @@ static void bl31_tz380_setup(void)
> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> - 			u_register_t arg2, u_register_t arg3)
> - {
> --	unsigned int console_base = 0U;
> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
> - 	static console_t console;
> - 	int i;
> - 	/* enable CSU NS access permission */
> -@@ -135,9 +135,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
> u_register_t arg1, -
> - 	imx_aipstz_init(aipstz);
> -
> --#if IMX_BOOT_UART_BASE
> --	console_base = IMX_BOOT_UART_BASE;
> --#endif
> - 	if (console_base == 0U) {
> - 		console_base = imx8m_uart_get_base();
> - 	}
> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> b/plat/imx/imx8m/imx8mq/platform.mk -index 0c34c10bdcb4..6ee7d23d4882
> 100644
> ---- a/plat/imx/imx8m/imx8mq/platform.mk
> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
> -@@ -55,6 +55,9 @@ BL32_SIZE		?=	0x2000000
> - $(eval $(call add_define,BL32_SIZE))
> -
> - IMX_BOOT_UART_BASE	?=	0x30860000
> -+ifeq (${IMX_BOOT_UART_BASE},auto)
> -+    override IMX_BOOT_UART_BASE	:=	0
> -+endif
> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
> -
> - ifeq (${SPD},trusty)
> diff --git
> a/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-202401
> 17.patch
> b/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-202401
> 17.patch deleted file mode 100644
> index 1d1a9b9471bb..000000000000
> ---
> a/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-202401
> 17.patch +++ /dev/null
> @@ -1,21 +0,0 @@
> -From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= <l.goehrs@pengutronix.de>
> -Date: Wed, 17 Jan 2024 11:13:01 +0100
> -Subject: [PATCH] Release 2.8/customers/pengutronix/distrokit/20240117-1
> -
> ----
> - Makefile | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/Makefile b/Makefile
> -index 1bfff716485a..f39eb940a024 100644
> ---- a/Makefile
> -+++ b/Makefile
> -@@ -327,7 +327,7 @@ endif
> - ifeq (${BUILD_STRING},)
> -         BUILD_STRING  :=  $(shell git describe --always --dirty --tags 2>
> /dev/null) - endif
> --VERSION_STRING    :=  v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}
> -+VERSION_STRING    := 
> v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}-20240117-1 -
> - ifeq (${AARCH32_INSTRUCTION_SET},A32)
> - TF_CFLAGS_aarch32	+=	-marm
> diff --git a/patches/tf-a-v2.8/series b/patches/tf-a-v2.8/series
> deleted file mode 100644
> index 7a73fce4ff94..000000000000
> --- a/patches/tf-a-v2.8/series
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -# umpf-base: v2.8
> -# umpf-name: 2.8/customers/pengutronix/distrokit
> -# umpf-version: 2.8/customers/pengutronix/distrokit/20240117-1
> -# umpf-topic: v2.8/topic/fix-build-warnings
> -# umpf-hashinfo: 4730b4b80206cf2fc27787f43cefd3169a6f8a2f
> -# umpf-topic-range:
> 9881bb93a3bc0a3ea37e9f093e09ab4b360a9e48..da1b5e74dc7c2b3e7a2d9a1adb7e23bee
> ba079e3 -0001-build-makefile-add-helper-to-detect-linker-options.patch
> -0002-feat-build-add-support-for-new-binutils-versions.patch
> -# umpf-topic: v2.8/topic/imx8mq
> -# umpf-hashinfo: 651310b67fd269e8118285e9ed44e8ad6cc52941
> -# umpf-topic-range:
> da1b5e74dc7c2b3e7a2d9a1adb7e23beeba079e3..be7bcbebf5b22958e8b88564ca0865b45
> 91263e7 -0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via.patch
> -0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.patch
> -0103-feat-imx8mq-always-set-up-console.patch
> -0104-refactor-imx8mq-make-use-of-setup_page_tables.patch
> -0105-refactor-imx8mq-introduce-BL31_SIZE.patch
> -0106-feat-imx8mq-add-BL31-PIE-support.patch
> -0107-feat-imx8mq-add-support-for-gcc-12.x.patch
> -# umpf-topic: v2.8/topic/uart-runtime-detection
> -# umpf-hashinfo: b59093eaea88fddf1c893eb8f45a3eadf1f570cc
> -# umpf-topic-range:
> be7bcbebf5b22958e8b88564ca0865b4591263e7..015b0b19a839d0d4beb01babbe1af8191
> 7fcfb57 -0201-feat-imx8m-detect-console-base-address-during-runtim.patch
> -0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti.patch
> -# umpf-release: 2.8/customers/pengutronix/distrokit/20240117-1
> -# umpf-topic-range:
> 015b0b19a839d0d4beb01babbe1af81917fcfb57..070499680453a1c6a358828e4bd7cf6c9
> 629ef6b -0301-Release-2.8-customers-pengutronix-distrokit-20240117.patch
> -# umpf-end







^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit]  [PATCH 02/12] tf-a: update from v2.8 → v2.10
  2024-04-24 11:15   ` Alexander Dahl
@ 2024-04-24 11:48     ` Ahmad Fatoum
  2024-04-24 11:58       ` Alexander Dahl
  0 siblings, 1 reply; 27+ messages in thread
From: Ahmad Fatoum @ 2024-04-24 11:48 UTC (permalink / raw)
  To: Alexander Dahl, distrokit

Hi,

On 24.04.24 13:15, Alexander Dahl wrote:
> Hello Ahmad,
> 
> Am Freitag, 15. März 2024, 22:12:30 CEST schrieb Ahmad Fatoum:
> Download fails like this:
> 
> 
> -------------------------
> target: tf-a-v2.10.tar.gz
> -------------------------
> 
> --2024-04-24 13:09:40--  https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/v2.10.tar.gz
> Resolving git.trustedfirmware.org (git.trustedfirmware.org)... 51.159.18.17
> Connecting to git.trustedfirmware.org (git.trustedfirmware.org)|51.159.18.17|:
> 443... connected.
> HTTP request sent, awaiting response... 401 Unauthorized

Meh. I guess we should do like meta-arm does and use a git checkout:
git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https

What do you think?

Cheers,
Ahmad

> 
> Username/Password Authentication Failed.
> --2024-04-24 13:09:40--  http://www.pengutronix.de/software/ptxdist/temporary-src/tf-a-v2.10.tar.gz
> Resolving www.pengutronix.de (www.pengutronix.de)... 2a01:4f9:2a:
> 2c17:5054:ff:fe65:8c93, 95.216.103.100
> Connecting to www.pengutronix.de (www.pengutronix.de)|2a01:4f9:2a:
> 2c17:5054:ff:fe65:8c93|:80... connected.
> HTTP request sent, awaiting response... 307 Temporary Redirect
> Location: https://www.pengutronix.de/software/ptxdist/temporary-src/tf-a-v2.10.tar.gz [following]
> --2024-04-24 13:09:40--  https://www.pengutronix.de/software/ptxdist/
> temporary-src/tf-a-v2.10.tar.gz
> Connecting to www.pengutronix.de (www.pengutronix.de)|2a01:4f9:2a:
> 2c17:5054:ff:fe65:8c93|:443... connected.
> HTTP request sent, awaiting response... 307 Temporary Redirect
> Location: https://public.pengutronix.de/mirror/software/ptxdist/temporary-src/
> tf-a-v2.10.tar.gz [following]
> --2024-04-24 13:09:41--  https://public.pengutronix.de/mirror/software/
> ptxdist/temporary-src/tf-a-v2.10.tar.gz
> Resolving public.pengutronix.de (public.pengutronix.de)... 2a01:4f9:2a:
> 2c17:5054:ff:fe65:8c93, 95.216.103.100
> Connecting to public.pengutronix.de (public.pengutronix.de)|2a01:4f9:2a:
> 2c17:5054:ff:fe65:8c93|:443... connected.
> HTTP request sent, awaiting response... 404 Not Found
> 2024-04-24 13:09:41 ERROR 404: Not Found.
> 
> 
> Could not download package
> URL: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/
> v2.10.tar.gz
> 
> make: *** [/usr/local/lib/ptxdist-2024.03.0/rules/post/
> ptxd_make_world_get.make:16: /home/adahl/mnt/bagend-src_archive/tf-a-
> v2.10.tar.gz] Error 1
> 
> 
> Greets
> Alex
> 
>>  PTXCONF_TF_A_ARCH_STRING="aarch64"
>>  PTXCONF_TF_A_ARM_ARCH_MAJOR_8=y
>>  PTXCONF_TF_A_ARM_ARCH_MAJOR=8
>> diff --git
>> a/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX
>> 8MQ.patch
>> b/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX
>> 8MQ.patch new file mode 100644
>> index 000000000000..cab995bda37a
>> --- /dev/null
>> +++
>> b/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX
>> 8MQ.patch @@ -0,0 +1,182 @@
>> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +Date: Wed, 13 Mar 2024 08:08:13 +0100
>> +Subject: [PATCH] fix(imx): disable DRAM retention by default on i.MX8MQ
>> +
>> +Building the default upstream configuration for the imx8mq-evk is no longer
>> +possible: The linker will complain that the TF-A image would no longer
>> +fit On-Chip SRAM.
>> +
>> +In order to make the i.MX8MQ Image buildable again, let's make the DRAM
>> +retention feature optional: It was added in v2.9 and it's possible to
>> +boot the systems without it. Users that make space elsewhere and wish to
>> +enable it can use the newly introduced IMX_DRAM_RETENTION parameter to
>> +configure it. The parameter is added to all i.MX8M variants, but only
>> +for i.MX8MQ, we disable it by default, as that's the one that currently
>> +has binary size problems.
>> +
>> +Change-Id: I714f8ea96f18154db02390ba500f4a2dc5329ee7
>> +Fixes: dd108c3c1fe3 ("feat(imx8mq): add the dram retention support for
>> imx8mq") +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +---
>> + plat/imx/common/include/imx_sip_svc.h | 8 ++++++++
>> + plat/imx/imx8m/imx8mm/platform.mk     | 9 ++++++++-
>> + plat/imx/imx8m/imx8mn/platform.mk     | 9 ++++++++-
>> + plat/imx/imx8m/imx8mp/platform.mk     | 9 ++++++++-
>> + plat/imx/imx8m/imx8mq/platform.mk     | 9 ++++++++-
>> + plat/imx/imx8m/include/dram.h         | 8 +++++++-
>> + 6 files changed, 47 insertions(+), 5 deletions(-)
>> +
>> +diff --git a/plat/imx/common/include/imx_sip_svc.h
>> b/plat/imx/common/include/imx_sip_svc.h +index 0e91c7174a52..5015eb6a1f11
>> 100644
>> +--- a/plat/imx/common/include/imx_sip_svc.h
>> ++++ b/plat/imx/common/include/imx_sip_svc.h
>> +@@ -57,8 +57,16 @@ int imx_soc_info_handler(uint32_t smc_fid, u_register_t
>> x1, + 			 u_register_t x2, u_register_t x3);
>> + int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
>> + 		    u_register_t x2, u_register_t x3);
>> ++#if IMX_DRAM_RETENTION
>> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
>> + 	u_register_t x1, u_register_t x2, u_register_t x3);
>> ++#else
>> ++static inline int dram_dvfs_handler(uint32_t smc_fid, void *handle,
>> ++		u_register_t x1, u_register_t x2, u_register_t x3)
>> ++{
>> ++	SMC_RET1(handle, SMC_UNK);
>> ++}
>> ++#endif
>> + #endif
>> + #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
>> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
>> +diff --git a/plat/imx/imx8m/imx8mm/platform.mk
>> b/plat/imx/imx8m/imx8mm/platform.mk +index 97f4f248824d..849ae5e4ca36
>> 100644
>> +--- a/plat/imx/imx8m/imx8mm/platform.mk
>> ++++ b/plat/imx/imx8m/imx8mm/platform.mk
>> +@@ -52,7 +52,6 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> + 				drivers/delay_timer/delay_timer.c		
> \
>> + 				drivers/delay_timer/
> generic_delay_timer.c	\
>> + 				${XLAT_TABLES_LIB_SRCS}		
> 		\
>> +-				${IMX_DRAM_SOURCES}			
> 	\
>> + 				${IMX_GIC_SOURCES}
>> +
>> + ifeq (${NEED_BL2},yes)
>> +@@ -153,6 +152,14 @@ ERRATA_A53_835769	:=	1
>> + ERRATA_A53_843419	:=	1
>> + ERRATA_A53_855873	:=	1
>> +
>> ++IMX_DRAM_RETENTION	?=	1
>> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
>> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
>> ++
>> ++ifeq (${IMX_DRAM_RETENTION},1)
>> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
>> ++endif
>> ++
>> + BL32_BASE		?=	0xbe000000
>> + $(eval $(call add_define,BL32_BASE))
>> +
>> +diff --git a/plat/imx/imx8m/imx8mn/platform.mk
>> b/plat/imx/imx8m/imx8mn/platform.mk +index e0826e29a88c..94d31a2681aa
>> 100644
>> +--- a/plat/imx/imx8m/imx8mn/platform.mk
>> ++++ b/plat/imx/imx8m/imx8mn/platform.mk
>> +@@ -46,7 +46,6 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> + 				drivers/arm/tzc/tzc380.c		
> 	\
>> + 				drivers/delay_timer/delay_timer.c		
> \
>> + 				drivers/delay_timer/
> generic_delay_timer.c	\
>> +-				${IMX_DRAM_SOURCES}			
> 	\
>> + 				${IMX_GIC_SOURCES}			
> 	\
>> + 				${XLAT_TABLES_LIB_SRCS}
>> +
>> +@@ -59,6 +58,14 @@ ERRATA_A53_835769	:=	1
>> + ERRATA_A53_843419	:=	1
>> + ERRATA_A53_855873	:=	1
>> +
>> ++IMX_DRAM_RETENTION	?=	1
>> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
>> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
>> ++
>> ++ifeq (${IMX_DRAM_RETENTION},1)
>> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
>> ++endif
>> ++
>> + BL32_BASE		?=	0xbe000000
>> + $(eval $(call add_define,BL32_BASE))
>> +
>> +diff --git a/plat/imx/imx8m/imx8mp/platform.mk
>> b/plat/imx/imx8m/imx8mp/platform.mk +index ce6907195152..1f699c4f26f0
>> 100644
>> +--- a/plat/imx/imx8m/imx8mp/platform.mk
>> ++++ b/plat/imx/imx8m/imx8mp/platform.mk
>> +@@ -47,7 +47,6 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> + 				drivers/arm/tzc/tzc380.c		
> 	\
>> + 				drivers/delay_timer/delay_timer.c		
> \
>> + 				drivers/delay_timer/
> generic_delay_timer.c	\
>> +-				${IMX_DRAM_SOURCES}			
> 	\
>> + 				${IMX_GIC_SOURCES}			
> 	\
>> + 				${XLAT_TABLES_LIB_SRCS}
>> +
>> +@@ -150,6 +149,14 @@ ERRATA_A53_835769	:=	1
>> + ERRATA_A53_843419	:=	1
>> + ERRATA_A53_855873	:=	1
>> +
>> ++IMX_DRAM_RETENTION	?=	1
>> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
>> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
>> ++
>> ++ifeq (${IMX_DRAM_RETENTION},1)
>> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
>> ++endif
>> ++
>> + BL32_BASE		?=	0x56000000
>> + $(eval $(call add_define,BL32_BASE))
>> +
>> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
>> b/plat/imx/imx8m/imx8mq/platform.mk +index b1c189fa09f5..b48449725791
>> 100644
>> +--- a/plat/imx/imx8m/imx8mq/platform.mk
>> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
>> +@@ -42,7 +42,6 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> + 				drivers/delay_timer/delay_timer.c		
> \
>> + 				drivers/delay_timer/
> generic_delay_timer.c	\
>> + 				${XLAT_TABLES_LIB_SRCS}		
> 		\
>> +-				${IMX_DRAM_SOURCES}			
> 	\
>> + 				${IMX_GIC_SOURCES}
>> +
>> + ENABLE_PIE		:=	1
>> +@@ -55,6 +54,14 @@ ERRATA_A53_835769	:=	1
>> + ERRATA_A53_843419	:=	1
>> + ERRATA_A53_855873	:=	1
>> +
>> ++IMX_DRAM_RETENTION	?=	0
>> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
>> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
>> ++
>> ++ifeq (${IMX_DRAM_RETENTION},1)
>> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
>> ++endif
>> ++
>> + BL32_BASE		?=	0xfe000000
>> + $(eval $(call add_define,BL32_BASE))
>> +
>> +diff --git a/plat/imx/imx8m/include/dram.h b/plat/imx/imx8m/include/dram.h
>> +index 719c39063778..1cf0666e9cad 100644
>> +--- a/plat/imx/imx8m/include/dram.h
>> ++++ b/plat/imx/imx8m/include/dram.h
>> +@@ -70,13 +70,19 @@ struct dram_info {
>> +
>> + extern struct dram_info dram_info;
>> +
>> +-void dram_info_init(unsigned long dram_timing_base);
>> + void dram_umctl2_init(struct dram_timing_info *timing);
>> + void dram_phy_init(struct dram_timing_info *timing);
>> +
>> + /* dram retention */
>> ++#if IMX_DRAM_RETENTION
>> ++void dram_info_init(unsigned long dram_timing_base);
>> + void dram_enter_retention(void);
>> + void dram_exit_retention(void);
>> ++#else
>> ++static inline void dram_info_init(unsigned long dram_timing_base) {}
>> ++static inline void dram_enter_retention(void) {}
>> ++static inline void dram_exit_retention(void) {}
>> ++#endif
>> +
>> + void dram_clock_switch(unsigned int target_drate, bool bypass_mode);
>> +
>> diff --git
>> a/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
>> -BL.patch
>> b/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
>> -BL.patch new file mode 100644
>> index 000000000000..745e171b40e3
>> --- /dev/null
>> +++
>> b/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
>> -BL.patch @@ -0,0 +1,61 @@
>> +From 44f35b67ee4f89b05408ecfe7b4b2c1ae5366b72 Mon Sep 17 00:00:00 2001
>> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +Date: Tue, 12 Mar 2024 18:36:46 +0100
>> +Subject: [PATCH 1/3] fix(pmu): fix breakage on ARMv7 CPUs with SP_min as
>> BL32 +
>> +While comments introduced with the original commit claim that
>> +pmuv3_disable_el3()/pmuv3_init_el3() are compatible with PMUv2 and
>> +PMUv1, this is not true in practice: The function accesses the Secure
>> +Debug Control Register (SDCR), which only available to ARMv8 CPUs.
>> +
>> +ARMv8 CPUs executing in AArch32 mode would thus be able to disable
>> +their PMUv3, while ARMv7 CPUs would hang trying to access the SDCR.
>> +
>> +Fix this by only doing PMUv3 handling when we know a PMUv3 to be
>> +available. This resolves boot hanging on all STM32MP15 platforms
>> +that use SP_min as BL32 instead of OP-TEE.
>> +
>> +Change-Id: I40f7611cf46b89a30243cc55bf55a8d9c9de93c8
>> +Fixes: c73686a11cea ("feat(pmu): introduce pmuv3 lib/extensions folder")
>> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +---
>> + lib/el3_runtime/aarch32/context_mgmt.c | 7 ++-----
>> + lib/extensions/pmuv3/aarch32/pmuv3.c   | 4 ----
>> + 2 files changed, 2 insertions(+), 9 deletions(-)
>> +
>> +diff --git a/lib/el3_runtime/aarch32/context_mgmt.c
>> b/lib/el3_runtime/aarch32/context_mgmt.c +index b60b8e0f05d0..72af43d3dcb0
>> 100644
>> +--- a/lib/el3_runtime/aarch32/context_mgmt.c
>> ++++ b/lib/el3_runtime/aarch32/context_mgmt.c
>> +@@ -149,11 +149,8 @@ static void enable_extensions_nonsecure(bool
>> el2_unused) + 		trf_init_el3();
>> + 	}
>> +
>> +-	/*
>> +-	 * Also applies to PMU < v3. The PMU is only disabled for EL3 and 
> Secure
>> +-	 * state execution. This does not affect lower NS ELs.
>> +-	 */
>> +-	pmuv3_init_el3();
>> ++	if (read_feat_pmuv3_id_field() >= 3)
>> ++		pmuv3_init_el3();
>> + #endif /*  IMAGE_BL32 */
>> + }
>> +
>> +diff --git a/lib/extensions/pmuv3/aarch32/pmuv3.c
>> b/lib/extensions/pmuv3/aarch32/pmuv3.c +index effb7e02dc29..456a48efb0fb
>> 100644
>> +--- a/lib/extensions/pmuv3/aarch32/pmuv3.c
>> ++++ b/lib/extensions/pmuv3/aarch32/pmuv3.c
>> +@@ -25,10 +25,6 @@ static u_register_t mtpmu_disable_el3(u_register_t sdcr)
>> + 	return sdcr;
>> + }
>> +
>> +-/*
>> +- * Applies to all PMU versions. Name is PMUv3 for compatibility with
>> aarch64 and +- * to not clash with platforms which reuse the PMU name
>> +- */
>> + void pmuv3_init_el3(void)
>> + {
>> + 	u_register_t sdcr = read_sdcr();
>> +--
>> +2.39.2
>> +
>> diff --git
>> a/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-ru
>> nti.patch
>> b/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-ru
>> nti.patch new file mode 100644
>> index 000000000000..c48833730753
>> --- /dev/null
>> +++
>> b/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-ru
>> nti.patch @@ -0,0 +1,69 @@
>> +From aeb68be64c5c47142de3c95a8961749f7b33030a Mon Sep 17 00:00:00 2001
>> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +Date: Wed, 13 Mar 2024 02:08:54 +0100
>> +Subject: [PATCH 2/3] feat(imx8mq): detect console base address during
>> runtime +
>> +Change-Id: I9ba70f7068e762da979bd103390fa006c3a5d480
>> +---
>> + plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 8 +++++++-
>> + plat/imx/imx8m/imx8mq/platform.mk         | 4 ++++
>> + 2 files changed, 11 insertions(+), 1 deletion(-)
>> +
>> +diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c +index
>> 7065a658614f..70c2def7d18b 100644
>> +--- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> ++++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> +@@ -26,6 +26,7 @@
>> + #include <imx_aipstz.h>
>> + #include <imx_uart.h>
>> + #include <imx8m_caam.h>
>> ++#include <imx8m_ccm.h>
>> + #include <plat_imx8.h>
>> +
>> + #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
>> +@@ -145,6 +146,7 @@ static void bl31_tz380_setup(void)
>> + void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> + 			u_register_t arg2, u_register_t arg3)
>> + {
>> ++	unsigned int console_base = IMX_BOOT_UART_BASE;
>> + 	static console_t console;
>> + 	int i;
>> + 	/* enable CSU NS access permission */
>> +@@ -154,7 +156,11 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, +
>> + 	imx_aipstz_init(aipstz);
>> +
>> +-	console_imx_uart_register(IMX_BOOT_UART_BASE, 
> IMX_BOOT_UART_CLK_IN_HZ,
>> ++	if (console_base == 0U) {
>> ++		console_base = imx8m_uart_get_base();
>> ++	}
>> ++
>> ++	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
>> + 		IMX_CONSOLE_BAUDRATE, &console);
>> + 	/* This console is only used for boot stage */
>> + 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
>> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
>> b/plat/imx/imx8m/imx8mq/platform.mk +index b1c189fa09f5..648159eb3d10
>> 100644
>> +--- a/plat/imx/imx8m/imx8mq/platform.mk
>> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
>> +@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> + 				plat/imx/imx8m/gpc_common.c		
> 	\
>> + 				plat/imx/imx8m/imx_aipstz.c		
> 	\
>> + 				plat/imx/imx8m/imx8m_caam.c		
> 	\
>> ++				plat/imx/imx8m/imx8m_ccm.c		
> 	\
>> + 				plat/imx/imx8m/imx8m_psci_common.c	
> 	\
>> + 				plat/imx/imx8m/imx8mq/gpc.c		
> 	\
>> + 				plat/imx/common/imx8_topology.c		
> 	\
>> +@@ -62,6 +63,9 @@ BL32_SIZE		?=	0x2000000
>> + $(eval $(call add_define,BL32_SIZE))
>> +
>> + IMX_BOOT_UART_BASE	?=	0x30860000
>> ++ifeq (${IMX_BOOT_UART_BASE},auto)
>> ++    override IMX_BOOT_UART_BASE	:=	0
>> ++endif
>> + $(eval $(call add_define,IMX_BOOT_UART_BASE))
>> +
>> + ifeq (${SPD},trusty)
>> +--
>> +2.39.2
>> +
>> diff --git
>> a/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
>> b/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch new
>> file mode 100644
>> index 000000000000..7d2b36119599
>> --- /dev/null
>> +++ b/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
>> @@ -0,0 +1,174 @@
>> +From 5d2f3f48a66a1f3f90d35679920832569100ed35 Mon Sep 17 00:00:00 2001
>> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +Date: Wed, 13 Mar 2024 08:08:13 +0100
>> +Subject: [PATCH 3/3] imx: disable DRAM retention by default
>> +
>> +Building the default upstream configuration is no longer possible
>> +
>> +Change-Id: I714f8ea96f18154db02390ba500f4a2dc5329ee7
>> +---
>> + plat/imx/common/include/imx_sip_svc.h | 8 ++++++++
>> + plat/imx/imx8m/imx8mm/platform.mk     | 9 ++++++++-
>> + plat/imx/imx8m/imx8mn/platform.mk     | 9 ++++++++-
>> + plat/imx/imx8m/imx8mp/platform.mk     | 9 ++++++++-
>> + plat/imx/imx8m/imx8mq/platform.mk     | 9 ++++++++-
>> + plat/imx/imx8m/include/dram.h         | 8 +++++++-
>> + 6 files changed, 47 insertions(+), 5 deletions(-)
>> +
>> +diff --git a/plat/imx/common/include/imx_sip_svc.h
>> b/plat/imx/common/include/imx_sip_svc.h +index 0e91c7174a52..5015eb6a1f11
>> 100644
>> +--- a/plat/imx/common/include/imx_sip_svc.h
>> ++++ b/plat/imx/common/include/imx_sip_svc.h
>> +@@ -57,8 +57,16 @@ int imx_soc_info_handler(uint32_t smc_fid, u_register_t
>> x1, + 			 u_register_t x2, u_register_t x3);
>> + int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
>> + 		    u_register_t x2, u_register_t x3);
>> ++#if IMX_DRAM_RETENTION
>> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
>> + 	u_register_t x1, u_register_t x2, u_register_t x3);
>> ++#else
>> ++static inline int dram_dvfs_handler(uint32_t smc_fid, void *handle,
>> ++		u_register_t x1, u_register_t x2, u_register_t x3)
>> ++{
>> ++	SMC_RET1(handle, SMC_UNK);
>> ++}
>> ++#endif
>> + #endif
>> + #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) || defined(PLAT_imx8mp)
>> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
>> +diff --git a/plat/imx/imx8m/imx8mm/platform.mk
>> b/plat/imx/imx8m/imx8mm/platform.mk +index 97f4f248824d..849ae5e4ca36
>> 100644
>> +--- a/plat/imx/imx8m/imx8mm/platform.mk
>> ++++ b/plat/imx/imx8m/imx8mm/platform.mk
>> +@@ -52,7 +52,6 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> + 				drivers/delay_timer/delay_timer.c		
> \
>> + 				drivers/delay_timer/
> generic_delay_timer.c	\
>> + 				${XLAT_TABLES_LIB_SRCS}		
> 		\
>> +-				${IMX_DRAM_SOURCES}			
> 	\
>> + 				${IMX_GIC_SOURCES}
>> +
>> + ifeq (${NEED_BL2},yes)
>> +@@ -153,6 +152,14 @@ ERRATA_A53_835769	:=	1
>> + ERRATA_A53_843419	:=	1
>> + ERRATA_A53_855873	:=	1
>> +
>> ++IMX_DRAM_RETENTION	?=	1
>> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
>> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
>> ++
>> ++ifeq (${IMX_DRAM_RETENTION},1)
>> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
>> ++endif
>> ++
>> + BL32_BASE		?=	0xbe000000
>> + $(eval $(call add_define,BL32_BASE))
>> +
>> +diff --git a/plat/imx/imx8m/imx8mn/platform.mk
>> b/plat/imx/imx8m/imx8mn/platform.mk +index e0826e29a88c..94d31a2681aa
>> 100644
>> +--- a/plat/imx/imx8m/imx8mn/platform.mk
>> ++++ b/plat/imx/imx8m/imx8mn/platform.mk
>> +@@ -46,7 +46,6 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> + 				drivers/arm/tzc/tzc380.c		
> 	\
>> + 				drivers/delay_timer/delay_timer.c		
> \
>> + 				drivers/delay_timer/
> generic_delay_timer.c	\
>> +-				${IMX_DRAM_SOURCES}			
> 	\
>> + 				${IMX_GIC_SOURCES}			
> 	\
>> + 				${XLAT_TABLES_LIB_SRCS}
>> +
>> +@@ -59,6 +58,14 @@ ERRATA_A53_835769	:=	1
>> + ERRATA_A53_843419	:=	1
>> + ERRATA_A53_855873	:=	1
>> +
>> ++IMX_DRAM_RETENTION	?=	1
>> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
>> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
>> ++
>> ++ifeq (${IMX_DRAM_RETENTION},1)
>> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
>> ++endif
>> ++
>> + BL32_BASE		?=	0xbe000000
>> + $(eval $(call add_define,BL32_BASE))
>> +
>> +diff --git a/plat/imx/imx8m/imx8mp/platform.mk
>> b/plat/imx/imx8m/imx8mp/platform.mk +index ce6907195152..1f699c4f26f0
>> 100644
>> +--- a/plat/imx/imx8m/imx8mp/platform.mk
>> ++++ b/plat/imx/imx8m/imx8mp/platform.mk
>> +@@ -47,7 +47,6 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> + 				drivers/arm/tzc/tzc380.c		
> 	\
>> + 				drivers/delay_timer/delay_timer.c		
> \
>> + 				drivers/delay_timer/
> generic_delay_timer.c	\
>> +-				${IMX_DRAM_SOURCES}			
> 	\
>> + 				${IMX_GIC_SOURCES}			
> 	\
>> + 				${XLAT_TABLES_LIB_SRCS}
>> +
>> +@@ -150,6 +149,14 @@ ERRATA_A53_835769	:=	1
>> + ERRATA_A53_843419	:=	1
>> + ERRATA_A53_855873	:=	1
>> +
>> ++IMX_DRAM_RETENTION	?=	1
>> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
>> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
>> ++
>> ++ifeq (${IMX_DRAM_RETENTION},1)
>> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
>> ++endif
>> ++
>> + BL32_BASE		?=	0x56000000
>> + $(eval $(call add_define,BL32_BASE))
>> +
>> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
>> b/plat/imx/imx8m/imx8mq/platform.mk +index 648159eb3d10..f61620bd4224
>> 100644
>> +--- a/plat/imx/imx8m/imx8mq/platform.mk
>> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
>> +@@ -43,7 +43,6 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> + 				drivers/delay_timer/delay_timer.c		
> \
>> + 				drivers/delay_timer/
> generic_delay_timer.c	\
>> + 				${XLAT_TABLES_LIB_SRCS}		
> 		\
>> +-				${IMX_DRAM_SOURCES}			
> 	\
>> + 				${IMX_GIC_SOURCES}
>> +
>> + ENABLE_PIE		:=	1
>> +@@ -56,6 +55,14 @@ ERRATA_A53_835769	:=	1
>> + ERRATA_A53_843419	:=	1
>> + ERRATA_A53_855873	:=	1
>> +
>> ++IMX_DRAM_RETENTION	?=	0
>> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
>> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
>> ++
>> ++ifeq (${IMX_DRAM_RETENTION},1)
>> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
>> ++endif
>> ++
>> + BL32_BASE		?=	0xfe000000
>> + $(eval $(call add_define,BL32_BASE))
>> +
>> +diff --git a/plat/imx/imx8m/include/dram.h b/plat/imx/imx8m/include/dram.h
>> +index 719c39063778..1cf0666e9cad 100644
>> +--- a/plat/imx/imx8m/include/dram.h
>> ++++ b/plat/imx/imx8m/include/dram.h
>> +@@ -70,13 +70,19 @@ struct dram_info {
>> +
>> + extern struct dram_info dram_info;
>> +
>> +-void dram_info_init(unsigned long dram_timing_base);
>> + void dram_umctl2_init(struct dram_timing_info *timing);
>> + void dram_phy_init(struct dram_timing_info *timing);
>> +
>> + /* dram retention */
>> ++#if IMX_DRAM_RETENTION
>> ++void dram_info_init(unsigned long dram_timing_base);
>> + void dram_enter_retention(void);
>> + void dram_exit_retention(void);
>> ++#else
>> ++static inline void dram_info_init(unsigned long dram_timing_base) {}
>> ++static inline void dram_enter_retention(void) {}
>> ++static inline void dram_exit_retention(void) {}
>> ++#endif
>> +
>> + void dram_clock_switch(unsigned int target_drate, bool bypass_mode);
>> +
>> +--
>> +2.39.2
>> +
>> diff --git
>> a/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-ru
>> nti.patch
>> b/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-ru
>> nti.patch new file mode 100644
>> index 000000000000..d375a45c1598
>> --- /dev/null
>> +++
>> b/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-ru
>> nti.patch @@ -0,0 +1,72 @@
>> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +Date: Wed, 13 Mar 2024 02:08:54 +0100
>> +Subject: [PATCH] feat(imx8mq): detect console base address during runtime
>> +
>> +On the i.MX8M SoCs, TF-A doesn't itself initialize the UART, but depends
>> +on BL2 to set it up beforehand. To allow using the same TF-A binary on
>> +boards with different UART assignment, TF-A On i.MX8M M/N/P supports
>> +dynamically determining the UART in use. The code is also applicable to
>> +the i.MX8MQ, so enable it there too.
>> +
>> +Change-Id: I9ba70f7068e762da979bd103390fa006c3a5d480
>> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +---
>> + plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 8 +++++++-
>> + plat/imx/imx8m/imx8mq/platform.mk         | 4 ++++
>> + 2 files changed, 11 insertions(+), 1 deletion(-)
>> +
>> +diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c +index
>> 7065a658614f..70c2def7d18b 100644
>> +--- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> ++++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> +@@ -26,6 +26,7 @@
>> + #include <imx_aipstz.h>
>> + #include <imx_uart.h>
>> + #include <imx8m_caam.h>
>> ++#include <imx8m_ccm.h>
>> + #include <plat_imx8.h>
>> +
>> + #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
>> +@@ -145,6 +146,7 @@ static void bl31_tz380_setup(void)
>> + void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> + 			u_register_t arg2, u_register_t arg3)
>> + {
>> ++	unsigned int console_base = IMX_BOOT_UART_BASE;
>> + 	static console_t console;
>> + 	int i;
>> + 	/* enable CSU NS access permission */
>> +@@ -154,7 +156,11 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, +
>> + 	imx_aipstz_init(aipstz);
>> +
>> +-	console_imx_uart_register(IMX_BOOT_UART_BASE, 
> IMX_BOOT_UART_CLK_IN_HZ,
>> ++	if (console_base == 0U) {
>> ++		console_base = imx8m_uart_get_base();
>> ++	}
>> ++
>> ++	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
>> + 		IMX_CONSOLE_BAUDRATE, &console);
>> + 	/* This console is only used for boot stage */
>> + 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
>> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
>> b/plat/imx/imx8m/imx8mq/platform.mk +index b48449725791..f61620bd4224
>> 100644
>> +--- a/plat/imx/imx8m/imx8mq/platform.mk
>> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
>> +@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> + 				plat/imx/imx8m/gpc_common.c		
> 	\
>> + 				plat/imx/imx8m/imx_aipstz.c		
> 	\
>> + 				plat/imx/imx8m/imx8m_caam.c		
> 	\
>> ++				plat/imx/imx8m/imx8m_ccm.c		
> 	\
>> + 				plat/imx/imx8m/imx8m_psci_common.c	
> 	\
>> + 				plat/imx/imx8m/imx8mq/gpc.c		
> 	\
>> + 				plat/imx/common/imx8_topology.c		
> 	\
>> +@@ -69,6 +70,9 @@ BL32_SIZE		?=	0x2000000
>> + $(eval $(call add_define,BL32_SIZE))
>> +
>> + IMX_BOOT_UART_BASE	?=	0x30860000
>> ++ifeq (${IMX_BOOT_UART_BASE},auto)
>> ++    override IMX_BOOT_UART_BASE	:=	0
>> ++endif
>> + $(eval $(call add_define,IMX_BOOT_UART_BASE))
>> +
>> + ifeq (${SPD},trusty)
>> diff --git
>> a/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
>> -BL.patch
>> b/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
>> -BL.patch new file mode 100644
>> index 000000000000..60abc4862d7c
>> --- /dev/null
>> +++
>> b/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as
>> -BL.patch @@ -0,0 +1,57 @@
>> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +Date: Tue, 12 Mar 2024 18:36:46 +0100
>> +Subject: [PATCH] fix(pmu): fix breakage on ARMv7 CPUs with SP_min as BL32
>> +
>> +While comments introduced with the original commit claim that
>> +pmuv3_disable_el3()/pmuv3_init_el3() are compatible with PMUv2 and
>> +PMUv1, this is not true in practice: The function accesses the Secure
>> +Debug Control Register (SDCR), which only available to ARMv8 CPUs.
>> +
>> +ARMv8 CPUs executing in AArch32 mode would thus be able to disable
>> +their PMUv3, while ARMv7 CPUs would hang trying to access the SDCR.
>> +
>> +Fix this by only doing PMUv3 handling when we know a PMUv3 to be
>> +available. This resolves boot hanging on all STM32MP15 platforms
>> +that use SP_min as BL32 instead of OP-TEE.
>> +
>> +Change-Id: I40f7611cf46b89a30243cc55bf55a8d9c9de93c8
>> +Fixes: c73686a11cea ("feat(pmu): introduce pmuv3 lib/extensions folder")
>> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +---
>> + lib/el3_runtime/aarch32/context_mgmt.c | 7 ++-----
>> + lib/extensions/pmuv3/aarch32/pmuv3.c   | 4 ----
>> + 2 files changed, 2 insertions(+), 9 deletions(-)
>> +
>> +diff --git a/lib/el3_runtime/aarch32/context_mgmt.c
>> b/lib/el3_runtime/aarch32/context_mgmt.c +index b60b8e0f05d0..72af43d3dcb0
>> 100644
>> +--- a/lib/el3_runtime/aarch32/context_mgmt.c
>> ++++ b/lib/el3_runtime/aarch32/context_mgmt.c
>> +@@ -149,11 +149,8 @@ static void enable_extensions_nonsecure(bool
>> el2_unused) + 		trf_init_el3();
>> + 	}
>> +
>> +-	/*
>> +-	 * Also applies to PMU < v3. The PMU is only disabled for EL3 and 
> Secure
>> +-	 * state execution. This does not affect lower NS ELs.
>> +-	 */
>> +-	pmuv3_init_el3();
>> ++	if (read_feat_pmuv3_id_field() >= 3)
>> ++		pmuv3_init_el3();
>> + #endif /*  IMAGE_BL32 */
>> + }
>> +
>> +diff --git a/lib/extensions/pmuv3/aarch32/pmuv3.c
>> b/lib/extensions/pmuv3/aarch32/pmuv3.c +index effb7e02dc29..456a48efb0fb
>> 100644
>> +--- a/lib/extensions/pmuv3/aarch32/pmuv3.c
>> ++++ b/lib/extensions/pmuv3/aarch32/pmuv3.c
>> +@@ -25,10 +25,6 @@ static u_register_t mtpmu_disable_el3(u_register_t sdcr)
>> + 	return sdcr;
>> + }
>> +
>> +-/*
>> +- * Applies to all PMU versions. Name is PMUv3 for compatibility with
>> aarch64 and +- * to not clash with platforms which reuse the PMU name
>> +- */
>> + void pmuv3_init_el3(void)
>> + {
>> + 	u_register_t sdcr = read_sdcr();
>> diff --git
>> a/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024
>> 031.patch
>> b/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024
>> 031.patch new file mode 100644
>> index 000000000000..58cbc06803cb
>> --- /dev/null
>> +++
>> b/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-2024
>> 031.patch @@ -0,0 +1,21 @@
>> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> +Date: Fri, 15 Mar 2024 21:18:29 +0100
>> +Subject: [PATCH] Release 2.10/customers/pengutronix/distrokit/20240315-1
>> +
>> +---
>> + Makefile | 2 +-
>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>> +
>> +diff --git a/Makefile b/Makefile
>> +index 97c3c1548a78..56556db0be78 100644
>> +--- a/Makefile
>> ++++ b/Makefile
>> +@@ -222,7 +222,7 @@ endif #(Debug)
>> + ifeq (${BUILD_STRING},)
>> + 	BUILD_STRING  :=  $(shell git describe --always --dirty --tags 2>
>> /dev/null) + endif
>> +-VERSION_STRING    :=  v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}
>> ++VERSION_STRING    := 
>> v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}-20240315-1 +
>> + ifeq (${AARCH32_INSTRUCTION_SET},A32)
>> + 	TF_CFLAGS_aarch32	+=	-marm
>> diff --git a/patches/tf-a-v2.10/series b/patches/tf-a-v2.10/series
>> new file mode 100644
>> index 000000000000..4dd620f0aa06
>> --- /dev/null
>> +++ b/patches/tf-a-v2.10/series
>> @@ -0,0 +1,19 @@
>> +# umpf-base: v2.10
>> +# umpf-name: 2.10/customers/pengutronix/distrokit
>> +# umpf-version: 2.10/customers/pengutronix/distrokit/20240315-1
>> +# umpf-topic: v2.10/topic/imx8mq-size
>> +# umpf-hashinfo: a972970be20be852b0d48576dfb1c233612efbdd
>> +# umpf-topic-range:
>> b6c0948400594e3cc4dbb5a4ef04b815d2675808..6c0660bf6047f288628c282e44b9b1b06
>> bd1d33a +0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8MQ.patch
>> +# umpf-topic: v2.10/topic/imx8mq-console
>> +# umpf-hashinfo: 252b1100fb3c424e0fe1043e60414c3d7e0fa675
>> +# umpf-topic-range:
>> 6c0660bf6047f288628c282e44b9b1b06bd1d33a..ec9b46be3c0c561ed61f113dc3c15085d
>> bce5bf7 +0101-feat-imx8mq-detect-console-base-address-during-runti.patch
>> +# umpf-topic: v2.10/topic/stm32mp1
>> +# umpf-hashinfo: 44f35b67ee4f89b05408ecfe7b4b2c1ae5366b72
>> +# umpf-topic-range:
>> ec9b46be3c0c561ed61f113dc3c15085dbce5bf7..10dfac53fdfff2f98d8140863f583df47
>> 2483f1d +0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
>> +# umpf-release: 2.10/customers/pengutronix/distrokit/20240315-1
>> +# umpf-topic-range:
>> 10dfac53fdfff2f98d8140863f583df472483f1d..288664026c3117bda3f8f2275e76bb97b
>> e116b89 +0301-Release-2.10-customers-pengutronix-distrokit-2024031.patch
>> +# umpf-end
>> diff --git
>> a/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options
>> .patch
>> b/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options
>> .patch deleted file mode 100644
>> index e86f31b8858a..000000000000
>> ---
>> a/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-options
>> .patch +++ /dev/null
>> @@ -1,35 +0,0 @@
>> -From: Marco Felsch <m.felsch@pengutronix.de>
>> -Date: Thu, 24 Nov 2022 11:02:05 +0100
>> -Subject: [PATCH] build(makefile): add helper to detect linker options
>> -
>> -This is a small helper to check for possible linker options. If the
>> -linker supports the requested option it is returned and if not nothing
>> -will be returned, e.g.:
>> -
>> -  TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
>> -
>> -can be called unconditional.
>> -
>> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>> -Change-Id: I236800852ece49948ff53a0b91fddba53c8f0f95
>> ----
>> - make_helpers/build_macros.mk | 6 ++++++
>> - 1 file changed, 6 insertions(+)
>> -
>> -diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
>> -index 426e344941d9..7d0b0a511226 100644
>> ---- a/make_helpers/build_macros.mk
>> -+++ b/make_helpers/build_macros.mk
>> -@@ -86,6 +86,12 @@ define assert_numerics
>> -     $(foreach num,$1,$(eval $(call assert_numeric,$(num))))
>> - endef
>> -
>> -+# Convenience function to check for a given linker option. An call to
>> -+# $(call ld_option, --no-XYZ) will return --no-XYZ if supported by the
>> linker -+define ld_option
>> -+	$(shell if $(LD) $(1) -v >/dev/null 2>&1; then echo $(1); fi )
>> -+endef
>> -+
>> - # CREATE_SEQ is a recursive function to create sequence of numbers from 1
>> to - # $(2) and assign the sequence to $(1)
>> - define CREATE_SEQ
>> diff --git
>> a/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.p
>> atch
>> b/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.p
>> atch deleted file mode 100644
>> index b254a578d7d4..000000000000
>> ---
>> a/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions.p
>> atch +++ /dev/null
>> @@ -1,54 +0,0 @@
>> -From: Marco Felsch <m.felsch@pengutronix.de>
>> -Date: Wed, 9 Nov 2022 12:59:09 +0100
>> -Subject: [PATCH] feat(build): add support for new binutils versions
>> -
>> -Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
>> -of a new warning when linking the bl*.elf in the form:
>> -
>> -  ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section
>> implies executable stack -  ld.bfd: NOTE: This behaviour is deprecated and
>> will be removed in a future version of the linker -  ld.bfd: warning:
>> bl2.elf has a LOAD segment with RWX permissions -  ld.bfd: warning:
>> bl32.elf has a LOAD segment with RWX permissions -
>> -These new warnings are enbaled by default to secure elf binaries:
>> - -
>> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01
>> a6e8434126b8fac7aa75107 - -
>> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b
>> 4500c9277a8e9d0f07e6774 -
>> -Fix it in a similar way to what the Linux kernel does, see:
>> -https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.co
>> m/ -
>> -Following the reasoning there, we set "-z noexecstack" for all linkers
>> -(although LLVM's LLD defaults to it) and optional add
>> ---no-warn-rwx-segments since this a ld.bfd related.
>> -
>> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>> -Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
>> -Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
>> ----
>> - Makefile | 6 ++++++
>> - 1 file changed, 6 insertions(+)
>> -
>> -diff --git a/Makefile b/Makefile
>> -index 1ddb7b84417d..1bfff716485a 100644
>> ---- a/Makefile
>> -+++ b/Makefile
>> -@@ -416,6 +416,8 @@ endif
>> -
>> - GCC_V_OUTPUT		:=	$(shell $(CC) -v 2>&1)
>> -
>> -+TF_LDFLAGS		+=	-z noexecstack
>> -+
>> - # LD = armlink
>> - ifneq ($(findstring armlink,$(notdir $(LD))),)
>> - TF_LDFLAGS		+=	--diag_error=warning --
> lto_level=O1
>> -@@ -451,6 +453,10 @@ TF_LDFLAGS		+=	$
> (TF_LDFLAGS_$(ARCH))
>> - endif
>> - endif
>> -
>> -+# With ld.bfd version 2.29 and newer new warnings are added. Skip those
>> since we -+# are not loaded by a elf loader.
>> -+TF_LDFLAGS		+=	$(call ld_option, --no-warn-rwx-
> segments)
>> -+
>> - DTC_FLAGS		+=	-I dts -O dtb
>> - DTC_CPPFLAGS		+=	-P -nostdinc -Iinclude -Ifdts -
> undef \
>> - 				-x assembler-with-cpp $(DEFINES)
>> diff --git
>> a/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-v
>> ia.patch
>> b/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-v
>> ia.patch deleted file mode 100644
>> index 958b7fda325a..000000000000
>> ---
>> a/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-v
>> ia.patch +++ /dev/null
>> @@ -1,41 +0,0 @@
>> -From: Lucas Stach <l.stach@pengutronix.de>
>> -Date: Thu, 8 Dec 2022 15:54:26 +0100
>> -Subject: [PATCH] feat(imx8mq): make IMX_BOOT_UART_BASE configurable via
>> build - parameter
>> -
>> -This aligns the i.MX8MQ build with the other i.MX8M platforms by allowing
>> -to override the default IMX_BOOT_UART_BASE value via a make parameter.
>> -
>> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> -Change-Id: Iad9b844517209fc7d051c61767f71ac9fa2b55c7
>> ----
>> - plat/imx/imx8m/imx8mq/include/platform_def.h | 1 -
>> - plat/imx/imx8m/imx8mq/platform.mk            | 3 +++
>> - 2 files changed, 3 insertions(+), 1 deletion(-)
>> -
>> -diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h
>> b/plat/imx/imx8m/imx8mq/include/platform_def.h -index
>> 1dd22d952305..4671cd3afa40 100644
>> ---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
>> -+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
>> -@@ -54,7 +54,6 @@
>> -
>> - #define HAB_RVT_BASE			U(0x00000880) /* 
> HAB_RVT for i.MX8MQ */
>> -
>> --#define IMX_BOOT_UART_BASE		U(0x30860000)
>> - #define IMX_BOOT_UART_CLK_IN_HZ		25000000 /* Select 
> 25Mhz oscillator */
>> - #define PLAT_CRASH_UART_BASE		IMX_BOOT_UART_BASE
>> - #define PLAT_CRASH_UART_CLK_IN_HZ	25000000
>> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
>> b/plat/imx/imx8m/imx8mq/platform.mk -index 7b6df920c924..f62d3aa5be15
>> 100644
>> ---- a/plat/imx/imx8m/imx8mq/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
>> -@@ -52,6 +52,9 @@ $(eval $(call add_define,BL32_BASE))
>> - BL32_SIZE		?=	0x2000000
>> - $(eval $(call add_define,BL32_SIZE))
>> -
>> -+IMX_BOOT_UART_BASE	?=	0x30860000
>> -+$(eval $(call add_define,IMX_BOOT_UART_BASE))
>> -+
>> - ifeq (${SPD},trusty)
>> - 	BL31_CFLAGS    +=      -DPLAT_XLAT_TABLES_DYNAMIC=1
>> - endif
>> diff --git
>> a/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.p
>> atch
>> b/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.p
>> atch deleted file mode 100644
>> index 0b1bc7e8c82b..000000000000
>> ---
>> a/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.p
>> atch +++ /dev/null
>> @@ -1,30 +0,0 @@
>> -From: Lucas Stach <l.stach@pengutronix.de>
>> -Date: Thu, 8 Dec 2022 17:51:17 +0100
>> -Subject: [PATCH] feat(imx8mq): remove empty bl31_plat_runtime_setup
>> -
>> -Having this empty definition is actively harmful, as it prevents the
>> -default weak function to be used, which does a switch of the console
>> -state.
>> -
>> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> -Change-Id: I3b78e0c524c4907714036dba573a44d8f9c48b09
>> ----
>> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 5 -----
>> - 1 file changed, 5 deletions(-)
>> -
>> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
>> 59c3779abb7f..0feb6d7fbad2 100644
>> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -@@ -227,11 +227,6 @@ unsigned int plat_get_syscnt_freq2(void)
>> - 	return COUNTER_FREQUENCY;
>> - }
>> -
>> --void bl31_plat_runtime_setup(void)
>> --{
>> --	return;
>> --}
>> --
>> - #ifdef SPD_trusty
>> - void plat_trusty_set_boot_args(aapcs64_params_t *args)
>> - {
>> diff --git a/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
>> b/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch deleted
>> file mode 100644
>> index 3a44ae3a149d..000000000000
>> --- a/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
>> +++ /dev/null
>> @@ -1,51 +0,0 @@
>> -From: Lucas Stach <l.stach@pengutronix.de>
>> -Date: Thu, 8 Dec 2022 16:00:04 +0100
>> -Subject: [PATCH] feat(imx8mq): always set up console
>> -
>> -This aligns the i.MX8MQ platform behaviour with the other i.MX8M*
>> -platforms by always setting up the console UART.
>> -
>> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> -Change-Id: I1279d9cb4feb6e789422b9844cab711b8daae74e
>> ----
>> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c    | 7 +++----
>> - plat/imx/imx8m/imx8mq/include/platform_def.h | 1 -
>> - 2 files changed, 3 insertions(+), 5 deletions(-)
>> -
>> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
>> 0feb6d7fbad2..0972c35e9554 100644
>> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -@@ -124,6 +124,7 @@ static void bl31_tz380_setup(void)
>> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> - 			u_register_t arg2, u_register_t arg3)
>> - {
>> -+	static console_t console;
>> - 	int i;
>> - 	/* enable CSU NS access permission */
>> - 	for (i = 0; i < 64; i++) {
>> -@@ -132,12 +133,10 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, -
>> - 	imx_aipstz_init(aipstz);
>> -
>> --#if DEBUG_CONSOLE
>> --	static console_t console;
>> --
>> - 	console_imx_uart_register(IMX_BOOT_UART_BASE, 
> IMX_BOOT_UART_CLK_IN_HZ,
>> - 		IMX_CONSOLE_BAUDRATE, &console);
>> --#endif
>> -+	/* This console is only used for boot stage */
>> -+	console_set_scope(&console, CONSOLE_FLAG_BOOT);
>> -
>> - 	imx8m_caam_init();
>> -
>> -diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h
>> b/plat/imx/imx8m/imx8mq/include/platform_def.h -index
>> 4671cd3afa40..103f2e4087e2 100644
>> ---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
>> -+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
>> -@@ -127,5 +127,4 @@
>> -
>> - #define COUNTER_FREQUENCY		8333333 /* 25MHz / 3 */
>> -
>> --#define DEBUG_CONSOLE			0
>> - #define IMX_WDOG_B_RESET
>> diff --git
>> a/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patc
>> h
>> b/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patc
>> h deleted file mode 100644
>> index 6cf2dc18deb2..000000000000
>> ---
>> a/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.patc
>> h +++ /dev/null
>> @@ -1,53 +0,0 @@
>> -From: Lucas Stach <l.stach@pengutronix.de>
>> -Date: Thu, 8 Dec 2022 16:35:11 +0100
>> -Subject: [PATCH] refactor(imx8mq): make use of setup_page_tables()
>> -
>> -Improve code readability and align with other i.MX8M* platforms.
>> -
>> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> -Change-Id: Ifd29b74872e3a567288d208de4827403078164e9
>> ----
>> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 28
>> +++++++++++++--------------- - 1 file changed, 13 insertions(+), 15
>> deletions(-)
>> -
>> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
>> 0972c35e9554..c7eddf430197 100644
>> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -@@ -175,23 +175,21 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, -
>> - void bl31_plat_arch_setup(void)
>> - {
>> --	mmap_add_region(BL31_BASE, BL31_BASE, (BL31_LIMIT - BL31_BASE),
>> --		MT_MEMORY | MT_RW | MT_SECURE);
>> --	mmap_add_region(BL_CODE_BASE, BL_CODE_BASE, (BL_CODE_END - 
> BL_CODE_BASE),
>> --		MT_MEMORY | MT_RO | MT_SECURE);
>> --
>> --	/* Map TEE memory */
>> --	mmap_add_region(BL32_BASE, BL32_BASE, BL32_SIZE, MT_MEMORY | 
> MT_RW);
>> --
>> --	mmap_add(imx_mmap);
>> --
>> -+	const mmap_region_t bl_regions[] = {
>> -+        	MAP_REGION_FLAT(BL31_BASE, BL31_LIMIT - BL31_BASE,
>> -+				MT_MEMORY | MT_RW | MT_SECURE),
>> -+		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - 
> BL_CODE_BASE,
>> -+				MT_MEMORY | MT_RO | MT_SECURE),
>> - #if USE_COHERENT_MEM
>> --	mmap_add_region(BL_COHERENT_RAM_BASE, BL_COHERENT_RAM_BASE,
>> --		BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE,
>> --		MT_DEVICE | MT_RW | MT_SECURE);
>> -+		MAP_REGION_FLAT(BL_COHERENT_RAM_BASE,
>> -+				BL_COHERENT_RAM_END - 
> BL_COHERENT_RAM_BASE,
>> -+				MT_DEVICE | MT_RW | MT_SECURE),
>> - #endif
>> --	/* setup xlat table */
>> --	init_xlat_tables();
>> -+		MAP_REGION_FLAT(BL32_BASE, BL32_SIZE, MT_MEMORY | 
> MT_RW),
>> -+		{0},
>> -+	};
>> -+
>> -+	setup_page_tables(bl_regions, imx_mmap);
>> - 	/* enable the MMU */
>> - 	enable_mmu_el3(0);
>> - }
>> diff --git
>> a/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
>> b/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch deleted
>> file mode 100644
>> index 960d7265cc08..000000000000
>> --- a/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
>> +++ /dev/null
>> @@ -1,54 +0,0 @@
>> -From: Lucas Stach <l.stach@pengutronix.de>
>> -Date: Thu, 8 Dec 2022 16:37:44 +0100
>> -Subject: [PATCH] refactor(imx8mq): introduce BL31_SIZE
>> -
>> -No functional change.
>> -
>> -Introduce BL31_SIZE define and calculate the limits based on the
>> -BL31_BASE and the BL31_SIZE define. Also make use of SZ_64K to make it
>> -easier to read. This is required for later BL31 PIE support since it
>> -drops the calculation based on the BL31_LIMIT and BL31_BASE.
>> -
>> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> -Change-Id: I517074b866b5bf11841b51777f87c926b304488d
>> ----
>> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c    | 2 +-
>> - plat/imx/imx8m/imx8mq/include/platform_def.h | 5 ++++-
>> - 2 files changed, 5 insertions(+), 2 deletions(-)
>> -
>> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
>> c7eddf430197..bbdb4d899a39 100644
>> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -@@ -176,7 +176,7 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, - void bl31_plat_arch_setup(void)
>> - {
>> - 	const mmap_region_t bl_regions[] = {
>> --        	MAP_REGION_FLAT(BL31_BASE, BL31_LIMIT - BL31_BASE,
>> -+        	MAP_REGION_FLAT(BL31_BASE, BL31_SIZE,
>> - 				MT_MEMORY | MT_RW | MT_SECURE),
>> - 		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - 
> BL_CODE_BASE,
>> - 				MT_MEMORY | MT_RO | MT_SECURE),
>> -diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h
>> b/plat/imx/imx8m/imx8mq/include/platform_def.h -index
>> 103f2e4087e2..bb570748f573 100644
>> ---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
>> -+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
>> -@@ -4,6 +4,8 @@
>> -  * SPDX-License-Identifier: BSD-3-Clause
>> -  */
>> -
>> -+#include <plat/common/common_def.h>
>> -+
>> - #define PLATFORM_LINKER_FORMAT		"elf64-littleaarch64"
>> - #define PLATFORM_LINKER_ARCH		aarch64
>> -
>> -@@ -31,7 +33,8 @@
>> - #define PLAT_STOP_OFF_STATE		U(3)
>> -
>> - #define BL31_BASE			U(0x910000)
>> --#define BL31_LIMIT			U(0x920000)
>> -+#define BL31_SIZE			SZ_64K
>> -+#define BL31_LIMIT			(BL31_BASE + BL31_SIZE)
>> -
>> - /* non-secure uboot base */
>> - #define PLAT_NS_IMAGE_OFFSET		U(0x40200000)
>> diff --git a/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
>> b/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch deleted
>> file mode 100644
>> index 25d2aaae70fd..000000000000
>> --- a/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
>> +++ /dev/null
>> @@ -1,55 +0,0 @@
>> -From: Lucas Stach <l.stach@pengutronix.de>
>> -Date: Thu, 8 Dec 2022 16:44:00 +0100
>> -Subject: [PATCH] feat(imx8mq): add BL31 PIE support
>> -
>> -Enable PIE support so the BL31 firmware can be loaded from anywhere
>> -within the OCRAM (SRAM). For the PIE support we only need to replace the
>> -BL31_BASE define by the BL31_START symbol which is a relocatable and we
>> -need to enable it by setting ENABLE_PIE := 1.
>> -
>> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>> -Change-Id: Ie6a13e4ae0fdc6627a94798d7a86df7d5b310896
>> ----
>> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 2 +-
>> - plat/imx/imx8m/imx8mq/imx8mq_psci.c       | 2 +-
>> - plat/imx/imx8m/imx8mq/platform.mk         | 1 +
>> - 3 files changed, 3 insertions(+), 2 deletions(-)
>> -
>> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
>> bbdb4d899a39..3c2d223fef21 100644
>> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -@@ -176,7 +176,7 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, - void bl31_plat_arch_setup(void)
>> - {
>> - 	const mmap_region_t bl_regions[] = {
>> --        	MAP_REGION_FLAT(BL31_BASE, BL31_SIZE,
>> -+        	MAP_REGION_FLAT(BL31_START, BL31_SIZE,
>> - 				MT_MEMORY | MT_RW | MT_SECURE),
>> - 		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - 
> BL_CODE_BASE,
>> - 				MT_MEMORY | MT_RO | MT_SECURE),
>> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_psci.c
>> b/plat/imx/imx8m/imx8mq/imx8mq_psci.c -index 662017d6fe4a..01582afe490c
>> 100644
>> ---- a/plat/imx/imx8m/imx8mq/imx8mq_psci.c
>> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_psci.c
>> -@@ -41,7 +41,7 @@ int imx_validate_power_state(unsigned int power_state,
>> -
>> - void imx_domain_suspend(const psci_power_state_t *target_state)
>> - {
>> --	uint64_t base_addr = BL31_BASE;
>> -+	uint64_t base_addr = BL31_START;
>> - 	uint64_t mpidr = read_mpidr_el1();
>> - 	unsigned int core_id = MPIDR_AFFLVL0_VAL(mpidr);
>> -
>> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
>> b/plat/imx/imx8m/imx8mq/platform.mk -index f62d3aa5be15..901a974a591e
>> 100644
>> ---- a/plat/imx/imx8m/imx8mq/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
>> -@@ -38,6 +38,7 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> - 				${XLAT_TABLES_LIB_SRCS}		
> 		\
>> - 				${IMX_GIC_SOURCES}
>> -
>> -+ENABLE_PIE		:=	1
>> - USE_COHERENT_MEM	:=	1
>> - RESET_TO_BL31		:=	1
>> - A53_DISABLE_NON_TEMPORAL_HINT := 0
>> diff --git
>> a/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
>> b/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch deleted
>> file mode 100644
>> index 24a5b80ca473..000000000000
>> --- a/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
>> +++ /dev/null
>> @@ -1,45 +0,0 @@
>> -From: Marco Felsch <m.felsch@pengutronix.de>
>> -Date: Fri, 10 Feb 2023 12:14:26 +0100
>> -Subject: [PATCH] feat(imx8mq): add support for gcc >= 12.x
>> -
>> -Starting with GCC >= 12.x the -Wall option includes -Werror=array-bounds
>> -checks. Per default GCC threads all memory accesses below 4096 as NULL,
>> -so access to ROMAPI causes the following warning:
>> -
>> -In file included from plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:20:
>> -In function 'mmio_read_8',
>> -    inlined from 'imx8mq_soc_info_init' at
>> plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:70:16, -    inlined from
>> 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:206:2:
>> -include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds
>> of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'}
>> [-Werror=array-bounds] -   19 |         return *(volatile uint8_t*)addr;
>> -      |                ^~~~~~~~~~~~~~~~~~~~~~~~
>> -In function 'mmio_read_8',
>> -    inlined from 'imx8mq_soc_info_init' at
>> plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:74:16, -    inlined from
>> 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:206:2:
>> -include/lib/mmio.h:19:16: error: array subscript 0 is outside array bounds
>> of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'}
>> [-Werror=array-bounds] -   19 |         return *(volatile uint8_t*)addr;
>> -      |                ^~~~~~~~~~~~~~~~~~~~~~~~
>> -cc1: all warnings being treated as errors
>> -
>> -Fix this by setting the default min-pagesize to 0 instead of 4096, so
>> -the ROMAPI access will not trigger the warning. Don't set this option
>> -for all files since it is unkown how it affects code
>> -generation/optimizations.
>> -
>> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>> -Change-Id: Ibcca65ca69750e1a1bca3d528c80e5b445d2f90f
>> ----
>> - plat/imx/imx8m/imx8mq/platform.mk | 3 +++
>> - 1 file changed, 3 insertions(+)
>> -
>> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
>> b/plat/imx/imx8m/imx8mq/platform.mk -index 901a974a591e..985be71725f7
>> 100644
>> ---- a/plat/imx/imx8m/imx8mq/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
>> -@@ -59,3 +59,6 @@ $(eval $(call add_define,IMX_BOOT_UART_BASE))
>> - ifeq (${SPD},trusty)
>> - 	BL31_CFLAGS    +=      -DPLAT_XLAT_TABLES_DYNAMIC=1
>> - endif
>> -+
>> -+# Required with gcc version >= 12
>> -+$(BUILD_PLAT)/bl31/imx8mq_bl31_setup.o: CFLAGS += --param=min-pagesize=0
>> diff --git
>> a/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runt
>> im.patch
>> b/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runt
>> im.patch deleted file mode 100644
>> index 68f36aca7aa1..000000000000
>> ---
>> a/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-runt
>> im.patch +++ /dev/null
>> @@ -1,304 +0,0 @@
>> -From: Marco Felsch <m.felsch@pengutronix.de>
>> -Date: Mon, 24 Jul 2023 15:05:58 +0200
>> -Subject: [PATCH] feat(imx8m): detect console base address during runtime
>> -
>> -Provide a helper to detect the enabled UART device during runtime. This
>> -lower the integration effort and make it more straight forward for
>> -'simple' use-cases with a single UART enabled. If multiple UARTs are
>> -enabled the first enabled is returned.
>> -
>> -The auto-detection is enabled by setting IMX_BOOT_UART_BASE=0 to keep
>> -the backward compatibility. For more advanced use-cases (multiple UARTs
>> -are enabled) the user still has to provide the correct base address.
>> -
>> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>> -Change-Id: I300a167e1a10f9aa991c8d1c3efe2c6b23f56c47
>> ----
>> - plat/imx/imx8m/imx8m_ccm.c                | 58
>> +++++++++++++++++++++++++++++++ - plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
>> | 11 +++++-
>> - plat/imx/imx8m/imx8mm/platform.mk         |  1 +
>> - plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 11 +++++-
>> - plat/imx/imx8m/imx8mn/platform.mk         |  1 +
>> - plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c | 11 +++++-
>> - plat/imx/imx8m/imx8mp/platform.mk         |  1 +
>> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 11 +++++-
>> - plat/imx/imx8m/imx8mq/platform.mk         |  1 +
>> - plat/imx/imx8m/include/imx8m_ccm.h        | 12 +++++++
>> - 10 files changed, 114 insertions(+), 4 deletions(-)
>> - create mode 100644 plat/imx/imx8m/imx8m_ccm.c
>> - create mode 100644 plat/imx/imx8m/include/imx8m_ccm.h
>> -
>> -diff --git a/plat/imx/imx8m/imx8m_ccm.c b/plat/imx/imx8m/imx8m_ccm.c
>> -new file mode 100644
>> -index 000000000000..10a00c990031
>> ---- /dev/null
>> -+++ b/plat/imx/imx8m/imx8m_ccm.c
>> -@@ -0,0 +1,58 @@
>> -+/*
>> -+ * Copyright (c) 2023, Pengutronix. All rights reserved.
>> -+ *
>> -+ * SPDX-License-Identifier: BSD-3-Clause
>> -+ */
>> -+
>> -+#include <lib/mmio.h>
>> -+#include <platform_def.h>
>> -+
>> -+#define UCR1    		0x80
>> -+#define UCR1_UARTEN		BIT(0)
>> -+#define DOMAIN0_RUNNING(d)	(((d) & 0x3) != 0)
>> -+
>> -+static struct imx_uart {
>> -+	unsigned int ccm_reg;
>> -+	unsigned int uart_base;
>> -+} imx8m_uart_info[] = {
>> -+	{	/* UART 1 */
>> -+		.ccm_reg = 0x4490,
>> -+		.uart_base = 0x30860000,
>> -+	}, {	/* UART 2 */
>> -+		.ccm_reg = 0x44a0,
>> -+		.uart_base = 0x30890000,
>> -+	}, {	/* UART 3 */
>> -+		.ccm_reg = 0x44b0,
>> -+		.uart_base = 0x30880000,
>> -+	}, {	/* UART 4 */
>> -+		.ccm_reg = 0x44c0,
>> -+		.uart_base = 0x30a60000,
>> -+	}
>> -+};
>> -+
>> -+unsigned int imx8m_uart_get_base(void)
>> -+{
>> -+	unsigned int i;
>> -+
>> -+	for (i = 0; i < ARRAY_SIZE(imx8m_uart_info); i++) {
>> -+		uint32_t val;
>> -+
>> -+		/*
>> -+		 * At least check that the clock-gate is ungated before 
> we
>> -+		 * access the UART register.
>> -+		 */
>> -+		val = mmio_read_32(IMX_CCM_BASE + 
> imx8m_uart_info[i].ccm_reg);
>> -+		if (DOMAIN0_RUNNING(val)) {
>> -+			val = 
> mmio_read_32(imx8m_uart_info[i].uart_base + UCR1);
>> -+			if (val & UCR1_UARTEN) {
>> -+				return 
> imx8m_uart_info[i].uart_base;
>> -+			}
>> -+		}
>> -+	}
>> -+
>> -+	/*
>> -+	 * We should return an error and inform the user but we can't do it
>> -+	 * this early.
>> -+	 */
>> -+	return 0;
>> -+}
>> -diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
>> b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c -index
>> 67bfd3651dfe..8e6636147438 100644
>> ---- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
>> -@@ -27,6 +27,7 @@
>> - #include <imx_uart.h>
>> - #include <imx_rdc.h>
>> - #include <imx8m_caam.h>
>> -+#include <imx8m_ccm.h>
>> - #include <imx8m_csu.h>
>> - #include <plat_imx8.h>
>> -
>> -@@ -130,6 +131,7 @@ void bl31_tzc380_setup(void)
>> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> - 		u_register_t arg2, u_register_t arg3)
>> - {
>> -+	unsigned int console_base = 0U;
>> - 	static console_t console;
>> - 	int i;
>> -
>> -@@ -144,7 +146,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, -
>> - 	imx_csu_init(csu_cfg);
>> -
>> --	console_imx_uart_register(IMX_BOOT_UART_BASE, 
> IMX_BOOT_UART_CLK_IN_HZ,
>> -+#if IMX_BOOT_UART_BASE
>> -+	console_base = IMX_BOOT_UART_BASE;
>> -+#endif
>> -+	if (console_base == 0U) {
>> -+		console_base = imx8m_uart_get_base();
>> -+	}
>> -+
>> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
>> - 		IMX_CONSOLE_BAUDRATE, &console);
>> - 	/* This console is only used for boot stage */
>> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
>> -diff --git a/plat/imx/imx8m/imx8mm/platform.mk
>> b/plat/imx/imx8m/imx8mm/platform.mk -index 7a42554f5739..22791fda4c2c
>> 100644
>> ---- a/plat/imx/imx8m/imx8mm/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mm/platform.mk
>> -@@ -37,6 +37,7 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> - 				plat/imx/imx8m/imx_rdc.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_csu.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_caam.c		
> 	\
>> -+				plat/imx/imx8m/imx8m_ccm.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_psci_common.c	
> 	\
>> - 				plat/imx/imx8m/imx8mm/
> imx8mm_bl31_setup.c	\
>> - 				plat/imx/imx8m/imx8mm/
> imx8mm_psci.c		\
>> -diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
>> b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c -index
>> eff198dd741c..aeb1cbf2945f 100644
>> ---- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
>> -@@ -25,6 +25,7 @@
>> - #include <imx_uart.h>
>> - #include <imx_rdc.h>
>> - #include <imx8m_caam.h>
>> -+#include <imx8m_ccm.h>
>> - #include <imx8m_csu.h>
>> - #include <platform_def.h>
>> - #include <plat_imx8.h>
>> -@@ -121,6 +122,7 @@ static void bl31_tzc380_setup(void)
>> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> - 		u_register_t arg2, u_register_t arg3)
>> - {
>> -+	unsigned int console_base = 0U;
>> - 	static console_t console;
>> - 	unsigned int val;
>> - 	int i;
>> -@@ -141,7 +143,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 
> 0x2c);
>> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
>> -
>> --	console_imx_uart_register(IMX_BOOT_UART_BASE, 
> IMX_BOOT_UART_CLK_IN_HZ,
>> -+#if IMX_BOOT_UART_BASE
>> -+	console_base = IMX_BOOT_UART_BASE;
>> -+#endif
>> -+	if (console_base == 0U) {
>> -+		console_base = imx8m_uart_get_base();
>> -+	}
>> -+
>> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
>> - 		IMX_CONSOLE_BAUDRATE, &console);
>> - 	/* This console is only used for boot stage */
>> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
>> -diff --git a/plat/imx/imx8m/imx8mn/platform.mk
>> b/plat/imx/imx8m/imx8mn/platform.mk -index 1c0ad4f3bc23..46516104f16d
>> 100644
>> ---- a/plat/imx/imx8m/imx8mn/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mn/platform.mk
>> -@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> - 				plat/imx/imx8m/imx_aipstz.c		
> 	\
>> - 				plat/imx/imx8m/imx_rdc.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_caam.c		
> 	\
>> -+				plat/imx/imx8m/imx8m_ccm.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_csu.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_psci_common.c	
> 	\
>> - 				plat/imx/imx8m/imx8mn/
> imx8mn_bl31_setup.c	\
>> -diff --git a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
>> b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c -index
>> 4c31fa28dab7..e25668b879b3 100644
>> ---- a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
>> -@@ -25,6 +25,7 @@
>> - #include <imx_uart.h>
>> - #include <imx_rdc.h>
>> - #include <imx8m_caam.h>
>> -+#include <imx8m_ccm.h>
>> - #include <imx8m_csu.h>
>> - #include <platform_def.h>
>> - #include <plat_imx8.h>
>> -@@ -117,6 +118,7 @@ static void bl31_tzc380_setup(void)
>> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> - 		u_register_t arg2, u_register_t arg3)
>> - {
>> -+	unsigned int console_base = 0U;
>> - 	static console_t console;
>> - 	unsigned int val;
>> - 	unsigned int i;
>> -@@ -137,7 +139,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 
> 0x2c);
>> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
>> -
>> --	console_imx_uart_register(IMX_BOOT_UART_BASE, 
> IMX_BOOT_UART_CLK_IN_HZ,
>> -+#if IMX_BOOT_UART_BASE
>> -+	console_base = IMX_BOOT_UART_BASE;
>> -+#endif
>> -+	if (console_base == 0U) {
>> -+		console_base = imx8m_uart_get_base();
>> -+	}
>> -+
>> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
>> - 		IMX_CONSOLE_BAUDRATE, &console);
>> - 	/* This console is only used for boot stage */
>> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
>> -diff --git a/plat/imx/imx8m/imx8mp/platform.mk
>> b/plat/imx/imx8m/imx8mp/platform.mk -index 5414c0a5732d..cdb504de0f3d
>> 100644
>> ---- a/plat/imx/imx8m/imx8mp/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mp/platform.mk
>> -@@ -32,6 +32,7 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> - 				plat/imx/imx8m/imx_aipstz.c		
> 	\
>> - 				plat/imx/imx8m/imx_rdc.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_caam.c		
> 	\
>> -+				plat/imx/imx8m/imx8m_ccm.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_csu.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_psci_common.c	
> 	\
>> - 				plat/imx/imx8m/imx8mp/
> imx8mp_bl31_setup.c	\
>> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
>> 3c2d223fef21..1cb2d2a25b54 100644
>> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -@@ -25,6 +25,7 @@
>> - #include <imx_aipstz.h>
>> - #include <imx_uart.h>
>> - #include <imx8m_caam.h>
>> -+#include <imx8m_ccm.h>
>> - #include <plat_imx8.h>
>> -
>> - #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
>> -@@ -124,6 +125,7 @@ static void bl31_tz380_setup(void)
>> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> - 			u_register_t arg2, u_register_t arg3)
>> - {
>> -+	unsigned int console_base = 0U;
>> - 	static console_t console;
>> - 	int i;
>> - 	/* enable CSU NS access permission */
>> -@@ -133,7 +135,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, -
>> - 	imx_aipstz_init(aipstz);
>> -
>> --	console_imx_uart_register(IMX_BOOT_UART_BASE, 
> IMX_BOOT_UART_CLK_IN_HZ,
>> -+#if IMX_BOOT_UART_BASE
>> -+	console_base = IMX_BOOT_UART_BASE;
>> -+#endif
>> -+	if (console_base == 0U) {
>> -+		console_base = imx8m_uart_get_base();
>> -+	}
>> -+
>> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
>> - 		IMX_CONSOLE_BAUDRATE, &console);
>> - 	/* This console is only used for boot stage */
>> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
>> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
>> b/plat/imx/imx8m/imx8mq/platform.mk -index 985be71725f7..0c34c10bdcb4
>> 100644
>> ---- a/plat/imx/imx8m/imx8mq/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
>> -@@ -25,6 +25,7 @@ BL31_SOURCES		+=	plat/imx/common/
> imx8_helpers.S			\
>> - 				plat/imx/imx8m/gpc_common.c		
> 	\
>> - 				plat/imx/imx8m/imx_aipstz.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_caam.c		
> 	\
>> -+				plat/imx/imx8m/imx8m_ccm.c		
> 	\
>> - 				plat/imx/imx8m/imx8m_psci_common.c	
> 	\
>> - 				plat/imx/imx8m/imx8mq/gpc.c		
> 	\
>> - 				plat/imx/common/imx8_topology.c		
> 	\
>> -diff --git a/plat/imx/imx8m/include/imx8m_ccm.h
>> b/plat/imx/imx8m/include/imx8m_ccm.h -new file mode 100644
>> -index 000000000000..acbd135cb314
>> ---- /dev/null
>> -+++ b/plat/imx/imx8m/include/imx8m_ccm.h
>> -@@ -0,0 +1,12 @@
>> -+/*
>> -+ * Copyright (c) 2023, Pengutronix. All rights reserved.
>> -+ *
>> -+ * SPDX-License-Identifier: BSD-3-Clause
>> -+ */
>> -+
>> -+#ifndef IMX8M_CCM_H
>> -+#define IMX8M_CCM_H
>> -+
>> -+unsigned int imx8m_uart_get_base(void);
>> -+
>> -+#endif /* IMX8M_CCM_H */
>> diff --git
>> a/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-op
>> ti.patch
>> b/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-op
>> ti.patch deleted file mode 100644
>> index 9fae10905edd..000000000000
>> ---
>> a/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-op
>> ti.patch +++ /dev/null
>> @@ -1,172 +0,0 @@
>> -From: Marco Felsch <m.felsch@pengutronix.de>
>> -Date: Wed, 2 Aug 2023 08:11:35 +0200
>> -Subject: [PATCH] fix(imx8m): make IMX_BOOT_UART_BASE autodetection option
>> more - obvious
>> -
>> -Switch from IMX_BOOT_UART_BASE=0 to IMX_BOOT_UART_BASE=auto to make it
>> -more obvious that the detection is based on the runtime autodetection.
>> -
>> -In addition this moves the evaluation of IMX_BOOT_UART_BASE into the
>> -makefile which removes the ugly conditional compilation as well.
>> -
>> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>> -Change-Id: I92c13607bf81c6267f4b6aee829d74902b7f72d2
>> ----
>> - plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 5 +----
>> - plat/imx/imx8m/imx8mm/platform.mk         | 3 +++
>> - plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 5 +----
>> - plat/imx/imx8m/imx8mn/platform.mk         | 3 +++
>> - plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c | 5 +----
>> - plat/imx/imx8m/imx8mp/platform.mk         | 3 +++
>> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 5 +----
>> - plat/imx/imx8m/imx8mq/platform.mk         | 3 +++
>> - 8 files changed, 16 insertions(+), 16 deletions(-)
>> -
>> -diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
>> b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c -index
>> 8e6636147438..c8a3adf8f333 100644
>> ---- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
>> -@@ -131,7 +131,7 @@ void bl31_tzc380_setup(void)
>> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> - 		u_register_t arg2, u_register_t arg3)
>> - {
>> --	unsigned int console_base = 0U;
>> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
>> - 	static console_t console;
>> - 	int i;
>> -
>> -@@ -146,9 +146,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, -
>> - 	imx_csu_init(csu_cfg);
>> -
>> --#if IMX_BOOT_UART_BASE
>> --	console_base = IMX_BOOT_UART_BASE;
>> --#endif
>> - 	if (console_base == 0U) {
>> - 		console_base = imx8m_uart_get_base();
>> - 	}
>> -diff --git a/plat/imx/imx8m/imx8mm/platform.mk
>> b/plat/imx/imx8m/imx8mm/platform.mk -index 22791fda4c2c..1b4a1f2f37c7
>> 100644
>> ---- a/plat/imx/imx8m/imx8mm/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mm/platform.mk
>> -@@ -159,6 +159,9 @@ BL32_SIZE		?=	0x2000000
>> - $(eval $(call add_define,BL32_SIZE))
>> -
>> - IMX_BOOT_UART_BASE	?=	0x30890000
>> -+ifeq (${IMX_BOOT_UART_BASE},auto)
>> -+    override IMX_BOOT_UART_BASE	:=	0
>> -+endif
>> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
>> -
>> - EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
>> -diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
>> b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c -index
>> aeb1cbf2945f..147249ee5e56 100644
>> ---- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
>> -@@ -122,7 +122,7 @@ static void bl31_tzc380_setup(void)
>> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> - 		u_register_t arg2, u_register_t arg3)
>> - {
>> --	unsigned int console_base = 0U;
>> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
>> - 	static console_t console;
>> - 	unsigned int val;
>> - 	int i;
>> -@@ -143,9 +143,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 
> 0x2c);
>> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
>> -
>> --#if IMX_BOOT_UART_BASE
>> --	console_base = IMX_BOOT_UART_BASE;
>> --#endif
>> - 	if (console_base == 0U) {
>> - 		console_base = imx8m_uart_get_base();
>> - 	}
>> -diff --git a/plat/imx/imx8m/imx8mn/platform.mk
>> b/plat/imx/imx8m/imx8mn/platform.mk -index 46516104f16d..a6b43f213506
>> 100644
>> ---- a/plat/imx/imx8m/imx8mn/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mn/platform.mk
>> -@@ -65,6 +65,9 @@ BL32_SIZE		?=	0x2000000
>> - $(eval $(call add_define,BL32_SIZE))
>> -
>> - IMX_BOOT_UART_BASE	?=	0x30890000
>> -+ifeq (${IMX_BOOT_UART_BASE},auto)
>> -+    override IMX_BOOT_UART_BASE	:=	0
>> -+endif
>> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
>> -
>> - EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
>> -diff --git a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
>> b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c -index
>> e25668b879b3..b0a41c741c17 100644
>> ---- a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
>> -@@ -118,7 +118,7 @@ static void bl31_tzc380_setup(void)
>> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> - 		u_register_t arg2, u_register_t arg3)
>> - {
>> --	unsigned int console_base = 0U;
>> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
>> - 	static console_t console;
>> - 	unsigned int val;
>> - 	unsigned int i;
>> -@@ -139,9 +139,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE + 
> 0x2c);
>> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
>> -
>> --#if IMX_BOOT_UART_BASE
>> --	console_base = IMX_BOOT_UART_BASE;
>> --#endif
>> - 	if (console_base == 0U) {
>> - 		console_base = imx8m_uart_get_base();
>> - 	}
>> -diff --git a/plat/imx/imx8m/imx8mp/platform.mk
>> b/plat/imx/imx8m/imx8mp/platform.mk -index cdb504de0f3d..0169144f4a1a
>> 100644
>> ---- a/plat/imx/imx8m/imx8mp/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mp/platform.mk
>> -@@ -156,6 +156,9 @@ BL32_SIZE		?=	0x2000000
>> - $(eval $(call add_define,BL32_SIZE))
>> -
>> - IMX_BOOT_UART_BASE	?=	0x30890000
>> -+ifeq (${IMX_BOOT_UART_BASE},auto)
>> -+    override IMX_BOOT_UART_BASE	:=	0
>> -+endif
>> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
>> -
>> - EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
>> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
>> 1cb2d2a25b54..a2c81610b353 100644
>> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
>> -@@ -125,7 +125,7 @@ static void bl31_tz380_setup(void)
>> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
>> - 			u_register_t arg2, u_register_t arg3)
>> - {
>> --	unsigned int console_base = 0U;
>> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
>> - 	static console_t console;
>> - 	int i;
>> - 	/* enable CSU NS access permission */
>> -@@ -135,9 +135,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
>> u_register_t arg1, -
>> - 	imx_aipstz_init(aipstz);
>> -
>> --#if IMX_BOOT_UART_BASE
>> --	console_base = IMX_BOOT_UART_BASE;
>> --#endif
>> - 	if (console_base == 0U) {
>> - 		console_base = imx8m_uart_get_base();
>> - 	}
>> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
>> b/plat/imx/imx8m/imx8mq/platform.mk -index 0c34c10bdcb4..6ee7d23d4882
>> 100644
>> ---- a/plat/imx/imx8m/imx8mq/platform.mk
>> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
>> -@@ -55,6 +55,9 @@ BL32_SIZE		?=	0x2000000
>> - $(eval $(call add_define,BL32_SIZE))
>> -
>> - IMX_BOOT_UART_BASE	?=	0x30860000
>> -+ifeq (${IMX_BOOT_UART_BASE},auto)
>> -+    override IMX_BOOT_UART_BASE	:=	0
>> -+endif
>> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
>> -
>> - ifeq (${SPD},trusty)
>> diff --git
>> a/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-202401
>> 17.patch
>> b/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-202401
>> 17.patch deleted file mode 100644
>> index 1d1a9b9471bb..000000000000
>> ---
>> a/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-202401
>> 17.patch +++ /dev/null
>> @@ -1,21 +0,0 @@
>> -From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= <l.goehrs@pengutronix.de>
>> -Date: Wed, 17 Jan 2024 11:13:01 +0100
>> -Subject: [PATCH] Release 2.8/customers/pengutronix/distrokit/20240117-1
>> -
>> ----
>> - Makefile | 2 +-
>> - 1 file changed, 1 insertion(+), 1 deletion(-)
>> -
>> -diff --git a/Makefile b/Makefile
>> -index 1bfff716485a..f39eb940a024 100644
>> ---- a/Makefile
>> -+++ b/Makefile
>> -@@ -327,7 +327,7 @@ endif
>> - ifeq (${BUILD_STRING},)
>> -         BUILD_STRING  :=  $(shell git describe --always --dirty --tags 2>
>> /dev/null) - endif
>> --VERSION_STRING    :=  v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}
>> -+VERSION_STRING    := 
>> v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}-20240117-1 -
>> - ifeq (${AARCH32_INSTRUCTION_SET},A32)
>> - TF_CFLAGS_aarch32	+=	-marm
>> diff --git a/patches/tf-a-v2.8/series b/patches/tf-a-v2.8/series
>> deleted file mode 100644
>> index 7a73fce4ff94..000000000000
>> --- a/patches/tf-a-v2.8/series
>> +++ /dev/null
>> @@ -1,27 +0,0 @@
>> -# umpf-base: v2.8
>> -# umpf-name: 2.8/customers/pengutronix/distrokit
>> -# umpf-version: 2.8/customers/pengutronix/distrokit/20240117-1
>> -# umpf-topic: v2.8/topic/fix-build-warnings
>> -# umpf-hashinfo: 4730b4b80206cf2fc27787f43cefd3169a6f8a2f
>> -# umpf-topic-range:
>> 9881bb93a3bc0a3ea37e9f093e09ab4b360a9e48..da1b5e74dc7c2b3e7a2d9a1adb7e23bee
>> ba079e3 -0001-build-makefile-add-helper-to-detect-linker-options.patch
>> -0002-feat-build-add-support-for-new-binutils-versions.patch
>> -# umpf-topic: v2.8/topic/imx8mq
>> -# umpf-hashinfo: 651310b67fd269e8118285e9ed44e8ad6cc52941
>> -# umpf-topic-range:
>> da1b5e74dc7c2b3e7a2d9a1adb7e23beeba079e3..be7bcbebf5b22958e8b88564ca0865b45
>> 91263e7 -0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via.patch
>> -0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.patch
>> -0103-feat-imx8mq-always-set-up-console.patch
>> -0104-refactor-imx8mq-make-use-of-setup_page_tables.patch
>> -0105-refactor-imx8mq-introduce-BL31_SIZE.patch
>> -0106-feat-imx8mq-add-BL31-PIE-support.patch
>> -0107-feat-imx8mq-add-support-for-gcc-12.x.patch
>> -# umpf-topic: v2.8/topic/uart-runtime-detection
>> -# umpf-hashinfo: b59093eaea88fddf1c893eb8f45a3eadf1f570cc
>> -# umpf-topic-range:
>> be7bcbebf5b22958e8b88564ca0865b4591263e7..015b0b19a839d0d4beb01babbe1af8191
>> 7fcfb57 -0201-feat-imx8m-detect-console-base-address-during-runtim.patch
>> -0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti.patch
>> -# umpf-release: 2.8/customers/pengutronix/distrokit/20240117-1
>> -# umpf-topic-range:
>> 015b0b19a839d0d4beb01babbe1af81917fcfb57..070499680453a1c6a358828e4bd7cf6c9
>> 629ef6b -0301-Release-2.8-customers-pengutronix-distrokit-20240117.patch
>> -# umpf-end
> 
> 
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit]  [PATCH 02/12] tf-a: update from v2.8 → v2.10
  2024-04-24 11:48     ` Ahmad Fatoum
@ 2024-04-24 11:58       ` Alexander Dahl
  0 siblings, 0 replies; 27+ messages in thread
From: Alexander Dahl @ 2024-04-24 11:58 UTC (permalink / raw)
  To: distrokit, Ahmad Fatoum

Hello,

Am Mittwoch, 24. April 2024, 13:48:10 CEST schrieb Ahmad Fatoum:
> Hi,
> 
> On 24.04.24 13:15, Alexander Dahl wrote:
> > Hello Ahmad,
> > 
> > Am Freitag, 15. März 2024, 22:12:30 CEST schrieb Ahmad Fatoum:
> > Download fails like this:
> > 
> > 
> > -------------------------
> > target: tf-a-v2.10.tar.gz
> > -------------------------
> > 
> > --2024-04-24 13:09:40-- 
> > https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/v2.1
> > 0.tar.gz Resolving git.trustedfirmware.org (git.trustedfirmware.org)...
> > 51.159.18.17 Connecting to git.trustedfirmware.org
> > (git.trustedfirmware.org)|51.159.18.17|: 443... connected.
> > HTTP request sent, awaiting response... 401 Unauthorized
> 
> Meh. I guess we should do like meta-arm does and use a git checkout:
> git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https
> 
> What do you think?

I'm no big fan of the way ptxdist handles those git sources.  
Played around with URLs like this instead:

https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/+archive/
v2.10.tar.gz

However the generated tarball is not stable.

buildroot uses the archive tarballs from the github mirror, e.g. from here:

https://github.com/ARM-software/arm-trusted-firmware/releases/tag/v2.10

We already have quite some tarballs downloaded in the same way.

None of those two options are good, especially because that code screams 
"trusted" but they don't offer trustworthy, reproducible, signed tarballs.  
But I'm not in the mood today to complain at their door.

Oh and I discovered the problem is not in DistroKit itself, but in ptxdist.  
There's no rules/tf-a.make in DistroKit, the generic rule is used.  Sorry for 
using the wrong list here.

Greets
Alex

> 
> Cheers,
> Ahmad
> 
> > Username/Password Authentication Failed.
> > --2024-04-24 13:09:40-- 
> > http://www.pengutronix.de/software/ptxdist/temporary-src/tf-a-v2.10.tar.g
> > z Resolving www.pengutronix.de (www.pengutronix.de)... 2a01:4f9:2a:
> > 2c17:5054:ff:fe65:8c93, 95.216.103.100
> > Connecting to www.pengutronix.de (www.pengutronix.de)|2a01:4f9:2a:
> > 2c17:5054:ff:fe65:8c93|:80... connected.
> > HTTP request sent, awaiting response... 307 Temporary Redirect
> > Location:
> > https://www.pengutronix.de/software/ptxdist/temporary-src/tf-a-v2.10.tar.
> > gz [following] --2024-04-24 13:09:40-- 
> > https://www.pengutronix.de/software/ptxdist/
> > temporary-src/tf-a-v2.10.tar.gz
> > Connecting to www.pengutronix.de (www.pengutronix.de)|2a01:4f9:2a:
> > 2c17:5054:ff:fe65:8c93|:443... connected.
> > HTTP request sent, awaiting response... 307 Temporary Redirect
> > Location:
> > https://public.pengutronix.de/mirror/software/ptxdist/temporary-src/
> > tf-a-v2.10.tar.gz [following]
> > --2024-04-24 13:09:41--  https://public.pengutronix.de/mirror/software/
> > ptxdist/temporary-src/tf-a-v2.10.tar.gz
> > Resolving public.pengutronix.de (public.pengutronix.de)... 2a01:4f9:2a:
> > 2c17:5054:ff:fe65:8c93, 95.216.103.100
> > Connecting to public.pengutronix.de (public.pengutronix.de)|2a01:4f9:2a:
> > 2c17:5054:ff:fe65:8c93|:443... connected.
> > HTTP request sent, awaiting response... 404 Not Found
> > 2024-04-24 13:09:41 ERROR 404: Not Found.
> > 
> > 
> > Could not download package
> > URL: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/
> > v2.10.tar.gz
> > 
> > make: *** [/usr/local/lib/ptxdist-2024.03.0/rules/post/
> > ptxd_make_world_get.make:16: /home/adahl/mnt/bagend-src_archive/tf-a-
> > v2.10.tar.gz] Error 1
> > 
> > 
> > Greets
> > Alex
> > 
> >>  PTXCONF_TF_A_ARCH_STRING="aarch64"
> >>  PTXCONF_TF_A_ARM_ARCH_MAJOR_8=y
> >>  PTXCONF_TF_A_ARM_ARCH_MAJOR=8
> >> 
> >> diff --git
> >> a/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.
> >> MX
> >> 8MQ.patch
> >> b/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.
> >> MX
> >> 8MQ.patch new file mode 100644
> >> index 000000000000..cab995bda37a
> >> --- /dev/null
> >> +++
> >> b/patches/tf-a-v2.10/0001-fix-imx-disable-DRAM-retention-by-default-on-i.
> >> MX
> >> 8MQ.patch @@ -0,0 +1,182 @@
> >> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +Date: Wed, 13 Mar 2024 08:08:13 +0100
> >> +Subject: [PATCH] fix(imx): disable DRAM retention by default on i.MX8MQ
> >> +
> >> +Building the default upstream configuration for the imx8mq-evk is no
> >> longer +possible: The linker will complain that the TF-A image would no
> >> longer +fit On-Chip SRAM.
> >> +
> >> +In order to make the i.MX8MQ Image buildable again, let's make the DRAM
> >> +retention feature optional: It was added in v2.9 and it's possible to
> >> +boot the systems without it. Users that make space elsewhere and wish to
> >> +enable it can use the newly introduced IMX_DRAM_RETENTION parameter to
> >> +configure it. The parameter is added to all i.MX8M variants, but only
> >> +for i.MX8MQ, we disable it by default, as that's the one that currently
> >> +has binary size problems.
> >> +
> >> +Change-Id: I714f8ea96f18154db02390ba500f4a2dc5329ee7
> >> +Fixes: dd108c3c1fe3 ("feat(imx8mq): add the dram retention support for
> >> imx8mq") +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +---
> >> + plat/imx/common/include/imx_sip_svc.h | 8 ++++++++
> >> + plat/imx/imx8m/imx8mm/platform.mk     | 9 ++++++++-
> >> + plat/imx/imx8m/imx8mn/platform.mk     | 9 ++++++++-
> >> + plat/imx/imx8m/imx8mp/platform.mk     | 9 ++++++++-
> >> + plat/imx/imx8m/imx8mq/platform.mk     | 9 ++++++++-
> >> + plat/imx/imx8m/include/dram.h         | 8 +++++++-
> >> + 6 files changed, 47 insertions(+), 5 deletions(-)
> >> +
> >> +diff --git a/plat/imx/common/include/imx_sip_svc.h
> >> b/plat/imx/common/include/imx_sip_svc.h +index 0e91c7174a52..5015eb6a1f11
> >> 100644
> >> +--- a/plat/imx/common/include/imx_sip_svc.h
> >> ++++ b/plat/imx/common/include/imx_sip_svc.h
> >> +@@ -57,8 +57,16 @@ int imx_soc_info_handler(uint32_t smc_fid,
> >> u_register_t
> >> x1, + 			 u_register_t x2, u_register_t 
x3);
> >> + int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
> >> + 		    u_register_t x2, u_register_t x3);
> >> ++#if IMX_DRAM_RETENTION
> >> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> >> + 	u_register_t x1, u_register_t x2, u_register_t x3);
> >> ++#else
> >> ++static inline int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> >> ++		u_register_t x1, u_register_t x2, u_register_t x3)
> >> ++{
> >> ++	SMC_RET1(handle, SMC_UNK);
> >> ++}
> >> ++#endif
> >> + #endif
> >> + #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) ||
> >> defined(PLAT_imx8mp)
> >> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> >> +diff --git a/plat/imx/imx8m/imx8mm/platform.mk
> >> b/plat/imx/imx8m/imx8mm/platform.mk +index 97f4f248824d..849ae5e4ca36
> >> 100644
> >> +--- a/plat/imx/imx8m/imx8mm/platform.mk
> >> ++++ b/plat/imx/imx8m/imx8mm/platform.mk
> >> +@@ -52,7 +52,6 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> + 				drivers/delay_timer/delay_timer.c
> > 
> > \
> > 
> >> + 				drivers/delay_timer/
> > 
> > generic_delay_timer.c	\
> > 
> >> + 				${XLAT_TABLES_LIB_SRCS}
> >> 
> > 		\
> >> 
> >> +-				${IMX_DRAM_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${IMX_GIC_SOURCES}
> >> +
> >> + ifeq (${NEED_BL2},yes)
> >> +@@ -153,6 +152,14 @@ ERRATA_A53_835769	:=	1
> >> + ERRATA_A53_843419	:=	1
> >> + ERRATA_A53_855873	:=	1
> >> +
> >> ++IMX_DRAM_RETENTION	?=	1
> >> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> >> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> >> ++
> >> ++ifeq (${IMX_DRAM_RETENTION},1)
> >> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> >> ++endif
> >> ++
> >> + BL32_BASE		?=	0xbe000000
> >> + $(eval $(call add_define,BL32_BASE))
> >> +
> >> +diff --git a/plat/imx/imx8m/imx8mn/platform.mk
> >> b/plat/imx/imx8m/imx8mn/platform.mk +index e0826e29a88c..94d31a2681aa
> >> 100644
> >> +--- a/plat/imx/imx8m/imx8mn/platform.mk
> >> ++++ b/plat/imx/imx8m/imx8mn/platform.mk
> >> +@@ -46,7 +46,6 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> + 				drivers/arm/tzc/tzc380.c
> >> 
> > 	\
> > 	
> >> + 				drivers/delay_timer/delay_timer.c
> > 
> > \
> > 
> >> + 				drivers/delay_timer/
> > 
> > generic_delay_timer.c	\
> > 
> >> +-				${IMX_DRAM_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${IMX_GIC_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${XLAT_TABLES_LIB_SRCS}
> >> +
> >> +@@ -59,6 +58,14 @@ ERRATA_A53_835769	:=	1
> >> + ERRATA_A53_843419	:=	1
> >> + ERRATA_A53_855873	:=	1
> >> +
> >> ++IMX_DRAM_RETENTION	?=	1
> >> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> >> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> >> ++
> >> ++ifeq (${IMX_DRAM_RETENTION},1)
> >> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> >> ++endif
> >> ++
> >> + BL32_BASE		?=	0xbe000000
> >> + $(eval $(call add_define,BL32_BASE))
> >> +
> >> +diff --git a/plat/imx/imx8m/imx8mp/platform.mk
> >> b/plat/imx/imx8m/imx8mp/platform.mk +index ce6907195152..1f699c4f26f0
> >> 100644
> >> +--- a/plat/imx/imx8m/imx8mp/platform.mk
> >> ++++ b/plat/imx/imx8m/imx8mp/platform.mk
> >> +@@ -47,7 +47,6 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> + 				drivers/arm/tzc/tzc380.c
> >> 
> > 	\
> > 	
> >> + 				drivers/delay_timer/delay_timer.c
> > 
> > \
> > 
> >> + 				drivers/delay_timer/
> > 
> > generic_delay_timer.c	\
> > 
> >> +-				${IMX_DRAM_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${IMX_GIC_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${XLAT_TABLES_LIB_SRCS}
> >> +
> >> +@@ -150,6 +149,14 @@ ERRATA_A53_835769	:=	1
> >> + ERRATA_A53_843419	:=	1
> >> + ERRATA_A53_855873	:=	1
> >> +
> >> ++IMX_DRAM_RETENTION	?=	1
> >> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> >> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> >> ++
> >> ++ifeq (${IMX_DRAM_RETENTION},1)
> >> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> >> ++endif
> >> ++
> >> + BL32_BASE		?=	0x56000000
> >> + $(eval $(call add_define,BL32_BASE))
> >> +
> >> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> >> b/plat/imx/imx8m/imx8mq/platform.mk +index b1c189fa09f5..b48449725791
> >> 100644
> >> +--- a/plat/imx/imx8m/imx8mq/platform.mk
> >> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
> >> +@@ -42,7 +42,6 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> + 				drivers/delay_timer/delay_timer.c
> > 
> > \
> > 
> >> + 				drivers/delay_timer/
> > 
> > generic_delay_timer.c	\
> > 
> >> + 				${XLAT_TABLES_LIB_SRCS}
> >> 
> > 		\
> >> 
> >> +-				${IMX_DRAM_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${IMX_GIC_SOURCES}
> >> +
> >> + ENABLE_PIE		:=	1
> >> +@@ -55,6 +54,14 @@ ERRATA_A53_835769	:=	1
> >> + ERRATA_A53_843419	:=	1
> >> + ERRATA_A53_855873	:=	1
> >> +
> >> ++IMX_DRAM_RETENTION	?=	0
> >> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> >> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> >> ++
> >> ++ifeq (${IMX_DRAM_RETENTION},1)
> >> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> >> ++endif
> >> ++
> >> + BL32_BASE		?=	0xfe000000
> >> + $(eval $(call add_define,BL32_BASE))
> >> +
> >> +diff --git a/plat/imx/imx8m/include/dram.h
> >> b/plat/imx/imx8m/include/dram.h
> >> +index 719c39063778..1cf0666e9cad 100644
> >> +--- a/plat/imx/imx8m/include/dram.h
> >> ++++ b/plat/imx/imx8m/include/dram.h
> >> +@@ -70,13 +70,19 @@ struct dram_info {
> >> +
> >> + extern struct dram_info dram_info;
> >> +
> >> +-void dram_info_init(unsigned long dram_timing_base);
> >> + void dram_umctl2_init(struct dram_timing_info *timing);
> >> + void dram_phy_init(struct dram_timing_info *timing);
> >> +
> >> + /* dram retention */
> >> ++#if IMX_DRAM_RETENTION
> >> ++void dram_info_init(unsigned long dram_timing_base);
> >> + void dram_enter_retention(void);
> >> + void dram_exit_retention(void);
> >> ++#else
> >> ++static inline void dram_info_init(unsigned long dram_timing_base) {}
> >> ++static inline void dram_enter_retention(void) {}
> >> ++static inline void dram_exit_retention(void) {}
> >> ++#endif
> >> +
> >> + void dram_clock_switch(unsigned int target_drate, bool bypass_mode);
> >> +
> >> diff --git
> >> a/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-
> >> as
> >> -BL.patch
> >> b/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-
> >> as
> >> -BL.patch new file mode 100644
> >> index 000000000000..745e171b40e3
> >> --- /dev/null
> >> +++
> >> b/patches/tf-a-v2.10/0001-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-
> >> as
> >> -BL.patch @@ -0,0 +1,61 @@
> >> +From 44f35b67ee4f89b05408ecfe7b4b2c1ae5366b72 Mon Sep 17 00:00:00 2001
> >> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +Date: Tue, 12 Mar 2024 18:36:46 +0100
> >> +Subject: [PATCH 1/3] fix(pmu): fix breakage on ARMv7 CPUs with SP_min as
> >> BL32 +
> >> +While comments introduced with the original commit claim that
> >> +pmuv3_disable_el3()/pmuv3_init_el3() are compatible with PMUv2 and
> >> +PMUv1, this is not true in practice: The function accesses the Secure
> >> +Debug Control Register (SDCR), which only available to ARMv8 CPUs.
> >> +
> >> +ARMv8 CPUs executing in AArch32 mode would thus be able to disable
> >> +their PMUv3, while ARMv7 CPUs would hang trying to access the SDCR.
> >> +
> >> +Fix this by only doing PMUv3 handling when we know a PMUv3 to be
> >> +available. This resolves boot hanging on all STM32MP15 platforms
> >> +that use SP_min as BL32 instead of OP-TEE.
> >> +
> >> +Change-Id: I40f7611cf46b89a30243cc55bf55a8d9c9de93c8
> >> +Fixes: c73686a11cea ("feat(pmu): introduce pmuv3 lib/extensions folder")
> >> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +---
> >> + lib/el3_runtime/aarch32/context_mgmt.c | 7 ++-----
> >> + lib/extensions/pmuv3/aarch32/pmuv3.c   | 4 ----
> >> + 2 files changed, 2 insertions(+), 9 deletions(-)
> >> +
> >> +diff --git a/lib/el3_runtime/aarch32/context_mgmt.c
> >> b/lib/el3_runtime/aarch32/context_mgmt.c +index
> >> b60b8e0f05d0..72af43d3dcb0
> >> 100644
> >> +--- a/lib/el3_runtime/aarch32/context_mgmt.c
> >> ++++ b/lib/el3_runtime/aarch32/context_mgmt.c
> >> +@@ -149,11 +149,8 @@ static void enable_extensions_nonsecure(bool
> >> el2_unused) + 		trf_init_el3();
> >> + 	}
> >> +
> >> +-	/*
> >> +-	 * Also applies to PMU < v3. The PMU is only disabled for EL3 and
> > 
> > Secure
> > 
> >> +-	 * state execution. This does not affect lower NS ELs.
> >> +-	 */
> >> +-	pmuv3_init_el3();
> >> ++	if (read_feat_pmuv3_id_field() >= 3)
> >> ++		pmuv3_init_el3();
> >> + #endif /*  IMAGE_BL32 */
> >> + }
> >> +
> >> +diff --git a/lib/extensions/pmuv3/aarch32/pmuv3.c
> >> b/lib/extensions/pmuv3/aarch32/pmuv3.c +index effb7e02dc29..456a48efb0fb
> >> 100644
> >> +--- a/lib/extensions/pmuv3/aarch32/pmuv3.c
> >> ++++ b/lib/extensions/pmuv3/aarch32/pmuv3.c
> >> +@@ -25,10 +25,6 @@ static u_register_t mtpmu_disable_el3(u_register_t
> >> sdcr) + 	return sdcr;
> >> + }
> >> +
> >> +-/*
> >> +- * Applies to all PMU versions. Name is PMUv3 for compatibility with
> >> aarch64 and +- * to not clash with platforms which reuse the PMU name
> >> +- */
> >> + void pmuv3_init_el3(void)
> >> + {
> >> + 	u_register_t sdcr = read_sdcr();
> >> +--
> >> +2.39.2
> >> +
> >> diff --git
> >> a/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-
> >> ru
> >> nti.patch
> >> b/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-
> >> ru
> >> nti.patch new file mode 100644
> >> index 000000000000..c48833730753
> >> --- /dev/null
> >> +++
> >> b/patches/tf-a-v2.10/0002-feat-imx8mq-detect-console-base-address-during-
> >> ru
> >> nti.patch @@ -0,0 +1,69 @@
> >> +From aeb68be64c5c47142de3c95a8961749f7b33030a Mon Sep 17 00:00:00 2001
> >> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +Date: Wed, 13 Mar 2024 02:08:54 +0100
> >> +Subject: [PATCH 2/3] feat(imx8mq): detect console base address during
> >> runtime +
> >> +Change-Id: I9ba70f7068e762da979bd103390fa006c3a5d480
> >> +---
> >> + plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 8 +++++++-
> >> + plat/imx/imx8m/imx8mq/platform.mk         | 4 ++++
> >> + 2 files changed, 11 insertions(+), 1 deletion(-)
> >> +
> >> +diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c +index
> >> 7065a658614f..70c2def7d18b 100644
> >> +--- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> ++++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> +@@ -26,6 +26,7 @@
> >> + #include <imx_aipstz.h>
> >> + #include <imx_uart.h>
> >> + #include <imx8m_caam.h>
> >> ++#include <imx8m_ccm.h>
> >> + #include <plat_imx8.h>
> >> +
> >> + #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
> >> +@@ -145,6 +146,7 @@ static void bl31_tz380_setup(void)
> >> + void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> + 			u_register_t arg2, u_register_t arg3)
> >> + {
> >> ++	unsigned int console_base = IMX_BOOT_UART_BASE;
> >> + 	static console_t console;
> >> + 	int i;
> >> + 	/* enable CSU NS access permission */
> >> +@@ -154,7 +156,11 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, +
> >> + 	imx_aipstz_init(aipstz);
> >> +
> >> +-	console_imx_uart_register(IMX_BOOT_UART_BASE,
> > 
> > IMX_BOOT_UART_CLK_IN_HZ,
> > 
> >> ++	if (console_base == 0U) {
> >> ++		console_base = imx8m_uart_get_base();
> >> ++	}
> >> ++
> >> ++	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> >> + 		IMX_CONSOLE_BAUDRATE, &console);
> >> + 	/* This console is only used for boot stage */
> >> + 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> >> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> >> b/plat/imx/imx8m/imx8mq/platform.mk +index b1c189fa09f5..648159eb3d10
> >> 100644
> >> +--- a/plat/imx/imx8m/imx8mq/platform.mk
> >> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
> >> +@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> + 				plat/imx/imx8m/gpc_common.c
> >> 
> > 	\
> > 	
> >> + 				plat/imx/imx8m/imx_aipstz.c
> >> 
> > 	\
> > 	
> >> + 				plat/imx/imx8m/imx8m_caam.c
> >> 
> > 	\
> > 	
> >> ++				plat/imx/imx8m/imx8m_ccm.c
> >> 
> > 	\
> > 	
> >> + 				plat/imx/imx8m/imx8m_psci_common.c
> >> 
> > 	\
> > 	
> >> + 				plat/imx/imx8m/imx8mq/gpc.c
> >> 
> > 	\
> > 	
> >> + 				plat/imx/common/imx8_topology.c
> >> 
> > 	\
> > 	
> >> +@@ -62,6 +63,9 @@ BL32_SIZE		?=	0x2000000
> >> + $(eval $(call add_define,BL32_SIZE))
> >> +
> >> + IMX_BOOT_UART_BASE	?=	0x30860000
> >> ++ifeq (${IMX_BOOT_UART_BASE},auto)
> >> ++    override IMX_BOOT_UART_BASE	:=	0
> >> ++endif
> >> + $(eval $(call add_define,IMX_BOOT_UART_BASE))
> >> +
> >> + ifeq (${SPD},trusty)
> >> +--
> >> +2.39.2
> >> +
> >> diff --git
> >> a/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
> >> b/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch new
> >> file mode 100644
> >> index 000000000000..7d2b36119599
> >> --- /dev/null
> >> +++ b/patches/tf-a-v2.10/0003-imx-disable-DRAM-retention-by-default.patch
> >> @@ -0,0 +1,174 @@
> >> +From 5d2f3f48a66a1f3f90d35679920832569100ed35 Mon Sep 17 00:00:00 2001
> >> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +Date: Wed, 13 Mar 2024 08:08:13 +0100
> >> +Subject: [PATCH 3/3] imx: disable DRAM retention by default
> >> +
> >> +Building the default upstream configuration is no longer possible
> >> +
> >> +Change-Id: I714f8ea96f18154db02390ba500f4a2dc5329ee7
> >> +---
> >> + plat/imx/common/include/imx_sip_svc.h | 8 ++++++++
> >> + plat/imx/imx8m/imx8mm/platform.mk     | 9 ++++++++-
> >> + plat/imx/imx8m/imx8mn/platform.mk     | 9 ++++++++-
> >> + plat/imx/imx8m/imx8mp/platform.mk     | 9 ++++++++-
> >> + plat/imx/imx8m/imx8mq/platform.mk     | 9 ++++++++-
> >> + plat/imx/imx8m/include/dram.h         | 8 +++++++-
> >> + 6 files changed, 47 insertions(+), 5 deletions(-)
> >> +
> >> +diff --git a/plat/imx/common/include/imx_sip_svc.h
> >> b/plat/imx/common/include/imx_sip_svc.h +index 0e91c7174a52..5015eb6a1f11
> >> 100644
> >> +--- a/plat/imx/common/include/imx_sip_svc.h
> >> ++++ b/plat/imx/common/include/imx_sip_svc.h
> >> +@@ -57,8 +57,16 @@ int imx_soc_info_handler(uint32_t smc_fid,
> >> u_register_t
> >> x1, + 			 u_register_t x2, u_register_t 
x3);
> >> + int imx_gpc_handler(uint32_t smc_fid, u_register_t x1,
> >> + 		    u_register_t x2, u_register_t x3);
> >> ++#if IMX_DRAM_RETENTION
> >> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> >> + 	u_register_t x1, u_register_t x2, u_register_t x3);
> >> ++#else
> >> ++static inline int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> >> ++		u_register_t x1, u_register_t x2, u_register_t x3)
> >> ++{
> >> ++	SMC_RET1(handle, SMC_UNK);
> >> ++}
> >> ++#endif
> >> + #endif
> >> + #if defined(PLAT_imx8mm) || defined(PLAT_imx8mn) ||
> >> defined(PLAT_imx8mp)
> >> + int dram_dvfs_handler(uint32_t smc_fid, void *handle,
> >> +diff --git a/plat/imx/imx8m/imx8mm/platform.mk
> >> b/plat/imx/imx8m/imx8mm/platform.mk +index 97f4f248824d..849ae5e4ca36
> >> 100644
> >> +--- a/plat/imx/imx8m/imx8mm/platform.mk
> >> ++++ b/plat/imx/imx8m/imx8mm/platform.mk
> >> +@@ -52,7 +52,6 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> + 				drivers/delay_timer/delay_timer.c
> > 
> > \
> > 
> >> + 				drivers/delay_timer/
> > 
> > generic_delay_timer.c	\
> > 
> >> + 				${XLAT_TABLES_LIB_SRCS}
> >> 
> > 		\
> >> 
> >> +-				${IMX_DRAM_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${IMX_GIC_SOURCES}
> >> +
> >> + ifeq (${NEED_BL2},yes)
> >> +@@ -153,6 +152,14 @@ ERRATA_A53_835769	:=	1
> >> + ERRATA_A53_843419	:=	1
> >> + ERRATA_A53_855873	:=	1
> >> +
> >> ++IMX_DRAM_RETENTION	?=	1
> >> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> >> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> >> ++
> >> ++ifeq (${IMX_DRAM_RETENTION},1)
> >> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> >> ++endif
> >> ++
> >> + BL32_BASE		?=	0xbe000000
> >> + $(eval $(call add_define,BL32_BASE))
> >> +
> >> +diff --git a/plat/imx/imx8m/imx8mn/platform.mk
> >> b/plat/imx/imx8m/imx8mn/platform.mk +index e0826e29a88c..94d31a2681aa
> >> 100644
> >> +--- a/plat/imx/imx8m/imx8mn/platform.mk
> >> ++++ b/plat/imx/imx8m/imx8mn/platform.mk
> >> +@@ -46,7 +46,6 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> + 				drivers/arm/tzc/tzc380.c
> >> 
> > 	\
> > 	
> >> + 				drivers/delay_timer/delay_timer.c
> > 
> > \
> > 
> >> + 				drivers/delay_timer/
> > 
> > generic_delay_timer.c	\
> > 
> >> +-				${IMX_DRAM_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${IMX_GIC_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${XLAT_TABLES_LIB_SRCS}
> >> +
> >> +@@ -59,6 +58,14 @@ ERRATA_A53_835769	:=	1
> >> + ERRATA_A53_843419	:=	1
> >> + ERRATA_A53_855873	:=	1
> >> +
> >> ++IMX_DRAM_RETENTION	?=	1
> >> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> >> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> >> ++
> >> ++ifeq (${IMX_DRAM_RETENTION},1)
> >> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> >> ++endif
> >> ++
> >> + BL32_BASE		?=	0xbe000000
> >> + $(eval $(call add_define,BL32_BASE))
> >> +
> >> +diff --git a/plat/imx/imx8m/imx8mp/platform.mk
> >> b/plat/imx/imx8m/imx8mp/platform.mk +index ce6907195152..1f699c4f26f0
> >> 100644
> >> +--- a/plat/imx/imx8m/imx8mp/platform.mk
> >> ++++ b/plat/imx/imx8m/imx8mp/platform.mk
> >> +@@ -47,7 +47,6 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> + 				drivers/arm/tzc/tzc380.c
> >> 
> > 	\
> > 	
> >> + 				drivers/delay_timer/delay_timer.c
> > 
> > \
> > 
> >> + 				drivers/delay_timer/
> > 
> > generic_delay_timer.c	\
> > 
> >> +-				${IMX_DRAM_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${IMX_GIC_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${XLAT_TABLES_LIB_SRCS}
> >> +
> >> +@@ -150,6 +149,14 @@ ERRATA_A53_835769	:=	1
> >> + ERRATA_A53_843419	:=	1
> >> + ERRATA_A53_855873	:=	1
> >> +
> >> ++IMX_DRAM_RETENTION	?=	1
> >> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> >> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> >> ++
> >> ++ifeq (${IMX_DRAM_RETENTION},1)
> >> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> >> ++endif
> >> ++
> >> + BL32_BASE		?=	0x56000000
> >> + $(eval $(call add_define,BL32_BASE))
> >> +
> >> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> >> b/plat/imx/imx8m/imx8mq/platform.mk +index 648159eb3d10..f61620bd4224
> >> 100644
> >> +--- a/plat/imx/imx8m/imx8mq/platform.mk
> >> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
> >> +@@ -43,7 +43,6 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> + 				drivers/delay_timer/delay_timer.c
> > 
> > \
> > 
> >> + 				drivers/delay_timer/
> > 
> > generic_delay_timer.c	\
> > 
> >> + 				${XLAT_TABLES_LIB_SRCS}
> >> 
> > 		\
> >> 
> >> +-				${IMX_DRAM_SOURCES}
> >> 
> > 	\
> > 	
> >> + 				${IMX_GIC_SOURCES}
> >> +
> >> + ENABLE_PIE		:=	1
> >> +@@ -56,6 +55,14 @@ ERRATA_A53_835769	:=	1
> >> + ERRATA_A53_843419	:=	1
> >> + ERRATA_A53_855873	:=	1
> >> +
> >> ++IMX_DRAM_RETENTION	?=	0
> >> ++$(eval $(call assert_boolean,IMX_DRAM_RETENTION))
> >> ++$(eval $(call add_define,IMX_DRAM_RETENTION))
> >> ++
> >> ++ifeq (${IMX_DRAM_RETENTION},1)
> >> ++BL31_SOURCES		+=	${IMX_DRAM_SOURCES}
> >> ++endif
> >> ++
> >> + BL32_BASE		?=	0xfe000000
> >> + $(eval $(call add_define,BL32_BASE))
> >> +
> >> +diff --git a/plat/imx/imx8m/include/dram.h
> >> b/plat/imx/imx8m/include/dram.h
> >> +index 719c39063778..1cf0666e9cad 100644
> >> +--- a/plat/imx/imx8m/include/dram.h
> >> ++++ b/plat/imx/imx8m/include/dram.h
> >> +@@ -70,13 +70,19 @@ struct dram_info {
> >> +
> >> + extern struct dram_info dram_info;
> >> +
> >> +-void dram_info_init(unsigned long dram_timing_base);
> >> + void dram_umctl2_init(struct dram_timing_info *timing);
> >> + void dram_phy_init(struct dram_timing_info *timing);
> >> +
> >> + /* dram retention */
> >> ++#if IMX_DRAM_RETENTION
> >> ++void dram_info_init(unsigned long dram_timing_base);
> >> + void dram_enter_retention(void);
> >> + void dram_exit_retention(void);
> >> ++#else
> >> ++static inline void dram_info_init(unsigned long dram_timing_base) {}
> >> ++static inline void dram_enter_retention(void) {}
> >> ++static inline void dram_exit_retention(void) {}
> >> ++#endif
> >> +
> >> + void dram_clock_switch(unsigned int target_drate, bool bypass_mode);
> >> +
> >> +--
> >> +2.39.2
> >> +
> >> diff --git
> >> a/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-
> >> ru
> >> nti.patch
> >> b/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-
> >> ru
> >> nti.patch new file mode 100644
> >> index 000000000000..d375a45c1598
> >> --- /dev/null
> >> +++
> >> b/patches/tf-a-v2.10/0101-feat-imx8mq-detect-console-base-address-during-
> >> ru
> >> nti.patch @@ -0,0 +1,72 @@
> >> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +Date: Wed, 13 Mar 2024 02:08:54 +0100
> >> +Subject: [PATCH] feat(imx8mq): detect console base address during
> >> runtime
> >> +
> >> +On the i.MX8M SoCs, TF-A doesn't itself initialize the UART, but depends
> >> +on BL2 to set it up beforehand. To allow using the same TF-A binary on
> >> +boards with different UART assignment, TF-A On i.MX8M M/N/P supports
> >> +dynamically determining the UART in use. The code is also applicable to
> >> +the i.MX8MQ, so enable it there too.
> >> +
> >> +Change-Id: I9ba70f7068e762da979bd103390fa006c3a5d480
> >> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +---
> >> + plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 8 +++++++-
> >> + plat/imx/imx8m/imx8mq/platform.mk         | 4 ++++
> >> + 2 files changed, 11 insertions(+), 1 deletion(-)
> >> +
> >> +diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c +index
> >> 7065a658614f..70c2def7d18b 100644
> >> +--- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> ++++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> +@@ -26,6 +26,7 @@
> >> + #include <imx_aipstz.h>
> >> + #include <imx_uart.h>
> >> + #include <imx8m_caam.h>
> >> ++#include <imx8m_ccm.h>
> >> + #include <plat_imx8.h>
> >> +
> >> + #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
> >> +@@ -145,6 +146,7 @@ static void bl31_tz380_setup(void)
> >> + void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> + 			u_register_t arg2, u_register_t arg3)
> >> + {
> >> ++	unsigned int console_base = IMX_BOOT_UART_BASE;
> >> + 	static console_t console;
> >> + 	int i;
> >> + 	/* enable CSU NS access permission */
> >> +@@ -154,7 +156,11 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, +
> >> + 	imx_aipstz_init(aipstz);
> >> +
> >> +-	console_imx_uart_register(IMX_BOOT_UART_BASE,
> > 
> > IMX_BOOT_UART_CLK_IN_HZ,
> > 
> >> ++	if (console_base == 0U) {
> >> ++		console_base = imx8m_uart_get_base();
> >> ++	}
> >> ++
> >> ++	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> >> + 		IMX_CONSOLE_BAUDRATE, &console);
> >> + 	/* This console is only used for boot stage */
> >> + 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> >> +diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> >> b/plat/imx/imx8m/imx8mq/platform.mk +index b48449725791..f61620bd4224
> >> 100644
> >> +--- a/plat/imx/imx8m/imx8mq/platform.mk
> >> ++++ b/plat/imx/imx8m/imx8mq/platform.mk
> >> +@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> + 				plat/imx/imx8m/gpc_common.c
> >> 
> > 	\
> > 	
> >> + 				plat/imx/imx8m/imx_aipstz.c
> >> 
> > 	\
> > 	
> >> + 				plat/imx/imx8m/imx8m_caam.c
> >> 
> > 	\
> > 	
> >> ++				plat/imx/imx8m/imx8m_ccm.c
> >> 
> > 	\
> > 	
> >> + 				plat/imx/imx8m/imx8m_psci_common.c
> >> 
> > 	\
> > 	
> >> + 				plat/imx/imx8m/imx8mq/gpc.c
> >> 
> > 	\
> > 	
> >> + 				plat/imx/common/imx8_topology.c
> >> 
> > 	\
> > 	
> >> +@@ -69,6 +70,9 @@ BL32_SIZE		?=	0x2000000
> >> + $(eval $(call add_define,BL32_SIZE))
> >> +
> >> + IMX_BOOT_UART_BASE	?=	0x30860000
> >> ++ifeq (${IMX_BOOT_UART_BASE},auto)
> >> ++    override IMX_BOOT_UART_BASE	:=	0
> >> ++endif
> >> + $(eval $(call add_define,IMX_BOOT_UART_BASE))
> >> +
> >> + ifeq (${SPD},trusty)
> >> diff --git
> >> a/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-
> >> as
> >> -BL.patch
> >> b/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-
> >> as
> >> -BL.patch new file mode 100644
> >> index 000000000000..60abc4862d7c
> >> --- /dev/null
> >> +++
> >> b/patches/tf-a-v2.10/0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-
> >> as
> >> -BL.patch @@ -0,0 +1,57 @@
> >> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +Date: Tue, 12 Mar 2024 18:36:46 +0100
> >> +Subject: [PATCH] fix(pmu): fix breakage on ARMv7 CPUs with SP_min as
> >> BL32
> >> +
> >> +While comments introduced with the original commit claim that
> >> +pmuv3_disable_el3()/pmuv3_init_el3() are compatible with PMUv2 and
> >> +PMUv1, this is not true in practice: The function accesses the Secure
> >> +Debug Control Register (SDCR), which only available to ARMv8 CPUs.
> >> +
> >> +ARMv8 CPUs executing in AArch32 mode would thus be able to disable
> >> +their PMUv3, while ARMv7 CPUs would hang trying to access the SDCR.
> >> +
> >> +Fix this by only doing PMUv3 handling when we know a PMUv3 to be
> >> +available. This resolves boot hanging on all STM32MP15 platforms
> >> +that use SP_min as BL32 instead of OP-TEE.
> >> +
> >> +Change-Id: I40f7611cf46b89a30243cc55bf55a8d9c9de93c8
> >> +Fixes: c73686a11cea ("feat(pmu): introduce pmuv3 lib/extensions folder")
> >> +Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +---
> >> + lib/el3_runtime/aarch32/context_mgmt.c | 7 ++-----
> >> + lib/extensions/pmuv3/aarch32/pmuv3.c   | 4 ----
> >> + 2 files changed, 2 insertions(+), 9 deletions(-)
> >> +
> >> +diff --git a/lib/el3_runtime/aarch32/context_mgmt.c
> >> b/lib/el3_runtime/aarch32/context_mgmt.c +index
> >> b60b8e0f05d0..72af43d3dcb0
> >> 100644
> >> +--- a/lib/el3_runtime/aarch32/context_mgmt.c
> >> ++++ b/lib/el3_runtime/aarch32/context_mgmt.c
> >> +@@ -149,11 +149,8 @@ static void enable_extensions_nonsecure(bool
> >> el2_unused) + 		trf_init_el3();
> >> + 	}
> >> +
> >> +-	/*
> >> +-	 * Also applies to PMU < v3. The PMU is only disabled for EL3 and
> > 
> > Secure
> > 
> >> +-	 * state execution. This does not affect lower NS ELs.
> >> +-	 */
> >> +-	pmuv3_init_el3();
> >> ++	if (read_feat_pmuv3_id_field() >= 3)
> >> ++		pmuv3_init_el3();
> >> + #endif /*  IMAGE_BL32 */
> >> + }
> >> +
> >> +diff --git a/lib/extensions/pmuv3/aarch32/pmuv3.c
> >> b/lib/extensions/pmuv3/aarch32/pmuv3.c +index effb7e02dc29..456a48efb0fb
> >> 100644
> >> +--- a/lib/extensions/pmuv3/aarch32/pmuv3.c
> >> ++++ b/lib/extensions/pmuv3/aarch32/pmuv3.c
> >> +@@ -25,10 +25,6 @@ static u_register_t mtpmu_disable_el3(u_register_t
> >> sdcr) + 	return sdcr;
> >> + }
> >> +
> >> +-/*
> >> +- * Applies to all PMU versions. Name is PMUv3 for compatibility with
> >> aarch64 and +- * to not clash with platforms which reuse the PMU name
> >> +- */
> >> + void pmuv3_init_el3(void)
> >> + {
> >> + 	u_register_t sdcr = read_sdcr();
> >> diff --git
> >> a/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-20
> >> 24
> >> 031.patch
> >> b/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-20
> >> 24
> >> 031.patch new file mode 100644
> >> index 000000000000..58cbc06803cb
> >> --- /dev/null
> >> +++
> >> b/patches/tf-a-v2.10/0301-Release-2.10-customers-pengutronix-distrokit-20
> >> 24
> >> 031.patch @@ -0,0 +1,21 @@
> >> +From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> +Date: Fri, 15 Mar 2024 21:18:29 +0100
> >> +Subject: [PATCH] Release 2.10/customers/pengutronix/distrokit/20240315-1
> >> +
> >> +---
> >> + Makefile | 2 +-
> >> + 1 file changed, 1 insertion(+), 1 deletion(-)
> >> +
> >> +diff --git a/Makefile b/Makefile
> >> +index 97c3c1548a78..56556db0be78 100644
> >> +--- a/Makefile
> >> ++++ b/Makefile
> >> +@@ -222,7 +222,7 @@ endif #(Debug)
> >> + ifeq (${BUILD_STRING},)
> >> + 	BUILD_STRING  :=  $(shell git describe --always --dirty --tags 2>
> >> /dev/null) + endif
> >> +-VERSION_STRING    :=  v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}
> >> ++VERSION_STRING    :=
> >> v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}-20240315-1 +
> >> + ifeq (${AARCH32_INSTRUCTION_SET},A32)
> >> + 	TF_CFLAGS_aarch32	+=	-marm
> >> diff --git a/patches/tf-a-v2.10/series b/patches/tf-a-v2.10/series
> >> new file mode 100644
> >> index 000000000000..4dd620f0aa06
> >> --- /dev/null
> >> +++ b/patches/tf-a-v2.10/series
> >> @@ -0,0 +1,19 @@
> >> +# umpf-base: v2.10
> >> +# umpf-name: 2.10/customers/pengutronix/distrokit
> >> +# umpf-version: 2.10/customers/pengutronix/distrokit/20240315-1
> >> +# umpf-topic: v2.10/topic/imx8mq-size
> >> +# umpf-hashinfo: a972970be20be852b0d48576dfb1c233612efbdd
> >> +# umpf-topic-range:
> >> b6c0948400594e3cc4dbb5a4ef04b815d2675808..6c0660bf6047f288628c282e44b9b1b
> >> 06
> >> bd1d33a +0001-fix-imx-disable-DRAM-retention-by-default-on-i.MX8MQ.patch
> >> +# umpf-topic: v2.10/topic/imx8mq-console
> >> +# umpf-hashinfo: 252b1100fb3c424e0fe1043e60414c3d7e0fa675
> >> +# umpf-topic-range:
> >> 6c0660bf6047f288628c282e44b9b1b06bd1d33a..ec9b46be3c0c561ed61f113dc3c1508
> >> 5d
> >> bce5bf7 +0101-feat-imx8mq-detect-console-base-address-during-runti.patch
> >> +# umpf-topic: v2.10/topic/stm32mp1
> >> +# umpf-hashinfo: 44f35b67ee4f89b05408ecfe7b4b2c1ae5366b72
> >> +# umpf-topic-range:
> >> ec9b46be3c0c561ed61f113dc3c15085dbce5bf7..10dfac53fdfff2f98d8140863f583df
> >> 47
> >> 2483f1d +0201-fix-pmu-fix-breakage-on-ARMv7-CPUs-with-SP_min-as-BL.patch
> >> +# umpf-release: 2.10/customers/pengutronix/distrokit/20240315-1
> >> +# umpf-topic-range:
> >> 10dfac53fdfff2f98d8140863f583df472483f1d..288664026c3117bda3f8f2275e76bb9
> >> 7b
> >> e116b89 +0301-Release-2.10-customers-pengutronix-distrokit-2024031.patch
> >> +# umpf-end
> >> diff --git
> >> a/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-optio
> >> ns
> >> .patch
> >> b/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-optio
> >> ns
> >> .patch deleted file mode 100644
> >> index e86f31b8858a..000000000000
> >> ---
> >> a/patches/tf-a-v2.8/0001-build-makefile-add-helper-to-detect-linker-optio
> >> ns
> >> .patch +++ /dev/null
> >> @@ -1,35 +0,0 @@
> >> -From: Marco Felsch <m.felsch@pengutronix.de>
> >> -Date: Thu, 24 Nov 2022 11:02:05 +0100
> >> -Subject: [PATCH] build(makefile): add helper to detect linker options
> >> -
> >> -This is a small helper to check for possible linker options. If the
> >> -linker supports the requested option it is returned and if not nothing
> >> -will be returned, e.g.:
> >> -
> >> -  TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
> >> -
> >> -can be called unconditional.
> >> -
> >> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> >> -Change-Id: I236800852ece49948ff53a0b91fddba53c8f0f95
> >> ----
> >> - make_helpers/build_macros.mk | 6 ++++++
> >> - 1 file changed, 6 insertions(+)
> >> -
> >> -diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
> >> -index 426e344941d9..7d0b0a511226 100644
> >> ---- a/make_helpers/build_macros.mk
> >> -+++ b/make_helpers/build_macros.mk
> >> -@@ -86,6 +86,12 @@ define assert_numerics
> >> -     $(foreach num,$1,$(eval $(call assert_numeric,$(num))))
> >> - endef
> >> -
> >> -+# Convenience function to check for a given linker option. An call to
> >> -+# $(call ld_option, --no-XYZ) will return --no-XYZ if supported by the
> >> linker -+define ld_option
> >> -+	$(shell if $(LD) $(1) -v >/dev/null 2>&1; then echo $(1); fi )
> >> -+endef
> >> -+
> >> - # CREATE_SEQ is a recursive function to create sequence of numbers from
> >> 1
> >> to - # $(2) and assign the sequence to $(1)
> >> - define CREATE_SEQ
> >> diff --git
> >> a/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions
> >> .p
> >> atch
> >> b/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions
> >> .p
> >> atch deleted file mode 100644
> >> index b254a578d7d4..000000000000
> >> ---
> >> a/patches/tf-a-v2.8/0002-feat-build-add-support-for-new-binutils-versions
> >> .p
> >> atch +++ /dev/null
> >> @@ -1,54 +0,0 @@
> >> -From: Marco Felsch <m.felsch@pengutronix.de>
> >> -Date: Wed, 9 Nov 2022 12:59:09 +0100
> >> -Subject: [PATCH] feat(build): add support for new binutils versions
> >> -
> >> -Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
> >> -of a new warning when linking the bl*.elf in the form:
> >> -
> >> -  ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section
> >> implies executable stack -  ld.bfd: NOTE: This behaviour is deprecated
> >> and
> >> will be removed in a future version of the linker -  ld.bfd: warning:
> >> bl2.elf has a LOAD segment with RWX permissions -  ld.bfd: warning:
> >> bl32.elf has a LOAD segment with RWX permissions -
> >> -These new warnings are enbaled by default to secure elf binaries:
> >> - -
> >> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da
> >> 01
> >> a6e8434126b8fac7aa75107 - -
> >> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a
> >> 1b
> >> 4500c9277a8e9d0f07e6774 -
> >> -Fix it in a similar way to what the Linux kernel does, see:
> >> -https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google
> >> .co m/ -
> >> -Following the reasoning there, we set "-z noexecstack" for all linkers
> >> -(although LLVM's LLD defaults to it) and optional add
> >> ---no-warn-rwx-segments since this a ld.bfd related.
> >> -
> >> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> >> -Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
> >> -Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
> >> ----
> >> - Makefile | 6 ++++++
> >> - 1 file changed, 6 insertions(+)
> >> -
> >> -diff --git a/Makefile b/Makefile
> >> -index 1ddb7b84417d..1bfff716485a 100644
> >> ---- a/Makefile
> >> -+++ b/Makefile
> >> -@@ -416,6 +416,8 @@ endif
> >> -
> >> - GCC_V_OUTPUT		:=	$(shell $(CC) -v 2>&1)
> >> -
> >> -+TF_LDFLAGS		+=	-z noexecstack
> >> -+
> >> - # LD = armlink
> >> - ifneq ($(findstring armlink,$(notdir $(LD))),)
> >> - TF_LDFLAGS		+=	--diag_error=warning --
> > 
> > lto_level=O1
> > 
> >> -@@ -451,6 +453,10 @@ TF_LDFLAGS		+=	$
> > 
> > (TF_LDFLAGS_$(ARCH))
> > 
> >> - endif
> >> - endif
> >> -
> >> -+# With ld.bfd version 2.29 and newer new warnings are added. Skip those
> >> since we -+# are not loaded by a elf loader.
> >> -+TF_LDFLAGS		+=	$(call ld_option, --no-warn-rwx-
> > 
> > segments)
> > 
> >> -+
> >> - DTC_FLAGS		+=	-I dts -O dtb
> >> - DTC_CPPFLAGS		+=	-P -nostdinc -Iinclude -Ifdts -
> > 
> > undef \
> > 
> >> - 				-x assembler-with-cpp $(DEFINES)
> >> diff --git
> >> a/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable
> >> -v
> >> ia.patch
> >> b/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable
> >> -v
> >> ia.patch deleted file mode 100644
> >> index 958b7fda325a..000000000000
> >> ---
> >> a/patches/tf-a-v2.8/0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable
> >> -v
> >> ia.patch +++ /dev/null
> >> @@ -1,41 +0,0 @@
> >> -From: Lucas Stach <l.stach@pengutronix.de>
> >> -Date: Thu, 8 Dec 2022 15:54:26 +0100
> >> -Subject: [PATCH] feat(imx8mq): make IMX_BOOT_UART_BASE configurable via
> >> build - parameter
> >> -
> >> -This aligns the i.MX8MQ build with the other i.MX8M platforms by
> >> allowing
> >> -to override the default IMX_BOOT_UART_BASE value via a make parameter.
> >> -
> >> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> >> -Change-Id: Iad9b844517209fc7d051c61767f71ac9fa2b55c7
> >> ----
> >> - plat/imx/imx8m/imx8mq/include/platform_def.h | 1 -
> >> - plat/imx/imx8m/imx8mq/platform.mk            | 3 +++
> >> - 2 files changed, 3 insertions(+), 1 deletion(-)
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h
> >> b/plat/imx/imx8m/imx8mq/include/platform_def.h -index
> >> 1dd22d952305..4671cd3afa40 100644
> >> ---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
> >> -+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
> >> -@@ -54,7 +54,6 @@
> >> -
> >> - #define HAB_RVT_BASE			U(0x00000880) /*
> > 
> > HAB_RVT for i.MX8MQ */
> > 
> >> -
> >> --#define IMX_BOOT_UART_BASE		U(0x30860000)
> >> - #define IMX_BOOT_UART_CLK_IN_HZ		25000000 /* Select
> > 
> > 25Mhz oscillator */
> > 
> >> - #define PLAT_CRASH_UART_BASE		IMX_BOOT_UART_BASE
> >> - #define PLAT_CRASH_UART_CLK_IN_HZ	25000000
> >> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> >> b/plat/imx/imx8m/imx8mq/platform.mk -index 7b6df920c924..f62d3aa5be15
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mq/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
> >> -@@ -52,6 +52,9 @@ $(eval $(call add_define,BL32_BASE))
> >> - BL32_SIZE		?=	0x2000000
> >> - $(eval $(call add_define,BL32_SIZE))
> >> -
> >> -+IMX_BOOT_UART_BASE	?=	0x30860000
> >> -+$(eval $(call add_define,IMX_BOOT_UART_BASE))
> >> -+
> >> - ifeq (${SPD},trusty)
> >> - 	BL31_CFLAGS    +=      -DPLAT_XLAT_TABLES_DYNAMIC=1
> >> - endif
> >> diff --git
> >> a/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup
> >> .p
> >> atch
> >> b/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup
> >> .p
> >> atch deleted file mode 100644
> >> index 0b1bc7e8c82b..000000000000
> >> ---
> >> a/patches/tf-a-v2.8/0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup
> >> .p
> >> atch +++ /dev/null
> >> @@ -1,30 +0,0 @@
> >> -From: Lucas Stach <l.stach@pengutronix.de>
> >> -Date: Thu, 8 Dec 2022 17:51:17 +0100
> >> -Subject: [PATCH] feat(imx8mq): remove empty bl31_plat_runtime_setup
> >> -
> >> -Having this empty definition is actively harmful, as it prevents the
> >> -default weak function to be used, which does a switch of the console
> >> -state.
> >> -
> >> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> >> -Change-Id: I3b78e0c524c4907714036dba573a44d8f9c48b09
> >> ----
> >> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 5 -----
> >> - 1 file changed, 5 deletions(-)
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> >> 59c3779abb7f..0feb6d7fbad2 100644
> >> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -@@ -227,11 +227,6 @@ unsigned int plat_get_syscnt_freq2(void)
> >> - 	return COUNTER_FREQUENCY;
> >> - }
> >> -
> >> --void bl31_plat_runtime_setup(void)
> >> --{
> >> --	return;
> >> --}
> >> --
> >> - #ifdef SPD_trusty
> >> - void plat_trusty_set_boot_args(aapcs64_params_t *args)
> >> - {
> >> diff --git
> >> a/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
> >> b/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch deleted
> >> file mode 100644
> >> index 3a44ae3a149d..000000000000
> >> --- a/patches/tf-a-v2.8/0103-feat-imx8mq-always-set-up-console.patch
> >> +++ /dev/null
> >> @@ -1,51 +0,0 @@
> >> -From: Lucas Stach <l.stach@pengutronix.de>
> >> -Date: Thu, 8 Dec 2022 16:00:04 +0100
> >> -Subject: [PATCH] feat(imx8mq): always set up console
> >> -
> >> -This aligns the i.MX8MQ platform behaviour with the other i.MX8M*
> >> -platforms by always setting up the console UART.
> >> -
> >> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> >> -Change-Id: I1279d9cb4feb6e789422b9844cab711b8daae74e
> >> ----
> >> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c    | 7 +++----
> >> - plat/imx/imx8m/imx8mq/include/platform_def.h | 1 -
> >> - 2 files changed, 3 insertions(+), 5 deletions(-)
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> >> 0feb6d7fbad2..0972c35e9554 100644
> >> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -@@ -124,6 +124,7 @@ static void bl31_tz380_setup(void)
> >> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> - 			u_register_t arg2, u_register_t arg3)
> >> - {
> >> -+	static console_t console;
> >> - 	int i;
> >> - 	/* enable CSU NS access permission */
> >> - 	for (i = 0; i < 64; i++) {
> >> -@@ -132,12 +133,10 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, -
> >> - 	imx_aipstz_init(aipstz);
> >> -
> >> --#if DEBUG_CONSOLE
> >> --	static console_t console;
> >> --
> >> - 	console_imx_uart_register(IMX_BOOT_UART_BASE,
> > 
> > IMX_BOOT_UART_CLK_IN_HZ,
> > 
> >> - 		IMX_CONSOLE_BAUDRATE, &console);
> >> --#endif
> >> -+	/* This console is only used for boot stage */
> >> -+	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> >> -
> >> - 	imx8m_caam_init();
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h
> >> b/plat/imx/imx8m/imx8mq/include/platform_def.h -index
> >> 4671cd3afa40..103f2e4087e2 100644
> >> ---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
> >> -+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
> >> -@@ -127,5 +127,4 @@
> >> -
> >> - #define COUNTER_FREQUENCY		8333333 /* 25MHz / 3 */
> >> -
> >> --#define DEBUG_CONSOLE			0
> >> - #define IMX_WDOG_B_RESET
> >> diff --git
> >> a/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.pa
> >> tc
> >> h
> >> b/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.pa
> >> tc
> >> h deleted file mode 100644
> >> index 6cf2dc18deb2..000000000000
> >> ---
> >> a/patches/tf-a-v2.8/0104-refactor-imx8mq-make-use-of-setup_page_tables.pa
> >> tc
> >> h +++ /dev/null
> >> @@ -1,53 +0,0 @@
> >> -From: Lucas Stach <l.stach@pengutronix.de>
> >> -Date: Thu, 8 Dec 2022 16:35:11 +0100
> >> -Subject: [PATCH] refactor(imx8mq): make use of setup_page_tables()
> >> -
> >> -Improve code readability and align with other i.MX8M* platforms.
> >> -
> >> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> >> -Change-Id: Ifd29b74872e3a567288d208de4827403078164e9
> >> ----
> >> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 28
> >> +++++++++++++--------------- - 1 file changed, 13 insertions(+), 15
> >> deletions(-)
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> >> 0972c35e9554..c7eddf430197 100644
> >> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -@@ -175,23 +175,21 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, -
> >> - void bl31_plat_arch_setup(void)
> >> - {
> >> --	mmap_add_region(BL31_BASE, BL31_BASE, (BL31_LIMIT - BL31_BASE),
> >> --		MT_MEMORY | MT_RW | MT_SECURE);
> >> --	mmap_add_region(BL_CODE_BASE, BL_CODE_BASE, (BL_CODE_END -
> > 
> > BL_CODE_BASE),
> > 
> >> --		MT_MEMORY | MT_RO | MT_SECURE);
> >> --
> >> --	/* Map TEE memory */
> >> --	mmap_add_region(BL32_BASE, BL32_BASE, BL32_SIZE, MT_MEMORY |
> > 
> > MT_RW);
> > 
> >> --
> >> --	mmap_add(imx_mmap);
> >> --
> >> -+	const mmap_region_t bl_regions[] = {
> >> -+        	MAP_REGION_FLAT(BL31_BASE, BL31_LIMIT - BL31_BASE,
> >> -+				MT_MEMORY | MT_RW | MT_SECURE),
> >> -+		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END -
> > 
> > BL_CODE_BASE,
> > 
> >> -+				MT_MEMORY | MT_RO | MT_SECURE),
> >> - #if USE_COHERENT_MEM
> >> --	mmap_add_region(BL_COHERENT_RAM_BASE, BL_COHERENT_RAM_BASE,
> >> --		BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE,
> >> --		MT_DEVICE | MT_RW | MT_SECURE);
> >> -+		MAP_REGION_FLAT(BL_COHERENT_RAM_BASE,
> >> -+				BL_COHERENT_RAM_END -
> > 
> > BL_COHERENT_RAM_BASE,
> > 
> >> -+				MT_DEVICE | MT_RW | MT_SECURE),
> >> - #endif
> >> --	/* setup xlat table */
> >> --	init_xlat_tables();
> >> -+		MAP_REGION_FLAT(BL32_BASE, BL32_SIZE, MT_MEMORY |
> > 
> > MT_RW),
> > 
> >> -+		{0},
> >> -+	};
> >> -+
> >> -+	setup_page_tables(bl_regions, imx_mmap);
> >> - 	/* enable the MMU */
> >> - 	enable_mmu_el3(0);
> >> - }
> >> diff --git
> >> a/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
> >> b/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
> >> deleted
> >> file mode 100644
> >> index 960d7265cc08..000000000000
> >> --- a/patches/tf-a-v2.8/0105-refactor-imx8mq-introduce-BL31_SIZE.patch
> >> +++ /dev/null
> >> @@ -1,54 +0,0 @@
> >> -From: Lucas Stach <l.stach@pengutronix.de>
> >> -Date: Thu, 8 Dec 2022 16:37:44 +0100
> >> -Subject: [PATCH] refactor(imx8mq): introduce BL31_SIZE
> >> -
> >> -No functional change.
> >> -
> >> -Introduce BL31_SIZE define and calculate the limits based on the
> >> -BL31_BASE and the BL31_SIZE define. Also make use of SZ_64K to make it
> >> -easier to read. This is required for later BL31 PIE support since it
> >> -drops the calculation based on the BL31_LIMIT and BL31_BASE.
> >> -
> >> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> >> -Change-Id: I517074b866b5bf11841b51777f87c926b304488d
> >> ----
> >> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c    | 2 +-
> >> - plat/imx/imx8m/imx8mq/include/platform_def.h | 5 ++++-
> >> - 2 files changed, 5 insertions(+), 2 deletions(-)
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> >> c7eddf430197..bbdb4d899a39 100644
> >> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -@@ -176,7 +176,7 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, - void bl31_plat_arch_setup(void)
> >> - {
> >> - 	const mmap_region_t bl_regions[] = {
> >> --        	MAP_REGION_FLAT(BL31_BASE, BL31_LIMIT - BL31_BASE,
> >> -+        	MAP_REGION_FLAT(BL31_BASE, BL31_SIZE,
> >> - 				MT_MEMORY | MT_RW | MT_SECURE),
> >> - 		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END -
> > 
> > BL_CODE_BASE,
> > 
> >> - 				MT_MEMORY | MT_RO | MT_SECURE),
> >> -diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h
> >> b/plat/imx/imx8m/imx8mq/include/platform_def.h -index
> >> 103f2e4087e2..bb570748f573 100644
> >> ---- a/plat/imx/imx8m/imx8mq/include/platform_def.h
> >> -+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
> >> -@@ -4,6 +4,8 @@
> >> -  * SPDX-License-Identifier: BSD-3-Clause
> >> -  */
> >> -
> >> -+#include <plat/common/common_def.h>
> >> -+
> >> - #define PLATFORM_LINKER_FORMAT		"elf64-littleaarch64"
> >> - #define PLATFORM_LINKER_ARCH		aarch64
> >> -
> >> -@@ -31,7 +33,8 @@
> >> - #define PLAT_STOP_OFF_STATE		U(3)
> >> -
> >> - #define BL31_BASE			U(0x910000)
> >> --#define BL31_LIMIT			U(0x920000)
> >> -+#define BL31_SIZE			SZ_64K
> >> -+#define BL31_LIMIT			(BL31_BASE + BL31_SIZE)
> >> -
> >> - /* non-secure uboot base */
> >> - #define PLAT_NS_IMAGE_OFFSET		U(0x40200000)
> >> diff --git
> >> a/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
> >> b/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch deleted
> >> file mode 100644
> >> index 25d2aaae70fd..000000000000
> >> --- a/patches/tf-a-v2.8/0106-feat-imx8mq-add-BL31-PIE-support.patch
> >> +++ /dev/null
> >> @@ -1,55 +0,0 @@
> >> -From: Lucas Stach <l.stach@pengutronix.de>
> >> -Date: Thu, 8 Dec 2022 16:44:00 +0100
> >> -Subject: [PATCH] feat(imx8mq): add BL31 PIE support
> >> -
> >> -Enable PIE support so the BL31 firmware can be loaded from anywhere
> >> -within the OCRAM (SRAM). For the PIE support we only need to replace the
> >> -BL31_BASE define by the BL31_START symbol which is a relocatable and we
> >> -need to enable it by setting ENABLE_PIE := 1.
> >> -
> >> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> >> -Change-Id: Ie6a13e4ae0fdc6627a94798d7a86df7d5b310896
> >> ----
> >> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 2 +-
> >> - plat/imx/imx8m/imx8mq/imx8mq_psci.c       | 2 +-
> >> - plat/imx/imx8m/imx8mq/platform.mk         | 1 +
> >> - 3 files changed, 3 insertions(+), 2 deletions(-)
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> >> bbdb4d899a39..3c2d223fef21 100644
> >> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -@@ -176,7 +176,7 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, - void bl31_plat_arch_setup(void)
> >> - {
> >> - 	const mmap_region_t bl_regions[] = {
> >> --        	MAP_REGION_FLAT(BL31_BASE, BL31_SIZE,
> >> -+        	MAP_REGION_FLAT(BL31_START, BL31_SIZE,
> >> - 				MT_MEMORY | MT_RW | MT_SECURE),
> >> - 		MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END -
> > 
> > BL_CODE_BASE,
> > 
> >> - 				MT_MEMORY | MT_RO | MT_SECURE),
> >> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_psci.c
> >> b/plat/imx/imx8m/imx8mq/imx8mq_psci.c -index 662017d6fe4a..01582afe490c
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mq/imx8mq_psci.c
> >> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_psci.c
> >> -@@ -41,7 +41,7 @@ int imx_validate_power_state(unsigned int power_state,
> >> -
> >> - void imx_domain_suspend(const psci_power_state_t *target_state)
> >> - {
> >> --	uint64_t base_addr = BL31_BASE;
> >> -+	uint64_t base_addr = BL31_START;
> >> - 	uint64_t mpidr = read_mpidr_el1();
> >> - 	unsigned int core_id = MPIDR_AFFLVL0_VAL(mpidr);
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> >> b/plat/imx/imx8m/imx8mq/platform.mk -index f62d3aa5be15..901a974a591e
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mq/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
> >> -@@ -38,6 +38,7 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> - 				${XLAT_TABLES_LIB_SRCS}
> >> 
> > 		\
> >> 
> >> - 				${IMX_GIC_SOURCES}
> >> -
> >> -+ENABLE_PIE		:=	1
> >> - USE_COHERENT_MEM	:=	1
> >> - RESET_TO_BL31		:=	1
> >> - A53_DISABLE_NON_TEMPORAL_HINT := 0
> >> diff --git
> >> a/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
> >> b/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
> >> deleted
> >> file mode 100644
> >> index 24a5b80ca473..000000000000
> >> --- a/patches/tf-a-v2.8/0107-feat-imx8mq-add-support-for-gcc-12.x.patch
> >> +++ /dev/null
> >> @@ -1,45 +0,0 @@
> >> -From: Marco Felsch <m.felsch@pengutronix.de>
> >> -Date: Fri, 10 Feb 2023 12:14:26 +0100
> >> -Subject: [PATCH] feat(imx8mq): add support for gcc >= 12.x
> >> -
> >> -Starting with GCC >= 12.x the -Wall option includes -Werror=array-bounds
> >> -checks. Per default GCC threads all memory accesses below 4096 as NULL,
> >> -so access to ROMAPI causes the following warning:
> >> -
> >> -In file included from plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:20:
> >> -In function 'mmio_read_8',
> >> -    inlined from 'imx8mq_soc_info_init' at
> >> plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:70:16, -    inlined from
> >> 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:206:2:
> >> -include/lib/mmio.h:19:16: error: array subscript 0 is outside array
> >> bounds
> >> of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'}
> >> [-Werror=array-bounds] -   19 |         return *(volatile uint8_t*)addr;
> >> -      |                ^~~~~~~~~~~~~~~~~~~~~~~~
> >> -In function 'mmio_read_8',
> >> -    inlined from 'imx8mq_soc_info_init' at
> >> plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:74:16, -    inlined from
> >> 'bl31_platform_setup' at plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c:206:2:
> >> -include/lib/mmio.h:19:16: error: array subscript 0 is outside array
> >> bounds
> >> of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'}
> >> [-Werror=array-bounds] -   19 |         return *(volatile uint8_t*)addr;
> >> -      |                ^~~~~~~~~~~~~~~~~~~~~~~~
> >> -cc1: all warnings being treated as errors
> >> -
> >> -Fix this by setting the default min-pagesize to 0 instead of 4096, so
> >> -the ROMAPI access will not trigger the warning. Don't set this option
> >> -for all files since it is unkown how it affects code
> >> -generation/optimizations.
> >> -
> >> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> >> -Change-Id: Ibcca65ca69750e1a1bca3d528c80e5b445d2f90f
> >> ----
> >> - plat/imx/imx8m/imx8mq/platform.mk | 3 +++
> >> - 1 file changed, 3 insertions(+)
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> >> b/plat/imx/imx8m/imx8mq/platform.mk -index 901a974a591e..985be71725f7
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mq/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
> >> -@@ -59,3 +59,6 @@ $(eval $(call add_define,IMX_BOOT_UART_BASE))
> >> - ifeq (${SPD},trusty)
> >> - 	BL31_CFLAGS    +=      -DPLAT_XLAT_TABLES_DYNAMIC=1
> >> - endif
> >> -+
> >> -+# Required with gcc version >= 12
> >> -+$(BUILD_PLAT)/bl31/imx8mq_bl31_setup.o: CFLAGS +=
> >> --param=min-pagesize=0
> >> diff --git
> >> a/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-ru
> >> nt
> >> im.patch
> >> b/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-ru
> >> nt
> >> im.patch deleted file mode 100644
> >> index 68f36aca7aa1..000000000000
> >> ---
> >> a/patches/tf-a-v2.8/0201-feat-imx8m-detect-console-base-address-during-ru
> >> nt
> >> im.patch +++ /dev/null
> >> @@ -1,304 +0,0 @@
> >> -From: Marco Felsch <m.felsch@pengutronix.de>
> >> -Date: Mon, 24 Jul 2023 15:05:58 +0200
> >> -Subject: [PATCH] feat(imx8m): detect console base address during runtime
> >> -
> >> -Provide a helper to detect the enabled UART device during runtime. This
> >> -lower the integration effort and make it more straight forward for
> >> -'simple' use-cases with a single UART enabled. If multiple UARTs are
> >> -enabled the first enabled is returned.
> >> -
> >> -The auto-detection is enabled by setting IMX_BOOT_UART_BASE=0 to keep
> >> -the backward compatibility. For more advanced use-cases (multiple UARTs
> >> -are enabled) the user still has to provide the correct base address.
> >> -
> >> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> >> -Change-Id: I300a167e1a10f9aa991c8d1c3efe2c6b23f56c47
> >> ----
> >> - plat/imx/imx8m/imx8m_ccm.c                | 58
> >> +++++++++++++++++++++++++++++++ -
> >> plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> >> 
> >> | 11 +++++-
> >> 
> >> - plat/imx/imx8m/imx8mm/platform.mk         |  1 +
> >> - plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 11 +++++-
> >> - plat/imx/imx8m/imx8mn/platform.mk         |  1 +
> >> - plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c | 11 +++++-
> >> - plat/imx/imx8m/imx8mp/platform.mk         |  1 +
> >> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 11 +++++-
> >> - plat/imx/imx8m/imx8mq/platform.mk         |  1 +
> >> - plat/imx/imx8m/include/imx8m_ccm.h        | 12 +++++++
> >> - 10 files changed, 114 insertions(+), 4 deletions(-)
> >> - create mode 100644 plat/imx/imx8m/imx8m_ccm.c
> >> - create mode 100644 plat/imx/imx8m/include/imx8m_ccm.h
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8m_ccm.c b/plat/imx/imx8m/imx8m_ccm.c
> >> -new file mode 100644
> >> -index 000000000000..10a00c990031
> >> ---- /dev/null
> >> -+++ b/plat/imx/imx8m/imx8m_ccm.c
> >> -@@ -0,0 +1,58 @@
> >> -+/*
> >> -+ * Copyright (c) 2023, Pengutronix. All rights reserved.
> >> -+ *
> >> -+ * SPDX-License-Identifier: BSD-3-Clause
> >> -+ */
> >> -+
> >> -+#include <lib/mmio.h>
> >> -+#include <platform_def.h>
> >> -+
> >> -+#define UCR1    		0x80
> >> -+#define UCR1_UARTEN		BIT(0)
> >> -+#define DOMAIN0_RUNNING(d)	(((d) & 0x3) != 0)
> >> -+
> >> -+static struct imx_uart {
> >> -+	unsigned int ccm_reg;
> >> -+	unsigned int uart_base;
> >> -+} imx8m_uart_info[] = {
> >> -+	{	/* UART 1 */
> >> -+		.ccm_reg = 0x4490,
> >> -+		.uart_base = 0x30860000,
> >> -+	}, {	/* UART 2 */
> >> -+		.ccm_reg = 0x44a0,
> >> -+		.uart_base = 0x30890000,
> >> -+	}, {	/* UART 3 */
> >> -+		.ccm_reg = 0x44b0,
> >> -+		.uart_base = 0x30880000,
> >> -+	}, {	/* UART 4 */
> >> -+		.ccm_reg = 0x44c0,
> >> -+		.uart_base = 0x30a60000,
> >> -+	}
> >> -+};
> >> -+
> >> -+unsigned int imx8m_uart_get_base(void)
> >> -+{
> >> -+	unsigned int i;
> >> -+
> >> -+	for (i = 0; i < ARRAY_SIZE(imx8m_uart_info); i++) {
> >> -+		uint32_t val;
> >> -+
> >> -+		/*
> >> -+		 * At least check that the clock-gate is ungated before
> > 
> > we
> > 
> >> -+		 * access the UART register.
> >> -+		 */
> >> -+		val = mmio_read_32(IMX_CCM_BASE +
> > 
> > imx8m_uart_info[i].ccm_reg);
> > 
> >> -+		if (DOMAIN0_RUNNING(val)) {
> >> -+			val =
> > 
> > mmio_read_32(imx8m_uart_info[i].uart_base + UCR1);
> > 
> >> -+			if (val & UCR1_UARTEN) {
> >> -+				return
> > 
> > imx8m_uart_info[i].uart_base;
> > 
> >> -+			}
> >> -+		}
> >> -+	}
> >> -+
> >> -+	/*
> >> -+	 * We should return an error and inform the user but we can't do it
> >> -+	 * this early.
> >> -+	 */
> >> -+	return 0;
> >> -+}
> >> -diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c -index
> >> 67bfd3651dfe..8e6636147438 100644
> >> ---- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> >> -@@ -27,6 +27,7 @@
> >> - #include <imx_uart.h>
> >> - #include <imx_rdc.h>
> >> - #include <imx8m_caam.h>
> >> -+#include <imx8m_ccm.h>
> >> - #include <imx8m_csu.h>
> >> - #include <plat_imx8.h>
> >> -
> >> -@@ -130,6 +131,7 @@ void bl31_tzc380_setup(void)
> >> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> - 		u_register_t arg2, u_register_t arg3)
> >> - {
> >> -+	unsigned int console_base = 0U;
> >> - 	static console_t console;
> >> - 	int i;
> >> -
> >> -@@ -144,7 +146,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, -
> >> - 	imx_csu_init(csu_cfg);
> >> -
> >> --	console_imx_uart_register(IMX_BOOT_UART_BASE,
> > 
> > IMX_BOOT_UART_CLK_IN_HZ,
> > 
> >> -+#if IMX_BOOT_UART_BASE
> >> -+	console_base = IMX_BOOT_UART_BASE;
> >> -+#endif
> >> -+	if (console_base == 0U) {
> >> -+		console_base = imx8m_uart_get_base();
> >> -+	}
> >> -+
> >> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> >> - 		IMX_CONSOLE_BAUDRATE, &console);
> >> - 	/* This console is only used for boot stage */
> >> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> >> -diff --git a/plat/imx/imx8m/imx8mm/platform.mk
> >> b/plat/imx/imx8m/imx8mm/platform.mk -index 7a42554f5739..22791fda4c2c
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mm/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mm/platform.mk
> >> -@@ -37,6 +37,7 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> - 				plat/imx/imx8m/imx_rdc.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_csu.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_caam.c
> >> 
> > 	\
> > 	
> >> -+				plat/imx/imx8m/imx8m_ccm.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_psci_common.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8mm/
> > 
> > imx8mm_bl31_setup.c	\
> > 
> >> - 				plat/imx/imx8m/imx8mm/
> > 
> > imx8mm_psci.c		\
> > 
> >> -diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c -index
> >> eff198dd741c..aeb1cbf2945f 100644
> >> ---- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> >> -@@ -25,6 +25,7 @@
> >> - #include <imx_uart.h>
> >> - #include <imx_rdc.h>
> >> - #include <imx8m_caam.h>
> >> -+#include <imx8m_ccm.h>
> >> - #include <imx8m_csu.h>
> >> - #include <platform_def.h>
> >> - #include <plat_imx8.h>
> >> -@@ -121,6 +122,7 @@ static void bl31_tzc380_setup(void)
> >> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> - 		u_register_t arg2, u_register_t arg3)
> >> - {
> >> -+	unsigned int console_base = 0U;
> >> - 	static console_t console;
> >> - 	unsigned int val;
> >> - 	int i;
> >> -@@ -141,7 +143,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE +
> > 
> > 0x2c);
> > 
> >> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
> >> -
> >> --	console_imx_uart_register(IMX_BOOT_UART_BASE,
> > 
> > IMX_BOOT_UART_CLK_IN_HZ,
> > 
> >> -+#if IMX_BOOT_UART_BASE
> >> -+	console_base = IMX_BOOT_UART_BASE;
> >> -+#endif
> >> -+	if (console_base == 0U) {
> >> -+		console_base = imx8m_uart_get_base();
> >> -+	}
> >> -+
> >> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> >> - 		IMX_CONSOLE_BAUDRATE, &console);
> >> - 	/* This console is only used for boot stage */
> >> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> >> -diff --git a/plat/imx/imx8m/imx8mn/platform.mk
> >> b/plat/imx/imx8m/imx8mn/platform.mk -index 1c0ad4f3bc23..46516104f16d
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mn/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mn/platform.mk
> >> -@@ -31,6 +31,7 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> - 				plat/imx/imx8m/imx_aipstz.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx_rdc.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_caam.c
> >> 
> > 	\
> > 	
> >> -+				plat/imx/imx8m/imx8m_ccm.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_csu.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_psci_common.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8mn/
> > 
> > imx8mn_bl31_setup.c	\
> > 
> >> -diff --git a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c -index
> >> 4c31fa28dab7..e25668b879b3 100644
> >> ---- a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> >> -@@ -25,6 +25,7 @@
> >> - #include <imx_uart.h>
> >> - #include <imx_rdc.h>
> >> - #include <imx8m_caam.h>
> >> -+#include <imx8m_ccm.h>
> >> - #include <imx8m_csu.h>
> >> - #include <platform_def.h>
> >> - #include <plat_imx8.h>
> >> -@@ -117,6 +118,7 @@ static void bl31_tzc380_setup(void)
> >> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> - 		u_register_t arg2, u_register_t arg3)
> >> - {
> >> -+	unsigned int console_base = 0U;
> >> - 	static console_t console;
> >> - 	unsigned int val;
> >> - 	unsigned int i;
> >> -@@ -137,7 +139,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE +
> > 
> > 0x2c);
> > 
> >> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
> >> -
> >> --	console_imx_uart_register(IMX_BOOT_UART_BASE,
> > 
> > IMX_BOOT_UART_CLK_IN_HZ,
> > 
> >> -+#if IMX_BOOT_UART_BASE
> >> -+	console_base = IMX_BOOT_UART_BASE;
> >> -+#endif
> >> -+	if (console_base == 0U) {
> >> -+		console_base = imx8m_uart_get_base();
> >> -+	}
> >> -+
> >> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> >> - 		IMX_CONSOLE_BAUDRATE, &console);
> >> - 	/* This console is only used for boot stage */
> >> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> >> -diff --git a/plat/imx/imx8m/imx8mp/platform.mk
> >> b/plat/imx/imx8m/imx8mp/platform.mk -index 5414c0a5732d..cdb504de0f3d
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mp/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mp/platform.mk
> >> -@@ -32,6 +32,7 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> - 				plat/imx/imx8m/imx_aipstz.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx_rdc.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_caam.c
> >> 
> > 	\
> > 	
> >> -+				plat/imx/imx8m/imx8m_ccm.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_csu.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_psci_common.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8mp/
> > 
> > imx8mp_bl31_setup.c	\
> > 
> >> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> >> 3c2d223fef21..1cb2d2a25b54 100644
> >> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -@@ -25,6 +25,7 @@
> >> - #include <imx_aipstz.h>
> >> - #include <imx_uart.h>
> >> - #include <imx8m_caam.h>
> >> -+#include <imx8m_ccm.h>
> >> - #include <plat_imx8.h>
> >> -
> >> - #define TRUSTY_PARAMS_LEN_BYTES      (4096*2)
> >> -@@ -124,6 +125,7 @@ static void bl31_tz380_setup(void)
> >> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> - 			u_register_t arg2, u_register_t arg3)
> >> - {
> >> -+	unsigned int console_base = 0U;
> >> - 	static console_t console;
> >> - 	int i;
> >> - 	/* enable CSU NS access permission */
> >> -@@ -133,7 +135,14 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, -
> >> - 	imx_aipstz_init(aipstz);
> >> -
> >> --	console_imx_uart_register(IMX_BOOT_UART_BASE,
> > 
> > IMX_BOOT_UART_CLK_IN_HZ,
> > 
> >> -+#if IMX_BOOT_UART_BASE
> >> -+	console_base = IMX_BOOT_UART_BASE;
> >> -+#endif
> >> -+	if (console_base == 0U) {
> >> -+		console_base = imx8m_uart_get_base();
> >> -+	}
> >> -+
> >> -+	console_imx_uart_register(console_base, IMX_BOOT_UART_CLK_IN_HZ,
> >> - 		IMX_CONSOLE_BAUDRATE, &console);
> >> - 	/* This console is only used for boot stage */
> >> - 	console_set_scope(&console, CONSOLE_FLAG_BOOT);
> >> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> >> b/plat/imx/imx8m/imx8mq/platform.mk -index 985be71725f7..0c34c10bdcb4
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mq/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
> >> -@@ -25,6 +25,7 @@ BL31_SOURCES		+=	plat/imx/
common/
> > 
> > imx8_helpers.S			\
> > 
> >> - 				plat/imx/imx8m/gpc_common.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx_aipstz.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_caam.c
> >> 
> > 	\
> > 	
> >> -+				plat/imx/imx8m/imx8m_ccm.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8m_psci_common.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/imx8m/imx8mq/gpc.c
> >> 
> > 	\
> > 	
> >> - 				plat/imx/common/imx8_topology.c
> >> 
> > 	\
> > 	
> >> -diff --git a/plat/imx/imx8m/include/imx8m_ccm.h
> >> b/plat/imx/imx8m/include/imx8m_ccm.h -new file mode 100644
> >> -index 000000000000..acbd135cb314
> >> ---- /dev/null
> >> -+++ b/plat/imx/imx8m/include/imx8m_ccm.h
> >> -@@ -0,0 +1,12 @@
> >> -+/*
> >> -+ * Copyright (c) 2023, Pengutronix. All rights reserved.
> >> -+ *
> >> -+ * SPDX-License-Identifier: BSD-3-Clause
> >> -+ */
> >> -+
> >> -+#ifndef IMX8M_CCM_H
> >> -+#define IMX8M_CCM_H
> >> -+
> >> -+unsigned int imx8m_uart_get_base(void);
> >> -+
> >> -+#endif /* IMX8M_CCM_H */
> >> diff --git
> >> a/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-
> >> op
> >> ti.patch
> >> b/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-
> >> op
> >> ti.patch deleted file mode 100644
> >> index 9fae10905edd..000000000000
> >> ---
> >> a/patches/tf-a-v2.8/0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-
> >> op
> >> ti.patch +++ /dev/null
> >> @@ -1,172 +0,0 @@
> >> -From: Marco Felsch <m.felsch@pengutronix.de>
> >> -Date: Wed, 2 Aug 2023 08:11:35 +0200
> >> -Subject: [PATCH] fix(imx8m): make IMX_BOOT_UART_BASE autodetection
> >> option
> >> more - obvious
> >> -
> >> -Switch from IMX_BOOT_UART_BASE=0 to IMX_BOOT_UART_BASE=auto to make it
> >> -more obvious that the detection is based on the runtime autodetection.
> >> -
> >> -In addition this moves the evaluation of IMX_BOOT_UART_BASE into the
> >> -makefile which removes the ugly conditional compilation as well.
> >> -
> >> -Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> >> -Change-Id: I92c13607bf81c6267f4b6aee829d74902b7f72d2
> >> ----
> >> - plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 5 +----
> >> - plat/imx/imx8m/imx8mm/platform.mk         | 3 +++
> >> - plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c | 5 +----
> >> - plat/imx/imx8m/imx8mn/platform.mk         | 3 +++
> >> - plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c | 5 +----
> >> - plat/imx/imx8m/imx8mp/platform.mk         | 3 +++
> >> - plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 5 +----
> >> - plat/imx/imx8m/imx8mq/platform.mk         | 3 +++
> >> - 8 files changed, 16 insertions(+), 16 deletions(-)
> >> -
> >> -diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c -index
> >> 8e6636147438..c8a3adf8f333 100644
> >> ---- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
> >> -@@ -131,7 +131,7 @@ void bl31_tzc380_setup(void)
> >> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> - 		u_register_t arg2, u_register_t arg3)
> >> - {
> >> --	unsigned int console_base = 0U;
> >> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
> >> - 	static console_t console;
> >> - 	int i;
> >> -
> >> -@@ -146,9 +146,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, -
> >> - 	imx_csu_init(csu_cfg);
> >> -
> >> --#if IMX_BOOT_UART_BASE
> >> --	console_base = IMX_BOOT_UART_BASE;
> >> --#endif
> >> - 	if (console_base == 0U) {
> >> - 		console_base = imx8m_uart_get_base();
> >> - 	}
> >> -diff --git a/plat/imx/imx8m/imx8mm/platform.mk
> >> b/plat/imx/imx8m/imx8mm/platform.mk -index 22791fda4c2c..1b4a1f2f37c7
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mm/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mm/platform.mk
> >> -@@ -159,6 +159,9 @@ BL32_SIZE		?=	0x2000000
> >> - $(eval $(call add_define,BL32_SIZE))
> >> -
> >> - IMX_BOOT_UART_BASE	?=	0x30890000
> >> -+ifeq (${IMX_BOOT_UART_BASE},auto)
> >> -+    override IMX_BOOT_UART_BASE	:=	0
> >> -+endif
> >> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
> >> -
> >> - EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
> >> -diff --git a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c -index
> >> aeb1cbf2945f..147249ee5e56 100644
> >> ---- a/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mn/imx8mn_bl31_setup.c
> >> -@@ -122,7 +122,7 @@ static void bl31_tzc380_setup(void)
> >> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> - 		u_register_t arg2, u_register_t arg3)
> >> - {
> >> --	unsigned int console_base = 0U;
> >> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
> >> - 	static console_t console;
> >> - 	unsigned int val;
> >> - 	int i;
> >> -@@ -143,9 +143,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE +
> > 
> > 0x2c);
> > 
> >> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
> >> -
> >> --#if IMX_BOOT_UART_BASE
> >> --	console_base = IMX_BOOT_UART_BASE;
> >> --#endif
> >> - 	if (console_base == 0U) {
> >> - 		console_base = imx8m_uart_get_base();
> >> - 	}
> >> -diff --git a/plat/imx/imx8m/imx8mn/platform.mk
> >> b/plat/imx/imx8m/imx8mn/platform.mk -index 46516104f16d..a6b43f213506
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mn/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mn/platform.mk
> >> -@@ -65,6 +65,9 @@ BL32_SIZE		?=	0x2000000
> >> - $(eval $(call add_define,BL32_SIZE))
> >> -
> >> - IMX_BOOT_UART_BASE	?=	0x30890000
> >> -+ifeq (${IMX_BOOT_UART_BASE},auto)
> >> -+    override IMX_BOOT_UART_BASE	:=	0
> >> -+endif
> >> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
> >> -
> >> - EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
> >> -diff --git a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c -index
> >> e25668b879b3..b0a41c741c17 100644
> >> ---- a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c
> >> -@@ -118,7 +118,7 @@ static void bl31_tzc380_setup(void)
> >> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> - 		u_register_t arg2, u_register_t arg3)
> >> - {
> >> --	unsigned int console_base = 0U;
> >> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
> >> - 	static console_t console;
> >> - 	unsigned int val;
> >> - 	unsigned int i;
> >> -@@ -139,9 +139,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, - 	val = mmio_read_32(IMX_IOMUX_GPR_BASE +
> > 
> > 0x2c);
> > 
> >> - 	mmio_write_32(IMX_IOMUX_GPR_BASE + 0x2c, val | 0x3DFF0000);
> >> -
> >> --#if IMX_BOOT_UART_BASE
> >> --	console_base = IMX_BOOT_UART_BASE;
> >> --#endif
> >> - 	if (console_base == 0U) {
> >> - 		console_base = imx8m_uart_get_base();
> >> - 	}
> >> -diff --git a/plat/imx/imx8m/imx8mp/platform.mk
> >> b/plat/imx/imx8m/imx8mp/platform.mk -index cdb504de0f3d..0169144f4a1a
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mp/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mp/platform.mk
> >> -@@ -156,6 +156,9 @@ BL32_SIZE		?=	0x2000000
> >> - $(eval $(call add_define,BL32_SIZE))
> >> -
> >> - IMX_BOOT_UART_BASE	?=	0x30890000
> >> -+ifeq (${IMX_BOOT_UART_BASE},auto)
> >> -+    override IMX_BOOT_UART_BASE	:=	0
> >> -+endif
> >> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
> >> -
> >> - EL3_EXCEPTION_HANDLING := $(SDEI_SUPPORT)
> >> -diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c -index
> >> 1cb2d2a25b54..a2c81610b353 100644
> >> ---- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
> >> -@@ -125,7 +125,7 @@ static void bl31_tz380_setup(void)
> >> - void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
> >> - 			u_register_t arg2, u_register_t arg3)
> >> - {
> >> --	unsigned int console_base = 0U;
> >> -+	unsigned int console_base = IMX_BOOT_UART_BASE;
> >> - 	static console_t console;
> >> - 	int i;
> >> - 	/* enable CSU NS access permission */
> >> -@@ -135,9 +135,6 @@ void bl31_early_platform_setup2(u_register_t arg0,
> >> u_register_t arg1, -
> >> - 	imx_aipstz_init(aipstz);
> >> -
> >> --#if IMX_BOOT_UART_BASE
> >> --	console_base = IMX_BOOT_UART_BASE;
> >> --#endif
> >> - 	if (console_base == 0U) {
> >> - 		console_base = imx8m_uart_get_base();
> >> - 	}
> >> -diff --git a/plat/imx/imx8m/imx8mq/platform.mk
> >> b/plat/imx/imx8m/imx8mq/platform.mk -index 0c34c10bdcb4..6ee7d23d4882
> >> 100644
> >> ---- a/plat/imx/imx8m/imx8mq/platform.mk
> >> -+++ b/plat/imx/imx8m/imx8mq/platform.mk
> >> -@@ -55,6 +55,9 @@ BL32_SIZE		?=	0x2000000
> >> - $(eval $(call add_define,BL32_SIZE))
> >> -
> >> - IMX_BOOT_UART_BASE	?=	0x30860000
> >> -+ifeq (${IMX_BOOT_UART_BASE},auto)
> >> -+    override IMX_BOOT_UART_BASE	:=	0
> >> -+endif
> >> - $(eval $(call add_define,IMX_BOOT_UART_BASE))
> >> -
> >> - ifeq (${SPD},trusty)
> >> diff --git
> >> a/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-2024
> >> 01
> >> 17.patch
> >> b/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-2024
> >> 01
> >> 17.patch deleted file mode 100644
> >> index 1d1a9b9471bb..000000000000
> >> ---
> >> a/patches/tf-a-v2.8/0301-Release-2.8-customers-pengutronix-distrokit-2024
> >> 01
> >> 17.patch +++ /dev/null
> >> @@ -1,21 +0,0 @@
> >> -From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= <l.goehrs@pengutronix.de>
> >> -Date: Wed, 17 Jan 2024 11:13:01 +0100
> >> -Subject: [PATCH] Release 2.8/customers/pengutronix/distrokit/20240117-1
> >> -
> >> ----
> >> - Makefile | 2 +-
> >> - 1 file changed, 1 insertion(+), 1 deletion(-)
> >> -
> >> -diff --git a/Makefile b/Makefile
> >> -index 1bfff716485a..f39eb940a024 100644
> >> ---- a/Makefile
> >> -+++ b/Makefile
> >> -@@ -327,7 +327,7 @@ endif
> >> - ifeq (${BUILD_STRING},)
> >> -         BUILD_STRING  :=  $(shell git describe --always --dirty --tags
> >> 2>
> >> /dev/null) - endif
> >> --VERSION_STRING    :=  v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}
> >> -+VERSION_STRING    :=
> >> v${VERSION}(${BUILD_TYPE}):${BUILD_STRING}-20240117-1 -
> >> - ifeq (${AARCH32_INSTRUCTION_SET},A32)
> >> - TF_CFLAGS_aarch32	+=	-marm
> >> diff --git a/patches/tf-a-v2.8/series b/patches/tf-a-v2.8/series
> >> deleted file mode 100644
> >> index 7a73fce4ff94..000000000000
> >> --- a/patches/tf-a-v2.8/series
> >> +++ /dev/null
> >> @@ -1,27 +0,0 @@
> >> -# umpf-base: v2.8
> >> -# umpf-name: 2.8/customers/pengutronix/distrokit
> >> -# umpf-version: 2.8/customers/pengutronix/distrokit/20240117-1
> >> -# umpf-topic: v2.8/topic/fix-build-warnings
> >> -# umpf-hashinfo: 4730b4b80206cf2fc27787f43cefd3169a6f8a2f
> >> -# umpf-topic-range:
> >> 9881bb93a3bc0a3ea37e9f093e09ab4b360a9e48..da1b5e74dc7c2b3e7a2d9a1adb7e23b
> >> ee
> >> ba079e3 -0001-build-makefile-add-helper-to-detect-linker-options.patch
> >> -0002-feat-build-add-support-for-new-binutils-versions.patch
> >> -# umpf-topic: v2.8/topic/imx8mq
> >> -# umpf-hashinfo: 651310b67fd269e8118285e9ed44e8ad6cc52941
> >> -# umpf-topic-range:
> >> da1b5e74dc7c2b3e7a2d9a1adb7e23beeba079e3..be7bcbebf5b22958e8b88564ca0865b
> >> 45
> >> 91263e7 -0101-feat-imx8mq-make-IMX_BOOT_UART_BASE-configurable-via.patch
> >> -0102-feat-imx8mq-remove-empty-bl31_plat_runtime_setup.patch
> >> -0103-feat-imx8mq-always-set-up-console.patch
> >> -0104-refactor-imx8mq-make-use-of-setup_page_tables.patch
> >> -0105-refactor-imx8mq-introduce-BL31_SIZE.patch
> >> -0106-feat-imx8mq-add-BL31-PIE-support.patch
> >> -0107-feat-imx8mq-add-support-for-gcc-12.x.patch
> >> -# umpf-topic: v2.8/topic/uart-runtime-detection
> >> -# umpf-hashinfo: b59093eaea88fddf1c893eb8f45a3eadf1f570cc
> >> -# umpf-topic-range:
> >> be7bcbebf5b22958e8b88564ca0865b4591263e7..015b0b19a839d0d4beb01babbe1af81
> >> 91
> >> 7fcfb57 -0201-feat-imx8m-detect-console-base-address-during-runtim.patch
> >> -0202-fix-imx8m-make-IMX_BOOT_UART_BASE-autodetection-opti.patch
> >> -# umpf-release: 2.8/customers/pengutronix/distrokit/20240117-1
> >> -# umpf-topic-range:
> >> 015b0b19a839d0d4beb01babbe1af81917fcfb57..070499680453a1c6a358828e4bd7cf6
> >> c9
> >> 629ef6b -0301-Release-2.8-customers-pengutronix-distrokit-20240117.patch
> >> -# umpf-end








^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [DistroKit] [PATCH 10/12] v7a: stm32mp: add TF-A recipe for STM32MP13
  2024-03-15 21:12 ` [DistroKit] [PATCH 10/12] v7a: stm32mp: add TF-A recipe " Ahmad Fatoum
@ 2024-04-26  8:03   ` Alexander Dahl
  0 siblings, 0 replies; 27+ messages in thread
From: Alexander Dahl @ 2024-04-26  8:03 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

Hello Ahmad,

sorry to hook in here again, but a clean DistroKit build fails on
`ptxdist get tf-a-stm32mp13` which is essentially the same problem as
already fixed with 3e11c53d98c0 ("tf-a: Change download URL") for the
generic tf-a package … see below.

Am Fri, Mar 15, 2024 at 10:12:38PM +0100 schrieb Ahmad Fatoum:
> We have two ways of doing multi-image builds with TF-A:
> 
>   - STM32MP15-specific: Multiple device trees can be supplied and TF-A
>     is built once and linked with each DT in turn. This was contributed
>     to TF-A for DistroKit purposes, but ST broke the compatibility for
>     STM32MP13, which requires to be built separately.
> 
>   - PTXdist-specific: The PTXdist rule can built multiple platforms in
>     different build directories. This requires however that the options
>     used are the same, except for platform. We unfortunately need to
>     change the option between our two TF-A build though.
> 
> Therefore, let's duplicate the upstream TF-A rule for the STM32MP13 and
> configure it for use with OP-TEE.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-v7a/platformconfig           |   1 +
>  .../platform-v7a/platforms/tf-a-stm32mp13.in  |  12 ++
>  .../platform-v7a/rules/tf-a-stm32mp13.make    | 110 ++++++++++++++++++
>  3 files changed, 123 insertions(+)
>  create mode 100644 configs/platform-v7a/platforms/tf-a-stm32mp13.in
>  create mode 100644 configs/platform-v7a/rules/tf-a-stm32mp13.make
> 
> diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
> index c502a5e44b40..1ff25470bfd6 100644
> --- a/configs/platform-v7a/platformconfig
> +++ b/configs/platform-v7a/platformconfig
> @@ -203,6 +203,7 @@ PTXCONF_OPTEE=y
>  PTXCONF_OPTEE_PLATFORM="stm32mp1"
>  PTXCONF_OPTEE_PLATFORM_FLAVOUR="135F_DK"
>  PTXCONF_OPTEE_CFG="CFG_TEE_CORE_LOG_LEVEL=2 CFG_WITH_PAGER=n"
> +# PTXCONF_TF_A_STM32MP13 is not set
>  PTXCONF_TF_A=y
>  PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot"
>  PTXCONF_TF_A_VERSION="v2.10"
> diff --git a/configs/platform-v7a/platforms/tf-a-stm32mp13.in b/configs/platform-v7a/platforms/tf-a-stm32mp13.in
> new file mode 100644
> index 000000000000..0dd58041ec19
> --- /dev/null
> +++ b/configs/platform-v7a/platforms/tf-a-stm32mp13.in
> @@ -0,0 +1,12 @@
> +## SECTION=bootloader
> +
> +menuconfig TF_A_STM32MP13
> +	select BOOTLOADER
> +	select HOST_DTC
> +	prompt "ARM Trusted Firmware-A for STM32MP13 with OP-TEE"
> +	depends on ARCH_ARM
> +	bool
> +	help
> +	  ARM Trusted Firmware-A for STM32MP13 series SoCs with OP-TEE enabled.
> +	  Currently, these can't be built in the same build as the
> +	  STM32MP15 with SP_min.
> diff --git a/configs/platform-v7a/rules/tf-a-stm32mp13.make b/configs/platform-v7a/rules/tf-a-stm32mp13.make
> new file mode 100644
> index 000000000000..36feb25e6e76
> --- /dev/null
> +++ b/configs/platform-v7a/rules/tf-a-stm32mp13.make
> @@ -0,0 +1,110 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2018 by Rouven Czerwinski <r.czerwinski@pengutronix.de>
> +#               2019 by Ahmad Fatoum <a.fatoum@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_TF_A_STM32MP13) += tf-a-stm32mp13
> +
> +#
> +# Paths and names
> +#
> +TF_A_STM32MP13_VERSION	:= $(call ptx/config-version, PTXCONF_TF_A)
> +TF_A_STM32MP13_MD5	:= $(call ptx/config-md5, PTXCONF_TF_A)
> +TF_A_STM32MP13		:= tf-a-stm32mp13-$(TF_A_STM32MP13_VERSION)
> +TF_A_STM32MP13_SUFFIX	:= tar.gz
> +TF_A_STM32MP13_URL	:= https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/$(TF_A_STM32MP13_VERSION).$(TF_A_STM32MP13_SUFFIX)

This fails if someone deselects pkg 'tf-a' (after deselecting all
images depending on it).  TF_A_STM32MP13_VERSION and
TF_A_STM32MP13_MD5 won't get a valid value then.

I thought about setting TF_A_STM32MP13_URL to PTXCONF_TF_A_URL to fix
the URL problem, but that would have the same problem.

I see three possibilities:

1) hardcode everything in this duplicated package 'tf-a-stm32mp13'
2) create a dependency to the generic 'tf-a' package which might be
built without real reason then maybe
3) move that version, md5, and url stuff in some extra 'common'
package (would not make it possible to use the tf-a package from
ptxdist anymore?)

Greets
Alex

> +TF_A_STM32MP13_SOURCE	:= $(SRCDIR)/$(TF_A_STM32MP13).$(TF_A_STM32MP13_SUFFIX)
> +TF_A_STM32MP13_DIR	:= $(BUILDDIR)/$(TF_A_STM32MP13)
> +TF_A_STM32MP13_BUILDDIR	:= $(TF_A_STM32MP13_DIR)/build
> +TF_A_STM32MP13_BUILD_OOT	:= YES
> +TF_A_STM32MP13_LICENSE	:= BSD-3-Clause AND BSD-2-Clause \
> +		   AND (GPL-2.0-or-later OR BSD-2-Clause) \
> +		   AND (NCSA OR MIT) \
> +		   AND Zlib \
> +		   AND (GPL-2.0-or-later OR BSD-3-Clause)
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +TF_A_STM32MP13_PLATFORMS		:= stm32mp1
> +TF_A_STM32MP13_ARTIFACTS		:= tf-a-*.stm32 fdts/*-fw-config.dtb
> +
> +TF_A_STM32MP13_WRAPPER_BLACKLIST	:= \
> +	$(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST)
> +
> +TF_A_STM32MP13_PATH	:= PATH=$(CROSS_PATH)
> +TF_A_STM32MP13_MAKE_OPT	:= \
> +	-C $(TF_A_STM32MP13_DIR) \
> +	CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
> +	HOSTCC=$(HOSTCC) \
> +	ARCH=aarch32 \
> +	ARM_ARCH_MAJOR=7 \
> +	BUILD_STRING=$(TF_A_STM32MP13_VERSION) \
> +	DTB_FILE_NAME='stm32mp135f-dk.dtb' \
> +	STM32MP_EMMC=1 STM32MP_SDMMC=1 \
> +	STM32MP_RAW_NAND=1 STM32MP_SPI_NAND=1 STM32MP_SPI_NOR=1 \
> +	STM32MP_USB_PROGRAMMER=1 \
> +	AARCH32_SP=optee \
> +	all
> +
> +TF_A_STM32MP13_CONF_TOOL	:= NO
> +
> +# ----------------------------------------------------------------------------
> +# Compile
> +# ----------------------------------------------------------------------------
> +
> +TF_A_STM32MP13_MAKE_ENV	:= $(CROSS_ENV)
> +
> +$(STATEDIR)/tf-a-stm32mp13.compile:
> +	@$(call targetinfo)
> +
> +	@$(foreach plat, $(TF_A_STM32MP13_PLATFORMS), \
> +		$(call compile, TF_A_STM32MP13, \
> +		$(TF_A_STM32MP13_MAKE_OPT) PLAT=$(plat))$(ptx/nl))
> +
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +tf-a-stm32mp13/inst_plat = $(foreach artifact, \
> +	$(foreach pattern, $(TF_A_STM32MP13_ARTIFACTS), \
> +	$(wildcard $(TF_A_STM32MP13_BUILDDIR)/$(1)/$(if $(filter DEBUG=1,TF_A_STM32MP13_MAKE_OPT),debug,release)/$(pattern))), \
> +	install -v -D -m 644 $(artifact) \
> +		$(2)/$(1)-$(notdir $(artifact))$(ptx/nl))
> +
> +tf-a-stm32mp13/inst_bins = $(foreach plat, $(TF_A_STM32MP13_PLATFORMS), $(call tf-a-stm32mp13/inst_plat,$(plat),$(1)))
> +
> +$(STATEDIR)/tf-a-stm32mp13.install:
> +	@$(call targetinfo)
> +	@$(call tf-a-stm32mp13/inst_bins,$(TF_A_STM32MP13_PKGDIR)/usr/lib/firmware)
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/tf-a-stm32mp13.targetinstall:
> +	@$(call targetinfo)
> +	@$(call tf-a-stm32mp13/inst_bins,$(IMAGEDIR))
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/tf-a-stm32mp13.clean:
> +	@$(call targetinfo)
> +	@rm -vf $(addprefix $(IMAGEDIR)/, $(notdir $(TF_A_STM32MP13_ARTIFACTS_SRC)))
> +	@$(call clean_pkg, TF_A_STM32MP13)
> +
> +# vim: syntax=make
> -- 
> 2.39.2
> 
> 



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2024-04-26  8:03 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support 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 ` [DistroKit] [PATCH 08/12] v7a: barebox: enable STM32MP135F-DK support Ahmad Fatoum
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox