display-timing.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. display-timing bindings
  2. =======================
  3. display-timings node
  4. --------------------
  5. required properties:
  6. - none
  7. optional properties:
  8. - native-mode: The native mode for the display, in case multiple modes are
  9. provided. When omitted, assume the first node is the native.
  10. timing subnode
  11. --------------
  12. required properties:
  13. - hactive, vactive: display resolution
  14. - hfront-porch, hback-porch, hsync-len: horizontal display timing parameters
  15. in pixels
  16. vfront-porch, vback-porch, vsync-len: vertical display timing parameters in
  17. lines
  18. - clock-frequency: display clock in Hz
  19. optional properties:
  20. - hsync-active: hsync pulse is active low/high/ignored
  21. - vsync-active: vsync pulse is active low/high/ignored
  22. - de-active: data-enable pulse is active low/high/ignored
  23. - pixelclk-active: with
  24. - active high = drive pixel data on rising edge/
  25. sample data on falling edge
  26. - active low = drive pixel data on falling edge/
  27. sample data on rising edge
  28. - ignored = ignored
  29. - interlaced (bool): boolean to enable interlaced mode
  30. - doublescan (bool): boolean to enable doublescan mode
  31. - doubleclk (bool): boolean to enable doubleclock mode
  32. All the optional properties that are not bool follow the following logic:
  33. <1>: high active
  34. <0>: low active
  35. omitted: not used on hardware
  36. There are different ways of describing the capabilities of a display. The
  37. devicetree representation corresponds to the one commonly found in datasheets
  38. for displays. If a display supports multiple signal timings, the native-mode
  39. can be specified.
  40. The parameters are defined as:
  41. +----------+-------------------------------------+----------+-------+
  42. | | ↑ | | |
  43. | | |vback_porch | | |
  44. | | ↓ | | |
  45. +----------#######################################----------+-------+
  46. | # ↑ # | |
  47. | # | # | |
  48. | hback # | # hfront | hsync |
  49. | porch # | hactive # porch | len |
  50. |<-------->#<-------+--------------------------->#<-------->|<----->|
  51. | # | # | |
  52. | # |vactive # | |
  53. | # | # | |
  54. | # ↓ # | |
  55. +----------#######################################----------+-------+
  56. | | ↑ | | |
  57. | | |vfront_porch | | |
  58. | | ↓ | | |
  59. +----------+-------------------------------------+----------+-------+
  60. | | ↑ | | |
  61. | | |vsync_len | | |
  62. | | ↓ | | |
  63. +----------+-------------------------------------+----------+-------+
  64. Example:
  65. display-timings {
  66. native-mode = <&timing0>;
  67. timing0: 1080p24 {
  68. /* 1920x1080p24 */
  69. clock-frequency = <52000000>;
  70. hactive = <1920>;
  71. vactive = <1080>;
  72. hfront-porch = <25>;
  73. hback-porch = <25>;
  74. hsync-len = <25>;
  75. vback-porch = <2>;
  76. vfront-porch = <2>;
  77. vsync-len = <2>;
  78. hsync-active = <1>;
  79. };
  80. };
  81. Every required property also supports the use of ranges, so the commonly used
  82. datasheet description with minimum, typical and maximum values can be used.
  83. Example:
  84. timing1: timing {
  85. /* 1920x1080p24 */
  86. clock-frequency = <148500000>;
  87. hactive = <1920>;
  88. vactive = <1080>;
  89. hsync-len = <0 44 60>;
  90. hfront-porch = <80 88 95>;
  91. hback-porch = <100 148 160>;
  92. vfront-porch = <0 4 6>;
  93. vback-porch = <0 36 50>;
  94. vsync-len = <0 5 6>;
  95. };