xref: /linux/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
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. SM8250 ASoC sound card driver
8
9maintainers:
10  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11
12description:
13  This bindings describes SC8250 SoC based sound cards
14  which uses LPASS internal codec for audio.
15
16properties:
17  compatible:
18    oneOf:
19      - const: qcom,sm8250-sndcard
20      - const: qcom,qrb5165-rb5-sndcard
21
22  audio-routing:
23    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
24    description:
25      A list of the connections between audio components. Each entry is a
26      pair of strings, the first being the connection's sink, the second
27      being the connection's source. Valid names could be power supplies,
28      MicBias of codec and the jacks on the board.
29
30  model:
31    $ref: /schemas/types.yaml#/definitions/string
32    description: User visible long sound card name
33
34patternProperties:
35  ".*-dai-link$":
36    description:
37      Each subnode represents a dai link. Subnodes of each dai links would be
38      cpu/codec dais.
39
40    type: object
41
42    properties:
43      link-name:
44        description: Indicates dai-link name and PCM stream name.
45        $ref: /schemas/types.yaml#/definitions/string
46        maxItems: 1
47
48      cpu:
49        description: Holds subnode which indicates cpu dai.
50        type: object
51        properties:
52          sound-dai: true
53
54      platform:
55        description: Holds subnode which indicates platform dai.
56        type: object
57        properties:
58          sound-dai: true
59
60      codec:
61        description: Holds subnode which indicates codec dai.
62        type: object
63        properties:
64          sound-dai: true
65
66    required:
67      - link-name
68      - cpu
69
70    additionalProperties: false
71
72required:
73  - compatible
74  - model
75
76additionalProperties: false
77
78examples:
79
80  - |
81    #include <dt-bindings/sound/qcom,q6afe.h>
82    #include <dt-bindings/sound/qcom,q6asm.h>
83    sound {
84        compatible = "qcom,qrb5165-rb5-sndcard";
85        model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0";
86        audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
87                    "SpkrRight IN", "WSA_SPK2 OUT",
88                    "VA DMIC0", "vdd-micb",
89                    "VA DMIC1", "vdd-micb",
90                    "MM_DL1",  "MultiMedia1 Playback",
91                    "MM_DL2",  "MultiMedia2 Playback",
92                    "MultiMedia3 Capture", "MM_UL3";
93
94        mm1-dai-link {
95            link-name = "MultiMedia0";
96            cpu {
97                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
98            };
99        };
100
101        mm2-dai-link {
102            link-name = "MultiMedia2";
103            cpu {
104                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
105            };
106        };
107
108        mm3-dai-link {
109            link-name = "MultiMedia3";
110            cpu {
111                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
112            };
113        };
114
115        hdmi-dai-link {
116            link-name = "HDMI Playback";
117            cpu {
118                sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
119            };
120
121            platform {
122                sound-dai = <&q6routing>;
123            };
124
125            codec {
126                sound-dai = <&lt9611_codec 0>;
127            };
128        };
129
130        wsa-dai-link {
131            link-name = "WSA Playback";
132            cpu {
133                sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
134            };
135
136            platform {
137                sound-dai = <&q6routing>;
138            };
139
140            codec {
141                sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro>;
142            };
143        };
144
145        va-dai-link {
146            link-name = "VA Capture";
147            cpu {
148                sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
149            };
150
151            platform {
152                sound-dai = <&q6routing>;
153            };
154
155            codec {
156                sound-dai = <&vamacro 0>;
157            };
158        };
159    };
160