mbox series

[v3,00/13] Conversion of panel bindings to DT schema

Message ID 20190705164221.4462-1-robh@kernel.org
Headers show
Series Conversion of panel bindings to DT schema | expand

Message

Rob Herring July 5, 2019, 4:42 p.m. UTC
This series converts the common panel bindings to DT schema format. 
Besides the conversion of common panel properties, a few panel bindings 
are converted here as well. These are all the ones with references to 
panel-common.txt or panel-lvds.txt.

I'll apply the series to drm-misc. One patch from v2 already got applied 
without its dependency.

v3:
- Consistently list all used properties and add 'additionalProperties: 
  false'

Rob

Rob Herring (13):
  dt-bindings: display: Convert common panel bindings to DT schema
  dt-bindings: display: Convert ampire,am-480272h3tmqw-t01h panel to DT
    schema
  dt-bindings: display: Convert armadeus,st0700-adapt panel to DT schema
  dt-bindings: display: Convert bananapi,s070wv20-ct16 panel to DT
    schema
  dt-bindings: display: Convert dlc,dlc0700yzg-1 panel to DT schema
  dt-bindings: display: Convert pda,91-00156-a0 panel to DT schema
  dt-bindings: display: Convert raspberrypi,7inch-touchscreen panel to
    DT schema
  dt-bindings: display: Convert tfc,s9700rtwv43tr-01b panel to DT schema
  dt-bindings: display: Convert panel-lvds to DT schema
  dt-bindings: display: Convert innolux,ee101ia-01 panel to DT schema
  dt-bindings: display: Convert mitsubishi,aa104xd12 panel to DT schema
  dt-bindings: display: Convert mitsubishi,aa121td01 panel to DT schema
  dt-bindings: display: Convert sgd,gktw70sdae4se panel to DT schema

 .../panel/ampire,am-480272h3tmqw-t01h.txt     |  26 ---
 .../panel/ampire,am-480272h3tmqw-t01h.yaml    |  42 +++++
 .../display/panel/arm,versatile-tft-panel.txt |   2 +-
 .../display/panel/armadeus,st0700-adapt.txt   |   9 --
 .../display/panel/armadeus,st0700-adapt.yaml  |  33 ++++
 .../display/panel/bananapi,s070wv20-ct16.txt  |  12 --
 .../display/panel/bananapi,s070wv20-ct16.yaml |  31 ++++
 .../display/panel/dlc,dlc0700yzg-1.txt        |  13 --
 .../display/panel/dlc,dlc0700yzg-1.yaml       |  31 ++++
 .../display/panel/innolux,ee101ia-01d.txt     |   7 -
 .../display/panel/innolux,ee101ia-01d.yaml    |  31 ++++
 .../bindings/display/panel/lvds.yaml          | 107 +++++++++++++
 .../display/panel/mitsubishi,aa104xd12.txt    |  47 ------
 .../display/panel/mitsubishi,aa104xd12.yaml   |  75 +++++++++
 .../display/panel/mitsubishi,aa121td01.txt    |  47 ------
 .../display/panel/mitsubishi,aa121td01.yaml   |  74 +++++++++
 .../bindings/display/panel/panel-common.txt   | 101 ------------
 .../bindings/display/panel/panel-common.yaml  | 149 ++++++++++++++++++
 .../bindings/display/panel/panel-lvds.txt     | 121 --------------
 .../bindings/display/panel/panel.txt          |   4 -
 .../display/panel/pda,91-00156-a0.txt         |  14 --
 .../display/panel/pda,91-00156-a0.yaml        |  31 ++++
 .../panel/raspberrypi,7inch-touchscreen.txt   |  49 ------
 .../panel/raspberrypi,7inch-touchscreen.yaml  |  71 +++++++++
 .../display/panel/sgd,gktw70sdae4se.txt       |  41 -----
 .../display/panel/sgd,gktw70sdae4se.yaml      |  68 ++++++++
 .../bindings/display/panel/simple-panel.txt   |  29 +---
 .../display/panel/tfc,s9700rtwv43tr-01b.txt   |  15 --
 .../display/panel/tfc,s9700rtwv43tr-01b.yaml  |  33 ++++
 29 files changed, 778 insertions(+), 535 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/display/panel/ampire,am-480272h3tmqw-t01h.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/ampire,am-480272h3tmqw-t01h.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/armadeus,st0700-adapt.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/armadeus,st0700-adapt.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/bananapi,s070wv20-ct16.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/dlc,dlc0700yzg-1.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/innolux,ee101ia-01d.yaml
 create mode 100644 Documentation/devicetree/bindings/display/panel/lvds.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/mitsubishi,aa104xd12.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/mitsubishi,aa121td01.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-common.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/panel-common.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-lvds.txt
 delete mode 100644 Documentation/devicetree/bindings/display/panel/panel.txt
 delete mode 100644 Documentation/devicetree/bindings/display/panel/pda,91-00156-a0.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/pda,91-00156-a0.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/raspberrypi,7inch-touchscreen.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/raspberrypi,7inch-touchscreen.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/sgd,gktw70sdae4se.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/panel/tfc,s9700rtwv43tr-01b.txt
 create mode 100644 Documentation/devicetree/bindings/display/panel/tfc,s9700rtwv43tr-01b.yaml

