All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeya R <jeyr@codeaurora.org>
To: linux-arm-msm@vger.kernel.org, srinivas.kandagatla@linaro.org
Cc: Jeya R <jeyr@codeaurora.org>,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	fastrpc.upstream@qti.qualcomm.com, bkumar@qti.qualcomm.com,
	ekangupt@qti.qualcomm.com, jeyr@qti.qualcomm.com
Subject: [PATCH 1/3] dt-bindings: misc: add fastrpc domain vmid property
Date: Tue, 30 Nov 2021 18:27:48 +0530	[thread overview]
Message-ID: <1638277072-6459-2-git-send-email-jeyr@codeaurora.org> (raw)
In-Reply-To: <1638277072-6459-1-git-send-email-jeyr@codeaurora.org>

Add fastrpc domain virtual machine IDs property. This property is used
to setup memory protection for remote processor.

"This patch depends on “dt-bindings: misc: fastrpc convert bindings to yaml"
(https://patchwork.kernel.org/project/linux-arm-msm/patch/20211130092846.18804-1-srinivas.kandagatla@linaro.org/)"

Signed-off-by: Jeya R <jeyr@codeaurora.org>
---
 .../devicetree/bindings/misc/qcom,fastrpc.txt      |  78 ---------------
 .../devicetree/bindings/misc/qcom,fastrpc.yaml     | 109 +++++++++++++++++++++
 2 files changed, 109 insertions(+), 78 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
 create mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml

diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt b/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
deleted file mode 100644
index 2a1827a..0000000
--- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-Qualcomm Technologies, Inc. FastRPC Driver
-
-The FastRPC implements an IPC (Inter-Processor Communication)
-mechanism that allows for clients to transparently make remote method
-invocations across DSP and APPS boundaries. This enables developers
-to offload tasks to the DSP and free up the application processor for
-other tasks.
-
-- compatible:
-	Usage: required
-	Value type: <stringlist>
-	Definition: must be "qcom,fastrpc"
-
-- label
-	Usage: required
-	Value type: <string>
-	Definition: should specify the dsp domain name this fastrpc
-	corresponds to. must be one of this: "adsp", "mdsp", "sdsp", "cdsp"
-
-- #address-cells
-	Usage: required
-	Value type: <u32>
-	Definition: Must be 1
-
-- #size-cells
-	Usage: required
-	Value type: <u32>
-	Definition: Must be 0
-
-= COMPUTE BANKS
-Each subnode of the Fastrpc represents compute context banks available
-on the dsp.
-- All Compute context banks MUST contain the following properties:
-
-- compatible:
-	Usage: required
-	Value type: <stringlist>
-	Definition: must be "qcom,fastrpc-compute-cb"
-
-- reg
-	Usage: required
-	Value type: <u32>
-	Definition: Context Bank ID.
-
-- qcom,nsessions:
-	Usage: Optional
-	Value type: <u32>
-	Defination: A value indicating how many sessions can share this
-		    context bank. Defaults to 1 when this property
-		    is not specified.
-
-Example:
-
-adsp-pil {
-	compatible = "qcom,msm8996-adsp-pil";
-	...
-	smd-edge {
-		label = "lpass";
-		fastrpc {
-			compatible = "qcom,fastrpc";
-			qcom,smd-channels = "fastrpcsmd-apps-dsp";
-			label = "adsp";
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			cb@1 {
-				compatible = "qcom,fastrpc-compute-cb";
-				reg = <1>;
-			};
-
-			cb@2 {
-				compatible = "qcom,fastrpc-compute-cb";
-				reg = <2>;
-			};
-			...
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
new file mode 100644
index 0000000..a9fd93c
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
@@ -0,0 +1,109 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/misc/qcom,fastrpc.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm Technologies, Inc. FastRPC Driver
+
+maintainers:
+  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description: |
+  This binding describes Qualcomm FastRPC an IPC (Inter-Processor Communication)
+  mechanism that allows for clients to transparently make remote method
+  invocations across DSP and APPS boundaries. This enables developers
+  to offload tasks to the DSP and free up the application processor for
+  other tasks.
+
+properties:
+  compatible:
+    const: qcom,fastrpc
+
+  label:
+    enum:
+      - adsp
+      - mdsp
+      - sdsp
+      - cdsp
+
+  qcom,nsessions:
+    $ref: "/schemas/types.yaml#/definitions/uint32-array"
+    description: Virtual machine IDs of remote processor which is used to
+                 setup memory protection.
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+patternProperties:
+  "^cb@[0-9a-f]$":
+    type: object
+    description: |
+      Compute context bank
+
+    properties:
+      compatible:
+        const: qcom,fastrpc-compute-cb
+
+      reg:
+        maxItems: 1
+        description: Context Bank ID
+
+      qcom,nsessions:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: How many sessions can share this context bank.
+                     Defaults to 1 when this property is not specified.
+
+    required:
+      - compatible
+      - reg
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - label
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    adsp {
+        compatible = "qcom,msm8996-adsp-pil";
+        interrupts-extended = <&intc 0 162 IRQ_TYPE_EDGE_RISING>,
+                              <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
+                              <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
+                              <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
+                              <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>;
+        interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
+        clocks = <&xo_board>;
+        clock-names = "xo";
+        memory-region = <&adsp_region>;
+        qcom,smem-states = <&smp2p_adsp_out 0>;
+        qcom,smem-state-names = "stop";
+
+        smd-edge {
+            label = "lpass";
+
+            fastrpc {
+                compatible = "qcom,fastrpc";
+                label = "adsp";
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                cb@1 {
+                    compatible = "qcom,fastrpc-compute-cb";
+                    reg = <1>;
+                };
+
+                cb@2 {
+                    compatible = "qcom,fastrpc-compute-cb";
+                    reg = <2>;
+                };
+            };
+        };
+    };
-- 
2.7.4


  reply	other threads:[~2021-11-30 12:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 12:57 [PATCH 0/3] Add vmid property and mapping attribute Jeya R
2021-11-30 12:57 ` Jeya R [this message]
2021-11-30 13:17   ` [PATCH 1/3] dt-bindings: misc: add fastrpc domain vmid property Srinivas Kandagatla
2021-11-30 12:57 ` [PATCH 1/2] misc: fastrpc: Add fdlist implementation Jeya R
2021-11-30 20:20   ` kernel test robot
2021-11-30 20:20     ` kernel test robot
2021-11-30 23:52   ` kernel test robot
2021-11-30 23:52     ` kernel test robot
2021-11-30 12:57 ` [PATCH 2/2] misc: fastrpc: Add dma handle implementation Jeya R
2021-11-30 22:44   ` kernel test robot
2021-11-30 22:44     ` kernel test robot
2021-12-01  0:22   ` kernel test robot
2021-12-01  0:22     ` kernel test robot
2021-11-30 12:57 ` [PATCH 2/3] misc: fastrpc: Read virtual machine IDs during probe Jeya R
2021-11-30 12:57 ` [PATCH 3/3] misc: fastrpc: Handle mapping of invoke argument with attribute Jeya R
2021-11-30 18:18   ` kernel test robot
2021-11-30 18:18     ` kernel test robot

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=1638277072-6459-2-git-send-email-jeyr@codeaurora.org \
    --to=jeyr@codeaurora.org \
    --cc=bkumar@qti.qualcomm.com \
    --cc=ekangupt@qti.qualcomm.com \
    --cc=fastrpc.upstream@qti.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jeyr@qti.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.