Skip to content

Davinci fixes and touchscreen #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 56 additions & 13 deletions arch/arm64/boot/dts/qcom/sm7150-xiaomi-davinci.dts
Original file line number Diff line number Diff line change
Expand Up @@ -75,33 +75,33 @@
no-map;
};

adsp_mem: memory@95100000 {
reg = <0x0 0x95100000 0x0 0x2600000>;
adsp_mem: memory@95700000 {
reg = <0x0 0x95700000 0x0 0x2600000>;
no-map;
};

wlan_msa_mem: memory@97700000 {
reg = <0x0 0x97700000 0x0 0x180000>;
wlan_msa_mem: memory@97500000 {
reg = <0x0 0x97d00000 0x0 0x180000>;
no-map;
};

npu_mem: memory@97880000 {
reg = <0x0 0x97880000 0x0 0x80000>;
npu_mem: memory@97e80000 {
reg = <0x0 0x97e80000 0x0 0x80000>;
no-map;
};

ipa_fw_mem: memory@97900000 {
reg = <0x0 0x97900000 0x0 0x10000>;
ipa_fw_mem: memory@97700000 {
reg = <0x0 0x97f00000 0x0 0x10000>;
no-map;
};

ipa_gsi_mem: memory@97910000 {
reg = <0x0 0x97910000 0x0 0x5000>;
ipa_gsi_mem: memory@97710000 {
reg = <0x0 0x97f10000 0x0 0x5000>;
no-map;
};

gpu_mem: memory@97915000 {
reg = <0x0 0x97915000 0x0 0x2000>;
gpu_mem: memory@97715000 {
reg = <0x0 0x97f15000 0x0 0x2000>;
no-map;
};

Expand Down Expand Up @@ -160,7 +160,27 @@
clock-frequency = <100000>;
status = "okay";

/* goodix,gt9889 (touchscreen) @ 5d */
goodix-gtx8@5d {
compatible = "goodix,gt9889";
reg = <0x5d>;
interrupt-parent = <&tlmm>;
interrupts = <9 0x2800>;
vtouch-supply = <&vreg_l6c_3p0>;//3.3v
vtouch-load = <600000>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&pmx_ts_active>;
pinctrl-1 = <&pmx_ts_int_suspend &pmx_ts_reset_suspend>;
goodix,reset-gpio = <&tlmm 8 GPIO_ACTIVE_HIGH>;
goodix,irq-gpio = <&tlmm 9 0x2800>;
goodix,avdd-name = "vtouch";
goodix,avdd-gpio = <&tlmm 5 GPIO_ACTIVE_HIGH>; /* 1v8 */
goodix,irq-flags = <2>; /* 1:trigger rising, 2:trigger falling;*/
goodix,panel-max-x = <1079>;
goodix,panel-max-y = <2339>;
goodix,panel-max-w = <127>;
goodix,power-on-delay-us = <300000>; /*300ms*/
goodix,power-off-delay-us = <5000>;
};
};

&i2c9 {
Expand Down Expand Up @@ -241,4 +261,27 @@

&tlmm {
gpio-reserved-ranges = <0 4>, <59 4>;

pmx_ts_active: pmx-ts-active-state {
pins = "gpio9", "gpio8";
function = "gpio";
drive-strength = <16>;
bias-pull-up;
};

pmx_ts_int_suspend: pmx-ts-int-suspend-state {
pins = "gpio9";
function = "gpio";
drive-strength = <16>;
input-enable;
bias-pull-up;
};

pmx_ts_reset_suspend: pmx-ts-rst-suspend-state {
pins = "gpio8";
function = "gpio";
drive-strength = <16>;
bias-disable;
output-high;
};
};
1 change: 1 addition & 0 deletions arch/arm64/configs/sm7150.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_LOCALVERSION="-sm7150"

# Xiaomi Mi 9T / Redmi K20
CONFIG_DRM_PANEL_SAMSUNG_EA_F10=y
CONFIG_TOUCHSCREEN_GOODIX_GTX8=y

# Xiaomi Mi Note 10 Lite
CONFIG_DRM_PANEL_XIAOMI_F4_41_06_0A=y
Expand Down
1 change: 1 addition & 0 deletions drivers/input/touchscreen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ menuconfig INPUT_TOUCHSCREEN
if INPUT_TOUCHSCREEN

source "drivers/input/touchscreen/nt36672c/Kconfig"
source "drivers/input/touchscreen/gtx8/Kconfig"

config TOUCHSCREEN_88PM860X
tristate "Marvell 88PM860x touchscreen"
Expand Down
1 change: 1 addition & 0 deletions drivers/input/touchscreen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,4 @@ obj-$(CONFIG_TOUCHSCREEN_IQS7211) += iqs7211.o
obj-$(CONFIG_TOUCHSCREEN_ZINITIX) += zinitix.o
obj-$(CONFIG_TOUCHSCREEN_HIMAX_HX83112B) += himax_hx83112b.o
obj-$(CONFIG_TOUCHSCREEN_NT36672C_HOSTDL_SPI) += nt36672c/
obj-$(CONFIG_TOUCHSCREEN_GOODIX_GTX8) += gtx8/
46 changes: 46 additions & 0 deletions drivers/input/touchscreen/gtx8/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#
# Goodix touchscreen driver configuration
#
menuconfig TOUCHSCREEN_GOODIX_GTX8
bool "Goodix GTx8 touchscreen"
depends on I2C
default y
help
Say Y here if you have a Goodix GTx8 touch controller
to your system.

If unsure, say N.

if TOUCHSCREEN_GOODIX_GTX8

config TOUCHSCREEN_GOODIX_GTX8_UPDATE
tristate "Goodix GTx8 firmware update module"
default y
help
Say Y here to enable support for doing firmware update.

If unsure, say N.

To compile this driver as a module, choose M here.

config TOUCHSCREEN_GOODIX_GTX8_GESTURE
tristate "Goodix GTx8 gesture wakeup feature"
default n
help
Say Y here to enable support for gesture wakeup feature.

If unsure, say N.

To compile this driver as a module, choose M here.

config TOUCHSCREEN_GOODIX_GTX8_TOOLS
tristate "Goodix touch tools support"
default y
help
Say Y here to enable debug tools.

If unsure, say N.

To compile this driver as a module, choose M here.

endif
5 changes: 5 additions & 0 deletions drivers/input/touchscreen/gtx8/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
obj-$(CONFIG_TOUCHSCREEN_GOODIX_GTX8) += goodix_core.o
goodix_core-y := goodix_ts_i2c.o goodix_ts_core.o goodix_cfg_bin.o
obj-$(CONFIG_TOUCHSCREEN_GOODIX_GTX8_UPDATE) += goodix_gtx8_update.o
obj-$(CONFIG_TOUCHSCREEN_GOODIX_GTX8_GESTURE) += goodix_ts_gesture.o
obj-$(CONFIG_TOUCHSCREEN_GOODIX_GTX8_TOOLS) += goodix_ts_tools.o
Loading