On 2/24/26 14:30, Patrick DELAUNAY wrote:
> Hi,
>
> one error for CPU_STM32MP215Fxx value....
>
> On 2/3/26 17:49, Patrice Chotard wrote:
>> STM32MP21 application processors (STM32 MPUs) based on a single
>> Arm Cortex®-A35 core running up to 1.5 GHz and Cortex®-M33 core
>> running at 300 MHz.
>>
>> It is pin-compatible with the STM32MP2 series in the VFBGA361
>> 10×10 mm package: the STM32MP21 uses a subset of the STM32MP23
>> pinout, which itself is a subset of the STM32MP25.
>>
>> More details available here :
>> https://www.st.com/en/microcontrollers-microprocessors/stm32mp2-series.html
>>
>> Signed-off-by: Patrice Chotard <[email protected]>
>> ---
>> arch/arm/mach-stm32mp/Kconfig | 27 ++++
>> arch/arm/mach-stm32mp/Kconfig.21x | 37 +++++
>> arch/arm/mach-stm32mp/Makefile | 3 +-
>> arch/arm/mach-stm32mp/include/mach/stm32.h | 12 +-
>> arch/arm/mach-stm32mp/include/mach/sys_proto.h | 22 +++
>> arch/arm/mach-stm32mp/stm32mp2/Makefile | 1 +
>> arch/arm/mach-stm32mp/stm32mp2/arm64-mmu.c | 2 +
>> arch/arm/mach-stm32mp/stm32mp2/cpu.c | 2 +
>> arch/arm/mach-stm32mp/stm32mp2/rifsc.c | 1 +
>> arch/arm/mach-stm32mp/stm32mp2/stm32mp21x.c | 192
>> +++++++++++++++++++++++++
>> board/st/common/Kconfig | 2 +-
>> board/st/stm32mp2/Kconfig | 14 ++
>> configs/stm32mp21_defconfig | 78 ++++++++++
>> include/configs/stm32mp21_common.h | 126 ++++++++++++++++
>> include/configs/stm32mp21_st_common.h | 51 +++++++
>> 15 files changed, 564 insertions(+), 6 deletions(-)
>>
>
> ....
>
>
>> diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h
>> b/arch/arm/mach-stm32mp/include/mach/stm32.h
>> index 90f06a052d3..7f349f3b68d 100644
>> --- a/arch/arm/mach-stm32mp/include/mach/stm32.h
>> +++ b/arch/arm/mach-stm32mp/include/mach/stm32.h
>> @@ -165,16 +165,20 @@ enum forced_boot_mode {
>> #endif /* __ASSEMBLY__ */
>> #endif /* CONFIG_STM32MP15X || CONFIG_STM32MP13X */
>> -#if defined(CONFIG_STM32MP23X) || defined(CONFIG_STM32MP25X)
>> +#if defined(CONFIG_STM32MP21X) || defined(CONFIG_STM32MP23X) ||
>> defined(CONFIG_STM32MP25X)
>> #define STM32_USART2_BASE 0x400E0000
>> #define STM32_USART3_BASE 0x400F0000
>> #define STM32_UART4_BASE 0x40100000
>> #define STM32_UART5_BASE 0x40110000
>> #define STM32_USART6_BASE 0x40220000
>> +#ifdef CONFIG_STM32MP25X
>> #define STM32_UART9_BASE 0x402C0000
>> +#endif
>> #define STM32_USART1_BASE 0x40330000
>> #define STM32_UART7_BASE 0x40370000
>> +#ifdef CONFIG_STM32MP25X
>> #define STM32_UART8_BASE 0x40380000
>> +#endif
>> #define STM32_RCC_BASE 0x44200000
>> #define STM32_TAMP_BASE 0x46010000
>> #define STM32_SDMMC1_BASE 0x48220000
>> @@ -194,7 +198,7 @@ enum forced_boot_mode {
>> #define TAMP_FWU_BOOT_IDX_MASK GENMASK(3, 0)
>> #define TAMP_FWU_BOOT_IDX_OFFSET 0
>> -#endif /* defined(CONFIG_STM32MP23X) || defined(CONFIG_STM32MP25X) */
>> +#endif /* defined(CONFIG_STM32MP21X) || defined(CONFIG_STM32MP23X) ||
>> defined(CONFIG_STM32MP25X) */
>> /* offset used for BSEC driver: misc_read and misc_write */
>> #define STM32_BSEC_SHADOW_OFFSET 0x0
>> @@ -218,14 +222,14 @@ enum forced_boot_mode {
>> #define BSEC_OTP_MAC 57
>> #define BSEC_OTP_BOARD 60
>> #endif
>> -#if defined(CONFIG_STM32MP23X) || defined(CONFIG_STM32MP25X)
>> +#if defined(CONFIG_STM32MP21X) || defined(CONFIG_STM32MP23X) ||
>> defined(CONFIG_STM32MP25X)
>> #define BSEC_OTP_SERIAL 5
>> #define BSEC_OTP_RPN 9
>> #define BSEC_OTP_REVID 102
>> #define BSEC_OTP_PKG 122
>> #define BSEC_OTP_BOARD 246
>> #define BSEC_OTP_MAC 247
>> -#endif /* defined(CONFIG_STM32MP23X) || defined(CONFIG_STM32MP25X) */
>> +#endif /* defined(CONFIG_STM32MP21X) || defined(CONFIG_STM32MP23X) ||
>> defined(CONFIG_STM32MP25X) */
>> #ifndef __ASSEMBLY__
>> #include <asm/types.h>
>> diff --git a/arch/arm/mach-stm32mp/include/mach/sys_proto.h
>> b/arch/arm/mach-stm32mp/include/mach/sys_proto.h
>> index 2a4837184fc..47a6db79bca 100644
>> --- a/arch/arm/mach-stm32mp/include/mach/sys_proto.h
>> +++ b/arch/arm/mach-stm32mp/include/mach/sys_proto.h
>> @@ -30,6 +30,20 @@
>> #define CPU_STM32MP131Fxx 0x05010EC8
>> #define CPU_STM32MP131Dxx 0x05010EC9
>> +/* ID for STM32MP21x = Device Part Number (RPN) (bit31:0) */
>> +#define CPU_STM32MP211Axx 0x40073E7D
>> +#define CPU_STM32MP211Cxx 0x0007307D
>> +#define CPU_STM32MP211Dxx 0xC0073E7D
>> +#define CPU_STM32MP211Fxx 0x8007307D
>> +#define CPU_STM32MP213Axx 0x40073E1D
>> +#define CPU_STM32MP213Cxx 0x0007301D
>> +#define CPU_STM32MP213Dxx 0xC0073E1D
>> +#define CPU_STM32MP213Fxx 0x8007301D
>> +#define CPU_STM32MP215Axx 0x40033E0D
>> +#define CPU_STM32MP215Cxx 0x0003300D
>> +#define CPU_STM32MP215Dxx 0xC0033E0D
>> +#define CPU_STM32MP215Fxx 0x80
>
>
> Strange value this part number, I assume:
>
> #define CPU_STM32MP215Fxx 0x8003300D
Yes, i will fix it with the correct value when merging
Thanks
>
>
>> +CPU_STM32MP215Fxx
>>
>> /* ID for STM32MP23x = Device Part Number (RPN) (bit31:0) */
>> #define CPU_STM32MP235Cxx 0x00082182
>> #define CPU_STM32MP233Cxx 0x000B318E
>> @@ -67,6 +81,7 @@ u32 get_cpu_type(void);
>> #define CPU_DEV_STM32MP15 0x500
>> #define CPU_DEV_STM32MP13 0x501
>> +#define CPU_DEV_STM32MP21 0x503
>> #define CPU_DEV_STM32MP23 0x505
>> #define CPU_DEV_STM32MP25 0x505
>> @@ -102,6 +117,13 @@ u32 get_cpu_package(void);
>> #define STM32MP15_PKG_AD_TFBGA257 1
>> #define STM32MP15_PKG_UNKNOWN 0
>> +/* package used for STM32MP21x */
>> +#define STM32MP21_PKG_CUSTOM 0
>> +#define STM32MP21_PKG_AL_VFBGA361 1
>> +#define STM32MP21_PKG_AN_VFBGA273 3
>> +#define STM32MP21_PKG_AO_VFBGA225 4
>> +#define STM32MP21_PKG_AM_TFBGA289 5
>> +
>> /* package used for STM32MP23x */
>> #define STM32MP23_PKG_CUSTOM 0
>> #define STM32MP23_PKG_AL_VFBGA361 1
>
>
> with the proposal for the define CPU_STM32MP215Fxx
>
>
> Reviewed-by: Patrick Delaunay <[email protected]>
>
> Thanks
> Patrick
>
>