Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/2] nvmem: airoha: Add support for SMC eFUSE
@ 2025-11-07 16:13 Christian Marangi
  2025-11-07 16:13 ` [PATCH v2 1/2] dt-bindings: nvmem: airoha: add SMC eFuses schema Christian Marangi
  2025-11-07 16:13 ` [PATCH v2 2/2] nvmem: airoha: Add support for SMC eFUSE Christian Marangi
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Marangi @ 2025-11-07 16:13 UTC (permalink / raw)
  To: Srinivas Kandagatla, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Christian Marangi, devicetree, linux-kernel

Add simple driver to read eFUSES with SMC commands for
Airoha AN7581.

Changes v2:
- Add review tag from Rob
- Rebase on top of linux-next

Christian Marangi (2):
  dt-bindings: nvmem: airoha: add SMC eFuses schema
  nvmem: airoha: Add support for SMC eFUSE

 .../bindings/nvmem/airoha,smc-efuses.yaml     |  65 ++++++++++
 drivers/nvmem/Kconfig                         |  13 ++
 drivers/nvmem/Makefile                        |   2 +
 drivers/nvmem/airoha-smc-efuses.c             | 118 ++++++++++++++++++
 4 files changed, 198 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/airoha,smc-efuses.yaml
 create mode 100644 drivers/nvmem/airoha-smc-efuses.c

-- 
2.51.0


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH v2 1/2] dt-bindings: nvmem: airoha: add SMC eFuses schema
@ 2025-07-21 18:46 Christian Marangi
  2025-07-21 20:18 ` Rob Herring (Arm)
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Marangi @ 2025-07-21 18:46 UTC (permalink / raw)
  To: Srinivas Kandagatla, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Christian Marangi, devicetree, linux-kernel

Add Airoha SMC eFuses schema to document new Airoha SoC AN7581/AN7583
way of accessing the 2 eFuse bank via the SMC command.

Each eFuse bank expose 64 eFuse cells of 32 bit used to give information
on HW Revision, PHY Calibration,  Device Model, Private Key and
all kind of other info specific to the SoC or the running system.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
Changes v2:
- Drop redundant description for reg
- Improve example node name

 .../bindings/nvmem/airoha,smc-efuses.yaml     | 65 +++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/airoha,smc-efuses.yaml

diff --git a/Documentation/devicetree/bindings/nvmem/airoha,smc-efuses.yaml b/Documentation/devicetree/bindings/nvmem/airoha,smc-efuses.yaml
new file mode 100644
index 000000000000..e21ce07c4f41
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/airoha,smc-efuses.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/airoha,smc-efuses.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Airoha SMC eFuses
+
+description: |
+  Airoha new SoC (AN7581/AN7583) expose banks of eFuse accessible
+  via specific SMC commands.
+
+  2 different bank of eFuse or 64 cells of 32 bit are exposed
+  read-only used to give information on HW Revision, PHY Calibration,
+  Device Model, Private Key...
+
+maintainers:
+  - Christian Marangi <ansuelsmth@gmail.com>
+
+properties:
+  compatible:
+    enum:
+      - airoha,an7581-efuses
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  '^efuse-bank@[0-1]$':
+    type: object
+
+    allOf:
+      - $ref: nvmem.yaml#
+
+    properties:
+      reg:
+        description: Identify the eFuse bank.
+        enum: [0, 1]
+
+    required:
+      - reg
+
+    unevaluatedProperties: false
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    efuse {
+        compatible = "airoha,an7581-efuses";
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        efuse-bank@0 {
+           reg = <0>;
+        };
+    };
+
+...
-- 
2.50.0


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

end of thread, other threads:[~2025-11-07 16:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07 16:13 [PATCH v2 0/2] nvmem: airoha: Add support for SMC eFUSE Christian Marangi
2025-11-07 16:13 ` [PATCH v2 1/2] dt-bindings: nvmem: airoha: add SMC eFuses schema Christian Marangi
2025-11-07 16:13 ` [PATCH v2 2/2] nvmem: airoha: Add support for SMC eFUSE Christian Marangi
  -- strict thread matches above, loose matches on Subject: below --
2025-07-21 18:46 [PATCH v2 1/2] dt-bindings: nvmem: airoha: add SMC eFuses schema Christian Marangi
2025-07-21 20:18 ` Rob Herring (Arm)

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