Linux Remote Processor Subsystem development
 help / color / mirror / Atom feed
From: Alain Volmat <avolmat@me.com>
To: Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Alain Volmat <avolmat@me.com>,
	linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] dt-bindings: remoteproc: sti: convert st-rproc into dt-schema
Date: Sat, 11 Feb 2023 21:47:50 +0100	[thread overview]
Message-ID: <20230211204751.9149-1-avolmat@me.com> (raw)

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

Signed-off-by: Alain Volmat <avolmat@me.com>
---
 .../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

diff --git a/Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml
new file mode 100644
index 000000000000..b9d84dfbcb58
--- /dev/null
+++ b/Documentation/devicetree/bindings/remoteproc/st,sti-rproc.yaml
@@ -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 <patrice.chotard@foss.st.com>
+
+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>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/remoteproc/st-rproc.txt b/Documentation/devicetree/bindings/remoteproc/st-rproc.txt
deleted file mode 100644
index 1031bcd90a79..000000000000
--- a/Documentation/devicetree/bindings/remoteproc/st-rproc.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-STMicroelectronics Co-Processor Bindings
-----------------------------------------
-
-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.
-
-Required properties:
-- compatible		Should be one of:
-				"st,st231-rproc"
-				"st,st40-rproc"
-- memory-region		Reserved memory (See: ../reserved-memory/reserved-memory.txt)
-- resets		Reset lines (See: ../reset/reset.txt)
-- reset-names		Must be "sw_reset" and "pwr_reset"
-- clocks		Clock for co-processor (See: ../clock/clock-bindings.txt)
-- clock-frequency	Clock frequency to set co-processor at if the bootloader
-			hasn't already done so
-- st,syscfg		System configuration register which holds the boot vector
-			for the co-processor
-				1st cell: Phandle to syscon block
-				2nd cell: Boot vector register offset
-
-Example:
-
-	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>;
-	};
-- 
2.34.1


             reply	other threads:[~2023-02-11 20:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11 20:47 Alain Volmat [this message]
2023-02-12 16:08 ` [PATCH] dt-bindings: remoteproc: sti: convert st-rproc into dt-schema Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230211204751.9149-1-avolmat@me.com \
    --to=avolmat@me.com \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=patrice.chotard@foss.st.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox