Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc: dt-bindings: qcom: add gpr bindings

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>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20210927135559.738-5-srinivas.kandagatla@linaro.org

authored by

Srinivas Kandagatla and committed by
Bjorn Andersson
974c6faf 99139b80

+53 -7
+34 -7
Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
··· 4 4 $id: "http://devicetree.org/schemas/soc/qcom/qcom,apr.yaml#" 5 5 $schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 6 7 - title: Qualcomm APR (Asynchronous Packet Router) binding 7 + title: Qualcomm APR/GPR (Asynchronous/Generic Packet Router) binding 8 8 9 9 maintainers: 10 10 - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11 11 12 12 description: | 13 - This binding describes the Qualcomm APR, APR is a IPC protocol for 14 - communication between Application processor and QDSP. APR is mainly 13 + This binding describes the Qualcomm APR/GPR, APR/GPR is a IPC protocol for 14 + communication between Application processor and QDSP. APR/GPR is mainly 15 15 used for audio/voice services on the QDSP. 16 16 17 17 properties: 18 18 compatible: 19 19 enum: 20 20 - qcom,apr-v2 21 + - qcom,gpr 21 22 22 23 qcom,apr-domain: 23 24 $ref: /schemas/types.yaml#/definitions/uint32 ··· 47 46 5 = Application processor Domain 48 47 6 = Modem2 Domain 49 48 7 = Application Processor2 Domain 49 + Selects the processor domain for gpr 50 + 1 = Modem Domain 51 + 2 = Audio DSP Domain 52 + 3 = Application Processor Domain 50 53 51 54 '#address-cells': 52 55 const: 1 ··· 58 53 '#size-cells': 59 54 const: 0 60 55 61 - #APR Services 56 + #APR/GPR Services 62 57 patternProperties: 63 - "^service@[3-9a-d]$": 58 + "^service@[1-9a-d]$": 64 59 type: object 65 60 description: 66 - APR node's client devices use subnodes for desired static port services. 61 + APR/GPR node's client devices use subnodes for desired static port services. 67 62 68 63 properties: 69 64 compatible: ··· 72 67 - qcom,q6asm 73 68 - qcom,q6afe 74 69 - qcom,q6adm 70 + - qcom,q6apm 71 + - qcom,q6prm 75 72 76 73 reg: 77 - minimum: 3 74 + minimum: 1 78 75 maximum: 13 79 76 description: 80 77 APR Service ID ··· 91 84 11 = Core voice processor. 92 85 12 = Ultrasound stream manager. 93 86 13 = Listen stream manager. 87 + GPR Service ID 88 + 1 = Audio Process Manager Service 89 + 2 = Proxy Resource Manager Service. 90 + 3 = AMDB Service. 91 + 4 = Voice processing manager. 94 92 95 93 qcom,protection-domain: 96 94 $ref: /schemas/types.yaml#/definitions/string-array ··· 157 145 q6adm: service@8 { 158 146 compatible = "qcom,q6adm"; 159 147 reg = <APR_SVC_ADM>; 148 + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; 149 + }; 150 + }; 151 + 152 + - | 153 + #include <dt-bindings/soc/qcom,gpr.h> 154 + gpr { 155 + compatible = "qcom,gpr"; 156 + qcom,domain = <GPR_DOMAIN_ID_ADSP>; 157 + #address-cells = <1>; 158 + #size-cells = <0>; 159 + 160 + service@1 { 161 + compatible = "qcom,q6apm"; 162 + reg = <GPR_APM_MODULE_IID>; 160 163 qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; 161 164 }; 162 165 };
+19
include/dt-bindings/soc/qcom,gpr.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ 2 + 3 + #ifndef __DT_BINDINGS_QCOM_GPR_H 4 + #define __DT_BINDINGS_QCOM_GPR_H 5 + 6 + /* DOMAINS */ 7 + 8 + #define GPR_DOMAIN_ID_MODEM 1 9 + #define GPR_DOMAIN_ID_ADSP 2 10 + #define GPR_DOMAIN_ID_APPS 3 11 + 12 + /* Static Services */ 13 + 14 + #define GPR_APM_MODULE_IID 1 15 + #define GPR_PRM_MODULE_IID 2 16 + #define GPR_AMDB_MODULE_IID 3 17 + #define GPR_VCPM_MODULE_IID 4 18 + 19 + #endif /* __DT_BINDINGS_QCOM_GPR_H */