Skip to contentSkip to conversation

arm64: dts: allwinner: a64-amarula-relic: Add GT5663 CTP node

PATCH In review Jagan Teki 2 participants 5 messages Apr 18, 2019

Subsystems (2)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v3 1/2 arm64: dts: allwinner: a64-amarula-relic: Add GT5663 CTP node

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

---
Changes for v3:
- Use 2.8v for reg_ldo_io0
Changes for v2:
- drop i2c1, bias-pull-up

 .../allwinner/sun50i-a64-amarula-relic.dts    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +25 -0
index 3575db216016..bd31a4385bc1 100644
@@ -49,6 +49,24 @@
 	bias-pull-up;
 };
 
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+	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>;
@@ -212,6 +230,13 @@
 	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";
 };
Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#1 lore raw

PATCH v3 2/2 arm64: dts: allwinner: a64-oceanic-5205-5inmfd: Enable GT911 CTP

Goodix GT911 CTP is bound with Oceanic 5205 5inMFD board.

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

---
Changes for v3:
- Use 2.8v for reg_ldo_io0
Changes for v2:
- drop i2c1, bias-pull-up

 .../sun50i-a64-oceanic-5205-5inmfd.dts        | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-oceanic-5205-5inmfd.dts +25 -0
index 6a2154525d1e..f0cd6587f619 100644
@@ -37,6 +37,24 @@
 	status = "okay";
 };
 
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+	status = "okay";
+
+	touchscreen@5d {
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		AVDD28-supply = <&reg_ldo_io0>;			/* VDD_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 11 GPIO_ACTIVE_HIGH>;	/* CTP-RST: PH11 */
+		touchscreen-inverted-x;
+		touchscreen-inverted-y;
+	};
+};
+
 &mdio {
 	ext_rgmii_phy: ethernet-phy@1 {
 		compatible = "ethernet-phy-ieee802.3-c22";
@@ -52,6 +70,13 @@
 	regulator-name = "vcc-phy";
 };
 
+&reg_ldo_io0 {
+	regulator-min-microvolt = <2800000>;
+	regulator-max-microvolt = <2800000>;
+	regulator-name = "vdd-ctp";
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pb_pins>;
Signature · 1 line
2.18.0.321.gffc6fa0e3
#2 lore raw
In reply to Jagan Teki
Quoted 26 lines · Jagan Teki

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

---
Changes for v3:
- Use 2.8v for reg_ldo_io0
Changes for v2:
- drop i2c1, bias-pull-up

 .../allwinner/sun50i-a64-amarula-relic.dts    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +0 -0
index 3575db216016..bd31a4385bc1 100644

arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts line 54

Quoted 6 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +3 -0
@@ -49,6 +49,24 @@
 	bias-pull-up;
 };
 
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;

You haven't fixed this, and you didn't either in the second patch.

Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

author
#3 lore raw
Quoted 31 lines · Maxime Ripard
Quoted 29 lines · Jagan Teki

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

---
Changes for v3:
- Use 2.8v for reg_ldo_io0
Changes for v2:
- drop i2c1, bias-pull-up

 .../allwinner/sun50i-a64-amarula-relic.dts    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +0 -0
index 3575db216016..bd31a4385bc1 100644
@@ -49,6 +49,24 @@
      bias-pull-up;
 };
 
Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts line 54

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +3 -0
+&i2c1 {
+     pinctrl-names = "default";
+     pinctrl-0 = <&i2c1_pins>;

You haven't fixed this, and you didn't either in the second patch.

Sorry, I interpreted previous comment to keep this pinctrl.

Since i2c1 node in sun50i-a64.dtsi doesn't have pinctrl attached to it, added here like i2c0 is it something wrong?

#4 lore raw
Quoted 38 lines · Jagan Teki
Quoted 31 lines · Maxime Ripard
Quoted 29 lines · Jagan Teki

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

---
Changes for v3:
- Use 2.8v for reg_ldo_io0
Changes for v2:
- drop i2c1, bias-pull-up

 .../allwinner/sun50i-a64-amarula-relic.dts    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +0 -0
index 3575db216016..bd31a4385bc1 100644
@@ -49,6 +49,24 @@
      bias-pull-up;
 };
 
Quoted 5 lines

arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts line 54

Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts +3 -0
+&i2c1 {
+     pinctrl-names = "default";
+     pinctrl-0 = <&i2c1_pins>;

You haven't fixed this, and you didn't either in the second patch.

Quoted 4 lines

Sorry, I interpreted previous comment to keep this pinctrl.

Since i2c1 node in sun50i-a64.dtsi doesn't have pinctrl attached to it, added here like i2c0 is it something wrong?

If that's the only muxing option, it should be in the DTSI. If it's not the only muxing option, then the name is wrong.

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com