Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/10] Support ELE API in i.MX OCOTP NVMEM driver
@ 2026-07-13 14:53 Frieder Schrempf
  2026-07-13 14:53 ` [PATCH v2 01/10] dt-bindings: nvmem: imx-ocotp: Add support for secure-enclave Frieder Schrempf
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Frieder Schrempf @ 2026-07-13 14:53 UTC (permalink / raw)
  To: Srinivas Kandagatla, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Shawn Guo, Pankaj Gupta, Peng Fan (OSS)
  Cc: devicetree, imx, linux-arm-kernel, linux-kernel, Frieder Schrempf

The imx-ocotp-ele.c driver currently uses the limited FSB (fuseblock)
to access the fuse registers. In order to gain full read/write access
to all fuses, we need to use the Edgelock Secure Enclave firmware.

This patchset does:

* Add bindings to reference ELE device in OCOTP driver (patch 1)
* Export ELE API functions (patch 3)
* Let the OCOTP driver use the ELE API (patch 7)
* Extend the devicetree of the Kontron boards for using the ELE API (patch 10)

The rest of the patches contain cleanups that were implemented along
the way.

This was tested using the 'crucible' tool and by directly reading from
the nvmem device on i.MX93.

This still lacks support for the i.MX94 and i.MX95 as I don't have the
hardware for testing on these platforms. As the documentations is
incomplete it is hard to get the keepout table right without testing
on the actual hardware. If someone else can provide the data and
testing, I can add it in a future version. If not this can be done
later.

---
Changes in v2:
- Adjust bindings to allow secure-enclave only for i.MX93 and improve commit message (suggested by Krzysztof)
- Export generic ELE API functions to be used by drivers (suggested by Frank and Peng)
- Move the fuse read/write functions to the NVMEM driver (suggested by Frank and Peng)
- Add patch to use __free(kfree) in imx_ocotp_reg_read() to fix memory leak (reported by Sashiko)
- Use device link to prevent SE device from being unbound while referenced (reported by Sashiko)
- Link to v1: https://patch.msgid.link/20260616-upstreaming-next-20260609-imx-ocotp-ele-v1-0-cb7f3698c3e6@kontron.de

To: Srinivas Kandagatla <srini@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Frank Li <Frank.Li@nxp.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
To: Pengutronix Kernel Team <kernel@pengutronix.de>
To: Fabio Estevam <festevam@gmail.com>
To: Shawn Guo <shawnguo@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org

---
Frieder Schrempf (10):
      dt-bindings: nvmem: imx-ocotp: Add support for secure-enclave
      firmware: imx: ele: Fix indentation in ele_base_msg.h
      firmware: imx: ele: Export API functions
      nvmem: imx-ocotp-ele: Add keepout table for i.MX93
      nvmem: imx-ocotp-ele: Remove device-specific reg_read()
      nvmem: imx-ocotp-ele: Use __free(kfree) in imx_ocotp_reg_read()
      nvmem: imx-ocotp-ele: Support the ELE API
      nvmem: imx-ocotp-ele: Remove the FUSE_ELE type
      nvmem: imx-ocotp-ele: Rename FSB access map
      arm64: dts: imx93-kontron: Enable ELE firmware driver

 .../devicetree/bindings/nvmem/imx-ocotp.yaml       |  10 +
 .../boot/dts/freescale/imx93-kontron-osm-s.dtsi    |  26 +++
 drivers/firmware/imx/ele_base_msg.c                |  47 ++--
 drivers/firmware/imx/ele_base_msg.h                |  16 +-
 drivers/firmware/imx/ele_common.c                  |  35 ++-
 drivers/firmware/imx/ele_common.h                  |  15 --
 drivers/firmware/imx/se_ctrl.h                     |  14 +-
 drivers/nvmem/imx-ocotp-ele.c                      | 244 ++++++++++++++++++---
 include/linux/firmware/imx/se_api.h                |  78 +++++++
 9 files changed, 392 insertions(+), 93 deletions(-)
---
base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c
change-id: 20260616-upstreaming-next-20260609-imx-ocotp-ele-a512ddf96b03

Best regards,
--  
Frieder Schrempf <frieder.schrempf@kontron.de>



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-07-14 12:37 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-13 14:53 [PATCH v2 00/10] Support ELE API in i.MX OCOTP NVMEM driver Frieder Schrempf
2026-07-13 14:53 ` [PATCH v2 01/10] dt-bindings: nvmem: imx-ocotp: Add support for secure-enclave Frieder Schrempf
2026-07-14  8:00   ` Frieder Schrempf
2026-07-13 14:53 ` [PATCH v2 02/10] firmware: imx: ele: Fix indentation in ele_base_msg.h Frieder Schrempf
2026-07-13 14:53 ` [PATCH v2 03/10] firmware: imx: ele: Export API functions Frieder Schrempf
2026-07-13 14:53 ` [PATCH v2 04/10] nvmem: imx-ocotp-ele: Add keepout table for i.MX93 Frieder Schrempf
2026-07-13 14:53 ` [PATCH v2 05/10] nvmem: imx-ocotp-ele: Remove device-specific reg_read() Frieder Schrempf
2026-07-13 14:53 ` [PATCH v2 06/10] nvmem: imx-ocotp-ele: Use __free(kfree) in imx_ocotp_reg_read() Frieder Schrempf
2026-07-13 14:53 ` [PATCH v2 07/10] nvmem: imx-ocotp-ele: Support the ELE API Frieder Schrempf
2026-07-13 14:53 ` [PATCH v2 08/10] nvmem: imx-ocotp-ele: Remove the FUSE_ELE type Frieder Schrempf
2026-07-13 14:53 ` [PATCH v2 09/10] nvmem: imx-ocotp-ele: Rename FSB access map Frieder Schrempf
2026-07-13 14:53 ` [PATCH v2 10/10] arm64: dts: imx93-kontron: Enable ELE firmware driver Frieder Schrempf
2026-07-14  6:59   ` Francesco Dolcini
2026-07-14  8:09     ` Frieder Schrempf
2026-07-14  8:32       ` Francesco Dolcini
2026-07-14  8:43         ` Frieder Schrempf
2026-07-14  9:33           ` Francesco Dolcini
2026-07-14 12:06             ` Alexander Stein
2026-07-14 12:33               ` Francesco Dolcini
2026-07-14 12:37                 ` Alexander Stein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox