diff mbox series

[03/12] arm64: dts: qcom: sm6115-pro1x: Add Goodix Touchscreen

Message ID 20240722-qx1050-feature-expansion-v1-3-c4d486435b96@riseup.net
State Superseded
Headers show
Series F(x)tec Pro1X feature expansion | expand

Commit Message

Dang Huynh July 22, 2024, 7:10 a.m. UTC
The Fxtec Pro1X touchscreen uses Goodix GT9286 chip.

Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 49 +++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Comments

Konrad Dybcio July 22, 2024, 8:36 a.m. UTC | #1
On 22.07.2024 9:10 AM, Dang Huynh wrote:
> The Fxtec Pro1X touchscreen uses Goodix GT9286 chip.
> 
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
>  arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts | 49 +++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
> index 43b4bee72dd8..d91d31646b29 100644
> --- a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
> @@ -62,6 +62,20 @@ key-volume-up {
>  			wakeup-source;
>  		};
>  	};
> +
> +	ts_vdd_supply: ts-vdd-supply {
> +		compatible = "regulator-fixed";
> +		regulator-name = "ts_vdd_supply";
> +		gpio = <&pca9534 3 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
> +
> +	ts_vddio_supply: ts-vddio-supply {
> +		compatible = "regulator-fixed";
> +		regulator-name = "ts_vddio_supply";
> +		gpio = <&pca9534 2 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};

I suppose you don't know the voltages for these?

>  };
>  
>  &dispcc {
> @@ -86,6 +100,27 @@ pca9534: gpio@21 {
>  	};
>  };
>  
> +&i2c2 {
> +	status = "okay";
> +	/* Clock frequency was not specified downstream, let's park it to 100 KHz */
> +	clock-frequency = <100000>;
> +
> +	touchscreen@14 {
> +		compatible = "goodix,gt9286";
> +		reg = <0x14>;

> +		pinctrl-names = "default";
> +		pinctrl-0 = <&ts_int_n>, <&ts_rst_n>;

reverse order, shift these down below supplies

> +
> +		interrupt-parent = <&tlmm>;
> +		interrupts = <80 IRQ_TYPE_LEVEL_LOW>;

interrupts-extended

Konrad
Dang Huynh July 22, 2024, 8:38 a.m. UTC | #2
> On 22.07.2024 9:10 AM, Dang Huynh wrote:
> > +
> > +	ts_vdd_supply: ts-vdd-supply {
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "ts_vdd_supply";
> > +		gpio = <&pca9534 3 GPIO_ACTIVE_HIGH>;
> > +		enable-active-high;
> > +	};
> > +
> > +	ts_vddio_supply: ts-vddio-supply {
> > +		compatible = "regulator-fixed";
> > +		regulator-name = "ts_vddio_supply";
> > +		gpio = <&pca9534 2 GPIO_ACTIVE_HIGH>;
> > +		enable-active-high;
> > +	};
> 
> I suppose you don't know the voltages for these?
> 

Nope, no schematics to verify.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
index 43b4bee72dd8..d91d31646b29 100644
--- a/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
+++ b/arch/arm64/boot/dts/qcom/sm6115-fxtec-pro1x.dts
@@ -62,6 +62,20 @@  key-volume-up {
 			wakeup-source;
 		};
 	};
+
+	ts_vdd_supply: ts-vdd-supply {
+		compatible = "regulator-fixed";
+		regulator-name = "ts_vdd_supply";
+		gpio = <&pca9534 3 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	ts_vddio_supply: ts-vddio-supply {
+		compatible = "regulator-fixed";
+		regulator-name = "ts_vddio_supply";
+		gpio = <&pca9534 2 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
 };
 
 &dispcc {
@@ -86,6 +100,27 @@  pca9534: gpio@21 {
 	};
 };
 
+&i2c2 {
+	status = "okay";
+	/* Clock frequency was not specified downstream, let's park it to 100 KHz */
+	clock-frequency = <100000>;
+
+	touchscreen@14 {
+		compatible = "goodix,gt9286";
+		reg = <0x14>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ts_int_n>, <&ts_rst_n>;
+
+		interrupt-parent = <&tlmm>;
+		interrupts = <80 IRQ_TYPE_LEVEL_LOW>;
+
+		irq-gpios = <&tlmm 80 IRQ_TYPE_LEVEL_LOW>;
+		reset-gpios = <&tlmm 71 GPIO_ACTIVE_HIGH>;
+		AVDD28-supply = <&ts_vdd_supply>;
+		VDDIO-supply = <&ts_vddio_supply>;
+	};
+};
+
 &pm6125_gpios {
 	vol_up_n: vol-up-n-state {
 		pins = "gpio5";
@@ -262,6 +297,20 @@  key_camera_n: key-camera-n {
 		drive-strength = <2>;
 		bias-pull-up;
 	};
+
+	ts_int_n: ts-int-n {
+		pins = "gpio80";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
+
+	ts_rst_n: ts-rst-n {
+		pins = "gpio71";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
 };
 
 &ufs_mem_hc {