arm: stm32mp: adapt the command stm32key for STM32MP13x
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Thu, 15 Sep 2022 16:11:41 +0000 (18:11 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 23 Sep 2022 12:28:25 +0000 (14:28 +0200)
commite83cef87a847d10aa2c46308bd8ac870bf56deee
treed9fe73d5c273a6cb66bde03b69b2f048cb34791b
parentfd1f4c9abd8eba06c5ad1169a03bd28b4c2e54a7
arm: stm32mp: adapt the command stm32key for STM32MP13x

Change the mask of OTP0 used to close the device on STM32MP
- STM32MP15x: bit 6 of OPT0
- STM32MP13x: 0b111111 = 0x3F for OTP_SECURED closed device

And support the 2 keys for STM32MP13x
- PKHTH : Hash of the 8 ECC Public Keys Hashes Table
          (ECDSA is the authentication algorithm)
- EDMK : Encryption/Decryption Master Key

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