diff mbox series

[09/10] arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen

Message ID 20221030073232.22726-10-marijn.suijten@somainline.org (mailing list archive)
State Accepted
Headers show
Series arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 | expand

Commit Message

Marijn Suijten Oct. 30, 2022, 7:32 a.m. UTC
Use the generic samsung,s6sy761 touchscreen driver for this device,
together with a few pins and regulators to power it up correctly.

Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
---
 .../qcom/sm6350-sony-xperia-lena-pdx213.dts   | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)

Comments

Konrad Dybcio Oct. 31, 2022, 9:14 p.m. UTC | #1
On 30.10.2022 08:32, Marijn Suijten wrote:
> Use the generic samsung,s6sy761 touchscreen driver for this device,
> together with a few pins and regulators to power it up correctly.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  .../qcom/sm6350-sony-xperia-lena-pdx213.dts   | 41 +++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> index 6eb1d4e5e60f..20f35623d1ef 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
> @@ -43,6 +43,15 @@ key-volume-down {
>  			gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
>  		};
>  	};
> +
> +	touch_en_vreg: touch-en-regulator {
> +		compatible = "regulator-fixed";
> +		regulator-name = "touch_en_vreg";
> +		gpio = <&tlmm 10 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +
> +		vin-supply = <&pm6350_l6>;
> +	};
>  };
>  
>  &apps_rsc {
> @@ -280,6 +289,23 @@ &gpi_dma1 {
>  	status = "okay";
>  };
>  
> +&i2c8 {
> +	clock-frequency = <400000>;
> +	status = "okay";
> +
> +	touchscreen@48 {
> +		compatible = "samsung,s6sy761";
> +		reg = <0x48>;
> +		interrupt-parent = <&tlmm>;
> +		interrupts = <22 0x2008>;
> +		vdd-supply = <&pm6350_l11>;
> +		avdd-supply = <&touch_en_vreg>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&ts_int_default &ts_active>;
> +	};
> +};
> +
>  &pm6350_gpios {
>  	gpio_keys_state: gpio-keys-state {
>  		key-volume-down-pins {
> @@ -334,6 +360,21 @@ &sdhc_2 {
>  
>  &tlmm {
>  	gpio-reserved-ranges = <13 4>, <45 2>, <56 2>;
> +
> +	ts_active: ts-active-state {
> +		pins = "gpio21";
> +		function = "gpio";
> +		drive-strength = <8>;
> +		bias-pull-up;
> +	};
> +
> +	ts_int_default: ts-int-default-state {
> +		pins = "gpio22";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-disable;
> +		input-enable;
> +	};
>  };
>  
>  &usb_1 {
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
index 6eb1d4e5e60f..20f35623d1ef 100644
--- a/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
+++ b/arch/arm64/boot/dts/qcom/sm6350-sony-xperia-lena-pdx213.dts
@@ -43,6 +43,15 @@  key-volume-down {
 			gpios = <&pm6350_gpios 2 GPIO_ACTIVE_LOW>;
 		};
 	};
+
+	touch_en_vreg: touch-en-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "touch_en_vreg";
+		gpio = <&tlmm 10 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		vin-supply = <&pm6350_l6>;
+	};
 };
 
 &apps_rsc {
@@ -280,6 +289,23 @@  &gpi_dma1 {
 	status = "okay";
 };
 
+&i2c8 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	touchscreen@48 {
+		compatible = "samsung,s6sy761";
+		reg = <0x48>;
+		interrupt-parent = <&tlmm>;
+		interrupts = <22 0x2008>;
+		vdd-supply = <&pm6350_l11>;
+		avdd-supply = <&touch_en_vreg>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&ts_int_default &ts_active>;
+	};
+};
+
 &pm6350_gpios {
 	gpio_keys_state: gpio-keys-state {
 		key-volume-down-pins {
@@ -334,6 +360,21 @@  &sdhc_2 {
 
 &tlmm {
 	gpio-reserved-ranges = <13 4>, <45 2>, <56 2>;
+
+	ts_active: ts-active-state {
+		pins = "gpio21";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
+
+	ts_int_default: ts-int-default-state {
+		pins = "gpio22";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+		input-enable;
+	};
 };
 
 &usb_1 {