OSDN Git Service

dt-bindings: rng: Convert iProc RNG200 to YAML
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 8 Dec 2021 00:37:21 +0000 (16:37 -0800)
committerRob Herring <robh@kernel.org>
Tue, 14 Dec 2021 20:27:58 +0000 (14:27 -0600)
Convert the Broadcom iProc RNG200 HWRNG Device Tree binding to YAML to
help with validation.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211208003727.3596577-11-f.fainelli@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt [deleted file]
Documentation/devicetree/bindings/rng/brcm,iproc-rng200.yaml [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt b/Documentation/devicetree/bindings/rng/brcm,iproc-rng200.txt
deleted file mode 100644 (file)
index 8025231..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-HWRNG support for the iproc-rng200 driver
-
-Required properties:
-- compatible : Must be one of:
-              "brcm,bcm2711-rng200"
-              "brcm,bcm7211-rng200"
-              "brcm,bcm7278-rng200"
-              "brcm,iproc-rng200"
-- reg : base address and size of control register block
-
-Example:
-
-rng {
-        compatible = "brcm,iproc-rng200";
-        reg = <0x18032000 0x28>;
-};
diff --git a/Documentation/devicetree/bindings/rng/brcm,iproc-rng200.yaml b/Documentation/devicetree/bindings/rng/brcm,iproc-rng200.yaml
new file mode 100644 (file)
index 0000000..a00e9bc
--- /dev/null
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/rng/brcm,iproc-rng200.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: HWRNG support for the iproc-rng200 driver
+
+maintainers:
+  - Florian Fainelli <f.fainelli@gmail.com>
+
+properties:
+  compatible:
+    enum:
+      - brcm,bcm2711-rng200
+      - brcm,bcm7211-rng200
+      - brcm,bcm7278-rng200
+      - brcm,iproc-rng200
+
+  reg:
+    maxItems: 1
+
+additionalProperties: false
+
+examples:
+  - |
+    rng@18032000 {
+        compatible = "brcm,iproc-rng200";
+        reg = <0x18032000 0x28>;
+    };