Skip to contentSkip to conversation

ARM: stm32: Fix SYSRAM size on STM32MP13xx

PATCH In review Marek Vasut 2 participants 3 messages May 12, 2025 – Jun 9, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: stm32: Fix SYSRAM size on STM32MP13xx

The STM32MP13xx has only 128 kiB of SYSRAM starting at address 0x2ffe0000 . The STM32MP15xx has 256 kiB of SYSRAM starting at address 0x2ffc0000 . Make sure both SoCs configure ARMV7_SECURE_BASE correctly . Define the SYSRAM base in stm32.h to be consistent with the STM32MP15xx macro.

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Sughosh Ganu <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 arch/arm/cpu/armv7/Kconfig                 | 3 ++-
 arch/arm/mach-stm32mp/include/mach/stm32.h | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/cpu/armv7/Kconfig +2 -1
index 4eb34b7b449..ab86d642eee 100644
@@ -36,7 +36,8 @@ config ARMV7_SECURE_BASE
 	hex "Base address for secure mode memory"
 	depends on HAS_ARMV7_SECURE_BASE
 	default 0xfff00000 if TEGRA124
-	default 0x2ffc0000 if ARCH_STM32MP
+	default 0x2ffe0000 if STM32MP13X
+	default 0x2ffc0000 if STM32MP15X
 	default 0x2f000000 if ARCH_MX7ULP
 	default 0x10010000 if ARCH_LS1021A
 	default 0x00900000 if ARCH_MX7
arch/arm/mach-stm32mp/include/mach/stm32.h +5 -0
index a9ac49bc5d2..47b459b75d1 100644
@@ -110,6 +110,11 @@ enum forced_boot_mode {
 #define STM32_SDMMC2_BASE		0x58007000
 #define STM32_SDMMC3_BASE		0x48004000
 
+#ifdef CONFIG_STM32MP13X
+#define STM32_SYSRAM_BASE		0x2FFE0000
+#define STM32_SYSRAM_SIZE		SZ_128K
+#endif
+
 #ifdef CONFIG_STM32MP15X
 #define STM32_SYSRAM_BASE		0x2FFC0000
 #define STM32_SYSRAM_SIZE		SZ_256K
Signature · 1 line
2.47.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 39 lines · Marek Vasut

The STM32MP13xx has only 128 kiB of SYSRAM starting at address 0x2ffe0000 . The STM32MP15xx has 256 kiB of SYSRAM starting at address 0x2ffc0000 . Make sure both SoCs configure ARMV7_SECURE_BASE correctly . Define the SYSRAM base in stm32.h to be consistent with the STM32MP15xx macro.

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Sughosh Ganu <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 arch/arm/cpu/armv7/Kconfig                 | 3 ++-
 arch/arm/mach-stm32mp/include/mach/stm32.h | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/cpu/armv7/Kconfig +2 -1
index 4eb34b7b449..ab86d642eee 100644
@@ -36,7 +36,8 @@ config ARMV7_SECURE_BASE
 	hex "Base address for secure mode memory"
 	depends on HAS_ARMV7_SECURE_BASE
 	default 0xfff00000 if TEGRA124
-	default 0x2ffc0000 if ARCH_STM32MP
+	default 0x2ffe0000 if STM32MP13X
+	default 0x2ffc0000 if STM32MP15X
 	default 0x2f000000 if ARCH_MX7ULP
 	default 0x10010000 if ARCH_LS1021A
 	default 0x00900000 if ARCH_MX7
arch/arm/mach-stm32mp/include/mach/stm32.h +0 -0
index a9ac49bc5d2..47b459b75d1 100644
@@ -110,6 +110,11 @@ enum forced_boot_mode {
 #define STM32_SDMMC2_BASE		0x58007000

arch/arm/mach-stm32mp/include/mach/stm32.h enum forced_boot_mode { · line 120

Quoted 10 lines
arch/arm/mach-stm32mp/include/mach/stm32.h +5 -0
 #define STM32_SDMMC3_BASE		0x48004000
 
+#ifdef CONFIG_STM32MP13X
+#define STM32_SYSRAM_BASE		0x2FFE0000
+#define STM32_SYSRAM_SIZE		SZ_128K
+#endif
+
 #ifdef CONFIG_STM32MP15X
 #define STM32_SYSRAM_BASE		0x2FFC0000
 #define STM32_SYSRAM_SIZE		SZ_256K

Thanks
Patrice

#2 lore raw
Quoted 55 lines · Patrice CHOTARD
Quoted 39 lines · Marek Vasut

The STM32MP13xx has only 128 kiB of SYSRAM starting at address 0x2ffe0000 . The STM32MP15xx has 256 kiB of SYSRAM starting at address 0x2ffc0000 . Make sure both SoCs configure ARMV7_SECURE_BASE correctly . Define the SYSRAM base in stm32.h to be consistent with the STM32MP15xx macro.

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Sughosh Ganu <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 arch/arm/cpu/armv7/Kconfig                 | 3 ++-
 arch/arm/mach-stm32mp/include/mach/stm32.h | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/cpu/armv7/Kconfig +2 -1
index 4eb34b7b449..ab86d642eee 100644
@@ -36,7 +36,8 @@ config ARMV7_SECURE_BASE
 	hex "Base address for secure mode memory"
 	depends on HAS_ARMV7_SECURE_BASE
 	default 0xfff00000 if TEGRA124
-	default 0x2ffc0000 if ARCH_STM32MP
+	default 0x2ffe0000 if STM32MP13X
+	default 0x2ffc0000 if STM32MP15X
 	default 0x2f000000 if ARCH_MX7ULP
 	default 0x10010000 if ARCH_LS1021A
 	default 0x00900000 if ARCH_MX7
arch/arm/mach-stm32mp/include/mach/stm32.h +0 -0
index a9ac49bc5d2..47b459b75d1 100644
@@ -110,6 +110,11 @@ enum forced_boot_mode {
 #define STM32_SDMMC2_BASE		0x58007000

arch/arm/mach-stm32mp/include/mach/stm32.h enum forced_boot_mode { · line 120

Quoted 10 lines
arch/arm/mach-stm32mp/include/mach/stm32.h +5 -0
 #define STM32_SDMMC3_BASE		0x48004000
 
+#ifdef CONFIG_STM32MP13X
+#define STM32_SYSRAM_BASE		0x2FFE0000
+#define STM32_SYSRAM_SIZE		SZ_128K
+#endif
+
 #ifdef CONFIG_STM32MP15X
 #define STM32_SYSRAM_BASE		0x2FFC0000
 #define STM32_SYSRAM_SIZE		SZ_256K
Quoted 2 lines

Thanks
Patrice

Applied to u-boot-stm32/next

Thanks
Patrice