-- 
2.20.1

Comments

Geert Uytterhoeven Oct. 25, 2019, 2:38 p.m. UTC | #1
Hi Rob,

On Fri, Oct 25, 2019 at 4:25 PM Rob Herring <robh@kernel.org> wrote:
> On Fri, Oct 25, 2019 at 8:07 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> > On Fri, Jul 5, 2019 at 6:46 PM Rob Herring <robh@kernel.org> wrote:

> > > Convert the common panel bindings to DT schema consolidating scattered

> > > definitions to a single schema file.

> > >

> > > The 'simple-panel' binding just a collection of properties and not a

> > > complete binding itself. All of the 'simple-panel' properties are

> > > covered by the panel-common.txt binding with the exception of the

> > > 'no-hpd' property, so add that to the schema.

> > >

> > > As there are lots of references to simple-panel.txt, just keep the file

> > > with a reference to common.yaml for now until all the bindings are

> > > converted.

> > >

> > > Cc: Thierry Reding <thierry.reding@gmail.com>

> > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> > > Cc: dri-devel@lists.freedesktop.org

> > > Acked-by: Sam Ravnborg <sam@ravnborg.org>

> > > Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>

> > > Reviewed-by: Thierry Reding <treding@nvidia.com>

> > > Signed-off-by: Rob Herring <robh@kernel.org>

> >

