Hello,
This small patch series converts DT bindings for several bridges used by the R-Car DU to YAML. The R-Car DWC HDMI TX is left out and will be addressed in a separate series.
Patch 1/4 starts with a cleanup to disallow additional properties in "ports" nodes of the existing YAML bridge bindings. Patch 2/4 to 4/4 then convert simple bridges (adi,adv7123, dumb-vga-dac and ti,ths813x), thine,thc63lvd1024 and renesas,lvds.
I've volunteered Maxime and Jacopo as maintainers for the simple-bridge and thine,thc63lvd1024 bindings, as the original authors. Please let me know if you would like your name removed, or ack the patch otherwise.
Laurent Pinchart (4): dt-bindings: display: bridge: Reject additional properties in ports node dt-bindings: display: bridge: Convert simple-bridge bindings to YAML dt-bindings: display: bridge: thc63lvd1024: Convert binding to YAML dt-bindings: display: bridge: renesas,lvds: Convert binding to YAML
.../bindings/display/bridge/adi,adv7123.txt | 50 ---- .../bindings/display/bridge/anx6345.yaml | 8 + .../bindings/display/bridge/dumb-vga-dac.txt | 50 ---- .../bindings/display/bridge/lvds-codec.yaml | 8 + .../bindings/display/bridge/ps8640.yaml | 8 + .../bindings/display/bridge/renesas,lvds.txt | 85 ------ .../bindings/display/bridge/renesas,lvds.yaml | 248 ++++++++++++++++++ .../display/bridge/simple-bridge.yaml | 99 +++++++ .../display/bridge/thine,thc63lvd1024.txt | 66 ----- .../display/bridge/thine,thc63lvd1024.yaml | 121 +++++++++ .../bindings/display/bridge/ti,ths813x.txt | 51 ---- 11 files changed, 492 insertions(+), 302 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt delete mode 100644 Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt delete mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml create mode 100644 Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml delete mode 100644 Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml delete mode 100644 Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt
Document the #address-cells and #size-cells properties of the ports node in the schemas of the bridge DT bindings, and set additionalProperties to false to reject additional properties.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- .../devicetree/bindings/display/bridge/anx6345.yaml | 8 ++++++++ .../devicetree/bindings/display/bridge/lvds-codec.yaml | 8 ++++++++ .../devicetree/bindings/display/bridge/ps8640.yaml | 8 ++++++++ 3 files changed, 24 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/bridge/anx6345.yaml b/Documentation/devicetree/bindings/display/bridge/anx6345.yaml index c21103869923..8c0e4f285fbc 100644 --- a/Documentation/devicetree/bindings/display/bridge/anx6345.yaml +++ b/Documentation/devicetree/bindings/display/bridge/anx6345.yaml @@ -37,6 +37,12 @@ properties: type: object
properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + port@0: type: object description: | @@ -51,6 +57,8 @@ properties: required: - port@0
+ additionalProperties: false + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml index 8f373029f5d2..800c63764e71 100644 --- a/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml +++ b/Documentation/devicetree/bindings/display/bridge/lvds-codec.yaml @@ -50,6 +50,12 @@ properties: This device has two video ports. Their connections are modeled using the OF graph bindings specified in Documentation/devicetree/bindings/graph.txt properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + port@0: type: object description: | @@ -66,6 +72,8 @@ properties: - port@0 - port@1
+ additionalProperties: false + powerdown-gpios: description: The GPIO used to control the power down line of this device. diff --git a/Documentation/devicetree/bindings/display/bridge/ps8640.yaml b/Documentation/devicetree/bindings/display/bridge/ps8640.yaml index 5dff93641bea..7e27cfcf770d 100644 --- a/Documentation/devicetree/bindings/display/bridge/ps8640.yaml +++ b/Documentation/devicetree/bindings/display/bridge/ps8640.yaml @@ -50,6 +50,12 @@ properties: Documentation/devicetree/bindings/media/video-interfaces.txt Documentation/devicetree/bindings/graph.txt properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + port@0: type: object description: | @@ -63,6 +69,8 @@ properties: required: - port@0
+ additionalProperties: false + required: - compatible - reg
On Mon, Apr 06, 2020 at 02:23:15AM +0300, Laurent Pinchart wrote:
Document the #address-cells and #size-cells properties of the ports node in the schemas of the bridge DT bindings, and set additionalProperties to false to reject additional properties.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
Acked-by: Maxime Ripard mripard@kernel.org
Maxime
On Mon, 6 Apr 2020 02:23:15 +0300, Laurent Pinchart wrote:
Document the #address-cells and #size-cells properties of the ports node in the schemas of the bridge DT bindings, and set additionalProperties to false to reject additional properties.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
.../devicetree/bindings/display/bridge/anx6345.yaml | 8 ++++++++ .../devicetree/bindings/display/bridge/lvds-codec.yaml | 8 ++++++++ .../devicetree/bindings/display/bridge/ps8640.yaml | 8 ++++++++ 3 files changed, 24 insertions(+)
Acked-by: Rob Herring robh@kernel.org
The simple-bridge driver supports multiple simple or dumb bridges, covered by different compatible strings but otherwise identical DT bindings. Some of those bridges have undocumented bindings, while others are documented in text form in separate files. Group them all in a single binding and convert it to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- .../bindings/display/bridge/adi,adv7123.txt | 50 ---------- .../bindings/display/bridge/dumb-vga-dac.txt | 50 ---------- .../display/bridge/simple-bridge.yaml | 99 +++++++++++++++++++ .../bindings/display/bridge/ti,ths813x.txt | 51 ---------- 4 files changed, 99 insertions(+), 151 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt delete mode 100644 Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml delete mode 100644 Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt
diff --git a/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt b/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt deleted file mode 100644 index a6b2b2b8f3d9..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt +++ /dev/null @@ -1,50 +0,0 @@ -Analog Device ADV7123 Video DAC -------------------------------- - -The ADV7123 is a digital-to-analog converter that outputs VGA signals from a -parallel video input. - -Required properties: - -- compatible: Should be "adi,adv7123" - -Optional properties: - -- psave-gpios: Power save control GPIO - -Required nodes: - -The ADV7123 has two video ports. Their connections are modeled using the OF -graph bindings specified in Documentation/devicetree/bindings/graph.txt. - -- Video port 0 for DPI input -- Video port 1 for VGA output - - -Example -------- - - adv7123: encoder@0 { - compatible = "adi,adv7123"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - adv7123_in: endpoint@0 { - remote-endpoint = <&dpi_out>; - }; - }; - - port@1 { - reg = <1>; - - adv7123_out: endpoint@0 { - remote-endpoint = <&vga_connector_in>; - }; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt b/Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt deleted file mode 100644 index 164cbb15f04c..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt +++ /dev/null @@ -1,50 +0,0 @@ -Dumb RGB to VGA DAC bridge ---------------------------- - -This binding is aimed for dumb RGB to VGA DAC based bridges that do not require -any configuration. - -Required properties: - -- compatible: Must be "dumb-vga-dac" - -Required nodes: - -This device has two video ports. Their connections are modelled using the OF -graph bindings specified in Documentation/devicetree/bindings/graph.txt. - -- Video port 0 for RGB input -- Video port 1 for VGA output - -Optional properties: -- vdd-supply: Power supply for DAC - -Example -------- - -bridge { - compatible = "dumb-vga-dac"; - #address-cells = <1>; - #size-cells = <0>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - vga_bridge_in: endpoint { - remote-endpoint = <&tcon0_out_vga>; - }; - }; - - port@1 { - reg = <1>; - - vga_bridge_out: endpoint { - remote-endpoint = <&vga_con_in>; - }; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml b/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml new file mode 100644 index 000000000000..0880cbf217d5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/simple-bridge.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Transparent non-programmable DRM bridges + +maintainers: + - Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com + - Maxime Ripard mripard@kernel.org + +description: | + This binding supports transparent non-programmable bridges that don't require + any configuration, with a single input and a single output. + +properties: + compatible: + oneOf: + - items: + - enum: + - ti,ths8134a + - ti,ths8134b + - const: ti,ths8134 + - enum: + - adi,adv7123 + - dumb-vga-dac + - ti,opa362 + - ti,ths8134 + - ti,ths8135 + + ports: + type: object + description: | + This device has two video ports. Their connections are modeled using the + OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + port@0: + type: object + description: The bridge input + + port@1: + type: object + description: The bridge output + + required: + - port@0 + - port@1 + + additionalProperties: false + + enable-gpios: + maxItems: 1 + description: GPIO controlling bridge enable + + vdd-supply: + maxItems: 1 + description: Power supply for the bridge + +required: + - compatible + - ports + +additionalProperties: false + +examples: + - | + bridge { + compatible = "ti,ths8134a", "ti,ths8134"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + vga_bridge_in: endpoint { + remote-endpoint = <&tcon0_out_vga>; + }; + }; + + port@1 { + reg = <1>; + + vga_bridge_out: endpoint { + remote-endpoint = <&vga_con_in>; + }; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt b/Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt deleted file mode 100644 index df3d7c1ac09e..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt +++ /dev/null @@ -1,51 +0,0 @@ -THS8134 and THS8135 Video DAC ------------------------------ - -This is the binding for Texas Instruments THS8134, THS8134A, THS8134B and -THS8135 Video DAC bridges. - -Required properties: - -- compatible: Must be one of - "ti,ths8134" - "ti,ths8134a," "ti,ths8134" - "ti,ths8134b", "ti,ths8134" - "ti,ths8135" - -Required nodes: - -This device has two video ports. Their connections are modelled using the OF -graph bindings specified in Documentation/devicetree/bindings/graph.txt. - -- Video port 0 for RGB input -- Video port 1 for VGA output - -Example -------- - -vga-bridge { - compatible = "ti,ths8135"; - #address-cells = <1>; - #size-cells = <0>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - vga_bridge_in: endpoint { - remote-endpoint = <&lcdc_out_vga>; - }; - }; - - port@1 { - reg = <1>; - - vga_bridge_out: endpoint { - remote-endpoint = <&vga_con_in>; - }; - }; - }; -};
On Mon, Apr 06, 2020 at 02:23:16AM +0300, Laurent Pinchart wrote:
The simple-bridge driver supports multiple simple or dumb bridges, covered by different compatible strings but otherwise identical DT bindings. Some of those bridges have undocumented bindings, while others are documented in text form in separate files. Group them all in a single binding and convert it to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
Acked-by: Maxime Ripard mripard@kernel.org
Maxime
On Mon, Apr 06, 2020 at 02:23:16AM +0300, Laurent Pinchart wrote:
The simple-bridge driver supports multiple simple or dumb bridges, covered by different compatible strings but otherwise identical DT bindings. Some of those bridges have undocumented bindings, while others are documented in text form in separate files. Group them all in a single binding and convert it to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
.../bindings/display/bridge/adi,adv7123.txt | 50 ---------- .../bindings/display/bridge/dumb-vga-dac.txt | 50 ---------- .../display/bridge/simple-bridge.yaml | 99 +++++++++++++++++++ .../bindings/display/bridge/ti,ths813x.txt | 51 ---------- 4 files changed, 99 insertions(+), 151 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt delete mode 100644 Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml delete mode 100644 Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt
diff --git a/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt b/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt deleted file mode 100644 index a6b2b2b8f3d9..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt +++ /dev/null @@ -1,50 +0,0 @@
-Analog Device ADV7123 Video DAC
-The ADV7123 is a digital-to-analog converter that outputs VGA signals from a -parallel video input.
-Required properties:
-- compatible: Should be "adi,adv7123"
-Optional properties:
-- psave-gpios: Power save control GPIO
Not documented in the new schema. Did you intend to change to 'enable-gpios'?
Rob
Hi Rob,
On Tue, Apr 14, 2020 at 05:00:00PM -0500, Rob Herring wrote:
On Mon, Apr 06, 2020 at 02:23:16AM +0300, Laurent Pinchart wrote:
The simple-bridge driver supports multiple simple or dumb bridges, covered by different compatible strings but otherwise identical DT bindings. Some of those bridges have undocumented bindings, while others are documented in text form in separate files. Group them all in a single binding and convert it to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
.../bindings/display/bridge/adi,adv7123.txt | 50 ---------- .../bindings/display/bridge/dumb-vga-dac.txt | 50 ---------- .../display/bridge/simple-bridge.yaml | 99 +++++++++++++++++++ .../bindings/display/bridge/ti,ths813x.txt | 51 ---------- 4 files changed, 99 insertions(+), 151 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt delete mode 100644 Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml delete mode 100644 Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt
diff --git a/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt b/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt deleted file mode 100644 index a6b2b2b8f3d9..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt +++ /dev/null @@ -1,50 +0,0 @@
-Analog Device ADV7123 Video DAC
-The ADV7123 is a digital-to-analog converter that outputs VGA signals from a -parallel video input.
-Required properties:
-- compatible: Should be "adi,adv7123"
-Optional properties:
-- psave-gpios: Power save control GPIO
Not documented in the new schema. Did you intend to change to 'enable-gpios'?
Oops, I forgot to mention that, my bad. The psave GPIO isn't supported by the driver, and isn't used in any upstream DT files, so I thought it would be safe to drop it, and add support it later (possibly through the enable GPIO) if/when needed. I'll mention it in the commit message.
The simple-bridge driver supports multiple simple or dumb bridges, covered by different compatible strings but otherwise identical DT bindings. Some of those bridges have undocumented bindings, while others are documented in text form in separate files. Group them all in a single binding and convert it to YAML.
The psave-gpios property of the adi,adv7123 is dropped, as it isn't supported by the driver and isn't specified in any DT file upstream. Support for power saving is available through the enable-gpios property that should cover all the needs of the ADV7123 (as the device only has a /PSAVE pin and no enable pin).
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org --- Changes since v1:
- Mention dropping psave-gpios in the commit message. --- .../bindings/display/bridge/adi,adv7123.txt | 50 ---------- .../bindings/display/bridge/dumb-vga-dac.txt | 50 ---------- .../display/bridge/simple-bridge.yaml | 99 +++++++++++++++++++ .../bindings/display/bridge/ti,ths813x.txt | 51 ---------- 4 files changed, 99 insertions(+), 151 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt delete mode 100644 Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml delete mode 100644 Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt
diff --git a/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt b/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt deleted file mode 100644 index a6b2b2b8f3d9..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt +++ /dev/null @@ -1,50 +0,0 @@ -Analog Device ADV7123 Video DAC -------------------------------- - -The ADV7123 is a digital-to-analog converter that outputs VGA signals from a -parallel video input. - -Required properties: - -- compatible: Should be "adi,adv7123" - -Optional properties: - -- psave-gpios: Power save control GPIO - -Required nodes: - -The ADV7123 has two video ports. Their connections are modeled using the OF -graph bindings specified in Documentation/devicetree/bindings/graph.txt. - -- Video port 0 for DPI input -- Video port 1 for VGA output - - -Example -------- - - adv7123: encoder@0 { - compatible = "adi,adv7123"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - adv7123_in: endpoint@0 { - remote-endpoint = <&dpi_out>; - }; - }; - - port@1 { - reg = <1>; - - adv7123_out: endpoint@0 { - remote-endpoint = <&vga_connector_in>; - }; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt b/Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt deleted file mode 100644 index 164cbb15f04c..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt +++ /dev/null @@ -1,50 +0,0 @@ -Dumb RGB to VGA DAC bridge ---------------------------- - -This binding is aimed for dumb RGB to VGA DAC based bridges that do not require -any configuration. - -Required properties: - -- compatible: Must be "dumb-vga-dac" - -Required nodes: - -This device has two video ports. Their connections are modelled using the OF -graph bindings specified in Documentation/devicetree/bindings/graph.txt. - -- Video port 0 for RGB input -- Video port 1 for VGA output - -Optional properties: -- vdd-supply: Power supply for DAC - -Example -------- - -bridge { - compatible = "dumb-vga-dac"; - #address-cells = <1>; - #size-cells = <0>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - vga_bridge_in: endpoint { - remote-endpoint = <&tcon0_out_vga>; - }; - }; - - port@1 { - reg = <1>; - - vga_bridge_out: endpoint { - remote-endpoint = <&vga_con_in>; - }; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml b/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml new file mode 100644 index 000000000000..0880cbf217d5 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/simple-bridge.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Transparent non-programmable DRM bridges + +maintainers: + - Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com + - Maxime Ripard mripard@kernel.org + +description: | + This binding supports transparent non-programmable bridges that don't require + any configuration, with a single input and a single output. + +properties: + compatible: + oneOf: + - items: + - enum: + - ti,ths8134a + - ti,ths8134b + - const: ti,ths8134 + - enum: + - adi,adv7123 + - dumb-vga-dac + - ti,opa362 + - ti,ths8134 + - ti,ths8135 + + ports: + type: object + description: | + This device has two video ports. Their connections are modeled using the + OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + port@0: + type: object + description: The bridge input + + port@1: + type: object + description: The bridge output + + required: + - port@0 + - port@1 + + additionalProperties: false + + enable-gpios: + maxItems: 1 + description: GPIO controlling bridge enable + + vdd-supply: + maxItems: 1 + description: Power supply for the bridge + +required: + - compatible + - ports + +additionalProperties: false + +examples: + - | + bridge { + compatible = "ti,ths8134a", "ti,ths8134"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + vga_bridge_in: endpoint { + remote-endpoint = <&tcon0_out_vga>; + }; + }; + + port@1 { + reg = <1>; + + vga_bridge_out: endpoint { + remote-endpoint = <&vga_con_in>; + }; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt b/Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt deleted file mode 100644 index df3d7c1ac09e..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt +++ /dev/null @@ -1,51 +0,0 @@ -THS8134 and THS8135 Video DAC ------------------------------ - -This is the binding for Texas Instruments THS8134, THS8134A, THS8134B and -THS8135 Video DAC bridges. - -Required properties: - -- compatible: Must be one of - "ti,ths8134" - "ti,ths8134a," "ti,ths8134" - "ti,ths8134b", "ti,ths8134" - "ti,ths8135" - -Required nodes: - -This device has two video ports. Their connections are modelled using the OF -graph bindings specified in Documentation/devicetree/bindings/graph.txt. - -- Video port 0 for RGB input -- Video port 1 for VGA output - -Example -------- - -vga-bridge { - compatible = "ti,ths8135"; - #address-cells = <1>; - #size-cells = <0>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - vga_bridge_in: endpoint { - remote-endpoint = <&lcdc_out_vga>; - }; - }; - - port@1 { - reg = <1>; - - vga_bridge_out: endpoint { - remote-endpoint = <&vga_con_in>; - }; - }; - }; -};
On Tue, Apr 14, 2020 at 7:59 PM Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com wrote:
The simple-bridge driver supports multiple simple or dumb bridges, covered by different compatible strings but otherwise identical DT bindings. Some of those bridges have undocumented bindings, while others are documented in text form in separate files. Group them all in a single binding and convert it to YAML.
The psave-gpios property of the adi,adv7123 is dropped, as it isn't supported by the driver and isn't specified in any DT file upstream. Support for power saving is available through the enable-gpios property that should cover all the needs of the ADV7123 (as the device only has a /PSAVE pin and no enable pin).
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org
Changes since v1:
- Mention dropping psave-gpios in the commit message.
.../bindings/display/bridge/adi,adv7123.txt | 50 ---------- .../bindings/display/bridge/dumb-vga-dac.txt | 50 ---------- .../display/bridge/simple-bridge.yaml | 99 +++++++++++++++++++ .../bindings/display/bridge/ti,ths813x.txt | 51 ---------- 4 files changed, 99 insertions(+), 151 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/adi,adv7123.txt delete mode 100644 Documentation/devicetree/bindings/display/bridge/dumb-vga-dac.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/simple-bridge.yaml delete mode 100644 Documentation/devicetree/bindings/display/bridge/ti,ths813x.txt
Reviewed-by: Rob Herring robh@kernel.org
Convert the Thine THC63LVD1024 text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- .../display/bridge/thine,thc63lvd1024.txt | 66 ---------- .../display/bridge/thine,thc63lvd1024.yaml | 121 ++++++++++++++++++ 2 files changed, 121 insertions(+), 66 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml
diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt deleted file mode 100644 index d17d1e5820d7..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt +++ /dev/null @@ -1,66 +0,0 @@ -Thine Electronics THC63LVD1024 LVDS decoder -------------------------------------------- - -The THC63LVD1024 is a dual link LVDS receiver designed to convert LVDS streams -to parallel data outputs. The chip supports single/dual input/output modes, -handling up to two LVDS input streams and up to two digital CMOS/TTL outputs. - -Single or dual operation mode, output data mapping and DDR output modes are -configured through input signals and the chip does not expose any control bus. - -Required properties: -- compatible: Shall be "thine,thc63lvd1024" -- vcc-supply: Power supply for TTL output, TTL CLOCKOUT signal, LVDS input, - PPL and digital circuitry - -Optional properties: -- powerdown-gpios: Power down GPIO signal, pin name "/PDWN". Active low -- oe-gpios: Output enable GPIO signal, pin name "OE". Active high - -The THC63LVD1024 video port connections are modeled according -to OF graph bindings specified by Documentation/devicetree/bindings/graph.txt - -Required video port nodes: -- port@0: First LVDS input port -- port@2: First digital CMOS/TTL parallel output - -Optional video port nodes: -- port@1: Second LVDS input port -- port@3: Second digital CMOS/TTL parallel output - -The device can operate in single-link mode or dual-link mode. In single-link -mode, all pixels are received on port@0, and port@1 shall not contain any -endpoint. In dual-link mode, even-numbered pixels are received on port@0 and -odd-numbered pixels on port@1, and both port@0 and port@1 shall contain -endpoints. - -Example: --------- - - thc63lvd1024: lvds-decoder { - compatible = "thine,thc63lvd1024"; - - vcc-supply = <®_lvds_vcc>; - powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - - lvds_dec_in_0: endpoint { - remote-endpoint = <&lvds_out>; - }; - }; - - port@2{ - reg = <2>; - - lvds_dec_out_2: endpoint { - remote-endpoint = <&adv7511_in>; - }; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml new file mode 100644 index 000000000000..469ac4a34273 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml @@ -0,0 +1,121 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/thine,thc63lvd1024.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Thine Electronics THC63LVD1024 LVDS Decoder + +maintainers: + - Jacopo Mondi jacopo+renesas@jmondi.org + - Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com + +description: | + The THC63LVD1024 is a dual link LVDS receiver designed to convert LVDS + streams to parallel data outputs. The chip supports single/dual input/output + modes, handling up to two LVDS input streams and up to two digital CMOS/TTL + outputs. + + Single or dual operation mode, output data mapping and DDR output modes are + configured through input signals and the chip does not expose any control + bus. + +properties: + compatible: + const: thine,thc63lvd1024 + + ports: + type: object + description: | + This device has four video ports. Their connections are modeled using the + OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. + + The device can operate in single-link mode or dual-link mode. In + single-link mode, all pixels are received on port@0, and port@1 shall not + contain any endpoint. In dual-link mode, even-numbered pixels are + received on port@0 and odd-numbered pixels on port@1, and both port@0 and + port@1 shall contain endpoints. + + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + port@0: + type: object + description: First LVDS input port + + port@1: + type: object + description: Second LVDS input port + + port@2: + type: object + description: First digital CMOS/TTL parallel output + + port@3: + type: object + description: Second digital CMOS/TTL parallel output + + required: + - port@0 + - port@2 + + additionalProperties: false + + oe-gpios: + maxItems: 1 + description: Output enable GPIO signal, pin name "OE", active high. + + powerdown-gpios: + maxItems: 1 + description: Power down GPIO signal, pin name "/PDWN", active low. + + vcc-supply: + maxItems: 1 + description: + Power supply for the TTL output, TTL CLOCKOUT signal, LVDS input, PLL and + digital circuitry. + +required: + - compatible + - ports + - vcc-supply + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + + lvds-decoder { + compatible = "thine,thc63lvd1024"; + + vcc-supply = <®_lvds_vcc>; + powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lvds_dec_in_0: endpoint { + remote-endpoint = <&lvds_out>; + }; + }; + + port@2 { + reg = <2>; + + lvds_dec_out_2: endpoint { + remote-endpoint = <&adv7511_in>; + }; + }; + }; + }; + +...
Hi Laurent,
On Mon, Apr 06, 2020 at 02:23:17AM +0300, Laurent Pinchart wrote:
Convert the Thine THC63LVD1024 text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
.../display/bridge/thine,thc63lvd1024.txt | 66 ---------- .../display/bridge/thine,thc63lvd1024.yaml | 121 ++++++++++++++++++ 2 files changed, 121 insertions(+), 66 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml
diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt deleted file mode 100644 index d17d1e5820d7..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt +++ /dev/null @@ -1,66 +0,0 @@
-Thine Electronics THC63LVD1024 LVDS decoder
-The THC63LVD1024 is a dual link LVDS receiver designed to convert LVDS streams -to parallel data outputs. The chip supports single/dual input/output modes, -handling up to two LVDS input streams and up to two digital CMOS/TTL outputs.
-Single or dual operation mode, output data mapping and DDR output modes are -configured through input signals and the chip does not expose any control bus.
-Required properties: -- compatible: Shall be "thine,thc63lvd1024" -- vcc-supply: Power supply for TTL output, TTL CLOCKOUT signal, LVDS input,
- PPL and digital circuitry
-Optional properties: -- powerdown-gpios: Power down GPIO signal, pin name "/PDWN". Active low -- oe-gpios: Output enable GPIO signal, pin name "OE". Active high
-The THC63LVD1024 video port connections are modeled according -to OF graph bindings specified by Documentation/devicetree/bindings/graph.txt
-Required video port nodes: -- port@0: First LVDS input port -- port@2: First digital CMOS/TTL parallel output
-Optional video port nodes: -- port@1: Second LVDS input port -- port@3: Second digital CMOS/TTL parallel output
-The device can operate in single-link mode or dual-link mode. In single-link -mode, all pixels are received on port@0, and port@1 shall not contain any -endpoint. In dual-link mode, even-numbered pixels are received on port@0 and -odd-numbered pixels on port@1, and both port@0 and port@1 shall contain -endpoints.
-Example:
- thc63lvd1024: lvds-decoder {
compatible = "thine,thc63lvd1024";
vcc-supply = <®_lvds_vcc>;
powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds_dec_in_0: endpoint {
remote-endpoint = <&lvds_out>;
};
};
port@2{
reg = <2>;
lvds_dec_out_2: endpoint {
remote-endpoint = <&adv7511_in>;
};
};
};
- };
diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml new file mode 100644 index 000000000000..469ac4a34273 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml @@ -0,0 +1,121 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/thine,thc63lvd1024.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#
+title: Thine Electronics THC63LVD1024 LVDS Decoder
+maintainers:
- Jacopo Mondi jacopo+renesas@jmondi.org
Ack
- Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
+description: |
- The THC63LVD1024 is a dual link LVDS receiver designed to convert LVDS
- streams to parallel data outputs. The chip supports single/dual input/output
- modes, handling up to two LVDS input streams and up to two digital CMOS/TTL
- outputs.
- Single or dual operation mode, output data mapping and DDR output modes are
- configured through input signals and the chip does not expose any control
- bus.
+properties:
- compatible:
- const: thine,thc63lvd1024
- ports:
- type: object
- description: |
This device has four video ports. Their connections are modeled using the
OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
The device can operate in single-link mode or dual-link mode. In
single-link mode, all pixels are received on port@0, and port@1 shall not
contain any endpoint. In dual-link mode, even-numbered pixels are
received on port@0 and odd-numbered pixels on port@1, and both port@0 and
port@1 shall contain endpoints.
I wonder why we have documented only single/dual input mode and not single/dual output mode too. The driver only supports single input and single output, but this might be a good occasion to document the output port mapping as well.
How about
The device can operate in single or dual input and output modes.
When operating in single input mode, all pixels are received on port@0, and port@1 shall not contain any endpoint. In dual input mode, even-numbered pixels are received on port@0 and odd-numbered pixels on port@1, and both port@0 and port@1 shall contain endpoints.
When operating in single output mode all pixels are output from the first CMOS/TTL port and port@3 shall not contain any endpoint. In dual output mode pixels are output from both CMOS/TTL ports and both port@2 and port@3 shall contain endpoints.
With or without this, as the new bindings are not worse than what they where already:
Reviewed-by: Jacopo Mondi jacopo+renesas@jmondi.org
Thanks j
- properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
port@0:
type: object
description: First LVDS input port
port@1:
type: object
description: Second LVDS input port
port@2:
type: object
description: First digital CMOS/TTL parallel output
port@3:
type: object
description: Second digital CMOS/TTL parallel output
- required:
- port@0
- port@2
- additionalProperties: false
- oe-gpios:
- maxItems: 1
- description: Output enable GPIO signal, pin name "OE", active high.
- powerdown-gpios:
- maxItems: 1
- description: Power down GPIO signal, pin name "/PDWN", active low.
- vcc-supply:
- maxItems: 1
- description:
Power supply for the TTL output, TTL CLOCKOUT signal, LVDS input, PLL and
digital circuitry.
+required:
- compatible
- ports
- vcc-supply
+additionalProperties: false
+examples:
- |
- #include <dt-bindings/gpio/gpio.h>
- lvds-decoder {
compatible = "thine,thc63lvd1024";
vcc-supply = <®_lvds_vcc>;
powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds_dec_in_0: endpoint {
remote-endpoint = <&lvds_out>;
};
};
port@2 {
reg = <2>;
lvds_dec_out_2: endpoint {
remote-endpoint = <&adv7511_in>;
};
};
};
- };
+...
Regards,
Laurent Pinchart
Hi Jacopo,
On Mon, Apr 06, 2020 at 08:40:31AM +0200, Jacopo Mondi wrote:
On Mon, Apr 06, 2020 at 02:23:17AM +0300, Laurent Pinchart wrote:
Convert the Thine THC63LVD1024 text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
.../display/bridge/thine,thc63lvd1024.txt | 66 ---------- .../display/bridge/thine,thc63lvd1024.yaml | 121 ++++++++++++++++++ 2 files changed, 121 insertions(+), 66 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml
diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt deleted file mode 100644 index d17d1e5820d7..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt +++ /dev/null @@ -1,66 +0,0 @@
-Thine Electronics THC63LVD1024 LVDS decoder
-The THC63LVD1024 is a dual link LVDS receiver designed to convert LVDS streams -to parallel data outputs. The chip supports single/dual input/output modes, -handling up to two LVDS input streams and up to two digital CMOS/TTL outputs.
-Single or dual operation mode, output data mapping and DDR output modes are -configured through input signals and the chip does not expose any control bus.
-Required properties: -- compatible: Shall be "thine,thc63lvd1024" -- vcc-supply: Power supply for TTL output, TTL CLOCKOUT signal, LVDS input,
- PPL and digital circuitry
-Optional properties: -- powerdown-gpios: Power down GPIO signal, pin name "/PDWN". Active low -- oe-gpios: Output enable GPIO signal, pin name "OE". Active high
-The THC63LVD1024 video port connections are modeled according -to OF graph bindings specified by Documentation/devicetree/bindings/graph.txt
-Required video port nodes: -- port@0: First LVDS input port -- port@2: First digital CMOS/TTL parallel output
-Optional video port nodes: -- port@1: Second LVDS input port -- port@3: Second digital CMOS/TTL parallel output
-The device can operate in single-link mode or dual-link mode. In single-link -mode, all pixels are received on port@0, and port@1 shall not contain any -endpoint. In dual-link mode, even-numbered pixels are received on port@0 and -odd-numbered pixels on port@1, and both port@0 and port@1 shall contain -endpoints.
-Example:
- thc63lvd1024: lvds-decoder {
compatible = "thine,thc63lvd1024";
vcc-supply = <®_lvds_vcc>;
powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds_dec_in_0: endpoint {
remote-endpoint = <&lvds_out>;
};
};
port@2{
reg = <2>;
lvds_dec_out_2: endpoint {
remote-endpoint = <&adv7511_in>;
};
};
};
- };
diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml new file mode 100644 index 000000000000..469ac4a34273 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml @@ -0,0 +1,121 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/thine,thc63lvd1024.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#
+title: Thine Electronics THC63LVD1024 LVDS Decoder
+maintainers:
- Jacopo Mondi jacopo+renesas@jmondi.org
Ack
- Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
+description: |
- The THC63LVD1024 is a dual link LVDS receiver designed to convert LVDS
- streams to parallel data outputs. The chip supports single/dual input/output
- modes, handling up to two LVDS input streams and up to two digital CMOS/TTL
- outputs.
- Single or dual operation mode, output data mapping and DDR output modes are
- configured through input signals and the chip does not expose any control
- bus.
+properties:
- compatible:
- const: thine,thc63lvd1024
- ports:
- type: object
- description: |
This device has four video ports. Their connections are modeled using the
OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
The device can operate in single-link mode or dual-link mode. In
single-link mode, all pixels are received on port@0, and port@1 shall not
contain any endpoint. In dual-link mode, even-numbered pixels are
received on port@0 and odd-numbered pixels on port@1, and both port@0 and
port@1 shall contain endpoints.
I wonder why we have documented only single/dual input mode and not single/dual output mode too. The driver only supports single input and single output, but this might be a good occasion to document the output port mapping as well.
How about
The device can operate in single or dual input and output modes. When operating in single input mode, all pixels are received on port@0, and port@1 shall not contain any endpoint. In dual input mode, even-numbered pixels are received on port@0 and odd-numbered pixels on port@1, and both port@0 and port@1 shall contain endpoints. When operating in single output mode all pixels are output from the first CMOS/TTL port and port@3 shall not contain any endpoint. In dual output mode pixels are output from both CMOS/TTL ports and both port@2 and port@3 shall contain endpoints.
This is a good idea, but I'll split it to a separate patch as it makes sense to review it independently of the conversion.
With or without this, as the new bindings are not worse than what they where already:
Reviewed-by: Jacopo Mondi jacopo+renesas@jmondi.org
- properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
port@0:
type: object
description: First LVDS input port
port@1:
type: object
description: Second LVDS input port
port@2:
type: object
description: First digital CMOS/TTL parallel output
port@3:
type: object
description: Second digital CMOS/TTL parallel output
- required:
- port@0
- port@2
- additionalProperties: false
- oe-gpios:
- maxItems: 1
- description: Output enable GPIO signal, pin name "OE", active high.
- powerdown-gpios:
- maxItems: 1
- description: Power down GPIO signal, pin name "/PDWN", active low.
- vcc-supply:
- maxItems: 1
- description:
Power supply for the TTL output, TTL CLOCKOUT signal, LVDS input, PLL and
digital circuitry.
+required:
- compatible
- ports
- vcc-supply
+additionalProperties: false
+examples:
- |
- #include <dt-bindings/gpio/gpio.h>
- lvds-decoder {
compatible = "thine,thc63lvd1024";
vcc-supply = <®_lvds_vcc>;
powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds_dec_in_0: endpoint {
remote-endpoint = <&lvds_out>;
};
};
port@2 {
reg = <2>;
lvds_dec_out_2: endpoint {
remote-endpoint = <&adv7511_in>;
};
};
};
- };
+...
The DT binding support both dual-input and dual-output mode, but only dual-input is documented. Document dual-output mode.
Suggested-by: Jacopo Mondi jacopo+renesas@jmondi.org Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- .../display/bridge/thine,thc63lvd1024.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml index 469ac4a34273..fedd3460d6f6 100644 --- a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml +++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml @@ -30,11 +30,17 @@ properties: This device has four video ports. Their connections are modeled using the OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
- The device can operate in single-link mode or dual-link mode. In - single-link mode, all pixels are received on port@0, and port@1 shall not - contain any endpoint. In dual-link mode, even-numbered pixels are - received on port@0 and odd-numbered pixels on port@1, and both port@0 and - port@1 shall contain endpoints. + The device can operate in single or dual input and output modes. + + When operating in single input mode, all pixels are received on port@0, + and port@1 shall not contain any endpoint. In dual input mode, + even-numbered pixels are received on port@0 and odd-numbered pixels on + port@1, and both port@0 and port@1 shall contain endpoints. + + When operating in single output mode all pixels are output from the first + CMOS/TTL port and port@3 shall not contain any endpoint. In dual output + mode pixels are output from both CMOS/TTL ports and both port@2 and + port@3 shall contain endpoints.
properties: '#address-cells':
Hi Laurent,
On Thu, May 14, 2020 at 02:21:27AM +0300, Laurent Pinchart wrote:
The DT binding support both dual-input and dual-output mode, but only dual-input is documented. Document dual-output mode.
Suggested-by: Jacopo Mondi jacopo+renesas@jmondi.org Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
Thanks Acked-by: Jacopo Mondi jacopo@jmondi.org
.../display/bridge/thine,thc63lvd1024.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml index 469ac4a34273..fedd3460d6f6 100644 --- a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml +++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml @@ -30,11 +30,17 @@ properties: This device has four video ports. Their connections are modeled using the OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
The device can operate in single-link mode or dual-link mode. In
single-link mode, all pixels are received on port@0, and port@1 shall not
contain any endpoint. In dual-link mode, even-numbered pixels are
received on port@0 and odd-numbered pixels on port@1, and both port@0 and
port@1 shall contain endpoints.
The device can operate in single or dual input and output modes.
When operating in single input mode, all pixels are received on port@0,
and port@1 shall not contain any endpoint. In dual input mode,
even-numbered pixels are received on port@0 and odd-numbered pixels on
port@1, and both port@0 and port@1 shall contain endpoints.
When operating in single output mode all pixels are output from the first
CMOS/TTL port and port@3 shall not contain any endpoint. In dual output
mode pixels are output from both CMOS/TTL ports and both port@2 and
port@3 shall contain endpoints.
properties: '#address-cells':
-- Regards,
Laurent Pinchart
On Thu, 14 May 2020 02:21:27 +0300, Laurent Pinchart wrote:
The DT binding support both dual-input and dual-output mode, but only dual-input is documented. Document dual-output mode.
Suggested-by: Jacopo Mondi jacopo+renesas@jmondi.org Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
.../display/bridge/thine,thc63lvd1024.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
Reviewed-by: Rob Herring robh@kernel.org
On Mon, Apr 06, 2020 at 02:23:17AM +0300, Laurent Pinchart wrote:
Convert the Thine THC63LVD1024 text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
Acked-by: Maxime Ripard mripard@kernel.org
Maxime
On Mon, 6 Apr 2020 02:23:17 +0300, Laurent Pinchart wrote:
Convert the Thine THC63LVD1024 text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
.../display/bridge/thine,thc63lvd1024.txt | 66 ---------- .../display/bridge/thine,thc63lvd1024.yaml | 121 ++++++++++++++++++ 2 files changed, 121 insertions(+), 66 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.yaml
Reviewed-by: Rob Herring robh@kernel.org
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- .../bindings/display/bridge/renesas,lvds.txt | 85 ------ .../bindings/display/bridge/renesas,lvds.yaml | 248 ++++++++++++++++++ 2 files changed, 248 insertions(+), 85 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt deleted file mode 100644 index c62ce2494ed9..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt +++ /dev/null @@ -1,85 +0,0 @@ -Renesas R-Car LVDS Encoder -========================== - -These DT bindings describe the LVDS encoder embedded in the Renesas R-Car -Gen2, R-Car Gen3 and RZ/G SoCs. - -Required properties: - -- compatible : Shall contain one of - - "renesas,r8a7743-lvds" for R8A7743 (RZ/G1M) compatible LVDS encoders - - "renesas,r8a7744-lvds" for R8A7744 (RZ/G1N) compatible LVDS encoders - - "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders - - "renesas,r8a774b1-lvds" for R8A774B1 (RZ/G2N) compatible LVDS encoders - - "renesas,r8a774c0-lvds" for R8A774C0 (RZ/G2E) compatible LVDS encoders - - "renesas,r8a7790-lvds" for R8A7790 (R-Car H2) compatible LVDS encoders - - "renesas,r8a7791-lvds" for R8A7791 (R-Car M2-W) compatible LVDS encoders - - "renesas,r8a7793-lvds" for R8A7793 (R-Car M2-N) compatible LVDS encoders - - "renesas,r8a7795-lvds" for R8A7795 (R-Car H3) compatible LVDS encoders - - "renesas,r8a7796-lvds" for R8A7796 (R-Car M3-W) compatible LVDS encoders - - "renesas,r8a77965-lvds" for R8A77965 (R-Car M3-N) compatible LVDS encoders - - "renesas,r8a77970-lvds" for R8A77970 (R-Car V3M) compatible LVDS encoders - - "renesas,r8a77980-lvds" for R8A77980 (R-Car V3H) compatible LVDS encoders - - "renesas,r8a77990-lvds" for R8A77990 (R-Car E3) compatible LVDS encoders - - "renesas,r8a77995-lvds" for R8A77995 (R-Car D3) compatible LVDS encoders - -- reg: Base address and length for the memory-mapped registers -- clocks: A list of phandles + clock-specifier pairs, one for each entry in - the clock-names property. -- clock-names: Name of the clocks. This property is model-dependent. - - The functional clock, which mandatory for all models, shall be listed - first, and shall be named "fck". - - On R8A77990, R8A77995 and R8A774C0, the LVDS encoder can use the EXTAL or - DU_DOTCLKINx clocks. Those clocks are optional. When supplied they must be - named "extal" and "dclkin.x" respectively, with "x" being the DU_DOTCLKIN - numerical index. - - When the clocks property only contains the functional clock, the - clock-names property may be omitted. -- resets: A phandle + reset specifier for the module reset - -Required nodes: - -The LVDS encoder has two video ports. Their connections are modelled using the -OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. - -- Video port 0 corresponds to the parallel RGB input -- Video port 1 corresponds to the LVDS output - -Each port shall have a single endpoint. - -Optional properties: - -- renesas,companion : phandle to the companion LVDS encoder. This property is - mandatory for the first LVDS encoder on D3 and E3 SoCs, and shall point to - the second encoder to be used as a companion in dual-link mode. It shall not - be set for any other LVDS encoder. - - -Example: - - lvds0: lvds@feb90000 { - compatible = "renesas,r8a77990-lvds"; - reg = <0 0xfeb90000 0 0x20>; - clocks = <&cpg CPG_MOD 727>; - power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; - resets = <&cpg 727>; - - renesas,companion = <&lvds1>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - lvds0_in: endpoint { - remote-endpoint = <&du_out_lvds0>; - }; - }; - port@1 { - reg = <1>; - lvds0_out: endpoint { - }; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml new file mode 100644 index 000000000000..47af3dea3075 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -0,0 +1,248 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/renesas,lvds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas R-Car LVDS Encoder + +maintainers: + - Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com + +description: | + These DT bindings describe the LVDS encoder embedded in the Renesas R-Car + Gen2, R-Car Gen3 and RZ/G SoCs. + +properties: + compatible: + enum: + - renesas,r8a7743-lvds # for R8A7743 (RZ/G1M) compatible LVDS encoders + - renesas,r8a7744-lvds # for R8A7744 (RZ/G1N) compatible LVDS encoders + - renesas,r8a774a1-lvds # for R8A774A1 (RZ/G2M) compatible LVDS encoders + - renesas,r8a774b1-lvds # for R8A774B1 (RZ/G2N) compatible LVDS encoders + - renesas,r8a774c0-lvds # for R8A774C0 (RZ/G2E) compatible LVDS encoders + - renesas,r8a7790-lvds # for R8A7790 (R-Car H2) compatible LVDS encoders + - renesas,r8a7791-lvds # for R8A7791 (R-Car M2-W) compatible LVDS encoders + - renesas,r8a7793-lvds # for R8A7793 (R-Car M2-N) compatible LVDS encoders + - renesas,r8a7795-lvds # for R8A7795 (R-Car H3) compatible LVDS encoders + - renesas,r8a7796-lvds # for R8A7796 (R-Car M3-W) compatible LVDS encoders + - renesas,r8a77965-lvds # for R8A77965 (R-Car M3-N) compatible LVDS encoders + - renesas,r8a77970-lvds # for R8A77970 (R-Car V3M) compatible LVDS encoders + - renesas,r8a77980-lvds # for R8A77980 (R-Car V3H) compatible LVDS encoders + - renesas,r8a77990-lvds # for R8A77990 (R-Car E3) compatible LVDS encoders + - renesas,r8a77995-lvds # for R8A77995 (R-Car D3) compatible LVDS encoders + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 4 + + clock-names: + minItems: 1 + maxItems: 4 + + resets: + maxItems: 1 + + ports: + type: object + description: | + This device has two video ports. Their connections are modelled using the + OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. + Each port shall have a single endpoint. + + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + port@0: + type: object + description: Parallel RGB input port + + port@1: + type: object + description: LVDS output port + + required: + - port@0 + - port@1 + + additionalProperties: false + + power-domains: + maxItems: 1 + + renesas,companion: + $ref: /schemas/types.yaml#/definitions/phandle + description: + phandle to the companion LVDS encoder. This property is mandatory + for the first LVDS encoder on D3 and E3 SoCs, and shall point to + the second encoder to be used as a companion in dual-link mode. It + shall not be set for any other LVDS encoder. + +required: + - compatible + - reg + - clocks + - power-domains + - resets + - ports + +if: + properties: + compatible: + enum: + - renesas,r8a774c0-lvds + - renesas,r8a77990-lvds + - renesas,r8a77995-lvds +then: + properties: + clocks: + minItems: 1 + maxItems: 4 + items: + - description: Functional clock + - description: EXTAL input clock + - description: DU_DOTCLKIN0 input clock + - description: DU_DOTCLKIN1 input clock + + clock-names: + minItems: 1 + maxItems: 4 + items: + - const: fck + # The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks. + # These clocks are optional. + - enum: + - extal + - dclkin.0 + - dclkin.1 + - enum: + - extal + - dclkin.0 + - dclkin.1 + - enum: + - extal + - dclkin.0 + - dclkin.1 + + required: + - clock-names + +else: + properties: + clocks: + maxItems: 1 + items: + - description: Functional clock + + clock-names: + maxItems: 1 + items: + - const: fck + + renesas,companion: false + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/renesas-cpg-mssr.h> + #include <dt-bindings/power/r8a7795-sysc.h> + + lvds@feb90000 { + compatible = "renesas,r8a7795-lvds"; + reg = <0 0xfeb90000 0 0x14>; + clocks = <&cpg CPG_MOD 727>; + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; + resets = <&cpg 727>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds_in: endpoint { + remote-endpoint = <&du_out_lvds0>; + }; + }; + port@1 { + reg = <1>; + lvds_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + }; + + - | + #include <dt-bindings/clock/renesas-cpg-mssr.h> + #include <dt-bindings/power/r8a77990-sysc.h> + + lvds0: lvds@feb90000 { + compatible = "renesas,r8a77990-lvds"; + reg = <0 0xfeb90000 0 0x20>; + clocks = <&cpg CPG_MOD 727>, + <&x13_clk>, + <&extal_clk>; + clock-names = "fck", "dclkin.0", "extal"; + power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; + resets = <&cpg 727>; + + renesas,companion = <&lvds1>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds0_in: endpoint { + remote-endpoint = <&du_out_lvds0>; + }; + }; + port@1 { + reg = <1>; + lvds0_out: endpoint { + remote-endpoint = <&panel_in1>; + }; + }; + }; + }; + + lvds1: lvds@feb90100 { + compatible = "renesas,r8a77990-lvds"; + reg = <0 0xfeb90100 0 0x20>; + clocks = <&cpg CPG_MOD 727>, + <&x13_clk>, + <&extal_clk>; + clock-names = "fck", "dclkin.0", "extal"; + power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; + resets = <&cpg 726>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds1_in: endpoint { + remote-endpoint = <&du_out_lvds1>; + }; + }; + port@1 { + reg = <1>; + lvds1_out: endpoint { + remote-endpoint = <&panel_in2>; + }; + }; + }; + }; + +...
On Mon, Apr 06, 2020 at 02:23:18AM +0300, Laurent Pinchart wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
Acked-by: Maxime Ripard mripard@kernel.org
Maxime
Hi Laurent,
On Mon, Apr 6, 2020 at 1:24 AM Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
Thanks for your patch!
--- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -0,0 +1,248 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/renesas,lvds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#
+title: Renesas R-Car LVDS Encoder
+maintainers:
- Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
+description: |
- These DT bindings describe the LVDS encoder embedded in the Renesas R-Car
- Gen2, R-Car Gen3 and RZ/G SoCs.
RZ/G1 and RZ/G2 (no idea what'll RZ/G3 will bring ;-)
+properties:
- compatible:
- enum:
- renesas,r8a7743-lvds # for R8A7743 (RZ/G1M) compatible LVDS encoders
- renesas,r8a7744-lvds # for R8A7744 (RZ/G1N) compatible LVDS encoders
- renesas,r8a774a1-lvds # for R8A774A1 (RZ/G2M) compatible LVDS encoders
- renesas,r8a774b1-lvds # for R8A774B1 (RZ/G2N) compatible LVDS encoders
- renesas,r8a774c0-lvds # for R8A774C0 (RZ/G2E) compatible LVDS encoders
- renesas,r8a7790-lvds # for R8A7790 (R-Car H2) compatible LVDS encoders
- renesas,r8a7791-lvds # for R8A7791 (R-Car M2-W) compatible LVDS encoders
- renesas,r8a7793-lvds # for R8A7793 (R-Car M2-N) compatible LVDS encoders
- renesas,r8a7795-lvds # for R8A7795 (R-Car H3) compatible LVDS encoders
- renesas,r8a7796-lvds # for R8A7796 (R-Car M3-W) compatible LVDS encoders
R8A77960 (I know you don't have support for R8A77961 yet ;-)
- renesas,r8a77965-lvds # for R8A77965 (R-Car M3-N) compatible LVDS encoders
- renesas,r8a77970-lvds # for R8A77970 (R-Car V3M) compatible LVDS encoders
- renesas,r8a77980-lvds # for R8A77980 (R-Car V3H) compatible LVDS encoders
- renesas,r8a77990-lvds # for R8A77990 (R-Car E3) compatible LVDS encoders
- renesas,r8a77995-lvds # for R8A77995 (R-Car D3) compatible LVDS encoders
Wouldn't it be sufficient to just have the SoC name (e.g. "R-Car D3") in the comments?
+if:
- properties:
- compatible:
enum:
- renesas,r8a774c0-lvds
- renesas,r8a77990-lvds
- renesas,r8a77995-lvds
+then:
- properties:
- clocks:
minItems: 1
maxItems: 4
items:
- description: Functional clock
- description: EXTAL input clock
- description: DU_DOTCLKIN0 input clock
- description: DU_DOTCLKIN1 input clock
- clock-names:
minItems: 1
maxItems: 4
items:
- const: fck
# The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks.
# These clocks are optional.
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
Can the duplication of the last 3 entries be avoided? Perhaps like in Documentation/devicetree/bindings/serial/renesas,scif.yaml?
+examples:
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a7795-sysc.h>
- lvds@feb90000 {
compatible = "renesas,r8a7795-lvds";
reg = <0 0xfeb90000 0 0x14>;
Examples are built with #{address,size}-cells = <1>.
- lvds0: lvds@feb90000 {
compatible = "renesas,r8a77990-lvds";
reg = <0 0xfeb90000 0 0x20>;
Likewise.
- lvds1: lvds@feb90100 {
compatible = "renesas,r8a77990-lvds";
reg = <0 0xfeb90100 0 0x20>;
Likewise.
Gr{oetje,eeting}s,
Geert
Hi Geert,
On Mon, Apr 06, 2020 at 10:47:37AM +0200, Geert Uytterhoeven wrote:
On Mon, Apr 6, 2020 at 1:24 AM Laurent Pinchart wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
Thanks for your patch!
--- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -0,0 +1,248 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/renesas,lvds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#
+title: Renesas R-Car LVDS Encoder
+maintainers:
- Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
+description: |
- These DT bindings describe the LVDS encoder embedded in the Renesas R-Car
- Gen2, R-Car Gen3 and RZ/G SoCs.
RZ/G1 and RZ/G2 (no idea what'll RZ/G3 will bring ;-)
Fixed.
+properties:
- compatible:
- enum:
- renesas,r8a7743-lvds # for R8A7743 (RZ/G1M) compatible LVDS encoders
- renesas,r8a7744-lvds # for R8A7744 (RZ/G1N) compatible LVDS encoders
- renesas,r8a774a1-lvds # for R8A774A1 (RZ/G2M) compatible LVDS encoders
- renesas,r8a774b1-lvds # for R8A774B1 (RZ/G2N) compatible LVDS encoders
- renesas,r8a774c0-lvds # for R8A774C0 (RZ/G2E) compatible LVDS encoders
- renesas,r8a7790-lvds # for R8A7790 (R-Car H2) compatible LVDS encoders
- renesas,r8a7791-lvds # for R8A7791 (R-Car M2-W) compatible LVDS encoders
- renesas,r8a7793-lvds # for R8A7793 (R-Car M2-N) compatible LVDS encoders
- renesas,r8a7795-lvds # for R8A7795 (R-Car H3) compatible LVDS encoders
- renesas,r8a7796-lvds # for R8A7796 (R-Car M3-W) compatible LVDS encoders
R8A77960 (I know you don't have support for R8A77961 yet ;-)
- renesas,r8a77965-lvds # for R8A77965 (R-Car M3-N) compatible LVDS encoders
- renesas,r8a77970-lvds # for R8A77970 (R-Car V3M) compatible LVDS encoders
- renesas,r8a77980-lvds # for R8A77980 (R-Car V3H) compatible LVDS encoders
- renesas,r8a77990-lvds # for R8A77990 (R-Car E3) compatible LVDS encoders
- renesas,r8a77995-lvds # for R8A77995 (R-Car D3) compatible LVDS encoders
Wouldn't it be sufficient to just have the SoC name (e.g. "R-Car D3") in the comments?
Good idea. I've thus dropped R8A7796(0) :-)
+if:
- properties:
- compatible:
enum:
- renesas,r8a774c0-lvds
- renesas,r8a77990-lvds
- renesas,r8a77995-lvds
+then:
- properties:
- clocks:
minItems: 1
maxItems: 4
items:
- description: Functional clock
- description: EXTAL input clock
- description: DU_DOTCLKIN0 input clock
- description: DU_DOTCLKIN1 input clock
- clock-names:
minItems: 1
maxItems: 4
items:
- const: fck
# The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks.
# These clocks are optional.
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
Can the duplication of the last 3 entries be avoided? Perhaps like in Documentation/devicetree/bindings/serial/renesas,scif.yaml?
I'd love to, if you can tell me how to make sure the fck entry is mandatory. The following
minItems: 1 maxItems: 4 items: enum: - fck - extal - dclkin.0 - dclkin.1
passes the checks, but would accept
clock-names = "extal";
which is not valid. Your Documentation/devicetree/bindings/serial/renesas,scif.yaml bindings suffer from the same problem :-)
+examples:
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a7795-sysc.h>
- lvds@feb90000 {
compatible = "renesas,r8a7795-lvds";
reg = <0 0xfeb90000 0 0x14>;
Examples are built with #{address,size}-cells = <1>.
Are they ? I don't get any failure from make dt_binding_check.
- lvds0: lvds@feb90000 {
compatible = "renesas,r8a77990-lvds";
reg = <0 0xfeb90000 0 0x20>;
Likewise.
- lvds1: lvds@feb90100 {
compatible = "renesas,r8a77990-lvds";
reg = <0 0xfeb90100 0 0x20>;
Likewise.
Hi Laurent,
On Mon, Apr 6, 2020 at 1:09 PM Laurent Pinchart laurent.pinchart@ideasonboard.com wrote:
On Mon, Apr 06, 2020 at 10:47:37AM +0200, Geert Uytterhoeven wrote:
On Mon, Apr 6, 2020 at 1:24 AM Laurent Pinchart wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
+if:
- properties:
- compatible:
enum:
- renesas,r8a774c0-lvds
- renesas,r8a77990-lvds
- renesas,r8a77995-lvds
+then:
- properties:
- clocks:
minItems: 1
maxItems: 4
items:
- description: Functional clock
- description: EXTAL input clock
- description: DU_DOTCLKIN0 input clock
- description: DU_DOTCLKIN1 input clock
- clock-names:
minItems: 1
maxItems: 4
items:
- const: fck
# The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks.
# These clocks are optional.
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
Can the duplication of the last 3 entries be avoided? Perhaps like in Documentation/devicetree/bindings/serial/renesas,scif.yaml?
I'd love to, if you can tell me how to make sure the fck entry is mandatory. The following
minItems: 1 maxItems: 4 items: enum: - fck - extal - dclkin.0 - dclkin.1
passes the checks, but would accept
clock-names = "extal";
which is not valid. Your Documentation/devicetree/bindings/serial/renesas,scif.yaml bindings suffer from the same problem :-)
Hmm....
+examples:
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a7795-sysc.h>
- lvds@feb90000 {
compatible = "renesas,r8a7795-lvds";
reg = <0 0xfeb90000 0 0x14>;
Examples are built with #{address,size}-cells = <1>.
Are they ? I don't get any failure from make dt_binding_check.
Hmm... And you do have "reg: maxItems: 1"...
Gr{oetje,eeting}s,
Geert
On Mon, Apr 6, 2020 at 5:40 AM Geert Uytterhoeven geert@linux-m68k.org wrote:
Hi Laurent,
On Mon, Apr 6, 2020 at 1:09 PM Laurent Pinchart laurent.pinchart@ideasonboard.com wrote:
On Mon, Apr 06, 2020 at 10:47:37AM +0200, Geert Uytterhoeven wrote:
On Mon, Apr 6, 2020 at 1:24 AM Laurent Pinchart wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
+if:
- properties:
- compatible:
enum:
- renesas,r8a774c0-lvds
- renesas,r8a77990-lvds
- renesas,r8a77995-lvds
+then:
- properties:
- clocks:
minItems: 1
maxItems: 4
items:
- description: Functional clock
- description: EXTAL input clock
- description: DU_DOTCLKIN0 input clock
- description: DU_DOTCLKIN1 input clock
- clock-names:
minItems: 1
maxItems: 4
items:
- const: fck
# The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks.
# These clocks are optional.
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
Can the duplication of the last 3 entries be avoided? Perhaps like in Documentation/devicetree/bindings/serial/renesas,scif.yaml?
I'd love to, if you can tell me how to make sure the fck entry is mandatory. The following
minItems: 1 maxItems: 4 items: enum: - fck - extal - dclkin.0 - dclkin.1
passes the checks, but would accept
clock-names = "extal";
which is not valid. Your Documentation/devicetree/bindings/serial/renesas,scif.yaml bindings suffer from the same problem :-)
Hmm....
+examples:
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a7795-sysc.h>
- lvds@feb90000 {
compatible = "renesas,r8a7795-lvds";
reg = <0 0xfeb90000 0 0x14>;
Examples are built with #{address,size}-cells = <1>.
Are they ? I don't get any failure from make dt_binding_check.
Hmm... And you do have "reg: maxItems: 1"...
At first glance I was expecting an error too, but there isn't. As far as the schema is concerned, it's valid because it's a single entry (i.e. one entry in <>). And then dtc can only check that reg is a multiple of 2. The size check does work where we have more constraints like I2C.
If we enforce bracketing, then we should be able to check these. Otherwise, knowing both the cell sizes and number of entries is a problem. With bracketing, we can split those checks. I'd been thinking checking cell sizes would be easier in dtc (we're already doing that in lots of cases), but thinking about it some more there is a way to do this with schema:
if: properties: '#address-cells': const: 2 '#size-cells': const: 2 required: - '#address-cells' - '#size-cells' then: patternProperties: '@': properties: reg: items: minItems: 4 maxItems: 4 required: - reg
...and copy-n-paste for each size combination.
I imagine implementing this will result in another set of fixes.
Rob
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org --- Changes since v1:
- Mention RZ/G1 and R2/G2 explicitly - Drop the part numbers in comments, only keep the SoC names --- .../bindings/display/bridge/renesas,lvds.txt | 85 ------ .../bindings/display/bridge/renesas,lvds.yaml | 248 ++++++++++++++++++ 2 files changed, 248 insertions(+), 85 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt deleted file mode 100644 index c62ce2494ed9..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt +++ /dev/null @@ -1,85 +0,0 @@ -Renesas R-Car LVDS Encoder -========================== - -These DT bindings describe the LVDS encoder embedded in the Renesas R-Car -Gen2, R-Car Gen3 and RZ/G SoCs. - -Required properties: - -- compatible : Shall contain one of - - "renesas,r8a7743-lvds" for R8A7743 (RZ/G1M) compatible LVDS encoders - - "renesas,r8a7744-lvds" for R8A7744 (RZ/G1N) compatible LVDS encoders - - "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders - - "renesas,r8a774b1-lvds" for R8A774B1 (RZ/G2N) compatible LVDS encoders - - "renesas,r8a774c0-lvds" for R8A774C0 (RZ/G2E) compatible LVDS encoders - - "renesas,r8a7790-lvds" for R8A7790 (R-Car H2) compatible LVDS encoders - - "renesas,r8a7791-lvds" for R8A7791 (R-Car M2-W) compatible LVDS encoders - - "renesas,r8a7793-lvds" for R8A7793 (R-Car M2-N) compatible LVDS encoders - - "renesas,r8a7795-lvds" for R8A7795 (R-Car H3) compatible LVDS encoders - - "renesas,r8a7796-lvds" for R8A7796 (R-Car M3-W) compatible LVDS encoders - - "renesas,r8a77965-lvds" for R8A77965 (R-Car M3-N) compatible LVDS encoders - - "renesas,r8a77970-lvds" for R8A77970 (R-Car V3M) compatible LVDS encoders - - "renesas,r8a77980-lvds" for R8A77980 (R-Car V3H) compatible LVDS encoders - - "renesas,r8a77990-lvds" for R8A77990 (R-Car E3) compatible LVDS encoders - - "renesas,r8a77995-lvds" for R8A77995 (R-Car D3) compatible LVDS encoders - -- reg: Base address and length for the memory-mapped registers -- clocks: A list of phandles + clock-specifier pairs, one for each entry in - the clock-names property. -- clock-names: Name of the clocks. This property is model-dependent. - - The functional clock, which mandatory for all models, shall be listed - first, and shall be named "fck". - - On R8A77990, R8A77995 and R8A774C0, the LVDS encoder can use the EXTAL or - DU_DOTCLKINx clocks. Those clocks are optional. When supplied they must be - named "extal" and "dclkin.x" respectively, with "x" being the DU_DOTCLKIN - numerical index. - - When the clocks property only contains the functional clock, the - clock-names property may be omitted. -- resets: A phandle + reset specifier for the module reset - -Required nodes: - -The LVDS encoder has two video ports. Their connections are modelled using the -OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. - -- Video port 0 corresponds to the parallel RGB input -- Video port 1 corresponds to the LVDS output - -Each port shall have a single endpoint. - -Optional properties: - -- renesas,companion : phandle to the companion LVDS encoder. This property is - mandatory for the first LVDS encoder on D3 and E3 SoCs, and shall point to - the second encoder to be used as a companion in dual-link mode. It shall not - be set for any other LVDS encoder. - - -Example: - - lvds0: lvds@feb90000 { - compatible = "renesas,r8a77990-lvds"; - reg = <0 0xfeb90000 0 0x20>; - clocks = <&cpg CPG_MOD 727>; - power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; - resets = <&cpg 727>; - - renesas,companion = <&lvds1>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - lvds0_in: endpoint { - remote-endpoint = <&du_out_lvds0>; - }; - }; - port@1 { - reg = <1>; - lvds0_out: endpoint { - }; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml new file mode 100644 index 000000000000..33c06630a2dd --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -0,0 +1,248 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/renesas,lvds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas R-Car LVDS Encoder + +maintainers: + - Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com + +description: | + These DT bindings describe the LVDS encoder embedded in the Renesas R-Car + Gen2, R-Car Gen3, RZ/G1 and RZ/G2 SoCs. + +properties: + compatible: + enum: + - renesas,r8a7743-lvds # for RZ/G1M compatible LVDS encoders + - renesas,r8a7744-lvds # for RZ/G1N compatible LVDS encoders + - renesas,r8a774a1-lvds # for RZ/G2M compatible LVDS encoders + - renesas,r8a774b1-lvds # for RZ/G2N compatible LVDS encoders + - renesas,r8a774c0-lvds # for RZ/G2E compatible LVDS encoders + - renesas,r8a7790-lvds # for R-Car H2 compatible LVDS encoders + - renesas,r8a7791-lvds # for R-Car M2-W compatible LVDS encoders + - renesas,r8a7793-lvds # for R-Car M2-N compatible LVDS encoders + - renesas,r8a7795-lvds # for R-Car H3 compatible LVDS encoders + - renesas,r8a7796-lvds # for R-Car M3-W compatible LVDS encoders + - renesas,r8a77965-lvds # for R-Car M3-N compatible LVDS encoders + - renesas,r8a77970-lvds # for R-Car V3M compatible LVDS encoders + - renesas,r8a77980-lvds # for R-Car V3H compatible LVDS encoders + - renesas,r8a77990-lvds # for R-Car E3 compatible LVDS encoders + - renesas,r8a77995-lvds # for R-Car D3 compatible LVDS encoders + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 4 + + clock-names: + minItems: 1 + maxItems: 4 + + resets: + maxItems: 1 + + ports: + type: object + description: | + This device has two video ports. Their connections are modelled using the + OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. + Each port shall have a single endpoint. + + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + port@0: + type: object + description: Parallel RGB input port + + port@1: + type: object + description: LVDS output port + + required: + - port@0 + - port@1 + + additionalProperties: false + + power-domains: + maxItems: 1 + + renesas,companion: + $ref: /schemas/types.yaml#/definitions/phandle + description: + phandle to the companion LVDS encoder. This property is mandatory + for the first LVDS encoder on D3 and E3 SoCs, and shall point to + the second encoder to be used as a companion in dual-link mode. It + shall not be set for any other LVDS encoder. + +required: + - compatible + - reg + - clocks + - power-domains + - resets + - ports + +if: + properties: + compatible: + enum: + - renesas,r8a774c0-lvds + - renesas,r8a77990-lvds + - renesas,r8a77995-lvds +then: + properties: + clocks: + minItems: 1 + maxItems: 4 + items: + - description: Functional clock + - description: EXTAL input clock + - description: DU_DOTCLKIN0 input clock + - description: DU_DOTCLKIN1 input clock + + clock-names: + minItems: 1 + maxItems: 4 + items: + - const: fck + # The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks. + # These clocks are optional. + - enum: + - extal + - dclkin.0 + - dclkin.1 + - enum: + - extal + - dclkin.0 + - dclkin.1 + - enum: + - extal + - dclkin.0 + - dclkin.1 + + required: + - clock-names + +else: + properties: + clocks: + maxItems: 1 + items: + - description: Functional clock + + clock-names: + maxItems: 1 + items: + - const: fck + + renesas,companion: false + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/renesas-cpg-mssr.h> + #include <dt-bindings/power/r8a7795-sysc.h> + + lvds@feb90000 { + compatible = "renesas,r8a7795-lvds"; + reg = <0 0xfeb90000 0 0x14>; + clocks = <&cpg CPG_MOD 727>; + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; + resets = <&cpg 727>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds_in: endpoint { + remote-endpoint = <&du_out_lvds0>; + }; + }; + port@1 { + reg = <1>; + lvds_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + }; + + - | + #include <dt-bindings/clock/renesas-cpg-mssr.h> + #include <dt-bindings/power/r8a77990-sysc.h> + + lvds0: lvds@feb90000 { + compatible = "renesas,r8a77990-lvds"; + reg = <0 0xfeb90000 0 0x20>; + clocks = <&cpg CPG_MOD 727>, + <&x13_clk>, + <&extal_clk>; + clock-names = "fck", "dclkin.0", "extal"; + power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; + resets = <&cpg 727>; + + renesas,companion = <&lvds1>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds0_in: endpoint { + remote-endpoint = <&du_out_lvds0>; + }; + }; + port@1 { + reg = <1>; + lvds0_out: endpoint { + remote-endpoint = <&panel_in1>; + }; + }; + }; + }; + + lvds1: lvds@feb90100 { + compatible = "renesas,r8a77990-lvds"; + reg = <0 0xfeb90100 0 0x20>; + clocks = <&cpg CPG_MOD 727>, + <&x13_clk>, + <&extal_clk>; + clock-names = "fck", "dclkin.0", "extal"; + power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; + resets = <&cpg 726>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds1_in: endpoint { + remote-endpoint = <&du_out_lvds1>; + }; + }; + port@1 { + reg = <1>; + lvds1_out: endpoint { + remote-endpoint = <&panel_in2>; + }; + }; + }; + }; + +...
Hi Laurent,
On Thu, May 14, 2020 at 1:29 AM Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org
--- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
+examples:
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a7795-sysc.h>
- lvds@feb90000 {
compatible = "renesas,r8a7795-lvds";
reg = <0 0xfeb90000 0 0x14>;
#{address,size}-cells = <1> for examples. Applies to all nodes below, too.
Gr{oetje,eeting}s,
Geert
Hi Geert,
On Thu, May 14, 2020 at 09:31:53AM +0200, Geert Uytterhoeven wrote:
On Thu, May 14, 2020 at 1:29 AM Laurent Pinchart wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org
--- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
+examples:
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a7795-sysc.h>
- lvds@feb90000 {
compatible = "renesas,r8a7795-lvds";
reg = <0 0xfeb90000 0 0x14>;
#{address,size}-cells = <1> for examples. Applies to all nodes below, too.
Why ?
Hi Laurent,
On Thu, May 14, 2020 at 5:17 PM Laurent Pinchart laurent.pinchart@ideasonboard.com wrote:
On Thu, May 14, 2020 at 09:31:53AM +0200, Geert Uytterhoeven wrote:
On Thu, May 14, 2020 at 1:29 AM Laurent Pinchart wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org
--- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
+examples:
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a7795-sysc.h>
- lvds@feb90000 {
compatible = "renesas,r8a7795-lvds";
reg = <0 0xfeb90000 0 0x14>;
#{address,size}-cells = <1> for examples. Applies to all nodes below, too.
Why ?
See "[PATCH 5/5] dt-bindings: Fix incorrect 'reg' property sizes" https://lore.kernel.org/linux-devicetree/20200512204543.22090-5-robh@kernel....
Gr{oetje,eeting}s,
Geert
Hi Geert,
On Thu, May 14, 2020 at 09:02:54PM +0200, Geert Uytterhoeven wrote:
On Thu, May 14, 2020 at 5:17 PM Laurent Pinchart wrote:
On Thu, May 14, 2020 at 09:31:53AM +0200, Geert Uytterhoeven wrote:
On Thu, May 14, 2020 at 1:29 AM Laurent Pinchart wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org
--- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
+examples:
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a7795-sysc.h>
- lvds@feb90000 {
compatible = "renesas,r8a7795-lvds";
reg = <0 0xfeb90000 0 0x14>;
#{address,size}-cells = <1> for examples. Applies to all nodes below, too.
Why ?
See "[PATCH 5/5] dt-bindings: Fix incorrect 'reg' property sizes" https://lore.kernel.org/linux-devicetree/20200512204543.22090-5-robh@kernel....
I don't like this much as it creates invalid examples, but until we have a better solution, I'll reduce the number of cells.
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org --- Changes since v1:
- Mention RZ/G1 and R2/G2 explicitly - Drop the part numbers in comments, only keep the SoC names - Use one address and size cell in the examples --- .../bindings/display/bridge/renesas,lvds.txt | 85 ------ .../bindings/display/bridge/renesas,lvds.yaml | 248 ++++++++++++++++++ 2 files changed, 248 insertions(+), 85 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt deleted file mode 100644 index c62ce2494ed9..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt +++ /dev/null @@ -1,85 +0,0 @@ -Renesas R-Car LVDS Encoder -========================== - -These DT bindings describe the LVDS encoder embedded in the Renesas R-Car -Gen2, R-Car Gen3 and RZ/G SoCs. - -Required properties: - -- compatible : Shall contain one of - - "renesas,r8a7743-lvds" for R8A7743 (RZ/G1M) compatible LVDS encoders - - "renesas,r8a7744-lvds" for R8A7744 (RZ/G1N) compatible LVDS encoders - - "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders - - "renesas,r8a774b1-lvds" for R8A774B1 (RZ/G2N) compatible LVDS encoders - - "renesas,r8a774c0-lvds" for R8A774C0 (RZ/G2E) compatible LVDS encoders - - "renesas,r8a7790-lvds" for R8A7790 (R-Car H2) compatible LVDS encoders - - "renesas,r8a7791-lvds" for R8A7791 (R-Car M2-W) compatible LVDS encoders - - "renesas,r8a7793-lvds" for R8A7793 (R-Car M2-N) compatible LVDS encoders - - "renesas,r8a7795-lvds" for R8A7795 (R-Car H3) compatible LVDS encoders - - "renesas,r8a7796-lvds" for R8A7796 (R-Car M3-W) compatible LVDS encoders - - "renesas,r8a77965-lvds" for R8A77965 (R-Car M3-N) compatible LVDS encoders - - "renesas,r8a77970-lvds" for R8A77970 (R-Car V3M) compatible LVDS encoders - - "renesas,r8a77980-lvds" for R8A77980 (R-Car V3H) compatible LVDS encoders - - "renesas,r8a77990-lvds" for R8A77990 (R-Car E3) compatible LVDS encoders - - "renesas,r8a77995-lvds" for R8A77995 (R-Car D3) compatible LVDS encoders - -- reg: Base address and length for the memory-mapped registers -- clocks: A list of phandles + clock-specifier pairs, one for each entry in - the clock-names property. -- clock-names: Name of the clocks. This property is model-dependent. - - The functional clock, which mandatory for all models, shall be listed - first, and shall be named "fck". - - On R8A77990, R8A77995 and R8A774C0, the LVDS encoder can use the EXTAL or - DU_DOTCLKINx clocks. Those clocks are optional. When supplied they must be - named "extal" and "dclkin.x" respectively, with "x" being the DU_DOTCLKIN - numerical index. - - When the clocks property only contains the functional clock, the - clock-names property may be omitted. -- resets: A phandle + reset specifier for the module reset - -Required nodes: - -The LVDS encoder has two video ports. Their connections are modelled using the -OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. - -- Video port 0 corresponds to the parallel RGB input -- Video port 1 corresponds to the LVDS output - -Each port shall have a single endpoint. - -Optional properties: - -- renesas,companion : phandle to the companion LVDS encoder. This property is - mandatory for the first LVDS encoder on D3 and E3 SoCs, and shall point to - the second encoder to be used as a companion in dual-link mode. It shall not - be set for any other LVDS encoder. - - -Example: - - lvds0: lvds@feb90000 { - compatible = "renesas,r8a77990-lvds"; - reg = <0 0xfeb90000 0 0x20>; - clocks = <&cpg CPG_MOD 727>; - power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; - resets = <&cpg 727>; - - renesas,companion = <&lvds1>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - lvds0_in: endpoint { - remote-endpoint = <&du_out_lvds0>; - }; - }; - port@1 { - reg = <1>; - lvds0_out: endpoint { - }; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml new file mode 100644 index 000000000000..98c7330a9485 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -0,0 +1,248 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/renesas,lvds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas R-Car LVDS Encoder + +maintainers: + - Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com + +description: | + These DT bindings describe the LVDS encoder embedded in the Renesas R-Car + Gen2, R-Car Gen3, RZ/G1 and RZ/G2 SoCs. + +properties: + compatible: + enum: + - renesas,r8a7743-lvds # for RZ/G1M compatible LVDS encoders + - renesas,r8a7744-lvds # for RZ/G1N compatible LVDS encoders + - renesas,r8a774a1-lvds # for RZ/G2M compatible LVDS encoders + - renesas,r8a774b1-lvds # for RZ/G2N compatible LVDS encoders + - renesas,r8a774c0-lvds # for RZ/G2E compatible LVDS encoders + - renesas,r8a7790-lvds # for R-Car H2 compatible LVDS encoders + - renesas,r8a7791-lvds # for R-Car M2-W compatible LVDS encoders + - renesas,r8a7793-lvds # for R-Car M2-N compatible LVDS encoders + - renesas,r8a7795-lvds # for R-Car H3 compatible LVDS encoders + - renesas,r8a7796-lvds # for R-Car M3-W compatible LVDS encoders + - renesas,r8a77965-lvds # for R-Car M3-N compatible LVDS encoders + - renesas,r8a77970-lvds # for R-Car V3M compatible LVDS encoders + - renesas,r8a77980-lvds # for R-Car V3H compatible LVDS encoders + - renesas,r8a77990-lvds # for R-Car E3 compatible LVDS encoders + - renesas,r8a77995-lvds # for R-Car D3 compatible LVDS encoders + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 4 + + clock-names: + minItems: 1 + maxItems: 4 + + resets: + maxItems: 1 + + ports: + type: object + description: | + This device has two video ports. Their connections are modelled using the + OF graph bindings specified in Documentation/devicetree/bindings/graph.txt. + Each port shall have a single endpoint. + + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + port@0: + type: object + description: Parallel RGB input port + + port@1: + type: object + description: LVDS output port + + required: + - port@0 + - port@1 + + additionalProperties: false + + power-domains: + maxItems: 1 + + renesas,companion: + $ref: /schemas/types.yaml#/definitions/phandle + description: + phandle to the companion LVDS encoder. This property is mandatory + for the first LVDS encoder on D3 and E3 SoCs, and shall point to + the second encoder to be used as a companion in dual-link mode. It + shall not be set for any other LVDS encoder. + +required: + - compatible + - reg + - clocks + - power-domains + - resets + - ports + +if: + properties: + compatible: + enum: + - renesas,r8a774c0-lvds + - renesas,r8a77990-lvds + - renesas,r8a77995-lvds +then: + properties: + clocks: + minItems: 1 + maxItems: 4 + items: + - description: Functional clock + - description: EXTAL input clock + - description: DU_DOTCLKIN0 input clock + - description: DU_DOTCLKIN1 input clock + + clock-names: + minItems: 1 + maxItems: 4 + items: + - const: fck + # The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks. + # These clocks are optional. + - enum: + - extal + - dclkin.0 + - dclkin.1 + - enum: + - extal + - dclkin.0 + - dclkin.1 + - enum: + - extal + - dclkin.0 + - dclkin.1 + + required: + - clock-names + +else: + properties: + clocks: + maxItems: 1 + items: + - description: Functional clock + + clock-names: + maxItems: 1 + items: + - const: fck + + renesas,companion: false + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/renesas-cpg-mssr.h> + #include <dt-bindings/power/r8a7795-sysc.h> + + lvds@feb90000 { + compatible = "renesas,r8a7795-lvds"; + reg = <0xfeb90000 0x14>; + clocks = <&cpg CPG_MOD 727>; + power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; + resets = <&cpg 727>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds_in: endpoint { + remote-endpoint = <&du_out_lvds0>; + }; + }; + port@1 { + reg = <1>; + lvds_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + }; + + - | + #include <dt-bindings/clock/renesas-cpg-mssr.h> + #include <dt-bindings/power/r8a77990-sysc.h> + + lvds0: lvds@feb90000 { + compatible = "renesas,r8a77990-lvds"; + reg = <0xfeb90000 0x20>; + clocks = <&cpg CPG_MOD 727>, + <&x13_clk>, + <&extal_clk>; + clock-names = "fck", "dclkin.0", "extal"; + power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; + resets = <&cpg 727>; + + renesas,companion = <&lvds1>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds0_in: endpoint { + remote-endpoint = <&du_out_lvds0>; + }; + }; + port@1 { + reg = <1>; + lvds0_out: endpoint { + remote-endpoint = <&panel_in1>; + }; + }; + }; + }; + + lvds1: lvds@feb90100 { + compatible = "renesas,r8a77990-lvds"; + reg = <0xfeb90100 0x20>; + clocks = <&cpg CPG_MOD 727>, + <&x13_clk>, + <&extal_clk>; + clock-names = "fck", "dclkin.0", "extal"; + power-domains = <&sysc R8A77990_PD_ALWAYS_ON>; + resets = <&cpg 726>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + lvds1_in: endpoint { + remote-endpoint = <&du_out_lvds1>; + }; + }; + port@1 { + reg = <1>; + lvds1_out: endpoint { + remote-endpoint = <&panel_in2>; + }; + }; + }; + }; + +...
On Fri, 15 May 2020 00:42:11 +0300, Laurent Pinchart wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org
Changes since v1:
- Mention RZ/G1 and R2/G2 explicitly
- Drop the part numbers in comments, only keep the SoC names
- Use one address and size cell in the examples
.../bindings/display/bridge/renesas,lvds.txt | 85 ------ .../bindings/display/bridge/renesas,lvds.yaml | 248 ++++++++++++++++++ 2 files changed, 248 insertions(+), 85 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
Reviewed-by: Rob Herring robh@kernel.org
On Fri, May 15, 2020 at 12:42:11AM +0300, Laurent Pinchart wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org
Changes since v1:
- Mention RZ/G1 and R2/G2 explicitly
- Drop the part numbers in comments, only keep the SoC names
- Use one address and size cell in the examples
Seems this was not picked up so I went ahead and applied to drm-misc-next.
Sam
.../bindings/display/bridge/renesas,lvds.txt | 85 ------ .../bindings/display/bridge/renesas,lvds.yaml | 248 ++++++++++++++++++ 2 files changed, 248 insertions(+), 85 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt deleted file mode 100644 index c62ce2494ed9..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt +++ /dev/null @@ -1,85 +0,0 @@
-Renesas R-Car LVDS Encoder
-These DT bindings describe the LVDS encoder embedded in the Renesas R-Car -Gen2, R-Car Gen3 and RZ/G SoCs.
-Required properties:
-- compatible : Shall contain one of
- "renesas,r8a7743-lvds" for R8A7743 (RZ/G1M) compatible LVDS encoders
- "renesas,r8a7744-lvds" for R8A7744 (RZ/G1N) compatible LVDS encoders
- "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders
- "renesas,r8a774b1-lvds" for R8A774B1 (RZ/G2N) compatible LVDS encoders
- "renesas,r8a774c0-lvds" for R8A774C0 (RZ/G2E) compatible LVDS encoders
- "renesas,r8a7790-lvds" for R8A7790 (R-Car H2) compatible LVDS encoders
- "renesas,r8a7791-lvds" for R8A7791 (R-Car M2-W) compatible LVDS encoders
- "renesas,r8a7793-lvds" for R8A7793 (R-Car M2-N) compatible LVDS encoders
- "renesas,r8a7795-lvds" for R8A7795 (R-Car H3) compatible LVDS encoders
- "renesas,r8a7796-lvds" for R8A7796 (R-Car M3-W) compatible LVDS encoders
- "renesas,r8a77965-lvds" for R8A77965 (R-Car M3-N) compatible LVDS encoders
- "renesas,r8a77970-lvds" for R8A77970 (R-Car V3M) compatible LVDS encoders
- "renesas,r8a77980-lvds" for R8A77980 (R-Car V3H) compatible LVDS encoders
- "renesas,r8a77990-lvds" for R8A77990 (R-Car E3) compatible LVDS encoders
- "renesas,r8a77995-lvds" for R8A77995 (R-Car D3) compatible LVDS encoders
-- reg: Base address and length for the memory-mapped registers -- clocks: A list of phandles + clock-specifier pairs, one for each entry in
- the clock-names property.
-- clock-names: Name of the clocks. This property is model-dependent.
- The functional clock, which mandatory for all models, shall be listed
- first, and shall be named "fck".
- On R8A77990, R8A77995 and R8A774C0, the LVDS encoder can use the EXTAL or
- DU_DOTCLKINx clocks. Those clocks are optional. When supplied they must be
- named "extal" and "dclkin.x" respectively, with "x" being the DU_DOTCLKIN
- numerical index.
- When the clocks property only contains the functional clock, the
- clock-names property may be omitted.
-- resets: A phandle + reset specifier for the module reset
-Required nodes:
-The LVDS encoder has two video ports. Their connections are modelled using the -OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
-- Video port 0 corresponds to the parallel RGB input -- Video port 1 corresponds to the LVDS output
-Each port shall have a single endpoint.
-Optional properties:
-- renesas,companion : phandle to the companion LVDS encoder. This property is
- mandatory for the first LVDS encoder on D3 and E3 SoCs, and shall point to
- the second encoder to be used as a companion in dual-link mode. It shall not
- be set for any other LVDS encoder.
-Example:
- lvds0: lvds@feb90000 {
compatible = "renesas,r8a77990-lvds";
reg = <0 0xfeb90000 0 0x20>;
clocks = <&cpg CPG_MOD 727>;
power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
resets = <&cpg 727>;
renesas,companion = <&lvds1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds0_in: endpoint {
remote-endpoint = <&du_out_lvds0>;
};
};
port@1 {
reg = <1>;
lvds0_out: endpoint {
};
};
};
- };
diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml new file mode 100644 index 000000000000..98c7330a9485 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -0,0 +1,248 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/renesas,lvds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#
+title: Renesas R-Car LVDS Encoder
+maintainers:
- Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
+description: |
- These DT bindings describe the LVDS encoder embedded in the Renesas R-Car
- Gen2, R-Car Gen3, RZ/G1 and RZ/G2 SoCs.
+properties:
- compatible:
- enum:
- renesas,r8a7743-lvds # for RZ/G1M compatible LVDS encoders
- renesas,r8a7744-lvds # for RZ/G1N compatible LVDS encoders
- renesas,r8a774a1-lvds # for RZ/G2M compatible LVDS encoders
- renesas,r8a774b1-lvds # for RZ/G2N compatible LVDS encoders
- renesas,r8a774c0-lvds # for RZ/G2E compatible LVDS encoders
- renesas,r8a7790-lvds # for R-Car H2 compatible LVDS encoders
- renesas,r8a7791-lvds # for R-Car M2-W compatible LVDS encoders
- renesas,r8a7793-lvds # for R-Car M2-N compatible LVDS encoders
- renesas,r8a7795-lvds # for R-Car H3 compatible LVDS encoders
- renesas,r8a7796-lvds # for R-Car M3-W compatible LVDS encoders
- renesas,r8a77965-lvds # for R-Car M3-N compatible LVDS encoders
- renesas,r8a77970-lvds # for R-Car V3M compatible LVDS encoders
- renesas,r8a77980-lvds # for R-Car V3H compatible LVDS encoders
- renesas,r8a77990-lvds # for R-Car E3 compatible LVDS encoders
- renesas,r8a77995-lvds # for R-Car D3 compatible LVDS encoders
- reg:
- maxItems: 1
- clocks:
- minItems: 1
- maxItems: 4
- clock-names:
- minItems: 1
- maxItems: 4
- resets:
- maxItems: 1
- ports:
- type: object
- description: |
This device has two video ports. Their connections are modelled using the
OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
Each port shall have a single endpoint.
- properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
port@0:
type: object
description: Parallel RGB input port
port@1:
type: object
description: LVDS output port
- required:
- port@0
- port@1
- additionalProperties: false
- power-domains:
- maxItems: 1
- renesas,companion:
- $ref: /schemas/types.yaml#/definitions/phandle
- description:
phandle to the companion LVDS encoder. This property is mandatory
for the first LVDS encoder on D3 and E3 SoCs, and shall point to
the second encoder to be used as a companion in dual-link mode. It
shall not be set for any other LVDS encoder.
+required:
- compatible
- reg
- clocks
- power-domains
- resets
- ports
+if:
- properties:
- compatible:
enum:
- renesas,r8a774c0-lvds
- renesas,r8a77990-lvds
- renesas,r8a77995-lvds
+then:
- properties:
- clocks:
minItems: 1
maxItems: 4
items:
- description: Functional clock
- description: EXTAL input clock
- description: DU_DOTCLKIN0 input clock
- description: DU_DOTCLKIN1 input clock
- clock-names:
minItems: 1
maxItems: 4
items:
- const: fck
# The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks.
# These clocks are optional.
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
- required:
- clock-names
+else:
- properties:
- clocks:
maxItems: 1
items:
- description: Functional clock
- clock-names:
maxItems: 1
items:
- const: fck
- renesas,companion: false
+additionalProperties: false
+examples:
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a7795-sysc.h>
- lvds@feb90000 {
compatible = "renesas,r8a7795-lvds";
reg = <0xfeb90000 0x14>;
clocks = <&cpg CPG_MOD 727>;
power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
resets = <&cpg 727>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds_in: endpoint {
remote-endpoint = <&du_out_lvds0>;
};
};
port@1 {
reg = <1>;
lvds_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
- };
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a77990-sysc.h>
- lvds0: lvds@feb90000 {
compatible = "renesas,r8a77990-lvds";
reg = <0xfeb90000 0x20>;
clocks = <&cpg CPG_MOD 727>,
<&x13_clk>,
<&extal_clk>;
clock-names = "fck", "dclkin.0", "extal";
power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
resets = <&cpg 727>;
renesas,companion = <&lvds1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds0_in: endpoint {
remote-endpoint = <&du_out_lvds0>;
};
};
port@1 {
reg = <1>;
lvds0_out: endpoint {
remote-endpoint = <&panel_in1>;
};
};
};
- };
- lvds1: lvds@feb90100 {
compatible = "renesas,r8a77990-lvds";
reg = <0xfeb90100 0x20>;
clocks = <&cpg CPG_MOD 727>,
<&x13_clk>,
<&extal_clk>;
clock-names = "fck", "dclkin.0", "extal";
power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
resets = <&cpg 726>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds1_in: endpoint {
remote-endpoint = <&du_out_lvds1>;
};
};
port@1 {
reg = <1>;
lvds1_out: endpoint {
remote-endpoint = <&panel_in2>;
};
};
};
- };
+...
Regards,
Laurent Pinchart
dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Sam,
On Mon, Jun 29, 2020 at 10:10:01AM +0200, Sam Ravnborg wrote:
On Fri, May 15, 2020 at 12:42:11AM +0300, Laurent Pinchart wrote:
Convert the Renesas R-Car LVDS encoder text binding to YAML.
Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Acked-by: Maxime Ripard mripard@kernel.org
Changes since v1:
- Mention RZ/G1 and R2/G2 explicitly
- Drop the part numbers in comments, only keep the SoC names
- Use one address and size cell in the examples
Seems this was not picked up so I went ahead and applied to drm-misc-next.
I was planning to send a pull request with other DT bindings conversion, but merging it earlier is better :-) Thank you.
.../bindings/display/bridge/renesas,lvds.txt | 85 ------ .../bindings/display/bridge/renesas,lvds.yaml | 248 ++++++++++++++++++ 2 files changed, 248 insertions(+), 85 deletions(-) delete mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt deleted file mode 100644 index c62ce2494ed9..000000000000 --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt +++ /dev/null @@ -1,85 +0,0 @@
-Renesas R-Car LVDS Encoder
-These DT bindings describe the LVDS encoder embedded in the Renesas R-Car -Gen2, R-Car Gen3 and RZ/G SoCs.
-Required properties:
-- compatible : Shall contain one of
- "renesas,r8a7743-lvds" for R8A7743 (RZ/G1M) compatible LVDS encoders
- "renesas,r8a7744-lvds" for R8A7744 (RZ/G1N) compatible LVDS encoders
- "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders
- "renesas,r8a774b1-lvds" for R8A774B1 (RZ/G2N) compatible LVDS encoders
- "renesas,r8a774c0-lvds" for R8A774C0 (RZ/G2E) compatible LVDS encoders
- "renesas,r8a7790-lvds" for R8A7790 (R-Car H2) compatible LVDS encoders
- "renesas,r8a7791-lvds" for R8A7791 (R-Car M2-W) compatible LVDS encoders
- "renesas,r8a7793-lvds" for R8A7793 (R-Car M2-N) compatible LVDS encoders
- "renesas,r8a7795-lvds" for R8A7795 (R-Car H3) compatible LVDS encoders
- "renesas,r8a7796-lvds" for R8A7796 (R-Car M3-W) compatible LVDS encoders
- "renesas,r8a77965-lvds" for R8A77965 (R-Car M3-N) compatible LVDS encoders
- "renesas,r8a77970-lvds" for R8A77970 (R-Car V3M) compatible LVDS encoders
- "renesas,r8a77980-lvds" for R8A77980 (R-Car V3H) compatible LVDS encoders
- "renesas,r8a77990-lvds" for R8A77990 (R-Car E3) compatible LVDS encoders
- "renesas,r8a77995-lvds" for R8A77995 (R-Car D3) compatible LVDS encoders
-- reg: Base address and length for the memory-mapped registers -- clocks: A list of phandles + clock-specifier pairs, one for each entry in
- the clock-names property.
-- clock-names: Name of the clocks. This property is model-dependent.
- The functional clock, which mandatory for all models, shall be listed
- first, and shall be named "fck".
- On R8A77990, R8A77995 and R8A774C0, the LVDS encoder can use the EXTAL or
- DU_DOTCLKINx clocks. Those clocks are optional. When supplied they must be
- named "extal" and "dclkin.x" respectively, with "x" being the DU_DOTCLKIN
- numerical index.
- When the clocks property only contains the functional clock, the
- clock-names property may be omitted.
-- resets: A phandle + reset specifier for the module reset
-Required nodes:
-The LVDS encoder has two video ports. Their connections are modelled using the -OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
-- Video port 0 corresponds to the parallel RGB input -- Video port 1 corresponds to the LVDS output
-Each port shall have a single endpoint.
-Optional properties:
-- renesas,companion : phandle to the companion LVDS encoder. This property is
- mandatory for the first LVDS encoder on D3 and E3 SoCs, and shall point to
- the second encoder to be used as a companion in dual-link mode. It shall not
- be set for any other LVDS encoder.
-Example:
- lvds0: lvds@feb90000 {
compatible = "renesas,r8a77990-lvds";
reg = <0 0xfeb90000 0 0x20>;
clocks = <&cpg CPG_MOD 727>;
power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
resets = <&cpg 727>;
renesas,companion = <&lvds1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds0_in: endpoint {
remote-endpoint = <&du_out_lvds0>;
};
};
port@1 {
reg = <1>;
lvds0_out: endpoint {
};
};
};
- };
diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml new file mode 100644 index 000000000000..98c7330a9485 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -0,0 +1,248 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/renesas,lvds.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#
+title: Renesas R-Car LVDS Encoder
+maintainers:
- Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
+description: |
- These DT bindings describe the LVDS encoder embedded in the Renesas R-Car
- Gen2, R-Car Gen3, RZ/G1 and RZ/G2 SoCs.
+properties:
- compatible:
- enum:
- renesas,r8a7743-lvds # for RZ/G1M compatible LVDS encoders
- renesas,r8a7744-lvds # for RZ/G1N compatible LVDS encoders
- renesas,r8a774a1-lvds # for RZ/G2M compatible LVDS encoders
- renesas,r8a774b1-lvds # for RZ/G2N compatible LVDS encoders
- renesas,r8a774c0-lvds # for RZ/G2E compatible LVDS encoders
- renesas,r8a7790-lvds # for R-Car H2 compatible LVDS encoders
- renesas,r8a7791-lvds # for R-Car M2-W compatible LVDS encoders
- renesas,r8a7793-lvds # for R-Car M2-N compatible LVDS encoders
- renesas,r8a7795-lvds # for R-Car H3 compatible LVDS encoders
- renesas,r8a7796-lvds # for R-Car M3-W compatible LVDS encoders
- renesas,r8a77965-lvds # for R-Car M3-N compatible LVDS encoders
- renesas,r8a77970-lvds # for R-Car V3M compatible LVDS encoders
- renesas,r8a77980-lvds # for R-Car V3H compatible LVDS encoders
- renesas,r8a77990-lvds # for R-Car E3 compatible LVDS encoders
- renesas,r8a77995-lvds # for R-Car D3 compatible LVDS encoders
- reg:
- maxItems: 1
- clocks:
- minItems: 1
- maxItems: 4
- clock-names:
- minItems: 1
- maxItems: 4
- resets:
- maxItems: 1
- ports:
- type: object
- description: |
This device has two video ports. Their connections are modelled using the
OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
Each port shall have a single endpoint.
- properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
port@0:
type: object
description: Parallel RGB input port
port@1:
type: object
description: LVDS output port
- required:
- port@0
- port@1
- additionalProperties: false
- power-domains:
- maxItems: 1
- renesas,companion:
- $ref: /schemas/types.yaml#/definitions/phandle
- description:
phandle to the companion LVDS encoder. This property is mandatory
for the first LVDS encoder on D3 and E3 SoCs, and shall point to
the second encoder to be used as a companion in dual-link mode. It
shall not be set for any other LVDS encoder.
+required:
- compatible
- reg
- clocks
- power-domains
- resets
- ports
+if:
- properties:
- compatible:
enum:
- renesas,r8a774c0-lvds
- renesas,r8a77990-lvds
- renesas,r8a77995-lvds
+then:
- properties:
- clocks:
minItems: 1
maxItems: 4
items:
- description: Functional clock
- description: EXTAL input clock
- description: DU_DOTCLKIN0 input clock
- description: DU_DOTCLKIN1 input clock
- clock-names:
minItems: 1
maxItems: 4
items:
- const: fck
# The LVDS encoder can use the EXTAL or DU_DOTCLKINx clocks.
# These clocks are optional.
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
- enum:
- extal
- dclkin.0
- dclkin.1
- required:
- clock-names
+else:
- properties:
- clocks:
maxItems: 1
items:
- description: Functional clock
- clock-names:
maxItems: 1
items:
- const: fck
- renesas,companion: false
+additionalProperties: false
+examples:
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a7795-sysc.h>
- lvds@feb90000 {
compatible = "renesas,r8a7795-lvds";
reg = <0xfeb90000 0x14>;
clocks = <&cpg CPG_MOD 727>;
power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
resets = <&cpg 727>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds_in: endpoint {
remote-endpoint = <&du_out_lvds0>;
};
};
port@1 {
reg = <1>;
lvds_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
- };
- |
- #include <dt-bindings/clock/renesas-cpg-mssr.h>
- #include <dt-bindings/power/r8a77990-sysc.h>
- lvds0: lvds@feb90000 {
compatible = "renesas,r8a77990-lvds";
reg = <0xfeb90000 0x20>;
clocks = <&cpg CPG_MOD 727>,
<&x13_clk>,
<&extal_clk>;
clock-names = "fck", "dclkin.0", "extal";
power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
resets = <&cpg 727>;
renesas,companion = <&lvds1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds0_in: endpoint {
remote-endpoint = <&du_out_lvds0>;
};
};
port@1 {
reg = <1>;
lvds0_out: endpoint {
remote-endpoint = <&panel_in1>;
};
};
};
- };
- lvds1: lvds@feb90100 {
compatible = "renesas,r8a77990-lvds";
reg = <0xfeb90100 0x20>;
clocks = <&cpg CPG_MOD 727>,
<&x13_clk>,
<&extal_clk>;
clock-names = "fck", "dclkin.0", "extal";
power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
resets = <&cpg 726>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
lvds1_in: endpoint {
remote-endpoint = <&du_out_lvds1>;
};
};
port@1 {
reg = <1>;
lvds1_out: endpoint {
remote-endpoint = <&panel_in2>;
};
};
};
- };
+...
From: Fabrizio Castro fabrizio.castro@bp.renesas.com
Document RZ/G2E support for property renesas,companion.
Signed-off-by: Fabrizio Castro fabrizio.castro@bp.renesas.com Reviewed-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com --- Changes compared to RFC:
- Rebased on top of YAML conversion --- .../devicetree/bindings/display/bridge/renesas,lvds.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml index 33c06630a2dd..1045f0e33f2c 100644 --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -81,9 +81,9 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to the companion LVDS encoder. This property is mandatory - for the first LVDS encoder on D3 and E3 SoCs, and shall point to - the second encoder to be used as a companion in dual-link mode. It - shall not be set for any other LVDS encoder. + for the first LVDS encoder on D3, R-Car E3 and RZ/G2E SoCs, and shall + point to the second encoder to be used as a companion in dual-link mode. + It shall not be set for any other LVDS encoder.
required: - compatible
On Thu, May 14, 2020 at 1:39 AM Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com wrote:
From: Fabrizio Castro fabrizio.castro@bp.renesas.com
Document RZ/G2E support for property renesas,companion.
Signed-off-by: Fabrizio Castro fabrizio.castro@bp.renesas.com Reviewed-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
--- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -81,9 +81,9 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to the companion LVDS encoder. This property is mandatory
for the first LVDS encoder on D3 and E3 SoCs, and shall point to
the second encoder to be used as a companion in dual-link mode. It
shall not be set for any other LVDS encoder.
for the first LVDS encoder on D3, R-Car E3 and RZ/G2E SoCs, and shall
R-Car D3 and E3, and RZ/G2E SoCs
point to the second encoder to be used as a companion in dual-link mode.
It shall not be set for any other LVDS encoder.
Gr{oetje,eeting}s,
Geert
On Thu, May 14, 2020 at 08:44:19AM +0200, Geert Uytterhoeven wrote:
On Thu, May 14, 2020 at 1:39 AM Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com wrote:
From: Fabrizio Castro fabrizio.castro@bp.renesas.com
Document RZ/G2E support for property renesas,companion.
Signed-off-by: Fabrizio Castro fabrizio.castro@bp.renesas.com Reviewed-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
--- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -81,9 +81,9 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to the companion LVDS encoder. This property is mandatory
for the first LVDS encoder on D3 and E3 SoCs, and shall point to
the second encoder to be used as a companion in dual-link mode. It
shall not be set for any other LVDS encoder.
for the first LVDS encoder on D3, R-Car E3 and RZ/G2E SoCs, and shall
R-Car D3 and E3, and RZ/G2E SoCs
point to the second encoder to be used as a companion in dual-link mode.
It shall not be set for any other LVDS encoder.
Laurent, I assume you will re-spin a ne version wth the changelog corrected.
Sam
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Sam,
On Mon, Jun 29, 2020 at 10:11:40AM +0200, Sam Ravnborg wrote:
On Thu, May 14, 2020 at 08:44:19AM +0200, Geert Uytterhoeven wrote:
On Thu, May 14, 2020 at 1:39 AM Laurent Pinchart wrote:
From: Fabrizio Castro fabrizio.castro@bp.renesas.com
Document RZ/G2E support for property renesas,companion.
Signed-off-by: Fabrizio Castro fabrizio.castro@bp.renesas.com Reviewed-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com Signed-off-by: Laurent Pinchart laurent.pinchart+renesas@ideasonboard.com
--- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml @@ -81,9 +81,9 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to the companion LVDS encoder. This property is mandatory
for the first LVDS encoder on D3 and E3 SoCs, and shall point to
the second encoder to be used as a companion in dual-link mode. It
shall not be set for any other LVDS encoder.
for the first LVDS encoder on D3, R-Car E3 and RZ/G2E SoCs, and shall
R-Car D3 and E3, and RZ/G2E SoCs
point to the second encoder to be used as a companion in dual-link mode.
It shall not be set for any other LVDS encoder.
Laurent, I assume you will re-spin a ne version wth the changelog corrected.
Yes I will. Thanks for checking.
dri-devel@lists.freedesktop.org