Re: [PATCH] dt-bindings: display: Use OF graph schema

2021-01-04 Thread Laurent Pinchart
Hi Rob,

Thank you for the patch.

On Mon, Jan 04, 2021 at 11:07:23AM -0700, Rob Herring wrote:
> Now that we have a graph schema, rework the display related schemas to use
> it. Mostly this is adding a reference to graph.yaml and dropping duplicate
> parts from schemas.
> 
> In panel-common.yaml, 'ports' is dropped. Any binding using 'ports'
> should be one with more than 1 port node, and the binding must define
> what each port is.
> 
> Note that ti,sn65dsi86.yaml, ti,tfp410,yaml and toshiba,tc358768.yaml will
> need further updates to use video-interfaces.yaml once that lands.
> 
> Cc: Thierry Reding 
> Cc: Sam Ravnborg 
> Cc: Laurent Pinchart 
> Cc: Maxime Ripard 
> Cc: Maarten Lankhorst 
> Cc: Thomas Zimmermann 
> Signed-off-by: Rob Herring 

Reviewed-by: Laurent Pinchart 

> ---
> v3:
>  - Rework based on graph.yaml changes. 'port' nodes now have a $ref and
>endpoint nodes do too if they define additional properties.
>  - Convert ste,mcde.yaml
> 
> v2:
>  - Drop 'type: object' where we have a $ref
>  - Drop any common properties like 'reg', '#address-cells', "#size-cells',
>'remote-endpoint'
>  - Keep description in ti,k2g-dss.yaml
> ---
>  .../allwinner,sun4i-a10-display-backend.yaml  |  23 +---
>  .../allwinner,sun4i-a10-display-frontend.yaml |  19 +--
>  .../display/allwinner,sun4i-a10-hdmi.yaml |  19 +--
>  .../display/allwinner,sun4i-a10-tcon.yaml |  25 +---
>  .../allwinner,sun4i-a10-tv-encoder.yaml   |   6 +-
>  .../display/allwinner,sun6i-a31-drc.yaml  |  19 +--
>  .../display/allwinner,sun6i-a31-mipi-dsi.yaml |   6 +-
>  .../allwinner,sun8i-a83t-de2-mixer.yaml   |  19 +--
>  .../display/allwinner,sun8i-a83t-dw-hdmi.yaml |  19 +--
>  .../display/allwinner,sun8i-r40-tcon-top.yaml | 110 ++
>  .../display/allwinner,sun9i-a80-deu.yaml  |  19 +--
>  .../display/amlogic,meson-dw-hdmi.yaml|   4 +-
>  .../bindings/display/amlogic,meson-vpu.yaml   |   4 +-
>  .../bindings/display/brcm,bcm2835-dpi.yaml|   7 +-
>  .../display/bridge/analogix,anx7625.yaml  |   6 +-
>  .../display/bridge/analogix,anx7814.yaml  |  19 +--
>  .../bindings/display/bridge/anx6345.yaml  |  18 +--
>  .../display/bridge/cdns,mhdp8546.yaml |  22 +---
>  .../display/bridge/chrontel,ch7033.yaml   |   6 +-
>  .../display/bridge/intel,keembay-dsi.yaml |  14 +--
>  .../bindings/display/bridge/ite,it6505.yaml   |   2 +-
>  .../display/bridge/lontium,lt9611.yaml|  70 ++-
>  .../bindings/display/bridge/lvds-codec.yaml   |  18 +--
>  .../bindings/display/bridge/nwl-dsi.yaml  |  41 ++-
>  .../bindings/display/bridge/ps8640.yaml   |  24 +---
>  .../bindings/display/bridge/renesas,lvds.yaml |  18 +--
>  .../display/bridge/simple-bridge.yaml |  18 +--
>  .../display/bridge/snps,dw-mipi-dsi.yaml  |   7 +-
>  .../display/bridge/thine,thc63lvd1024.yaml|  21 +---
>  .../bindings/display/bridge/ti,sn65dsi86.yaml |  45 +--
>  .../bindings/display/bridge/ti,tfp410.yaml|  24 +---
>  .../display/bridge/toshiba,tc358762.yaml  |  52 +
>  .../display/bridge/toshiba,tc358768.yaml  |  48 +---
>  .../display/bridge/toshiba,tc358775.yaml  |  19 +--
>  .../connector/analog-tv-connector.yaml|   1 +
>  .../display/connector/dvi-connector.yaml  |   1 +
>  .../display/connector/hdmi-connector.yaml |   1 +
>  .../display/connector/vga-connector.yaml  |   1 +
>  .../bindings/display/imx/nxp,imx8mq-dcss.yaml |   2 +-
>  .../bindings/display/ingenic,lcd.yaml |  10 +-
>  .../display/intel,keembay-display.yaml|   2 +-
>  .../display/panel/advantech,idk-2121wr.yaml   |  21 ++--
>  .../bindings/display/panel/panel-common.yaml  |  11 +-
>  .../rockchip/rockchip,rk3066-hdmi.yaml|  16 +--
>  .../display/rockchip/rockchip-vop.yaml|   5 +-
>  .../bindings/display/st,stm32-dsi.yaml|  12 +-
>  .../bindings/display/st,stm32-ltdc.yaml   |   8 +-
>  .../devicetree/bindings/display/ste,mcde.yaml |   5 +-
>  .../bindings/display/ti/ti,am65x-dss.yaml |  19 +--
>  .../bindings/display/ti/ti,j721e-dss.yaml |  23 +---
>  .../bindings/display/ti/ti,k2g-dss.yaml   |   3 +-
>  51 files changed, 185 insertions(+), 747 deletions(-)

