nvmem: stm32: add OP-TEE support for STM32MP13x
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Mon, 6 Feb 2023 13:43:51 +0000 (13:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 18:06:59 +0000 (19:06 +0100)
commit6a0bc3522e746025e2d9a63ab2cb5d7062c2d39c
treecab3e920621ff93e6a73501f9b35e1ea0a0c2b13
parent50014d659617dc58780a5d31ceb76c82779a9d8b
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>
drivers/nvmem/Kconfig
drivers/nvmem/Makefile
drivers/nvmem/stm32-bsec-optee-ta.c [new file with mode: 0644]
drivers/nvmem/stm32-bsec-optee-ta.h [new file with mode: 0644]
drivers/nvmem/stm32-romem.c