1*c66ec88fSEmmanuel VadotMIPI DSI (Display Serial Interface) busses
2*c66ec88fSEmmanuel Vadot==========================================
3*c66ec88fSEmmanuel Vadot
4*c66ec88fSEmmanuel VadotThe MIPI Display Serial Interface specifies a serial bus and a protocol for
5*c66ec88fSEmmanuel Vadotcommunication between a host and up to four peripherals. This document will
6*c66ec88fSEmmanuel Vadotdefine the syntax used to represent a DSI bus in a device tree.
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel VadotThis document describes DSI bus-specific properties only or defines existing
9*c66ec88fSEmmanuel Vadotstandard properties in the context of the DSI bus.
10*c66ec88fSEmmanuel Vadot
11*c66ec88fSEmmanuel VadotEach DSI host provides a DSI bus. The DSI host controller's node contains a
12*c66ec88fSEmmanuel Vadotset of properties that characterize the bus. Child nodes describe individual
13*c66ec88fSEmmanuel Vadotperipherals on that bus.
14*c66ec88fSEmmanuel Vadot
15*c66ec88fSEmmanuel VadotThe following assumes that only a single peripheral is connected to a DSI
16*c66ec88fSEmmanuel Vadothost. Experience shows that this is true for the large majority of setups.
17*c66ec88fSEmmanuel Vadot
18*c66ec88fSEmmanuel VadotDSI host
19*c66ec88fSEmmanuel Vadot========
20*c66ec88fSEmmanuel Vadot
21*c66ec88fSEmmanuel VadotIn addition to the standard properties and those defined by the parent bus of
22*c66ec88fSEmmanuel Vadota DSI host, the following properties apply to a node representing a DSI host.
23*c66ec88fSEmmanuel Vadot
24*c66ec88fSEmmanuel VadotRequired properties:
25*c66ec88fSEmmanuel Vadot- #address-cells: The number of cells required to represent an address on the
26*c66ec88fSEmmanuel Vadot  bus. DSI peripherals are addressed using a 2-bit virtual channel number, so
27*c66ec88fSEmmanuel Vadot  a maximum of 4 devices can be addressed on a single bus. Hence the value of
28*c66ec88fSEmmanuel Vadot  this property should be 1.
29*c66ec88fSEmmanuel Vadot- #size-cells: Should be 0. There are cases where it makes sense to use a
30*c66ec88fSEmmanuel Vadot  different value here. See below.
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel VadotOptional properties:
33*c66ec88fSEmmanuel Vadot- clock-master: boolean. Should be enabled if the host is being used in
34*c66ec88fSEmmanuel Vadot  conjunction with another DSI host to drive the same peripheral. Hardware
35*c66ec88fSEmmanuel Vadot  supporting such a configuration generally requires the data on both the busses
36*c66ec88fSEmmanuel Vadot  to be driven by the same clock. Only the DSI host instance controlling this
37*c66ec88fSEmmanuel Vadot  clock should contain this property.
38*c66ec88fSEmmanuel Vadot
39*c66ec88fSEmmanuel VadotDSI peripheral
40*c66ec88fSEmmanuel Vadot==============
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel VadotPeripherals with DSI as control bus, or no control bus
43*c66ec88fSEmmanuel Vadot------------------------------------------------------
44*c66ec88fSEmmanuel Vadot
45*c66ec88fSEmmanuel VadotPeripherals with the DSI bus as the primary control bus, or peripherals with
46*c66ec88fSEmmanuel Vadotno control bus but use the DSI bus to transmit pixel data are represented
47*c66ec88fSEmmanuel Vadotas child nodes of the DSI host's node. Properties described here apply to all
48*c66ec88fSEmmanuel VadotDSI peripherals, but individual bindings may want to define additional,
49*c66ec88fSEmmanuel Vadotdevice-specific properties.
50*c66ec88fSEmmanuel Vadot
51*c66ec88fSEmmanuel VadotRequired properties:
52*c66ec88fSEmmanuel Vadot- reg: The virtual channel number of a DSI peripheral. Must be in the range
53*c66ec88fSEmmanuel Vadot  from 0 to 3.
54*c66ec88fSEmmanuel Vadot
55*c66ec88fSEmmanuel VadotSome DSI peripherals respond to more than a single virtual channel. In that
56*c66ec88fSEmmanuel Vadotcase two alternative representations can be chosen:
57*c66ec88fSEmmanuel Vadot- The reg property can take multiple entries, one for each virtual channel
58*c66ec88fSEmmanuel Vadot  that the peripheral responds to.
59*c66ec88fSEmmanuel Vadot- If the virtual channels that a peripheral responds to are consecutive, the
60*c66ec88fSEmmanuel Vadot  #size-cells can be set to 1. The first cell of each entry in the reg
61*c66ec88fSEmmanuel Vadot  property is the number of the first virtual channel and the second cell is
62*c66ec88fSEmmanuel Vadot  the number of consecutive virtual channels.
63*c66ec88fSEmmanuel Vadot
64*c66ec88fSEmmanuel VadotPeripherals with a different control bus
65*c66ec88fSEmmanuel Vadot----------------------------------------
66*c66ec88fSEmmanuel Vadot
67*c66ec88fSEmmanuel VadotThere are peripherals that have I2C/SPI (or some other non-DSI bus) as the
68*c66ec88fSEmmanuel Vadotprimary control bus, but are also connected to a DSI bus (mostly for the data
69*c66ec88fSEmmanuel Vadotpath). Connections between such peripherals and a DSI host can be represented
70*c66ec88fSEmmanuel Vadotusing the graph bindings [1], [2].
71*c66ec88fSEmmanuel Vadot
72*c66ec88fSEmmanuel VadotPeripherals that support dual channel DSI
73*c66ec88fSEmmanuel Vadot-----------------------------------------
74*c66ec88fSEmmanuel Vadot
75*c66ec88fSEmmanuel VadotPeripherals with higher bandwidth requirements can be connected to 2 DSI
76*c66ec88fSEmmanuel Vadotbusses. Each DSI bus/channel drives some portion of the pixel data (generally
77*c66ec88fSEmmanuel Vadotleft/right half of each line of the display, or even/odd lines of the display).
78*c66ec88fSEmmanuel VadotThe graph bindings should be used to represent the multiple DSI busses that are
79*c66ec88fSEmmanuel Vadotconnected to this peripheral. Each DSI host's output endpoint can be linked to
80*c66ec88fSEmmanuel Vadotan input endpoint of the DSI peripheral.
81*c66ec88fSEmmanuel Vadot
82*c66ec88fSEmmanuel Vadot[1] Documentation/devicetree/bindings/graph.txt
83*c66ec88fSEmmanuel Vadot[2] Documentation/devicetree/bindings/media/video-interfaces.txt
84*c66ec88fSEmmanuel Vadot
85*c66ec88fSEmmanuel VadotExamples
86*c66ec88fSEmmanuel Vadot========
87*c66ec88fSEmmanuel Vadot- (1), (2) and (3) are examples of a DSI host and peripheral on the DSI bus
88*c66ec88fSEmmanuel Vadot  with different virtual channel configurations.
89*c66ec88fSEmmanuel Vadot- (4) is an example of a peripheral on a I2C control bus connected to a
90*c66ec88fSEmmanuel Vadot  DSI host using of-graph bindings.
91*c66ec88fSEmmanuel Vadot- (5) is an example of 2 DSI hosts driving a dual-channel DSI peripheral,
92*c66ec88fSEmmanuel Vadot  which uses I2C as its primary control bus.
93*c66ec88fSEmmanuel Vadot
94*c66ec88fSEmmanuel Vadot1)
95*c66ec88fSEmmanuel Vadot	dsi-host {
96*c66ec88fSEmmanuel Vadot		...
97*c66ec88fSEmmanuel Vadot
98*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
99*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
100*c66ec88fSEmmanuel Vadot
101*c66ec88fSEmmanuel Vadot		/* peripheral responds to virtual channel 0 */
102*c66ec88fSEmmanuel Vadot		peripheral@0 {
103*c66ec88fSEmmanuel Vadot			compatible = "...";
104*c66ec88fSEmmanuel Vadot			reg = <0>;
105*c66ec88fSEmmanuel Vadot		};
106*c66ec88fSEmmanuel Vadot
107*c66ec88fSEmmanuel Vadot		...
108*c66ec88fSEmmanuel Vadot	};
109*c66ec88fSEmmanuel Vadot
110*c66ec88fSEmmanuel Vadot2)
111*c66ec88fSEmmanuel Vadot	dsi-host {
112*c66ec88fSEmmanuel Vadot		...
113*c66ec88fSEmmanuel Vadot
114*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
115*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
116*c66ec88fSEmmanuel Vadot
117*c66ec88fSEmmanuel Vadot		/* peripheral responds to virtual channels 0 and 2 */
118*c66ec88fSEmmanuel Vadot		peripheral@0 {
119*c66ec88fSEmmanuel Vadot			compatible = "...";
120*c66ec88fSEmmanuel Vadot			reg = <0, 2>;
121*c66ec88fSEmmanuel Vadot		};
122*c66ec88fSEmmanuel Vadot
123*c66ec88fSEmmanuel Vadot		...
124*c66ec88fSEmmanuel Vadot	};
125*c66ec88fSEmmanuel Vadot
126*c66ec88fSEmmanuel Vadot3)
127*c66ec88fSEmmanuel Vadot	dsi-host {
128*c66ec88fSEmmanuel Vadot		...
129*c66ec88fSEmmanuel Vadot
130*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
131*c66ec88fSEmmanuel Vadot		#size-cells = <1>;
132*c66ec88fSEmmanuel Vadot
133*c66ec88fSEmmanuel Vadot		/* peripheral responds to virtual channels 1, 2 and 3 */
134*c66ec88fSEmmanuel Vadot		peripheral@1 {
135*c66ec88fSEmmanuel Vadot			compatible = "...";
136*c66ec88fSEmmanuel Vadot			reg = <1 3>;
137*c66ec88fSEmmanuel Vadot		};
138*c66ec88fSEmmanuel Vadot
139*c66ec88fSEmmanuel Vadot		...
140*c66ec88fSEmmanuel Vadot	};
141*c66ec88fSEmmanuel Vadot
142*c66ec88fSEmmanuel Vadot4)
143*c66ec88fSEmmanuel Vadot	i2c-host {
144*c66ec88fSEmmanuel Vadot		...
145*c66ec88fSEmmanuel Vadot
146*c66ec88fSEmmanuel Vadot		dsi-bridge@35 {
147*c66ec88fSEmmanuel Vadot			compatible = "...";
148*c66ec88fSEmmanuel Vadot			reg = <0x35>;
149*c66ec88fSEmmanuel Vadot
150*c66ec88fSEmmanuel Vadot			ports {
151*c66ec88fSEmmanuel Vadot				...
152*c66ec88fSEmmanuel Vadot
153*c66ec88fSEmmanuel Vadot				port {
154*c66ec88fSEmmanuel Vadot					bridge_mipi_in: endpoint {
155*c66ec88fSEmmanuel Vadot						remote-endpoint = <&host_mipi_out>;
156*c66ec88fSEmmanuel Vadot					};
157*c66ec88fSEmmanuel Vadot				};
158*c66ec88fSEmmanuel Vadot			};
159*c66ec88fSEmmanuel Vadot		};
160*c66ec88fSEmmanuel Vadot	};
161*c66ec88fSEmmanuel Vadot
162*c66ec88fSEmmanuel Vadot	dsi-host {
163*c66ec88fSEmmanuel Vadot		...
164*c66ec88fSEmmanuel Vadot
165*c66ec88fSEmmanuel Vadot		ports {
166*c66ec88fSEmmanuel Vadot			...
167*c66ec88fSEmmanuel Vadot
168*c66ec88fSEmmanuel Vadot			port {
169*c66ec88fSEmmanuel Vadot				host_mipi_out: endpoint {
170*c66ec88fSEmmanuel Vadot					remote-endpoint = <&bridge_mipi_in>;
171*c66ec88fSEmmanuel Vadot				};
172*c66ec88fSEmmanuel Vadot			};
173*c66ec88fSEmmanuel Vadot		};
174*c66ec88fSEmmanuel Vadot	};
175*c66ec88fSEmmanuel Vadot
176*c66ec88fSEmmanuel Vadot5)
177*c66ec88fSEmmanuel Vadot	i2c-host {
178*c66ec88fSEmmanuel Vadot		dsi-bridge@35 {
179*c66ec88fSEmmanuel Vadot			compatible = "...";
180*c66ec88fSEmmanuel Vadot			reg = <0x35>;
181*c66ec88fSEmmanuel Vadot
182*c66ec88fSEmmanuel Vadot			ports {
183*c66ec88fSEmmanuel Vadot				#address-cells = <1>;
184*c66ec88fSEmmanuel Vadot				#size-cells = <0>;
185*c66ec88fSEmmanuel Vadot
186*c66ec88fSEmmanuel Vadot				port@0 {
187*c66ec88fSEmmanuel Vadot					reg = <0>;
188*c66ec88fSEmmanuel Vadot					dsi0_in: endpoint {
189*c66ec88fSEmmanuel Vadot						remote-endpoint = <&dsi0_out>;
190*c66ec88fSEmmanuel Vadot					};
191*c66ec88fSEmmanuel Vadot				};
192*c66ec88fSEmmanuel Vadot
193*c66ec88fSEmmanuel Vadot				port@1 {
194*c66ec88fSEmmanuel Vadot					reg = <1>;
195*c66ec88fSEmmanuel Vadot					dsi1_in: endpoint {
196*c66ec88fSEmmanuel Vadot						remote-endpoint = <&dsi1_out>;
197*c66ec88fSEmmanuel Vadot					};
198*c66ec88fSEmmanuel Vadot				};
199*c66ec88fSEmmanuel Vadot			};
200*c66ec88fSEmmanuel Vadot		};
201*c66ec88fSEmmanuel Vadot	};
202*c66ec88fSEmmanuel Vadot
203*c66ec88fSEmmanuel Vadot	dsi0-host {
204*c66ec88fSEmmanuel Vadot		...
205*c66ec88fSEmmanuel Vadot
206*c66ec88fSEmmanuel Vadot		/*
207*c66ec88fSEmmanuel Vadot		 * this DSI instance drives the clock for both the host
208*c66ec88fSEmmanuel Vadot		 * controllers
209*c66ec88fSEmmanuel Vadot		 */
210*c66ec88fSEmmanuel Vadot		clock-master;
211*c66ec88fSEmmanuel Vadot
212*c66ec88fSEmmanuel Vadot		ports {
213*c66ec88fSEmmanuel Vadot			...
214*c66ec88fSEmmanuel Vadot
215*c66ec88fSEmmanuel Vadot			port {
216*c66ec88fSEmmanuel Vadot				dsi0_out: endpoint {
217*c66ec88fSEmmanuel Vadot					remote-endpoint = <&dsi0_in>;
218*c66ec88fSEmmanuel Vadot				};
219*c66ec88fSEmmanuel Vadot			};
220*c66ec88fSEmmanuel Vadot		};
221*c66ec88fSEmmanuel Vadot	};
222*c66ec88fSEmmanuel Vadot
223*c66ec88fSEmmanuel Vadot	dsi1-host {
224*c66ec88fSEmmanuel Vadot		...
225*c66ec88fSEmmanuel Vadot
226*c66ec88fSEmmanuel Vadot		ports {
227*c66ec88fSEmmanuel Vadot			...
228*c66ec88fSEmmanuel Vadot
229*c66ec88fSEmmanuel Vadot			port {
230*c66ec88fSEmmanuel Vadot				dsi1_out: endpoint {
231*c66ec88fSEmmanuel Vadot					remote-endpoint = <&dsi1_in>;
232*c66ec88fSEmmanuel Vadot				};
233*c66ec88fSEmmanuel Vadot			};
234*c66ec88fSEmmanuel Vadot		};
235*c66ec88fSEmmanuel Vadot	};
236