> > This is now commit 821a1f7171aeea5e ("dt-bindings: display: Convert

> > common panel bindings to DT schema").

> >

> > > --- /dev/null

> > > +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml

> >

> > > +  backlight:

> > > +    $ref: /schemas/types.yaml#/definitions/phandle

> > > +    description:

> > > +      For panels whose backlight is controlled by an external backlight

> > > +      controller, this property contains a phandle that references the

> > > +      controller.

> >

> > This paragraph seems to apply to all nodes named "backlight", causing

> > e.g. (for ARCH=arm mach_shmobile_defconfig) "make dtbs_check

> > DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/panel/panel-common.yaml"

> > to start complaining:

> >

> >     arch/arm/boot/dts/r8a7740-armadillo800eva.dt.yaml: backlight:

> > {'compatible': ['pwm-backlight'], 'pwms': [[40, 2, 33333, 1]],

> > 'brightness-levels': [[0, 1, 2, 4, 8, 16, 32, 64, 128, 255]],

> > 'default-brightness-level': [[9]], 'pinctrl-0': [[41]],

> > 'pinctrl-names': ['default'], 'power-supply': [[42]], 'enable-gpios':

> > [[15, 61, 0]]} is not of type 'array'

> >     arch/arm/boot/dts/r8a7740-armadillo800eva.dt.yaml: backlight:

> > {'groups': ['tpu0_to2_1'], 'function': ['tpu0'], 'phandle': [[41]]} is

> > not of type 'array'

> >

> > Do you know what's wrong?

>

> I'm not seeing that. What does .../bindings/processed-schema.yaml look like?


I see it with both next-20191015 and v5.4-rc4.

- $filename: /scratch/geert/linux/linux-next/Documentation/devicetree/bindings/display/panel/panel-common.yaml
  $id: http://devicetree.org/schemas/display/panel/panel-common.yaml#
  $schema: http://devicetree.org/meta-schemas/core.yaml#
  dependencies:
    height-mm: [width-mm]
    width-mm: [height-mm]
  patternProperties: {'pinctrl-[0-9]+': true}
  properties:
    $nodename: true
    backlight: {$ref: /schemas/types.yaml#/definitions/phandle}
    ddc-i2c-bus: {$ref: /schemas/types.yaml#/definitions/phandle}
    enable-gpios: {maxItems: 1, minItems: 1}
    height-mm: {}
    label: {}
    no-hpd: {type: boolean}
    panel-timing: {type: object}
    phandle: true
    pinctrl-names: true
    port: {type: object}
    ports: {type: object}
    power-supply: {}
    reset-gpios: {maxItems: 1, minItems: 1}
    rotation:
      allOf:
      - {$ref: /schemas/types.yaml#/definitions/uint32}
      - additionalItems: false
        items:
          additionalItems: false
          items:
            enum: [0, 90, 180, 270]
          maxItems: 1
          minItems: 1
          type: array
        maxItems: 1
        minItems: 1
        type: array
    status: true
    width-mm: {}
  select:
    properties: {$nodename: true}
    required: [$nodename]
  title: Common Properties for Display Panels

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
Rob Herring Oct. 25, 2019, 3 p.m. UTC | #2
On Fri, Oct 25, 2019 at 9:39 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>

> Hi Rob,

>

> On Fri, Oct 25, 2019 at 4:25 PM Rob Herring <robh@kernel.org> wrote:

> > On Fri, Oct 25, 2019 at 8:07 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> > > On Fri, Jul 5, 2019 at 6:46 PM Rob Herring <robh@kernel.org> wrote:

> > > > Convert the common panel bindings to DT schema consolidating scattered

> > > > definitions to a single schema file.

> > > >

> > > > The 'simple-panel' binding just a collection of properties and not a

> > > > complete binding itself. All of the 'simple-panel' properties are

> > > > covered by the panel-common.txt binding with the exception of the

> > > > 'no-hpd' property, so add that to the schema.

> > > >

> > > > As there are lots of references to simple-panel.txt, just keep the file

> > > > with a reference to common.yaml for now until all the bindings are

> > > > converted.

> > > >

> > > > Cc: Thierry Reding <thierry.reding@gmail.com>

> > > > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> > > > Cc: dri-devel@lists.freedesktop.org

> > > > Acked-by: Sam Ravnborg <sam@ravnborg.org>

> > > > Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>

> > > > Reviewed-by: Thierry Reding <treding@nvidia.com>

> > > > Signed-off-by: Rob Herring <robh@kernel.org>

> > >

> > > This is now commit 821a1f7171aeea5e ("dt-bindings: display: Convert

> > > common panel bindings to DT schema").

> > >

> > > > --- /dev/null

> > > > +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml

> > >

> > > > +  backlight:

> > > > +    $ref: /schemas/types.yaml#/definitions/phandle

> > > > +    description:

> > > > +      For panels whose backlight is controlled by an external backlight

> > > > +      controller, this property contains a phandle that references the

> > > > +      controller.

> > >

> > > This paragraph seems to apply to all nodes named "backlight", causing

> > > e.g. (for ARCH=arm mach_shmobile_defconfig) "make dtbs_check

> > > DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/panel/panel-common.yaml"

> > > to start complaining:

> > >

> > >     arch/arm/boot/dts/r8a7740-armadillo800eva.dt.yaml: backlight:

> > > {'compatible': ['pwm-backlight'], 'pwms': [[40, 2, 33333, 1]],

> > > 'brightness-levels': [[0, 1, 2, 4, 8, 16, 32, 64, 128, 255]],

> > > 'default-brightness-level': [[9]], 'pinctrl-0': [[41]],

> > > 'pinctrl-names': ['default'], 'power-supply': [[42]], 'enable-gpios':

> > > [[15, 61, 0]]} is not of type 'array'

> > >     arch/arm/boot/dts/r8a7740-armadillo800eva.dt.yaml: backlight:

> > > {'groups': ['tpu0_to2_1'], 'function': ['tpu0'], 'phandle': [[41]]} is

> > > not of type 'array'

> > >

> > > Do you know what's wrong?

> >

> > I'm not seeing that. What does .../bindings/processed-schema.yaml look like?

>

> I see it with both next-20191015 and v5.4-rc4.

>

> - $filename: /scratch/geert/linux/linux-next/Documentation/devicetree/bindings/display/panel/panel-common.yaml

>   $id: http://devicetree.org/schemas/display/panel/panel-common.yaml#

>   $schema: http://devicetree.org/meta-schemas/core.yaml#

>   dependencies:

>     height-mm: [width-mm]

>     width-mm: [height-mm]

>   patternProperties: {'pinctrl-[0-9]+': true}

>   properties:

>     $nodename: true

>     backlight: {$ref: /schemas/types.yaml#/definitions/phandle}

>     ddc-i2c-bus: {$ref: /schemas/types.yaml#/definitions/phandle}

>     enable-gpios: {maxItems: 1, minItems: 1}

>     height-mm: {}

>     label: {}

>     no-hpd: {type: boolean}

>     panel-timing: {type: object}

>     phandle: true

>     pinctrl-names: true

>     port: {type: object}

>     ports: {type: object}

>     power-supply: {}

>     reset-gpios: {maxItems: 1, minItems: 1}

>     rotation:

>       allOf:

>       - {$ref: /schemas/types.yaml#/definitions/uint32}

>       - additionalItems: false

>         items:

>           additionalItems: false

>           items:

>             enum: [0, 90, 180, 270]

>           maxItems: 1

>           minItems: 1

>           type: array

>         maxItems: 1

>         minItems: 1

>         type: array

>     status: true

>     width-mm: {}

>   select:

>     properties: {$nodename: true}

>     required: [$nodename]


The problem is this causing the schema to be applied to every node.
Update dtschema repo. This was fixed some time ago.

Rob