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 qcom,glink-channels = "apr_audio_svc"; 146 qcom,intents = <512 20>; 147 #address-cells = <1>; 148 #size-cells = <0>; 149 150 q6core: service@3 { 151 compatible = "qcom,q6core"; 152 reg = <APR_SVC_ADSP_CORE>; 153 qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; 154 }; 155 156 service@4 { 157 compatible = "qcom,q6afe"; 158 reg = <APR_SVC_AFE>; 159 qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; 160 161 clock-controller { 162 compatible = "qcom,q6afe-clocks"; 163 #clock-cells = <2>; 164 }; 165 166 dais { 167 compatible = "qcom,q6afe-dais"; 168 #address-cells = <1>; 169 #size-cells = <0>; 170 #sound-dai-cells = <1>; 171 /* ... */ 172 }; 173 /* ... */ 174 }; 175 }; 176 177 - | 178 #include <dt-bindings/soc/qcom,gpr.h> 179 gpr { 180 compatible = "qcom,gpr"; 181 qcom,domain = <GPR_DOMAIN_ID_ADSP>; 182 qcom,glink-channels = "adsp_apps"; 183 qcom,intents = <512 20>; 184 #address-cells = <1>; 185 #size-cells = <0>; 186 187 service@1 { 188 compatible = "qcom,q6apm"; 189 reg = <GPR_APM_MODULE_IID>; 190 #sound-dai-cells = <0>; 191 qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; 192 193 dais { 194 compatible = "qcom,q6apm-dais"; 195 iommus = <&apps_smmu 0x1801 0x0>; 196 }; 197 198 bedais { 199 compatible = "qcom,q6apm-lpass-dais"; 200 #sound-dai-cells = <1>; 201 }; 202 }; 203 }; 204