All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org
Cc: plai@codeaurora.org, tiwai@suse.de, devicetree@vger.kernel.org,
	perex@perex.cz, alsa-devel@alsa-project.org, lgirdwood@gmail.com,
	bgoswami@codeaurora.org,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [PATCH v5 04/21] soc: dt-bindings: qcom: add gpr bindings
Date: Fri,  3 Sep 2021 12:20:15 +0100	[thread overview]
Message-ID: <20210903112032.25834-5-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20210903112032.25834-1-srinivas.kandagatla@linaro.org>

Qualcomm Generic Packet router aka GPR is the IPC mechanism found
in AudioReach next generation signal processing framework to perform
command and response messages between various processors.

GPR has concepts of static and dynamic port, all static services like
APM (Audio Processing Manager), PRM (Proxy resource manager) have
fixed port numbers where as dynamic services like graphs have dynamic
port numbers which are allocated at runtime. All GPR packet messages
will have source and destination domain and port along with opcode
and payload.

This support is added using existing APR driver to reuse most of
the code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 .../bindings/soc/qcom/qcom,apr.yaml           | 41 +++++++++++++++----
 include/dt-bindings/soc/qcom,gpr.h            | 18 ++++++++
 2 files changed, 52 insertions(+), 7 deletions(-)
 create mode 100644 include/dt-bindings/soc/qcom,gpr.h

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
index 922c8567c134..14d75f6a556e 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
@@ -4,20 +4,21 @@
 $id: "http://devicetree.org/schemas/soc/qcom/qcom,apr.yaml#"
 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
 
-title: Qualcomm APR (Asynchronous Packet Router) binding
+title: Qualcomm APR/GPR (Asynchronous/Generic Packet Router) binding
 
 maintainers:
   - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
 
 description: |
-  This binding describes the Qualcomm APR, APR is a IPC protocol for
-  communication between Application processor and QDSP. APR is mainly
+  This binding describes the Qualcomm APR/GPR, APR/GPR is a IPC protocol for
+  communication between Application processor and QDSP. APR/GPR is mainly
   used for audio/voice services on the QDSP.
 
 properties:
   compatible:
     enum:
       - qcom,apr-v2
+      - qcom,gpr
 
   qcom,apr-domain:
     $ref: /schemas/types.yaml#/definitions/uint32
@@ -45,6 +46,10 @@ properties:
         5 = Application processor Domain
         6 = Modem2 Domain
         7 = Application Processor2 Domain
+      Selects the processor domain for gpr
+        1 = Modem Domain
+        2 = Audio DSP Domain
+        3 = Application Processor Domain
 
   '#address-cells':
     const: 1
@@ -52,12 +57,12 @@ properties:
   '#size-cells':
     const: 0
 
-#APR Services
+#APR/GPR Services
 patternProperties:
-  "^service@[3-9a-d]$":
+  "^service@[1-9a-d]$":
     type: object
     description:
-      APR node's client devices use subnodes for desired static port services.
+      APR/GPR node's client devices use subnodes for desired static port services.
 
     properties:
       compatible:
@@ -66,9 +71,11 @@ patternProperties:
           - qcom,q6asm
           - qcom,q6afe
           - qcom,q6adm
+          - qcom,q6apm
+          - qcom,q6prm
 
       reg:
-        enum: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
+        enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
         description:
           APR Service ID
             3 = DSP Core Service
@@ -82,6 +89,11 @@ patternProperties:
             11 = Core voice processor.
             12 = Ultrasound stream manager.
             13 = Listen stream manager.
+          GPR Service ID
+            1 = Audio Process Manager Service
+            2 = Proxy Resource Manager Service.
+            3 = AMDB Service.
+            4 = Voice processing manager.
 
       qcom,protection-domain:
         $ref: /schemas/types.yaml#/definitions/string-array
@@ -140,3 +152,18 @@ examples:
           qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
         };
     };
