]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
stm32mp: bsec: add support of stm32mp25
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Mon, 15 Jan 2024 14:05:47 +0000 (15:05 +0100)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 19 Jan 2024 13:19:42 +0000 (14:19 +0100)
Add support of BSEC for STM32MP25x family to access OTP.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
arch/arm/mach-stm32mp/bsec.c
arch/arm/mach-stm32mp/include/mach/stm32.h

index 705c994d9307c740c689161410a9ae6b5ee66336..5b869017ec1abd5823e90d2dea4784ff1c125c8d 100644 (file)
@@ -784,9 +784,16 @@ static const struct stm32mp_bsec_drvdata stm32mp15_data = {
        .size = 96,
        .ta = false,
 };
+
+static const struct stm32mp_bsec_drvdata stm32mp25_data = {
+       .size = 368, /* 384 but no access to HWKEY and STM32PRVKEY */
+       .ta = true,
+};
+
 static const struct udevice_id stm32mp_bsec_ids[] = {
        { .compatible = "st,stm32mp13-bsec", .data = (ulong)&stm32mp13_data},
        { .compatible = "st,stm32mp15-bsec", .data = (ulong)&stm32mp15_data},
+       { .compatible = "st,stm32mp25-bsec", .data = (ulong)&stm32mp25_data},
        {}
 };
 
index 46d469881b32824f8e08350497e0a14d8f08e7a6..45c929aa605dc455bf9e99e894b2aa9330a26227 100644 (file)
@@ -197,7 +197,8 @@ enum forced_boot_mode {
 #ifdef CONFIG_STM32MP25X
 #define BSEC_OTP_SERIAL        5
 #define BSEC_OTP_RPN   9
-#define BSEC_OTP_PKG   246
+#define BSEC_OTP_PKG   122
+#define BSEC_OTP_MAC   247
 #endif
 
 #ifndef __ASSEMBLY__