2019-06-24 22:11:27

by Rob Herring (Arm)

[permalink] [raw]
Subject: [PATCH v2 10/15] dt-bindings: display: Convert tpo,tpg110 panel to DT schema

Convert the tpo,tpg110 panel binding to DT schema.

Cc: Linus Walleij <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: [email protected]
Signed-off-by: Rob Herring <[email protected]>
---
.../bindings/display/panel/tpo,tpg110.txt | 70 ------------
.../bindings/display/panel/tpo,tpg110.yaml | 101 ++++++++++++++++++
2 files changed, 101 insertions(+), 70 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt
create mode 100644 Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml

diff --git a/Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt b/Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt
deleted file mode 100644
index 40f3d7c713bb..000000000000
--- a/Documentation/devicetree/bindings/display/panel/tpo,tpg110.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-TPO TPG110 Panel
-================
-
-This panel driver is a component that acts as an intermediary
-between an RGB output and a variety of panels. The panel
-driver is strapped up in electronics to the desired resolution
-and other properties, and has a control interface over 3WIRE
-SPI. By talking to the TPG110 over SPI, the strapped properties
-can be discovered and the hardware is therefore mostly
-self-describing.
-
- +--------+
-SPI -> | TPO | -> physical display
-RGB -> | TPG110 |
- +--------+
-
-If some electrical strap or alternate resolution is desired,
-this can be set up by taking software control of the display
-over the SPI interface. The interface can also adjust
-for properties of the display such as gamma correction and
-certain electrical driving levels.
-
-The TPG110 does not know the physical dimensions of the panel
-connected, so this needs to be specified in the device tree.
-
-It requires a GPIO line for control of its reset line.
-
-The serial protocol has line names that resemble I2C but the
-protocol is not I2C but 3WIRE SPI.
-
-Required properties:
-- compatible : one of:
- "ste,nomadik-nhk15-display", "tpo,tpg110"
- "tpo,tpg110"
-- grestb-gpios : panel reset GPIO
-- width-mm : see display/panel/panel-common.txt
-- height-mm : see display/panel/panel-common.txt
-
-The device needs to be a child of an SPI bus, see
-spi/spi-bus.txt. The SPI child must set the following
-properties:
-- spi-3wire
-- spi-max-frequency = <3000000>;
-as these are characteristics of this device.
-
-The device node can contain one 'port' child node with one child
-'endpoint' node, according to the bindings defined in
-media/video-interfaces.txt. This node should describe panel's video bus.
-
-Example
--------
-
-panel: display@0 {
- compatible = "tpo,tpg110";
- reg = <0>;
- spi-3wire;
- /* 320 ns min period ~= 3 MHz */
- spi-max-frequency = <3000000>;
- /* Width and height from data sheet */
- width-mm = <116>;
- height-mm = <87>;
- grestb-gpios = <&foo_gpio 5 GPIO_ACTIVE_LOW>;
- backlight = <&bl>;
-
- port {
- nomadik_clcd_panel: endpoint {
- remote-endpoint = <&foo>;
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml b/Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml
new file mode 100644
index 000000000000..a51660b73f28
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/tpo,tpg110.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/tpo,tpg110.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TPO TPG110 Panel
+
+maintainers:
+ - Linus Walleij <[email protected]>
+ - Thierry Reding <[email protected]>
+
+description: |+
+ This panel driver is a component that acts as an intermediary
+ between an RGB output and a variety of panels. The panel
+ driver is strapped up in electronics to the desired resolution
+ and other properties, and has a control interface over 3WIRE
+ SPI. By talking to the TPG110 over SPI, the strapped properties
+ can be discovered and the hardware is therefore mostly
+ self-describing.
+
+ +--------+
+ SPI -> | TPO | -> physical display
+ RGB -> | TPG110 |
+ +--------+
+
+ If some electrical strap or alternate resolution is desired,
+ this can be set up by taking software control of the display
+ over the SPI interface. The interface can also adjust
+ for properties of the display such as gamma correction and
+ certain electrical driving levels.
+
+ The TPG110 does not know the physical dimensions of the panel
+ connected, so this needs to be specified in the device tree.
+
+ It requires a GPIO line for control of its reset line.
+
+ The serial protocol has line names that resemble I2C but the
+ protocol is not I2C but 3WIRE SPI.
+
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - ste,nomadik-nhk15-display
+ - const: tpo,tpg110
+ - const: tpo,tpg110
+
+ reg: true
+
+ grestb-gpios:
+ maxItems: 1
+ description: panel reset GPIO
+
+ spi-3wire: true
+
+ spi-max-frequency:
+ const: 3000000
+
+required:
+ - compatible
+ - reg
+ - grestb-gpios
+ - width-mm
+ - height-mm
+ - spi-3wire
+ - spi-max-frequency
+ - port
+
+examples:
+ - |+
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel: display@0 {
+ compatible = "tpo,tpg110";
+ reg = <0>;
+ spi-3wire;
+ /* 320 ns min period ~= 3 MHz */
+ spi-max-frequency = <3000000>;
+ /* Width and height from data sheet */
+ width-mm = <116>;
+ height-mm = <87>;
+ grestb-gpios = <&foo_gpio 5 1>;
+ backlight = <&bl>;
+
+ port {
+ nomadik_clcd_panel: endpoint {
+ remote-endpoint = <&foo>;
+ };
+ };
+ };
+ };
+
+...
--
2.20.1


2019-06-24 22:17:57

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2 10/15] dt-bindings: display: Convert tpo,tpg110 panel to DT schema

On Mon, Jun 24, 2019 at 11:59 PM Rob Herring <[email protected]> wrote:

> Convert the tpo,tpg110 panel binding to DT schema.
>
> Cc: Linus Walleij <[email protected]>
> Cc: Thierry Reding <[email protected]>
> Cc: Sam Ravnborg <[email protected]>
> Cc: Maxime Ripard <[email protected]>
> Cc: Laurent Pinchart <[email protected]>
> Cc: [email protected]
> Signed-off-by: Rob Herring <[email protected]>

Awesome, fixed up the MAINATINERS entry and applied and
pushed for DRM next with my Reviewed-by.

Yours,
Linus Walleij

2019-06-25 03:30:21

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 10/15] dt-bindings: display: Convert tpo,tpg110 panel to DT schema

