[PATCH v8 04/22] soc: dt-bindings: qcom: add gpr bindings
Srinivas Kandagatla
srinivas.kandagatla at linaro.org
Mon Sep 27 15:55:41 CEST 2021
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 at linaro.org>
Reviewed-by: Rob Herring <robh at kernel.org>
---
.../bindings/soc/qcom/qcom,apr.yaml | 41 +++++++++++++++----
include/dt-bindings/soc/qcom,gpr.h | 19 +++++++++
2 files changed, 53 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 bfe04fca8aa3..028c5d105adb 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 at 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
@@ -46,6 +47,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
@@ -53,12 +58,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:
@@ -67,9 +72,11 @@ patternProperties:
- qcom,q6asm
- qcom,q6afe
- qcom,q6adm
+ - qcom,q6apm
+ - qcom,q6prm
reg:
- minimum: 3
+ minimum: 1
maximum: 13
description:
APR Service ID
@@ -84,6 +91,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
@@ -148,3 +160,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 at 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..3107da59319c
--- /dev/null
+++ b/include/dt-bindings/soc/qcom,gpr.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+
+#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
More information about the Alsa-devel
mailing list