[PATCH v1 3/3] dt-bindings: display: convert panel-dpi to DT schema

Rob Herring robh at kernel.org
Tue Jan 21 14:50:25 UTC 2020


On Mon, Jan 20, 2020 at 2:07 PM Sam Ravnborg <sam at ravnborg.org> wrote:
>
> With panel-timing converted, now convert the single
> remaining .txt user in panel/ of panel-timing to DT schema.
>
> Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
> Cc: Rob Herring <robh at kernel.org>
> Cc: Thierry Reding <thierry.reding at gmail.com>
> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Cc: Maxime Ripard <mripard at kernel.org>
> ---
>  .../bindings/display/panel/panel-dpi.txt      | 50 -------------
>  .../bindings/display/panel/panel-dpi.yaml     | 71 +++++++++++++++++++
>  2 files changed, 71 insertions(+), 50 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.txt
>  create mode 100644 Documentation/devicetree/bindings/display/panel/panel-dpi.yaml

[...]

> diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> new file mode 100644
> index 000000000000..4e19c1fd52c3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> @@ -0,0 +1,71 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/panel-dpi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic MIPI DPI Panel
> +
> +maintainers:
> +  - Sam Ravnborg <sam at ravnborg.org>
> +  - Thierry Reding <thierry.reding at gmail.com>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +
> +properties:
> +  compatible:
> +    contains:
> +      const: panel-dpi
> +    description:
> +      Shall contain "panel-dpi" in addition to a mandatory panel-specific
> +      compatible string defined in individual panel bindings. The "panel-dpi"
> +      value shall never be used on its own.

Yet we have 3 cases where it is...

A 'minItems: 2' should be enough to catch these. Or do:

items:
  - {}
  - const: panel-dpi

Or list the panel compatible that's in the example. That way we'll get
errors for all the undocumented panel compatibles (that's most of
them).

> +
> +  vcc-supply:
> +    description: |
> +      Regulator that will be used to enable power to the display
> +
> +  label: true
> +  enable-gpios: true
> +  reset-gpios: true
> +  backlight: true
> +  panel-timing: true
> +  port: true
> +
> +required:
> +  - panel-timing
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    panel at 0 {
> +      compatible = "samsung,lte430wq-f0c", "panel-dpi";
> +      label = "lcd";
> +      vcc-supply = <&vcc_supply>;
> +
> +      backlight = <&backlight>;
> +
> +      port {
> +        lcd_in: endpoint {
> +          remote-endpoint = <&dpi_out>;
> +        };
> +      };
> +      panel-timing {
> +        clock-frequency = <9200000>;
> +        hactive = <480>;
> +        vactive = <272>;
> +        hfront-porch = <8>;
> +        hback-porch = <4>;
> +        hsync-len = <41>;
> +        vback-porch = <2>;
> +        vfront-porch = <4>;
> +        vsync-len = <10>;
> +
> +        hsync-active = <0>;
> +        vsync-active = <0>;
> +        de-active = <1>;
> +        pixelclk-active = <1>;
> +      };
> +    };
> --
> 2.20.1
>


More information about the dri-devel mailing list