2020-09-21 16:57:20

by Guido Günther

[permalink] [raw]
Subject: [RFC PATCH v1 3/3] dt-binding: display: Require two rests on mantix panel

We need to reset both for the panel to show an image.

Signed-off-by: Guido Günther <[email protected]>
---
.../bindings/display/panel/mantix,mlaf057we51-x.yaml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml b/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
index 937323cc9aaa..ba5a18fac9f9 100644
--- a/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
+++ b/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
@@ -35,7 +35,9 @@ properties:
vddi-supply:
description: 1.8V I/O voltage supply

- reset-gpios: true
+ reset-gpios:
+ minItems: 2
+ maxItems: 2

backlight: true

@@ -62,7 +64,8 @@ examples:
avdd-supply = <&reg_avdd>;
avee-supply = <&reg_avee>;
vddi-supply = <&reg_1v8_p>;
- reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
+ reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>,
+ <&gpio1 24 GPIO_ACTIVE_LOW>;
backlight = <&backlight>;
};
};
--
2.26.2


2020-09-21 17:07:42

by Fabio Estevam

[permalink] [raw]
Subject: Re: [RFC PATCH v1 3/3] dt-binding: display: Require two rests on mantix panel

Hi Guido,

On Mon, Sep 21, 2020 at 1:56 PM Guido Günther <[email protected]> wrote:
>
> We need to reset both for the panel to show an image.

There is a typo in "resets" in the Subject line.

2020-09-22 11:40:34

by Guido Günther

[permalink] [raw]
Subject: Re: [RFC PATCH v1 3/3] dt-binding: display: Require two rests on mantix panel

Hi,
On Mon, Sep 21, 2020 at 02:05:55PM -0300, Fabio Estevam wrote:
> Hi Guido,
>
> On Mon, Sep 21, 2020 at 1:56 PM Guido G?nther <[email protected]> wrote:
> >
> > We need to reset both for the panel to show an image.
>
> There is a typo in "resets" in the Subject line.

Fix queued for v2. Thanks!
-- Guido

2020-09-24 19:48:22

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [RFC PATCH v1 3/3] dt-binding: display: Require two rests on mantix panel

Hi Guido.

On Mon, Sep 21, 2020 at 06:55:52PM +0200, Guido G?nther wrote:
> We need to reset both for the panel to show an image.
>
> Signed-off-by: Guido G?nther <[email protected]>
> ---
> .../bindings/display/panel/mantix,mlaf057we51-x.yaml | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml b/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> index 937323cc9aaa..ba5a18fac9f9 100644
> --- a/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> @@ -35,7 +35,9 @@ properties:
> vddi-supply:
> description: 1.8V I/O voltage supply
>
> - reset-gpios: true
> + reset-gpios:
> + minItems: 2
> + maxItems: 2

reset-gpios is, as you already wrote, defined in panel-common.yaml.
Do not try to change it here.
It would be much better, I think, to introduce a mantix,reset-gpios
property.

This would avoid that we had two different reset-gpios definitions.

Sam

>
> backlight: true
>
> @@ -62,7 +64,8 @@ examples:
> avdd-supply = <&reg_avdd>;
> avee-supply = <&reg_avee>;
> vddi-supply = <&reg_1v8_p>;
> - reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
> + reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>,
> + <&gpio1 24 GPIO_ACTIVE_LOW>;
> backlight = <&backlight>;
> };
> };
> --
> 2.26.2

2020-09-28 06:52:52

by Thierry Reding

[permalink] [raw]
Subject: Re: [RFC PATCH v1 3/3] dt-binding: display: Require two rests on mantix panel

On Thu, Sep 24, 2020 at 09:38:07PM +0200, Sam Ravnborg wrote:
> Hi Guido.
>
> On Mon, Sep 21, 2020 at 06:55:52PM +0200, Guido Günther wrote:
> > We need to reset both for the panel to show an image.
> >
> > Signed-off-by: Guido Günther <[email protected]>
> > ---
> > .../bindings/display/panel/mantix,mlaf057we51-x.yaml | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml b/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> > index 937323cc9aaa..ba5a18fac9f9 100644
> > --- a/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> > @@ -35,7 +35,9 @@ properties:
> > vddi-supply:
> > description: 1.8V I/O voltage supply
> >
> > - reset-gpios: true
> > + reset-gpios:
> > + minItems: 2
> > + maxItems: 2
>
> reset-gpios is, as you already wrote, defined in panel-common.yaml.
> Do not try to change it here.
> It would be much better, I think, to introduce a mantix,reset-gpios
> property.
>
> This would avoid that we had two different reset-gpios definitions.