-- 
Regards,

Laurent Pinchart
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] dt-bindings: display: Use OF graph schema

2020-11-17 Thread Rob Herring
On Tue, Nov 17, 2020 at 3:43 AM Laurent Pinchart
 wrote:
>
> Hi Rob,
>
> Thank you for the patch.
>
> On Mon, Nov 16, 2020 at 07:37:03PM -0600, Rob Herring wrote:
> > Now that we have a graph schema, rework the display related schemas to use
> > it. Mostly this is adding a reference to graph.yaml and dropping duplicate
> > parts from schemas.
> >
> > Cc: Thierry Reding 
> > Cc: Sam Ravnborg 
> > Cc: Laurent Pinchart 
> > Cc: Maxime Ripard 
> > Cc: Maarten Lankhorst 
> > Cc: Thomas Zimmermann 
> > Signed-off-by: Rob Herring 
> > ---
> > graph.yaml is in the dtschema repo, so this can go into drm-misc and
> > hopefully anything afterwards be fixed up to use graph.yaml.
> >
> >  .../allwinner,sun4i-a10-display-backend.yaml  | 14 +---
> >  .../allwinner,sun4i-a10-display-frontend.yaml | 16 +
> >  .../display/allwinner,sun4i-a10-hdmi.yaml | 16 +
> >  .../display/allwinner,sun4i-a10-tcon.yaml | 16 +
> >  .../allwinner,sun4i-a10-tv-encoder.yaml   |  2 +-
> >  .../display/allwinner,sun6i-a31-drc.yaml  | 16 +
> >  .../display/allwinner,sun6i-a31-mipi-dsi.yaml |  6 +-
> >  .../allwinner,sun8i-a83t-de2-mixer.yaml   | 16 +
> >  .../display/allwinner,sun8i-a83t-dw-hdmi.yaml | 16 +
> >  .../display/allwinner,sun8i-r40-tcon-top.yaml | 19 +-
> >  .../display/allwinner,sun9i-a80-deu.yaml  | 16 +
> >  .../bindings/display/brcm,bcm2835-dpi.yaml|  7 +-
> >  .../display/bridge/analogix,anx7625.yaml  |  5 +-
> >  .../display/bridge/analogix,anx7814.yaml  | 18 +
> >  .../bindings/display/bridge/anx6345.yaml  | 15 ++--
> >  .../display/bridge/cdns,mhdp8546.yaml | 18 +
> >  .../display/bridge/chrontel,ch7033.yaml   |  3 +
> >  .../display/bridge/intel,keembay-dsi.yaml |  9 +--
> >  .../bindings/display/bridge/ite,it6505.yaml   |  2 +-
> >  .../display/bridge/lontium,lt9611.yaml| 68 ++-
> >  .../bindings/display/bridge/lvds-codec.yaml   | 15 +---
> >  .../bindings/display/bridge/nwl-dsi.yaml  | 17 +
> >  .../bindings/display/bridge/ps8640.yaml   | 21 ++
> >  .../bindings/display/bridge/renesas,lvds.yaml | 15 +---
> >  .../display/bridge/simple-bridge.yaml | 15 +---
> >  .../display/bridge/snps,dw-mipi-dsi.yaml  |  5 +-
> >  .../display/bridge/thine,thc63lvd1024.yaml| 16 +
> >  .../bindings/display/bridge/ti,sn65dsi86.yaml | 27 +---
> >  .../bindings/display/bridge/ti,tfp410.yaml| 15 +---
> >  .../display/bridge/toshiba,tc358762.yaml  | 51 ++
> >  .../display/bridge/toshiba,tc358768.yaml  | 11 +--
> >  .../display/bridge/toshiba,tc358775.yaml  | 17 ++---
> >  .../connector/analog-tv-connector.yaml|  1 +
> >  .../display/connector/dvi-connector.yaml  |  1 +
> >  .../display/connector/hdmi-connector.yaml |  1 +
> >  .../display/connector/vga-connector.yaml  |  1 +
> >  .../bindings/display/imx/nxp,imx8mq-dcss.yaml |  2 +-
> >  .../bindings/display/ingenic,lcd.yaml |  7 +-
> >  .../display/intel,keembay-display.yaml|  2 +-
> >  .../display/panel/advantech,idk-2121wr.yaml   |  5 ++
> >  .../bindings/display/panel/panel-common.yaml  | 11 +--
> >  .../rockchip/rockchip,rk3066-hdmi.yaml| 13 +---
> >  .../display/rockchip/rockchip-vop.yaml|  5 +-
> >  .../bindings/display/st,stm32-dsi.yaml| 13 ++--
> >  .../bindings/display/st,stm32-ltdc.yaml   |  7 +-
> >  .../bindings/display/ti/ti,am65x-dss.yaml | 16 +
> >  .../bindings/display/ti/ti,j721e-dss.yaml | 18 +
> >  .../bindings/display/ti/ti,k2g-dss.yaml   |  4 +-
> >  48 files changed, 121 insertions(+), 509 deletions(-)
> >
> > diff --git 
> > a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-backend.yaml
> >  
> > b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-backend.yaml
> > index 86057d541065..7e8798b43c2a 100644
> > --- 
> > a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-backend.yaml
> > +++ 
> > b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-backend.yaml
> > @@ -85,17 +85,9 @@ properties:
> >
> >ports:
> >  type: object
>
> Do we need to specify the type here (and in all the locations below),
> give that it's specified in /schemas/graph.yaml#/properties/ports ?

