Debian Codegraph @

Documentation/devicetree/bindings/soundwire/qcom,soundwire.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/soundwire/qcom,soundwire.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Qualcomm SoundWire Controller
8
9 maintainers:
10 - Srinivas Kandagatla <[email protected]>
11 - Srinivasa Rao Mandadapu <[email protected]>
12
13 description:
14 The Qualcomm SoundWire controller along with its board specific bus parameters.
15
16 properties:
17 compatible:
18 oneOf:
19 - enum:
20 - qcom,soundwire-v1.3.0
21 - qcom,soundwire-v1.5.0
22 - qcom,soundwire-v1.5.1
23 - qcom,soundwire-v1.6.0
24 - qcom,soundwire-v1.7.0
25 - qcom,soundwire-v2.0.0
26 - qcom,soundwire-v3.1.0
27 - items:
28 - enum:
29 - qcom,soundwire-v2.1.0
30 - qcom,soundwire-v2.2.0
31 - const: qcom,soundwire-v2.0.0
32
33 reg:
34 maxItems: 1
35
36 interrupts:
37 minItems: 1
38 items:
39 - description: specify the SoundWire controller core.
40 - description: specify the Soundwire controller wake IRQ.
41
42 interrupt-names:
43 minItems: 1
44 items:
45 - const: core
46 - const: wakeup
47
48 clocks:
49 items:
50 - description: iface clock
51
52 clock-names:
53 items:
54 - const: iface
55
56 resets:
57 items:
58 - description: SWR_AUDIO_CGCR RESET
59
60 reset-names:
61 items:
62 - const: swr_audio_cgcr
63
64 '#sound-dai-cells':
65 const: 1
66
67 '#address-cells':
68 const: 2
69
70 '#size-cells':
71 const: 0
72
73 wakeup-source: true
74
75 qcom,din-ports:
76 $ref: /schemas/types.yaml#/definitions/uint32
77 description: count of data in ports
78 deprecated: true
79
80 qcom,dout-ports:
81 $ref: /schemas/types.yaml#/definitions/uint32
82 description: count of data out ports
83 deprecated: true
84
85 qcom,ports-word-length:
86 $ref: /schemas/types.yaml#/definitions/uint8-array
87 description:
88 Size of payload channel sample.
89 Value of 0xff indicates that this option is not implemented
90 or applicable for the respective data port.
91 More info in MIPI Alliance SoundWire 1.0 Specifications.
92 minItems: 3
93 maxItems: 16
94
95 qcom,ports-sinterval-low:
96 $ref: /schemas/types.yaml#/definitions/uint8-array
97 description:
98 Sample interval (only lowest byte) of each data port.
99 Out ports followed by In ports. Used for Sample Interval calculation.
100 Value of 0xff indicates that this option is not implemented
101 or applicable for the respective data port.
102 More info in MIPI Alliance SoundWire 1.0 Specifications.
103 minItems: 3
104 maxItems: 16
105
106 qcom,ports-sinterval:
107 $ref: /schemas/types.yaml#/definitions/uint16-array
108 description:
109 Sample interval of each data port.
110 Out ports followed by In ports. Used for Sample Interval calculation.
111 Value of 0xffff indicates that this option is not implemented
112 or applicable for the respective data port.
113 More info in MIPI Alliance SoundWire 1.0 Specifications.
114 minItems: 3
115 maxItems: 16
116
117 qcom,ports-offset1:
118 $ref: /schemas/types.yaml#/definitions/uint8-array
119 description:
120 Payload transport window offset1 of each data port.
121 Out ports followed by In ports.
122 Value of 0xff indicates that this option is not implemented
123 or applicable for the respective data port.
124 More info in MIPI Alliance SoundWire 1.0 Specifications.
125 minItems: 3
126 maxItems: 16
127
128 qcom,ports-offset2:
129 $ref: /schemas/types.yaml#/definitions/uint8-array
130 description:
131 Payload transport window offset2 of each data port.
132 Out ports followed by In ports.
133 Value of 0xff indicates that this option is not implemented
134 or applicable for the respective data port.
135 More info in MIPI Alliance SoundWire 1.0 Specifications.
136 minItems: 3
137 maxItems: 16
138
139 qcom,ports-lane-control:
140 $ref: /schemas/types.yaml#/definitions/uint8-array
141 description:
142 Identify which data lane the data port uses.
143 Out ports followed by In ports.
144 Value of 0xff indicates that this option is not implemented
145 or applicable for the respective data port.
146 More info in MIPI Alliance SoundWire 1.0 Specifications.
147 minItems: 3
148 maxItems: 16
149
150 qcom,ports-block-pack-mode:
151 $ref: /schemas/types.yaml#/definitions/uint8-array
152 description:
153 Indicate the block packing mode.
154 0 to indicate Blocks are per Channel
155 1 to indicate Blocks are per Port.
156 Out ports followed by In ports.
157 Value of 0xff indicates that this option is not implemented
158 or applicable for the respective data port.
159 More info in MIPI Alliance SoundWire 1.0 Specifications.
160 minItems: 3
161 maxItems: 16
162 items:
163 oneOf:
164 - minimum: 0
165 maximum: 1
166 - const: 0xff
167
168 qcom,ports-hstart:
169 $ref: /schemas/types.yaml#/definitions/uint8-array
170 description:
171 Identifying lowerst numbered column in SoundWire Frame,
172 i.e. left edge of the Transport sub-frame for each port.
173 Out ports followed by In ports.
174 Value of 0xff indicates that this option is not implemented
175 or applicable for the respective data port.
176 More info in MIPI Alliance SoundWire 1.0 Specifications.
177 minItems: 3
178 maxItems: 16
179 items:
180 oneOf:
181 - minimum: 0
182 maximum: 15
183 - const: 0xff
184
185 qcom,ports-hstop:
186 $ref: /schemas/types.yaml#/definitions/uint8-array
187 description:
188 Identifying highest numbered column in SoundWire Frame,
189 i.e. the right edge of the Transport
190 sub-frame for each port. Out ports followed by In ports.
191 Value of 0xff indicates that this option is not implemented
192 or applicable for the respective data port.
193 More info in MIPI Alliance SoundWire 1.0 Specifications.
194 minItems: 3
195 maxItems: 16
196 items:
197 oneOf:
198 - minimum: 0
199 maximum: 15
200 - const: 0xff
201
202 qcom,ports-block-group-count:
203 $ref: /schemas/types.yaml#/definitions/uint8-array
204 description:
205 In range 1 to 4 to indicate how many sample intervals are combined
206 into a payload. Out ports followed by In ports.
207 Value of 0xff indicates that this option is not implemented
208 or applicable for the respective data port.
209 More info in MIPI Alliance SoundWire 1.0 Specifications.
210 minItems: 3
211 maxItems: 16
212 items:
213 oneOf:
214 - minimum: 0
215 maximum: 4
216 - const: 0xff
217
218 label:
219 maxItems: 1
220
221 required:
222 - compatible
223 - reg
224 - interrupts
225 - clocks
226 - clock-names
227 - '#sound-dai-cells'
228 - '#address-cells'
229 - '#size-cells'
230 - qcom,ports-offset1
231 - qcom,ports-offset2
232
233 oneOf:
234 - required:
235 - qcom,ports-sinterval-low
236 - required:
237 - qcom,ports-sinterval
238
239 allOf:
240 - $ref: soundwire-controller.yaml#
241
242 unevaluatedProperties: false
243
244 examples:
245 - |
246 #include <dt-bindings/interrupt-controller/arm-gic.h>
247 #include <dt-bindings/interrupt-controller/irq.h>
248 #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h>
249
250 soundwire@3210000 {
251 compatible = "qcom,soundwire-v1.6.0";
252 reg = <0x03210000 0x2000>;
253
254 interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
255 <&pdc 130 IRQ_TYPE_LEVEL_HIGH>;
256
257 interrupt-names = "core", "wakeup";
258
259 clocks = <&lpass_rx_macro>;
260 clock-names = "iface";
261
262 resets = <&lpass_audiocc LPASS_AUDIO_SWR_RX_CGCR>;
263 reset-names = "swr_audio_cgcr";
264
265 qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff>;
266 qcom,ports-sinterval-low = /bits/ 8 <0x03 0x3f 0x1f 0x03 0x03>;
267 qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x01 0x01>;
268 qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00>;
269 qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>;
270 qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff>;
271 qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff>;
272 qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff>;
273 qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0x00>;
274
275 #sound-dai-cells = <1>;
276 #address-cells = <2>;
277 #size-cells = <0>;
278
279 codec@0,4 {
280 compatible = "sdw20217010d00";
281 reg = <0 4>;
282 qcom,rx-port-mapping = <1 2 3 4 5>;
283 };
284 };