* [PATCH v2 0/3] dt-bindings: convert timing + panel-dpi to DT schema
@ 2020-01-25 20:34 Sam Ravnborg
2020-01-25 20:34 ` [PATCH v2 1/3] dt-bindings: display: add panel-timing.yaml Sam Ravnborg
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Sam Ravnborg @ 2020-01-25 20:34 UTC (permalink / raw)
To: Rob Herring, dri-devel, devicetree
Cc: Peter Ujfalusi, Oleksandr Suvorov, Thierry Reding,
Laurent Pinchart, Steffen Trumtrar, Sam Ravnborg
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.
Thanks for the quick responses on v2 and likewise the quick
feedback on the request for the license change!
Highlights from v2 - see individual patches for details.
- Got acks for the license change
- Simplfied panel-timings bindings
- panel-dpi can now be used without a panel specific compatible
So panel-dpi can be used as a generic binding for dumb panels
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 | 68 ++++++
.../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 | 227 +++++++++++++++++++++
6 files changed, 370 insertions(+), 177 deletions(-)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/3] dt-bindings: display: add panel-timing.yaml
2020-01-25 20:34 [PATCH v2 0/3] dt-bindings: convert timing + panel-dpi to DT schema Sam Ravnborg
@ 2020-01-25 20:34 ` Sam Ravnborg
2020-01-31 17:41 ` Rob Herring
2020-01-25 20:34 ` [PATCH v2 2/3] dt-bindings: display: convert display-timings to DT schema Sam Ravnborg
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Sam Ravnborg @ 2020-01-25 20:34 UTC (permalink / raw)
To: Rob Herring, dri-devel, devicetree
Cc: Peter Ujfalusi, Oleksandr Suvorov, Thierry Reding,
Laurent Pinchart, Steffen Trumtrar, Sam Ravnborg
Add meta-schema variant of panel-timing and
reference it from panel-common.yaml.
Part of this came form other files with other
licenses - original commits:
cc3f414cf2e4 ("video: add of helper for display timings/videomode")
86f46565dff3 ("dt-bindings: display: display-timing: Add property to configure sync drive edge")
9cad9c95d7e8 ("Documentation: DocBook DRM framework documentation")
The original authors acked the license change to:
(GPL-2.0-only OR BSD-2-Clause)
v2:
- Got OK from original authors for re-license
Huge thanks for the quick replies!
- Typo fixes (Oleksandr)
- Drop -array variant when not needed (Maxime)
- Replace oneOf:... with enum (Maxime)
- Drop type from clock-frequency (Rob)
- Drop "|" when not needed (Rob)
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Rob Herring <robh@kernel.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: devicetree@vger.kernel.org
---
.../bindings/display/panel/panel-common.yaml | 7 +-
.../bindings/display/panel/panel-timing.yaml | 227 ++++++++++++++++++
2 files changed, 230 insertions(+), 4 deletions(-)
create mode 100644 Documentation/devicetree/bindings/display/panel/panel-timing.yaml
diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
index ef8d8cdfcede..8070c439adbd 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
@@ -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:
diff --git a/Documentation/devicetree/bindings/display/panel/panel-timing.yaml b/Documentation/devicetree/bindings/display/panel/panel-timing.yaml
new file mode 100644
index 000000000000..bdfb6d461529
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/panel-timing.yaml
@@ -0,0 +1,227 @@
+# 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 <thierry.reding@gmail.com>
+ - Sam Ravnborg <sam@ravnborg.org>
+
+description: |
+ There are different ways of describing the timing 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:
+ 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: Vertical panel resolution in pixels
+
+ hfront-porch:
+ description: |
+ Horizontal front porch panel timing
+ oneOf:
+ - allOf:
+ - $ref: /schemas/types.yaml#/definitions/uint32
+ - 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
+
+ hback-porch:
+ description: Horizontal back porch timing
+ oneOf:
+ - allOf:
+ - $ref: /schemas/types.yaml#/definitions/uint32
+ - 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
+ - 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
+ - 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
+ - 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
+ - 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.
+ 0 selects active low, 1 selects active high.
+ If omitted then it is not used by the hardware
+ enum: [0, 1]
+
+ vsync-active:
+ description: |
+ Vertical sync pulse.
+ 0 selects active low, 1 selects active high.
+ If omitted then it is not used by the hardware
+ enum: [0, 1]
+
+ de-active:
+ description: |
+ Data enable.
+ 0 selects active low, 1 selects active high.
+ If omitted then it is not used by the hardware
+ enum: [0, 1]
+
+ pixelclk-active:
+ description: |
+ Data driving on rising or falling edge.
+ Use 0 to drive pixel data on falling edge and
+ sample data on rising edge.
+ Use 1 to drive pixel data on rising edge and
+ sample data on falling edge
+ enum: [0, 1]
+
+ syncclk-active:
+ description: |
+ Drive sync on rising or sample sync on falling edge.
+ If not specified then the setup is as specified by pixelclk-active.
+ Use 0 to drive sync on falling edge and
+ sample sync on rising edge of pixel clock.
+ Use 1 to drive sync on rising edge and
+ sample sync on falling edge of pixel clock
+ enum: [0, 1]
+
+ 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
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/3] dt-bindings: display: convert display-timings to DT schema
2020-01-25 20:34 [PATCH v2 0/3] dt-bindings: convert timing + panel-dpi to DT schema Sam Ravnborg
2020-01-25 20:34 ` [PATCH v2 1/3] dt-bindings: display: add panel-timing.yaml Sam Ravnborg
@ 2020-01-25 20:34 ` Sam Ravnborg
2020-01-31 17:40 ` Rob Herring
2020-01-25 20:34 ` [PATCH v2 3/3] dt-bindings: display: convert panel-dpi " Sam Ravnborg
2020-01-31 17:14 ` [PATCH v2 0/3] dt-bindings: convert timing + " Sam Ravnborg
3 siblings, 1 reply; 9+ messages in thread
From: Sam Ravnborg @ 2020-01-25 20:34 UTC (permalink / raw)
To: Rob Herring, dri-devel, devicetree
Cc: Peter Ujfalusi, Oleksandr Suvorov, Thierry Reding,
Laurent Pinchart, Steffen Trumtrar, Sam Ravnborg
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
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Rob Herring <robh@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
---
.../bindings/display/panel/display-timing.txt | 124 +-----------------
.../display/panel/display-timings.yaml | 68 ++++++++++
2 files changed, 69 insertions(+), 123 deletions(-)
create mode 100644 Documentation/devicetree/bindings/display/panel/display-timings.yaml
diff --git a/Documentation/devicetree/bindings/display/panel/display-timing.txt b/Documentation/devicetree/bindings/display/panel/display-timing.txt
index 78222ced1874..7f55ad4a40c4 100644
--- a/Documentation/devicetree/bindings/display/panel/display-timing.txt
+++ b/Documentation/devicetree/bindings/display/panel/display-timing.txt
@@ -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.
diff --git a/Documentation/devicetree/bindings/display/panel/display-timings.yaml b/Documentation/devicetree/bindings/display/panel/display-timings.yaml
new file mode 100644
index 000000000000..508302cd307a
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/display-timings.yaml
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/display-timings.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: display timing bindings
+
+maintainers:
+ - Thierry Reding <thierry.reding@gmail.com>
+ - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
+ - Sam Ravnborg <sam@ravnborg.org>
+
+properties:
+ $nodename:
+ const: display-timings
+
+ native-mode:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: |
+ The default dispaly timing is the one specified as native-mode.
+ If no native-mode is specified then the first node is assume the
+ native mode.
+
+patternProperties:
+ "^timing.*$":
+ allOf:
+ - $ref: panel-timing.yaml#
+
+additionalProperties: false
+
+examples:
+ - |+
+
+ /*
+ * Example that specifies panel timing using minimum, typical,
+ * maximum values as commonly used in datasheet description.
+ * timing1 is the native-mode.
+ */
+ display-timings {
+ native-mode = <&timing1>;
+ timing0 {
+ /* 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>;
+ };
+ timing1 {
+ /* 1920x1080p24 */
+ clock-frequency = <52000000>;
+ hactive = <1920>;
+ vactive = <1080>;
+ hfront-porch = <25>;
+ hback-porch = <25>;
+ hsync-len = <0 25 25>;
+ vback-porch = <2>;
+ vfront-porch = <2>;
+ vsync-len = <2>;
+ hsync-active = <1>;
+ pixelclk-active = <1>;
+ };
+ };
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/3] dt-bindings: display: convert panel-dpi to DT schema
2020-01-25 20:34 [PATCH v2 0/3] dt-bindings: convert timing + panel-dpi to DT schema Sam Ravnborg
2020-01-25 20:34 ` [PATCH v2 1/3] dt-bindings: display: add panel-timing.yaml Sam Ravnborg
2020-01-25 20:34 ` [PATCH v2 2/3] dt-bindings: display: convert display-timings to DT schema Sam Ravnborg
@ 2020-01-25 20:34 ` Sam Ravnborg
2020-01-31 17:40 ` Rob Herring
2020-01-31 17:14 ` [PATCH v2 0/3] dt-bindings: convert timing + " Sam Ravnborg
3 siblings, 1 reply; 9+ messages in thread
From: Sam Ravnborg @ 2020-01-25 20:34 UTC (permalink / raw)
To: Rob Herring, dri-devel, devicetree
Cc: Peter Ujfalusi, Oleksandr Suvorov, Thierry Reding,
Laurent Pinchart, Steffen Trumtrar, Sam Ravnborg
With panel-timing converted, now convert the single
remaining .txt user in panel/ of panel-timing to DT schema.
v2:
- Drop Thierry as maintainer, as this is not a general panel binding
and I have no acks.
- Drop requirement for a panel- specific binding - "panel-dpi" is enough
- Updated example
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Maxime Ripard <mripard@kernel.org>
---
.../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
diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.txt b/Documentation/devicetree/bindings/display/panel/panel-dpi.txt
deleted file mode 100644
index 6b203bc4d932..000000000000
--- a/Documentation/devicetree/bindings/display/panel/panel-dpi.txt
+++ /dev/null
@@ -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>;
- };
-};
diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
new file mode 100644
index 000000000000..a8e37318ec05
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
@@ -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 <sam@ravnborg.org>
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ 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.
+
+ 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 = "panel-dpi";
+ label = "lcd";
+ vcc-supply = <&vcc_supply>;
+
+ backlight = <&backlight>;
+
+ port {
+ lcd_in: endpoint {
+ remote-endpoint = <&dpi_out>;
+ };
+ };
+ panel-timing {
+ clock-frequency = <9200000>;
+ hactive = <800>;
+ vactive = <480>;
+ 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>;
+ };
+ };
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/3] dt-bindings: convert timing + panel-dpi to DT schema
2020-01-25 20:34 [PATCH v2 0/3] dt-bindings: convert timing + panel-dpi to DT schema Sam Ravnborg
` (2 preceding siblings ...)
2020-01-25 20:34 ` [PATCH v2 3/3] dt-bindings: display: convert panel-dpi " Sam Ravnborg
@ 2020-01-31 17:14 ` Sam Ravnborg
3 siblings, 0 replies; 9+ messages in thread
From: Sam Ravnborg @ 2020-01-31 17:14 UTC (permalink / raw)
To: Rob Herring, dri-devel, devicetree
Cc: Peter Ujfalusi, Oleksandr Suvorov, Thierry Reding,
Laurent Pinchart, Steffen Trumtrar
Hi all.
On Sat, Jan 25, 2020 at 09:34:51PM +0100, Sam Ravnborg wrote:
> 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.
>
> Thanks for the quick responses on v2 and likewise the quick
> feedback on the request for the license change!
>
> Highlights from v2 - see individual patches for details.
> - Got acks for the license change
> - Simplfied panel-timings bindings
> - panel-dpi can now be used without a panel specific compatible
> So panel-dpi can be used as a generic binding for dumb panels
Any feedback on this patchset?
Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: display: convert panel-dpi to DT schema
2020-01-25 20:34 ` [PATCH v2 3/3] dt-bindings: display: convert panel-dpi " Sam Ravnborg
@ 2020-01-31 17:40 ` Rob Herring
2020-01-31 19:41 ` Sam Ravnborg
0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2020-01-31 17:40 UTC (permalink / raw)
To: Sam Ravnborg
Cc: devicetree, Peter Ujfalusi, Oleksandr Suvorov, Thierry Reding,
dri-devel, Steffen Trumtrar, Laurent Pinchart
On Sat, Jan 25, 2020 at 2:35 PM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> With panel-timing converted, now convert the single
> remaining .txt user in panel/ of panel-timing to DT schema.
>
> v2:
> - Drop Thierry as maintainer, as this is not a general panel binding
> and I have no acks.
> - Drop requirement for a panel- specific binding - "panel-dpi" is enough
> - Updated example
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> ---
> .../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
>
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.txt b/Documentation/devicetree/bindings/display/panel/panel-dpi.txt
> deleted file mode 100644
> index 6b203bc4d932..000000000000
> --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.txt
> +++ /dev/null
> @@ -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>;
> - };
> -};
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> new file mode 100644
> index 000000000000..a8e37318ec05
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> @@ -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 <sam@ravnborg.org>
> +
> +allOf:
> + - $ref: panel-common.yaml#
> +
> +properties:
> + 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.
While this has occurred, I don't think the schema should allow it. I
think a 'minItems: 2' should be added here.
AFAIK, MIPI DPI just defines a spec for what already existed. Maybe it
constrains things somewhat, but to the extent why we require a panel
specific compatible in the first place? Doubtful...
Rob
> + port: true
> +
> +required:
> + - panel-timing
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + panel@0 {
> + compatible = "panel-dpi";
> + label = "lcd";
> + vcc-supply = <&vcc_supply>;
> +
> + backlight = <&backlight>;
> +
> + port {
> + lcd_in: endpoint {
> + remote-endpoint = <&dpi_out>;
> + };
> + };
> + panel-timing {
> + clock-frequency = <9200000>;
> + hactive = <800>;
> + vactive = <480>;
> + 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>;
> + };
> + };
> --
> 2.20.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] dt-bindings: display: convert display-timings to DT schema
2020-01-25 20:34 ` [PATCH v2 2/3] dt-bindings: display: convert display-timings to DT schema Sam Ravnborg
@ 2020-01-31 17:40 ` Rob Herring
0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2020-01-31 17:40 UTC (permalink / raw)
To: Sam Ravnborg
Cc: devicetree, Peter Ujfalusi, Oleksandr Suvorov, Thierry Reding,
dri-devel, Steffen Trumtrar, Laurent Pinchart
On Sat, Jan 25, 2020 at 2:35 PM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> 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
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Rob Herring <robh@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
> ---
> .../bindings/display/panel/display-timing.txt | 124 +-----------------
> .../display/panel/display-timings.yaml | 68 ++++++++++
> 2 files changed, 69 insertions(+), 123 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/display/panel/display-timings.yaml
> diff --git a/Documentation/devicetree/bindings/display/panel/display-timings.yaml b/Documentation/devicetree/bindings/display/panel/display-timings.yaml
> new file mode 100644
> index 000000000000..508302cd307a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/display-timings.yaml
> @@ -0,0 +1,68 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/display-timings.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: display timing bindings
> +
> +maintainers:
> + - Thierry Reding <thierry.reding@gmail.com>
> + - Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> + - Sam Ravnborg <sam@ravnborg.org>
> +
> +properties:
> + $nodename:
> + const: display-timings
> +
> + native-mode:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: |
> + The default dispaly timing is the one specified as native-mode.
> + If no native-mode is specified then the first node is assume the
> + native mode.
> +
> +patternProperties:
> + "^timing.*$":
'.*$' can be omitted.
Probably should have a 'type: object' here too.
With that,
Reviewed-by: Rob Herring <robh@kernel.org>
> + allOf:
> + - $ref: panel-timing.yaml#
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: display: add panel-timing.yaml
2020-01-25 20:34 ` [PATCH v2 1/3] dt-bindings: display: add panel-timing.yaml Sam Ravnborg
@ 2020-01-31 17:41 ` Rob Herring
0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2020-01-31 17:41 UTC (permalink / raw)
To: Sam Ravnborg
Cc: devicetree, Peter Ujfalusi, Oleksandr Suvorov, Thierry Reding,
dri-devel, Steffen Trumtrar, Laurent Pinchart
On Sat, Jan 25, 2020 at 2:35 PM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> Add meta-schema variant of panel-timing and
> reference it from panel-common.yaml.
>
> Part of this came form other files with other
> licenses - original commits:
>
> cc3f414cf2e4 ("video: add of helper for display timings/videomode")
> 86f46565dff3 ("dt-bindings: display: display-timing: Add property to configure sync drive edge")
> 9cad9c95d7e8 ("Documentation: DocBook DRM framework documentation")
>
> The original authors acked the license change to:
> (GPL-2.0-only OR BSD-2-Clause)
>
> v2:
> - Got OK from original authors for re-license
> Huge thanks for the quick replies!
> - Typo fixes (Oleksandr)
> - Drop -array variant when not needed (Maxime)
> - Replace oneOf:... with enum (Maxime)
> - Drop type from clock-frequency (Rob)
> - Drop "|" when not needed (Rob)
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Acked-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
> .../bindings/display/panel/panel-common.yaml | 7 +-
> .../bindings/display/panel/panel-timing.yaml | 227 ++++++++++++++++++
> 2 files changed, 230 insertions(+), 4 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/display/panel/panel-timing.yaml
Reviewed-by: Rob Herring <robh@kernel.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: display: convert panel-dpi to DT schema
2020-01-31 17:40 ` Rob Herring
@ 2020-01-31 19:41 ` Sam Ravnborg
0 siblings, 0 replies; 9+ messages in thread
From: Sam Ravnborg @ 2020-01-31 19:41 UTC (permalink / raw)
To: Rob Herring
Cc: devicetree, Peter Ujfalusi, Oleksandr Suvorov, Thierry Reding,
dri-devel, Steffen Trumtrar, Laurent Pinchart
Hi Rob.
> > +
> > +properties:
> > + 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.
>
> While this has occurred, I don't think the schema should allow it. I
> think a 'minItems: 2' should be added here.
>
> AFAIK, MIPI DPI just defines a spec for what already existed. Maybe it
> constrains things somewhat, but to the extent why we require a panel
> specific compatible in the first place? Doubtful...
You triggered me to re-read some old thread about this.
And I think I got it now.
Based on a proposal you made some weeks ago I did it like this:
properties:
compatible:
description:
Shall contain a panel specific compatible and "panel-dpi"
in that order.
items:
- {}
- const: panel-dpi
So no constraints on the panel specific compatible, expect that it is present.
And panel-dpi must be listed as the second compatible.
Updated the example too.
Will post a v3.
Thanks!
Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-01-31 19:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-25 20:34 [PATCH v2 0/3] dt-bindings: convert timing + panel-dpi to DT schema Sam Ravnborg
2020-01-25 20:34 ` [PATCH v2 1/3] dt-bindings: display: add panel-timing.yaml Sam Ravnborg
2020-01-31 17:41 ` Rob Herring
2020-01-25 20:34 ` [PATCH v2 2/3] dt-bindings: display: convert display-timings to DT schema Sam Ravnborg
2020-01-31 17:40 ` Rob Herring
2020-01-25 20:34 ` [PATCH v2 3/3] dt-bindings: display: convert panel-dpi " Sam Ravnborg
2020-01-31 17:40 ` Rob Herring
2020-01-31 19:41 ` Sam Ravnborg
2020-01-31 17:14 ` [PATCH v2 0/3] dt-bindings: convert timing + " Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).