On Mon, Jun 24, 2019 at 4:13 PM Linus Walleij <[email protected]> wrote:
>
> On Mon, Jun 24, 2019 at 11:59 PM Rob Herring <[email protected]> wrote:
>
> > Convert the tpo,tpg110 panel binding to DT schema.
> >
> > Cc: Linus Walleij <[email protected]>
> > Cc: Thierry Reding <[email protected]>
> > Cc: Sam Ravnborg <[email protected]>
> > Cc: Maxime Ripard <[email protected]>
> > Cc: Laurent Pinchart <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Rob Herring <[email protected]>
>
> Awesome, fixed up the MAINATINERS entry and applied and
> pushed for DRM next with my Reviewed-by.

You shouldn't have because this is dependent on patch 2 and
panel-common.yaml. So now 'make dt_binding_check' is broken.

Rob

2019-06-25 08:02:55

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v2 10/15] dt-bindings: display: Convert tpo,tpg110 panel to DT schema

On Mon, Jun 24, 2019 at 03:56:44PM -0600, Rob Herring wrote:
> Convert the tpo,tpg110 panel binding to DT schema.
>
> Cc: Linus Walleij <[email protected]>
> Cc: Thierry Reding <[email protected]>
> Cc: Sam Ravnborg <[email protected]>
> Cc: Maxime Ripard <[email protected]>
> Cc: Laurent Pinchart <[email protected]>
> Cc: [email protected]
> Signed-off-by: Rob Herring <[email protected]>

Reviewed-by: Maxime Ripard <[email protected]>

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Attachments:
(No filename) (609.00 B)
signature.asc (235.00 B)
Download all attachments

2019-06-25 08:27:29

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2 10/15] dt-bindings: display: Convert tpo,tpg110 panel to DT schema