The metaschema enforces that we have 'type' if we have 'properties'
(except at the top level), so yes. Now that I think about it more,
maybe I can rework it such that we required at least 'type' or '$ref'
when we have 'properties'. Though that's not going to remove 'type'
for 'port@n' schemas.

[...]

> > diff --git 
> > a/Documentation/devicetree/bindings/display/panel/panel-common.yaml 
> > b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> > index cd6dc5461721..5b38dc89cb21 100644
> > --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
> > @

Re: [PATCH] dt-bindings: display: Use OF graph schema

2020-11-17 Thread Laurent Pinchart
Hi Rob,

Thank you for the patch.

On Mon, Nov 16, 2020 at 07:37:03PM -0600, Rob Herring wrote:
> Now that we have a graph schema, rework the display related schemas to use
> it. Mostly this is adding a reference to graph.yaml and dropping duplicate
> parts from schemas.
> 
> Cc: Thierry Reding 
> Cc: Sam Ravnborg 
> Cc: Laurent Pinchart 
> Cc: Maxime Ripard 
> Cc: Maarten Lankhorst 
> Cc: Thomas Zimmermann 
> Signed-off-by: Rob Herring 
> ---
> graph.yaml is in the dtschema repo, so this can go into drm-misc and 
> hopefully anything afterwards be fixed up to use graph.yaml.
> 
>  .../allwinner,sun4i-a10-display-backend.yaml  | 14 +---
>  .../allwinner,sun4i-a10-display-frontend.yaml | 16 +
>  .../display/allwinner,sun4i-a10-hdmi.yaml | 16 +
>  .../display/allwinner,sun4i-a10-tcon.yaml | 16 +
>  .../allwinner,sun4i-a10-tv-encoder.yaml   |  2 +-
>  .../display/allwinner,sun6i-a31-drc.yaml  | 16 +
>  .../display/allwinner,sun6i-a31-mipi-dsi.yaml |  6 +-
>  .../allwinner,sun8i-a83t-de2-mixer.yaml   | 16 +
>  .../display/allwinner,sun8i-a83t-dw-hdmi.yaml | 16 +
>  .../display/allwinner,sun8i-r40-tcon-top.yaml | 19 +-
>  .../display/allwinner,sun9i-a80-deu.yaml  | 16 +
>  .../bindings/display/brcm,bcm2835-dpi.yaml|  7 +-
>  .../display/bridge/analogix,anx7625.yaml  |  5 +-
>  .../display/bridge/analogix,anx7814.yaml  | 18 +
>  .../bindings/display/bridge/anx6345.yaml  | 15 ++--
>  .../display/bridge/cdns,mhdp8546.yaml | 18 +
>  .../display/bridge/chrontel,ch7033.yaml   |  3 +
>  .../display/bridge/intel,keembay-dsi.yaml |  9 +--
>  .../bindings/display/bridge/ite,it6505.yaml   |  2 +-
>  .../display/bridge/lontium,lt9611.yaml| 68 ++-
>  .../bindings/display/bridge/lvds-codec.yaml   | 15 +---
>  .../bindings/display/bridge/nwl-dsi.yaml  | 17 +
>  .../bindings/display/bridge/ps8640.yaml   | 21 ++
>  .../bindings/display/bridge/renesas,lvds.yaml | 15 +---
>  .../display/bridge/simple-bridge.yaml | 15 +---
>  .../display/bridge/snps,dw-mipi-dsi.yaml  |  5 +-
>  .../display/bridge/thine,thc63lvd1024.yaml| 16 +
>  .../bindings/display/bridge/ti,sn65dsi86.yaml | 27 +---
>  .../bindings/display/bridge/ti,tfp410.yaml| 15 +---
>  .../display/bridge/toshiba,tc358762.yaml  | 51 ++
>  .../display/bridge/toshiba,tc358768.yaml  | 11 +--
>  .../display/bridge/toshiba,tc358775.yaml  | 17 ++---
>  .../connector/analog-tv-connector.yaml|  1 +
>  .../display/connector/dvi-connector.yaml  |  1 +
>  .../display/connector/hdmi-connector.yaml |  1 +
>  .../display/connector/vga-connector.yaml  |  1 +
>  .../bindings/display/imx/nxp,imx8mq-dcss.yaml |  2 +-
>  .../bindings/display/ingenic,lcd.yaml |  7 +-
>  .../display/intel,keembay-display.yaml|  2 +-
>  .../display/panel/advantech,idk-2121wr.yaml   |  5 ++
>  .../bindings/display/panel/panel-common.yaml  | 11 +--
>  .../rockchip/rockchip,rk3066-hdmi.yaml| 13 +---
>  .../display/rockchip/rockchip-vop.yaml|  5 +-
>  .../bindings/display/st,stm32-dsi.yaml| 13 ++--
>  .../bindings/display/st,stm32-ltdc.yaml   |  7 +-
>  .../bindings/display/ti/ti,am65x-dss.yaml | 16 +
>  .../bindings/display/ti/ti,j721e-dss.yaml | 18 +
>  .../bindings/display/ti/ti,k2g-dss.yaml   |  4 +-
>  48 files changed, 121 insertions(+), 509 deletions(-)
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-backend.yaml
>  
> b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-backend.yaml
> index 86057d541065..7e8798b43c2a 100644
> --- 
> a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-backend.yaml
> +++ 
> b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-backend.yaml
> @@ -85,17 +85,9 @@ properties:
>  
>ports:
>  type: object

Do we need to specify the type here (and in all the locations below),
give that it's specified in /schemas/graph.yaml#/properties/ports ?

> -description: |
> -  A ports node with endpoint definitions as defined in
> -  Documentation/devicetree/bindings/media/video-interfaces.txt.
> +$ref: /schemas/graph.yaml#/properties/ports
>  
>  properties:
> -  "#address-cells":
> -const: 1
> -
> -  "#size-cells":
> -const: 0
> -
>port@0:
>  type: object
>  description: |
> @@ -107,12 +99,10 @@ properties:
>Output endpoints of the controller.
>  
>  required:
> -  - "#address-cells"
> -  - "#size-cells"
>- port@0
>- port@1
>  
> -additionalProperties: false
> +unevaluatedProperties: false
>  
>  required:
>- compatible
> diff --git 
> a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-frontend.yaml
>  
> b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-display-frontend