diff mbox series

[v2,3/9] dt-bindings: display: panel: Add bindings for NEC NL8048HL11 panel

Message ID 20190810231048.1921-4-laurent.pinchart@ideasonboard.com (mailing list archive)
State New, archived
Headers show
Series DRM panel drivers for omapdrm | expand

Commit Message

Laurent Pinchart Aug. 10, 2019, 11:10 p.m. UTC
The NEC NL8048HL11 is a 10.4cm WVGA (800x480) panel with a 24-bit RGB
parallel data interface and an SPI control interface.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since v1:

- Convert to YAML
---
 .../display/panel/nec,nl8048hl11.yaml         | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml

Comments

Sam Ravnborg Aug. 11, 2019, 4:55 p.m. UTC | #1
Hi Laurent.

My meta-schemas foo is very limited, but I noticed a few things.
Hopefully Rob finds time soon to review.

	Sam

On Sun, Aug 11, 2019 at 02:10:42AM +0300, Laurent Pinchart wrote:
> The NEC NL8048HL11 is a 10.4cm WVGA (800x480) panel with a 24-bit RGB
> parallel data interface and an SPI control interface.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> Changes since v1:
> 
> - Convert to YAML
> ---
>  .../display/panel/nec,nl8048hl11.yaml         | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml b/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> new file mode 100644
> index 000000000000..cc3d40975828
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/nec,nl8048hl11.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NEC NL8048HL11 4.1" WVGA TFT LCD panel
> +
> +description:
> +  The NEC NL8048HL11 is a 4.1" WVGA TFT LCD panel with a 24-bit RGB parallel
> +  data interface and an SPI control interface.
> +
> +maintainers:
> +  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
I *think* we are missing a reference to spi-controller.yaml here.


> +
> +properties:
> +  compatible:
> +    const: nec,nl8048hl11
> +
> +  label: true
> +  reset-gpios: true
> +  port: true
> +
> +required:
> +  - compatible
> +  - reset-gpios
> +  - port
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    lcd_panel: panel {
> +      compatible = "nec,nl8048hl11";
> +      spi-max-frequency = <10000000>;
Not sure, but should there be a reg property here for spi too?

> +
> +      reset-gpios = <&gpio7 7 GPIO_ACTIVE_LOW>;
> +
> +      port {
> +        lcd_in: endpoint {
> +          remote-endpoint = <&dpi_out>;
> +        };
> +      };
> +    };
> +
> +...
> -- 
> Regards,
> 
> Laurent Pinchart
Rob Herring Aug. 12, 2019, 7:18 p.m. UTC | #2
On Sat, Aug 10, 2019 at 5:10 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> The NEC NL8048HL11 is a 10.4cm WVGA (800x480) panel with a 24-bit RGB
> parallel data interface and an SPI control interface.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> Changes since v1:
>
> - Convert to YAML
> ---
>  .../display/panel/nec,nl8048hl11.yaml         | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
>
> diff --git a/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml b/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> new file mode 100644
> index 000000000000..cc3d40975828
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/nec,nl8048hl11.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NEC NL8048HL11 4.1" WVGA TFT LCD panel
> +
> +description:
> +  The NEC NL8048HL11 is a 4.1" WVGA TFT LCD panel with a 24-bit RGB parallel
> +  data interface and an SPI control interface.
> +
> +maintainers:
> +  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +
> +properties:
> +  compatible:
> +    const: nec,nl8048hl11
> +
> +  label: true
> +  reset-gpios: true
> +  port: true
> +
> +required:
> +  - compatible
> +  - reset-gpios
> +  - port
> +
> +additionalProperties: false
> +
> +examples:

Your example will fail on 'make dt_binding_check'...

> +  - |
> +    lcd_panel: panel {

SPI devices have to have a minimal SPI controller parent. Primarily
just #size-cells and #address-cells are needed.

'reg' is missing here too.

> +      compatible = "nec,nl8048hl11";
> +      spi-max-frequency = <10000000>;

This needs to be listed in properties ideally with some constraints.

> +
> +      reset-gpios = <&gpio7 7 GPIO_ACTIVE_LOW>;

And GPIO_ACTIVE_LOW. You have to add includes you need.

> +
> +      port {
> +        lcd_in: endpoint {
> +          remote-endpoint = <&dpi_out>;
> +        };
> +      };
> +    };
> +
> +...
> --
> Regards,
>
> Laurent Pinchart
>
Rob Herring Aug. 12, 2019, 7:21 p.m. UTC | #3
On Sun, Aug 11, 2019 at 10:56 AM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> Hi Laurent.
>
> My meta-schemas foo is very limited, but I noticed a few things.
> Hopefully Rob finds time soon to review.
>
>         Sam
>
> On Sun, Aug 11, 2019 at 02:10:42AM +0300, Laurent Pinchart wrote:
> > The NEC NL8048HL11 is a 10.4cm WVGA (800x480) panel with a 24-bit RGB
> > parallel data interface and an SPI control interface.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> > Changes since v1:
> >
> > - Convert to YAML
> > ---
> >  .../display/panel/nec,nl8048hl11.yaml         | 49 +++++++++++++++++++
> >  1 file changed, 49 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml b/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> > new file mode 100644
> > index 000000000000..cc3d40975828
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> > @@ -0,0 +1,49 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/panel/nec,nl8048hl11.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: NEC NL8048HL11 4.1" WVGA TFT LCD panel
> > +
> > +description:
> > +  The NEC NL8048HL11 is a 4.1" WVGA TFT LCD panel with a 24-bit RGB parallel
> > +  data interface and an SPI control interface.
> > +
> > +maintainers:
> > +  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > +
> > +allOf:
> > +  - $ref: panel-common.yaml#
> I *think* we are missing a reference to spi-controller.yaml here.

