treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / Documentation / devicetree / bindings / sound / qcom,q6afe.txt
blobd74888b9f1bbfa4cd1fe3f17a6a1bbada817fe31
1 Qualcomm Audio Front End (Q6AFE) binding
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.
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"
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.
20 - compatible:
21         Usage: required
22         Value type: <stringlist>
23         Definition: must be "qcom,q6afe-dais"
25 - #sound-dai-cells
26         Usage: required
27         Value type: <u32>
28         Definition: Must be 1
30 - #address-cells
31         Usage: required
32         Value type: <u32>
33         Definition: Must be 1
35 - #size-cells
36         Usage: required
37         Value type: <u32>
38         Definition: Must be 0
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.
43 - reg
44         Usage: required
45         Value type: <u32>
46         Definition: Must be dai id
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.
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
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
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
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
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
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
101 = EXAMPLE
103 q6afe@4 {
104         compatible = "qcom,q6afe";
105         reg = <APR_SVC_AFE>;
107         dais {
108                 compatible = "qcom,q6afe-dais";
109                 #sound-dai-cells = <1>;
110                 #address-cells = <1>;
111                 #size-cells = <0>;
113                 hdmi@1 {
114                         reg = <1>;
115                 };
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>;
126                 };
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                 };
138                 prim-mi2s-rx@16 {
139                         reg = <16>;
140                         qcom,sd-lines = <0 2>;
141                 };
143                 prim-mi2s-tx@17 {
144                         reg = <17>;
145                         qcom,sd-lines = <1>;
146                 };
148                 sec-mi2s-rx@18 {
149                         reg = <18>;
150                         qcom,sd-lines = <0 3>;
151                 };
153                 sec-mi2s-tx@19 {
154                         reg = <19>;
155                         qcom,sd-lines = <1>;
156                 };
158                 tert-mi2s-rx@20 {
159                         reg = <20>;
160                         qcom,sd-lines = <1 3>;
161                 };
163                 tert-mi2s-tx@21 {
164                         reg = <21>;
165                         qcom,sd-lines = <0>;
166                 };
168                 quat-mi2s-rx@22 {
169                         reg = <22>;
170                         qcom,sd-lines = <0>;
171                 };
173                 quat-mi2s-tx@23 {
174                         reg = <23>;
175                         qcom,sd-lines = <1>;
176                 };
177         };