arm64: dts: allwinner: a64-amarula-relic: Add GT5663 CTP node
authorJagan Teki <jagan@amarulasolutions.com>
Fri, 3 May 2019 10:47:52 +0000 (16:17 +0530)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 20 May 2019 07:28:01 +0000 (09:28 +0200)
Add Goodix GT5663 capacitive touch controller node on
Amarula A64-Relic board.

The CTP connected to board with,
- SDA, SCK from i2c1
- GPIO-LD0 as AVDD28 supply
- PH4 gpio as interrupt pin
- PH8 gpio as reset pin
- X axis is inverted
- Y axis is inverted

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts

index c41131c032313c18c1eba83cdad63bf85a9d6a77..5634245d11dbfa90f8d586442ca3ed19e515daba 100644 (file)
        bias-pull-up;
 };
 
+&i2c1 {
+       status = "okay";
+
+       touchscreen@5d {
+               compatible = "goodix,gt5663";
+               reg = <0x5d>;
+               AVDD28-supply = <&reg_ldo_io0>;                 /* VCC-CTP: GPIO0-LDO */
+               interrupt-parent = <&pio>;
+               interrupts = <7 4 IRQ_TYPE_EDGE_FALLING>;
+               irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>;        /* CTP-INT: PH4 */
+               reset-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>;      /* CTP-RST: PH8 */
+               touchscreen-inverted-x;
+               touchscreen-inverted-y;
+       };
+};
+
 &mmc1 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc1_pins>;
        regulator-name = "vdd-cpus";
 };
 
+&reg_ldo_io0 {
+       regulator-min-microvolt = <2800000>;
+       regulator-max-microvolt = <2800000>;
+       regulator-name = "vcc-ctp";
+       status = "okay";
+};
+
 &reg_rtc_ldo {
        regulator-name = "vcc-rtc";
 };