ldb.txt 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. Device-Tree bindings for LVDS Display Bridge (ldb)
  2. LVDS Display Bridge
  3. ===================
  4. The LVDS Display Bridge device tree node contains up to two lvds-channel
  5. nodes describing each of the two LVDS encoder channels of the bridge.
  6. Required properties:
  7. - #address-cells : should be <1>
  8. - #size-cells : should be <0>
  9. - compatible : should be "fsl,imx53-ldb" or "fsl,imx6q-ldb".
  10. Both LDB versions are similar, but i.MX6 has an additional
  11. multiplexer in the front to select any of the four IPU display
  12. interfaces as input for each LVDS channel.
  13. - gpr : should be <&gpr> on i.MX53 and i.MX6q.
  14. The phandle points to the iomuxc-gpr region containing the LVDS
  15. control register.
  16. - clocks, clock-names : phandles to the LDB divider and selector clocks and to
  17. the display interface selector clocks, as described in
  18. Documentation/devicetree/bindings/clock/clock-bindings.txt
  19. The following clocks are expected on i.MX53:
  20. "di0_pll" - LDB LVDS channel 0 mux
  21. "di1_pll" - LDB LVDS channel 1 mux
  22. "di0" - LDB LVDS channel 0 gate
  23. "di1" - LDB LVDS channel 1 gate
  24. "di0_sel" - IPU1 DI0 mux
  25. "di1_sel" - IPU1 DI1 mux
  26. On i.MX6q the following additional clocks are needed:
  27. "di2_sel" - IPU2 DI0 mux
  28. "di3_sel" - IPU2 DI1 mux
  29. The needed clock numbers for each are documented in
  30. Documentation/devicetree/bindings/clock/imx5-clock.txt, and in
  31. Documentation/devicetree/bindings/clock/imx6q-clock.txt.
  32. Optional properties:
  33. - pinctrl-names : should be "default" on i.MX53, not used on i.MX6q
  34. - pinctrl-0 : a phandle pointing to LVDS pin settings on i.MX53,
  35. not used on i.MX6q
  36. - fsl,dual-channel : boolean. if it exists, only LVDS channel 0 should
  37. be configured - one input will be distributed on both outputs in dual
  38. channel mode
  39. LVDS Channel
  40. ============
  41. Each LVDS Channel has to contain either an of graph link to a panel device node
  42. or a display-timings node that describes the video timings for the connected
  43. LVDS display as well as the fsl,data-mapping and fsl,data-width properties.
  44. Required properties:
  45. - reg : should be <0> or <1>
  46. - port: Input and output port nodes with endpoint definitions as defined in
  47. Documentation/devicetree/bindings/graph.txt.
  48. On i.MX5, the internal two-input-multiplexer is used. Due to hardware
  49. limitations, only one input port (port@[0,1]) can be used for each channel
  50. (lvds-channel@[0,1], respectively).
  51. On i.MX6, there should be four input ports (port@[0-3]) that correspond
  52. to the four LVDS multiplexer inputs.
  53. A single output port (port@2 on i.MX5, port@4 on i.MX6) must be connected
  54. to a panel input port. Optionally, the output port can be left out if
  55. display-timings are used instead.
  56. Optional properties (required if display-timings are used):
  57. - display-timings : A node that describes the display timings as defined in
  58. Documentation/devicetree/bindings/video/display-timing.txt.
  59. - fsl,data-mapping : should be "spwg" or "jeida"
  60. This describes how the color bits are laid out in the
  61. serialized LVDS signal.
  62. - fsl,data-width : should be <18> or <24>
  63. example:
  64. gpr: iomuxc-gpr@53fa8000 {
  65. /* ... */
  66. };
  67. ldb: ldb@53fa8008 {
  68. #address-cells = <1>;
  69. #size-cells = <0>;
  70. compatible = "fsl,imx53-ldb";
  71. gpr = <&gpr>;
  72. clocks = <&clks IMX5_CLK_LDB_DI0_SEL>,
  73. <&clks IMX5_CLK_LDB_DI1_SEL>,
  74. <&clks IMX5_CLK_IPU_DI0_SEL>,
  75. <&clks IMX5_CLK_IPU_DI1_SEL>,
  76. <&clks IMX5_CLK_LDB_DI0_GATE>,
  77. <&clks IMX5_CLK_LDB_DI1_GATE>;
  78. clock-names = "di0_pll", "di1_pll",
  79. "di0_sel", "di1_sel",
  80. "di0", "di1";
  81. /* Using an of-graph endpoint link to connect the panel */
  82. lvds-channel@0 {
  83. #address-cells = <1>;
  84. #size-cells = <0>;
  85. reg = <0>;
  86. port@0 {
  87. reg = <0>;
  88. lvds0_in: endpoint {
  89. remote-endpoint = <&ipu_di0_lvds0>;
  90. };
  91. };
  92. port@2 {
  93. reg = <2>;
  94. lvds0_out: endpoint {
  95. remote-endpoint = <&panel_in>;
  96. };
  97. };
  98. };
  99. /* Using display-timings and fsl,data-mapping/width instead */
  100. lvds-channel@1 {
  101. #address-cells = <1>;
  102. #size-cells = <0>;
  103. reg = <1>;
  104. fsl,data-mapping = "spwg";
  105. fsl,data-width = <24>;
  106. display-timings {
  107. /* ... */
  108. };
  109. port@1 {
  110. reg = <1>;
  111. lvds1_in: endpoint {
  112. remote-endpoint = <&ipu_di1_lvds1>;
  113. };
  114. };
  115. };
  116. };
  117. panel: lvds-panel {
  118. /* ... */
  119. port {
  120. panel_in: endpoint {
  121. remote-endpoint = <&lvds0_out>;
  122. };
  123. };
  124. };