diff mbox series

[v8,2/2] arm64: dts: sun50i-a64-pinephone: Add touchscreen support

Message ID 20200702081432.1727696-3-megous@megous.com (mailing list archive)
State New, archived
Headers show
Series Add support for PinePhone LCD panel | expand

Commit Message

Ondřej Jirman July 2, 2020, 8:14 a.m. UTC
Pinephone has a Goodix GT917S capacitive touchscreen controller on
I2C0 bus. Add support for it.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
---
 .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Comments

Maxime Ripard July 3, 2020, 12:17 p.m. UTC | #1
Hi,

On Thu, Jul 02, 2020 at 10:14:32AM +0200, Ondrej Jirman wrote:
> Pinephone has a Goodix GT917S capacitive touchscreen controller on
> I2C0 bus. Add support for it.
> 
> Signed-off-by: Ondrej Jirman <megous@megous.com>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> index a89425ad3727..5c7386566053 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> @@ -121,6 +121,25 @@ &ehci1 {
>  	status = "okay";
>  };
>  
> +&i2c0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0_pins>;
> +	status = "okay";

I didn't spot this earlier, but the pinctrl properties are already set
in the DTSI. I've removed them while applying the patch.

Thanks!
Maxime
Ondřej Jirman July 3, 2020, 1:08 p.m. UTC | #2
On Fri, Jul 03, 2020 at 02:17:06PM +0200, Maxime Ripard wrote:
> Hi,
> 
> On Thu, Jul 02, 2020 at 10:14:32AM +0200, Ondrej Jirman wrote:
> > Pinephone has a Goodix GT917S capacitive touchscreen controller on
> > I2C0 bus. Add support for it.
> > 
> > Signed-off-by: Ondrej Jirman <megous@megous.com>
> > Acked-by: Linus Walleij <linus.walleij@linaro.org>
> > ---
> >  .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> > index a89425ad3727..5c7386566053 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> > @@ -121,6 +121,25 @@ &ehci1 {
> >  	status = "okay";
> >  };
> >  
> > +&i2c0 {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&i2c0_pins>;
> > +	status = "okay";
> 
> I didn't spot this earlier, but the pinctrl properties are already set
> in the DTSI. I've removed them while applying the patch.

Ah, right. Thank you very much. :)

regards,
	o.

> Thanks!
> Maxime
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index a89425ad3727..5c7386566053 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -121,6 +121,25 @@  &ehci1 {
 	status = "okay";
 };
 
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+	status = "okay";
+
+	touchscreen@5d {
+		compatible = "goodix,gt917s";
+		reg = <0x5d>;
+		interrupt-parent = <&pio>;
+		interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */
+		irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
+		reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
+		AVDD28-supply = <&reg_ldo_io0>;
+		VDDIO-supply = <&reg_ldo_io0>;
+		touchscreen-size-x = <720>;
+		touchscreen-size-y = <1440>;
+	};
+};
+
 &i2c1 {
 	status = "okay";