All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	David Airlie <airlied@linux.ie>, Rob Herring <robh+dt@kernel.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org,
	linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org,
	Prabhakar <prabhakar.csengg@gmail.com>
Subject: Re: [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support
Date: Tue, 11 Aug 2020 14:26:38 +0300	[thread overview]
Message-ID: <20200811112638.GF6054@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20200807174954.14448-8-prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi Prabhakar,

Thank you for the patch.

On Fri, Aug 07, 2020 at 06:49:54PM +0100, Lad Prabhakar wrote:
> The iwg21d comes with a 7" capacitive touch screen, therefore
> add support for it.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> ---
>  arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 84 +++++++++++++++++++++++++
>  1 file changed, 84 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> index b3461a61a4bf..cf59fd61e422 100644
> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> @@ -30,6 +30,7 @@
>  
>  /dts-v1/;
>  #include "r8a7742-iwg21m.dtsi"
> +#include <dt-bindings/pwm/pwm.h>
>  
>  / {
>  	model = "iWave Systems RainboW-G21D-Qseven board based on RZ/G1H";
> @@ -52,6 +53,50 @@
>  		clock-frequency = <26000000>;
>  	};
>  
> +	lcd_backlight: backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&tpu 2 5000000 0>;
> +		brightness-levels = <0 4 8 16 32 64 128 255>;
> +		pinctrl-0 = <&backlight_pins>;
> +		pinctrl-names = "default";
> +		default-brightness-level = <7>;
> +		enable-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;

It's actually a power supply, not an enable GPIO, but it doesn't matter
much, I don't think there's a need to declare a regulator just for the
sake of it.

> +	};
> +
> +	lvds-receiver {
> +		compatible = "ti,ds90cf384a", "lvds-decoder";
> +		powerdown-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;

This should be handled as a shared power supply, as it's also needed for
the touch screen. Biju has sent patches for the iwg20d that fixes a
probe issue due to that problem, I think you can just copy the fix.

> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +				lvds_receiver_in: endpoint {
> +					remote-endpoint = <&lvds0_out>;
> +				};
> +			};
> +			port@1 {
> +				reg = <1>;
> +				lvds_receiver_out: endpoint {
> +					remote-endpoint = <&panel_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	panel {
> +		compatible = "edt,etm0700g0dh6";
> +		backlight = <&lcd_backlight>;
> +
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&lvds_receiver_out>;
> +			};
> +		};
> +	};
> +
>  	reg_1p5v: 1p5v {
>  		compatible = "regulator-fixed";
>  		regulator-name = "1P5V";
> @@ -129,12 +174,31 @@
>  		VDDIO-supply = <&reg_3p3v>;
>  		VDDD-supply = <&reg_1p5v>;
>  	};
> +
> +	touch: touchpanel@38 {
> +		compatible = "edt,edt-ft5406";
> +		reg = <0x38>;
> +		interrupt-parent = <&gpio0>;
> +		interrupts = <24 IRQ_TYPE_EDGE_FALLING>;

Should the reset GPIO also be wired ? It seems to be shared with the
audio codec though, which is annoying.

> +	};
>  };
>  
>  &cmt0 {
>  	status = "okay";
>  };
>  
> +&du {
> +	status = "okay";
> +};
> +
> +&gpio0 {
> +	touch-interrupt {
> +		gpio-hog;
> +		gpios = <24 GPIO_ACTIVE_LOW>;
> +		input;
> +	};

Is this needed, or does requesting the interrupt in the touch screen
driver configured the GPIO to an input automatically ?

> +};
> +
>  &hsusb {
>  	pinctrl-0 = <&usb0_pins>;
>  	pinctrl-names = "default";
> @@ -165,6 +229,11 @@
>  		function = "avb";
>  	};
>  
> +	backlight_pins: backlight {
> +		groups = "tpu0_to2";
> +		function = "tpu0";
> +	};
> +
>  	i2c2_pins: i2c2 {
>  		groups = "i2c2_b";
>  		function = "i2c2";
> @@ -208,6 +277,17 @@
>  	};
>  };
>  
> +&lvds0 {
> +	status = "okay";
> +	ports {
> +		port@1 {
> +			lvds0_out: endpoint {
> +				remote-endpoint = <&lvds_receiver_in>;
> +			};
> +		};
> +	};
> +};
> +
>  &rcar_sound {
>  	pinctrl-0 = <&sound_pins>;
>  	pinctrl-names = "default";
> @@ -261,6 +341,10 @@
>  	shared-pin;
>  };
>  
> +&tpu {
> +	status = "okay";
> +};
> +
>  &usbphy {
>  	status = "okay";
>  };

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Cc: devicetree@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	David Airlie <airlied@linux.ie>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-renesas-soc@vger.kernel.org,
	Prabhakar <prabhakar.csengg@gmail.com>,
	Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support
