This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM62X: AM62X TOUCHSCREEN

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: SK-AM62B

HI ,

I am using am62x-sk evm E3 . The problem we are facing with is the touch screen. Touch Driver is goodix gt911.

Device tree configuration is

&main_i2c0 {
	#address-cells = <1>;
	#size-cells = <0>;

	touchscreen@14 {
		compatible = "goodix,gt911";
		reg = <0x14>;

		interrupt-parent = <&exp1>;
		interrupts = <22 IRQ_TYPE_EDGE_FALLING>;
	};
};


&main_i2c1 {
	exp1: gpio@22 {
		compatible = "ti,tca6424";
		reg = <0x22>;
		gpio-controller;
		#gpio-cells = <2>;
		gpio-line-names = "GPIO_CPSW2_RST", "GPIO_CPSW1_RST",
				   "PRU_DETECT", "MMC1_SD_EN",
				   "VPP_LDO_EN", "EXP_PS_3V3_En",
				   "EXP_PS_5V0_En", "EXP_HAT_DETECT",
				   "GPIO_AUD_RSTn", "GPIO_eMMC_RSTn",
				   "UART1_FET_BUF_EN", "WL_LT_EN",
				   "GPIO_HDMI_RSTn", "CSI_GPIO1",
				   "CSI_GPIO2", "PRU_3V3_EN",
				   "HDMI_INTn", "PD_I2C_IRQ",
				   "MCASP1_FET_EN", "MCASP1_BUF_BT_EN",
				   "MCASP1_FET_SEL", "UART1_FET_SEL",
				   "TSINT#", "IO_EXP_TEST_LED";

		interrupt-parent = <&main_gpio1>;
		interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
		interrupt-controller;
		#interrupt-cells = <2>;

		pinctrl-names = "default";
		pinctrl-0 = <&main_gpio1_ioexp_intr_pins_default>;
	};
};

and the commands specified in the page

https://software-dl.ti.com/processor-sdk-linux-rt/esd/AM62X/09_00_00_03/exports_AM62SIP/docs/linux/How_to_Guides/Target/How_to_enable_Microtips_LVDS_Panel_on_AM62_SK_EVM.html

root@am62xx-evm:~# i2ctransfer -f -y 0 w3@0x3f 0x09 0x1 0x0e
root@am62xx-evm:~# i2ctransfer -f -y 0 w6@0x3f 0x08 0x04 0x47 0x50 0x73 0x68
root@am62xx-evm:~# i2ctransfer -f -y 0 w1@0x3f 0x72 r9
0x08 0x40 0x40 0x00 0x00 0x61 0x40 0x02 0x00

root@am62xx-evm:~# modprobe goodix_ts
[  110.347546] irq: type mismatch, failed to map hwirq-22 for gpio@22!
[  110.353950] Goodix-TS 0-0014: supply AVDD28 not found, using dummy regulator
[  110.361425] Goodix-TS 0-0014: supply VDDIO not found, using dummy regulator
[  110.369139] Goodix-TS 0-0014: ID 911, version: 1050
[  110.378682] Goodix-TS 0-0014: Invalid config (0, 0, 0), using defaults
[  110.385625] input: Goodix Capacitive TouchScreen as /devices/platform/bus@f0000/20000000.i2c/i2c-0/0-0014/input/input3
[  110.396739] Goodix-TS 0-0014: request IRQ failed: -22
[  110.448746] Goodix-TS: probe of 0-0014 failed with error -22

And before executing these commands the gpioinfo is

