[PATCH 04/12] stm32mp: bsec: add support of stm32mp25

Igor Opaniuk igor.opaniuk at foundries.io
Mon Jan 15 17:28:08 CET 2024


On Mon, Jan 15, 2024 at 1:47 PM Patrick Delaunay
<patrick.delaunay at foss.st.com> wrote:
>
> Add support of BSEC for STM32MP25x family to access OTP.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
> ---
>
>  arch/arm/mach-stm32mp/bsec.c               | 7 +++++++
>  arch/arm/mach-stm32mp/include/mach/stm32.h | 3 ++-
>  2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c
> index 705c994d9307..5b869017ec1a 100644
> --- a/arch/arm/mach-stm32mp/bsec.c
> +++ b/arch/arm/mach-stm32mp/bsec.c
> @@ -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},
>         {}
>  };
>
> diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h b/arch/arm/mach-stm32mp/include/mach/stm32.h
> index 46d469881b32..45c929aa605d 100644
> --- a/arch/arm/mach-stm32mp/include/mach/stm32.h
> +++ b/arch/arm/mach-stm32mp/include/mach/stm32.h
> @@ -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__
> --
> 2.25.1
>

Reviewed-by: Igor Opaniuk <igor.opaniuk at foundries.io>

-- 
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk
Embedded Software Engineer
T:  +380 938364067
E: igor.opaniuk at foundries.io
W: www.foundries.io


More information about the U-Boot mailing list