Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa2e93ea authored by Wang Yafei's avatar Wang Yafei Committed by Venkataraman Nerellapalli
Browse files

input: touchscreen: Add Goodix touchscreen support



Add Goodix gt9xx v2.8 driver support for 10" display panel.  Squash the
following commits:

    commit 9e50a79cf8aa780343b4e7b4e6ed5c6320215e01 (refs/remotes/goodix/master)
    Author: Charles Wang <charles.goodix@gmail.com>
    Date:   Mon Jul 2 14:53:38 2018 +0800

	Fix errors and warnings when build on msm-kernel-4.9

	- Fix errors and warnings when build on msm-kernel-4.9.
	- Optimization touch effect.

	Signed-off-by: default avatarCharles Wang <charles.goodix@gmail.com>

    commit bd29bac9657816c6f297b3df506d35c18898fdda
    Author: Charles Wang <charles.goodix@gmail.com>
    Date:   Fri Mar 2 01:59:08 2018 +0800

	Remove debug info form makefile

	Signed-off-by: default avatarCharles Wang <charles.goodix@gmail.com>

    commit 1a28cac74d1bfd175796f229cdb695676dd55c1c
    Author: Charles Wang <charles.goodix@gmail.com>
    Date:   Fri Mar 2 01:20:07 2018 +0800

	Fix some coding style problem

	Signed-off-by: default avatarWang Yafei <wangyafei@goodix.com>

    commit 09baa4effb7b8379809ee8d9b30575f973f7233f
    Author: Wang Yafei <wangyafei@goodix.com>
    Date:   Fri Feb 2 19:27:42 2018 +0800

	Modify dts config properties

	Signed-off-by: default avatarWang Yafei <wangyafei@goodix.com>

    commit 44446a88e9ccbd6c62cdec43bf3c7682c556cada
    Author: Wang Yafei <wangyafei@goodix.com>
    Date:   Mon Jan 29 20:30:46 2018 +0800

	Add reset-pin pinstrl support

	- Use pinctrl control reset-pin state
	- Fix user space memory direct access

	Signed-off-by: default avatarWang Yafei <wangyafei@goodix.com>

    commit 6a5b40a189651121ed3ccdd6474b43116f759bcb
    Author: Wang Yafei <wangyafei@goodix.com>
    Date:   Sat Nov 11 02:03:44 2017 +0800

	Modify pinctrl

	Signed-off-by: default avatarWang Yafei <wangyafei@goodix.com>

    commit 1ef4fbf61982222d0599b21d9d6ab6e017c54759
    Author: Wang Yafei <wangyafei@goodix.com>
    Date:   Thu Nov 9 02:09:09 2017 +0800

	Fix little problem when firmware update failed

	Signed-off-by: default avatarWang Yafei <wangyafei@goodix.com>

    commit 529f4c536fbd0047bfcb5a31d277aae5706d8e4f
    Author: Wang Yafei <wangyafei@goodix.com>
    Date:   Wed Nov 8 05:03:42 2017 +0800

	Fix Kconfig problems

	Signed-off-by: default avatarWang Yafei <wangyafei@goodix.com>

    commit 877e4b186d597f1a53ed35a2ba2fb7a2debde063
    Author: Wang Yafei <wangyafei@goodix.com>
    Date:   Tue Nov 7 05:29:48 2017 +0800

	Add Goodix gt9xx v2.8 driver

	Signed-off-by: default avatarWang Yafei <wangyafei@goodix.com>

    commit ca7a8083ab72ab110919223c3a32e6f814dbbe9c
    Author: Wang Yafei <wangyafei@goodix.com>
    Date:   Tue Nov 7 05:12:11 2017 +0800

	Add apq8053-dragon dts file

	Signed-off-by: default avatarWang Yafei <wangyafei@goodix.com>

    commit 6bd539a42db3a518ca10841d829be93f9d524d56
    Author: Wang Yafei <wangyafei@goodix.com>
    Date:   Tue Nov 7 03:38:36 2017 +0800

	first commit

	Signed-off-by: default avatarWang Yafei <wangyafei@goodix.com>

