soundwire: cadence: use dai_runtime_array instead of dma_data
[linux-block.git] / Documentation / devicetree / bindings / soundwire / qcom,sdw.txt
1 Qualcomm SoundWire Controller Bindings
2
3
4 This binding describes the Qualcomm SoundWire Controller along with its
5 board specific bus parameters.
6
7 - compatible:
8         Usage: required
9         Value type: <stringlist>
10         Definition: must be "qcom,soundwire-v<MAJOR>.<MINOR>.<STEP>",
11                     Example:
12                         "qcom,soundwire-v1.3.0"
13                         "qcom,soundwire-v1.5.0"
14                         "qcom,soundwire-v1.5.1"
15                         "qcom,soundwire-v1.6.0"
16                         "qcom,soundwire-v1.7.0"
17 - reg:
18         Usage: required
19         Value type: <prop-encoded-array>
20         Definition: the base address and size of SoundWire controller
21                     address space.
22
23 - interrupts:
24         Usage: required
25         Value type: <prop-encoded-array>
26         Definition: should specify the SoundWire Controller core and optional
27                     wake IRQ
28
29 - interrupt-names:
30         Usage: Optional
31         Value type: boolean
32         Value type: <stringlist>
33         Definition: should be "core" for core and "wakeup" for wake interrupt.
34
35 - wakeup-source:
36         Usage: Optional
37         Value type: boolean
38         Definition: should specify if SoundWire Controller is wake up capable.
39
40 - clock-names:
41         Usage: required
42         Value type: <stringlist>
43         Definition: should be "iface" for SoundWire Controller interface clock
44
45 - clocks:
46         Usage: required
47         Value type: <prop-encoded-array>
48         Definition: should specify the SoundWire Controller interface clock
49
50 - #sound-dai-cells:
51         Usage: required
52         Value type: <u32>
53         Definition: must be 1 for digital audio interfaces on the controller.
54
55 - qcom,dout-ports:
56         Usage: required
57         Value type: <u32>
58         Definition: must be count of data out ports
59
60 - qcom,din-ports:
61         Usage: required
62         Value type: <u32>
63         Definition: must be count of data in ports
64
65 - qcom,ports-offset1:
66         Usage: required
67         Value type: <prop-encoded-array>
68         Definition: should specify payload transport window offset1 of each
69                     data port. Out ports followed by In ports.
70                     Value of 0xFF indicates that this option is not implemented
71                     or applicable for the respective data port.
72                     More info in MIPI Alliance SoundWire 1.0 Specifications.
73
74 - qcom,ports-offset2:
75         Usage: required
76         Value type: <prop-encoded-array>
77         Definition: should specify payload transport window offset2 of each
78                     data port. Out ports followed by In ports.
79                     Value of 0xFF indicates that this option is not implemented
80                     or applicable for the respective data port.
81                     More info in MIPI Alliance SoundWire 1.0 Specifications.
82
83 - qcom,ports-sinterval-low:
84         Usage: required
85         Value type: <prop-encoded-array>
86         Definition: should be sample interval low of each data port.
87                     Out ports followed by In ports. Used for Sample Interval
88                     calculation.
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
93 - qcom,ports-word-length:
94         Usage: optional
95         Value type: <prop-encoded-array>
96         Definition: should be size of payload channel sample.
97                     Value of 0xFF indicates that this option is not implemented
98                     or applicable for the respective data port.
99                     More info in MIPI Alliance SoundWire 1.0 Specifications.
100
101 - qcom,ports-block-pack-mode:
102         Usage: optional
103         Value type: <prop-encoded-array>
104         Definition: should be 0 or 1 to indicate the block packing mode.
105                     0 to indicate Blocks are per Channel
106                     1 to indicate Blocks are per Port.
107                     Out ports followed by In ports.
108                     Value of 0xFF indicates that this option is not implemented
109                     or applicable for the respective data port.
110                     More info in MIPI Alliance SoundWire 1.0 Specifications.
111
112 - qcom,ports-block-group-count:
113         Usage: optional
114         Value type: <prop-encoded-array>
115         Definition: should be in range 1 to 4 to indicate how many sample
116                     intervals are combined into a payload.
117                     Out ports followed by In ports.
118                     Value of 0xFF indicates that this option is not implemented
119                     or applicable for the respective data port.
120                     More info in MIPI Alliance SoundWire 1.0 Specifications.
121
122 - qcom,ports-lane-control:
123         Usage: optional
124         Value type: <prop-encoded-array>
125         Definition: should be in range 0 to 7 to identify which data lane
126                     the data port uses.
127                     Out ports followed by In ports.
128                     Value of 0xFF indicates that this option is not implemented
129                     or applicable for the respective data port.
130                     More info in MIPI Alliance SoundWire 1.0 Specifications.
131
132 - qcom,ports-hstart:
133         Usage: optional
134         Value type: <prop-encoded-array>
135         Definition: should be number identifying lowerst numbered coloum in
136                     SoundWire Frame, i.e. left edge of the Transport sub-frame
137                     for each port. Values between 0 and 15 are valid.
138                     Out ports followed by In ports.
139                     Value of 0xFF indicates that this option is not implemented
140                     or applicable for the respective data port.
141                     More info in MIPI Alliance SoundWire 1.0 Specifications.
142
143 - qcom,ports-hstop:
144         Usage: optional
145         Value type: <prop-encoded-array>
146         Definition: should be number identifying highest numbered coloum in
147                     SoundWire Frame, i.e. the right edge of the Transport
148                     sub-frame for each port. Values between 0 and 15 are valid.
149                     Out ports followed by In ports.
150                     Value of 0xFF indicates that this option is not implemented
151                     or applicable for the respective data port.
152                     More info in MIPI Alliance SoundWire 1.0 Specifications.
153
154 - qcom,dports-type:
155         Usage: optional
156         Value type: <prop-encoded-array>
157         Definition: should be one of the following types
158                     0 for reduced port
159                     1 for simple ports
160                     2 for full port
161                     Out ports followed by In ports.
162                     Value of 0xFF indicates that this option is not implemented
163                     or applicable for the respective data port.
164                     More info in MIPI Alliance SoundWire 1.0 Specifications.
165
166 - reset:
167         Usage: optional
168         Value type: <prop-encoded-array>
169         Definition: Should specify the SoundWire audio CSR reset controller interface,
170                     which is required for SoundWire version 1.6.0 and above.
171
172 - reset-names:
173         Usage: optional
174         Value type: <stringlist>
175         Definition: should be "swr_audio_cgcr" for SoundWire audio CSR reset
176                     controller interface.
177
178 Note:
179         More Information on detail of encoding of these fields can be
180 found in MIPI Alliance SoundWire 1.0 Specifications.
181
182 = SoundWire devices
183 Each subnode of the bus represents SoundWire device attached to it.
184 The properties of these nodes are defined by the individual bindings.
185
186 = EXAMPLE
187 The following example represents a SoundWire controller on DB845c board
188 which has controller integrated inside WCD934x codec on SDM845 SoC.
189
190 soundwire: soundwire@c85 {
191         compatible = "qcom,soundwire-v1.3.0";
192         reg = <0xc85 0x20>;
193         interrupts = <20 IRQ_TYPE_EDGE_RISING>;
194         clocks = <&wcc>;
195         clock-names = "iface";
196         resets = <&lpass_audiocc LPASS_AUDIO_SWR_TX_CGCR>;
197         reset-names = "swr_audio_cgcr";
198         #sound-dai-cells = <1>;
199         qcom,dports-type = <0>;
200         qcom,dout-ports = <6>;
201         qcom,din-ports  = <2>;
202         qcom,ports-sinterval-low = /bits/ 8  <0x07 0x1F 0x3F 0x7 0x1F 0x3F 0x0F 0x0F>;
203         qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0C 0x6 0x12 0x0D 0x07 0x0A >;
204         qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1F 0x00 0x00 0x1F 0x00 0x00>;
205
206         /* Left Speaker */
207         left{
208                 ....
209         };
210
211         /* Right Speaker */
212         right{
213                 ....
214         };
215 };