aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2024-01-15 15:05:52 +0100
committerPatrice Chotard <patrice.chotard@foss.st.com>2024-01-19 14:38:12 +0100
commit4d58bb32d1062ee953cf390d679f17224456766d (patch)
treeaa870102e9deba2d8c26324d0c7436c2d9b240d9
parent8eb535e3b0e029cefa629efc72557000c5270a0d (diff)
downloadu-boot-4d58bb32d1062ee953cf390d679f17224456766d.zip
u-boot-4d58bb32d1062ee953cf390d679f17224456766d.tar.gz
u-boot-4d58bb32d1062ee953cf390d679f17224456766d.tar.bz2
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 <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
index ae4bd88..eda98eb 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 {