xref: /freebsd/sys/contrib/device-tree/Bindings/sound/qcom,sm8250.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25def4c47SEmmanuel Vadot%YAML 1.2
35def4c47SEmmanuel Vadot---
45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
7e67e8565SEmmanuel Vadottitle: Qualcomm Technologies Inc. ASoC sound card drivers
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
105def4c47SEmmanuel Vadot  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
115def4c47SEmmanuel Vadot
125def4c47SEmmanuel Vadotdescription:
13e67e8565SEmmanuel Vadot  This bindings describes Qualcomm SoC based sound cards
145def4c47SEmmanuel Vadot  which uses LPASS internal codec for audio.
155def4c47SEmmanuel Vadot
165def4c47SEmmanuel Vadotproperties:
175def4c47SEmmanuel Vadot  compatible:
18cb7aa33aSEmmanuel Vadot    oneOf:
19cb7aa33aSEmmanuel Vadot      - items:
20cb7aa33aSEmmanuel Vadot          - enum:
21b97ee269SEmmanuel Vadot              - lenovo,yoga-c630-sndcard
22b97ee269SEmmanuel Vadot              - qcom,db845c-sndcard
23cb7aa33aSEmmanuel Vadot          - const: qcom,sdm845-sndcard
24*8d13bc63SEmmanuel Vadot      - items:
25*8d13bc63SEmmanuel Vadot          - enum:
26*8d13bc63SEmmanuel Vadot              - qcom,sm8550-sndcard
27*8d13bc63SEmmanuel Vadot              - qcom,sm8650-sndcard
28*8d13bc63SEmmanuel Vadot          - const: qcom,sm8450-sndcard
29cb7aa33aSEmmanuel Vadot      - enum:
30cb7aa33aSEmmanuel Vadot          - qcom,apq8016-sbc-sndcard
31e67e8565SEmmanuel Vadot          - qcom,msm8916-qdsp6-sndcard
327ef62cebSEmmanuel Vadot          - qcom,qrb5165-rb5-sndcard
3384943d6fSEmmanuel Vadot          - qcom,sc7180-qdsp6-sndcard
347ef62cebSEmmanuel Vadot          - qcom,sc8280xp-sndcard
35b97ee269SEmmanuel Vadot          - qcom,sdm845-sndcard
36354d7675SEmmanuel Vadot          - qcom,sm8250-sndcard
377ef62cebSEmmanuel Vadot          - qcom,sm8450-sndcard
38*8d13bc63SEmmanuel Vadot          - qcom,x1e80100-sndcard
395def4c47SEmmanuel Vadot
405def4c47SEmmanuel Vadot  audio-routing:
415def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
425def4c47SEmmanuel Vadot    description:
435def4c47SEmmanuel Vadot      A list of the connections between audio components. Each entry is a
445def4c47SEmmanuel Vadot      pair of strings, the first being the connection's sink, the second
455def4c47SEmmanuel Vadot      being the connection's source. Valid names could be power supplies,
465def4c47SEmmanuel Vadot      MicBias of codec and the jacks on the board.
475def4c47SEmmanuel Vadot
48e67e8565SEmmanuel Vadot  aux-devs:
49e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
50e67e8565SEmmanuel Vadot    description: |
51e67e8565SEmmanuel Vadot      List of phandles pointing to auxiliary devices, such
52e67e8565SEmmanuel Vadot      as amplifiers, to be added to the sound card.
53e67e8565SEmmanuel Vadot
545def4c47SEmmanuel Vadot  model:
555def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
565def4c47SEmmanuel Vadot    description: User visible long sound card name
575def4c47SEmmanuel Vadot
58e67e8565SEmmanuel Vadot  pin-switches:
59e67e8565SEmmanuel Vadot    description: List of widget names for which pin switches should be created.
60e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string-array
61e67e8565SEmmanuel Vadot
62e67e8565SEmmanuel Vadot  widgets:
63e67e8565SEmmanuel Vadot    description: User specified audio sound widgets.
64e67e8565SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
65e67e8565SEmmanuel Vadot
66e67e8565SEmmanuel Vadot  # Only valid for some compatibles (see allOf if below)
67e67e8565SEmmanuel Vadot  reg: true
68e67e8565SEmmanuel Vadot  reg-names: true
69e67e8565SEmmanuel Vadot
705def4c47SEmmanuel VadotpatternProperties:
715def4c47SEmmanuel Vadot  ".*-dai-link$":
725def4c47SEmmanuel Vadot    description:
735def4c47SEmmanuel Vadot      Each subnode represents a dai link. Subnodes of each dai links would be
745def4c47SEmmanuel Vadot      cpu/codec dais.
755def4c47SEmmanuel Vadot
765def4c47SEmmanuel Vadot    type: object
775def4c47SEmmanuel Vadot
785def4c47SEmmanuel Vadot    properties:
795def4c47SEmmanuel Vadot      link-name:
805def4c47SEmmanuel Vadot        description: Indicates dai-link name and PCM stream name.
815def4c47SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/string
825def4c47SEmmanuel Vadot        maxItems: 1
835def4c47SEmmanuel Vadot
845def4c47SEmmanuel Vadot      cpu:
855def4c47SEmmanuel Vadot        description: Holds subnode which indicates cpu dai.
865def4c47SEmmanuel Vadot        type: object
877ef62cebSEmmanuel Vadot        additionalProperties: false
887ef62cebSEmmanuel Vadot
895def4c47SEmmanuel Vadot        properties:
90c9ccf3a3SEmmanuel Vadot          sound-dai:
91c9ccf3a3SEmmanuel Vadot            maxItems: 1
925def4c47SEmmanuel Vadot
935def4c47SEmmanuel Vadot      platform:
945def4c47SEmmanuel Vadot        description: Holds subnode which indicates platform dai.
955def4c47SEmmanuel Vadot        type: object
967ef62cebSEmmanuel Vadot        additionalProperties: false
977ef62cebSEmmanuel Vadot
985def4c47SEmmanuel Vadot        properties:
99c9ccf3a3SEmmanuel Vadot          sound-dai:
100c9ccf3a3SEmmanuel Vadot            maxItems: 1
1015def4c47SEmmanuel Vadot
1025def4c47SEmmanuel Vadot      codec:
1035def4c47SEmmanuel Vadot        description: Holds subnode which indicates codec dai.
1045def4c47SEmmanuel Vadot        type: object
1057ef62cebSEmmanuel Vadot        additionalProperties: false
1067ef62cebSEmmanuel Vadot
1075def4c47SEmmanuel Vadot        properties:
108c9ccf3a3SEmmanuel Vadot          sound-dai:
109c9ccf3a3SEmmanuel Vadot            minItems: 1
110c9ccf3a3SEmmanuel Vadot            maxItems: 4
1115def4c47SEmmanuel Vadot
1125def4c47SEmmanuel Vadot    required:
1135def4c47SEmmanuel Vadot      - link-name
1145def4c47SEmmanuel Vadot      - cpu
1155def4c47SEmmanuel Vadot
1165def4c47SEmmanuel Vadot    additionalProperties: false
1175def4c47SEmmanuel Vadot
1185def4c47SEmmanuel Vadotrequired:
1195def4c47SEmmanuel Vadot  - compatible
1205def4c47SEmmanuel Vadot  - model
1215def4c47SEmmanuel Vadot
122e67e8565SEmmanuel VadotallOf:
123e67e8565SEmmanuel Vadot  - if:
124e67e8565SEmmanuel Vadot      properties:
125e67e8565SEmmanuel Vadot        compatible:
126e67e8565SEmmanuel Vadot          contains:
127e67e8565SEmmanuel Vadot            enum:
128e67e8565SEmmanuel Vadot              - qcom,apq8016-sbc-sndcard
129e67e8565SEmmanuel Vadot              - qcom,msm8916-qdsp6-sndcard
130e67e8565SEmmanuel Vadot    then:
131e67e8565SEmmanuel Vadot      properties:
132e67e8565SEmmanuel Vadot        reg:
133e67e8565SEmmanuel Vadot          items:
134e67e8565SEmmanuel Vadot            - description: Microphone I/O mux register address
135e67e8565SEmmanuel Vadot            - description: Speaker I/O mux register address
136e67e8565SEmmanuel Vadot        reg-names:
137e67e8565SEmmanuel Vadot          items:
138e67e8565SEmmanuel Vadot            - const: mic-iomux
139e67e8565SEmmanuel Vadot            - const: spkr-iomux
140e67e8565SEmmanuel Vadot      required:
141e67e8565SEmmanuel Vadot        - compatible
142e67e8565SEmmanuel Vadot        - model
143e67e8565SEmmanuel Vadot        - reg
144e67e8565SEmmanuel Vadot        - reg-names
145e67e8565SEmmanuel Vadot    else:
146e67e8565SEmmanuel Vadot      properties:
147e67e8565SEmmanuel Vadot        reg: false
148e67e8565SEmmanuel Vadot        reg-names: false
149e67e8565SEmmanuel Vadot
1505def4c47SEmmanuel VadotadditionalProperties: false
1515def4c47SEmmanuel Vadot
1525def4c47SEmmanuel Vadotexamples:
1535def4c47SEmmanuel Vadot
1545def4c47SEmmanuel Vadot  - |
1555def4c47SEmmanuel Vadot    #include <dt-bindings/sound/qcom,q6afe.h>
1565def4c47SEmmanuel Vadot    #include <dt-bindings/sound/qcom,q6asm.h>
1575def4c47SEmmanuel Vadot    sound {
1585def4c47SEmmanuel Vadot        compatible = "qcom,qrb5165-rb5-sndcard";
1595def4c47SEmmanuel Vadot        model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0";
1605def4c47SEmmanuel Vadot        audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
1615def4c47SEmmanuel Vadot                    "SpkrRight IN", "WSA_SPK2 OUT",
1625def4c47SEmmanuel Vadot                    "VA DMIC0", "vdd-micb",
163e67e8565SEmmanuel Vadot                    "VA DMIC1", "vdd-micb";
1645def4c47SEmmanuel Vadot
1655def4c47SEmmanuel Vadot        mm1-dai-link {
1665def4c47SEmmanuel Vadot            link-name = "MultiMedia0";
1675def4c47SEmmanuel Vadot            cpu {
1685def4c47SEmmanuel Vadot                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
1695def4c47SEmmanuel Vadot            };
1705def4c47SEmmanuel Vadot        };
1715def4c47SEmmanuel Vadot
1725def4c47SEmmanuel Vadot        mm2-dai-link {
1735def4c47SEmmanuel Vadot            link-name = "MultiMedia2";
1745def4c47SEmmanuel Vadot            cpu {
1755def4c47SEmmanuel Vadot                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
1765def4c47SEmmanuel Vadot            };
1775def4c47SEmmanuel Vadot        };
1785def4c47SEmmanuel Vadot
1795def4c47SEmmanuel Vadot        mm3-dai-link {
1805def4c47SEmmanuel Vadot            link-name = "MultiMedia3";
1815def4c47SEmmanuel Vadot            cpu {
1825def4c47SEmmanuel Vadot                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
1835def4c47SEmmanuel Vadot            };
1845def4c47SEmmanuel Vadot        };
1855def4c47SEmmanuel Vadot
1865def4c47SEmmanuel Vadot        hdmi-dai-link {
1875def4c47SEmmanuel Vadot            link-name = "HDMI Playback";
1885def4c47SEmmanuel Vadot            cpu {
1895def4c47SEmmanuel Vadot                sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
1905def4c47SEmmanuel Vadot            };
1915def4c47SEmmanuel Vadot
1925def4c47SEmmanuel Vadot            platform {
1935def4c47SEmmanuel Vadot                sound-dai = <&q6routing>;
1945def4c47SEmmanuel Vadot            };
1955def4c47SEmmanuel Vadot
1965def4c47SEmmanuel Vadot            codec {
1975def4c47SEmmanuel Vadot                sound-dai = <&lt9611_codec 0>;
1985def4c47SEmmanuel Vadot            };
1995def4c47SEmmanuel Vadot        };
2005def4c47SEmmanuel Vadot
2015def4c47SEmmanuel Vadot        wsa-dai-link {
2025def4c47SEmmanuel Vadot            link-name = "WSA Playback";
2035def4c47SEmmanuel Vadot            cpu {
2045def4c47SEmmanuel Vadot                sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
2055def4c47SEmmanuel Vadot            };
2065def4c47SEmmanuel Vadot
2075def4c47SEmmanuel Vadot            platform {
2085def4c47SEmmanuel Vadot                sound-dai = <&q6routing>;
2095def4c47SEmmanuel Vadot            };
2105def4c47SEmmanuel Vadot
2115def4c47SEmmanuel Vadot            codec {
2125def4c47SEmmanuel Vadot                sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro>;
2135def4c47SEmmanuel Vadot            };
2145def4c47SEmmanuel Vadot        };
2155def4c47SEmmanuel Vadot
2165def4c47SEmmanuel Vadot        va-dai-link {
2175def4c47SEmmanuel Vadot            link-name = "VA Capture";
2185def4c47SEmmanuel Vadot            cpu {
2195def4c47SEmmanuel Vadot                sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
2205def4c47SEmmanuel Vadot            };
2215def4c47SEmmanuel Vadot
2225def4c47SEmmanuel Vadot            platform {
2235def4c47SEmmanuel Vadot                sound-dai = <&q6routing>;
2245def4c47SEmmanuel Vadot            };
2255def4c47SEmmanuel Vadot
2265def4c47SEmmanuel Vadot            codec {
2275def4c47SEmmanuel Vadot                sound-dai = <&vamacro 0>;
2285def4c47SEmmanuel Vadot            };
2295def4c47SEmmanuel Vadot        };
2305def4c47SEmmanuel Vadot    };
231e67e8565SEmmanuel Vadot
232e67e8565SEmmanuel Vadot  - |
233e67e8565SEmmanuel Vadot    #include <dt-bindings/sound/qcom,lpass.h>
234e67e8565SEmmanuel Vadot    sound@7702000 {
235e67e8565SEmmanuel Vadot        compatible = "qcom,apq8016-sbc-sndcard";
236e67e8565SEmmanuel Vadot        reg = <0x07702000 0x4>, <0x07702004 0x4>;
237e67e8565SEmmanuel Vadot        reg-names = "mic-iomux", "spkr-iomux";
238e67e8565SEmmanuel Vadot
239e67e8565SEmmanuel Vadot        model = "DB410c";
240e67e8565SEmmanuel Vadot        audio-routing =
241e67e8565SEmmanuel Vadot            "AMIC2", "MIC BIAS Internal2",
242e67e8565SEmmanuel Vadot            "AMIC3", "MIC BIAS External1";
243e67e8565SEmmanuel Vadot
244e67e8565SEmmanuel Vadot        pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
245e67e8565SEmmanuel Vadot        pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
246e67e8565SEmmanuel Vadot        pinctrl-names = "default", "sleep";
247e67e8565SEmmanuel Vadot
248e67e8565SEmmanuel Vadot        quaternary-dai-link {
249e67e8565SEmmanuel Vadot            link-name = "ADV7533";
250e67e8565SEmmanuel Vadot            cpu {
251e67e8565SEmmanuel Vadot                sound-dai = <&lpass MI2S_QUATERNARY>;
252e67e8565SEmmanuel Vadot            };
253e67e8565SEmmanuel Vadot            codec {
254e67e8565SEmmanuel Vadot                sound-dai = <&adv_bridge 0>;
255e67e8565SEmmanuel Vadot            };
256e67e8565SEmmanuel Vadot        };
257e67e8565SEmmanuel Vadot
258e67e8565SEmmanuel Vadot        primary-dai-link {
259e67e8565SEmmanuel Vadot            link-name = "WCD";
260e67e8565SEmmanuel Vadot            cpu {
261e67e8565SEmmanuel Vadot                sound-dai = <&lpass MI2S_PRIMARY>;
262e67e8565SEmmanuel Vadot            };
263e67e8565SEmmanuel Vadot            codec {
264e67e8565SEmmanuel Vadot                sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
265e67e8565SEmmanuel Vadot            };
266e67e8565SEmmanuel Vadot        };
267e67e8565SEmmanuel Vadot
268e67e8565SEmmanuel Vadot        tertiary-dai-link {
269e67e8565SEmmanuel Vadot            link-name = "WCD-Capture";
270e67e8565SEmmanuel Vadot            cpu {
271e67e8565SEmmanuel Vadot                sound-dai = <&lpass MI2S_TERTIARY>;
272e67e8565SEmmanuel Vadot            };
273e67e8565SEmmanuel Vadot            codec {
274e67e8565SEmmanuel Vadot                sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
275e67e8565SEmmanuel Vadot            };
276e67e8565SEmmanuel Vadot        };
277e67e8565SEmmanuel Vadot    };
278e67e8565SEmmanuel Vadot
279e67e8565SEmmanuel Vadot  - |
280e67e8565SEmmanuel Vadot    #include <dt-bindings/sound/qcom,q6afe.h>
281e67e8565SEmmanuel Vadot    #include <dt-bindings/sound/qcom,q6asm.h>
282e67e8565SEmmanuel Vadot    sound@7702000 {
283e67e8565SEmmanuel Vadot        compatible = "qcom,msm8916-qdsp6-sndcard";
284e67e8565SEmmanuel Vadot        reg = <0x07702000 0x4>, <0x07702004 0x4>;
285e67e8565SEmmanuel Vadot        reg-names = "mic-iomux", "spkr-iomux";
286e67e8565SEmmanuel Vadot
287e67e8565SEmmanuel Vadot        model = "msm8916";
288e67e8565SEmmanuel Vadot        widgets =
289e67e8565SEmmanuel Vadot            "Speaker", "Speaker",
290e67e8565SEmmanuel Vadot            "Headphone", "Headphones";
291e67e8565SEmmanuel Vadot        pin-switches = "Speaker";
292e67e8565SEmmanuel Vadot        audio-routing =
293e67e8565SEmmanuel Vadot            "Speaker", "Speaker Amp OUT",
294e67e8565SEmmanuel Vadot            "Speaker Amp IN", "HPH_R",
295e67e8565SEmmanuel Vadot            "Headphones", "HPH_L",
296e67e8565SEmmanuel Vadot            "Headphones", "HPH_R",
297e67e8565SEmmanuel Vadot            "AMIC1", "MIC BIAS Internal1",
298e67e8565SEmmanuel Vadot            "AMIC2", "MIC BIAS Internal2",
299e67e8565SEmmanuel Vadot            "AMIC3", "MIC BIAS Internal3";
300e67e8565SEmmanuel Vadot        aux-devs = <&speaker_amp>;
301e67e8565SEmmanuel Vadot
302e67e8565SEmmanuel Vadot        pinctrl-names = "default", "sleep";
303e67e8565SEmmanuel Vadot        pinctrl-0 = <&cdc_pdm_lines_act>;
304e67e8565SEmmanuel Vadot        pinctrl-1 = <&cdc_pdm_lines_sus>;
305e67e8565SEmmanuel Vadot
306e67e8565SEmmanuel Vadot        mm1-dai-link {
307e67e8565SEmmanuel Vadot            link-name = "MultiMedia1";
308e67e8565SEmmanuel Vadot            cpu {
309e67e8565SEmmanuel Vadot                sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
310e67e8565SEmmanuel Vadot            };
311e67e8565SEmmanuel Vadot        };
312e67e8565SEmmanuel Vadot
313e67e8565SEmmanuel Vadot        primary-dai-link {
314e67e8565SEmmanuel Vadot            link-name = "Primary MI2S";
315e67e8565SEmmanuel Vadot            cpu {
316e67e8565SEmmanuel Vadot                sound-dai = <&q6afedai PRIMARY_MI2S_RX>;
317e67e8565SEmmanuel Vadot            };
318e67e8565SEmmanuel Vadot            platform {
319e67e8565SEmmanuel Vadot                sound-dai = <&q6routing>;
320e67e8565SEmmanuel Vadot            };
321e67e8565SEmmanuel Vadot            codec {
322e67e8565SEmmanuel Vadot                sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
323e67e8565SEmmanuel Vadot            };
324e67e8565SEmmanuel Vadot        };
325e67e8565SEmmanuel Vadot    };
326