Date: Tue, 11 Aug 2020 14:26:38 +0300	[thread overview]
Message-ID: <20200811112638.GF6054@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20200807174954.14448-8-prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi Prabhakar,

Thank you for the patch.

On Fri, Aug 07, 2020 at 06:49:54PM +0100, Lad Prabhakar wrote:
> The iwg21d comes with a 7" capacitive touch screen, therefore
> add support for it.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> ---
>  arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 84 +++++++++++++++++++++++++
>  1 file changed, 84 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> index b3461a61a4bf..cf59fd61e422 100644
> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> @@ -30,6 +30,7 @@
>  
>  /dts-v1/;
>  #include "r8a7742-iwg21m.dtsi"
> +#include <dt-bindings/pwm/pwm.h>
>  
>  / {
>  	model = "iWave Systems RainboW-G21D-Qseven board based on RZ/G1H";
> @@ -52,6 +53,50 @@
>  		clock-frequency = <26000000>;
>  	};
>  
> +	lcd_backlight: backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&tpu 2 5000000 0>;
> +		brightness-levels = <0 4 8 16 32 64 128 255>;
> +		pinctrl-0 = <&backlight_pins>;
> +		pinctrl-names = "default";
> +		default-brightness-level = <7>;
> +		enable-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;

It's actually a power supply, not an enable GPIO, but it doesn't matter
much, I don't think there's a need to declare a regulator just for the
sake of it.

