All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: display/bridge: tc358764: Convert to YAML binding
@ 2021-10-06 13:51 AngeloGioacchino Del Regno
  2021-10-07 12:05 ` Rob Herring
  2021-10-11 20:12 ` Sam Ravnborg
  0 siblings, 2 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2021-10-06 13:51 UTC (permalink / raw)
  To: robh+dt
  Cc: tomi.valkeinen, daniel, airlied, dri-devel, devicetree,
	linux-kernel, AngeloGioacchino Del Regno

Convert the Toshiba TC358764 txt documentation to YAML.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 .../display/bridge/toshiba,tc358764.txt       | 35 -------
 .../display/bridge/toshiba,tc358764.yaml      | 94 +++++++++++++++++++
 2 files changed, 94 insertions(+), 35 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt
 create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml

diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt
deleted file mode 100644
index 8f9abf28a8fa..000000000000
--- a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-TC358764 MIPI-DSI to LVDS panel bridge
-
-Required properties:
-  - compatible: "toshiba,tc358764"
-  - reg: the virtual channel number of a DSI peripheral
-  - vddc-supply: core voltage supply, 1.2V
-  - vddio-supply: I/O voltage supply, 1.8V or 3.3V
-  - vddlvds-supply: LVDS1/2 voltage supply, 3.3V
-  - reset-gpios: a GPIO spec for the reset pin
-
-The device node can contain following 'port' child nodes,
-according to the OF graph bindings defined in [1]:
-  0: DSI Input, not required, if the bridge is DSI controlled
-  1: LVDS Output, mandatory
-
-[1]: Documentation/devicetree/bindings/media/video-interfaces.txt
-
-Example:
-
-	bridge@0 {
-		reg = <0>;
-		compatible = "toshiba,tc358764";
-		vddc-supply = <&vcc_1v2_reg>;
-		vddio-supply = <&vcc_1v8_reg>;
-		vddlvds-supply = <&vcc_3v3_reg>;
-		reset-gpios = <&gpd1 6 GPIO_ACTIVE_LOW>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		port@1 {
-			reg = <1>;
-			lvds_ep: endpoint {
-				remote-endpoint = <&panel_ep>;
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml
new file mode 100644
index 000000000000..267a870b6b0b
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/bridge/toshiba,tc358764.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Toshiba TC358764 MIPI-DSI to LVDS bridge
+
+maintainers:
+  - Andrzej Hajda <a.hajda@samsung.com>
+
+description: |
+  The TC358764 is bridge device which converts MIPI DSI or MIPI DPI to DP/eDP.
+
+properties:
+  compatible:
+    enum:
+      - toshiba,tc358764
+
+  reg:
+    description: Virtual channel number of a DSI peripheral
+    maxItems: 1
+
+  reset-gpios:
+    description: GPIO connected to the reset pin.
+    maxItems: 1
+
+  vddc-supply:
+    description: Core voltage supply, 1.2V
+
+  vddio-supply:
+    description: I/O voltage supply, 1.8V or 3.3V
+
+  vddlvds-supply:
+    description: LVDS1/2 voltage supply, 3.3V
+
+  ports:
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port@0:
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
+          Video port for MIPI DSI input, if the bridge DSI controlled
+
+      port@1:
+        $ref: /schemas/graph.yaml#/properties/port
+        description:
+          Video port for LVDS output (panel or connector).
+
+    required:
+      - port@1
+
+required:
+  - compatible
+  - reg
+  - vddc-supply
+  - vddio-supply
+  - vddlvds-supply
+  - ports
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c1 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      bridge@0 {
+        compatible = "toshiba,tc358764";
+        reg = <0>;
+        vddc-supply = <&vcc_1v2_reg>;
+        vddio-supply = <&vcc_1v8_reg>;
+        vddlvds-supply = <&vcc_3v3_reg>;
+        reset-gpios = <&gpd1 6 GPIO_ACTIVE_LOW>;
+
+        ports {
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          port@1 {
+            reg = <1>;
+            lvds_ep: endpoint {
+              remote-endpoint = <&panel_ep>;
+            };
+          };
+        };
+      };
+    };
+
+...
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] dt-bindings: display/bridge: tc358764: Convert to YAML binding
  2021-10-06 13:51 [PATCH] dt-bindings: display/bridge: tc358764: Convert to YAML binding AngeloGioacchino Del Regno
@ 2021-10-07 12:05 ` Rob Herring
  2021-10-11 20:12 ` Sam Ravnborg
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-10-07 12:05 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: linux-kernel, daniel, dri-devel, airlied, tomi.valkeinen,
	robh+dt, devicetree

On Wed, 06 Oct 2021 15:51:50 +0200, AngeloGioacchino Del Regno wrote:
> Convert the Toshiba TC358764 txt documentation to YAML.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
>  .../display/bridge/toshiba,tc358764.txt       | 35 -------
>  .../display/bridge/toshiba,tc358764.yaml      | 94 +++++++++++++++++++
>  2 files changed, 94 insertions(+), 35 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt
>  create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1537162


bridge@0: '#address-cells', '#size-cells', 'port@1' do not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/exynos5250-arndale.dt.yaml

bridge@0: 'ports' is a required property
	arch/arm/boot/dts/exynos5250-arndale.dt.yaml


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dt-bindings: display/bridge: tc358764: Convert to YAML binding
  2021-10-06 13:51 [PATCH] dt-bindings: display/bridge: tc358764: Convert to YAML binding AngeloGioacchino Del Regno
  2021-10-07 12:05 ` Rob Herring
@ 2021-10-11 20:12 ` Sam Ravnborg
  2021-10-14 20:13   ` Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2021-10-11 20:12 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: robh+dt, tomi.valkeinen, daniel, airlied, dri-devel, devicetree,
	linux-kernel

Hi AngeloGioacchino,

On Wed, Oct 06, 2021 at 03:51:50PM +0200, AngeloGioacchino Del Regno wrote:
> Convert the Toshiba TC358764 txt documentation to YAML.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Thanks for all these conversions to DT-schema.

It would be very good if the changelog could document the warnings they
triggers when they are used to check the existing dts files.
This is a good way to document that the warnings are expected.

While waiting for Rob to review, here is one small nit. See inline
comment below.

My personal preference is to use 4 spaces for indent in the examples.
But two is perfectly fine and there is today no rule for it.

When you are resending these, then it would be nice with a cover letter
and all patches in one series. You can then use the cover letter both to
tell on a higher level what was changed since v1 and to give a status on the
conversion effort. I hope you have converted all bridge DT-schemas.

	Sam

> ---
>  .../display/bridge/toshiba,tc358764.txt       | 35 -------
>  .../display/bridge/toshiba,tc358764.yaml      | 94 +++++++++++++++++++
>  2 files changed, 94 insertions(+), 35 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt
>  create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt
> deleted file mode 100644
> index 8f9abf28a8fa..000000000000
> --- a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -TC358764 MIPI-DSI to LVDS panel bridge
> -
> -Required properties:
> -  - compatible: "toshiba,tc358764"
> -  - reg: the virtual channel number of a DSI peripheral
> -  - vddc-supply: core voltage supply, 1.2V
> -  - vddio-supply: I/O voltage supply, 1.8V or 3.3V
> -  - vddlvds-supply: LVDS1/2 voltage supply, 3.3V
> -  - reset-gpios: a GPIO spec for the reset pin
> -
> -The device node can contain following 'port' child nodes,
> -according to the OF graph bindings defined in [1]:
> -  0: DSI Input, not required, if the bridge is DSI controlled
> -  1: LVDS Output, mandatory
> -
> -[1]: Documentation/devicetree/bindings/media/video-interfaces.txt
> -
> -Example:
> -
> -	bridge@0 {
> -		reg = <0>;
> -		compatible = "toshiba,tc358764";
> -		vddc-supply = <&vcc_1v2_reg>;
> -		vddio-supply = <&vcc_1v8_reg>;
> -		vddlvds-supply = <&vcc_3v3_reg>;
> -		reset-gpios = <&gpd1 6 GPIO_ACTIVE_LOW>;
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -		port@1 {
> -			reg = <1>;
> -			lvds_ep: endpoint {
> -				remote-endpoint = <&panel_ep>;
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml
> new file mode 100644
> index 000000000000..267a870b6b0b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml
> @@ -0,0 +1,94 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/bridge/toshiba,tc358764.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Toshiba TC358764 MIPI-DSI to LVDS bridge
> +
> +maintainers:
> +  - Andrzej Hajda <a.hajda@samsung.com>
> +
> +description: |
> +  The TC358764 is bridge device which converts MIPI DSI or MIPI DPI to DP/eDP.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - toshiba,tc358764
> +
> +  reg:
> +    description: Virtual channel number of a DSI peripheral
> +    maxItems: 1
> +
> +  reset-gpios:
> +    description: GPIO connected to the reset pin.
> +    maxItems: 1
> +
> +  vddc-supply:
> +    description: Core voltage supply, 1.2V
> +
> +  vddio-supply:
> +    description: I/O voltage supply, 1.8V or 3.3V
> +
> +  vddlvds-supply:
> +    description: LVDS1/2 voltage supply, 3.3V
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +
> +    properties:
> +      port@0:
> +        $ref: /schemas/graph.yaml#/properties/port
> +        description:
> +          Video port for MIPI DSI input, if the bridge DSI controlled
Fix: ..., if the bridge is DSI controlled

> +
> +      port@1:
> +        $ref: /schemas/graph.yaml#/properties/port
> +        description:
> +          Video port for LVDS output (panel or connector).
> +
> +    required:
> +      - port@1
> +
> +required:
> +  - compatible
> +  - reg
> +  - vddc-supply
> +  - vddio-supply
> +  - vddlvds-supply
> +  - ports
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    i2c1 {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      bridge@0 {
> +        compatible = "toshiba,tc358764";
> +        reg = <0>;
> +        vddc-supply = <&vcc_1v2_reg>;
> +        vddio-supply = <&vcc_1v8_reg>;
> +        vddlvds-supply = <&vcc_3v3_reg>;
> +        reset-gpios = <&gpd1 6 GPIO_ACTIVE_LOW>;
> +
> +        ports {
> +          #address-cells = <1>;
> +          #size-cells = <0>;
> +
> +          port@1 {
> +            reg = <1>;
> +            lvds_ep: endpoint {
> +              remote-endpoint = <&panel_ep>;
> +            };
> +          };
> +        };
> +      };
> +    };
> +
> +...
> -- 
> 2.33.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dt-bindings: display/bridge: tc358764: Convert to YAML binding
  2021-10-11 20:12 ` Sam Ravnborg
@ 2021-10-14 20:13   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-10-14 20:13 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: AngeloGioacchino Del Regno, tomi.valkeinen, daniel, airlied,
	dri-devel, devicetree, linux-kernel

On Mon, Oct 11, 2021 at 10:12:02PM +0200, Sam Ravnborg wrote:
> Hi AngeloGioacchino,
> 
> On Wed, Oct 06, 2021 at 03:51:50PM +0200, AngeloGioacchino Del Regno wrote:
> > Convert the Toshiba TC358764 txt documentation to YAML.
> > 
> > Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> 
> Thanks for all these conversions to DT-schema.
> 
> It would be very good if the changelog could document the warnings they
> triggers when they are used to check the existing dts files.
> This is a good way to document that the warnings are expected.

Really what's missing is adding 'ports'.

I'm fine with just a note below '---' on the intent WRT dtbs_check. I 
assume the intent is to fix the one case which is fine given there is 
only 1. The graph parsing code doesn't care which way is done and we 
prefer having 'ports'.

> 
> While waiting for Rob to review, here is one small nit. See inline
> comment below.
> 
> My personal preference is to use 4 spaces for indent in the examples.
> But two is perfectly fine and there is today no rule for it.
> 
> When you are resending these, then it would be nice with a cover letter
> and all patches in one series. You can then use the cover letter both to
> tell on a higher level what was changed since v1 and to give a status on the
> conversion effort. I hope you have converted all bridge DT-schemas.
> 
> 	Sam
> 
> > ---
> >  .../display/bridge/toshiba,tc358764.txt       | 35 -------
> >  .../display/bridge/toshiba,tc358764.yaml      | 94 +++++++++++++++++++
> >  2 files changed, 94 insertions(+), 35 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt
> >  create mode 100644 Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt
> > deleted file mode 100644
> > index 8f9abf28a8fa..000000000000
> > --- a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.txt
> > +++ /dev/null
> > @@ -1,35 +0,0 @@
> > -TC358764 MIPI-DSI to LVDS panel bridge
> > -
> > -Required properties:
> > -  - compatible: "toshiba,tc358764"
> > -  - reg: the virtual channel number of a DSI peripheral
> > -  - vddc-supply: core voltage supply, 1.2V
> > -  - vddio-supply: I/O voltage supply, 1.8V or 3.3V
> > -  - vddlvds-supply: LVDS1/2 voltage supply, 3.3V
> > -  - reset-gpios: a GPIO spec for the reset pin
> > -
> > -The device node can contain following 'port' child nodes,
> > -according to the OF graph bindings defined in [1]:
> > -  0: DSI Input, not required, if the bridge is DSI controlled
> > -  1: LVDS Output, mandatory
> > -
> > -[1]: Documentation/devicetree/bindings/media/video-interfaces.txt
> > -
> > -Example:
> > -
> > -	bridge@0 {
> > -		reg = <0>;
> > -		compatible = "toshiba,tc358764";
> > -		vddc-supply = <&vcc_1v2_reg>;
> > -		vddio-supply = <&vcc_1v8_reg>;
> > -		vddlvds-supply = <&vcc_3v3_reg>;
> > -		reset-gpios = <&gpd1 6 GPIO_ACTIVE_LOW>;
> > -		#address-cells = <1>;
> > -		#size-cells = <0>;
> > -		port@1 {
> > -			reg = <1>;
> > -			lvds_ep: endpoint {
> > -				remote-endpoint = <&panel_ep>;
> > -			};
> > -		};
> > -	};
> > diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml
> > new file mode 100644
> > index 000000000000..267a870b6b0b
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358764.yaml
> > @@ -0,0 +1,94 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/bridge/toshiba,tc358764.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Toshiba TC358764 MIPI-DSI to LVDS bridge
> > +
> > +maintainers:
> > +  - Andrzej Hajda <a.hajda@samsung.com>
> > +
> > +description: |
> > +  The TC358764 is bridge device which converts MIPI DSI or MIPI DPI to DP/eDP.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - toshiba,tc358764
> > +
> > +  reg:
> > +    description: Virtual channel number of a DSI peripheral
> > +    maxItems: 1
> > +
> > +  reset-gpios:
> > +    description: GPIO connected to the reset pin.
> > +    maxItems: 1
> > +
> > +  vddc-supply:
> > +    description: Core voltage supply, 1.2V
> > +
> > +  vddio-supply:
> > +    description: I/O voltage supply, 1.8V or 3.3V
> > +
> > +  vddlvds-supply:
> > +    description: LVDS1/2 voltage supply, 3.3V
> > +
> > +  ports:
> > +    $ref: /schemas/graph.yaml#/properties/ports
> > +
> > +    properties:
> > +      port@0:
> > +        $ref: /schemas/graph.yaml#/properties/port
> > +        description:
> > +          Video port for MIPI DSI input, if the bridge DSI controlled
> Fix: ..., if the bridge is DSI controlled
> 
> > +
> > +      port@1:
> > +        $ref: /schemas/graph.yaml#/properties/port
> > +        description:
> > +          Video port for LVDS output (panel or connector).
> > +
> > +    required:
> > +      - port@1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - vddc-supply
> > +  - vddio-supply
> > +  - vddlvds-supply
> > +  - ports
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/gpio/gpio.h>
> > +
> > +    i2c1 {

i2c {

> > +      #address-cells = <1>;
> > +      #size-cells = <0>;
> > +
> > +      bridge@0 {
> > +        compatible = "toshiba,tc358764";
> > +        reg = <0>;
> > +        vddc-supply = <&vcc_1v2_reg>;
> > +        vddio-supply = <&vcc_1v8_reg>;
> > +        vddlvds-supply = <&vcc_3v3_reg>;
> > +        reset-gpios = <&gpd1 6 GPIO_ACTIVE_LOW>;
> > +
> > +        ports {
> > +          #address-cells = <1>;
> > +          #size-cells = <0>;
> > +
> > +          port@1 {
> > +            reg = <1>;
> > +            lvds_ep: endpoint {
> > +              remote-endpoint = <&panel_ep>;
> > +            };
> > +          };
> > +        };
> > +      };
> > +    };
> > +
> > +...
> > -- 
> > 2.33.0
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-14 20:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 13:51 [PATCH] dt-bindings: display/bridge: tc358764: Convert to YAML binding AngeloGioacchino Del Regno
2021-10-07 12:05 ` Rob Herring
2021-10-11 20:12 ` Sam Ravnborg
2021-10-14 20:13   ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.