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