mipi-dsi-bus.txt 5.7 KB

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