dt-bindings: rng: Add Marvell Armada RNG support
authorRob Herring (Arm) <robh@kernel.org>
Mon, 14 Oct 2024 18:54:57 +0000 (13:54 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 28 Oct 2024 10:32:36 +0000 (18:32 +0800)
The Marvell Armada RNG uses the same IP as TI from Inside Secure and is
already using the binding. The only missing part is the
"marvell,armada-8k-rng" compatible string.

Rename the binding to inside-secure,safexcel-eip76.yaml to better
reflect it is multi-vendor, licensed IP and to follow the naming
convention using compatible string.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Documentation/devicetree/bindings/rng/inside-secure,safexcel-eip76.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/rng/omap_rng.yaml [deleted file]

diff --git a/Documentation/devicetree/bindings/rng/inside-secure,safexcel-eip76.yaml b/Documentation/devicetree/bindings/rng/inside-secure,safexcel-eip76.yaml
new file mode 100644 (file)
index 0000000..0877eb4
--- /dev/null
@@ -0,0 +1,86 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rng/inside-secure,safexcel-eip76.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Inside-Secure HWRNG Module
+
+maintainers:
+  - Jayesh Choudhary <j-choudhary@ti.com>
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - ti,omap2-rng
+          - ti,omap4-rng
+          - inside-secure,safexcel-eip76
+      - items:
+          - enum:
+              - marvell,armada-8k-rng
+          - const: inside-secure,safexcel-eip76
+
+  ti,hwmods:
+    const: rng
+    deprecated: true
+    description: Name of the hwmod associated with the RNG module
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 1
+    items:
+      - description: EIP150 gateable clock
+      - description: Main gateable clock
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: core
+      - const: reg
+
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - ti,omap4-rng
+              - inside-secure,safexcel-eip76
+
+    then:
+      required:
+        - interrupts
+
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    /* AM335x */
+    rng: rng@48310000 {
+            compatible = "ti,omap4-rng";
+            ti,hwmods = "rng";
+            reg = <0x48310000 0x2000>;
+            interrupts = <111>;
+    };
+  - |
+    /* SafeXcel IP-76 */
+    trng: rng@f2760000 {
+            compatible = "inside-secure,safexcel-eip76";
+            reg = <0xf2760000 0x7d>;
+            interrupts = <0 59 4>;
+            clocks = <&cpm_syscon0 1 25>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/rng/omap_rng.yaml b/Documentation/devicetree/bindings/rng/omap_rng.yaml
deleted file mode 100644 (file)
index c0ac4f6..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/rng/omap_rng.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: OMAP SoC and Inside-Secure HWRNG Module
-
-maintainers:
-  - Jayesh Choudhary <j-choudhary@ti.com>
-
-properties:
-  compatible:
-    enum:
-      - ti,omap2-rng
-      - ti,omap4-rng
-      - inside-secure,safexcel-eip76
-
-  ti,hwmods:
-    const: rng
-    deprecated: true
-    description: Name of the hwmod associated with the RNG module
-
-  reg:
-    maxItems: 1
-
-  interrupts:
-    maxItems: 1
-
-  clocks:
-    minItems: 1
-    items:
-      - description: EIP150 gateable clock
-      - description: Main gateable clock
-
-  clock-names:
-    minItems: 1
-    items:
-      - const: core
-      - const: reg
-
-
-allOf:
-  - if:
-      properties:
-        compatible:
-          contains:
-            enum:
-              - ti,omap4-rng
-              - inside-secure,safexcel-eip76
-
-    then:
-      required:
-        - interrupts
-
-
-required:
-  - compatible
-  - reg
-
-additionalProperties: false
-
-examples:
-  - |
-    /* AM335x */
-    rng: rng@48310000 {
-            compatible = "ti,omap4-rng";
-            ti,hwmods = "rng";
-            reg = <0x48310000 0x2000>;
-            interrupts = <111>;
-    };
-  - |
-    /* SafeXcel IP-76 */
-    trng: rng@f2760000 {
-            compatible = "inside-secure,safexcel-eip76";
-            reg = <0xf2760000 0x7d>;
-            interrupts = <0 59 4>;
-            clocks = <&cpm_syscon0 1 25>;
-    };
-
-...