Skip to contentSkip to conversation

dt-bindings: remoteproc: sti: convert st-rproc into dt-schema

PATCH In review Alain Volmat 2 participants 2 messages Feb 11, 2023 – Feb 12, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: remoteproc: sti: convert st-rproc into dt-schema

Convert the st-rproc.txt binding into dt-schema YAML st,sti-rproc.yaml

---
 .../bindings/remoteproc/st,sti-rproc.yaml     | 101 ++++++++++++++++++
 .../bindings/remoteproc/st-rproc.txt          |  41 -------
 2 files changed, 101 insertions(+), 41 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml
 delete mode 100644 Documentation/devicetree/bindings/remoteproc/st-rproc.txt
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +101 -0
new file mode 100644
index 000000000000..b9d84dfbcb58
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/remoteproc/st,sti-rproc.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: STMicroelectronics STi remote processor controller
+
+description:
+  This binding provides support for adjunct processors found on ST SoCs.
+
+  Co-processors can be controlled from the bootloader or the primary OS. If
+  the bootloader starts a co-processor, the primary OS must detect its state
+  and act accordingly.
+
+maintainers:
+  - Patrice Chotard <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - st,st231-rproc
+      - st,st40-rproc
+
+  memory-region:
+    description:
+      List of phandles to the reserved memory regions associated with the
+      remoteproc device. This is variable and describes the memories shared with
+      the remote processor (e.g. remoteproc firmware and carveouts, rpmsg
+      vrings, ...).
+      (see ../reserved-memory/reserved-memory.txt)
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    maxItems: 1
+
+  st,syscfg:
+    description:
+      System configuration register which holds the boot vector for the co-processor
+    $ref: "/schemas/types.yaml#/definitions/phandle-array"
+    items:
+      - items:
+          - description: Phandle of syscon block
+          - description: Boot vector register offset
+
+  clocks:
+    maxItems: 1
+
+  clock-frequency:
+    description:
+      Frequency of the processing clock of the remote processor
+    $ref: "/schemas/types.yaml#/definitions/uint32"
+
+  "#mbox-cells":
+    const: 1
+
+  mboxes:
+    maxItems: 4
+
+  mbox-names:
+    items:
+      - const: vq0_rx
+      - const: vq0_tx
+      - const: vq1_rx
+      - const: vq1_tx
+
+required:
+  - compatible
+  - memory-region
+  - resets
+  - reset-names
+  - st,syscfg
+  - clocks
+  - clock-frequency
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/stih407-clks.h>
+    #include <dt-bindings/reset/stih407-resets.h>
+    audio_reserved: rproc@42000000 {
+      compatible = "shared-dma-pool";
+        reg = <0x42000000 0x01000000>;
+        no-map;
+    };
+
+    st231-audio {
+      compatible = "st,st231-rproc";
+      memory-region = <&audio_reserved>;
+      resets = <&softreset STIH407_ST231_AUD_SOFTRESET>;
+      reset-names = "sw_reset";
+      clocks = <&clk_s_c0_flexgen CLK_ST231_AUD_0>;
+      clock-frequency = <600000000>;
+      st,syscfg	= <&syscfg_core 0x228>;
+    };
+
+...
Documentation/devicetree/bindings/remoteproc/st-rproc.txt deleted +0 -41

41 lines not on this page · raw message

Signature · 1 line
2.34.1
#1 lore raw
Quoted 16 lines · Alain Volmat

Convert the st-rproc.txt binding into dt-schema YAML st,sti-rproc.yaml

---
 .../bindings/remoteproc/st,sti-rproc.yaml     | 101 ++++++++++++++++++
 .../bindings/remoteproc/st-rproc.txt          |  41 -------
 2 files changed, 101 insertions(+), 41 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml
 delete mode 100644 Documentation/devicetree/bindings/remoteproc/st-rproc.txt
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +0 -0
new file mode 100644
index 000000000000..b9d84dfbcb58

Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml line 5

Quoted 5 lines
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +5 -0
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/remoteproc/st,sti-rproc.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"

Drop quotes from both.

Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml line 10

Quoted 5 lines
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +5 -0
+
+title: STMicroelectronics STi remote processor controller
+
+description:
+  This binding provides support for adjunct processors found on ST SoCs.

Drop entire sentence and describe hardware, not binding. This is binding, so no need to say it is binding.

Quoted 10 lines
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +10 -0
+
+  Co-processors can be controlled from the bootloader or the primary OS. If
+  the bootloader starts a co-processor, the primary OS must detect its state
+  and act accordingly.
+
+maintainers:
+  - Patrice Chotard <[email protected]>
+
+properties:
+  compatible:

Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml line 30

Quoted 10 lines
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +10 -0
+    enum:
+      - st,st231-rproc
+      - st,st40-rproc
+
+  memory-region:
+    description:
+      List of phandles to the reserved memory regions associated with the
+      remoteproc device. This is variable and describes the memories shared with
+      the remote processor (e.g. remoteproc firmware and carveouts, rpmsg
+      vrings, ...).

maxItems

Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml line 31

Quoted 1 line
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +1 -0
+      (see ../reserved-memory/reserved-memory.txt)

Drop last line.

Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml line 37

Quoted 6 lines
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +6 -0
+
+  resets:
+    maxItems: 1
+
+  reset-names:
+    maxItems: 1

You need to list items.

Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml line 42

Quoted 5 lines
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +5 -0
+
+  st,syscfg:
+    description:
+      System configuration register which holds the boot vector for the co-processor
+    $ref: "/schemas/types.yaml#/definitions/phandle-array"

Drop quotes.

Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml line 54

Quoted 12 lines
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +12 -0
+    items:
+      - items:
+          - description: Phandle of syscon block
+          - description: Boot vector register offset
+
+  clocks:
+    maxItems: 1
+
+  clock-frequency:
+    description:
+      Frequency of the processing clock of the remote processor
+    $ref: "/schemas/types.yaml#/definitions/uint32"

Drop ref, not needed, it comes from dtschema.

Quoted 27 lines
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +27 -0
+
+  "#mbox-cells":
+    const: 1
+
+  mboxes:
+    maxItems: 4
+
+  mbox-names:
+    items:
+      - const: vq0_rx
+      - const: vq0_tx
+      - const: vq1_rx
+      - const: vq1_tx
+
+required:
+  - compatible
+  - memory-region
+  - resets
+  - reset-names
+  - st,syscfg
+  - clocks
+  - clock-frequency
+
+additionalProperties: false
+
+examples:
+  - |

Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml line 91

Quoted 10 lines
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +10 -0
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/stih407-clks.h>
+    #include <dt-bindings/reset/stih407-resets.h>
+    audio_reserved: rproc@42000000 {
+      compatible = "shared-dma-pool";
+        reg = <0x42000000 0x01000000>;
+        no-map;
+    };
+
+    st231-audio {

Generic node names, so maybe "remoteproc"

Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml line 98

Quoted 7 lines
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +7 -0
+      compatible = "st,st231-rproc";
+      memory-region = <&audio_reserved>;
+      resets = <&softreset STIH407_ST231_AUD_SOFTRESET>;
+      reset-names = "sw_reset";
+      clocks = <&clk_s_c0_flexgen CLK_ST231_AUD_0>;
+      clock-frequency = <600000000>;
+      st,syscfg	= <&syscfg_core 0x228>;

Correct indentation issue.

Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml line 99

Quoted 1 line
Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml new file +1 -0
+    };

Best regards,
Krzysztof