xref: /freebsd/sys/contrib/device-tree/Bindings/soundwire/qcom,sdw.txt (revision 79ac3c12a714bcd3f2354c52d948aed9575c46d6)
1Qualcomm SoundWire Controller Bindings
2
3
4This binding describes the Qualcomm SoundWire Controller along with its
5board 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- reg:
17	Usage: required
18	Value type: <prop-encoded-array>
19	Definition: the base address and size of SoundWire controller
20		    address space.
21
22- interrupts:
23	Usage: required
24	Value type: <prop-encoded-array>
25	Definition: should specify the SoundWire Controller IRQ
26
27- clock-names:
28	Usage: required
29	Value type: <stringlist>
30	Definition: should be "iface" for SoundWire Controller interface clock
31
32- clocks:
33	Usage: required
34	Value type: <prop-encoded-array>
35	Definition: should specify the SoundWire Controller interface clock
36
37- #sound-dai-cells:
38	Usage: required
39	Value type: <u32>
40	Definition: must be 1 for digital audio interfaces on the controller.
41
42- qcom,dout-ports:
43	Usage: required
44	Value type: <u32>
45	Definition: must be count of data out ports
46
47- qcom,din-ports:
48	Usage: required
49	Value type: <u32>
50	Definition: must be count of data in ports
51
52- qcom,ports-offset1:
53	Usage: required
54	Value type: <prop-encoded-array>
55	Definition: should specify payload transport window offset1 of each
56		    data port. Out ports followed by In ports.
57		    More info in MIPI Alliance SoundWire 1.0 Specifications.
58
59- qcom,ports-offset2:
60	Usage: required
61	Value type: <prop-encoded-array>
62	Definition: should specify payload transport window offset2 of each
63		    data port. Out ports followed by In ports.
64		    More info in MIPI Alliance SoundWire 1.0 Specifications.
65
66- qcom,ports-sinterval-low:
67	Usage: required
68	Value type: <prop-encoded-array>
69	Definition: should be sample interval low of each data port.
70		    Out ports followed by In ports. Used for Sample Interval
71		    calculation.
72		    More info in MIPI Alliance SoundWire 1.0 Specifications.
73
74- qcom,ports-word-length:
75	Usage: optional
76	Value type: <prop-encoded-array>
77	Definition: should be size of payload channel sample.
78		    More info in MIPI Alliance SoundWire 1.0 Specifications.
79
80- qcom,ports-block-pack-mode:
81	Usage: optional
82	Value type: <prop-encoded-array>
83	Definition: should be 0 or 1 to indicate the block packing mode.
84		    0 to indicate Blocks are per Channel
85		    1 to indicate Blocks are per Port.
86		    Out ports followed by In ports.
87		    More info in MIPI Alliance SoundWire 1.0 Specifications.
88
89- qcom,ports-block-group-count:
90	Usage: optional
91	Value type: <prop-encoded-array>
92	Definition: should be in range 1 to 4 to indicate how many sample
93		    intervals are combined into a payload.
94		    Out ports followed by In ports.
95		    More info in MIPI Alliance SoundWire 1.0 Specifications.
96
97- qcom,ports-lane-control:
98	Usage: optional
99	Value type: <prop-encoded-array>
100	Definition: should be in range 0 to 7 to identify which	data lane
101		    the data port uses.
102		    Out ports followed by In ports.
103		    More info in MIPI Alliance SoundWire 1.0 Specifications.
104
105- qcom,ports-hstart:
106	Usage: optional
107	Value type: <prop-encoded-array>
108	Definition: should be number identifying lowerst numbered coloum in
109		    SoundWire Frame, i.e. left edge of the Transport sub-frame
110		    for each port. Values between 0 and 15 are valid.
111		    Out ports followed by In ports.
112		    More info in MIPI Alliance SoundWire 1.0 Specifications.
113
114- qcom,ports-hstop:
115	Usage: optional
116	Value type: <prop-encoded-array>
117	Definition: should be number identifying highest numbered coloum in
118		    SoundWire Frame, i.e. the right edge of the Transport
119		    sub-frame for each port. Values between 0 and 15 are valid.
120		    Out ports followed by In ports.
121		    More info in MIPI Alliance SoundWire 1.0 Specifications.
122
123- qcom,dports-type:
124	Usage: optional
125	Value type: <prop-encoded-array>
126	Definition: should be one of the following types
127		    0 for reduced port
128		    1 for simple ports
129		    2 for full port
130		    Out ports followed by In ports.
131		    More info in MIPI Alliance SoundWire 1.0 Specifications.
132
133Note:
134	More Information on detail of encoding of these fields can be
135found in MIPI Alliance SoundWire 1.0 Specifications.
136
137= SoundWire devices
138Each subnode of the bus represents SoundWire device attached to it.
139The properties of these nodes are defined by the individual bindings.
140
141= EXAMPLE
142The following example represents a SoundWire controller on DB845c board
143which has controller integrated inside WCD934x codec on SDM845 SoC.
144
145soundwire: soundwire@c85 {
146	compatible = "qcom,soundwire-v1.3.0";
147	reg = <0xc85 0x20>;
148	interrupts = <20 IRQ_TYPE_EDGE_RISING>;
149	clocks = <&wcc>;
150	clock-names = "iface";
151	#sound-dai-cells = <1>;
152	qcom,dports-type = <0>;
153	qcom,dout-ports	= <6>;
154	qcom,din-ports	= <2>;
155	qcom,ports-sinterval-low = /bits/ 8  <0x07 0x1F 0x3F 0x7 0x1F 0x3F 0x0F 0x0F>;
156	qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0C 0x6 0x12 0x0D 0x07 0x0A >;
157	qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1F 0x00 0x00 0x1F 0x00 0x00>;
158
159	/* Left Speaker */
160	left{
161		....
162	};
163
164	/* Right Speaker */
165	right{
166		....
167	};
168};
169