Message ID | 20200408195109.32692-25-sam@ravnborg.org |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | dt-bindings: display: convert remaning panel bindings to DT Schema | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | warning | "total: 0 errors, 3 warnings, 65 lines checked" |
robh/dt-meta-schema | success |
Hi Sam, > Am 08.04.2020 um 21:50 schrieb Sam Ravnborg <sam@ravnborg.org>: > > v2: > - dropped use of spi-slave.yaml (Maxime) > - added unevaluatedProperties (Maxime) > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > Cc: Maxime Ripard <mripard@kernel.org> > Cc: Marek Belisko <marek@goldelico.com> > Cc: H. Nikolaus Schaller <hns@goldelico.com> > Cc: Thierry Reding <thierry.reding@gmail.com> > Cc: Sam Ravnborg <sam@ravnborg.org> > --- > .../bindings/display/panel/tpo,td.yaml | 65 +++++++++++++++++++ > .../bindings/display/panel/tpo,td028ttec1.txt | 32 --------- > .../bindings/display/panel/tpo,td043mtea1.txt | 33 ---------- > 3 files changed, 65 insertions(+), 65 deletions(-) > create mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td.yaml > delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt > delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt > > diff --git a/Documentation/devicetree/bindings/display/panel/tpo,td.yaml b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml > new file mode 100644 > index 000000000000..4aa605613445 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml > @@ -0,0 +1,65 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/panel/tpo,td.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Toppoly TD Panels > + > +description: | > + The panel must obey the rules for a SPI slave device as specified in > + spi/spi-controller.yaml > + > +maintainers: > + - Marek Belisko <marek@goldelico.com> > + - H. Nikolaus Schaller <hns@goldelico.com> > + > +allOf: > + - $ref: panel-common.yaml# > + > +properties: > + compatible: > + enum: > + # Toppoly TD028TTEC1 Panel > + - tpo,td028ttec1 > + # Toppoly TD043MTEA1 Panel > + - tpo,td043mtea1 > + > + reg: true > + label: true > + reset-gpios: true > + backlight: true > + port: true > + > +required: > + - compatible > + - port > + > +unevaluatedProperties: false > + > +examples: > + - | > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + panel: panel@0 { > + compatible = "tpo,td043mtea1"; > + reg = <0>; > + spi-max-frequency = <100000>; > + spi-cpol; > + spi-cpha; > + > + label = "lcd"; > + > + reset-gpios = <&gpio7 7 0>; > + > + port { > + lcd_in: endpoint { > + remote-endpoint = <&dpi_out>; > + }; > + }; > + }; > + }; I think it is possible to add two examples (the one for tpo,td028ttec1) as well. The reason is that it must also have spi-cs-high; which isn't documented anywhere else and wasn't in tpo,td028ttec1.txt. > + > +... looks ok to me. BR and thanks, Nikolaus > diff --git a/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt b/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt > deleted file mode 100644 > index 898e06ecf4ef..000000000000 > --- a/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt > +++ /dev/null > @@ -1,32 +0,0 @@ > -Toppoly TD028TTEC1 Panel > -======================== > - > -Required properties: > -- compatible: "tpo,td028ttec1" > - > -Optional properties: > -- label: a symbolic name for the panel > -- backlight: phandle of the backlight device > - > -Required nodes: > -- Video port for DPI input > - > -Example > -------- > - > -lcd-panel: td028ttec1@0 { > - compatible = "tpo,td028ttec1"; > - reg = <0>; > - spi-max-frequency = <100000>; > - spi-cpol; > - spi-cpha; > - > - label = "lcd"; > - backlight = <&backlight>; > - port { > - lcd_in: endpoint { > - remote-endpoint = <&dpi_out>; > - }; > - }; > -}; > - > diff --git a/Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt b/Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt > deleted file mode 100644 > index ec6d62975162..000000000000 > --- a/Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt > +++ /dev/null > @@ -1,33 +0,0 @@ > -TPO TD043MTEA1 Panel > -==================== > - > -Required properties: > -- compatible: "tpo,td043mtea1" > -- reset-gpios: panel reset gpio > - > -Optional properties: > -- label: a symbolic name for the panel > - > -Required nodes: > -- Video port for DPI input > - > -Example > -------- > - > -lcd-panel: panel@0 { > - compatible = "tpo,td043mtea1"; > - reg = <0>; > - spi-max-frequency = <100000>; > - spi-cpol; > - spi-cpha; > - > - label = "lcd"; > - > - reset-gpios = <&gpio7 7 0>; > - > - port { > - lcd_in: endpoint { > - remote-endpoint = <&dpi_out>; > - }; > - }; > -}; > -- > 2.20.1 >
On Thu, Apr 09, 2020 at 08:21:16AM +0200, H. Nikolaus Schaller wrote: > Hi Sam, > > > Am 08.04.2020 um 21:50 schrieb Sam Ravnborg <sam@ravnborg.org>: > > > > v2: > > - dropped use of spi-slave.yaml (Maxime) > > - added unevaluatedProperties (Maxime) > > > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > > Cc: Maxime Ripard <mripard@kernel.org> > > Cc: Marek Belisko <marek@goldelico.com> > > Cc: H. Nikolaus Schaller <hns@goldelico.com> > > Cc: Thierry Reding <thierry.reding@gmail.com> > > Cc: Sam Ravnborg <sam@ravnborg.org> > > --- > > .../bindings/display/panel/tpo,td.yaml | 65 +++++++++++++++++++ > > .../bindings/display/panel/tpo,td028ttec1.txt | 32 --------- > > .../bindings/display/panel/tpo,td043mtea1.txt | 33 ---------- > > 3 files changed, 65 insertions(+), 65 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td.yaml > > delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt > > delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt > > > > diff --git a/Documentation/devicetree/bindings/display/panel/tpo,td.yaml b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml > > new file mode 100644 > > index 000000000000..4aa605613445 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml > > @@ -0,0 +1,65 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/display/panel/tpo,td.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Toppoly TD Panels > > + > > +description: | > > + The panel must obey the rules for a SPI slave device as specified in > > + spi/spi-controller.yaml > > + > > +maintainers: > > + - Marek Belisko <marek@goldelico.com> > > + - H. Nikolaus Schaller <hns@goldelico.com> > > + > > +allOf: > > + - $ref: panel-common.yaml# > > + > > +properties: > > + compatible: > > + enum: > > + # Toppoly TD028TTEC1 Panel > > + - tpo,td028ttec1 > > + # Toppoly TD043MTEA1 Panel > > + - tpo,td043mtea1 > > + > > + reg: true > > + label: true > > + reset-gpios: true > > + backlight: true > > + port: true > > + > > +required: > > + - compatible > > + - port > > + > > +unevaluatedProperties: false > > + > > +examples: > > + - | > > + spi { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + panel: panel@0 { > > + compatible = "tpo,td043mtea1"; > > + reg = <0>; > > + spi-max-frequency = <100000>; > > + spi-cpol; > > + spi-cpha; > > + > > + label = "lcd"; > > + > > + reset-gpios = <&gpio7 7 0>; > > + > > + port { > > + lcd_in: endpoint { > > + remote-endpoint = <&dpi_out>; > > + }; > > + }; > > + }; > > + }; > > I think it is possible to add two examples (the one for tpo,td028ttec1) > as well. The reason is that it must also have spi-cs-high; which isn't > documented anywhere else and wasn't in tpo,td028ttec1.txt. I don't think we need another example because examples are not a enumeration for what's allowed. There should be an if/then schema though for this. That can be a follow-up IMO. Rob
On Wed, 8 Apr 2020 21:50:57 +0200, Sam Ravnborg wrote: > v2: > - dropped use of spi-slave.yaml (Maxime) > - added unevaluatedProperties (Maxime) > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > Cc: Maxime Ripard <mripard@kernel.org> > Cc: Marek Belisko <marek@goldelico.com> > Cc: H. Nikolaus Schaller <hns@goldelico.com> > Cc: Thierry Reding <thierry.reding@gmail.com> > Cc: Sam Ravnborg <sam@ravnborg.org> > --- > .../bindings/display/panel/tpo,td.yaml | 65 +++++++++++++++++++ > .../bindings/display/panel/tpo,td028ttec1.txt | 32 --------- > .../bindings/display/panel/tpo,td043mtea1.txt | 33 ---------- > 3 files changed, 65 insertions(+), 65 deletions(-) > create mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td.yaml > delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt > delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt > Reviewed-by: Rob Herring <robh@kernel.org>
diff --git a/Documentation/devicetree/bindings/display/panel/tpo,td.yaml b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml new file mode 100644 index 000000000000..4aa605613445 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/tpo,td.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/tpo,td.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Toppoly TD Panels + +description: | + The panel must obey the rules for a SPI slave device as specified in + spi/spi-controller.yaml + +maintainers: + - Marek Belisko <marek@goldelico.com> + - H. Nikolaus Schaller <hns@goldelico.com> + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + enum: + # Toppoly TD028TTEC1 Panel + - tpo,td028ttec1 + # Toppoly TD043MTEA1 Panel + - tpo,td043mtea1 + + reg: true + label: true + reset-gpios: true + backlight: true + port: true + +required: + - compatible + - port + +unevaluatedProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + panel: panel@0 { + compatible = "tpo,td043mtea1"; + reg = <0>; + spi-max-frequency = <100000>; + spi-cpol; + spi-cpha; + + label = "lcd"; + + reset-gpios = <&gpio7 7 0>; + + port { + lcd_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt b/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt deleted file mode 100644 index 898e06ecf4ef..000000000000 --- a/Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt +++ /dev/null @@ -1,32 +0,0 @@ -Toppoly TD028TTEC1 Panel -======================== - -Required properties: -- compatible: "tpo,td028ttec1" - -Optional properties: -- label: a symbolic name for the panel -- backlight: phandle of the backlight device - -Required nodes: -- Video port for DPI input - -Example -------- - -lcd-panel: td028ttec1@0 { - compatible = "tpo,td028ttec1"; - reg = <0>; - spi-max-frequency = <100000>; - spi-cpol; - spi-cpha; - - label = "lcd"; - backlight = <&backlight>; - port { - lcd_in: endpoint { - remote-endpoint = <&dpi_out>; - }; - }; -}; - diff --git a/Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt b/Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt deleted file mode 100644 index ec6d62975162..000000000000 --- a/Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt +++ /dev/null @@ -1,33 +0,0 @@ -TPO TD043MTEA1 Panel -==================== - -Required properties: -- compatible: "tpo,td043mtea1" -- reset-gpios: panel reset gpio - -Optional properties: -- label: a symbolic name for the panel - -Required nodes: -- Video port for DPI input - -Example -------- - -lcd-panel: panel@0 { - compatible = "tpo,td043mtea1"; - reg = <0>; - spi-max-frequency = <100000>; - spi-cpol; - spi-cpha; - - label = "lcd"; - - reset-gpios = <&gpio7 7 0>; - - port { - lcd_in: endpoint { - remote-endpoint = <&dpi_out>; - }; - }; -};
v2: - dropped use of spi-slave.yaml (Maxime) - added unevaluatedProperties (Maxime) Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Maxime Ripard <mripard@kernel.org> Cc: Marek Belisko <marek@goldelico.com> Cc: H. Nikolaus Schaller <hns@goldelico.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> --- .../bindings/display/panel/tpo,td.yaml | 65 +++++++++++++++++++ .../bindings/display/panel/tpo,td028ttec1.txt | 32 --------- .../bindings/display/panel/tpo,td043mtea1.txt | 33 ---------- 3 files changed, 65 insertions(+), 65 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td.yaml delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td028ttec1.txt delete mode 100644 Documentation/devicetree/bindings/display/panel/tpo,td043mtea1.txt