display-timing.txt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. All the optional properties that are not bool follow the following logic:
  32. <1>: high active
  33. <0>: low active
  34. omitted: not used on hardware
  35. There are different ways of describing the capabilities of a display. The
  36. devicetree representation corresponds to the one commonly found in datasheets
  37. for displays. If a display supports multiple signal timings, the native-mode
  38. can be specified.
  39. The parameters are defined as:
  40. +----------+-------------------------------------+----------+-------+
  41. | | ↑ | | |
  42. | | |vback_porch | | |
  43. | | ↓ | | |
  44. +----------#######################################----------+-------+
  45. | # ↑ # | |
  46. | # | # | |
  47. | hback # | # hfront | hsync |
  48. | porch # | hactive # porch | len |
  49. |<-------->#<-------+--------------------------->#<-------->|<----->|
  50. | # | # | |
  51. | # |vactive # | |
  52. | # | # | |
  53. | # ↓ # | |
  54. +----------#######################################----------+-------+
  55. | | ↑ | | |
  56. | | |vfront_porch | | |
  57. | | ↓ | | |
  58. +----------+-------------------------------------+----------+-------+
  59. | | ↑ | | |
  60. | | |vsync_len | | |
  61. | | ↓ | | |
  62. +----------+-------------------------------------+----------+-------+
  63. Example:
  64. display-timings {
  65. native-mode = <&timing0>;
  66. timing0: 1080p24 {
  67. /* 1920x1080p24 */
  68. clock-frequency = <52000000>;
  69. hactive = <1920>;
  70. vactive = <1080>;
  71. hfront-porch = <25>;
  72. hback-porch = <25>;
  73. hsync-len = <25>;
  74. vback-porch = <2>;
  75. vfront-porch = <2>;
  76. vsync-len = <2>;
  77. hsync-active = <1>;
  78. };
  79. };
  80. Every required property also supports the use of ranges, so the commonly used
  81. datasheet description with minimum, typical and maximum values can be used.
  82. Example:
  83. timing1: timing {
  84. /* 1920x1080p24 */
  85. clock-frequency = <148500000>;
  86. hactive = <1920>;
  87. vactive = <1080>;
  88. hsync-len = <0 44 60>;
  89. hfront-porch = <80 88 95>;
  90. hback-porch = <100 148 160>;
  91. vfront-porch = <0 4 6>;
  92. vback-porch = <0 36 50>;
  93. vsync-len = <0 5 6>;
  94. };