[PATCH v3 0/9] NVMEM: Introduce write protection support

Oleksij Rempel o.rempel at pengutronix.de
Wed Jun 11 23:58:03 PDT 2025


This series adds a generic protect op to NVMEM core, enabling
standardized write protection. This makes NVMEM behave more like other
flash interfaces (e.g., CFI block protection), which helps with common
tooling.

Oleksij Rempel (9):
  nvmem: Add 'protect' operation to core framework
  nvmem: rmem: add write and protect support
  commands: nvmem: Add support for creating dynamic rmem devices
  regmap: Add reg_seal operation for hardware protection
  nvmem: regmap: Implement protect operation using regmap_seal
  nvmem: bsec: Implement NVMEM protect via regmap_seal for OTP locking
  nvmem: rmem: ensure unique device name per instance
  fs: Report errors for out-of-bounds protect operations
  test: Add pytest suite for NVMEM framework

 commands/nvmem.c               |  121 +++-
 drivers/base/regmap/internal.h |    2 +
 drivers/base/regmap/regmap.c   |   30 +
 drivers/nvmem/bsec.c           |   27 +
 drivers/nvmem/core.c           |   32 +
 drivers/nvmem/partition.c      |    7 +
 drivers/nvmem/regmap.c         |   65 ++
 drivers/nvmem/rmem.c           |   87 ++-
 fs/fs.c                        |    6 +-
 include/driver.h               |    3 +
 include/linux/nvmem-provider.h |    2 +
 include/linux/regmap.h         |   33 ++
 include/mach/stm32mp/bsec.h    |    1 +
 test/py/test_nvmem.py          | 1012 ++++++++++++++++++++++++++++++++
 14 files changed, 1418 insertions(+), 10 deletions(-)
 create mode 100644 test/py/test_nvmem.py

--
2.39.5




More information about the barebox mailing list