Merge tag 'powerpc-5.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / sound / qcom,q6afe.txt
1 Qualcomm Audio Front End (Q6AFE) binding
2
3 AFE is one of the APR audio service on Q6DSP
4 Please refer to qcom,apr.txt for details of the common apr service bindings
5 used by all apr services. Must contain the following properties.
6
7 - compatible:
8         Usage: required
9         Value type: <stringlist>
10         Definition: must be "qcom,q6afe-v<MAJOR-NUMBER>.<MINOR-NUMBER>"
11                   Or "qcom,q6afe" where the version number can be queried
12                   from DSP.
13                   example "qcom,q6afe"
14
15 = AFE DAIs (Digial Audio Interface)
16 "dais" subnode of the AFE node. It represents afe dais, each afe dai is a
17 subnode of "dais" representing board specific dai setup.
18 "dais" node should have following properties followed by dai children.
19
20 - compatible:
21         Usage: required
22         Value type: <stringlist>
23         Definition: must be "qcom,q6afe-dais"
24
25 - #sound-dai-cells
26         Usage: required
27         Value type: <u32>
28         Definition: Must be 1
29
30 - #address-cells
31         Usage: required
32         Value type: <u32>
33         Definition: Must be 1
34
35 - #size-cells
36         Usage: required
37         Value type: <u32>
38         Definition: Must be 0
39
40 == AFE DAI is subnode of "dais" and represent a dai, it includes board specific
41 configuration of each dai. Must contain the following properties.
42
43 - reg
44         Usage: required
45         Value type: <u32>
46         Definition: Must be dai id
47
48 - qcom,sd-lines
49         Usage: required for mi2s interface
50         Value type: <prop-encoded-array>
51         Definition: Must be list of serial data lines used by this dai.
52         should be one or more of the 0-3 sd lines.
53
54  - qcom,tdm-sync-mode:
55         Usage: required for tdm interface
56         Value type: <prop-encoded-array>
57         Definition: Synchronization mode.
58                 0 - Short sync bit mode
59                 1 - Long sync mode
60                 2 - Short sync slot mode
61
62  - qcom,tdm-sync-src:
63         Usage: required for tdm interface
64         Value type: <prop-encoded-array>
65         Definition: Synchronization source.
66                 0 - External source
67                 1 - Internal source
68
69  - qcom,tdm-data-out:
70         Usage: required for tdm interface
71         Value type: <prop-encoded-array>
72         Definition: Data out signal to drive with other masters.
73                 0 - Disable
74                 1 - Enable
75
76  - qcom,tdm-invert-sync:
77         Usage: required for tdm interface
78         Value type: <prop-encoded-array>
79         Definition: Invert the sync.
80                 0 - Normal
81                 1 - Invert
82
83  - qcom,tdm-data-delay:
84         Usage: required for tdm interface
85         Value type: <prop-encoded-array>
86         Definition: Number of bit clock to delay data
87                 with respect to sync edge.
88                 0 - 0 bit clock cycle
89                 1 - 1 bit clock cycle
90                 2 - 2 bit clock cycle
91
92  - qcom,tdm-data-align:
93         Usage: required for tdm interface
94         Value type: <prop-encoded-array>
95         Definition: Indicate how data is packed
96                 within the slot. For example, 32 slot width in case of
97                 sample bit width is 24.
98                 0 - MSB
99                 1 - LSB
100
101 = EXAMPLE
102
103 q6afe@4 {
104         compatible = "qcom,q6afe";
105         reg = <APR_SVC_AFE>;
106
107         dais {
108                 compatible = "qcom,q6afe-dais";
109                 #sound-dai-cells = <1>;
110                 #address-cells = <1>;
111                 #size-cells = <0>;
112
113                 hdmi@1 {
114                         reg = <1>;
115                 };
116
117                 tdm@24 {
118                         reg = <24>;
119                         qcom,tdm-sync-mode = <1>:
120                         qcom,tdm-sync-src = <1>;
121                         qcom,tdm-data-out = <0>;
122                         qcom,tdm-invert-sync = <1>;
123                         qcom,tdm-data-delay = <1>;
124                         qcom,tdm-data-align = <0>;
125
126                 };
127
128                 tdm@25 {
129                         reg = <25>;
130                         qcom,tdm-sync-mode = <1>:
131                         qcom,tdm-sync-src = <1>;
132                         qcom,tdm-data-out = <0>;
133                         qcom,tdm-invert-sync = <1>;
134                         qcom,tdm-data-delay <1>:
135                         qcom,tdm-data-align = <0>;
136                 };
137
138                 prim-mi2s-rx@16 {
139                         reg = <16>;
140                         qcom,sd-lines = <0 2>;
141                 };
142
143                 prim-mi2s-tx@17 {
144                         reg = <17>;
145                         qcom,sd-lines = <1>;
146                 };
147
148                 sec-mi2s-rx@18 {
149                         reg = <18>;
150                         qcom,sd-lines = <0 3>;
151                 };
152
153                 sec-mi2s-tx@19 {
154                         reg = <19>;
155                         qcom,sd-lines = <1>;
156                 };
157
158                 tert-mi2s-rx@20 {
159                         reg = <20>;
160                         qcom,sd-lines = <1 3>;
161                 };
162
163                 tert-mi2s-tx@21 {
164                         reg = <21>;
165                         qcom,sd-lines = <0>;
166                 };
167
168                 quat-mi2s-rx@22 {
169                         reg = <22>;
170                         qcom,sd-lines = <0>;
171                 };
172
173                 quat-mi2s-tx@23 {
174                         reg = <23>;
175                         qcom,sd-lines = <1>;
176                 };
177         };
178 };