summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
blob: 2ab6871e89e5e03eb34071edb9f11c471533cd60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Technologies Inc. ASoC sound card drivers

maintainers:
  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

description:
  This bindings describes Qualcomm SoC based sound cards
  which uses LPASS internal codec for audio.

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - lenovo,yoga-c630-sndcard
              - qcom,db845c-sndcard
          - const: qcom,sdm845-sndcard
      - items:
          - enum:
              - qcom,sm8550-sndcard
              - qcom,sm8650-sndcard
          - const: qcom,sm8450-sndcard
      - enum:
          - qcom,apq8016-sbc-sndcard
          - qcom,msm8916-qdsp6-sndcard
          - qcom,qrb5165-rb5-sndcard
          - qcom,sc7180-qdsp6-sndcard
          - qcom,sc8280xp-sndcard
          - qcom,sdm845-sndcard
          - qcom,sm8250-sndcard
          - qcom,sm8450-sndcard
          - qcom,x1e80100-sndcard

  audio-routing:
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
    description:
      A list of the connections between audio components. Each entry is a
      pair of strings, the first being the connection's sink, the second
      being the connection's source. Valid names could be power supplies,
      MicBias of codec and the jacks on the board.

  aux-devs:
    $ref: /schemas/types.yaml#/definitions/phandle-array
    description: |
      List of phandles pointing to auxiliary devices, such
      as amplifiers, to be added to the sound card.

  model:
    $ref: /schemas/types.yaml#/definitions/string
    description: User visible long sound card name

  pin-switches:
    description: List of widget names for which pin switches should be created.
    $ref: /schemas/types.yaml#/definitions/string-array

  widgets:
    description: User specified audio sound widgets.
    $ref: /schemas/types.yaml#/definitions/non-unique-string-array

  # Only valid for some compatibles (see allOf if below)
  reg: true
  reg-names: true

patternProperties:
  ".*-dai-link$":
    description:
      Each subnode represents a dai link. Subnodes of each dai links would be
      cpu/codec dais.

    type: object

    properties:
      link-name:
        description: Indicates dai-link name and PCM stream name.
        $ref: /schemas/types.yaml#/definitions/string
        maxItems: 1

      cpu:
        description: Holds subnode which indicates cpu dai.
        type: object
        additionalProperties: false

        properties:
          sound-dai:
            maxItems: 1

      platform:
        description: Holds subnode which indicates platform dai.
        type: object
        additionalProperties: false

        properties:
          sound-dai:
            maxItems: 1

      codec:
        description: Holds subnode which indicates codec dai.
        type: object
        additionalProperties: false

        properties:
          sound-dai:
            minItems: 1
            maxItems: 8

    required:
      - link-name
      - cpu

    additionalProperties: false

required:
  - compatible
  - model

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,apq8016-sbc-sndcard
              - qcom,msm8916-qdsp6-sndcard
    then:
      properties:
        reg:
          items:
            - description: Microphone I/O mux register address
            - description: Speaker I/O mux register address
        reg-names:
          items:
            - const: mic-iomux
            - const: spkr-iomux
      required:
        - compatible
        - model
        - reg
        - reg-names
    else:
      properties:
        reg: false
        reg-names: false

additionalProperties: false

examples:

  - |
    #include <dt-bindings/sound/qcom,q6afe.h>
    #include <dt-bindings/sound/qcom,q6asm.h>
    sound {
        compatible = "qcom,qrb5165-rb5-sndcard";
        model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0";
        audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
                    "SpkrRight IN", "WSA_SPK2 OUT",
                    "VA DMIC0", "vdd-micb",
                    "VA DMIC1", "vdd-micb";

        mm1-dai-link {
            link-name = "MultiMedia0";
            cpu {
                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
            };
        };

        mm2-dai-link {
            link-name = "MultiMedia2";
            cpu {
                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
            };
        };

        mm3-dai-link {
            link-name = "MultiMedia3";
            cpu {
                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
            };
        };

        hdmi-dai-link {
            link-name = "HDMI Playback";
            cpu {
                sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
            };

            platform {
                sound-dai = <&q6routing>;
            };

            codec {
                sound-dai = <&lt9611_codec 0>;
            };
        };

        wsa-dai-link {
            link-name = "WSA Playback";
            cpu {
                sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
            };

            platform {
                sound-dai = <&q6routing>;
            };

            codec {
                sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro>;
            };
        };

        va-dai-link {
            link-name = "VA Capture";
            cpu {
                sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
            };

            platform {
                sound-dai = <&q6routing>;
            };

            codec {
                sound-dai = <&vamacro 0>;
            };
        };
    };

  - |
    #include <dt-bindings/sound/qcom,lpass.h>
    sound@7702000 {
        compatible = "qcom,apq8016-sbc-sndcard";
        reg = <0x07702000 0x4>, <0x07702004 0x4>;
        reg-names = "mic-iomux", "spkr-iomux";

        model = "DB410c";
        audio-routing =
            "AMIC2", "MIC BIAS Internal2",
            "AMIC3", "MIC BIAS External1";

        pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
        pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
        pinctrl-names = "default", "sleep";

        quaternary-dai-link {
            link-name = "ADV7533";
            cpu {
                sound-dai = <&lpass MI2S_QUATERNARY>;
            };
            codec {
                sound-dai = <&adv_bridge 0>;
            };
        };

        primary-dai-link {
            link-name = "WCD";
            cpu {
                sound-dai = <&lpass MI2S_PRIMARY>;
            };
            codec {
                sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
            };
        };

        tertiary-dai-link {
            link-name = "WCD-Capture";
            cpu {
                sound-dai = <&lpass MI2S_TERTIARY>;
            };
            codec {
                sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
            };
        };
    };

  - |
    #include <dt-bindings/sound/qcom,q6afe.h>
    #include <dt-bindings/sound/qcom,q6asm.h>
    sound@7702000 {
        compatible = "qcom,msm8916-qdsp6-sndcard";
        reg = <0x07702000 0x4>, <0x07702004 0x4>;
        reg-names = "mic-iomux", "spkr-iomux";

        model = "msm8916";
        widgets =
            "Speaker", "Speaker",
            "Headphone", "Headphones";
        pin-switches = "Speaker";
        audio-routing =
            "Speaker", "Speaker Amp OUT",
            "Speaker Amp IN", "HPH_R",
            "Headphones", "HPH_L",
            "Headphones", "HPH_R",
            "AMIC1", "MIC BIAS Internal1",
            "AMIC2", "MIC BIAS Internal2",
            "AMIC3", "MIC BIAS Internal3";
        aux-devs = <&speaker_amp>;

        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&cdc_pdm_lines_act>;
        pinctrl-1 = <&cdc_pdm_lines_sus>;

        mm1-dai-link {
            link-name = "MultiMedia1";
            cpu {
                sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
            };
        };

        primary-dai-link {
            link-name = "Primary MI2S";
            cpu {
                sound-dai = <&q6afedai PRIMARY_MI2S_RX>;
            };
            platform {
                sound-dai = <&q6routing>;
            };
            codec {
                sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
            };
        };
    };