xref: /freebsd/sys/contrib/device-tree/Bindings/sound/qcom,q6afe.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1Qualcomm Audio Front End (Q6AFE) binding
2
3AFE is one of the APR audio service on Q6DSP
4Please refer to qcom,apr.txt for details of the common apr service bindings
5used 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
17subnode 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
41configuration 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
103apr-service@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		dai@1 {
114			reg = <HDMI_RX>;
115		};
116
117		dai@24 {
118			reg = <PRIMARY_TDM_RX_0>;
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		dai@25 {
129			reg = <PRIMARY_TDM_TX_0>;
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		dai@16 {
139			reg = <PRIMARY_MI2S_RX>;
140			qcom,sd-lines = <0 2>;
141		};
142
143		dai@17 {
144			reg = <PRIMARY_MI2S_TX>;
145			qcom,sd-lines = <1>;
146		};
147
148		dai@18 {
149			reg = <SECONDARY_MI2S_RX>;
150			qcom,sd-lines = <0 3>;
151		};
152
153		dai@19 {
154			reg = <SECONDARY_MI2S_TX>;
155			qcom,sd-lines = <1>;
156		};
157
158		dai@20 {
159			reg = <TERTIARY_MI2S_RX>;
160			qcom,sd-lines = <1 3>;
161		};
162
163		dai@21 {
164			reg = <TERTIARY_MI2S_TX>;
165			qcom,sd-lines = <0>;
166		};
167
168		dai@22 {
169			reg = <QUATERNARY_MI2S_RX>;
170			qcom,sd-lines = <0>;
171		};
172
173		dai@23 {
174			reg = <QUATERNARY_MI2S_TX>;
175			qcom,sd-lines = <1>;
176		};
177	};
178};
179