panel-edp.yaml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/display/panel/panel-edp.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Probeable (via DP AUX / EDID) eDP Panels with simple poweron sequences
  7. maintainers:
  8. - Douglas Anderson <dianders@chromium.org>
  9. description: |
  10. This binding file can be used to indicate that an eDP panel is connected
  11. to a Embedded DisplayPort AUX bus (see display/dp-aux-bus.yaml) without
  12. actually specifying exactly what panel is connected. This is useful for
  13. the case that more than one different panel could be connected to the
  14. board, either for second-sourcing purposes or to support multiple SKUs
  15. with different LCDs that hook up to a common board.
  16. As per above, a requirement for using this binding is that the panel is
  17. represented under the DP AUX bus. This means that we can use any
  18. information provided by the DP AUX bus (including the EDID) to identify
  19. the panel. We can use this to identify display size, resolution, and
  20. timings among other things.
  21. One piece of information about eDP panels that is typically _not_
  22. provided anywhere on the DP AUX bus is the power sequencing timings.
  23. This is the reason why, historically, we've always had to explicitly
  24. list eDP panels. We solve that here with two tricks. The "worst case"
  25. power on timings for any panels expected to be connected to a board are
  26. specified in these bindings. Once we've powered on, it's expected that
  27. the operating system will lookup the panel in a table (based on EDID
  28. information) to figure out other power sequencing timings.
  29. eDP panels in general can have somewhat arbitrary power sequencing
  30. requirements. However, even though it's arbitrary in general, the
  31. vast majority of panel datasheets have a power sequence diagram that
  32. looks the exactly the same as every other panel. Each panel datasheet
  33. cares about different timings in this diagram but the fact that the
  34. diagram is so similar means we can come up with a single driver to
  35. handle it.
  36. These diagrams all look roughly like this, sometimes labeled with
  37. slightly different numbers / lines but all pretty much the same
  38. sequence. This is because much of this diagram comes straight from
  39. the eDP Standard.
  40. __________________________________________________
  41. Vdd ___/: :\____ /
  42. _/ : : \_____/
  43. :<T1>:<T2>: :<--T10-->:<T11>:<T12>:
  44. : +-----------------------+---------+---------+
  45. eDP -----------+ Black video | Src vid | Blk vid +
  46. Display : +-----------------------+---------+---------+
  47. : _______________________:_________:_________:
  48. HPD :<T3>| : : |
  49. ___________| : : |_____________
  50. : : : :
  51. Sink +-----------------------:---------:---------+
  52. AUX CH -----------+ AUX Ch operational : : +-------------
  53. +-----------------------:---------:---------+
  54. : : : :
  55. :<T4>: :<T7>: : :
  56. Src main +------+------+--------------+---------+
  57. lnk data----------------+LnkTrn| Idle |Valid vid data| Idle/off+-------------
  58. +------+------+--------------+---------+
  59. : <T5> :<-T6->:<-T8->: :
  60. :__:<T9>:
  61. LED_EN | |
  62. _____________________________________| |____________________________
  63. : :
  64. __________:__:_
  65. PWM | : : |
  66. __________________________| : : |__________________________
  67. : : : :
  68. _____________:__________:__:_:______
  69. Bklight ____/: : : : : :\____
  70. power _______/ :<---T13---->: : : :<T16>: \______________
  71. (Vbl) :<T17>:<---------T14--------->: :<-T15->:<T18>:
  72. The above looks fairly complex but, as per above, each panel only cares
  73. about a subset of those timings.
  74. allOf:
  75. - $ref: panel-common.yaml#
  76. properties:
  77. compatible:
  78. const: edp-panel
  79. hpd-reliable-delay-ms:
  80. description:
  81. A fixed amount of time that must be waited after powering on the
  82. panel's power-supply before the HPD signal is a reliable way to know
  83. when the AUX channel is ready. This is useful for panels that glitch
  84. the HPD at the start of power-on. This value is not needed if HPD is
  85. always reliable for all panels that might be connected.
  86. hpd-absent-delay-ms:
  87. description:
  88. The panel specifies that HPD will be asserted this many milliseconds
  89. from power on (timing T3 in the diagram above). If we have no way to
  90. measure HPD then a fixed delay of this many milliseconds can be used.
  91. This can also be used as a timeout when waiting for HPD. Does not
  92. include the hpd-reliable-delay, so if hpd-reliable-delay was 80 ms
  93. and hpd-absent-delay was 200 ms then we'd do a fixed 80 ms delay and
  94. then we know HPD would assert in the next 120 ms. This value is not
  95. needed if HPD hooked up, either through a GPIO in the panel node or
  96. hooked up directly to the eDP controller.
  97. backlight: true
  98. enable-gpios: true
  99. port: true
  100. power-supply: true
  101. no-hpd: true
  102. hpd-gpios: true
  103. additionalProperties: false
  104. required:
  105. - compatible
  106. - power-supply
  107. examples:
  108. - |
  109. #include <dt-bindings/clock/qcom,rpmh.h>
  110. #include <dt-bindings/gpio/gpio.h>
  111. #include <dt-bindings/interrupt-controller/irq.h>
  112. i2c {
  113. #address-cells = <1>;
  114. #size-cells = <0>;
  115. bridge@2d {
  116. compatible = "ti,sn65dsi86";
  117. reg = <0x2d>;
  118. interrupt-parent = <&tlmm>;
  119. interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
  120. enable-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>;
  121. vpll-supply = <&src_pp1800_s4a>;
  122. vccio-supply = <&src_pp1800_s4a>;
  123. vcca-supply = <&src_pp1200_l2a>;
  124. vcc-supply = <&src_pp1200_l2a>;
  125. clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
  126. clock-names = "refclk";
  127. no-hpd;
  128. ports {
  129. #address-cells = <1>;
  130. #size-cells = <0>;
  131. port@0 {
  132. reg = <0>;
  133. endpoint {
  134. remote-endpoint = <&dsi0_out>;
  135. };
  136. };
  137. port@1 {
  138. reg = <1>;
  139. sn65dsi86_out: endpoint {
  140. remote-endpoint = <&panel_in_edp>;
  141. };
  142. };
  143. };
  144. aux-bus {
  145. panel {
  146. compatible = "edp-panel";
  147. power-supply = <&pp3300_dx_edp>;
  148. backlight = <&backlight>;
  149. hpd-gpios = <&sn65dsi86_bridge 2 GPIO_ACTIVE_HIGH>;
  150. hpd-reliable-delay-ms = <15>;
  151. port {
  152. panel_in_edp: endpoint {
  153. remote-endpoint = <&sn65dsi86_out>;
  154. };
  155. };
  156. };
  157. };
  158. };
  159. };