Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: display: convert display-timings to DT schema

Add display-timings.yaml - that references panel-timings.yaml.
display-timings.yaml will be used for display bindings
when they are converted to meta-schema format.

For now the old display-timing.txt points to the new
display-timings.yaml - and all users are left as-is.

v2:
- Updated native-mode description

v3:
- Simpler "^timing" pattern (Rob)
- timing node is of type object (Rob)
- added display-timings to panel-common.yaml
- added yaml document terminator "..."

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Cc: devicetree@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20200216181513.28109-3-sam@ravnborg.org

+86 -123
+1 -123
Documentation/devicetree/bindings/display/panel/display-timing.txt
··· 1 - display-timing bindings 2 - ======================= 3 - 4 - display-timings node 5 - -------------------- 6 - 7 - required properties: 8 - - none 9 - 10 - optional properties: 11 - - native-mode: The native mode for the display, in case multiple modes are 12 - provided. When omitted, assume the first node is the native. 13 - 14 - timing subnode 15 - -------------- 16 - 17 - required properties: 18 - - hactive, vactive: display resolution 19 - - hfront-porch, hback-porch, hsync-len: horizontal display timing parameters 20 - in pixels 21 - vfront-porch, vback-porch, vsync-len: vertical display timing parameters in 22 - lines 23 - - clock-frequency: display clock in Hz 24 - 25 - optional properties: 26 - - hsync-active: hsync pulse is active low/high/ignored 27 - - vsync-active: vsync pulse is active low/high/ignored 28 - - de-active: data-enable pulse is active low/high/ignored 29 - - pixelclk-active: with 30 - - active high = drive pixel data on rising edge/ 31 - sample data on falling edge 32 - - active low = drive pixel data on falling edge/ 33 - sample data on rising edge 34 - - ignored = ignored 35 - - syncclk-active: with 36 - - active high = drive sync on rising edge/ 37 - sample sync on falling edge of pixel 38 - clock 39 - - active low = drive sync on falling edge/ 40 - sample sync on rising edge of pixel 41 - clock 42 - - omitted = same configuration as pixelclk-active 43 - - interlaced (bool): boolean to enable interlaced mode 44 - - doublescan (bool): boolean to enable doublescan mode 45 - - doubleclk (bool): boolean to enable doubleclock mode 46 - 47 - All the optional properties that are not bool follow the following logic: 48 - <1>: high active 49 - <0>: low active 50 - omitted: not used on hardware 51 - 52 - There are different ways of describing the capabilities of a display. The 53 - devicetree representation corresponds to the one commonly found in datasheets 54 - for displays. If a display supports multiple signal timings, the native-mode 55 - can be specified. 56 - 57 - The parameters are defined as: 58 - 59 - +----------+-------------------------------------+----------+-------+ 60 - | | ^ | | | 61 - | | |vback_porch | | | 62 - | | v | | | 63 - +----------#######################################----------+-------+ 64 - | # ^ # | | 65 - | # | # | | 66 - | hback # | # hfront | hsync | 67 - | porch # | hactive # porch | len | 68 - |<-------->#<-------+--------------------------->#<-------->|<----->| 69 - | # | # | | 70 - | # |vactive # | | 71 - | # | # | | 72 - | # v # | | 73 - +----------#######################################----------+-------+ 74 - | | ^ | | | 75 - | | |vfront_porch | | | 76 - | | v | | | 77 - +----------+-------------------------------------+----------+-------+ 78 - | | ^ | | | 79 - | | |vsync_len | | | 80 - | | v | | | 81 - +----------+-------------------------------------+----------+-------+ 82 - 83 - Note: In addition to being used as subnode(s) of display-timings, the timing 84 - subnode may also be used on its own. This is appropriate if only one mode 85 - need be conveyed. In this case, the node should be named 'panel-timing'. 86 - 87 - 88 - Example: 89 - 90 - display-timings { 91 - native-mode = <&timing0>; 92 - timing0: 1080p24 { 93 - /* 1920x1080p24 */ 94 - clock-frequency = <52000000>; 95 - hactive = <1920>; 96 - vactive = <1080>; 97 - hfront-porch = <25>; 98 - hback-porch = <25>; 99 - hsync-len = <25>; 100 - vback-porch = <2>; 101 - vfront-porch = <2>; 102 - vsync-len = <2>; 103 - hsync-active = <1>; 104 - }; 105 - }; 106 - 107 - Every required property also supports the use of ranges, so the commonly used 108 - datasheet description with minimum, typical and maximum values can be used. 109 - 110 - Example: 111 - 112 - timing1: timing { 113 - /* 1920x1080p24 */ 114 - clock-frequency = <148500000>; 115 - hactive = <1920>; 116 - vactive = <1080>; 117 - hsync-len = <0 44 60>; 118 - hfront-porch = <80 88 95>; 119 - hback-porch = <100 148 160>; 120 - vfront-porch = <0 4 6>; 121 - vback-porch = <0 36 50>; 122 - vsync-len = <0 5 6>; 123 - }; 1 + See display-timings.yaml in this directory.
+77
Documentation/devicetree/bindings/display/panel/display-timings.yaml
··· 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/display-timings.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: display timing bindings 8 + 9 + maintainers: 10 + - Thierry Reding <thierry.reding@gmail.com> 11 + - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> 12 + - Sam Ravnborg <sam@ravnborg.org> 13 + 14 + description: | 15 + A display panel may be able to handle several display timings, 16 + with different resolutions. 17 + The display-timings node makes it possible to specify the timing 18 + and to specify the timing that is native for the display. 19 + 20 + properties: 21 + $nodename: 22 + const: display-timings 23 + 24 + native-mode: 25 + $ref: /schemas/types.yaml#/definitions/phandle 26 + description: | 27 + The default display timing is the one specified as native-mode. 28 + If no native-mode is specified then the first node is assumed the 29 + native mode. 30 + 31 + patternProperties: 32 + "^timing": 33 + type: object 34 + allOf: 35 + - $ref: panel-timing.yaml# 36 + 37 + additionalProperties: false 38 + 39 + examples: 40 + - |+ 41 + 42 + /* 43 + * Example that specifies panel timing using minimum, typical, 44 + * maximum values as commonly used in datasheet description. 45 + * timing1 is the native-mode. 46 + */ 47 + display-timings { 48 + native-mode = <&timing1>; 49 + timing0 { 50 + /* 1920x1080p24 */ 51 + clock-frequency = <148500000>; 52 + hactive = <1920>; 53 + vactive = <1080>; 54 + hsync-len = <0 44 60>; 55 + hfront-porch = <80 88 95>; 56 + hback-porch = <100 148 160>; 57 + vfront-porch = <0 4 6>; 58 + vback-porch = <0 36 50>; 59 + vsync-len = <0 5 6>; 60 + }; 61 + timing1 { 62 + /* 1920x1080p24 */ 63 + clock-frequency = <52000000>; 64 + hactive = <1920>; 65 + vactive = <1080>; 66 + hfront-porch = <25>; 67 + hback-porch = <25>; 68 + hsync-len = <0 25 25>; 69 + vback-porch = <2>; 70 + vfront-porch = <2>; 71 + vsync-len = <2>; 72 + hsync-active = <1>; 73 + pixelclk-active = <1>; 74 + }; 75 + }; 76 + 77 + ...
+8
Documentation/devicetree/bindings/display/panel/panel-common.yaml
··· 61 61 allOf: 62 62 - $ref: panel-timing.yaml# 63 63 64 + display-timings: 65 + description: 66 + Some display panels supports several resolutions with different timing. 67 + The display-timings bindings supports specifying several timings and 68 + optional specify which is the native mode. 69 + allOf: 70 + - $ref: display-timings.yaml# 71 + 64 72 # Connectivity 65 73 port: 66 74 type: object