Change-Id: I559e3ecc28e86b9de98721d02f46bc782e96aae6
Git-commit: 9e50a79cf8aa780343b4e7b4e6ed5c6320215e01
Git-repo: https://github.com/goodix/msm-3.18


Signed-off-by: default avatarVenkataraman Nerellapalli <venkataraman.nerellapalli@codeaurora.org>
parent fc8e63be
Loading
Loading
Loading
Loading
+99 −0
Original line number Diff line number Diff line
Goodix GT9xx series touch controller

Required properties:

 - compatible		: Should be "goodix,gt9xx"
 - reg			: I2C slave address of the device.
 - interrupt-parent	: Parent of interrupt.
 - interrupts		: Configuration of touch panel controller interrupt
				GPIO.
 - goodix,product-id	: Product identification of the controller.
 - interrupt-gpios	: Interrupt gpio which is to provide interrupts to
				host, same as "interrupts" node.
 - reset-gpios		: Reset gpio to control the reset of chip.
 - goodix,display-coords	: Display coordinates in pixels. It is a four
				tuple consisting of min x, min y, max x and
				max y values.

Optional properties:

 - avdd-supply		: Power supply needed to power up the device, this is
				for fixed voltage external regulator.
 - vdd-supply		: Power supply needed to power up the device, when use
				external regulator, do not add this property.
 - vcc-i2c-supply	: Power source required to power up i2c bus.
				GT9xx series can provide 1.8V from internal
				LDO, add this properties base on hardware
				design.
 - goodix,panel-coords	: Panel coordinates for the chip in pixels.
				It is a four tuple consisting of min x,
				min y, max x and max y values.
 - goodix,i2c-pull-up	: To specify pull up is required.
 - goodix,force-update	: To specify force update is allowed.
 - goodix,enable-power-off	: Power off touchscreen during suspend.
 - goodix,button-map	: Button map of key codes. The number of key codes
				depend on panel.
 - goodix,cfg-data0	: Touch screen controller config data group 0. Ask vendor
				to provide that.
				Driver supports maximum six config groups. If more than one
				groups are defined, driver will select config group depending
				on hardware configuration. If only config group 0 is defined,
				it will be used for all hardware configurations.
				Touch screen controller will use its onchip default config data
				if this property is not present.
 - goodix,cfg-data1	: Touch screen controller config data group 1. Ask vendor
				to provide that.
 - goodix,cfg-data2	: Touch screen controller config data group 2. Ask vendor
				to provide that.
 - goodix,cfg-data3	: Touch screen controller config data group 3. Ask vendor
				to provide that.
 - goodix,cfg-data4	: Touch screen controller config data group 4. Ask vendor
				to provide that.
 - goodix,cfg-data5	: Touch screen controller config data group 5. Ask vendor
				to provide that.
 - goodix,fw-name	: Touch screen controller firmware file name.
 - goodix,slide-wakeup	: To specify slide-wakeup property is enabled or not.
 - goodix,dbl-clk-wakeup	: To specify dbl-clk-wakeup property is enabled or not.
 - goodix,change-x2y	: To specify change-x2y property is enabled or not.
 - goodix,driver-send-cfg	: To specify driver-send-cfg property is enabled or not.
 - goodix,have-touch-key	: To specify have-touch-key property is enabled or not.
 - goodix,with-pen	: To specify with-pen property is enabled or not.
