10

I have a goodix chip for the touchscreen on my tablet PC and even though I compiled the latest kernel module for it, things are not working.

I am using exactly this kernel version with the patched driver: https://github.com/NimbleX/kernel

For starters, the picture of the said chip is the following: Goodix touchscreen controller

The DSDT tables contain information regarding the touchscreen.

From what I understand the touchscreen is connected via an I2C serial interface but lshw shows that *-serial is UNCLAIMED. Nevertheless I can see that the i2c_i801 module for the SMBus controller is loaded.

With the help of Aleksei I was able to determine that the toucscreen is connected to i2c-1 buss and that the controller must use 0x14 or 0x5d address.

Unfortunatelly, i2cdetect doesn't find anything, as it can be seen here.

I created a lengthy gist with the output of the following:

I know that some of these are redundant and that others are useless but nevertheless it's better to have where to search than to miss something out.

I measured with a multimeter and the chip is powered both when running Windows and Linux so this rules out that I need to somehow tell Linux to power this thing out.

So, what do do next in order to debug this thing?

sashoalm
  • 75,001
  • 122
  • 434
  • 781
Bogdan
  • 622
  • 6
  • 21
  • What is the bug you are debugging? Is the problem that i2cdetect doesn't find anything? – sashoalm Mar 25 '16 at 10:42
  • Yes. I suppose the first step to have the touchscreen working would be to have the chip detected by i2cdetect. – Bogdan Mar 25 '16 at 11:35
  • OK, in that case I suggest we change the title (in fact I already made an edit) to be more descriptive. StackOverflow's Q&A format is not well suited to open-ended discussion, so it's best to post problems one at a time. This post can be about that particular sub-problem, and then when you encounter more sub-problems, you can make a separate post for each one. Can you describe what i2cdetect should detect? When you say it doesn't detect anything, it's not immediately obvious what it should be detecting. Can you post the expected output? – sashoalm Mar 25 '16 at 13:12
  • I think it should show the device is present on the i2c-1 bus and the above specified address. Nevertheless, I am not sure about this because I don't know how to properly interpret a DSDT and I've never written a driver which uses the i2c bus. – Bogdan Mar 25 '16 at 13:21
  • have you enabled it in configuration file? if not try doing it on make menuconfig > Device Drivers > Input device support > Touchscreens > your goodix driver. | [Some Reference](http://forum.xda-developers.com/showthread.php?t=1506520&page=13) | [Reference 2](http://comments.gmane.org/gmane.linux.kernel.input/38267) | – Samrat Das Mar 28 '16 at 10:22
  • Of course. You can see the module is loaded here: https://gist.githubusercontent.com/bogdanr/61b447267bb8fcfa7ebb/raw/2fd0556ba75135fd54b0253f5520797eacac7f98/lsmod – Bogdan Mar 28 '16 at 17:37
  • Have you tried probing SCL and SDA while applying i2cdetect? What's default status of this lines? – SD. Mar 30 '16 at 17:58
  • First of all I highly recommend to use v4.5 of kernel. There was a bug with power management on Intel hardware, i.e. LPSS, in particular DMA — dw-dmac — wasn't able to power on device and hung entire system. – 0andriy Mar 31 '16 at 17:58
  • DSDT tells about Atmel hardware, why do you have elan driver instead? Ah, okay, it has a support for many controllers at once. – 0andriy Mar 31 '16 at 18:07
  • You may also go to */sys/bus/acpi/devices/* and check what status returns for all relevant devices. 15 means device is on and fully functional. – 0andriy Mar 31 '16 at 18:11
  • @AndyShevchenko: Regarding kernel 4.5, I had a go at it but I had some other bigger problems with it. Can you please tell me how I would get the status from /sys ? – Bogdan Apr 02 '16 at 06:08
  • @AndyShevchenko: I eventually managed to compile kernel 4.5. Unfortunately, it doesn't improve things. The only advantage is that I don't have to path the driver anymore as the latest changes are upstream. – Bogdan Apr 03 '16 at 07:00
  • `grep -H . /sys/bus/acpi/devices/*/status` and put a link to an output. By the way, what is the model of laptop? – 0andriy Apr 03 '16 at 12:25
  • Heard that is kinda Chinese clone of MS Surface tablet, so, can you check the patches from community regarding Surface support? Try as well v4.6-rc2 (scheduled to be released on Monday). – 0andriy Apr 03 '16 at 14:11
  • @AndyShevchenko: ACPI is looking good: https://gist.githubusercontent.com/bogdanr/61b447267bb8fcfa7ebb/raw/008fee4bf57fc1d6dd58198835b513512f7ce219/ACPI – Bogdan Apr 03 '16 at 15:16
  • Sound like a SW/HW integration debugging issue. Put a Scope on i2c bus, when you run i2cdetect, you should see some activities on i2c bus and start debug from there. – Jbobo Lee Apr 01 '16 at 01:21
  • Provide output of exact command I mentioned. Also would be nice to have the model name of the device. – 0andriy Apr 03 '16 at 19:16
  • @AndyShevchenko: Sorry, I now realize why you want to see all that: https://gist.githubusercontent.com/bogdanr/61b447267bb8fcfa7ebb/raw/d0f36aca33c9a6480f25e9ad3995bc9b9c92e15e/acpi_status The device is this one: http://www.gearbest.com/tablet-pcs/pp_252601.html – Bogdan Apr 03 '16 at 19:51
  • So, is it GT 9110P ? I didn't see well the second last digit. The drivers seems to be *drivers/input/touchscreen/goodix.c*. I checked linux-next and it does have ACPI support for GDIX1001. So, Try to boot with `initcall_debug` and enable CONFIG_DYNAMIC_DEBUG in the kernel configuration. Load module by hand with `modprobe goodix dyndbg` and check dmesg after. – 0andriy Apr 05 '16 at 22:29
  • Ah, also check power state of the device. It might be off by firmware by some reason. – 0andriy Apr 05 '16 at 22:36
  • In some cases you may need to provide firmware *goodix_%d_cfg.bin*, whe %d is some integer represents ID. – 0andriy Apr 05 '16 at 22:44
  • These two lines appear in dmesg afer enabling the debug output: [ 25.655026] calling goodix_ts_driver_init+0x0/0x19 [goodix] @ 660 [ 25.655052] initcall goodix_ts_driver_init+0x0/0x19 [goodix] returned 0 after 21 usecs How can I tell if the firmware is needed of not because I wasn't able to find the firmware on the new? Do you think that it would be easy to get it from Windows? – Bogdan Apr 07 '16 at 08:56

1 Answers1

1

Hi can you check where pin 5,6 are connected specifically 6 which is reset ic so if that may be reseting the ic. just a posiblity.

Devidas
  • 2,479
  • 9
  • 24