diff --git a/qcom/ravelin-atp.dtsi b/qcom/ravelin-atp.dtsi index fadfd6ef..788b5654 100644 --- a/qcom/ravelin-atp.dtsi +++ b/qcom/ravelin-atp.dtsi @@ -4,3 +4,31 @@ &soc { }; +&qupv3_se1_spi { + status = "ok"; + + #address-cells = <1>; + #size-cells = <0>; + qcom,spi-touch-active = "focaltech,fts_ts"; + + focaltech@0 { + compatible = "focaltech,fts_ts"; + reg = <0x0>; + spi-max-frequency = <6000000>; + interrupt-parent = <&tlmm>; + interrupts = <91 0x2008>; + focaltech,reset-gpio = <&tlmm 90 0x00>; + focaltech,irq-gpio = <&tlmm 91 0x2008>; + focaltech,display-coords = <0 0 1080 2340>; + focaltech,max-touch-number = <5>; + focaltech,ic-type = <0x3658D488>; + focaltech,touch-type = "primary"; + + vdd-supply = <&L4E>; + + pinctrl-names = "pmx_ts_active", "pmx_ts_suspend", "pmx_ts_release"; + pinctrl-0 = <&ts_spi_active>; + pinctrl-1 = <&ts_spi_int_suspend &ts_spi_reset_suspend>; + pinctrl-2 = <&ts_spi_release>; + }; +}; diff --git a/qcom/ravelin-idp-wcn3950-amoled-rcm.dtsi b/qcom/ravelin-idp-wcn3950-amoled-rcm.dtsi index ffcdd93d..d70edfc9 100644 --- a/qcom/ravelin-idp-wcn3950-amoled-rcm.dtsi +++ b/qcom/ravelin-idp-wcn3950-amoled-rcm.dtsi @@ -3,3 +3,41 @@ &soc { }; +&qupv3_se1_i2c { + status = "disabled"; +}; + +&qupv3_se1_spi { + #address-cells = <1>; + #size-cells = <0>; + status = "ok"; + qcom,touch-active = "goodix,gt9916S"; + + goodix-berlin@0 { + compatible = "goodix,gt9916S"; + reg = <0>; + spi-max-frequency = <1000000>; + + goodix,avdd-name = "avdd"; + avdd-supply = <&L4E>; + + interrupt-parent = <&tlmm>; + interrupts = <91 0x2008>; + goodix,reset-gpio = <&tlmm 90 0x00>; + goodix,irq-gpio = <&tlmm 91 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"; + + pinctrl-names = "pmx_ts_active", "pmx_ts_suspend", "pmx_ts_release"; + pinctrl-0 = <&ts_spi_active>; + pinctrl-1 = <&ts_spi_int_suspend &ts_spi_reset_suspend>; + pinctrl-2 = <&ts_spi_release>; + + qcom,touch-environment = "pvm"; + }; +}; diff --git a/qcom/ravelin-idp.dtsi b/qcom/ravelin-idp.dtsi index c857e703..9e238baa 100644 --- a/qcom/ravelin-idp.dtsi +++ b/qcom/ravelin-idp.dtsi @@ -46,3 +46,32 @@ }; }; }; + +&qupv3_se1_i2c { + #address-cells = <1>; + #size-cells = <0>; + + status = "ok"; + qcom,i2c-touch-active = "focaltech,fts_ts"; + + focaltech@38 { + compatible = "focaltech,fts_ts"; + reg = <0x38>; + + interrupt-parent = <&tlmm>; + interrupts = <13 0x2008>; + focaltech,reset-gpio = <&tlmm 12 0x00>; + focaltech,irq-gpio = <&tlmm 13 0x2008>; + focaltech,display-coords = <0 0 1080 2408>; + focaltech,max-touch-number = <5>; + focaltech,ic-type = <0x8726081C>; + focaltech,touch-type = "primary"; + + vdd-supply = <&L4E>; + + pinctrl-names = "pmx_ts_active","pmx_ts_suspend","pmx_ts_release"; + pinctrl-0 = <&ts_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + pinctrl-2 = <&ts_release>; + }; +}; diff --git a/qcom/ravelin-pinctrl.dtsi b/qcom/ravelin-pinctrl.dtsi index be2733e8..2df6577f 100644 --- a/qcom/ravelin-pinctrl.dtsi +++ b/qcom/ravelin-pinctrl.dtsi @@ -1199,5 +1199,118 @@ drive-strength = <2>; }; }; + + /* touchscreen pins */ + pmx_ts_active { + ts_active: ts_active { + mux { + pins = "gpio12", "gpio13"; + function = "gpio"; + }; + + config { + pins = "gpio12", "gpio13"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + ts_spi_active: ts_spi_active { + mux { + pins = "gpio90", "gpio91"; + function = "gpio"; + }; + + config { + pins = "gpio90", "gpio91"; + drive-strength = <8>; + bias-pull-up; + }; + }; + }; + + pmx_ts_reset_suspend { + ts_reset_suspend: ts_reset_suspend { + mux { + pins = "gpio12"; + function = "gpio"; + }; + + config { + pins = "gpio12"; + drive-strength = <2>; + bias-pull-down; + }; + }; + + ts_spi_reset_suspend: ts_spi_reset_suspend { + mux { + pins = "gpio90"; + function = "gpio"; + }; + + config { + pins = "gpio90"; + 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; + }; + }; + + ts_spi_int_suspend: ts_spi_int_suspend { + mux { + pins = "gpio91"; + function = "gpio"; + }; + + config { + pins = "gpio91"; + drive-strength = <2>; + bias-pull-down; + }; + }; + }; + + pmx_ts_release { + ts_release: ts_release { + mux { + pins = "gpio12", "gpio13"; + function = "gpio"; + }; + + config { + pins = "gpio12", "gpio13"; + drive-strength = <2>; + bias-disable; + }; + }; + + ts_spi_release: ts_spi_release { + mux { + pins = "gpio90", "gpio91"; + function = "gpio"; + }; + + config { + pins = "gpio90", "gpio91"; + drive-strength = <2>; + bias-disable; + }; + }; + }; }; }; diff --git a/qcom/ravelin-qrd.dtsi b/qcom/ravelin-qrd.dtsi index 967e739e..d7efcc65 100644 --- a/qcom/ravelin-qrd.dtsi +++ b/qcom/ravelin-qrd.dtsi @@ -3,3 +3,32 @@ &soc { }; + +&qupv3_se1_i2c { + #address-cells = <1>; + #size-cells = <0>; + + status = "ok"; + qcom,i2c-touch-active = "focaltech,fts_ts"; + + focaltech@38 { + compatible = "focaltech,fts_ts"; + status = "ok"; + reg = <0x38>; + + interrupt-parent = <&tlmm>; + interrupts = <13 0x2008>; + focaltech,reset-gpio = <&tlmm 12 0x00>; + focaltech,irq-gpio = <&tlmm 13 0x2008>; + focaltech,display-coords = <0 0 1080 2408>; + focaltech,max-touch-number = <5>; + focaltech,ic-type = <0x8726081C>; + focaltech,touch-type = "primary"; + focaltech,touch-environment = "pvm"; + + pinctrl-names = "pmx_ts_active","pmx_ts_suspend","pmx_ts_release"; + pinctrl-0 = <&ts_active>; + pinctrl-1 = <&ts_int_suspend &ts_reset_suspend>; + pinctrl-2 = <&ts_release>; + }; +}; \ No newline at end of file