From 4d58bb32d1062ee953cf390d679f17224456766d Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 15 Jan 2024 15:05:52 +0100 Subject: stm32mp: stm32prog: add support of stm32mp25 Change OTP number to 364 for STM32MP25 as it is done in bsec driver. Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h') diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h index ae4bd8842f5..eda98eb61d7 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h @@ -28,7 +28,15 @@ #else #define OTP_SIZE_SMC 0 #endif -#define OTP_SIZE_TA 776 +/* size of the OTP struct in NVMEM PTA */ +#define _OTP_SIZE_TA(otp) (((otp) * 2 + 2) * 4) +#if defined(CONFIG_STM32MP13x) || defined(CONFIG_STM32MP15x) +/* STM32MP1 with BSEC2 */ +#define OTP_SIZE_TA _OTP_SIZE_TA(96) +#else +/* STM32MP2 with BSEC3 */ +#define OTP_SIZE_TA _OTP_SIZE_TA(368) +#endif #define PMIC_SIZE 8 enum stm32prog_target { -- cgit v1.2.3 From 49de864a2514bb6c9a7df253bf78b711699f07f3 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 15 Jan 2024 15:05:56 +0100 Subject: arm: Rename STM32MP13x CONFIG options must not use lower-case letter. Convert this and related ones to upper case. Signed-off-by: Simon Glass Signed-off-by: Patrick Delaunay Reviewed-by: Igor Opaniuk --- arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h') diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h index eda98eb61d7..934ffb1105a 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h @@ -30,7 +30,7 @@ #endif /* size of the OTP struct in NVMEM PTA */ #define _OTP_SIZE_TA(otp) (((otp) * 2 + 2) * 4) -#if defined(CONFIG_STM32MP13x) || defined(CONFIG_STM32MP15x) +#if defined(CONFIG_STM32MP13X) || defined(CONFIG_STM32MP15x) /* STM32MP1 with BSEC2 */ #define OTP_SIZE_TA _OTP_SIZE_TA(96) #else -- cgit v1.2.3 From 9f1dc110cccaf635e6b637b246e20a2a95acde8d Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 15 Jan 2024 15:05:57 +0100 Subject: arm: Rename STM32MP15x CONFIG options must not use lower-case letter. Convert this and related ones to upper case. Signed-off-by: Simon Glass Reviewed-by: Patrice Chotard --- arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h') diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h index 934ffb1105a..bf184c8a884 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h @@ -23,14 +23,14 @@ #define CMD_SIZE 512 /* SMC is only supported in SPMIN for STM32MP15x */ -#ifdef CONFIG_STM32MP15x +#ifdef CONFIG_STM32MP15X #define OTP_SIZE_SMC 1024 #else #define OTP_SIZE_SMC 0 #endif /* size of the OTP struct in NVMEM PTA */ #define _OTP_SIZE_TA(otp) (((otp) * 2 + 2) * 4) -#if defined(CONFIG_STM32MP13X) || defined(CONFIG_STM32MP15x) +#if defined(CONFIG_STM32MP13X) || defined(CONFIG_STM32MP15X) /* STM32MP1 with BSEC2 */ #define OTP_SIZE_TA _OTP_SIZE_TA(96) #else -- cgit v1.2.3