My understanding is that this will only override the defaults defined in
panel-common.yaml. So everything else about the
panel-common.yaml#/properties/reset-gpios definition remains valid and
all this does is say that when this matched on "mantix,mlaf057we51-x",
then the "reset-gpios" property is expected to contain two entries as
opposed to the single entry that is expected by default.

Thierry


Attachments:
(No filename) (1.63 kB)
signature.asc (849.00 B)
Download all attachments

2020-09-28 15:05:52

by Guido Günther

[permalink] [raw]
Subject: Re: [RFC PATCH v1 3/3] dt-binding: display: Require two rests on mantix panel

Hi Thierry,
On Mon, Sep 28, 2020 at 08:50:39AM +0200, Thierry Reding wrote:
> On Thu, Sep 24, 2020 at 09:38:07PM +0200, Sam Ravnborg wrote:
> > Hi Guido.
> >
> > On Mon, Sep 21, 2020 at 06:55:52PM +0200, Guido G?nther wrote:
> > > We need to reset both for the panel to show an image.
> > >
> > > Signed-off-by: Guido G?nther <[email protected]>
> > > ---
> > > .../bindings/display/panel/mantix,mlaf057we51-x.yaml | 7 +++++--
> > > 1 file changed, 5 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml b/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> > > index 937323cc9aaa..ba5a18fac9f9 100644
> > > --- a/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> > > +++ b/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> > > @@ -35,7 +35,9 @@ properties:
> > > vddi-supply:
> > > description: 1.8V I/O voltage supply
> > >
> > > - reset-gpios: true
> > > + reset-gpios:
> > > + minItems: 2
> > > + maxItems: 2
> >
> > reset-gpios is, as you already wrote, defined in panel-common.yaml.
> > Do not try to change it here.
> > It would be much better, I think, to introduce a mantix,reset-gpios
> > property.
> >
> > This would avoid that we had two different reset-gpios definitions.
>
> My understanding is that this will only override the defaults defined in
> panel-common.yaml. So everything else about the
> panel-common.yaml#/properties/reset-gpios definition remains valid and
> all this does is say that when this matched on "mantix,mlaf057we51-x",
> then the "reset-gpios" property is expected to contain two entries as
> opposed to the single entry that is expected by default.

I thought so too but I get:

linux/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.example.dt.yaml: panel@0: reset-gpios: [[4294967295, 29, 1], [4294967295, 24, 1]] is too long
From schema: /.../linux/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml

It seems to bepossible to *extend* reset-gpios though because when i use
an example like:

reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>,
<&gpio1 24 GPIO_ACTIVE_LOW>;

i correctly get

linux/linux/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.example.dt.yaml: panel@0: reset-gpios: [[4294967295, 29, 1]] is too short
From schema: /.../linux/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml

so the `minItems: 2` is being picked up. This mens i can add
properties but i can't overwrite the existing `maxItems: 2` - that's why
i was wondering how that is supposed to work (if properties should be
overrideable from common files or not).
Cheers,
-- Guido

>
> Thierry


2020-09-29 17:49:53

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [RFC PATCH v1 3/3] dt-binding: display: Require two rests on mantix panel

On Thu, Sep 24, 2020 at 09:38:07PM +0200, Sam Ravnborg wrote:
> Hi Guido.
>
> On Mon, Sep 21, 2020 at 06:55:52PM +0200, Guido G?nther wrote:
> > We need to reset both for the panel to show an image.
> >
> > Signed-off-by: Guido G?nther <[email protected]>
> > ---
> > .../bindings/display/panel/mantix,mlaf057we51-x.yaml | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml b/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> > index 937323cc9aaa..ba5a18fac9f9 100644
> > --- a/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/mantix,mlaf057we51-x.yaml
> > @@ -35,7 +35,9 @@ properties:
> > vddi-supply:
> > description: 1.8V I/O voltage supply
> >
> > - reset-gpios: true
> > + reset-gpios:
> > + minItems: 2
> > + maxItems: 2
>
> reset-gpios is, as you already wrote, defined in panel-common.yaml.
> Do not try to change it here.
> It would be much better, I think, to introduce a mantix,reset-gpios
> property.

Yes.

You also need to define what each reset entry corresponds to as the
assertion/deassertion order could be important. You might just do 2
properties with <pinname>-gpios.

Rob