FT5446DQS Focal Tech I2C Touchscreen Driver not working with IMX6Q Custom Board running Android Oreo 8.0.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FT5446DQS Focal Tech I2C Touchscreen Driver not working with IMX6Q Custom Board running Android Oreo 8.0.0

4,749 Views
kyle2
Contributor I

We have a FT5446DQS I2C touchscreen controller and we are using the edt-ft5x06.c driver found in ./vendor/nxp-opensource/kernel_imx/drivers/input/touchscreen/ in the Android 8.0.0 source.

The touchscreen does get probed and shows up in /dev/input/event0. If we cat /dev/input/event0 then we see a string of characters output when we touch the screen, indicating that something is happening in time with our finger presses. We do not see any indication that Android is reacting to these touches.

Our device tree definition of the device is shown below:

&i2c2 {
    clock-frequency = <100000>;
    pinctrl-names = "default", "gpio";
    pinctrl-0 = <&pinctrl_i2c2>;
    pinctrl-1 = <&pinctrl_i2c2_gpio>;
    scl-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
    sda-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
    status = "okay";

    polytouch: edt-ft5x06@38 {
        compatible = "edt,edt-ft5x06";
        reg = <0x38>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_edt_ft5x06>;
        interrupt-parent = <&gpio1>;
        interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
        reset-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>;
        //wake-gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
        wakeup-source;
    };

};

From the datasheet, the reset pin is active low and that the wakeup pin is also the reset pin so the device doesn't actually have a wakeup pin which is why we have commented this line one as shown above.

We get the following logs.

# getevent -il /dev/input/event0                                                 <
add device 1: /dev/input/event0
  bus:      0018
  vendor    0000
  product   0000
  version   0000
  name:     "EP0790M09"
  location: ""
  id:       ""
  version:  1.0.1
  events:
    KEY (0001): BTN_TOUCH            
    ABS (0003): ABS_X                 : value 854, min 0, max -1, fuzz 0, flat 0, resolution 0
                ABS_Y                 : value 321, min 0, max -1, fuzz 0, flat 0, resolution 0
                ABS_MT_SLOT           : value 0, min 0, max 4, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_X     : value 0, min 0, max -1, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_Y     : value 0, min 0, max -1, fuzz 0, flat 0, resolution 0
                ABS_MT_TRACKING_ID    : value 0, min 0, max 65535, fuzz 0, flat 0, resolution 0
  input props:
    INPUT_PROP_DIRECT


# getevent -lp /dev/input/event0                                                 <
add device 1: /dev/input/event0
  name:     "EP0790M09"
  events:
    KEY (0001): BTN_TOUCH            
    ABS (0003): ABS_X                 : value 854, min 0, max -1, fuzz 0, flat 0, resolution 0
                ABS_Y                 : value 321, min 0, max -1, fuzz 0, flat 0, resolution 0
                ABS_MT_SLOT           : value 0, min 0, max 4, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_X     : value 0, min 0, max -1, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_Y     : value 0, min 0, max -1, fuzz 0, flat 0, resolution 0
                ABS_MT_TRACKING_ID    : value 0, min 0, max 65535, fuzz 0, flat 0, resolution 0
  input props:
    INPUT_PROP_DIRECT


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

We have also tried another driver which isn't in the linux kernel version we are using - ft5x06_ts.c. Having seen this post on the community forum.

The device tree definition for this device is below.

&i2c2 {
    clock-frequency = <100000>;
    pinctrl-names = "default", "gpio";
    pinctrl-0 = <&pinctrl_i2c2>;
    pinctrl-1 = <&pinctrl_i2c2_gpio>;
    scl-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
    sda-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
    status = "okay";

    ft5x06_ts@38 {
        compatible = "ft5x06,ft5x06-touch";
        reg = <0x38>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_edt_ft5x06>;
        interrupt-parent = <&gpio1>;
        interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
        //reset-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>;
        wakeup-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>;
    };

};

Instead of defining the pin as a reset pin, we defined it as a wakeup pin.

And the logs for using this driver is below

# getevent -lp /dev/input/event0                          
add device 1: /dev/input/event0
  name:     "ft5x06"
  events:
    KEY (0001): BTN_TOUCH            
    ABS (0003): ABS_X                 : value 0, min 0, max 1023, fuzz 0, flat 0, resolution 0
                ABS_Y                 : value 0, min 0, max 599, fuzz 0, flat 0, resolution 0
                ABS_PRESSURE          : value 0, min 0, max 1, fuzz 0, flat 0, resolution 0
                ABS_MT_SLOT           : value 0, min 0, max 15, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_X     : value 0, min 0, max 1023, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_Y     : value 0, min 0, max 599, fuzz 0, flat 0, resolution 0
                ABS_MT_TRACKING_ID    : value 0, min 0, max 12, fuzz 0, flat 0, resolution 0
  input props:
    <none>

# dmesg | grep -i ft5
[    2.177928] ft5x06-ts 1-0038: reset fffffffe
[    2.181510] ft5x06-ts 1-0038: wakeup d8287990, retry=0
[    2.185355] ft5x06-ts 1-0038: touchscreen irq=88, wakeup_irq=234
[    2.190070] ft5x06 resolution is 1024x600
[    2.193019] input: ft5x06 as /devices/virtual/input/input0

But with this driver when we cat /dev/input/event0, we don't get an output when touching the screen.

We need some help to get our touchscreen interacting with Android Oreo as it still doesn't seem to do anything.

Can somebody tell use what we are doing wrong? Do we need an .idc file or is there something else we are missing? We think we are quite close since we can interact with the screen and see some text characters through /dev/input/event0 but we think we are missing an important android piece.

0 Kudos
1 Reply

3,386 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Unfortunately, this problem is more related about how to communicate the Linux I2C driver with the Touch Screen Panel that you are using. For that reason, we cannot provide support, since we do not have the way to test it. I highly recommend you to go directly with Focal Tech support page, they could help your touchscreen panel problem. I apologize for the inconveniences this could give you.

Best Regards,

Diego.

0 Kudos