> +	};
> +
> +	lvds-receiver {
> +		compatible = "ti,ds90cf384a", "lvds-decoder";
> +		powerdown-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;

This should be handled as a shared power supply, as it's also needed for
the touch screen. Biju has sent patches for the iwg20d that fixes a
probe issue due to that problem, I think you can just copy the fix.

> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +				lvds_receiver_in: endpoint {
> +					remote-endpoint = <&lvds0_out>;
> +				};
> +			};
> +			port@1 {
> +				reg = <1>;
> +				lvds_receiver_out: endpoint {
> +					remote-endpoint = <&panel_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	panel {
> +		compatible = "edt,etm0700g0dh6";
> +		backlight = <&lcd_backlight>;
> +
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&lvds_receiver_out>;
> +			};
> +		};
> +	};
> +
>  	reg_1p5v: 1p5v {
>  		compatible = "regulator-fixed";
>  		regulator-name = "1P5V";
> @@ -129,12 +174,31 @@
>  		VDDIO-supply = <&reg_3p3v>;
>  		VDDD-supply = <&reg_1p5v>;
>  	};
> +
> +	touch: touchpanel@38 {
> +		compatible = "edt,edt-ft5406";
> +		reg = <0x38>;
> +		interrupt-parent = <&gpio0>;
> +		interrupts = <24 IRQ_TYPE_EDGE_FALLING>;

Should the reset GPIO also be wired ? It seems to be shared with the
audio codec though, which is annoying.

> +	};
>  };
>  
>  &cmt0 {
>  	status = "okay";
>  };
>  
> +&du {
> +	status = "okay";
> +};
> +
> +&gpio0 {
> +	touch-interrupt {
> +		gpio-hog;
> +		gpios = <24 GPIO_ACTIVE_LOW>;
> +		input;
> +	};

Is this needed, or does requesting the interrupt in the touch screen
driver configured the GPIO to an input automatically ?

> +};
> +
>  &hsusb {
>  	pinctrl-0 = <&usb0_pins>;
>  	pinctrl-names = "default";
> @@ -165,6 +229,11 @@
>  		function = "avb";
>  	};
>  
> +	backlight_pins: backlight {
> +		groups = "tpu0_to2";
> +		function = "tpu0";
> +	};
> +
>  	i2c2_pins: i2c2 {
>  		groups = "i2c2_b";
>  		function = "i2c2";
> @@ -208,6 +277,17 @@
>  	};
>  };
>  
> +&lvds0 {
> +	status = "okay";
> +	ports {
> +		port@1 {
> +			lvds0_out: endpoint {
> +				remote-endpoint = <&lvds_receiver_in>;
> +			};
> +		};
> +	};
> +};
> +
>  &rcar_sound {
>  	pinctrl-0 = <&sound_pins>;
>  	pinctrl-names = "default";
> @@ -261,6 +341,10 @@
>  	shared-pin;
>  };
>  
> +&tpu {
> +	status = "okay";
> +};
> +
>  &usbphy {
>  	status = "okay";
>  };

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-08-11 11:26 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 17:49 [PATCH 0/7] r8a7742: Enable DU and LVDS Lad Prabhakar
2020-08-07 17:49 ` Lad Prabhakar
2020-08-07 17:49 ` [PATCH 1/7] dt-bindings: display: renesas,du: Document the r8a7742 bindings Lad Prabhakar
2020-08-07 17:49   ` [PATCH 1/7] dt-bindings: display: renesas, du: " Lad Prabhakar
2020-08-08 20:59   ` [PATCH 1/7] dt-bindings: display: renesas,du: " Laurent Pinchart
2020-08-08 20:59     ` Laurent Pinchart
2020-08-24 22:20   ` [PATCH 1/7] dt-bindings: display: renesas, du: " Rob Herring
2020-08-24 22:20     ` Rob Herring
2020-08-07 17:49 ` [PATCH 2/7] drm: rcar-du: Add r8a7742 support Lad Prabhakar
2020-08-07 17:49   ` Lad Prabhakar
2020-08-08 21:02   ` Laurent Pinchart
2020-08-08 21:02     ` Laurent Pinchart
2020-08-09 20:38     ` Lad, Prabhakar
2020-08-09 20:38       ` Lad, Prabhakar
2020-08-09 23:03       ` Laurent Pinchart
2020-08-09 23:03         ` Laurent Pinchart
2020-08-07 17:49 ` [PATCH 3/7] dt-bindings: display: renesas,lvds: Document r8a7742 bindings Lad Prabhakar
2020-08-07 17:49   ` [PATCH 3/7] dt-bindings: display: renesas, lvds: " Lad Prabhakar
2020-08-08 21:03   ` [PATCH 3/7] dt-bindings: display: renesas,lvds: " Laurent Pinchart
2020-08-08 21:03     ` [PATCH 3/7] dt-bindings: display: renesas, lvds: " Laurent Pinchart
2020-08-08 21:05     ` [PATCH 3/7] dt-bindings: display: renesas,lvds: " Laurent Pinchart
2020-08-08 21:05       ` [PATCH 3/7] dt-bindings: display: renesas, lvds: " Laurent Pinchart
2020-08-09 21:10       ` [PATCH 3/7] dt-bindings: display: renesas,lvds: " Lad, Prabhakar
2020-08-09 21:10         ` [PATCH 3/7] dt-bindings: display: renesas, lvds: " Lad, Prabhakar
2020-08-24 22:20   ` Rob Herring
2020-08-24 22:20     ` Rob Herring
2020-08-07 17:49 ` [PATCH 4/7] drm: rcar-du: lvds: Add r8a7742 support Lad Prabhakar
2020-08-07 17:49   ` Lad Prabhakar
2020-08-08 21:06   ` Laurent Pinchart
2020-08-08 21:06     ` Laurent Pinchart
2020-08-07 17:49 ` [PATCH 5/7] ARM: dts: r8a7742: Add DU support Lad Prabhakar
2020-08-07 17:49   ` Lad Prabhakar
2020-08-07 19:48   ` Sergei Shtylyov
2020-08-07 19:48     ` Sergei Shtylyov
2020-08-07 20:22     ` Lad, Prabhakar
2020-08-07 20:22       ` Lad, Prabhakar
2020-08-10  8:53       ` Geert Uytterhoeven
2020-08-10  8:53         ` Geert Uytterhoeven
2020-08-08 21:15   ` Laurent Pinchart
2020-08-08 21:15     ` Laurent Pinchart
2020-08-07 17:49 ` [PATCH 6/7] ARM: dts: r8a7742: Add LVDS support Lad Prabhakar
2020-08-07 17:49   ` Lad Prabhakar
2020-08-08 21:13   ` Laurent Pinchart
2020-08-08 21:13     ` Laurent Pinchart
2020-08-09 21:29     ` Lad, Prabhakar
2020-08-09 21:29       ` Lad, Prabhakar
2020-08-10  8:27       ` Geert Uytterhoeven
2020-08-10  8:27         ` Geert Uytterhoeven
2020-08-07 17:49 ` [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support Lad Prabhakar
2020-08-07 17:49   ` Lad Prabhakar
2020-08-08 21:22   ` Laurent Pinchart
2020-08-08 21:22     ` Laurent Pinchart
2020-08-09 21:35     ` Lad, Prabhakar
2020-08-09 21:35       ` Lad, Prabhakar
2020-08-11 11:26   ` Laurent Pinchart [this message]
2020-08-11 11:26     ` Laurent Pinchart
2020-08-13 12:54     ` Lad, Prabhakar
2020-08-13 12:54       ` Lad, Prabhakar
2020-08-08 20:55 ` [PATCH 0/7] r8a7742: Enable DU and LVDS Laurent Pinchart
2020-08-08 20:55   ` Laurent Pinchart
2020-08-09 21:43   ` Lad, Prabhakar
2020-08-09 21:43     ` Lad, Prabhakar
2020-08-10  8:27     ` Geert Uytterhoeven
2020-08-10  8:27       ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200811112638.GF6054@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert+renesas@glider.be \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.