Trouble
[A13 tablet] Looking for some help with touchscreen
10
3749
View: 3749|Reply: 10
|
[Trouble]
[A13 tablet] Looking for some help with touchscreen
[Copy link]
|
|
Edited by destroyedlolo at Jan 07, 2016 17:35
Hello,
I know I'm out of topic with this forum, but I take my chance here as nobody replying on SunXI group 
So, I resurrected a bricked tablet (http://linux-sunxi.org/index.php?title=MID-KLIPAD_HC-913) making it running under Gentoo/Linux. Unfortunately, I'm facing some issues with its touch screen (Silead GSL3680).
The original Andoid FEX is containing :
- [ctp_para]
- ctp_used = 1
- ctp_name = "ft5x_ts"
- ctp_twi_id = 1
- ctp_twi_addr = 0x3f
- ctp_screen_max_x = 800
- ctp_screen_max_y = 480
- ctp_revert_x_flag = 0
- ctp_revert_y_flag = 0
- ctp_exchange_x_y_flag = 0
- ctp_int_port =port:PG11<6><default><default><default>
- ctp_wakeup =port:PB03<1><default><default><1>
- ctp_io_port =port:PG11<0><default><default><default>
- ctp_light =port:PA05<1><default><default><0>
- [autotp5]
- tpaddr = 64
- tpname = "gslx680"
- tpreset = 0
- tpdelay = 200
- tpreg = 0
- tpvaule = 0
- tpupdate = 0
- tpselect = 0
Copy the Code and I changed it as per the instructions I found on the driver's webpage:
- [ctp_para]
- ctp_used = 1
- ctp_name = "gslx680"
- ctp_twi_id = 1
- ctp_twi_addr = 0x40
- ctp_screen_max_x = 800
- ctp_screen_max_y = 480
- ctp_revert_x_flag = 0
- ctp_revert_y_flag = 0
- ctp_exchange_x_y_flag = 0
- ctp_int_port =port:PG11<6><default><default><default>
- ctp_wakeup =port:PB03<1><default><default><1>
- ctp_io_port =port:PG11<0><default><default><default>
- ctp_light =port:PA05<1><default><default><0>
- ctp_firmware = "actif.fw"
Copy the Code
But, if I'm trying to load the module, I got the following trace :
- [91.338172]===========================gslx680_ts_init=====================
- [ 91.338191] _fetch_sysconfig_para.
- [ 91.338216] gslx680 firmware actif.fw.
- [ 91.338228] _fetch_sysconfig_para: after: ctp_twi_addr is 0x40, dirty_addr_buf: 0x40. dirty_addr_buf[1]: 0xfffe
- [ 91.338239] _fetch_sysconfig_para: ctp_twi_id is 1.
- [ 91.338248] _fetch_sysconfig_para: screen_max_x = 800.
- [ 91.338256] _fetch_sysconfig_para: screen_max_y = 480.
- [ 91.338264] _fetch_sysconfig_para: revert_x_flag = 0.
- [ 91.338272] _fetch_sysconfig_para: revert_y_flag = 0.
- [ 91.338283] _fetch_sysconfig_para: exchange_x_y_flag = 0.
- [ 91.339294] i2c-core: driver [gslx680] using legacy suspend method
- [ 91.339309] i2c-core: driver [gslx680] using legacy resume method
- [ 91.339337] ctp_detect: Detected chip gslx680 at adapter 1, address 0x40
- [ 91.340318] ====gslx680_ts_probe begin=====.
- [ 91.340334] ==kzalloc success=
- [ 91.340340] [GSLX680] Enter gsl_ts_init_ts
- [ 91.340362] ctp_set_irq_mode: config gpio to int mode.
- [ 91.340389] ctp_set_irq_mode, 854: gpio_int_info, port = 7, port_num = 11.
- [ 91.340396] INTERRUPT CONFIG
- [ 91.341055] input: gslx680 as /devices/platform/sunxi-i2c.1/i2c-1/1-0040/input/input1
- [ 91.366514] incomplete xfer (0xff)
- [ 91.366532] reset_chip: gsl_ts_write 1 fail!
- [ 91.366541] init_chip: reset_chip fail: -70
- [ 91.366552] gslx680 1-0040: init_chip failed
- [ 91.366582] gslx680: probe of 1-0040 failed with error -70
-
Copy the Code
and as you can see the chip is present on the I2C bus :
- Tablette ~ # i2cdetect 1
- WARNING! This program can confuse your I2C bus, cause data loss
- and worse!
- I will probe file /dev/i2c-1.
- I will probe address range 0x03-0x77.
- Continue? [Y/n] y
- 0 1 2 3 4 5 6 7 8 9 a b c d e f
- 00: -- -- -- -- -- -- -- -- -- -- -- -- --
- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Copy the Code
Does someone having any clue how I can make it working ?
Thanks
Laurent
|
|
|
|
|
|
|
|
Not sure if it'll help but could you try running the bus at 400kHz....would require a kernel compile.
And the firmware is correct I presume.
Have you extracted it from the Android system or are using the one with the driver? |
|
|
|
|
|
|
|
Not an issue to re-build a kernel, but I wasn't aware I can change the speed of the I2C buses (I tought it is always 400 khz). Do you know which is the parameter to change ?
And the firmware is correct I presume.
Have you extracted it from the Android system or are using the one with the driver?
I had a discuss with "Joe" who ported the driver to Sunxi : the problem seems at reset stage of the chip, so before it is trying to load the firmware.
|
|
|
|
|
|
|
|
Not an issue to re-build a kernel, but I wasn't aware I can change the speed of the I2C buses (I tought it is always 400 khz). Do you know which is the parameter to change ?
It's the "i2c.h" in /arch/arm/plat-sunxi/include/plat/
- #define I2C0_TRANSFER_SPEED (400000)
- #define I2C1_TRANSFER_SPEED (100000)
- #define I2C2_TRANSFER_SPEED (100000)
- #define I2C3_TRANSFER_SPEED (100000)
- #define I2C4_TRANSFER_SPEED (100000)
Copy the Code
Only i2c0 is 400kHz by default.
have you looked at /proc/interrupts ?
does it show proper interrupt activity for the ts module? |
|
|
|
|
|
|
|
Ok, thanks for the information.
As per exchanges I had with Joe, it should be linked with reset signal, so I'll first investigate this way and in parallel check for I2C speed.
Will keep you updated. |
|
|
|
|
|
|
|
Yes,tracing from the reset_chip code the error seems to point to
/* Bus error during master or slave mode due to illegal level condition */
|
|
|
|
|
|
|
|
Yes,tracing from the reset_chip code the error seems to point to
/* Bus error during master or slave mode due to illegal level condition */
|
|
|
|
|
|
|
|
So I almost totally translated the GSL3680 datasheet :
- it seems playing with control line is not needed to upload anything to the chip : it follows standard I2C write cycle
- this datasheet only explain general information about the chip ... but not which register to read and which one to configure ... I need "GSL3680 application guide"

|
|
|
|
|
|
|
|
seems the i2c_sunxi module is not able to write to the bus.
it is commanded by the gslx680 code to write 0x88 to the gsl's 0xe0 register(part of reset chip procedure)
it starts by putting out the START signal on the bus and then proceeds to read the STATUS register of the sunxi i2c controller.
The STATUS register shows error code 0xff which is reported with the incomplete xfer message.
the error code stands for "Bus error during master or slave mode due to illegal level condition"
can't say what the illegal level condition is pointing at.
you must enable i2c debugging in the kernel to see if any more information is obtained.
|
|
|
|
|
|
|