1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: "http://devicetree.org/schemas/soc/qcom/qcom,apr.yaml#" 5$schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 7title: Qualcomm APR/GPR (Asynchronous/Generic Packet Router) binding 8 9maintainers: 10 - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11 12description: | 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 used for audio/voice services on the QDSP. 16 17properties: 18 compatible: 19 enum: 20 - qcom,apr-v2 21 - qcom,gpr 22 23 power-domains: 24 maxItems: 1 25 26 qcom,apr-domain: 27 $ref: /schemas/types.yaml#/definitions/uint32 28 enum: [1, 2, 3, 4, 5, 6, 7] 29 description: 30 Selects the processor domain for apr 31 1 = APR simulator 32 2 = PC Domain 33 3 = Modem Domain 34 4 = ADSP Domain 35 5 = Application processor Domain 36 6 = Modem2 Domain 37 7 = Application Processor2 Domain 38 deprecated: true 39 40 qcom,domain: 41 $ref: /schemas/types.yaml#/definitions/uint32 42 minimum: 1 43 maximum: 7 44 description: 45 Selects the processor domain for apr 46 1 = APR simulator 47 2 = PC Domain 48 3 = Modem Domain 49 4 = ADSP Domain 50 5 = Application processor Domain 51 6 = Modem2 Domain 52 7 = Application Processor2 Domain 53 Selects the processor domain for gpr 54 1 = Modem Domain 55 2 = Audio DSP Domain 56 3 = Application Processor Domain 57 58 qcom,glink-channels: 59 $ref: /schemas/types.yaml#/definitions/string-array 60 description: Channel name used for the communication 61 maxItems: 1 62 63 qcom,intents: 64 $ref: /schemas/types.yaml#/definitions/uint32-array 65 description: 66 List of (size, amount) pairs describing what intents should be 67 preallocated for this virtual channel. This can be used to tweak the 68 default intents available for the channel to meet expectations of the 69 remote. 70 71 qcom,smd-channels: 72 $ref: /schemas/types.yaml#/definitions/string-array 73 description: Channel name used for the communication 74 items: 75 - const: apr_audio_svc 76 77 '#address-cells': 78 const: 1 79 80 '#size-cells': 81 const: 0 82 83patternProperties: 84 "^service@[1-9a-d]$": 85 type: object 86 $ref: /schemas/soc/qcom/qcom,apr-services.yaml 87 additionalProperties: true 88 description: 89 APR/GPR static port services. 90 91 properties: 92 compatible: 93 enum: 94 - qcom,q6core 95 - qcom,q6asm 96 - qcom,q6afe 97 - qcom,q6adm 98 - qcom,q6apm 99 - qcom,q6prm 100 101required: 102 - compatible 103 - qcom,domain 104 105allOf: 106 - if: 107 properties: 108 compatible: 109 enum: 110 - qcom,gpr 111 then: 112 properties: 113 qcom,glink-channels: 114 items: 115 - const: adsp_apps 116 power-domains: false 117 else: 118 properties: 119 qcom,glink-channels: 120 items: 121 - const: apr_audio_svc 122 123 - if: 124 required: 125 - qcom,glink-channels 126 then: 127 properties: 128 qcom,smd-channels: false 129 130 - if: 131 required: 132 - qcom,smd-channels 133 then: 134 properties: 135 qcom,glink-channels: false 136 137additionalProperties: false 138 139examples: 140 - | 141 #include <dt-bindings/soc/qcom,apr.h> 142 apr { 143 compatible = "qcom,apr-v2"; 144 qcom,domain = <APR_DOMAIN_ADSP>; 145 #address-cells = <1>; 146 #size-cells = <0>; 147 148 q6core: service@3 { 149 compatible = "qcom,q6core"; 150 reg = <APR_SVC_ADSP_CORE>; 151 qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; 152 }; 153 154 q6afe: service@4 { 155 compatible = "qcom,q6afe"; 156 reg = <APR_SVC_AFE>; 157 qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; 158 }; 159 160 q6asm: service@7 { 161 compatible = "qcom,q6asm"; 162 reg = <APR_SVC_ASM>; 163 qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; 164 }; 165 166 q6adm: service@8 { 167 compatible = "qcom,q6adm"; 168 reg = <APR_SVC_ADM>; 169 qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; 170 }; 171 }; 172 173 - | 174 #include <dt-bindings/soc/qcom,gpr.h> 175 gpr { 176 compatible = "qcom,gpr"; 177 qcom,domain = <GPR_DOMAIN_ID_ADSP>; 178 #address-cells = <1>; 179 #size-cells = <0>; 180 181 service@1 { 182 compatible = "qcom,q6apm"; 183 reg = <GPR_APM_MODULE_IID>; 184 qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; 185 }; 186 }; 187