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