AnsweredAssumed Answered

FT5316 touchscreen interrupt not firing

Question asked by Dan MacDonald on Sep 26, 2017
Latest reply on Jan 30, 2018 by Dan MacDonald

I'm working on adding the FT5316 touchscreen to my board.

 

I have integrated the touchscreen into the device tree as such:

 

touchscreen_ft5x06_pins: tx28-edt-ft5x06-pins {
fsl,pins = <
MX6QDL_PAD_GPIO_5__GPIO1_IO05 0x0001B0B0
>;

&i2c1 {
   polytouch: edt-ft5x06@38 {
      // reqd params
      compatible = "edt,edt-ft5x06";
      reg = <0x38>;
      interrupt-parent = <&gpio1>;
      interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
    
      // optional params
      pinctrl-names = "default";
      pinctrl-0 = <&touchscreen_ft5x06_pins>; // MX6QDL_PAD_GPIO_5__GPIO1_IO05
   };

 

I can see the device is registered

# cat /proc/bus/input/devices 
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name="EP0790M09"
P: Phys=
S: Sysfs=/devices/soc0/soc.0/2100000.aips-bus/21a0000.i2c/i2c-0/0-0038/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=2608000 3

 

nothing appears on /dev/input/event0, and I am NEVER seeing the interrupt pin go low when I scope it. 

From what I can tell:
In https://www.newhavendisplay.com/app_notes/FT5x16.pdf  pg 13/18, the FT5316 multiplexes the wake/interrupt pin. 

 

I have added prints in the edt-ft53x06.c code to print out what is happening on startup, but I don't see any settings that could affect the functionality of the chip:

 

[    2.235786] edt_ft5x06 0-0038: probing for EDT FT5x06 I2C
[    2.241255] edt_ft5x06_i2c_ts_probe_dt : get pins. irq_pin is not needed for DT setup wake = -2  reset = -2
[    2.251119] edt_ft5x06_ts_reset: called
[    2.254985] edt_ft5x06_ts_identify: called
[    2.259102] ****************************
[    2.263043] edt_ft5x06_ts_readwrite:
   write message
    addr : 0x38
    flags: 0x0
    len  : 0x1
    buf  : 0xBB   // read the version. 0xBB is undocumented
  read message
    addr : 0x38
    flags: 0x1
    len  : 0x16
    buf  : 0xFA, 0x42,
           0x93, 0x4F,
           0x26, 0x0,
           0x0, 0x0,
           0x0, 0x0,
           0x0, 0x0,
           0x0, 0x0,
           0x0, 0x0,
           0x0, 0x0,
           0x0, 0x0,
           0x0, 0x0,
   return = 2
  
[    2.321316] ****************************
[    2.325258] edt_ft5x06_ts_readwrite:
  write message
    addr : 0x38
    flags: 0x0
    len  : 0x1
    buf  :  0xA6,    // read FRMID (see FT6x06 for documentation)
  read message
    addr : 0x38
    flags: 0x1
    len  : 0x2       // not sure why its two bytes. 0xA7 is undocumented
    buf  : 0x6, 0x1,
   return = 2

[    2.356624] ****************************
[    2.360563] edt_ft5x06_ts_readwrite:
  write message
    addr : 0x38
    flags: 0x0
    len  : 0x1
    buf  : 0xA8
  read message
    addr : 0x38
    flags: 0x1
    len  : 0x1
    buf  : 0x79
   return = 2
[    2.390368] edt_ft5x06_ts_set_regs: M09 set register addresses
[    2.396305] edt_ft5x06_ts_get_dt_defaults: called
[    2.401031] edt_ft5x06_ts_get_parameters: called
[    2.405666] ****************************
[    2.409606] edt_ft5x06_ts_readwrite:
  write message
    addr : 0x38
    flags: 0x0
    len  : 0x1
    buf  : 0x80, // read reg_threshold
  read message
    addr : 0x38
    flags: 0x1
    len  : 0x1
    buf  : 0x14,
  return = 2
[    2.439419] ****************************
[    2.443359] edt_ft5x06_ts_readwrite:
[    2.446953]   write message
    addr : 0x38
    flags: 0x0
    len  : 0x1
    buf  : 0x92, // read reg_gain 0x92 (see FT6x06 for documentation)
[    2.459147]   read message
    addr : 0x38
    flags: 0x1
    len  : 0x1
    buf  : 0x30
  return = 2
[    2.473189] ****************************
[    2.477128] edt_ft5x06_ts_readwrite:
  write message
    addr : 0x38
    flags: 0x0
    len  : 0x1
    buf  : 0x93, // read reg_offset 0x93 (see FT6x06 for documentation)
  read message
    addr : 0x38
    flags: 0x1
    len  : 0x1
    buf  : 0x31,
  return = 2
[    2.506924] ****************************
[    2.510863] edt_ft5x06_ts_readwrite:
[    2.514456]   write message
    addr : 0x38
    flags: 0x0
    len  : 0x1
    buf  : 0x0, // read reg_reportrate 0x00 (wrong register, but code doesn't appear to use)
  read message
    addr : 0x38
    flags: 0x1
    len  : 0x1
    buf  : 0x0
  return = 2
[    2.540488] ****************************
[    2.544428] edt_ft5x06_ts_readwrite:
[    2.548022]   write message
    addr : 0x38
    flags: 0x0
    len  : 0x1
    buf  : 0x94,  // read reg_num_x 0x94 (see FT6x06 for documentation)
  read message
    addr : 0x38
    flags: 0x1
    len  : 0x1
    buf  : 0x29    
  return = 2
[    2.574229] ****************************
[    2.578169] edt_ft5x06_ts_readwrite:
  write message
    addr : 0x38
    flags: 0x0
    len  : 0x1
    buf  : 0x95,  // read reg_num_y 0x95 (see FT6x06 for documentation)
  read message
    addr : 0x38
    flags: 0x1
    len  : 0x1
    buf  : 0xC
  return = 2
[    2.607892] edt_ft5x06 0-0038: Model "EP0790M09", Rev. " ", 41x12 sensors (2623x767) noninverted
[    2.617122] input: EP0790M09 as /devices/soc0/soc.0/2100000.aips-bus/21a0000.i2c/i2c-0/0-0038/input/input0
[    2.627183] edt_ft5x06 0-0038: EDT FT5x06 initialized: IRQ 165, WAKE pin -2, Reset pin -2.
[    2.635483] ----------------------------------------
[    2.640487] edt_ft5x06_ts_probe:
[    2.640487]   num_x, num_y = 41 x 12
[    2.640487]   rst/irq/wake pins = -2/-22/-2
[    2.640487]   factory = 0 (T/F)
[    2.640487]   thresh/gain/offs/reportRate = 20/48/49/0
[    2.640487]   name = EP0790M09
[    2.640487]   Register addr:
[    2.640487]     threshold  : 0x80
[    2.640487]     report rate: 0x0
[    2.640487]     gain       : 0x92
[    2.640487]     offset     : 0x93
[    2.640487]     num_x      : 0x94
[    2.640487]     num_y      : 0x95
[    2.640487]   version: 1 (M06 = 0, M09 = 1)
[    2.640487]   invert = 0 (T/F)
[    2.640487]   screen_x = 2623
[    2.640487]   screen_y = 767

 

Aside from the usual undocumented registers, I don't see anything going awry during startup. 

 

Is there anything else I could/should try?

 

Thanks,

Dan

Outcomes