panel-timing.yaml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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-timing.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: panel timing
  7. maintainers:
  8. - Thierry Reding <thierry.reding@gmail.com>
  9. - Sam Ravnborg <sam@ravnborg.org>
  10. description: |
  11. There are different ways of describing the timing data of a panel. The
  12. devicetree representation corresponds to the one commonly found in datasheets
  13. for panels.
  14. The parameters are defined as seen in the following illustration.
  15. +-------+----------+-------------------------------------+----------+
  16. | | | ^ | |
  17. | | | |vsync_len | |
  18. | | | v | |
  19. +-------+----------+-------------------------------------+----------+
  20. | | | ^ | |
  21. | | | |vback_porch | |
  22. | | | v | |
  23. +-------+----------#######################################----------+
  24. | | # ^ # |
  25. | | # | # |
  26. | hsync | hback # | # hfront |
  27. | len | porch # | hactive # porch |
  28. |<----->|<-------->#<-------+--------------------------->#<-------->|
  29. | | # | # |
  30. | | # |vactive # |
  31. | | # | # |
  32. | | # v # |
  33. +-------+----------#######################################----------+
  34. | | | ^ | |
  35. | | | |vfront_porch | |
  36. | | | v | |
  37. +-------+----------+-------------------------------------+----------+
  38. The following is the panel timings shown with time on the x-axis.
  39. This matches the timing diagrams often found in data sheets.
  40. Active Front Sync Back
  41. Region Porch Porch
  42. <-----------------------><----------------><-------------><-------------->
  43. //////////////////////|
  44. ////////////////////// |
  45. ////////////////////// |.................. ................
  46. _______________
  47. Timing can be specified either as a typical value or as a tuple
  48. of min, typ, max values.
  49. properties:
  50. clock-frequency:
  51. description: Panel clock in Hz
  52. hactive:
  53. $ref: /schemas/types.yaml#/definitions/uint32
  54. description: Horizontal panel resolution in pixels
  55. vactive:
  56. $ref: /schemas/types.yaml#/definitions/uint32
  57. description: Vertical panel resolution in pixels
  58. hfront-porch:
  59. description: Horizontal front porch panel timing
  60. $ref: /schemas/types.yaml#/definitions/uint32-array
  61. oneOf:
  62. - maxItems: 1
  63. items:
  64. description: typical number of pixels
  65. - minItems: 3
  66. maxItems: 3
  67. items:
  68. description: min, typ, max number of pixels
  69. hback-porch:
  70. description: Horizontal back porch timing
  71. $ref: /schemas/types.yaml#/definitions/uint32-array
  72. oneOf:
  73. - maxItems: 1
  74. items:
  75. description: typical number of pixels
  76. - minItems: 3
  77. maxItems: 3
  78. items:
  79. description: min, typ, max number of pixels
  80. hsync-len:
  81. description: Horizontal sync length panel timing
  82. $ref: /schemas/types.yaml#/definitions/uint32-array
  83. oneOf:
  84. - maxItems: 1
  85. items:
  86. description: typical number of pixels
  87. - minItems: 3
  88. maxItems: 3
  89. items:
  90. description: min, typ, max number of pixels
  91. vfront-porch:
  92. description: Vertical front porch panel timing
  93. $ref: /schemas/types.yaml#/definitions/uint32-array
  94. oneOf:
  95. - maxItems: 1
  96. items:
  97. description: typical number of lines
  98. - minItems: 3
  99. maxItems: 3
  100. items:
  101. description: min, typ, max number of lines
  102. vback-porch:
  103. description: Vertical back porch panel timing
  104. $ref: /schemas/types.yaml#/definitions/uint32-array
  105. oneOf:
  106. - maxItems: 1
  107. items:
  108. description: typical number of lines
  109. - minItems: 3
  110. maxItems: 3
  111. items:
  112. description: min, typ, max number of lines
  113. vsync-len:
  114. description: Vertical sync length panel timing
  115. $ref: /schemas/types.yaml#/definitions/uint32-array
  116. oneOf:
  117. - maxItems: 1
  118. items:
  119. description: typical number of lines
  120. - minItems: 3
  121. maxItems: 3
  122. items:
  123. description: min, typ, max number of lines
  124. hsync-active:
  125. description: |
  126. Horizontal sync pulse.
  127. 0 selects active low, 1 selects active high.
  128. If omitted then it is not used by the hardware
  129. $ref: /schemas/types.yaml#/definitions/uint32
  130. enum: [0, 1]
  131. vsync-active:
  132. description: |
  133. Vertical sync pulse.
  134. 0 selects active low, 1 selects active high.
  135. If omitted then it is not used by the hardware
  136. $ref: /schemas/types.yaml#/definitions/uint32
  137. enum: [0, 1]
  138. de-active:
  139. description: |
  140. Data enable.
  141. 0 selects active low, 1 selects active high.
  142. If omitted then it is not used by the hardware
  143. $ref: /schemas/types.yaml#/definitions/uint32
  144. enum: [0, 1]
  145. pixelclk-active:
  146. description: |
  147. Data driving on rising or falling edge.
  148. Use 0 to drive pixel data on falling edge and
  149. sample data on rising edge.
  150. Use 1 to drive pixel data on rising edge and
  151. sample data on falling edge
  152. $ref: /schemas/types.yaml#/definitions/uint32
  153. enum: [0, 1]
  154. syncclk-active:
  155. description: |
  156. Drive sync on rising or sample sync on falling edge.
  157. If not specified then the setup is as specified by pixelclk-active.
  158. Use 0 to drive sync on falling edge and
  159. sample sync on rising edge of pixel clock.
  160. Use 1 to drive sync on rising edge and
  161. sample sync on falling edge of pixel clock
  162. $ref: /schemas/types.yaml#/definitions/uint32
  163. enum: [0, 1]
  164. interlaced:
  165. type: boolean
  166. description: Enable interlaced mode
  167. doublescan:
  168. type: boolean
  169. description: Enable double scan mode
  170. doubleclk:
  171. type: boolean
  172. description: Enable double clock mode
  173. required:
  174. - clock-frequency
  175. - hactive
  176. - vactive
  177. - hfront-porch
  178. - hback-porch
  179. - hsync-len
  180. - vfront-porch
  181. - vback-porch
  182. - vsync-len
  183. additionalProperties: false
  184. ...