dt-bindings: nvmem: Add fsl,scu-ocotp yaml file
authorAbel Vesa <abel.vesa@nxp.com>
Thu, 7 Jul 2022 12:50:11 +0000 (15:50 +0300)
committerShawn Guo <shawnguo@kernel.org>
Fri, 8 Jul 2022 08:35:16 +0000 (16:35 +0800)
In order to replace the fsl,scu txt file from bindings/arm/freescale,
we need to split it between the right subsystems. This patch documents
separately the 'ocotp' child node of the SCU main node.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml [new file with mode: 0644]

index 572cb2e628bf1450a127698c6b1b35507c70ef11..0841ad8bbd221e2fddcfda7421ccb559165efacb 100644 (file)
@@ -87,20 +87,6 @@ RTC bindings based on SCU Message Protocol
 Required properties:
 - compatible: should be "fsl,imx8qxp-sc-rtc";
 
-OCOTP bindings based on SCU Message Protocol
-------------------------------------------------------------
-Required properties:
-- compatible:          Should be one of:
-                       "fsl,imx8qm-scu-ocotp",
-                       "fsl,imx8qxp-scu-ocotp".
-- #address-cells:      Must be 1. Contains byte index
-- #size-cells:         Must be 1. Contains byte length
-
-Optional Child nodes:
-
-- Data cells of ocotp:
-  Detailed bindings are described in bindings/nvmem/nvmem.txt
-
 Watchdog bindings based on SCU Message Protocol
 ------------------------------------------------------------
 
@@ -149,16 +135,6 @@ firmware {
                          &lsio_mu1 1 3
                          &lsio_mu1 3 3>;
 
-               ocotp: imx8qx-ocotp {
-                       compatible = "fsl,imx8qxp-scu-ocotp";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-
-                       fec_mac0: mac@2c4 {
-                               reg = <0x2c4 8>;
-                       };
-               };
-
                pd: imx8qx-pd {
                        compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd";
                        #power-domain-cells = <1>;
diff --git a/Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml
new file mode 100644 (file)
index 0000000..6826882
--- /dev/null
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/fsl,scu-ocotp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX SCU Client Device Node - OCOTP bindings based on SCU Message Protocol
+
+maintainers:
+  - Dong Aisheng <aisheng.dong@nxp.com>
+
+description: i.MX SCU Client Device Node
+  Client nodes are maintained as children of the relevant IMX-SCU device node.
+
+allOf:
+  - $ref: nvmem.yaml#
+
+properties:
+  compatible:
+    enum:
+      - fsl,imx8qm-scu-ocotp
+      - fsl,imx8qxp-scu-ocotp
+
+patternProperties:
+  '^mac@[0-9a-f]*$':
+    type: object
+    description:
+      MAC address.
+
+    properties:
+      reg:
+        description:
+          Byte offset within OCOTP where the MAC address is stored
+        maxItems: 1
+
+    required:
+      - reg
+
+    additionalProperties: false
+
+required:
+  - compatible
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    ocotp {
+        compatible = "fsl,imx8qxp-scu-ocotp";
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        fec_mac0: mac@2c4 {
+            reg = <0x2c4 6>;
+        };
+    };