dt-bindings: convert timing + panel-dpi to DT schema
Subsystems (4)
cover dt-bindings: convert timing + panel-dpi to DT schema
This set of patches convert display-timing.txt to DT schema.
To do that add a panel-timing.yaml file that include all the panel-timing properties and use this in panel-common and in display-timings.
panel-dpi was also converted so we have no .txt users left of panel-timing in panel/
Everything passed dt_binding_check - and the trivial errors I tried in the examples was all catched during validation.
This work was triggered by a patch-set from Oleksandr Suvorov aiming at updating panel-lvds to support panel-dpi too.
This will make it simple to add additional properties to panel-dpi.
The .yaml file are all (GPL-2.0-only OR BSD-2-Clause). There are some parts copied or inspired from other files, but there is also a lot of content written by me.
The license can be questioned - and I just used
the default for new bindings.
Feedback welcome!
Sam
Sam Ravnborg (3):
dt-bindings: display: add panel-timing.yaml
dt-bindings: display: convert display-timings to DT schema
dt-bindings: display: convert panel-dpi to DT schema
.../bindings/display/panel/display-timing.txt | 124 +--------- .../bindings/display/panel/display-timings.yaml | 67 ++++++ .../bindings/display/panel/panel-common.yaml | 7 +- .../bindings/display/panel/panel-dpi.txt | 50 ---- .../bindings/display/panel/panel-dpi.yaml | 71 ++++++ .../bindings/display/panel/panel-timing.yaml | 253 +++++++++++++++++++++ 6 files changed, 395 insertions(+), 177 deletions(-)
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/3 dt-bindings: display: add panel-timing.yaml
Add meta-schema variant of panel-timing and
reference it from panel-common.yaml.
--- .../bindings/display/panel/panel-common.yaml | 7 +- .../bindings/display/panel/panel-timing.yaml | 253 ++++++++++++++++++ 2 files changed, 256 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/panel-timing.yaml
Documentation/devicetree/bindings/display/panel/panel-common.yaml +3 -4
@@ -54,13 +54,12 @@ properties: # Display Timings panel-timing: - type: object description: Most display panels are restricted to a single resolution and require specific display timings. The panel-timing subnode expresses those - timings as specified in the timing subnode section of the display timing - bindings defined in - Documentation/devicetree/bindings/display/panel/display-timing.txt. + timings. + allOf: + - $ref: panel-timing.yaml# # Connectivity port:
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +253 -0
253 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/3 dt-bindings: display: convert display-timings to DT schema
In reply to Sam RavnborgAdd 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.
--- .../bindings/display/panel/display-timing.txt | 124 +----------------- .../display/panel/display-timings.yaml | 67 ++++++++++ 2 files changed, 68 insertions(+), 123 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/display-timings.yaml
Documentation/devicetree/bindings/display/panel/display-timing.txt +1 -123
@@ -1,123 +1 @@ -display-timing bindings -======================= - -display-timings node --------------------- - -required properties: - - none - -optional properties: - - native-mode: The native mode for the display, in case multiple modes are - provided. When omitted, assume the first node is the native. - -timing subnode --------------- - -required properties: - - hactive, vactive: display resolution - - hfront-porch, hback-porch, hsync-len: horizontal display timing parameters - in pixels - vfront-porch, vback-porch, vsync-len: vertical display timing parameters in - lines - - clock-frequency: display clock in Hz - -optional properties: - - hsync-active: hsync pulse is active low/high/ignored - - vsync-active: vsync pulse is active low/high/ignored - - de-active: data-enable pulse is active low/high/ignored - - pixelclk-active: with - - active high = drive pixel data on rising edge/ - sample data on falling edge - - active low = drive pixel data on falling edge/ - sample data on rising edge - - ignored = ignored - - syncclk-active: with - - active high = drive sync on rising edge/ - sample sync on falling edge of pixel - clock - - active low = drive sync on falling edge/ - sample sync on rising edge of pixel - clock - - omitted = same configuration as pixelclk-active - - interlaced (bool): boolean to enable interlaced mode - - doublescan (bool): boolean to enable doublescan mode - - doubleclk (bool): boolean to enable doubleclock mode - -All the optional properties that are not bool follow the following logic: - <1>: high active - <0>: low active - omitted: not used on hardware - -There are different ways of describing the capabilities of a display. The -devicetree representation corresponds to the one commonly found in datasheets -for displays. If a display supports multiple signal timings, the native-mode -can be specified. - -The parameters are defined as: - - +----------+-------------------------------------+----------+-------+ - | | ^ | | | - | | |vback_porch | | | - | | v | | | - +----------#######################################----------+-------+ - | # ^ # | | - | # | # | | - | hback # | # hfront | hsync | - | porch # | hactive # porch | len | - |<-------->#<-------+--------------------------->#<-------->|<----->| - | # | # | | - | # |vactive # | | - | # | # | | - | # v # | | - +----------#######################################----------+-------+ - | | ^ | | | - | | |vfront_porch | | | - | | v | | | - +----------+-------------------------------------+----------+-------+ - | | ^ | | | - | | |vsync_len | | | - | | v | | | - +----------+-------------------------------------+----------+-------+ - -Note: In addition to being used as subnode(s) of display-timings, the timing - subnode may also be used on its own. This is appropriate if only one mode - need be conveyed. In this case, the node should be named 'panel-timing'. - - -Example: - - display-timings { - native-mode = <&timing0>; - timing0: 1080p24 { - /* 1920x1080p24 */ - clock-frequency = <52000000>; - hactive = <1920>; - vactive = <1080>; - hfront-porch = <25>; - hback-porch = <25>; - hsync-len = <25>; - vback-porch = <2>; - vfront-porch = <2>; - vsync-len = <2>; - hsync-active = <1>; - }; - }; - -Every required property also supports the use of ranges, so the commonly used -datasheet description with minimum, typical and maximum values can be used. - -Example: - - timing1: timing { - /* 1920x1080p24 */ - clock-frequency = <148500000>; - hactive = <1920>; - vactive = <1080>; - hsync-len = <0 44 60>; - hfront-porch = <80 88 95>; - hback-porch = <100 148 160>; - vfront-porch = <0 4 6>; - vback-porch = <0 36 50>; - vsync-len = <0 5 6>; - }; +See display-timings.yaml in this directory.
Documentation/devicetree/bindings/display/panel/display-timings.yaml new file +67 -0
67 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/3 dt-bindings: display: convert panel-dpi to DT schema
In reply to Sam RavnborgWith panel-timing converted, now convert the single remaining .txt user in panel/ of panel-timing to DT schema.
--- .../bindings/display/panel/panel-dpi.txt | 50 ------------- .../bindings/display/panel/panel-dpi.yaml | 71 +++++++++++++++++++ 2 files changed, 71 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.txt create mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
Documentation/devicetree/bindings/display/panel/panel-dpi.txt deleted +0 -50
@@ -1,50 +0,0 @@ -Generic MIPI DPI Panel -====================== - -Required properties: -- compatible: "panel-dpi" - -Optional properties: -- label: a symbolic name for the panel -- enable-gpios: panel enable gpio -- reset-gpios: GPIO to control the RESET pin -- vcc-supply: phandle of regulator that will be used to enable power to the display -- backlight: phandle of the backlight device - -Required nodes: -- "panel-timing" containing video timings - (Documentation/devicetree/bindings/display/panel/display-timing.txt) -- Video port for DPI input - -Example -------- - -lcd0: display@0 { - compatible = "samsung,lte430wq-f0c", "panel-dpi"; - label = "lcd"; - - backlight = <&backlight>; - - port { - lcd_in: endpoint { - remote-endpoint = <&dpi_out>; - }; - }; - - panel-timing { - clock-frequency = <9200000>; - hactive = <480>; - vactive = <272>; - hfront-porch = <8>; - hback-porch = <4>; - hsync-len = <41>; - vback-porch = <2>; - vfront-porch = <4>; - vsync-len = <10>; - - hsync-active = <0>; - vsync-active = <0>; - de-active = <1>; - pixelclk-active = <1>; - }; -};
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
2.20.1
Re: [PATCH v1 1/3] dt-bindings: display: add panel-timing.yaml
In reply to Sam RavnborgQuoted 7 lines · Sam Ravnborg
Add meta-schema variant of panel-timing and
reference it frompanel-common.yaml.Signed-off-by Sam Ravnborg <[email protected]>---
There some typos:
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +0
-0@@ -0,0 +1,253 @@
...
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 14
Quoted 2 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +2
-0+description: | + There are different ways of describing the timing data data of a panel. The
-----------------------------------------------------------------------^^^^^^^^^ s/data data/data/
...
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 75
Quoted 4 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +4
-0+ vactive: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Verical panel resolution in pixels
---------^^^^^^
Vertical
Anyway, those are minor issues, so
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Best regards
Oleksandr Suvorov
Toradex AG
Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41 500 4800 (main line)
Maxime Ripard
maintainerRe: [PATCH v1 1/3] dt-bindings: display: add panel-timing.yaml
In reply to Sam RavnborgHi,
Quoted 117 lines · Sam Ravnborg
Add meta-schema variant of panel-timing and
reference it frompanel-common.yaml.Signed-off-by Sam Ravnborg <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Rob Herring <[email protected]>Cc Thierry Reding <[email protected]>Cc Oleksandr Suvorov <[email protected]>--- .../bindings/display/panel/panel-common.yaml | 7 +- .../bindings/display/panel/panel-timing.yaml | 253 ++++++++++++++++++ 2 files changed, 256 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/panel-timing.yamlDocumentation/devicetree/bindings/display/panel/panel-common.yaml +3
-4@@ -54,13 +54,12 @@ properties: # Display Timings panel-timing: - type: object description: Most display panels are restricted to a single resolution and require specific display timings. The panel-timing subnode expresses those - timings as specified in the timing subnode section of the display timing - bindings defined in - Documentation/devicetree/bindings/display/panel/display-timing.txt. + timings. + allOf: + - $ref: panel-timing.yaml# # Connectivity port:Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +75
-0@@ -0,0 +1,253 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/panel-timing.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: panel timing bindings + +maintainers: + - Thierry Reding <[email protected]> + - Sam Ravnborg <[email protected]> + +description: | + There are different ways of describing the timing data data of a panel. The + devicetree representation corresponds to the one commonly found in datasheets + for panels. If a panel supports multiple signal timings, the native-mode + can be specified. + + The parameters are defined as seen in the following illustration. + + +----------+-------------------------------------+----------+-------+ + | | ^ | | | + | | |vback_porch | | | + | | v | | | + +----------#######################################----------+-------+ + | # ^ # | | + | # | # | | + | hback # | # hfront | hsync | + | porch # | hactive # porch | len | + |<-------->#<-------+--------------------------->#<-------->|<----->| + | # | # | | + | # |vactive # | | + | # | # | | + | # v # | | + +----------#######################################----------+-------+ + | | ^ | | | + | | |vfront_porch | | | + | | v | | | + +----------+-------------------------------------+----------+-------+ + | | ^ | | | + | | |vsync_len | | | + | | v | | | + +----------+-------------------------------------+----------+-------+ + + + The following is the panel timings shown with time on the x-axis. + This matches the timing diagrams often found in data sheets. + + Active Front Sync Back + Region Porch Porch + <-----------------------><----------------><-------------><--------------> + //////////////////////| + ////////////////////// | + ////////////////////// |.................. ................ + _______________ + + Timing can be specified either as a typical value or as a tuple + of min, typ, max values. + +properties: + + clock-frequency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Panel clock in Hz + + hactive: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Horizontal panel resolution in pixels + + vactive: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Verical panel resolution in pixels
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 85
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +10
-0+ + hfront-porch: + description: | + Horizontal front porch panel timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - maxItems: 1 + items: + description: typical number of pixels
You have that on a number of occasions, but that could just be an uint32, right?
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 91
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +6
-0+ - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of pixels
When minItems and maxitems are equal, you can just set one, the other one will be filled by the DT schemas tools.
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 181
Quoted 9 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +9
-0+ hsync-active: + description: | + Horizontal sync pulse. + If omitted then it is not used by the hardware + oneOf: + - const: 0 + description: active low + - const: 1 + description: active high
You probably should use an enum here (and in other similar places). oneOf / anyOf / allOF errors are pretty cryptic, while it will it's really better with an enum.
Thanks!
Maxime
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Rob Herring
maintainerRe: [PATCH v1 1/3] dt-bindings: display: add panel-timing.yaml
In reply to Sam RavnborgQuoted 43 lines · Sam Ravnborg
Add meta-schema variant of panel-timing and
reference it frompanel-common.yaml.Signed-off-by Sam Ravnborg <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Rob Herring <[email protected]>Cc Thierry Reding <[email protected]>Cc Oleksandr Suvorov <[email protected]>--- .../bindings/display/panel/panel-common.yaml | 7 +- .../bindings/display/panel/panel-timing.yaml | 253 ++++++++++++++++++ 2 files changed, 256 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/panel-timing.yamlDocumentation/devicetree/bindings/display/panel/panel-common.yaml +3
-4@@ -54,13 +54,12 @@ properties: # Display Timings panel-timing: - type: object description: Most display panels are restricted to a single resolution and require specific display timings. The panel-timing subnode expresses those - timings as specified in the timing subnode section of the display timing - bindings defined in - Documentation/devicetree/bindings/display/panel/display-timing.txt. + timings. + allOf: + - $ref: panel-timing.yaml# # Connectivity port:Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +0
-0
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 1
Quoted 1 line
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +1
-0@@ -0,0 +1,253 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Some of this comes from the existing binding files, do you have rights to change the license (it would be nice to get it).
Quoted 52 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +52
-0+%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/panel-timing.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: panel timing bindings + +maintainers: + - Thierry Reding <[email protected]> + - Sam Ravnborg <[email protected]> + +description: | + There are different ways of describing the timing data data of a panel. The + devicetree representation corresponds to the one commonly found in datasheets + for panels. If a panel supports multiple signal timings, the native-mode + can be specified. + + The parameters are defined as seen in the following illustration. + + +----------+-------------------------------------+----------+-------+ + | | ^ | | | + | | |vback_porch | | | + | | v | | | + +----------#######################################----------+-------+ + | # ^ # | | + | # | # | | + | hback # | # hfront | hsync | + | porch # | hactive # porch | len | + |<-------->#<-------+--------------------------->#<-------->|<----->| + | # | # | | + | # |vactive # | | + | # | # | | + | # v # | | + +----------#######################################----------+-------+ + | | ^ | | | + | | |vfront_porch | | | + | | v | | | + +----------+-------------------------------------+----------+-------+ + | | ^ | | | + | | |vsync_len | | | + | | v | | | + +----------+-------------------------------------+----------+-------+ + + + The following is the panel timings shown with time on the x-axis. + This matches the timing diagrams often found in data sheets. + + Active Front Sync Back + Region Porch Porch + <-----------------------><----------------><-------------><--------------> + //////////////////////| + ////////////////////// |
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 63
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +10
-0+ ////////////////////// |.................. ................ + _______________ + + Timing can be specified either as a typical value or as a tuple + of min, typ, max values. + +properties: + + clock-frequency: + $ref: /schemas/types.yaml#/definitions/uint32
There's already a type definition for this.
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 64
Quoted 1 line
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +1
-0+ description: |
Drop '|' unless you have multiple paragraphs or need to maintain formatting.
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 75
Quoted 11 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +11
-0+ Panel clock in Hz + + hactive: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Horizontal panel resolution in pixels + + vactive: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Verical panel resolution in pixels
typo
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +6
-0+ + hfront-porch: + description: | + Horizontal front porch panel timing + oneOf: + - allOf:
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 91
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +10
-0+ - $ref: /schemas/types.yaml#/definitions/uint32-array + - maxItems: 1 + items: + description: typical number of pixels + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of pixels
I think you can describe it like this (test with 2 items though):
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32-array
not:
maxItems: 2
items:
- description: ...
- description: ...
- description: ...
Quoted 163 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +162
-1+ + hback-porch: + description: | + Horizontal back porch timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - maxItems: 1 + items: + description: typical number of pixels + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of pixels + + hsync-len: + description: | + Horizontal sync length panel timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - maxItems: 1 + items: + description: typical number of pixels + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of pixels + + vfront-porch: + description: | + Vertical front porch panel timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - maxItems: 1 + items: + description: typical number of lines + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of lines + + vback-porch: + description: | + Vertical back porch panel timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - maxItems: 1 + items: + description: typical number of lines + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of lines + + vsync-len: + description: | + Vertical sync length panel timing + oneOf: + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - maxItems: 1 + items: + description: typical number of lines + - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of lines + + hsync-active: + description: | + Horizontal sync pulse. + If omitted then it is not used by the hardware + oneOf: + - const: 0 + description: active low + - const: 1 + description: active high + + vsync-active: + description: | + Vertical sync pulse. + If omitted then it is not used by the hardware + oneOf: + - const: 0 + description: active low + - const: 1 + description: active high + + de-active: + description: | + Data enable. + If omitted then it is not used by the hardware + oneOf: + - const: 0 + description: active low + - const: 1 + description: active high + + pixelclk-active: + description: | + Data driving on rising or falling edge + oneOf: + - const: 0 + description: | + Drive pixel data on falling edge and + sample data on rising edge + - const: 1 + description: | + Drive pixel data on rising edge and + sample data on falling edge + + syncclk-active: + description: | + Drive sync on rising or sample sync on falling edge. + If not specified then the same as pixelclk-active + oneOf: + - const: 0 + description: | + Drive sync on falling edge and + sample sync on rising edge of pixel clock + - const: 1 + description: | + Drive sync on rising edge and + sample sync on falling edge of pixel clock + + interlaced: + type: boolean + description: Enable interlaced mode + + doublescan: + type: boolean + description: Enable double scan mode + + doubleclk: + type: boolean + description: Enable double clock mode + +required: + - clock-frequency + - hactive + - vactive + - hfront-porch + - hback-porch + - hsync-len + - vfront-porch + - vback-porch + - vsync-len + +additionalProperties: false --
Quoted 2 lines
2.20.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Rob Herring
maintainerRe: [PATCH v1 3/3] dt-bindings: display: convert panel-dpi to DT schema
In reply to Sam RavnborgQuoted 15 lines · Sam Ravnborg
With panel-timing converted, now convert the single remaining .txt user in panel/ of panel-timing to DT schema.
Signed-off-by Sam Ravnborg <[email protected]>Cc Rob Herring <[email protected]>Cc Thierry Reding <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Maxime Ripard <[email protected]>--- .../bindings/display/panel/panel-dpi.txt | 50 ------------- .../bindings/display/panel/panel-dpi.yaml | 71 +++++++++++++++++++ 2 files changed, 71 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.txt create mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
[...]
Quoted 19 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml new file +13
-0@@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/panel-dpi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic MIPI DPI Panel + +maintainers: + - Sam Ravnborg <[email protected]> + - Thierry Reding <[email protected]> + +allOf:
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml line 23
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml new file +10
-0+ - $ref: panel-common.yaml# + +properties: + compatible: + contains: + const: panel-dpi + description: + Shall contain "panel-dpi" in addition to a mandatory panel-specific + compatible string defined in individual panel bindings. The "panel-dpi" + value shall never be used on its own.
Yet we have 3 cases where it is...
A 'minItems: 2' should be enough to catch these. Or do:
items:
- {}
- const: panel-dpi
Or list the panel compatible that's in the example. That way we'll get errors for all the undocumented panel compatibles (that's most of them).
Quoted 49 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml new file +48
-1+ + vcc-supply: + description: | + Regulator that will be used to enable power to the display + + label: true + enable-gpios: true + reset-gpios: true + backlight: true + panel-timing: true + port: true + +required: + - panel-timing + +additionalProperties: false + +examples: + - | + panel@0 { + compatible = "samsung,lte430wq-f0c", "panel-dpi"; + label = "lcd"; + vcc-supply = <&vcc_supply>; + + backlight = <&backlight>; + + port { + lcd_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; + panel-timing { + clock-frequency = <9200000>; + hactive = <480>; + vactive = <272>; + hfront-porch = <8>; + hback-porch = <4>; + hsync-len = <41>; + vback-porch = <2>; + vfront-porch = <4>; + vsync-len = <10>; + + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + pixelclk-active = <1>; + }; + }; --
Quoted 2 lines
2.20.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v1 1/3] dt-bindings: display: add panel-timing.yaml
In reply to Oleksandr SuvorovHi Oleksandr.
Quoted 15 lines
There some typos:
Quoted 6 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +0
-0@@ -0,0 +1,253 @@...
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 14
Quoted 2 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +2
-0+description: | + There are different ways of describing the timing data data of a panel. The-----------------------------------------------------------------------^^^^^^^^^ s/data data/data/
Quoted 7 lines
...
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 75
Quoted 4 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +4
-0+ vactive: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Verical panel resolution in pixels---------^^^^^^
Vertical
Fixed in v2 - thanks.
Quoted 4 lines
Anyway, those are minor issues, so
Reviewed-by Oleksandr Suvorov <[email protected]>
Sam
Re: [PATCH v1 1/3] dt-bindings: display: add panel-timing.yaml
In reply to Maxime RipardHi Maxime.
Thanks for your comments!
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 91
Quoted 7 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +6
-0+ - allOf: + - $ref: /schemas/types.yaml#/definitions/uint32-array + - minItems: 3 + maxItems: 3 + items: + description: min, typ, max number of pixelsWhen minItems and maxitems are equal, you can just set one, the other one will be filled by the DT schemas tools.
I tried to drop minItems: 3
But it just did not work - I could not make it
accept <xx> and <xx xx xx>.
And the schema should, and does, reject <xx xx> and <xx xx xx xx>
I do not know why - I just did a trial-and-error on this.
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml line 181
Quoted 9 lines
Documentation/devicetree/bindings/display/panel/panel-timing.yaml new file +9
-0+ hsync-active: + description: | + Horizontal sync pulse. + If omitted then it is not used by the hardware + oneOf: + - const: 0 + description: active low + - const: 1 + description: active high
Quoted 3 lines
You probably should use an enum here (and in other similar places). oneOf / anyOf / allOF errors are pretty cryptic, while it will it's really better with an enum.
Yep - enum: [0, 1] is much nicer.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v1 1/3] dt-bindings: display: add panel-timing.yaml
In reply to Oleksandr SuvorovHi Oleksandr
Thanks for the feedback on the typos.
Quoted 4 lines
Anyway, those are minor issues, so
Reviewed-by Oleksandr Suvorov <[email protected]>
I did a number of other changes so I dropped this r-b, as you really did not review the v2 version. v2 coming later today.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH v1 3/3] dt-bindings: display: convert panel-dpi to DT schema
In reply to Rob HerringHi Rob.
Quoted 51 lines · Rob Herring
Quoted 15 lines · Sam Ravnborg
With panel-timing converted, now convert the single remaining .txt user in panel/ of panel-timing to DT schema.
Signed-off-by Sam Ravnborg <[email protected]>Cc Rob Herring <[email protected]>Cc Thierry Reding <[email protected]>Cc Laurent Pinchart <[email protected]>Cc Maxime Ripard <[email protected]>--- .../bindings/display/panel/panel-dpi.txt | 50 ------------- .../bindings/display/panel/panel-dpi.yaml | 71 +++++++++++++++++++ 2 files changed, 71 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.txt create mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.yaml[...]
Quoted 19 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml new file +13
-0@@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/panel-dpi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic MIPI DPI Panel + +maintainers: + - Sam Ravnborg <[email protected]> + - Thierry Reding <[email protected]> + +allOf:Documentation/devicetree/bindings/display/panel/panel-dpi.yaml line 23
Quoted 10 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml new file +10
-0+ - $ref: panel-common.yaml# + +properties: + compatible: + contains: + const: panel-dpi + description: + Shall contain "panel-dpi" in addition to a mandatory panel-specific + compatible string defined in individual panel bindings. The "panel-dpi" + value shall never be used on its own.Yet we have 3 cases where it is...
Quoted 1 line
A 'minItems: 2' should be enough to catch these. Or do:
The above was a verbatim copy from another binding. Thinking more about this I went with this:
compatible:
contains:
const: panel-dpi
description:
Shall contain "panel-dpi" in addition to an optional panel-specific compatible string defined in individual panel bindings. "panel-dpi" can be used alone, thus no dedicated binding file is required for each and every panel.
So a DT file with:
panel@0 {
compatible = "panel-dpi";
...
panel-timing {
...
};Is in many cases enough - and then people do not have
to either cheat or wait until their panel is included in the kernel. The panel market i big, and there are new panels each and every day. With panel-dpi we can support the dumb panels that
do not require any special delays etc.
Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel