[v2,1/2] dt-bindings: panel: Add parallel RGB mode for Ilitek ILI9341 panels
diff mbox series

Message ID 20190708145618.26031-2-josef@lusticky.cz
State Changes Requested
Headers show
Series
  • Add DRM panel driver for Ilitek ILI9341 based panels in parallel RGB mode
Related show

Checks

Context Check Description
robh/checkpatch success

Commit Message

Josef Luštický July 8, 2019, 2:56 p.m. UTC
ILI9341 supports both SPI input mode and parallel RGB input mode.
This commit adds parallel RGB input mode bindings.

Signed-off-by: Josef Lusticky <josef@lusticky.cz>
---
 .../bindings/display/ilitek,ili9341.txt       | 67 ++++++++++++++++---
 1 file changed, 56 insertions(+), 11 deletions(-)

Comments

Sam Ravnborg July 10, 2019, 1:39 p.m. UTC | #1
Hi Josef.

On Mon, Jul 08, 2019 at 04:56:17PM +0200, Josef Lusticky wrote:
> ILI9341 supports both SPI input mode and parallel RGB input mode.
> This commit adds parallel RGB input mode bindings.
> 
> Signed-off-by: Josef Lusticky <josef@lusticky.cz>
> ---
>  .../bindings/display/ilitek,ili9341.txt       | 67 ++++++++++++++++---
>  1 file changed, 56 insertions(+), 11 deletions(-)
With Robs patches landed in drm-misc-next yaml format is from now on
preferred for panel bindings, or at least this is my take on it.

So a yaml conversion would be appreciated, but not mandatory.

> 
> diff --git a/Documentation/devicetree/bindings/display/ilitek,ili9341.txt b/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
> index 169b32e4ee4e..629f38a1d0cd 100644
> --- a/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
> +++ b/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
> @@ -1,27 +1,72 @@
>  Ilitek ILI9341 display panels
>  
> -This binding is for display panels using an Ilitek ILI9341 controller in SPI
> -mode.
> +This binding is for display panels using an Ilitek ILI9341 controller.
> +The display panels are supported in the following graphical input modes:
> +- SPI input mode
> +	MIPI-DBI Type 3 Option 1 or Option 3 is used to transfer
> +	commands and graphical data
> +- parallel RGB input mode
> +	MIPI-DBI Type 3 Option 1 or Option 3 is used for commands
> +	MIPI-DPI 18-bit parallel RGB connection is used to transfer
> +	graphical data
>  
> -Required properties:
> -- compatible:	"adafruit,yx240qv29", "ilitek,ili9341"
> -- dc-gpios:	D/C pin
> -- reset-gpios:	Reset pin
> +
> +SPI input mode:
>  
>  The node for this driver must be a child node of a SPI controller, hence
> -all mandatory properties described in ../spi/spi-bus.txt must be specified.
> +all mandatory properties described in spi/spi-bus.txt must be specified.
> +
> +Required properties in SPI input mode:
> +- compatible:   "adafruit,yx240qv29", "ilitek,ili9341"
> +- backlight:    phandle of the backlight device attached to the panel
> +
> +Optional properties in SPI input mode:
> +- rotation:     panel rotation in degrees counter clockwise (0,90,180,270)
> +- dc-gpios:     GPIO spec for the D/C pin, see gpio/gpio.txt
> +- reset-gpios:  GPIO spec for the reset pin, see gpio/gpio.txt
> +
> +
> +Parallel RGB input mode:
> +
> +The node for this driver must be a child node of a SPI controller, hence
> +all mandatory properties described in spi/spi-bus.txt must be specified.
> +
> +Required properties in parallel RGB input mode:
> +- compatible:   "displaytech,dt024ctft", "ilitek,ili9341"
> +- backlight:    phandle of the backlight device attached to the panel
> +
> +Optional properties in parallel RGB input mode:
> +- dc-gpios:     GPIO spec for the D/C pin, see gpio/gpio.txt
> +- reset-gpios:  GPIO spec for the reset pin, see gpio/gpio.txt
>  
> -Optional properties:
> -- rotation:	panel rotation in degrees counter clockwise (0,90,180,270)
> -- backlight:	phandle of the backlight device attached to the panel
> +In parallel RGB input mode,
> +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:
> +
> +Example in SPI input mode:
>  	display@0{
>  		compatible = "adafruit,yx240qv29", "ilitek,ili9341";
>  		reg = <0>;
>  		spi-max-frequency = <32000000>;
>  		dc-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
>  		reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
> +		backlight = <&backlight>;
>  		rotation = <270>;
> +	};
> +
> +Example in parallel RGB input mode:
> +	panel@{
I think you need a number after "@" here.

With this fixed:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Rob Herring July 24, 2019, 7:57 p.m. UTC | #2
On Mon, Jul 08, 2019 at 04:56:17PM +0200, Josef Lusticky wrote:
> ILI9341 supports both SPI input mode and parallel RGB input mode.
> This commit adds parallel RGB input mode bindings.
> 
> Signed-off-by: Josef Lusticky <josef@lusticky.cz>
> ---
>  .../bindings/display/ilitek,ili9341.txt       | 67 ++++++++++++++++---
>  1 file changed, 56 insertions(+), 11 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/ilitek,ili9341.txt b/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
> index 169b32e4ee4e..629f38a1d0cd 100644
> --- a/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
> +++ b/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
> @@ -1,27 +1,72 @@
>  Ilitek ILI9341 display panels
>  
> -This binding is for display panels using an Ilitek ILI9341 controller in SPI
> -mode.
> +This binding is for display panels using an Ilitek ILI9341 controller.
> +The display panels are supported in the following graphical input modes:
> +- SPI input mode
> +	MIPI-DBI Type 3 Option 1 or Option 3 is used to transfer
> +	commands and graphical data
> +- parallel RGB input mode
> +	MIPI-DBI Type 3 Option 1 or Option 3 is used for commands
> +	MIPI-DPI 18-bit parallel RGB connection is used to transfer
> +	graphical data
>  
> -Required properties:
> -- compatible:	"adafruit,yx240qv29", "ilitek,ili9341"
> -- dc-gpios:	D/C pin
> -- reset-gpios:	Reset pin
> +
> +SPI input mode:
>  
>  The node for this driver must be a child node of a SPI controller, hence
> -all mandatory properties described in ../spi/spi-bus.txt must be specified.
> +all mandatory properties described in spi/spi-bus.txt must be specified.
> +
> +Required properties in SPI input mode:
> +- compatible:   "adafruit,yx240qv29", "ilitek,ili9341"
> +- backlight:    phandle of the backlight device attached to the panel

Why is backlight now required?

> +
> +Optional properties in SPI input mode:
> +- rotation:     panel rotation in degrees counter clockwise (0,90,180,270)
> +- dc-gpios:     GPIO spec for the D/C pin, see gpio/gpio.txt
> +- reset-gpios:  GPIO spec for the reset pin, see gpio/gpio.txt
> +
> +
> +Parallel RGB input mode:
> +
> +The node for this driver must be a child node of a SPI controller, hence
> +all mandatory properties described in spi/spi-bus.txt must be specified.
> +
> +Required properties in parallel RGB input mode:
> +- compatible:   "displaytech,dt024ctft", "ilitek,ili9341"
> +- backlight:    phandle of the backlight device attached to the panel
> +
> +Optional properties in parallel RGB input mode:
> +- dc-gpios:     GPIO spec for the D/C pin, see gpio/gpio.txt
> +- reset-gpios:  GPIO spec for the reset pin, see gpio/gpio.txt
>  
> -Optional properties:
> -- rotation:	panel rotation in degrees counter clockwise (0,90,180,270)
> -- backlight:	phandle of the backlight device attached to the panel
> +In parallel RGB input mode,
> +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:
> +
> +Example in SPI input mode:
>  	display@0{
>  		compatible = "adafruit,yx240qv29", "ilitek,ili9341";
>  		reg = <0>;
>  		spi-max-frequency = <32000000>;
>  		dc-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
>  		reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
> +		backlight = <&backlight>;
>  		rotation = <270>;
> +	};
> +
> +Example in parallel RGB input mode:
> +	panel@{
> +		compatible = "displaytech,dt024ctft", "ilitek,ili9341";
> +		reg = <0>;
> +		spi-max-frequency = <32000000>;
> +		dc-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
> +		reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
>  		backlight = <&backlight>;
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&display_out>;
> +			};
> +		};
>  	};
> -- 
> 2.20.1
>
Josef Luštický July 26, 2019, 5:56 a.m. UTC | #3
Hello Rob,
my fault, sorry, backlight should not be required.
I'll fix this in the next patch version.

I'd like to post the DT bindings in the YAML format.
Work-in-progress YAML bindings file is in the attachment,
any comments would be highly appreciated.

Kind regards
Josef

st 24. 7. 2019 v 21:57 odesílatel Rob Herring <robh@kernel.org> napsal:
>
> On Mon, Jul 08, 2019 at 04:56:17PM +0200, Josef Lusticky wrote:
> > ILI9341 supports both SPI input mode and parallel RGB input mode.
> > This commit adds parallel RGB input mode bindings.
> >
> > Signed-off-by: Josef Lusticky <josef@lusticky.cz>
> > ---
> >  .../bindings/display/ilitek,ili9341.txt       | 67 ++++++++++++++++---
> >  1 file changed, 56 insertions(+), 11 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/display/ilitek,ili9341.txt b/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
> > index 169b32e4ee4e..629f38a1d0cd 100644
> > --- a/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
> > +++ b/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
> > @@ -1,27 +1,72 @@
> >  Ilitek ILI9341 display panels
> >
> > -This binding is for display panels using an Ilitek ILI9341 controller in SPI
> > -mode.
> > +This binding is for display panels using an Ilitek ILI9341 controller.
> > +The display panels are supported in the following graphical input modes:
> > +- SPI input mode
> > +     MIPI-DBI Type 3 Option 1 or Option 3 is used to transfer
> > +     commands and graphical data
> > +- parallel RGB input mode
> > +     MIPI-DBI Type 3 Option 1 or Option 3 is used for commands
> > +     MIPI-DPI 18-bit parallel RGB connection is used to transfer
> > +     graphical data
> >
> > -Required properties:
> > -- compatible:        "adafruit,yx240qv29", "ilitek,ili9341"
> > -- dc-gpios:  D/C pin
> > -- reset-gpios:       Reset pin
> > +
> > +SPI input mode:
> >
> >  The node for this driver must be a child node of a SPI controller, hence
> > -all mandatory properties described in ../spi/spi-bus.txt must be specified.
> > +all mandatory properties described in spi/spi-bus.txt must be specified.
> > +
> > +Required properties in SPI input mode:
> > +- compatible:   "adafruit,yx240qv29", "ilitek,ili9341"
> > +- backlight:    phandle of the backlight device attached to the panel
>
> Why is backlight now required?
>
> > +
> > +Optional properties in SPI input mode:
> > +- rotation:     panel rotation in degrees counter clockwise (0,90,180,270)
> > +- dc-gpios:     GPIO spec for the D/C pin, see gpio/gpio.txt
> > +- reset-gpios:  GPIO spec for the reset pin, see gpio/gpio.txt
> > +
> > +
> > +Parallel RGB input mode:
> > +
> > +The node for this driver must be a child node of a SPI controller, hence
> > +all mandatory properties described in spi/spi-bus.txt must be specified.
> > +
> > +Required properties in parallel RGB input mode:
> > +- compatible:   "displaytech,dt024ctft", "ilitek,ili9341"
> > +- backlight:    phandle of the backlight device attached to the panel
> > +
> > +Optional properties in parallel RGB input mode:
> > +- dc-gpios:     GPIO spec for the D/C pin, see gpio/gpio.txt
> > +- reset-gpios:  GPIO spec for the reset pin, see gpio/gpio.txt
> >
> > -Optional properties:
> > -- rotation:  panel rotation in degrees counter clockwise (0,90,180,270)
> > -- backlight: phandle of the backlight device attached to the panel
> > +In parallel RGB input mode,
> > +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:
> > +
> > +Example in SPI input mode:
> >       display@0{
> >               compatible = "adafruit,yx240qv29", "ilitek,ili9341";
> >               reg = <0>;
> >               spi-max-frequency = <32000000>;
> >               dc-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
> >               reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
> > +             backlight = <&backlight>;
> >               rotation = <270>;
> > +     };
> > +
> > +Example in parallel RGB input mode:
> > +     panel@{
> > +             compatible = "displaytech,dt024ctft", "ilitek,ili9341";
> > +             reg = <0>;
> > +             spi-max-frequency = <32000000>;
> > +             dc-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
> > +             reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
> >               backlight = <&backlight>;
> > +             port {
> > +                     panel_in: endpoint {
> > +                             remote-endpoint = <&display_out>;
> > +                     };
> > +             };
> >       };
> > --
> > 2.20.1
> >
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/panel/ilitek,ili9341.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Ilitek ILI9341 display panels

maintainers:
  - Josef Lusticky <josef@lusticky.cz>

description: |
  This binding is for display panels using an Ilitek ILI9341 controller.
  The display panels are supported in the following graphical input modes:
  SPI input mode
    MIPI-DBI Type 3 Option 1 or Option 3 is used to transfer
    commands and graphical data
  Parallel RGB input mode
    MIPI-DBI Type 3 Option 1 or Option 3 is used for commands
    MIPI-DPI 18-bit parallel RGB connection is used to transfer
    graphical data

allOf:
  - $ref: /schemas/spi/spi-controller.yaml#

properties:
  compatible:
    items:
      - const: adafruit,yx240qv29

  backlight: true
  reset-gpios: true
  dc-gpios: true
  rotation: true
  port: true

additionalProperties: false

required:
  - compatible
  - backlight

Example in SPI input mode:
	display@0{
		compatible = "adafruit,yx240qv29", "ilitek,ili9341";
		reg = <0>;
		spi-max-frequency = <32000000>;
		dc-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
		backlight = <&backlight>;
		rotation = <270>;
	};

Example in parallel RGB input mode:
	panel@{
		compatible = "displaytech,dt024ctft", "ilitek,ili9341";
		reg = <0>;
		spi-max-frequency = <32000000>;
		dc-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
		backlight = <&backlight>;
		port {
			panel_in: endpoint {
				remote-endpoint = <&display_out>;
			};
		};
	};

Patch
diff mbox series

diff --git a/Documentation/devicetree/bindings/display/ilitek,ili9341.txt b/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
index 169b32e4ee4e..629f38a1d0cd 100644
--- a/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
+++ b/Documentation/devicetree/bindings/display/ilitek,ili9341.txt
@@ -1,27 +1,72 @@ 
 Ilitek ILI9341 display panels
 
-This binding is for display panels using an Ilitek ILI9341 controller in SPI
-mode.
+This binding is for display panels using an Ilitek ILI9341 controller.
+The display panels are supported in the following graphical input modes:
+- SPI input mode
+	MIPI-DBI Type 3 Option 1 or Option 3 is used to transfer
+	commands and graphical data
+- parallel RGB input mode
+	MIPI-DBI Type 3 Option 1 or Option 3 is used for commands
+	MIPI-DPI 18-bit parallel RGB connection is used to transfer
+	graphical data
 
-Required properties:
-- compatible:	"adafruit,yx240qv29", "ilitek,ili9341"
-- dc-gpios:	D/C pin
-- reset-gpios:	Reset pin
+
+SPI input mode:
 
 The node for this driver must be a child node of a SPI controller, hence
-all mandatory properties described in ../spi/spi-bus.txt must be specified.
+all mandatory properties described in spi/spi-bus.txt must be specified.
+
+Required properties in SPI input mode:
+- compatible:   "adafruit,yx240qv29", "ilitek,ili9341"
+- backlight:    phandle of the backlight device attached to the panel
+
+Optional properties in SPI input mode:
+- rotation:     panel rotation in degrees counter clockwise (0,90,180,270)
+- dc-gpios:     GPIO spec for the D/C pin, see gpio/gpio.txt
+- reset-gpios:  GPIO spec for the reset pin, see gpio/gpio.txt
+
+
+Parallel RGB input mode:
+
+The node for this driver must be a child node of a SPI controller, hence
+all mandatory properties described in spi/spi-bus.txt must be specified.
+
+Required properties in parallel RGB input mode:
+- compatible:   "displaytech,dt024ctft", "ilitek,ili9341"
+- backlight:    phandle of the backlight device attached to the panel
+
+Optional properties in parallel RGB input mode:
+- dc-gpios:     GPIO spec for the D/C pin, see gpio/gpio.txt
+- reset-gpios:  GPIO spec for the reset pin, see gpio/gpio.txt
 
-Optional properties:
-- rotation:	panel rotation in degrees counter clockwise (0,90,180,270)
-- backlight:	phandle of the backlight device attached to the panel
+In parallel RGB input mode,
+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:
+
+Example in SPI input mode:
 	display@0{
 		compatible = "adafruit,yx240qv29", "ilitek,ili9341";
 		reg = <0>;
 		spi-max-frequency = <32000000>;
 		dc-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
 		reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+		backlight = <&backlight>;
 		rotation = <270>;
+	};
+
+Example in parallel RGB input mode:
+	panel@{
+		compatible = "displaytech,dt024ctft", "ilitek,ili9341";
+		reg = <0>;
+		spi-max-frequency = <32000000>;
+		dc-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
 		backlight = <&backlight>;
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&display_out>;
+			};
+		};
 	};