[PATCH v4 01/11] dt-bindings: nvmem: imx-ocotp: Add support for secure-enclave

From
Frieder Schrempf <hidden>
Date
2026-07-27 13:01:45
Also in
imx, linux-arm-kernel, lkml
Reply to
Frieder Schrempf, 2026-07-27
From: Frieder Schrempf <redacted>

The driver currently uses the limited MMIO (FSB) interface to access the
OTPs. The intention is to support the firmware interface alongside the
MMIO interface so the driver can pick the interface that is available
(firmware might not be loaded) and fallback to MMIO.

Some SoCs like the i.MX9 family allow full access to the fuses only
through the secure enclave firmware API. Add a property to reference
the secure enclave node and let the driver use the API.

Reviewed-by: Krzysztof Kozlowski <redacted>
Signed-off-by: Frieder Schrempf <redacted>
---
 .../devicetree/bindings/nvmem/imx-ocotp.yaml       | 23 ++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
index a8076d0e2737..f154856bcdec 100644
--- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
+++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
@@ -17,10 +17,6 @@ description: |
   i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM, i.MX8MN i.MX8MP, i.MX93, i.MX94,
   and i.MX95.
 
-allOf:
-  - $ref: nvmem.yaml#
-  - $ref: nvmem-deprecated-cells.yaml#
-
 properties:
   compatible:
     oneOf:
@@ -56,12 +52,31 @@ properties:
   clocks:
     maxItems: 1
 
+  secure-enclave:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: A phandle to the secure enclave node for full access to
+                 the fuses through firmware API.
+
 required:
   - "#address-cells"
   - "#size-cells"
   - compatible
   - reg
 
+allOf:
+  - $ref: nvmem.yaml#
+  - $ref: nvmem-deprecated-cells.yaml#
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - fsl,imx93-ocotp
+    then:
+      properties:
+        secure-enclave: false
+
 unevaluatedProperties: false
 
 examples:
-- 
2.55.0
Thread (13 messages) 13 messages, 2 authors, last reply 2026-07-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help