+
+  - |
+    #include <dt-bindings/soc/qcom,gpr.h>
+    gpr {
+        compatible = "qcom,gpr";
+        qcom,domain = <GPR_DOMAIN_ID_ADSP>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        service@1 {
+          compatible = "qcom,q6apm";
+          reg = <GPR_APM_MODULE_IID>;
+          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+        };
+    };
diff --git a/include/dt-bindings/soc/qcom,gpr.h b/include/dt-bindings/soc/qcom,gpr.h
new file mode 100644
index 000000000000..1c68906e079c
--- /dev/null
+++ b/include/dt-bindings/soc/qcom,gpr.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_BINDINGS_QCOM_GPR_H
+#define __DT_BINDINGS_QCOM_GPR_H
+
+/* DOMAINS */
+
+#define GPR_DOMAIN_ID_MODEM	1
+#define GPR_DOMAIN_ID_ADSP	2
+#define GPR_DOMAIN_ID_APPS	3
+
+/* Static Services */
+
+#define GPR_APM_MODULE_IID		1
+#define GPR_PRM_MODULE_IID		2
+#define GPR_AMDB_MODULE_IID		3
+#define GPR_VCPM_MODULE_IID		4
+
+#endif /* __DT_BINDINGS_QCOM_GPR_H */
-- 
2.21.0


WARNING: multiple messages have this Message-ID (diff)
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	bgoswami@codeaurora.org, tiwai@suse.de, plai@codeaurora.org,
	lgirdwood@gmail.com
Subject: [PATCH v5 04/21] soc: dt-bindings: qcom: add gpr bindings
Date: Fri,  3 Sep 2021 12:20:15 +0100	[thread overview]
Message-ID: <20210903112032.25834-5-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20210903112032.25834-1-srinivas.kandagatla@linaro.org>

Qualcomm Generic Packet router aka GPR is the IPC mechanism found
in AudioReach next generation signal processing framework to perform
command and response messages between various processors.

GPR has concepts of static and dynamic port, all static services like
APM (Audio Processing Manager), PRM (Proxy resource manager) have
fixed port numbers where as dynamic services like graphs have dynamic
port numbers which are allocated at runtime. All GPR packet messages
will have source and destination domain and port along with opcode
and payload.

This support is added using existing APR driver to reuse most of
the code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 .../bindings/soc/qcom/qcom,apr.yaml           | 41 +++++++++++++++----
 include/dt-bindings/soc/qcom,gpr.h            | 18 ++++++++
 2 files changed, 52 insertions(+), 7 deletions(-)
 create mode 100644 include/dt-bindings/soc/qcom,gpr.h

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
index 922c8567c134..14d75f6a556e 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
@@ -4,20 +4,21 @@
 $id: "http://devicetree.org/schemas/soc/qcom/qcom,apr.yaml#"
 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
 
-title: Qualcomm APR (Asynchronous Packet Router) binding
+title: Qualcomm APR/GPR (Asynchronous/Generic Packet Router) binding
 
 maintainers:
   - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
 
 description: |
-  This binding describes the Qualcomm APR, APR is a IPC protocol for
-  communication between Application processor and QDSP. APR is mainly
+  This binding describes the Qualcomm APR/GPR, APR/GPR is a IPC protocol for
+  communication between Application processor and QDSP. APR/GPR is mainly
   used for audio/voice services on the QDSP.
 
 properties:
   compatible:
     enum:
       - qcom,apr-v2
+      - qcom,gpr
 
   qcom,apr-domain:
     $ref: /schemas/types.yaml#/definitions/uint32
@@ -45,6 +46,10 @@ properties:
         5 = Application processor Domain
         6 = Modem2 Domain
         7 = Application Processor2 Domain
+      Selects the processor domain for gpr
+        1 = Modem Domain
+        2 = Audio DSP Domain
+        3 = Application Processor Domain
 
   '#address-cells':
     const: 1
@@ -52,12 +57,12 @@ properties:
   '#size-cells':
     const: 0
 
-#APR Services
+#APR/GPR Services
 patternProperties:
-  "^service@[3-9a-d]$":
+  "^service@[1-9a-d]$":
     type: object
     description:
-      APR node's client devices use subnodes for desired static port services.
+      APR/GPR node's client devices use subnodes for desired static port services.
 
     properties:
       compatible:
@@ -66,9 +71,11 @@ patternProperties:
           - qcom,q6asm
           - qcom,q6afe
           - qcom,q6adm
