dt-binding: soc: qcom: convert rmtfs documentation to yaml
authorDavid Heidelberg <david@ixit.cz>
Sat, 18 Dec 2021 18:28:16 +0000 (19:28 +0100)
committerRob Herring <robh@kernel.org>
Thu, 23 Dec 2021 16:01:19 +0000 (12:01 -0400)
Convert Qualcomm Remote File System Memory binding to the yaml format.

Signed-off-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20211218182816.17151-1-david@ixit.cz
Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.txt [deleted file]
Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.txt b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.txt
deleted file mode 100644 (file)
index 8562ba1..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-Qualcomm Remote File System Memory binding
-
-This binding describes the Qualcomm remote filesystem memory, which serves the
-purpose of describing the shared memory region used for remote processors to
-access block device data using the Remote Filesystem protocol.
-
-- compatible:
-       Usage: required
-       Value type: <stringlist>
-       Definition: must be:
-                   "qcom,rmtfs-mem"
-
-- reg:
-       Usage: required for static allocation
-       Value type: <prop-encoded-array>
-       Definition: must specify base address and size of the memory region,
-                   as described in reserved-memory.txt
-
-- size:
-       Usage: required for dynamic allocation
-       Value type: <prop-encoded-array>
-       Definition: must specify a size of the memory region, as described in
-                   reserved-memory.txt
-
-- qcom,client-id:
-       Usage: required
-       Value type: <u32>
-       Definition: identifier of the client to use this region for buffers.
-
-- qcom,vmid:
-       Usage: optional
-       Value type: <u32>
-       Definition: vmid of the remote processor, to set up memory protection.
-
-= EXAMPLE
-The following example shows the remote filesystem memory setup for APQ8016,
-with the rmtfs region for the Hexagon DSP (id #1) located at 0x86700000.
-
-       reserved-memory {
-               #address-cells = <2>;
-               #size-cells = <2>;
-               ranges;
-
-               rmtfs@86700000 {
-                       compatible = "qcom,rmtfs-mem";
-                       reg = <0x0 0x86700000 0x0 0xe0000>;
-                       no-map;
-
-                       qcom,client-id = <1>;
-               };
-       };
diff --git a/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml b/Documentation/devicetree/bindings/reserved-memory/qcom,rmtfs-mem.yaml
new file mode 100644 (file)
index 0000000..2998f1c
--- /dev/null
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/reserved-memory/qcom,rmtfs-mem.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm Remote File System Memory
+
+description: |
+  This binding describes the Qualcomm remote filesystem memory, which serves the
+  purpose of describing the shared memory region used for remote processors to
+  access block device data using the Remote Filesystem protocol.
+
+maintainers:
+  - Bjorn Andersson <bjorn.andersson@linaro.org>
+
+allOf:
+  - $ref: "reserved-memory.yaml"
+
+properties:
+  compatible:
+    const: qcom,rmtfs-mem
+
+  qcom,client-id:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: >
+      identifier of the client to use this region for buffers
+
+  qcom,vmid:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: >
+      vmid of the remote processor, to set up memory protection
+
+required:
+  - qcom,client-id
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    reserved-memory {
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges;
+
+        rmtfs@86700000 {
+            compatible = "qcom,rmtfs-mem";
+            reg = <0x86700000 0xe0000>;
+            no-map;
+
+            qcom,client-id = <1>;
+        };
+    };