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