nvmem: stm32: add OP-TEE support for STM32MP13x

For boot with OP-TEE on STM32MP13, the communication with the secure
world no more use STMicroelectronics SMC but communication with the
STM32MP BSEC TA, for data access (read/write) or lock operation:
- all the request are sent to OP-TEE trusted application,
- for upper OTP with ECC protection and with word programming only
  each OTP are permanently locked when programmed to avoid ECC error
  on the second write operation

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230206134356.839737-18-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Patrick Delaunay
2023-02-06 13:43:51 +00:00
committed by Greg Kroah-Hartman
parent 50014d6596
commit 6a0bc3522e
5 changed files with 441 additions and 3 deletions

View File

@@ -290,9 +290,20 @@ config NVMEM_SPRD_EFUSE
This driver can also be built as a module. If so, the module
will be called nvmem-sprd-efuse.
config NVMEM_STM32_BSEC_OPTEE_TA
bool "STM32MP BSEC OP-TEE TA support for nvmem-stm32-romem driver"
depends on OPTEE
help
Say y here to enable the accesses to STM32MP SoC OTPs by the OP-TEE
trusted application STM32MP BSEC.
This library is a used by stm32-romem driver or included in the module
called nvmem-stm32-romem.
config NVMEM_STM32_ROMEM
tristate "STMicroelectronics STM32 factory-programmed memory support"
depends on ARCH_STM32 || COMPILE_TEST
imply NVMEM_STM32_BSEC_OPTEE_TA
help
Say y here to enable read-only access for STMicroelectronics STM32
factory-programmed memory area.