u-boot/arch/arm/mach-stm32mp
Patrick Delaunay 7ae22d7278 arm: stm32mp: bsec: add permanent lock support in bsec driver
Add BSEC lock access (read / write) at 0xC0000000 offset of misc driver.
The write access only available for Trusted boot mode, based on new
SMC STM32_SMC_WRLOCK_OTP.

With the fuse command, the permanent lock status is accessed with
0x10000000 offset (0xC0000000 - 0x8000000 for OTP sense/program
divided by u32 size), for example:

Read lock status of fuse 57 (0x39)

  STM32MP> fuse sense 0 0x10000039 1

  Sensing bank 0:

  Word 0x10000039: 00000000

Set permanent lock of fuse 57 (0x39)

  STM32MP> fuse prog 0 0x10000039 1

  Sensing bank 0:

  Word 0x10000039: 00000000

WARNING: the OTP lock is updated only after reboot

WARING: Programming lock or fuses is an irreversible operation!
        This may brick your system.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
2020-03-24 14:05:35 +01:00
..
include/mach arm: stm32mp: bsec: add permanent lock support in bsec driver 2020-03-24 14:05:35 +01:00
bsec.c arm: stm32mp: bsec: add permanent lock support in bsec driver 2020-03-24 14:05:35 +01:00
cmd_stm32key.c stm32mp1: key: add stm32key command 2019-07-12 11:18:53 +02:00
config.mk stm32mp1: add trusted boot with TF-A 2019-04-12 16:09:13 +02:00
cpu.c arm: stm32mp: bsec: add permanent lock support in bsec driver 2020-03-24 14:05:35 +01:00
dram_init.c SPDX: Convert all of our multiple license tags to Linux Kernel style 2018-05-07 10:24:31 -04:00
fdt.c stm32mp1: update device tree with ETZPC status 2019-07-12 11:18:53 +02:00
Kconfig ARM: dts: stm32: Add DH Electronics DHCOM SoM and PDK2 board 2020-02-12 19:48:39 +01:00
Makefile stm32mp1: Makefile cleanup 2019-08-27 11:19:23 +02:00
psci.c psci: Fix warnings when compiling with W=1 2019-07-24 14:15:38 -04:00
pwr_regulator.c stm32mp1: pwr: use the last binding for pwr 2020-02-13 17:26:22 +01:00
spl.c common: Move hang() to the same header as panic() 2020-01-17 17:53:40 -05:00
syscon.c stm32mp1: pwr: use the last binding for pwr 2020-02-13 17:26:22 +01:00