xref: /freebsd/sys/contrib/device-tree/Bindings/sound/qcom,sm8250.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
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              - qcom,sm8750-sndcard
29          - const: qcom,sm8450-sndcard
30      - enum:
31          - fairphone,fp4-sndcard
32          - fairphone,fp5-sndcard
33          - qcom,apq8096-sndcard
34          - qcom,qcm6490-idp-sndcard
35          - qcom,qcs6490-rb3gen2-sndcard
36          - qcom,qcs8275-sndcard
37          - qcom,qcs9075-sndcard
38          - qcom,qcs9100-sndcard
39          - qcom,qrb4210-rb2-sndcard
40          - qcom,qrb5165-rb5-sndcard
41          - qcom,sc7180-qdsp6-sndcard
42          - qcom,sc8280xp-sndcard
43          - qcom,sdm845-sndcard
44          - qcom,sm8250-sndcard
45          - qcom,sm8450-sndcard
46          - qcom,x1e80100-sndcard
47
48  audio-routing:
49    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
50    description:
51      A list of the connections between audio components. Each entry is a
52      pair of strings, the first being the connection's sink, the second
53      being the connection's source. Valid names could be power supplies,
54      MicBias of codec and the jacks on the board.
55
56  aux-devs:
57    $ref: /schemas/types.yaml#/definitions/phandle-array
58    description: |
59      List of phandles pointing to auxiliary devices, such
60      as amplifiers, to be added to the sound card.
61
62  model:
63    $ref: /schemas/types.yaml#/definitions/string
64    description: User visible long sound card name
65
66patternProperties:
67  ".*-dai-link$":
68    description:
69      Each subnode represents a dai link. Subnodes of each dai links would be
70      cpu/codec dais.
71
72    type: object
73
74    properties:
75      link-name:
76        description: Indicates dai-link name and PCM stream name.
77        $ref: /schemas/types.yaml#/definitions/string
78        maxItems: 1
79
80      cpu:
81        description: Holds subnode which indicates cpu dai.
82        type: object
83        additionalProperties: false
84
85        properties:
86          sound-dai:
87            maxItems: 1
88
89      platform:
90        description: Holds subnode which indicates platform dai.
91        type: object
92        additionalProperties: false
93
94        properties:
95          sound-dai:
96            maxItems: 1
97
98      codec:
99        description: Holds subnode which indicates codec dai.
100        type: object
101        additionalProperties: false
102
103        properties:
104          sound-dai:
105            minItems: 1
106            maxItems: 8
107
108    required:
109      - link-name
110      - cpu
111
112    additionalProperties: false
113
114required:
115  - compatible
116  - model
117
118additionalProperties: false
119
120examples:
121
122  - |
123    #include <dt-bindings/sound/qcom,q6afe.h>
124    #include <dt-bindings/sound/qcom,q6asm.h>
125    sound {
126        compatible = "qcom,qrb5165-rb5-sndcard";
127        model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0";
128        audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
129                    "SpkrRight IN", "WSA_SPK2 OUT",
130                    "VA DMIC0", "vdd-micb",
131                    "VA DMIC1", "vdd-micb";
132
133        mm1-dai-link {
134            link-name = "MultiMedia0";
135            cpu {
136                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA1>;
137            };
138        };
139
140        mm2-dai-link {
141            link-name = "MultiMedia2";
142            cpu {
143                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA2>;
144            };
145        };
146
147        mm3-dai-link {
148            link-name = "MultiMedia3";
149            cpu {
150                sound-dai = <&q6asmdai  MSM_FRONTEND_DAI_MULTIMEDIA3>;
151            };
152        };
153
154        hdmi-dai-link {
155            link-name = "HDMI Playback";
156            cpu {
157                sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
158            };
159
160            platform {
161                sound-dai = <&q6routing>;
162            };
163
164            codec {
165                sound-dai = <&lt9611_codec 0>;
166            };
167        };
168
169        wsa-dai-link {
170            link-name = "WSA Playback";
171            cpu {
172                sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
173            };
174
175            platform {
176                sound-dai = <&q6routing>;
177            };
178
179            codec {
180                sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro>;
181            };
182        };
183
184        va-dai-link {
185            link-name = "VA Capture";
186            cpu {
187                sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
188            };
189
190            platform {
191                sound-dai = <&q6routing>;
192            };
193
194            codec {
195                sound-dai = <&vamacro 0>;
196            };
197        };
198
199        usb-dai-link {
200            link-name = "USB Playback";
201            cpu {
202                sound-dai = <&q6afedai USB_RX>;
203            };
204
205            codec {
206                sound-dai = <&usbdai USB_RX>;
207            };
208
209            platform {
210                sound-dai = <&q6routing>;
211            };
212        };
213    };
214