No, because this is a SPI slave, not a SPI controller. The example
does need a 'spi' parent node and then spi-controller.yaml will get
applied to the example.

Rob
Laurent Pinchart Aug. 13, 2019, 1:09 p.m. UTC | #4
Hi Rob,

On Mon, Aug 12, 2019 at 01:18:39PM -0600, Rob Herring wrote:
> On Sat, Aug 10, 2019 at 5:10 PM Laurent Pinchart wrote:
> >
> > The NEC NL8048HL11 is a 10.4cm WVGA (800x480) panel with a 24-bit RGB
> > parallel data interface and an SPI control interface.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> > Changes since v1:
> >
> > - Convert to YAML
> > ---
> >  .../display/panel/nec,nl8048hl11.yaml         | 49 +++++++++++++++++++
> >  1 file changed, 49 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml b/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> > new file mode 100644
> > index 000000000000..cc3d40975828
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
> > @@ -0,0 +1,49 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/panel/nec,nl8048hl11.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: NEC NL8048HL11 4.1" WVGA TFT LCD panel
> > +
> > +description:
> > +  The NEC NL8048HL11 is a 4.1" WVGA TFT LCD panel with a 24-bit RGB parallel
> > +  data interface and an SPI control interface.
> > +
> > +maintainers:
> > +  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > +
> > +allOf:
> > +  - $ref: panel-common.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    const: nec,nl8048hl11
> > +
> > +  label: true
> > +  reset-gpios: true
> > +  port: true
> > +
> > +required:
> > +  - compatible
> > +  - reset-gpios
> > +  - port
> > +
> > +additionalProperties: false
> > +
> > +examples:
> 
> Your example will fail on 'make dt_binding_check'...

I wasn't aware of this. I've now read writing-schema.md and will make
sure to submit bindings that pass the checks. I'll address the issues
your pointed out below for the next version.

> > +  - |
> > +    lcd_panel: panel {
> 
> SPI devices have to have a minimal SPI controller parent. Primarily
> just #size-cells and #address-cells are needed.
> 
> 'reg' is missing here too.
> 
> > +      compatible = "nec,nl8048hl11";
> > +      spi-max-frequency = <10000000>;
> 
> This needs to be listed in properties ideally with some constraints.
> 
> > +
> > +      reset-gpios = <&gpio7 7 GPIO_ACTIVE_LOW>;
> 
> And GPIO_ACTIVE_LOW. You have to add includes you need.
> 
> > +
> > +      port {
> > +        lcd_in: endpoint {
> > +          remote-endpoint = <&dpi_out>;
> > +        };
> > +      };
> > +    };
> > +
> > +...
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml b/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
new file mode 100644
index 000000000000..cc3d40975828
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/nec,nl8048hl11.yaml
@@ -0,0 +1,49 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/nec,nl8048hl11.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NEC NL8048HL11 4.1" WVGA TFT LCD panel
+
+description:
+  The NEC NL8048HL11 is a 4.1" WVGA TFT LCD panel with a 24-bit RGB parallel
+  data interface and an SPI control interface.
+
+maintainers:
+  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+
+allOf:
+  - $ref: panel-common.yaml#
+
+properties:
+  compatible:
+    const: nec,nl8048hl11
+
+  label: true
+  reset-gpios: true
+  port: true
+
+required:
+  - compatible
+  - reset-gpios
+  - port
+
+additionalProperties: false
+
+examples:
+  - |
+    lcd_panel: panel {
+      compatible = "nec,nl8048hl11";
+      spi-max-frequency = <10000000>;
+
+      reset-gpios = <&gpio7 7 GPIO_ACTIVE_LOW>;
+
+      port {
+        lcd_in: endpoint {
+          remote-endpoint = <&dpi_out>;
+        };
+      };
+    };
+
+...