ARM: stm32: Fix SYSRAM size on STM32MP13xx
authorMarek Vasut <marek.vasut@mailbox.org>
Mon, 12 May 2025 16:44:04 +0000 (18:44 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 11 Jun 2025 07:42:55 +0000 (09:42 +0200)
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.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/cpu/armv7/Kconfig
arch/arm/mach-stm32mp/include/mach/stm32.h

index 4eb34b7..ab86d64 100644 (file)
@@ -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
index a9ac49b..47b459b 100644 (file)
@@ -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