From 81a80129c8cd5954b92b998aec927a29823d8dd9 Mon Sep 17 00:00:00 2001 From: wengjun1 Date: Mon, 17 May 2021 18:00:55 +0800 Subject: [PATCH] dts: Cyprus: touch: ili7807s bringup - Support ili7807s driver for cyprus. - Add the definition of reset/int pin. Change-Id: Ic7e88b884d68af922bb686025d80d4694dfd37f1 Signed-off-by: wengjun1 Reviewed-on: https://gerrit.mot.com/1950648 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- qcom/cypfg-touchscreen.dtsi | 105 ++++++++++++++++++++++++++++ qcom/holi-cypfg-common-overlay.dtsi | 2 +- 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100755 qcom/cypfg-touchscreen.dtsi diff --git a/qcom/cypfg-touchscreen.dtsi b/qcom/cypfg-touchscreen.dtsi new file mode 100755 index 000000000000..011d364973d2 --- /dev/null +++ b/qcom/cypfg-touchscreen.dtsi @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2019, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +&tlmm { + touch_int_mux { + touch_int_active: active { + mux { + pins = "gpio22"; + function = "gpio"; + }; + config { + pins = "gpio22"; + drive-strength = <8>; + bias-pull-up; + }; + }; + + touch_int_suspend: default { + mux { + pins = "gpio22"; + function = "gpio"; + }; + config { + pins = "gpio22"; + drive-strength = <2>; + bias-disable; + }; + }; + }; + + touch_reset_mux { + touch_reset_active: active { + mux { + pins = "gpio21"; + function = "gpio"; + }; + config { + pins = "gpio21"; + drive-strength = <8>; + bias-disable; + }; + }; + + touch_reset_suspend: default { + mux { + pins = "gpio21"; + function = "gpio"; + }; + config { + pins = "gpio21"; + drive-strength = <2>; + bias-pull-down; + output-low; + }; + }; + }; + + ts_release_mux { + ts_release: ts_release { + mux { + pins = "gpio21", "gpio22"; + function = "gpio"; + }; + + config { + pins = "gpio21", "gpio22"; + drive-strength = <2>; + bias-disable; + }; + }; + }; +}; + +&qupv3_se0_i2c { + status = "disabled"; +}; + +&qupv3_se0_spi { + status = "ok"; + ilitek@0 { + compatible = "tchip,ilitek"; + reg = <0x0>; + spi-max-frequency = <6000000>; + interrupt-parent = <&tlmm>; + interrupts = <22 0x2008>; + panel = <&dsi_tm_ili7807s_678_fhd_video>; + touch,reset-gpio = <&tlmm 21 0x00>; + touch,irq-gpio = <&tlmm 22 0x2008>; + pinctrl-names = "pmx_ts_active", "pmx_ts_suspend", "pmx_ts_release"; + pinctrl-0 = <&ts_active>; + pinctrl-1 = <&touch_int_suspend &touch_reset_suspend>; + pinctrl-2 = <&pmx_ts_release>; + status = "ok"; + }; +}; diff --git a/qcom/holi-cypfg-common-overlay.dtsi b/qcom/holi-cypfg-common-overlay.dtsi index a747775eb250..6382352d4447 100644 --- a/qcom/holi-cypfg-common-overlay.dtsi +++ b/qcom/holi-cypfg-common-overlay.dtsi @@ -12,7 +12,7 @@ #include "holi-moto-common-overlay.dtsi" #include "cypfg-display.dtsi" -//#include "denver-touchscreen.dtsi" +#include "cypfg-touchscreen.dtsi" #include "denver-sensors.dtsi" #include "camera/holi-camera-sensor-mot-denver-overlay.dtsi" #include "holi-audio-wcd9370-aw882xx-overlay.dtsi"