gpiochip3 - 24 lines:
	line   0: "GPIO_CPSW2_RST" unused input active-high 
	line   1: "GPIO_CPSW1_RST" unused input active-high 
	line   2: "PRU_DETECT"       unused   input  active-high 
	line   3: "MMC1_SD_EN" "regulator-3" output active-high [used]
	line   4: "VPP_LDO_EN"       unused   input  active-high 
	line   5: "EXP_PS_3V3_En" unused input active-high 
	line   6: "EXP_PS_5V0_En" unused input active-high 
	line   7: "EXP_HAT_DETECT" unused input active-high 
	line   8: "GPIO_AUD_RSTn" unused input active-high 
	line   9: "GPIO_eMMC_RSTn" unused input active-high 
	line  10: "UART1_FET_BUF_EN" unused input active-high 
	line  11:   "WL_LT_EN" "regulator-6" output active-low [used]
	line  12: "GPIO_HDMI_RSTn" unused input active-high 
	line  13:  "CSI_GPIO1"       unused   input  active-high 
	line  14:  "CSI_GPIO2"       unused   input  active-high 
	line  15: "PRU_3V3_EN"       unused   input  active-high 
	line  16:  "HDMI_INTn"  "interrupt"   input  active-high [used]
	line  17: "PD_I2C_IRQ"       unused   input  active-high 
	line  18: "MCASP1_FET_EN" unused input active-high 
	line  19: "MCASP1_BUF_BT_EN" unused input active-high 
	line  20: "MCASP1_FET_SEL" unused input active-high 
	line  21: "UART1_FET_SEL" unused input active-high 
	line  22:     "TSINT#"  "interrupt"   input  active-high [used]
	line  23: "IO_EXP_TEST_LED" unused input active-high

After executing it becomes

gpiochip3 - 24 lines:
	line   0: "GPIO_CPSW2_RST" unused input active-high 
	line   1: "GPIO_CPSW1_RST" unused input active-high 
	line   2: "PRU_DETECT"       unused   input  active-high 
	line   3: "MMC1_SD_EN" "regulator-3" output active-high [used]
	line   4: "VPP_LDO_EN"       unused   input  active-high 
	line   5: "EXP_PS_3V3_En" unused input active-high 
	line   6: "EXP_PS_5V0_En" unused input active-high 
	line   7: "EXP_HAT_DETECT" unused input active-high 
	line   8: "GPIO_AUD_RSTn" unused input active-high 
	line   9: "GPIO_eMMC_RSTn" unused input active-high 
	line  10: "UART1_FET_BUF_EN" unused input active-high 
	line  11:   "WL_LT_EN" "regulator-6" output active-low [used]
	line  12: "GPIO_HDMI_RSTn" unused input active-high 
	line  13:  "CSI_GPIO1"       unused   input  active-high 
	line  14:  "CSI_GPIO2"       unused   input  active-high 
	line  15: "PRU_3V3_EN"       unused   input  active-high 
	line  16:  "HDMI_INTn"  "interrupt"   input  active-high [used]
	line  17: "PD_I2C_IRQ"       unused   input  active-high 
	line  18: "MCASP1_FET_EN" unused input active-high 
	line  19: "MCASP1_BUF_BT_EN" unused input active-high 
	line  20: "MCASP1_FET_SEL" unused input active-high 
	line  21: "UART1_FET_SEL" unused input active-high 
	line  22:     "TSINT#"       unused   input  active-high 
	line  23: "IO_EXP_TEST_LED" unused input active-high

i2c detect command shows our register 0x14

root@am62xx-evm:~# i2cdetect -r 0 
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0 using receive byte commands.
I will probe address range 0x08-0x77.
Continue? [Y/n] 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: 30 -- -- -- -- -- -- -- 38 -- -- -- -- -- -- UU 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- 

In dmesg

[    5.969149] Goodix-TS 0-0014: supply AVDD28 not found, using dummy regulator
[    5.977778] pwm-backlight backlight: supply power not found, using dummy regulator
[    5.994572] Goodix-TS 0-0014: supply VDDIO not found, using dummy regulator
[    6.015118] mc: Linux media interface: v0.10
[    6.025851] Goodix-TS 0-0014: ID 911, version: 1050
[    6.038763] Goodix-TS 0-0014: Invalid config (0, 0, 0), using defaults
[    6.047354] input: Goodix Capacitive TouchScreen as /devices/platform/bus@f0000/20000000.i2c/i2c-0/0-0014/input/input1

Can you help me in solving this?