]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - Bindings/sound/qcom,lpass-cpu.yaml
Import device-tree files from Linux 6.2
[FreeBSD/FreeBSD.git] / Bindings / sound / qcom,lpass-cpu.yaml
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,lpass-cpu.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Qualcomm Technologies Inc. LPASS CPU dai driver
8
9 maintainers:
10   - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11   - Rohit kumar <rohitkr@codeaurora.org>
12
13 description: |
14   Qualcomm Technologies Inc. SOC Low-Power Audio SubSystem (LPASS) that consist
15   of MI2S interface for audio data transfer on external codecs. LPASS cpu driver
16   is a module to configure Low-Power Audio Interface(LPAIF) core registers
17   across different IP versions.
18
19 properties:
20   compatible:
21     enum:
22       - qcom,lpass-cpu
23       - qcom,apq8016-lpass-cpu
24       - qcom,sc7180-lpass-cpu
25       - qcom,sc7280-lpass-cpu
26
27   reg:
28     minItems: 1
29     maxItems: 6
30     description: LPAIF core registers
31
32   reg-names:
33     minItems: 1
34     maxItems: 6
35
36   clocks:
37     minItems: 3
38     maxItems: 7
39
40   clock-names:
41     minItems: 1
42     maxItems: 10
43
44   interrupts:
45     minItems: 1
46     maxItems: 4
47     description: LPAIF DMA buffer interrupt
48
49   interrupt-names:
50     minItems: 1
51     maxItems: 4
52
53   qcom,adsp:
54     $ref: /schemas/types.yaml#/definitions/phandle
55     description: Phandle for the audio DSP node
56
57   iommus:
58     minItems: 2
59     maxItems: 3
60     description: Phandle to apps_smmu node with sid mask
61
62   power-domains:
63     maxItems: 1
64
65   power-domain-names:
66     maxItems: 1
67
68   '#sound-dai-cells':
69     const: 1
70
71   '#address-cells':
72     const: 1
73
74   '#size-cells':
75     const: 0
76
77 patternProperties:
78   "^dai-link@[0-9a-f]$":
79     type: object
80     description: |
81       LPASS CPU dai node for each I2S device or Soundwire device. Bindings of each node
82       depends on the specific driver providing the functionality and
83       properties.
84     properties:
85       reg:
86         maxItems: 1
87         description: Must be one of the DAI ID
88
89       qcom,playback-sd-lines:
90         $ref: /schemas/types.yaml#/definitions/uint32-array
91         description: list of MI2S data lines for playback
92
93       qcom,capture-sd-lines:
94         $ref: /schemas/types.yaml#/definitions/uint32-array
95         description: list of MI2S data lines for capture
96
97     required:
98       - reg
99
100     additionalProperties: false
101
102 required:
103   - compatible
104   - reg
105   - reg-names
106   - clocks
107   - clock-names
108   - interrupts
109   - interrupt-names
110   - '#sound-dai-cells'
111
112 unevaluatedProperties: false
113
114 allOf:
115   - $ref: dai-common.yaml#
116   - if:
117       properties:
118         compatible:
119           contains:
120             const: qcom,lpass-cpu
121
122     then:
123       properties:
124         clock-names:
125           items:
126             - const: ahbix-clk
127             - const: mi2s-osr-clk
128             - const: mi2s-bit-clk
129
130   - if:
131       properties:
132         compatible:
133           contains:
134             const: qcom,apq8016-lpass-cpu
135
136     then:
137       properties:
138         clock-names:
139           items:
140             - const: ahbix-clk
141             - const: mi2s-bit-clk0
142             - const: mi2s-bit-clk1
143             - const: mi2s-bit-clk2
144             - const: mi2s-bit-clk3
145             - const: pcnoc-mport-clk
146             - const: pcnoc-sway-clk
147
148   - if:
149       properties:
150         compatible:
151           contains:
152             const: qcom,sc7180-lpass-cpu
153
154     then:
155       properties:
156         clock-names:
157           oneOf:
158             - items:   #for I2S
159                 - const: pcnoc-sway-clk
160                 - const: audio-core
161                 - const: mclk0
162                 - const: pcnoc-mport-clk
163                 - const: mi2s-bit-clk0
164                 - const: mi2s-bit-clk1
165             - items:   #for HDMI
166                 - const: pcnoc-sway-clk
167                 - const: audio-core
168                 - const: pcnoc-mport-clk
169         reg-names:
170           anyOf:
171             - items:   #for I2S
172                 - const: lpass-lpaif
173             - items:   #for I2S and HDMI
174                 - const: lpass-hdmiif
175                 - const: lpass-lpaif
176         interrupt-names:
177           anyOf:
178             - items:   #for I2S
179                 - const: lpass-irq-lpaif
180             - items:   #for I2S and HDMI
181                 - const: lpass-irq-lpaif
182                 - const: lpass-irq-hdmi
183       required:
184         - iommus
185         - power-domains
186
187   - if:
188       properties:
189         compatible:
190           contains:
191             const: qcom,sc7280-lpass-cpu
192
193     then:
194       properties:
195         clock-names:
196           oneOf:
197             - items:   #for I2S
198                 - const: aon_cc_audio_hm_h
199                 - const: audio_cc_ext_mclk0
200                 - const: core_cc_sysnoc_mport_core
201                 - const: core_cc_ext_if0_ibit
202                 - const: core_cc_ext_if1_ibit
203             - items:   #for Soundwire
204                 - const: aon_cc_audio_hm_h
205                 - const: audio_cc_codec_mem
206                 - const: audio_cc_codec_mem0
207                 - const: audio_cc_codec_mem1
208                 - const: audio_cc_codec_mem2
209                 - const: aon_cc_va_mem0
210             - items:   #for HDMI
211                 - const: core_cc_sysnoc_mport_core
212
213         reg-names:
214           anyOf:
215             - items:   #for I2S
216                 - const: lpass-lpaif
217             - items:   #for I2S and HDMI
218                 - const: lpass-hdmiif
219                 - const: lpass-lpaif
220             - items:   #for I2S, soundwire and HDMI
221                 - const: lpass-hdmiif
222                 - const: lpass-lpaif
223                 - const: lpass-rxtx-cdc-dma-lpm
224                 - const: lpass-rxtx-lpaif
225                 - const: lpass-va-lpaif
226                 - const: lpass-va-cdc-dma-lpm
227         interrupt-names:
228           anyOf:
229             - items:   #for I2S
230                 - const: lpass-irq-lpaif
231             - items:   #for I2S and HDMI
232                 - const: lpass-irq-lpaif
233                 - const: lpass-irq-hdmi
234             - items:   #for I2S, soundwire and HDMI
235                 - const: lpass-irq-lpaif
236                 - const: lpass-irq-hdmi
237                 - const: lpass-irq-vaif
238                 - const: lpass-irq-rxtxif
239         power-domain-names:
240           allOf:
241             - items:
242                 - const: lcx
243
244       required:
245         - iommus
246         - power-domains
247
248 examples:
249   - |
250     #include <dt-bindings/sound/sc7180-lpass.h>
251
252     soc {
253         #address-cells = <2>;
254         #size-cells = <2>;
255         lpass@62d80000 {
256             compatible = "qcom,sc7180-lpass-cpu";
257
258             reg = <0 0x62d87000 0 0x68000>,
259                   <0 0x62f00000 0 0x29000>;
260             reg-names = "lpass-hdmiif",
261                         "lpass-lpaif";
262             iommus = <&apps_smmu 0x1020 0>,
263                      <&apps_smmu 0x1032 0>;
264             power-domains = <&lpass_hm 0>;
265
266             clocks = <&gcc 131>,
267                  <&lpasscorecc 6>,
268                  <&lpasscorecc 7>,
269                  <&lpasscorecc 10>,
270                  <&lpasscorecc 8>,
271                  <&lpasscorecc 9>;
272
273             clock-names = "pcnoc-sway-clk", "audio-core",
274                           "mclk0", "pcnoc-mport-clk",
275                           "mi2s-bit-clk0", "mi2s-bit-clk1";
276
277             interrupts = <0 160 1>,
278                          <0 268 1>;
279             interrupt-names = "lpass-irq-lpaif",
280                               "lpass-irq-hdmi";
281             #sound-dai-cells = <1>;
282
283             #address-cells = <1>;
284             #size-cells = <0>;
285             /* Optional to set different MI2S SD lines */
286             dai-link@0 {
287                 reg = <MI2S_PRIMARY>;
288                 qcom,playback-sd-lines = <1>;
289                 qcom,capture-sd-lines = <0>;
290             };
291         };
292     };
293
294 ...