205 lines
5.2 KiB
Text
205 lines
5.2 KiB
Text
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
|
/*
|
|
* Copyright (C) 2020 MediaTek Inc.
|
|
*/
|
|
|
|
/* TOUCH start */
|
|
&spi4 {
|
|
status = "okay";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
pinctrl-names = "default", "gt9896s_int_active",
|
|
"gt9896s_reset_active", "gt9896s_int_suspend",
|
|
"gt9896s_reset_suspend", "gt9896s_spi_mode";
|
|
pinctrl-0 = <&ctp_gt9896s_pins_default>;
|
|
pinctrl-1 = <&ctp_gt9896s_int_active>;
|
|
pinctrl-2 = <&ctp_gt9896s_reset_active>;
|
|
pinctrl-3 = <&ctp_gt9896s_int_suspend>;
|
|
pinctrl-4 = <&ctp_gt9896s_reset_suspend>;
|
|
pinctrl-5 = <&ctp_gt9896s_spi_mode>;
|
|
|
|
gt9896s@0 {
|
|
compatible = "goodix,gt9896s";
|
|
reg = <0>; //Same as CS ID
|
|
spi-max-frequency = <1000000>;
|
|
|
|
goodix,avdd-name = "vtouch";
|
|
vtouch-supply = <&mt_pmic_vtp_ldo_reg>;
|
|
goodix,reset-gpio = <&pio 15 0x0>;
|
|
goodix,irq-gpio = <&pio 14 0x0>;
|
|
goodix,irq-flags = <2>; /* 1:rising, 2:falling;*/
|
|
goodix,panel-max-id = <10>;
|
|
goodix,panel-max-x = <1080>;
|
|
goodix,panel-max-y = <2280>;
|
|
goodix,panel-max-w = <256>;
|
|
goodix,panel-max-p = <256>;
|
|
goodix,input-max-x = <1080>;
|
|
goodix,input-max-y = <2280>;
|
|
goodix,panel-key-map = <158 172 217>; /*BACK,HOMEPAGE,SEARCH*/
|
|
goodix,power-on-delay-us = <10000>; /*10ms*/
|
|
goodix,power-off-delay-us = <5000>;
|
|
goodix,firmware-version = "6853v01";
|
|
goodix,config-version = "6853v01";
|
|
/*goodix,swap-axis;*/
|
|
/*goodix,x2x;*/
|
|
/*goodix,y2y;*/
|
|
goodix,pen-enable;
|
|
tpd-filter-enable = <0>;
|
|
tpd-filter-pixel-density = <161>;
|
|
tpd-filter-custom-prameters = <0 0 0 0 0 0 0 0 0 0 0 0>;
|
|
tpd-filter-custom-speed = <0 0 0>;
|
|
};
|
|
};
|
|
|
|
&i2c0 {
|
|
clock-frequency = <400000>;
|
|
pinctrl-names = "default", "ts_int_active",
|
|
"ts_reset_active", "ts_int_suspend",
|
|
"ts_reset_suspend", "ts_i2c_mode",
|
|
"ts_eint_high";
|
|
pinctrl-0 = <&ctp_pins_default>;
|
|
pinctrl-1 = <&ctp_ts_int_active>;
|
|
pinctrl-2 = <&ctp_ts_reset_active>;
|
|
pinctrl-3 = <&ctp_ts_int_suspend>;
|
|
pinctrl-4 = <&ctp_ts_reset_suspend>;
|
|
pinctrl-5 = <&ctp_ts_i2c_mode>;
|
|
pinctrl-6 = <&ctp_ts_int_as_gpio>;
|
|
|
|
gt1151@14 {
|
|
compatible = "goodix,gt1151";
|
|
reg = <0x14>;
|
|
status = "okay";
|
|
};
|
|
gt9886@5d {
|
|
compatible = "goodix,gt9886";
|
|
reg = <0x5d>;
|
|
status = "ok";
|
|
interrupt-parent = <&pio>;
|
|
interrupts = <14 IRQ_TYPE_EDGE_FALLING 14 0>;
|
|
vtouch-supply = <&mt_pmic_vtp_ldo_reg>;
|
|
goodix,reset-gpio = <&pio 15 0x0>;
|
|
goodix,irq-gpio = <&pio 14 0x0>;
|
|
goodix,irq-flags = <2>; /* 1:rising, 2:falling;*/
|
|
goodix,panel-max-id = <10>;
|
|
goodix,panel-max-x = <1080>;
|
|
goodix,panel-max-y = <2280>;
|
|
goodix,panel-max-w = <256>;
|
|
goodix,panel-max-p = <256>;
|
|
goodix,input-max-x = <1080>;
|
|
goodix,input-max-y = <2280>;
|
|
goodix,panel-key-map = <158 172 217>; /*BACK,HOMEPAGE,SEARCH*/
|
|
goodix,power-on-delay-us = <10000>; /*10ms*/
|
|
goodix,power-off-delay-us = <5000>;
|
|
goodix,firmware-version = "6853v01";
|
|
goodix,config-version = "6853v01";
|
|
/*goodix,swap-axis;*/
|
|
/*goodix,x2x;*/
|
|
/*goodix,y2y;*/
|
|
goodix,pen-enable;
|
|
goodix,key-of-pen = <331 332>;/*BTN_STYLUS, BTN_STYLUS2*/
|
|
tpd-filter-enable = <0>;
|
|
tpd-filter-pixel-density = <161>;
|
|
tpd-filter-custom-prameters = <0 0 0 0 0 0 0 0 0 0 0 0>;
|
|
tpd-filter-custom-speed = <0 0 0>;
|
|
};
|
|
|
|
};
|
|
|
|
&touch {
|
|
tpd-resolution = <1080 1920>;
|
|
lcm-resolution = <1080 1920>;
|
|
tpd-cfg-version = "config17";
|
|
tpd-max-touch-num = <10>;
|
|
interrupt-parent = <&pio>;
|
|
interrupts = <14 IRQ_TYPE_EDGE_FALLING 14 0>;
|
|
goodix,eint-gpio = <&pio 14 0x0>;
|
|
goodix,reset-gpio = <&pio 15 0x0>;
|
|
vtouch-supply = <&mt_pmic_vtp_ldo_reg>;
|
|
|
|
/* hw rotate */
|
|
/* goodix,x2x; */
|
|
/* goodix,y2y; */
|
|
|
|
tpd-filter-enable = <0>;
|
|
tpd-filter-pixel-density = <168>;
|
|
tpd-filter-custom-prameters = <0 0 0 0 0 0 0 0 0 0 0 0>;
|
|
tpd-filter-custom-speed = <0 0 0>;
|
|
status = "okay";
|
|
};
|
|
|
|
&pio {
|
|
ctp_pins_default: eintdefault {
|
|
};
|
|
ctp_gt9896s_pins_default: pins_default {
|
|
};
|
|
ctp_ts_int_active: int_active {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO14__FUNC_GPIO14>;
|
|
input-enable;
|
|
};
|
|
};
|
|
ctp_ts_reset_active: reset_active {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO15__FUNC_GPIO15>;
|
|
output-high;
|
|
};
|
|
};
|
|
ctp_ts_int_suspend: int_suspend {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO14__FUNC_GPIO14>;
|
|
output-low;
|
|
};
|
|
};
|
|
ctp_ts_reset_suspend: reset_suspend {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO15__FUNC_GPIO15>;
|
|
output-low;
|
|
};
|
|
};
|
|
ctp_ts_i2c_mode: i2cmode_default {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO97__FUNC_SCL0>,
|
|
<PINMUX_GPIO98__FUNC_SDA0>;
|
|
};
|
|
};
|
|
ctp_ts_int_as_gpio: int_high {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO14__FUNC_GPIO14>;
|
|
output-high;
|
|
};
|
|
};
|
|
ctp_gt9896s_int_active: int1_active {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO14__FUNC_GPIO14>;
|
|
input-enable;
|
|
};
|
|
};
|
|
ctp_gt9896s_reset_active: reset1_active {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO15__FUNC_GPIO15>;
|
|
output-high;
|
|
};
|
|
};
|
|
ctp_gt9896s_int_suspend: int1_suspend {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO14__FUNC_GPIO14>;
|
|
output-low;
|
|
};
|
|
};
|
|
ctp_gt9896s_reset_suspend: reset1_suspend {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO15__FUNC_GPIO15>;
|
|
output-low;
|
|
};
|
|
};
|
|
ctp_gt9896s_spi_mode: spimode_default {
|
|
pins_cmd_dat {
|
|
pinmux = <PINMUX_GPIO12__FUNC_SPI4_MI>,
|
|
<PINMUX_GPIO13__FUNC_SPI4_MO>,
|
|
<PINMUX_GPIO97__FUNC_SPI4_CLK>,
|
|
<PINMUX_GPIO98__FUNC_SPI4_CSB>;
|
|
drive-strength = <2>;
|
|
};
|
|
};
|
|
};
|
|
/* TOUCH end */
|