Olimex A10 and I2C Capacitive Touch

Started by anthonym, August 26, 2014, 01:22:16 pm

Previous topic - Next topic


Hi All,

I am trying to connect a capacitive touch panel to my Olimex A10 but I am having fun with IRQ mismatches please see dmesg below;

======goodix_gt811 probe======
[   72.689494] ctp_set_irq_mode: config gpio to int mode.
[   72.700645] ctp_set_irq_mode, 231: gpio_int_info, port = 8, port_num = 21.
[   72.709587]  INTERRUPT CONFIG
[   72.730078] Goodix-TS 2-0014: GT811 init info:X_MAX=4096,Y_MAX=4096,TRIG_MODE=RISING EDGE
[   72.762013] input: gt80x as /devices/virtual/input/input1
[   72.781586] IRQ handler type mismatch for IRQ 28
[   72.788988] current handler: sunxi-gpio

I am using the existing drivers and think I have the FEX configured correctly.

Anyone got any ideas?

Thanks in advance.


Hi Anthony,

Which OS? Linux or Android? Your output below indicates this is possibly not Android as the messages don't look the same as what I can see in the Android Linux driver for the GT811.

Which GPIO pin have you got the touch IRQ connected to?

I assume you also have the I2C connected to the touch panel?

Can you show the FEX settings for your [ctp_para]?


current handler: sunxi-gpio

Make sure that there is no other code or driver using the same GPIO Pin.


Hi Dave,

Thanks for the replies, scratching my head with this one.

Figured it out, unloading the sunxi-gpio module got me through the first hurdle.

Unfortunately the touch panel I am using appears to be faulty, INT line goes from 3.3V to ~3V on touch.

Luckily another panel I am evaluating has turned up based on a Focal Tech chip I am now trying to get this working.

I have got through the interrupt config stage (by removing sunxi-gpio) but now I am having problems with I2C comms.

I can i2cdetect the panel and it shows up at 0x38 on controller 2.

DMESG output when I insmod

[  706.138545] ===========================ft5x_ts_init=====================
[  706.148416] ctp_fetch_sysconfig_para.
[  706.161557] ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x38, dirty_addr_buf: 0x38. dirty_addr_buf[1]: 0xfffe
[  706.176547] ctp_fetch_sysconfig_para: ctp_twi_id is 2.
[  706.186199] ctp_fetch_sysconfig_para: screen_max_x = 800.
[  706.196487] ctp_fetch_sysconfig_para: screen_max_y = 600.
[  706.206541] ctp_fetch_sysconfig_para: revert_x_flag = 0.
[  706.216507] ctp_fetch_sysconfig_para: revert_y_flag = 0.
[  706.226812] ctp_fetch_sysconfig_para: exchange_x_y_flag = 0.
[  706.240388] ft5x_ts_init: after fetch_sysconfig_para:  normal_i2c: 0x38. normal_i2c[1]: 0xfffe
[  706.254508] ctp_init_platform_resource: tp_reset request gpio fail!
[  706.266442] ctp_init_platform_resource: No power port feature present.
[  706.274645] ctp_wakeup.
[  706.324731] ctp_detect: Detected chip ft5x_ts at adapter 2, address 0x38
[  706.336615] ====ft5x_ts_probe begin=====.
[  706.358247] input: ft5x_ts as /devices/platform/sunxi-i2c.2/i2c-2/2-0038/input/input4
[  706.381663] ctp_set_irq_mode: config gpio to int mode.
[  706.393396] ctp_set_irq_mode, 225: gpio_int_info, port = 8, port_num = 21.
[  706.402558]  INTERRUPT CONFIG
[  706.409780] ==ft5x_ts_probe over =

Please note at this point I simply pulling the reset line high (while i sort out the GPIO problems)

Now the touch panel seems to fire off an interrupt when I touch it but I get a load of errors shown below

[  826.006182] START can't sendout!
[  826.011599] Retrying transmission 2
[  826.017716] START can't sendout!
[  826.023119] Retrying transmission 1
[  826.029062] START can't sendout!
[  826.034465] Retrying transmission 0
[  826.042198] msg ft5x_i2c_rxdata i2c read error: -121
[  826.051993] ft5x_read_data read_data i2c_rxdata failed: -121

After the insmod if I perform an i2cdetect it shows UU at location 0x38 so not sure what is going on.

.fex section as requested

ctp_used                 = 1
ctp_name                 = "ft5x_ts"
ctp_twi_id               = 2
ctp_twi_addr             = 0x38
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:PH21<6><default>
ctp_wakeup               = port:PB13<1><default><default><1>
ctp_reset        = port:PB13<1><default><default><1>
ctp_io_port              = port:PH21<0><default>

Again thanks for your help


Update: touch panel is working, it just seems a bit slow to respond, presumably due to all the I2C errors...........


Good detective work.

As for your errors, does your panel have any pull-ups on the I2C bus?

You should have none as the A10 itself has them. I ran into this the first time and now my board is not fitted with them.


Good thought but no, tried removing pull ups, no difference, loads of errors.

Have just noticed that the data line is only going up to 1V8 though (despite 3V3 pull ups on Olimex).