Example:
i2c@f9927000 {
		goodix@5d {
			compatible = "goodix,gt9xx";
			reg = <0x5d>;
			interrupt-parent = <&msmgpio>;
			interrupts = <17 0x2008>;
			reset-gpios = <&msmgpio 16 0x00>;
			interrupt-gpios = <&msmgpio 17 0x00>;
			avdd-supply = <&tp_power>;
			goodix,panel-coords = <0 0 720 1200>;
			goodix,display-coords = <0 0 720 1080>;
			goodix,button-map= <158 102 139>;
			goodix,product-id = "915";
			goodix,cfg-data0 = [
				41 D0 02 00 05 0A 05 01 01 08
				12 58 50 41 03 05 00 00 00 00
				00 00 00 00 00 00 00 8C 2E 0E
				28 24 73 13 00 00 00 83 03 1D
				40 02 00 00 00 03 64 32 00 00
				00 1A 38 94 C0 02 00 00 00 04
				9E 1C 00 8D 20 00 7A 26 00 6D
				2C 00 60 34 00 60 10 38 68 00
				F0 50 35 FF FF 27 00 00 00 00
				00 01 1B 14 0C 14 00 00 01 00
				00 00 00 00 00 00 00 00 00 00
				00 00 02 04 06 08 0A 0C 0E 10
				12 14 16 18 1A 1C FF FF FF FF
				FF FF FF FF FF FF FF FF FF FF
				FF FF 00 02 04 06 08 0A 0C 0F
				10 12 13 14 16 18 1C 1D 1E 1F
				20 21 22 24 26 28 29 2A FF FF
				FF FF FF FF FF FF FF 22 22 22
				22 22 22 FF 07 01];
			goodix,fw_name = "gtp_fw.bin";
			goodix,have-touch-key;
			goodix,driver-send-cfg;
		};
};
+12 −0
Original line number Diff line number Diff line
@@ -1279,6 +1279,18 @@ config FT_SECURE_TOUCH

	  If unsure, say N.

config TOUCHSCREEN_GT9XX_v28
	bool "Goodix touchpanel GT9xx_v28 series"
	depends on I2C
	help
	  Say Y here if you have a Goodix GT9xx_v28 touchscreen.
	  Gt9xx controllers are multi touch controllers which can
	  report 5 touches at a time.

          If unsure, say N.

source "drivers/input/touchscreen/gt9xx_v2.8/Kconfig"

config TOUCHSCREEN_HIMAX_CHIPSET
	bool "Himax touchpanel CHIPSET"
	depends on I2C
+1 −0
Original line number Diff line number Diff line
@@ -105,3 +105,4 @@ obj-$(CONFIG_TOUCHSCREEN_COLIBRI_VF50) += colibri-vf50-ts.o
obj-$(CONFIG_TOUCHSCREEN_ROHM_BU21023)	+= rohm_bu21023.o
obj-$(CONFIG_TOUCHSCREEN_FTS)		+= focaltech_touch/
obj-$(CONFIG_TOUCHSCREEN_HIMAX_CHIPSET)	+= hxchipset/
obj-$(CONFIG_TOUCHSCREEN_GT9XX_v28)		+= gt9xx_v2.8/
 No newline at end of file
+36 −0
Original line number Diff line number Diff line
#
# Goodix GT9xx Touchscreen driver
#
config TOUCHSCREEN_GT9XX_v28
	bool "Goodix touchpanel GT9xx series"
	depends on I2C
	help
	  Enable this for support Goodix GT9xx_v28 driver.

	  Say Y here if you have a Goodix GT9xx touchscreen
	  controller.

          If unsure, say N.

config TOUCHSCREEN_GT9XX_UPDATE
	tristate "Goodix GT9xx touch controller auto update support"
	depends on TOUCHSCREEN_GT9XX_v28
	help
	  Enable this for support firmware update.

	  Say Y here if you want update touch controller
	  firmware.

	  If unsure, say N.

config TOUCHSCREEN_GT9XX_TOOL
	tristate "Goodix GT9xx Tools for debuging"
	depends on TOUCHSCREEN_GT9XX_v28
	help
	  This implement interface support for Goodix GT9xx
	  touchscreen debug.

	  Say Y here if you want to have a Android app debug interface
	  to your system.

	  If unsure, say N.
+7 −0
Original line number Diff line number Diff line
#
# Makefile for the Goodix gt9xx touchscreen driver.
#
#subdir-ccflags-y += -DDEBUG
obj-$(CONFIG_TOUCHSCREEN_GT9XX_v28)	+= gt9xx.o
obj-$(CONFIG_TOUCHSCREEN_GT9XX_UPDATE)	+= gt9xx_update.o
obj-$(CONFIG_TOUCHSCREEN_GT9XX_TOOL)	+= goodix_tool.o
Loading