1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Qualcomm Technologies Inc. ASoC sound card drivers 8 9maintainers: 10 - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11 12description: 13 This bindings describes Qualcomm SoC based sound cards 14 which uses LPASS internal codec for audio. 15 16properties: 17 compatible: 18 oneOf: 19 - items: 20 - enum: 21 - lenovo,yoga-c630-sndcard 22 - qcom,db845c-sndcard 23 - const: qcom,sdm845-sndcard 24 - items: 25 - enum: 26 - qcom,sm8550-sndcard 27 - qcom,sm8650-sndcard 28 - const: qcom,sm8450-sndcard 29 - enum: 30 - qcom,apq8016-sbc-sndcard 31 - qcom,apq8096-sndcard 32 - qcom,msm8916-qdsp6-sndcard 33 - qcom,qcm6490-idp-sndcard 34 - qcom,qcs6490-rb3gen2-sndcard 35 - qcom,qrb5165-rb5-sndcard 36 - qcom,sc7180-qdsp6-sndcard 37 - qcom,sc8280xp-sndcard 38 - qcom,sdm845-sndcard 39 - qcom,sm8250-sndcard 40 - qcom,sm8450-sndcard 41 - qcom,x1e80100-sndcard 42 43 audio-routing: 44 $ref: /schemas/types.yaml#/definitions/non-unique-string-array 45 description: 46 A list of the connections between audio components. Each entry is a 47 pair of strings, the first being the connection's sink, the second 48 being the connection's source. Valid names could be power supplies, 49 MicBias of codec and the jacks on the board. 50 51 aux-devs: 52 $ref: /schemas/types.yaml#/definitions/phandle-array 53 description: | 54 List of phandles pointing to auxiliary devices, such 55 as amplifiers, to be added to the sound card. 56 57 model: 58 $ref: /schemas/types.yaml#/definitions/string 59 description: User visible long sound card name 60 61 pin-switches: 62 description: List of widget names for which pin switches should be created. 63 $ref: /schemas/types.yaml#/definitions/string-array 64 65 widgets: 66 description: User specified audio sound widgets. 67 $ref: /schemas/types.yaml#/definitions/non-unique-string-array 68 69 # Only valid for some compatibles (see allOf if below) 70 reg: true 71 reg-names: true 72 73patternProperties: 74 ".*-dai-link$": 75 description: 76 Each subnode represents a dai link. Subnodes of each dai links would be 77 cpu/codec dais. 78 79 type: object 80 81 properties: 82 link-name: 83 description: Indicates dai-link name and PCM stream name. 84 $ref: /schemas/types.yaml#/definitions/string 85 maxItems: 1 86 87 cpu: 88 description: Holds subnode which indicates cpu dai. 89 type: object 90 additionalProperties: false 91 92 properties: 93 sound-dai: 94 maxItems: 1 95 96 platform: 97 description: Holds subnode which indicates platform dai. 98 type: object 99 additionalProperties: false 100 101 properties: 102 sound-dai: 103 maxItems: 1 104 105 codec: 106 description: Holds subnode which indicates codec dai. 107 type: object 108 additionalProperties: false 109 110 properties: 111 sound-dai: 112 minItems: 1 113 maxItems: 8 114 115 required: 116 - link-name 117 - cpu 118 119 additionalProperties: false 120 121required: 122 - compatible 123 - model 124 125allOf: 126 - if: 127 properties: 128 compatible: 129 contains: 130 enum: 131 - qcom,apq8016-sbc-sndcard 132 - qcom,msm8916-qdsp6-sndcard 133 then: 134 properties: 135 reg: 136 items: 137 - description: Microphone I/O mux register address 138 - description: Speaker I/O mux register address 139 reg-names: 140 items: 141 - const: mic-iomux 142 - const: spkr-iomux 143 required: 144 - compatible 145 - model 146 - reg 147 - reg-names 148 else: 149 properties: 150 reg: false 151 reg-names: false 152 153additionalProperties: false 154 155examples: 156 157 - | 158 #include <dt-bindings/sound/qcom,q6afe.h> 159 #include <dt-bindings/sound/qcom,q6asm.h> 160 sound { 161 compatible = "qcom,qrb5165-rb5-sndcard"; 162 model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0"; 163 audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT", 164 "SpkrRight IN", "WSA_SPK2 OUT", 165 "VA DMIC0", "vdd-micb", 166 "VA DMIC1", "vdd-micb"; 167 168 mm1-dai-link { 169 link-name = "MultiMedia0"; 170 cpu { 171 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; 172 }; 173 }; 174 175 mm2-dai-link { 176 link-name = "MultiMedia2"; 177 cpu { 178 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>; 179 }; 180 }; 181 182 mm3-dai-link { 183 link-name = "MultiMedia3"; 184 cpu { 185 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; 186 }; 187 }; 188 189 hdmi-dai-link { 190 link-name = "HDMI Playback"; 191 cpu { 192 sound-dai = <&q6afedai TERTIARY_MI2S_RX>; 193 }; 194 195 platform { 196 sound-dai = <&q6routing>; 197 }; 198 199 codec { 200 sound-dai = <<9611_codec 0>; 201 }; 202 }; 203 204 wsa-dai-link { 205 link-name = "WSA Playback"; 206 cpu { 207 sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>; 208 }; 209 210 platform { 211 sound-dai = <&q6routing>; 212 }; 213 214 codec { 215 sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro>; 216 }; 217 }; 218 219 va-dai-link { 220 link-name = "VA Capture"; 221 cpu { 222 sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>; 223 }; 224 225 platform { 226 sound-dai = <&q6routing>; 227 }; 228 229 codec { 230 sound-dai = <&vamacro 0>; 231 }; 232 }; 233 }; 234 235 - | 236 #include <dt-bindings/sound/qcom,lpass.h> 237 sound@7702000 { 238 compatible = "qcom,apq8016-sbc-sndcard"; 239 reg = <0x07702000 0x4>, <0x07702004 0x4>; 240 reg-names = "mic-iomux", "spkr-iomux"; 241 242 model = "DB410c"; 243 audio-routing = 244 "AMIC2", "MIC BIAS Internal2", 245 "AMIC3", "MIC BIAS External1"; 246 247 pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>; 248 pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>; 249 pinctrl-names = "default", "sleep"; 250 251 quaternary-dai-link { 252 link-name = "ADV7533"; 253 cpu { 254 sound-dai = <&lpass MI2S_QUATERNARY>; 255 }; 256 codec { 257 sound-dai = <&adv_bridge 0>; 258 }; 259 }; 260 261 primary-dai-link { 262 link-name = "WCD"; 263 cpu { 264 sound-dai = <&lpass MI2S_PRIMARY>; 265 }; 266 codec { 267 sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; 268 }; 269 }; 270 271 tertiary-dai-link { 272 link-name = "WCD-Capture"; 273 cpu { 274 sound-dai = <&lpass MI2S_TERTIARY>; 275 }; 276 codec { 277 sound-dai = <&lpass_codec 1>, <&wcd_codec 1>; 278 }; 279 }; 280 }; 281 282 - | 283 #include <dt-bindings/sound/qcom,q6afe.h> 284 #include <dt-bindings/sound/qcom,q6asm.h> 285 sound@7702000 { 286 compatible = "qcom,msm8916-qdsp6-sndcard"; 287 reg = <0x07702000 0x4>, <0x07702004 0x4>; 288 reg-names = "mic-iomux", "spkr-iomux"; 289 290 model = "msm8916"; 291 widgets = 292 "Speaker", "Speaker", 293 "Headphone", "Headphones"; 294 pin-switches = "Speaker"; 295 audio-routing = 296 "Speaker", "Speaker Amp OUT", 297 "Speaker Amp IN", "HPH_R", 298 "Headphones", "HPH_L", 299 "Headphones", "HPH_R", 300 "AMIC1", "MIC BIAS Internal1", 301 "AMIC2", "MIC BIAS Internal2", 302 "AMIC3", "MIC BIAS Internal3"; 303 aux-devs = <&speaker_amp>; 304 305 pinctrl-names = "default", "sleep"; 306 pinctrl-0 = <&cdc_pdm_lines_act>; 307 pinctrl-1 = <&cdc_pdm_lines_sus>; 308 309 mm1-dai-link { 310 link-name = "MultiMedia1"; 311 cpu { 312 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; 313 }; 314 }; 315 316 primary-dai-link { 317 link-name = "Primary MI2S"; 318 cpu { 319 sound-dai = <&q6afedai PRIMARY_MI2S_RX>; 320 }; 321 platform { 322 sound-dai = <&q6routing>; 323 }; 324 codec { 325 sound-dai = <&lpass_codec 0>, <&wcd_codec 0>; 326 }; 327 }; 328 }; 329