On Tue, Jun 25, 2019 at 12:47 AM Rob Herring <[email protected]> wrote:
> On Mon, Jun 24, 2019 at 4:13 PM Linus Walleij <[email protected]> wrote:
> > On Mon, Jun 24, 2019 at 11:59 PM Rob Herring <[email protected]> wrote:
> >
> > > Convert the tpo,tpg110 panel binding to DT schema.
> > >
> > > Cc: Linus Walleij <[email protected]>
> > > Cc: Thierry Reding <[email protected]>
> > > Cc: Sam Ravnborg <[email protected]>
> > > Cc: Maxime Ripard <[email protected]>
> > > Cc: Laurent Pinchart <[email protected]>
> > > Cc: [email protected]
> > > Signed-off-by: Rob Herring <[email protected]>
> >
> > Awesome, fixed up the MAINATINERS entry and applied and
> > pushed for DRM next with my Reviewed-by.
>
> You shouldn't have because this is dependent on patch 2 and
> panel-common.yaml. So now 'make dt_binding_check' is broken.

Ooops easily happens when I am only adressee on this patch and
there is no mention of any dependencies.

Can I simply just merge the panel-common patch as well and we
are all happy?

I can also pick up more panel binding patches, IMO the yaml
conversions are especially uncontroversial and should have low
threshold for merging.

Yours,
Linus Walleij

2019-06-25 14:28:14

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 10/15] dt-bindings: display: Convert tpo,tpg110 panel to DT schema

On Tue, Jun 25, 2019 at 2:26 AM Linus Walleij <[email protected]> wrote:
>
> On Tue, Jun 25, 2019 at 12:47 AM Rob Herring <[email protected]> wrote:
> > On Mon, Jun 24, 2019 at 4:13 PM Linus Walleij <[email protected]> wrote:
> > > On Mon, Jun 24, 2019 at 11:59 PM Rob Herring <[email protected]> wrote:
> > >
> > > > Convert the tpo,tpg110 panel binding to DT schema.
> > > >
> > > > Cc: Linus Walleij <[email protected]>
> > > > Cc: Thierry Reding <[email protected]>
> > > > Cc: Sam Ravnborg <[email protected]>
> > > > Cc: Maxime Ripard <[email protected]>
> > > > Cc: Laurent Pinchart <[email protected]>
> > > > Cc: [email protected]
> > > > Signed-off-by: Rob Herring <[email protected]>
> > >
> > > Awesome, fixed up the MAINATINERS entry and applied and
> > > pushed for DRM next with my Reviewed-by.
> >
> > You shouldn't have because this is dependent on patch 2 and
> > panel-common.yaml. So now 'make dt_binding_check' is broken.
>
> Ooops easily happens when I am only adressee on this patch and
> there is no mention of any dependencies.

It's a series. I would assume the default is 1 person applies a series
unless explicitly stated otherwise.

> Can I simply just merge the panel-common patch as well and we
> are all happy?

I have drm-misc commit rights too, so I'll apply the whole lot when it's ready.

> I can also pick up more panel binding patches, IMO the yaml
> conversions are especially uncontroversial and should have low
> threshold for merging.

Yes, but the threshold is at least 'make dt_binding_check' should not
break. But don't worry, there are 2 other breakages in linux-next
currently.

Rob

2019-06-25 21:49:06

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v2 10/15] dt-bindings: display: Convert tpo,tpg110 panel to DT schema

On Tue, Jun 25, 2019 at 4:26 PM Rob Herring <[email protected]> wrote:
> On Tue, Jun 25, 2019 at 2:26 AM Linus Walleij <[email protected]> wrote:

> > Can I simply just merge the panel-common patch as well and we
> > are all happy?
>
> I have drm-misc commit rights too, so I'll apply the whole lot when it's ready.
>
> > I can also pick up more panel binding patches, IMO the yaml
> > conversions are especially uncontroversial and should have low
> > threshold for merging.
>
> Yes, but the threshold is at least 'make dt_binding_check' should not
> break. But don't worry, there are 2 other breakages in linux-next
> currently.

OK let's try to live with it for now, if it makes you too much trouble
we can just revert it, accidents happen.

Yours,
Linus Walleij