[RFC PATCH v2] dt-bindings: nvmem: Introduce nvmem efuse binding for TI K3 SoCs

Judith Mendez posted 1 patch 1 week, 2 days ago
.../devicetree/bindings/nvmem/ti,efuses.yaml  | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100644 Documentation/devicetree/bindings/nvmem/ti,efuses.yaml
[RFC PATCH v2] dt-bindings: nvmem: Introduce nvmem efuse binding for TI K3 SoCs
Posted by Judith Mendez 1 week, 2 days ago
On K3 SoCs there are efuse registers scattered across the memory
map. In order to reference these efuse registers like gp-sw which
may store SW REV information or other general purpose information
for drivers to consume, treat them appropriately as efuse devices
with nvmem framework.

Signed-off-by: Judith Mendez <jm@ti.com>
---
This patch is not complete and is sent as an RFC to get some initial
thoughts on this implementation to solve [0].

[0] https://lore.kernel.org/linux-mmc/736f09e0-075a-48e0-9b32-6b8805a7ee2a@kernel.org

Changes since v1 RFC:
- Drop depreciated nvmem-deprecated-cells.yaml since nvmem.yaml
  already includes nvmem-layout.yaml.
- gp-sw efused-backed reg is 128 bits, so update size of example
  to 0x10.

Link to RFC v1:
https://lore.kernel.org/linux-devicetree/20250916154809.545283-1-jm@ti.com/
---
 .../devicetree/bindings/nvmem/ti,efuses.yaml  | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/ti,efuses.yaml

diff --git a/Documentation/devicetree/bindings/nvmem/ti,efuses.yaml b/Documentation/devicetree/bindings/nvmem/ti,efuses.yaml
new file mode 100644
index 0000000000000..c632f47b7b4cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/ti,efuses.yaml
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/ti,efuses.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI SoC eFuse-based NVMEM
+
+maintainers:
+  - Judith Mendez <jm@ti.com>
+
+allOf:
+  - $ref: nvmem.yaml#
+
+properties:
+  compatible:
+    - const: ti,am62p-efuse
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    efuse@43000230 {
+        compatible = "ti,am62p-efuse";
+        reg = <0x43000230 0x10>;
+    };
+
+...
-- 
2.51.0
Re: [RFC PATCH v2] dt-bindings: nvmem: Introduce nvmem efuse binding for TI K3 SoCs
Posted by Rob Herring (Arm) 1 week, 2 days ago
On Mon, 22 Sep 2025 11:07:15 -0500, Judith Mendez wrote:
> On K3 SoCs there are efuse registers scattered across the memory
> map. In order to reference these efuse registers like gp-sw which
> may store SW REV information or other general purpose information
> for drivers to consume, treat them appropriately as efuse devices
> with nvmem framework.
> 
> Signed-off-by: Judith Mendez <jm@ti.com>
> ---
> This patch is not complete and is sent as an RFC to get some initial
> thoughts on this implementation to solve [0].
> 
> [0] https://lore.kernel.org/linux-mmc/736f09e0-075a-48e0-9b32-6b8805a7ee2a@kernel.org
> 
> Changes since v1 RFC:
> - Drop depreciated nvmem-deprecated-cells.yaml since nvmem.yaml
>   already includes nvmem-layout.yaml.
> - gp-sw efused-backed reg is 128 bits, so update size of example
>   to 0x10.
> 
> Link to RFC v1:
> https://lore.kernel.org/linux-devicetree/20250916154809.545283-1-jm@ti.com/
> ---
>  .../devicetree/bindings/nvmem/ti,efuses.yaml  | 35 +++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/nvmem/ti,efuses.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/nvmem/ti,efuses.yaml: ignoring, error in schema: properties: compatible
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/nvmem/ti,efuses.yaml: properties:compatible: [{'const': 'ti,am62p-efuse'}] is not of type 'object', 'boolean'
	from schema $id: http://json-schema.org/draft-07/schema#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/nvmem/ti,efuses.yaml: properties:compatible: [{'const': 'ti,am62p-efuse'}] is not of type 'object', 'boolean'
	from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#
Documentation/devicetree/bindings/nvmem/ti,efuses.example.dtb: /example-0/efuse@43000230: failed to match any schema with compatible: ['ti,am62p-efuse']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250922160715.346137-1-jm@ti.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.