+          - qcom,q6apm
+          - qcom,q6prm
 
       reg:
-        enum: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
+        enum: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
         description:
           APR Service ID
             3 = DSP Core Service
@@ -82,6 +89,11 @@ patternProperties:
             11 = Core voice processor.
             12 = Ultrasound stream manager.
             13 = Listen stream manager.
+          GPR Service ID
+            1 = Audio Process Manager Service
+            2 = Proxy Resource Manager Service.
+            3 = AMDB Service.
+            4 = Voice processing manager.
 
       qcom,protection-domain:
         $ref: /schemas/types.yaml#/definitions/string-array
@@ -140,3 +152,18 @@ examples:
           qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
         };
     };
+
+  - |
+    #include <dt-bindings/soc/qcom,gpr.h>
+    gpr {
+        compatible = "qcom,gpr";
+        qcom,domain = <GPR_DOMAIN_ID_ADSP>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        service@1 {
+          compatible = "qcom,q6apm";
+          reg = <GPR_APM_MODULE_IID>;
+          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
+        };
+    };
diff --git a/include/dt-bindings/soc/qcom,gpr.h b/include/dt-bindings/soc/qcom,gpr.h
new file mode 100644
index 000000000000..1c68906e079c
--- /dev/null
+++ b/include/dt-bindings/soc/qcom,gpr.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_BINDINGS_QCOM_GPR_H
+#define __DT_BINDINGS_QCOM_GPR_H
+
+/* DOMAINS */
+
+#define GPR_DOMAIN_ID_MODEM	1
+#define GPR_DOMAIN_ID_ADSP	2
+#define GPR_DOMAIN_ID_APPS	3
+
+/* Static Services */
+
+#define GPR_APM_MODULE_IID		1
+#define GPR_PRM_MODULE_IID		2
+#define GPR_AMDB_MODULE_IID		3
+#define GPR_VCPM_MODULE_IID		4
+
+#endif /* __DT_BINDINGS_QCOM_GPR_H */
-- 
2.21.0


  parent reply	other threads:[~2021-09-03 11:21 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 11:20 [PATCH v5 00/21] ASoC: qcom: Add AudioReach support Srinivas Kandagatla
2021-09-03 11:20 ` Srinivas Kandagatla
2021-09-03 11:20 ` [PATCH v5 01/21] soc: dt-bindings: qcom: apr: convert to yaml Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-07 22:36   ` Rob Herring
2021-09-07 22:36     ` Rob Herring
2021-09-03 11:20 ` [PATCH v5 02/21] soc: dt-bindings: qcom: apr: deprecate qcom,apr-domain property Srinivas Kandagatla
2021-09-03 11:20   ` [PATCH v5 02/21] soc: dt-bindings: qcom: apr: deprecate qcom, apr-domain property Srinivas Kandagatla
2021-09-07 22:39   ` [PATCH v5 02/21] soc: dt-bindings: qcom: apr: deprecate qcom,apr-domain property Rob Herring
2021-09-07 22:39     ` Rob Herring
2021-09-03 11:20 ` [PATCH v5 03/21] soc: qcom: apr: make code more reuseable Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 11:20 ` Srinivas Kandagatla [this message]
2021-09-03 11:20   ` [PATCH v5 04/21] soc: dt-bindings: qcom: add gpr bindings Srinivas Kandagatla
2021-09-07 22:52   ` Rob Herring
2021-09-07 22:52     ` Rob Herring
2021-09-03 11:20 ` [PATCH v5 05/21] soc: qcom: apr: Add GPR support Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 21:47   ` kernel test robot
2021-09-03 21:47     ` kernel test robot
2021-09-03 21:47     ` kernel test robot
2021-09-03 21:54   ` kernel test robot
2021-09-03 21:54     ` kernel test robot
2021-09-03 21:54     ` kernel test robot
2021-09-03 11:20 ` [PATCH v5 06/21] ASoC: dt-bindings: move LPASS dai related bindings out of q6afe Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-07 22:54   ` Rob Herring
2021-09-07 22:54     ` Rob Herring
2021-09-03 11:20 ` [PATCH v5 07/21] ASoC: dt-bindings: move LPASS clocks " Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 11:20 ` [PATCH v5 08/21] ASoC: dt-bindings: rename q6afe.h to q6dsp-lpass-ports.h Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-07 22:56   ` Rob Herring
2021-09-07 22:56     ` Rob Herring
2021-09-03 11:20 ` [PATCH v5 09/21] ASoC: qdsp6: q6afe-dai: move lpass audio ports to common file Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 11:20 ` [PATCH v5 10/21] ASoC: qdsp6: q6afe-clocks: move audio-clocks " Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 22:50   ` kernel test robot
2021-09-03 22:50     ` kernel test robot
2021-09-03 22:50     ` kernel test robot
2021-09-03 11:20 ` [PATCH v5 11/21] ASoC: dt-bindings: q6dsp: add q6apm-lpass-dai compatible Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-07 22:56   ` Rob Herring
2021-09-07 22:56     ` Rob Herring
2021-09-03 11:20 ` [PATCH v5 12/21] ASoC: dt-bindings: lpass-clocks: add q6prm clocks compatible Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-07 22:57   ` Rob Herring
2021-09-07 22:57     ` Rob Herring
2021-09-03 11:20 ` [PATCH v5 13/21] ASoC: dt-bindings: add q6apm digital audio stream bindings Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-08 11:58   ` Rob Herring
2021-09-08 11:58     ` Rob Herring
2021-09-03 11:20 ` [PATCH v5 14/21] ASoC: qdsp6: audioreach: add basic pkt alloc support Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 14:23   ` Pierre-Louis Bossart
2021-09-03 17:29     ` Mark Brown
2021-09-03 17:29       ` Mark Brown
2021-09-06 16:28     ` Srinivas Kandagatla
2021-09-03 11:20 ` [PATCH v5 15/21] ASoC: qdsp6: audioreach: add q6apm support Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 14:54   ` Pierre-Louis Bossart
2021-09-06 16:28     ` Srinivas Kandagatla
2021-09-07 15:04       ` Pierre-Louis Bossart
2021-09-08 11:28         ` Srinivas Kandagatla
2021-09-08 12:26           ` Mark Brown
2021-09-08 12:26             ` Mark Brown
2021-09-08 13:29             ` Srinivas Kandagatla
2021-09-08 13:29               ` Srinivas Kandagatla
2021-09-03 11:20 ` [PATCH v5 16/21] ASoC: qdsp6: audioreach: add module configuration command helpers Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 15:13   ` Pierre-Louis Bossart
2021-09-06 16:29     ` Srinivas Kandagatla
2021-09-03 23:56   ` kernel test robot
2021-09-03 23:56     ` kernel test robot
2021-09-03 23:56     ` kernel test robot
2021-09-03 11:20 ` [PATCH v5 17/21] ASoC: qdsp6: audioreach: add topology support Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 15:31   ` Pierre-Louis Bossart
2021-09-06 16:29     ` Srinivas Kandagatla
2021-09-04  1:05   ` kernel test robot
2021-09-04  1:05     ` kernel test robot
2021-09-04  1:05     ` kernel test robot
2021-09-03 11:20 ` [PATCH v5 18/21] ASoC: qdsp6: audioreach: add q6apm-dai support Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 15:48   ` Pierre-Louis Bossart
2021-09-06 16:42     ` Srinivas Kandagatla
2021-09-03 11:20 ` [PATCH v5 19/21] ASoC: qdsp6: audioreach: add q6apm lpass dai support Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 15:53   ` Pierre-Louis Bossart
2021-09-06 16:29     ` Srinivas Kandagatla
2021-09-03 11:20 ` [PATCH v5 20/21] ASoC: qdsp6: audioreach: add q6prm support Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla
2021-09-03 15:57   ` Pierre-Louis Bossart
2021-09-06 16:29     ` Srinivas Kandagatla
2021-09-03 11:20 ` [PATCH v5 21/21] ASoC: qdsp6: audioreach: add support for q6prm-clocks Srinivas Kandagatla
2021-09-03 11:20   ` Srinivas Kandagatla

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=20210903112032.25834-5-srinivas.kandagatla@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=perex@perex.cz \
    --cc=plai@codeaurora.org \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.de \
    /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.