]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
stm32mp: stm32prog: add support of stm32mp25
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Mon, 15 Jan 2024 14:05:52 +0000 (15:05 +0100)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 19 Jan 2024 13:38:12 +0000 (14:38 +0100)
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>
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h

index ae4bd8842f53cd85015321661f8955ac7bbfe4e1..eda98eb61d76af77f62dd0f7e7d87097e8c976ed 100644 (file)
 #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 {