20220520给MT6765的android8.1系统增加TP驱动ILI9881H
2022/5/20 18:54
1、内核的config
Z:\android_mtk_o1_mp1\kernel-4.9\arch\arm64\boot\dts\mediatek\k62v1_64_bsp.dts
&i2c3 {
ext_buck_lp4@57 {
regulator-name ="ext_buck_vdd2";
regulator-min-microvolt = <300000>;
regulator-max-microvolt = <1300000>;
vsel_pin = <0>;
};
ext_buck_lp4x@50 {
regulator-name ="ext_buck_vddq";
regulator-min-microvolt = <300000>;
regulator-max-microvolt = <1300000>;
vsel_pin = <1>;
};
};
&i2c0 {
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <400000>;
mediatek,use-open-drain;
ili_touch@41{
compatible= "mediatek,ili_touch";
reg= <0x41>;
status ="okay";
};
};
&i2c6 {
ext_buck_vgpu@55 {
regulator-name ="ext_buck_vgpu";
regulator-min-microvolt = <300000>;
regulator-max-microvolt = <1300000>;
vsel_pin = <2>;
};
};
/* TOUCH start */
&touch {
tpd-resolution = <720 1600>;
use-tpd-button = <0>;
tpd-key-num = <3>;
tpd-key-local= <139 172 158 0>;
tpd-key-dim-local = <90 883 100 40 230
883 100 40 370 883 100 40 0 0 0 0>;
tpd-max-touch-num = <5>;
tpd-filter-enable = <1>;
tpd-filter-pixel-density = <146>;
tpd-filter-custom-prameters = <0 0 0 0 0 0 0 0 0 0 0 0>;
tpd-filter-custom-speed = <0 0 0>;
pinctrl-names = "default", "state_eint_as_int", "state_eint_output0",
"state_eint_output1", "state_rst_output0", "state_rst_output1";
pinctrl-0 = <&ctp_pins_default>;
pinctrl-1 = <&ctp_pins_eint_as_int>;
pinctrl-2 = <&ctp_pins_eint_output0>;
pinctrl-3 = <&ctp_pins_eint_output1>;
pinctrl-4 = <&ctp_pins_rst_output0>;
pinctrl-5 = <&ctp_pins_rst_output1>;
status = "okay";
};
&pio {
ctp_pins_default: eint0default {
};
ctp_pins_eint_as_int: eint@0 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
slew-rate = <0>;
bias-disable;
};
};
ctp_pins_eint_output0: eintoutput0 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
slew-rate = <1>;
output-low;
};
};
ctp_pins_eint_output1: eintoutput1 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO0__FUNC_GPIO0>;
slew-rate = <1>;
output-high;
};
};
ctp_pins_rst_output0: rstoutput0 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO174__FUNC_GPIO174>;
slew-rate = <1>;
output-low;
};
};
ctp_pins_rst_output1: rstoutput1 {
pins_cmd_dat {
pinmux = <PINMUX_GPIO174__FUNC_GPIO174>;
slew-rate = <1>;
output-high;
};
};
};
/* TOUCH end */
Z:\android_mtk_o1_mp1\kernel-4.9\arch\arm64\configs\k62v1_64_bsp_debug_defconfig
Z:\android_mtk_o1_mp1\kernel-4.9\arch\arm64\configs\k62v1_64_bsp_defconfig
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_MTK=y
CONFIG_TOUCHSCREEN_MTK_GT1151=y
CONFIG_GT1151_FIRMWARE="firmware2"
CONFIG_GT1151_CONFIG="config16"
CONFIG_GTP_DRIVER_SEND_CFG=y
CONFIG_GTP_CUSTOM_CFG=y
CONFIG_GTP_AUTO_UPDATE=y
CONFIG_GTP_REQUEST_FW_UPDATE=y
CONFIG_GTP_CREATE_WR_NODE=y
CONFIG_GTP_POWER_CTRL_SLEEP=y
修改为:
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_MTK=y
CONFIG_TOUCHSCREEN_MTK_GT1151=n
CONFIG_TOUCHSCREEN_MTK_ILI9881=y
CONFIG_GT1151_FIRMWARE="firmware2"
CONFIG_GT1151_CONFIG="config16"
CONFIG_GTP_DRIVER_SEND_CFG=y
CONFIG_GTP_CUSTOM_CFG=y
CONFIG_GTP_AUTO_UPDATE=y
CONFIG_GTP_REQUEST_FW_UPDATE=y
CONFIG_GTP_CREATE_WR_NODE=y
CONFIG_GTP_POWER_CTRL_SLEEP=y
2、TP文件:
整个目录
Z:\android_mtk_o1_mp1\kernel-4.9\drivers\input\touchscreen\mediatek\new_tddi_9881x\Makefile
Z:\android_mtk_o1_mp1\kernel-4.9\drivers\input\touchscreen\mediatek\Kconfig
source "drivers/input/touchscreen/mediatek/NT36xxx/Kconfig"
config TOUCHSCREEN_MTK_ILI9881
bool "ILI9881 for Mediatek package"
default y
help
Say Y here if you have ILI9881 touch panel
if unsure, say N.
To compile this dirver as a module,choose M here: the
module will be called.
endif
Z:\android_mtk_o1_mp1\kernel-4.9\drivers\input\touchscreen\mediatek\Makefile
obj-y += tpd_misc.o
obj-y += tpd_setting.o
obj-$(CONFIG_TOUCHSCREEN_MTK_SOLOMON) += SOLOMON/
obj-$(CONFIG_TOUCHSCREEN_MTK_FOCALTECH_TS) += focaltech_touch/
obj-$(CONFIG_TOUCHSCREEN_MTK_GT1151) += GT1151/
obj-$(CONFIG_TOUCHSCREEN_MTK_GT911) += GT911/
obj-$(CONFIG_TOUCHSCREEN_MTK_GSLX680) += gslX680/
obj-$(CONFIG_TOUCHSCREEN_MTK_NT36xxx) += NT36xxx/
obj-$(CONFIG_TOUCHSCREEN_MTK_ILI9881) += new_tddi_9881x/