From 16a5ef656ad866573705b063bac1fe790ae1005b Mon Sep 17 00:00:00 2001 From: Anand Tarakh Date: Wed, 6 Nov 2024 14:17:24 +0530 Subject: [PATCH] ARM: dts: msm: enable touch support for Kera platforms Enable touch support for Kera on MTP, CDP and QRD platforms. Change-Id: Ic201de06c7bc78a71ca163dd63a1ebd3caf1812e Signed-off-by: Anand Tarakh --- qcom/kera-cdp.dtsi | 41 +++++++++++++++++++++++++++++ qcom/kera-mtp.dtsi | 41 +++++++++++++++++++++++++++++ qcom/kera-pinctrl.dtsi | 60 ++++++++++++++++++++++++++++++++++++++++++ qcom/kera-qrd.dtsi | 41 +++++++++++++++++++++++++++++ 4 files changed, 183 insertions(+) diff --git a/qcom/kera-cdp.dtsi b/qcom/kera-cdp.dtsi index 9df4770a..237c54ed 100644 --- a/qcom/kera-cdp.dtsi +++ b/qcom/kera-cdp.dtsi @@ -2,3 +2,44 @@ /* * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. */ + +&qupv3_se8_spi { + #address-cells = <1>; + #size-cells = <0>; + + status = "ok"; + qcom,touch-active = "goodix,gt9916S"; + qcom,la-vm; + + goodix-berlin@0 { + compatible = "goodix,gt9916S"; + reg = <0>; + spi-max-frequency = <1000000>; + interrupt-parent = <&tlmm>; + interrupts = <13 0x2008>; + goodix,reset-gpio = <&tlmm 16 0x00>; + goodix,irq-gpio = <&tlmm 13 0x2008>; + goodix,irq-flags = <2>; + goodix,panel-max-x = <1080>; + goodix,panel-max-y = <2400>; + goodix,panel-max-w = <255>; + goodix,panel-max-p = <4096>; + goodix,firmware-name = "goodix_firmware_spi.bin"; + goodix,config-name = "goodix_cfg_group_spi.bin"; + goodix,avdd-name = "avdd"; + goodix,iovdd-name = "iovdd"; + avdd-supply = <&L22B>; + iovdd-supply = <&L8B>; + goodix,touch-type = "primary"; + goodix,qts_en; + + qts,trusted-touch-mode = "vm_mode"; + qts,touch-environment = "pvm"; + qts,trusted-touch-type = "primary"; + qts,trusted-touch-spi-irq = <653>; + qts,trusted-touch-io-bases = <0xa90000>; + qts,trusted-touch-io-sizes = <0x1000>; + qts,trusted-touch-vm-gpio-list = <&tlmm 0 0 &tlmm 1 0 &tlmm 2 0 + &tlmm 3 0 &tlmm 16 0 &tlmm 13 0x2008>; + }; +}; diff --git a/qcom/kera-mtp.dtsi b/qcom/kera-mtp.dtsi index c1025537..33ee45a2 100644 --- a/qcom/kera-mtp.dtsi +++ b/qcom/kera-mtp.dtsi @@ -16,3 +16,44 @@ nvmem-cells = <&usb_mode>; nvmem-cell-names = "usb_mode"; }; + +&qupv3_se8_spi { + #address-cells = <1>; + #size-cells = <0>; + + status = "ok"; + qcom,touch-active = "goodix,gt9916S"; + qcom,la-vm; + + goodix-berlin@0 { + compatible = "goodix,gt9916S"; + reg = <0>; + spi-max-frequency = <1000000>; + interrupt-parent = <&tlmm>; + interrupts = <13 0x2008>; + goodix,reset-gpio = <&tlmm 16 0x00>; + goodix,irq-gpio = <&tlmm 13 0x2008>; + goodix,irq-flags = <2>; + goodix,panel-max-x = <1080>; + goodix,panel-max-y = <2400>; + goodix,panel-max-w = <255>; + goodix,panel-max-p = <4096>; + goodix,firmware-name = "goodix_firmware_spi.bin"; + goodix,config-name = "goodix_cfg_group_spi.bin"; + goodix,avdd-name = "avdd"; + goodix,iovdd-name = "iovdd"; + avdd-supply = <&L22B>; + iovdd-supply = <&L8B>; + goodix,touch-type = "primary"; + goodix,qts_en; + + qts,trusted-touch-mode = "vm_mode"; + qts,touch-environment = "pvm"; + qts,trusted-touch-type = "primary"; + qts,trusted-touch-spi-irq = <653>; + qts,trusted-touch-io-bases = <0xa90000>; + qts,trusted-touch-io-sizes = <0x1000>; + qts,trusted-touch-vm-gpio-list = <&tlmm 0 0 &tlmm 1 0 &tlmm 2 0 + &tlmm 3 0 &tlmm 16 0 &tlmm 13 0x2008>; + }; +}; diff --git a/qcom/kera-pinctrl.dtsi b/qcom/kera-pinctrl.dtsi index f6ac4a7b..c2652061 100644 --- a/qcom/kera-pinctrl.dtsi +++ b/qcom/kera-pinctrl.dtsi @@ -1860,4 +1860,64 @@ }; }; }; + /* touchscreen pins */ + pmx_ts_active { + ts_active: ts_active { + mux { + pins = "gpio16", "gpio13"; + function = "gpio"; + }; + + config { + pins = "gpio16", "gpio13"; + drive-strength = <8>; + bias-pull-up; + }; + }; + }; + + pmx_ts_reset_suspend { + ts_reset_suspend: ts_reset_suspend { + mux { + pins = "gpio16"; + function = "gpio"; + }; + + config { + pins = "gpio16"; + drive-strength = <2>; + bias-pull-down; + }; + }; + }; + + pmx_ts_int_suspend { + ts_int_suspend: ts_int_suspend { + mux { + pins = "gpio13"; + function = "gpio"; + }; + + config { + pins = "gpio13"; + drive-strength = <2>; + bias-pull-down; + }; + }; + }; + + pmx_ts_release { + ts_release: ts_release { + mux { + pins = "gpio16", "gpio13"; + function = "gpio"; + }; + + config { + pins = "gpio16", "gpio13"; + drive-strength = <2>; + bias-disable; + }; + }; + }; }; diff --git a/qcom/kera-qrd.dtsi b/qcom/kera-qrd.dtsi index ca54365c..a1af52f3 100644 --- a/qcom/kera-qrd.dtsi +++ b/qcom/kera-qrd.dtsi @@ -9,3 +9,44 @@ reg = <0x42>; }; }; + +&qupv3_se8_spi { + #address-cells = <1>; + #size-cells = <0>; + + status = "ok"; + qcom,touch-active = "goodix,gt9916S"; + qcom,la-vm; + + goodix-berlin@0 { + compatible = "goodix,gt9916S"; + reg = <0>; + spi-max-frequency = <1000000>; + interrupt-parent = <&tlmm>; + interrupts = <13 0x2008>; + goodix,reset-gpio = <&tlmm 16 0x00>; + goodix,irq-gpio = <&tlmm 13 0x2008>; + goodix,irq-flags = <2>; + goodix,panel-max-x = <1080>; + goodix,panel-max-y = <2400>; + goodix,panel-max-w = <255>; + goodix,panel-max-p = <4096>; + goodix,firmware-name = "goodix_firmware_spi.bin"; + goodix,config-name = "goodix_cfg_group_spi.bin"; + goodix,avdd-name = "avdd"; + goodix,iovdd-name = "iovdd"; + avdd-supply = <&L22B>; + iovdd-supply = <&L8B>; + goodix,touch-type = "primary"; + goodix,qts_en; + + qts,trusted-touch-mode = "vm_mode"; + qts,touch-environment = "pvm"; + qts,trusted-touch-type = "primary"; + qts,trusted-touch-spi-irq = <653>; + qts,trusted-touch-io-bases = <0xa90000>; + qts,trusted-touch-io-sizes = <0x1000>; + qts,trusted-touch-vm-gpio-list = <&tlmm 0 0 &tlmm 1 0 &tlmm 2 0 + &tlmm 3 0 &tlmm 16 0 &tlmm 13 0x2008>; + }; +};