summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-01-19 11:59:28 -0500
committerTom Rini <trini@konsulko.com>2024-01-19 11:59:28 -0500
commit83a8424722f364955f8e28ae164fbfc598b2e5f8 (patch)
tree4927ace4d988aa2212886bc148a0fab38299a7be /arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
parentf4d54865061495bdb483f9ddc81183d1940f596c (diff)
parent8a4d098bb0859b3a26c9e1100ed08d7bd1f8ed30 (diff)
Merge tag 'u-boot-stm32-20240119' of https://source.denx.de/u-boot/custodians/u-boot-stm
Add CMDLINE dependecy for CMD_STM32KEY STM32MP1: --------- Set stdio to serial on DH STM32MP15xx DHSOM Fix reset for usart1 in scmi configuration STM32MP2: --------- Add BSEC and OTP support for STM32MP25 Fix CONFIG_STM32MP25X flag usage
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h')
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
index ae4bd8842f5..bf184c8a884 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
@@ -23,12 +23,20 @@
#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
-#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 {