This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Am335x EVM problem with FT5x06 capacitive tochscreen

Other Parts Discussed in Thread: TPS65217

Hi,

I have connected FT5x06 7" capacitive touch screen on I2C0 of AM335x EVM and connected

GPIO1_21 -> INT

GPIO1_22 -> RST

Have modified my dts as :




edt_ft5406_ts_pins: edt_ft5406_ts_pins { pinctrl-single,pins = < 0x54 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_22 */ 0x58 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_a6.gpio1_21 */ >; }; &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; status = "okay"; clock-frequency = <400000>; tps: tps@2d { reg = <0x2d>; }; edt-ft5406@38 { status = "okay"; compatible = "edt,edt-ft5406", "edt,edt-ft5x06"; pinctrl-names = "default"; pinctrl-0 = <&edt_ft5406_ts_pins>; reg = <0x38>; interrupt-parent = <&gpio1>; interrupts = <21 1>; reset-gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>; touchscreen-size-x = <800>; touchscreen-size-y = <480>; }; };

My problem is touch is not getting detected when I touch the screen. I looked inside /proc/interrupts when I touch the screen the edt-ft5x06 interrupt count doesn't increases.

That means interrupts are either not being generated by ft5x06 or not being detected by s/w driver.

I then wrote a simple driver and installed IRQ on GPIO1_21. Whenever I touch the screen, ISR is getting invoked.

That means edt-ft5x06 driver is not getting the interrupts.

How can I fix my issue ?

thanks

Ankur

  • Hi,

    Do you have a driver for this TS controller? Is it loaded?

  • Hi,

    Yes, I am using edt-ft5x06 driver available in kernel 3.14.43 and it is loaded.

    regards

    Ankur

  • Hi,

    I am managed to get the driver working. Problem was with RESET signal, it was inverted.

    Now, I am struggling to get the touch events detected in matrix-gui.

    When card boots-up, matrix-gui is launched but when I touch on icons nothing happens.

    I can see touch screen is identified and touch events are reported:

    root@am335x-evm:~# cat /proc/bus/input/devices
    I: Bus=0019 Vendor=0000 Product=0000 Version=0000
    N: Name="ST LIS3LV02DL Accelerometer"
    P: Phys=lis3lv02d/input0
    S: Sysfs=/devices/platform/lis3lv02d/input/input0
    U: Uniq=
    H: Handlers=js0 event0
    B: PROP=0
    B: EV=9
    B: ABS=7

    I: Bus=0018 Vendor=0000 Product=0000 Version=0000
    N: Name="EP0790M09"
    P: Phys=
    S: Sysfs=/devices/ocp/44e0b000.i2c/i2c-0/0-0038/input/input1
    U: Uniq=
    H: Handlers=mouse0 event1
    B: PROP=0
    B: EV=b
    B: KEY=400 0 0 0 0 0 0 0 0 0 0
    B: ABS=2608000 3

    root@am335x-evm:~# evtest /dev/input/event1
    Input driver version is 1.0.1
    Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
    Input device name: "EP0790M09"
    Supported events:
    Event type 0 (Sync)
    Event type 1 (Key)
    Event code 330 (Touch)
    Event type 3 (Absolute)
    Event code 0 (X)
    Value 18
    Min 0
    Max 1023
    Event code 1 (Y)
    Value 8
    Min 0
    Max 3775
    Event code 47 (?)
    Value 0
    Min 0
    Max 4
    Event code 53 (Position X)
    Value 0
    Min 0
    Max 1023
    Event code 54 (Position Y)
    Value 0
    Min 0
    Max 3775
    Event code 57 (Tracking ID)
    Value 0
    Min 0
    Max 65535
    Testing ... (interrupt to exit)
    Event: time 1435635038.206911, type 3 (Absolute), code 57 (Tracking ID), value 315
    Event: time 1435635038.206911, type 3 (Absolute), code 53 (Position X), value 51
    Event: time 1435635038.206911, type 3 (Absolute), code 54 (Position Y), value 35
    Event: time 1435635038.206911, type 1 (Key), code 330 (Touch), value 1
    Event: time 1435635038.206911, type 3 (Absolute), code 0 (X), value 51
    Event: time 1435635038.206911, type 3 (Absolute), code 1 (Y), value 35
    Event: time 1435635038.206911, -------------- Report Sync ------------
    Event: time 1435635038.279511, type 3 (Absolute), code 57 (Tracking ID), value -1
    Event: time 1435635038.279511, type 1 (Key), code 330 (Touch), value 0
    Event: time 1435635038.279511, -------------- Report Sync ------------
    Event: time 1435635038.772828, type 3 (Absolute), code 57 (Tracking ID), value 316
    Event: time 1435635038.772828, type 3 (Absolute), code 53 (Position X), value 262
    Event: time 1435635038.772828, type 3 (Absolute), code 54 (Position Y), value 346
    Event: time 1435635038.772828, type 1 (Key), code 330 (Touch), value 1
    Event: time 1435635038.772828, type 3 (Absolute), code 0 (X), value 262
    Event: time 1435635038.772828, type 3 (Absolute), code 1 (Y), value 346
    Event: time 1435635038.772828, -------------- Report Sync ------------
    Event: time 1435635038.879432, type 3 (Absolute), code 57 (Tracking ID), value -1
    Event: time 1435635038.879432, type 1 (Key), code 330 (Touch), value 0
    Event: time 1435635038.879432, -------------- Report Sync ------------


    root@am335x-evm:~# ts_calibrate
    xres = 800, yres = 480
    Took 1 samples...
    Top left : X = 48 Y = 48
    Took 3 samples...
    Top right : X = 67 Y = 725
    Took 2 samples...
    Bot right : X = 438 Y = 745
    Took 2 samples...
    Bot left : X = 442 Y = 50
    Took 4 samples...
    Center : X = 243 Y = 406
    4.195312 -0.028119 1.020179
    -1.644714 0.992664 -0.010484
    Calibration constants: 274944 -1842 66858 -107788 65055 -687 65536

    thanks
    Ankur
  • I think the issue here may be that the Marix GUI is expecting TS events from a different source. However I'm not a SW expert so I can't help on this. Perhaps this wiki can help: http://processors.wiki.ti.com/index.php/Matrix_Users_Guide

  • But from SW perspective, "/dev/input/touchscreen0" is still same. Only the low level HW and SW has changed but user space application still see the same.

    Thanks for the wiki but I couldn't find anything useful.

    Can you please forward this query to someone who can help me.

    thanks
    Ankur
  • Thanks Biser.

    To give some more info, when I run "ts_test", then I am able to draw and cursor follows my touch.
    So "tslib" is working fine.

    But when I launch matrix-gui, it doesn't detect the right co-ordinates for my touch.

    regards
    Ankur
  • Ankur,

    Does the ts_calibrate script pass? It seems as if your touch screen is not calibrated.

    Best Regards,
    Yordan
  • Hi Yordan,

    ts_calibrate script passes and as I mentioned, ts_test also works fine (I can draw and cursor follows my touch correctly).

    To identify issue, I did some trials and here are my findings :

    1) When QT5 based app works with evdev(default),  it is not detecting the full screen. I run QT5 fingerpaint example app and when I start touching screen from top-left corner , a small rectangle in top-left is drawn instead of a full screen size on.

    2) When QT5 based app works with tslib(-plugin tslib),  it is detecting the full screen but detects touch as mouse input. I run QT5 fingerpaint example app and when I start touching screen from top-left corner , cursor follows my touch all across the screen but no rectangle is drawn.

    For sure, evdev is not calibrated but tslib is calibrated. How can get evdev calibrated so that Qt5 works ?

    I am using tisdk from meta-arago with "x11, wayland" disabled.

    thanks

    Ankur

  • Here are the logs from evtest when I touch the corner from
    1) top-left
    2) bottom-left
    3) bottom-right
    4) top-right

    root@am335x-evm:~# evtest /dev/input/event0
    Input driver version is 1.0.1
    Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
    Input device name: "EP0790M09"
    Supported events:
    Event type 0 (Sync)
    Event type 1 (Key)
    Event code 330 (Touch)
    Event type 3 (Absolute)
    Event code 0 (X)
    Value 12
    Min 0
    Max 1791
    Event code 1 (Y)
    Value 790
    Min 0
    Max 4031
    Event code 47 (?)
    Value 0
    Min 0
    Max 4
    Event code 53 (Position X)
    Value 0
    Min 0
    Max 1791
    Event code 54 (Position Y)
    Value 0
    Min 0
    Max 4031
    Event code 57 (Tracking ID)
    Value 0
    Min 0
    Max 65535
    Testing ... (interrupt to exit)
    Event: time 1435792831.637202, type 3 (Absolute), code 57 (Tracking ID), value 86
    Event: time 1435792831.637202, type 3 (Absolute), code 53 (Position X), value 13
    Event: time 1435792831.637202, type 3 (Absolute), code 54 (Position Y), value 12
    Event: time 1435792831.637202, type 1 (Key), code 330 (Touch), value 1
    Event: time 1435792831.637202, type 3 (Absolute), code 0 (X), value 13
    Event: time 1435792831.637202, type 3 (Absolute), code 1 (Y), value 12
    Event: time 1435792831.637202, -------------- Report Sync ------------
    Event: time 1435792831.780681, type 3 (Absolute), code 57 (Tracking ID), value -1
    Event: time 1435792831.780681, type 1 (Key), code 330 (Touch), value 0
    Event: time 1435792831.780681, -------------- Report Sync ------------
    Event: time 1435792834.918044, type 3 (Absolute), code 57 (Tracking ID), value 87
    Event: time 1435792834.918044, type 3 (Absolute), code 53 (Position X), value 475
    Event: time 1435792834.918044, type 3 (Absolute), code 54 (Position Y), value 9
    Event: time 1435792834.918044, type 1 (Key), code 330 (Touch), value 1
    Event: time 1435792834.918044, type 3 (Absolute), code 0 (X), value 475
    Event: time 1435792834.918044, type 3 (Absolute), code 1 (Y), value 9
    Event: time 1435792834.918044, -------------- Report Sync ------------
    Event: time 1435792834.937407, type 3 (Absolute), code 53 (Position X), value 474
    Event: time 1435792834.937407, type 3 (Absolute), code 0 (X), value 474
    Event: time 1435792834.937407, -------------- Report Sync ------------
    Event: time 1435792835.080203, type 3 (Absolute), code 57 (Tracking ID), value -1
    Event: time 1435792835.080203, type 1 (Key), code 330 (Touch), value 0
    Event: time 1435792835.080203, -------------- Report Sync ------------
    Event: time 1435792837.387133, type 3 (Absolute), code 57 (Tracking ID), value 88
    Event: time 1435792837.387133, type 3 (Absolute), code 53 (Position X), value 472
    Event: time 1435792837.387133, type 3 (Absolute), code 54 (Position Y), value 791
    Event: time 1435792837.387133, type 1 (Key), code 330 (Touch), value 1
    Event: time 1435792837.387133, type 3 (Absolute), code 0 (X), value 472
    Event: time 1435792837.387133, type 3 (Absolute), code 1 (Y), value 791
    Event: time 1435792837.387133, -------------- Report Sync ------------
    Event: time 1435792837.492448, type 3 (Absolute), code 54 (Position Y), value 790
    Event: time 1435792837.492448, type 3 (Absolute), code 1 (Y), value 790
    Event: time 1435792837.492448, -------------- Report Sync ------------
    Event: time 1435792837.529593, type 3 (Absolute), code 57 (Tracking ID), value -1
    Event: time 1435792837.529593, type 1 (Key), code 330 (Touch), value 0
    Event: time 1435792837.529593, -------------- Report Sync ------------
    Event: time 1435792839.910760, type 3 (Absolute), code 57 (Tracking ID), value 89
    Event: time 1435792839.910760, type 3 (Absolute), code 53 (Position X), value 13
    Event: time 1435792839.910760, type 1 (Key), code 330 (Touch), value 1
    Event: time 1435792839.910760, type 3 (Absolute), code 0 (X), value 13
    Event: time 1435792839.910760, -------------- Report Sync ------------
    Event: time 1435792840.033680, type 3 (Absolute), code 57 (Tracking ID), value -1
    Event: time 1435792840.033680, type 1 (Key), code 330 (Touch), value 0
    Event: time 1435792840.033680, -------------- Report Sync ------------
  • I want to understand if QT5 works with tslib, then why doesn't it work with evdev ?
    I am using FT5x06 7" capacitive touch screen.

    regards
    Ankur
  • Hi, Ankur,

    What do you mean with RESET signal was inverted?

    I have the same problem. The I2C answer´s perfectly (typing "i2cdetect -r 0") and the oscilloscope detect´s the signal when I touch. Typing "cat /proc/interrupts", I can see the interrupt (1 44e07000.gpio 9 edt-ft5306). Typing "cat /proc/bus/input/devices", I can see the event configured. But when I run the evtest, It´s don´t get the event when I touch.

    My code is:

    edt-ft5306@38 {
    		status = "okay";
    		compatible = "edt,edt-ft5306", "edt,edt-ft5x06";
    		pinctrl-names = "default";
    		pinctrl-0 = <&edt_ft5306_ts_pins>;
    		
    		reg = <0x38>;
    		interrupt-parent = <&gpio0>;
    		/* interrupts = <9 0>; */ 
    		interrupts = <9 8>;  /*8 = IRQ_TYPE_LEVEL_LOW*/
    		
    		touchscreen-size-x = <800>;
    		touchscreen-size-y = <480>;
    	};
    
    edt_ft5306_ts_pins: edt_ft5306_ts_pins {
    		pinctrl-single,pins = <
    			0x164 (PIN_INPUT | MUX_MODE7)   /* ECAP0_IN_PWM0_OUT.gpio0_7 */ 
    		>;
    	};

    My last change, I configured the interrupt as 8 - IRQ_TYPE_LEVEL_LOW. The difference was that count 1 in the interrupt, but when I touch, it´s not increment.

    Any idea?

  • - Where is the reset/wakeup pin configuration ?

    - Why interrupt is not configured for edge triggering ?

    Refer to ft5x06 DT bindings http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

    cheers

  • Hi, Ankur,

    By definition, reset/wakeup is optional, right?

    But I tried to implement and I got more confused. It didn´t work. In dmesg, I got the message "touchscreen probe failed".

    I´m using the FT5206 touch in a custom board. I tested all GPIO´s manually in /sys/class/gpio and the GPIO´s it´s OK.

    About interrupt, I tried a lot of configurations according to irq.h:

    #define IRQ_TYPE_NONE 0
    #define IRQ_TYPE_EDGE_RISING 1
    #define IRQ_TYPE_EDGE_FALLING 2
    #define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
    #define IRQ_TYPE_LEVEL_HIGH 4
    #define IRQ_TYPE_LEVEL_LOW 8

    I´ll get the driver source to study some way to debug this problem...

    Thank´s.

  • No, they are not optional. You have to specify either one for  edt_ft5x06_ts_reset() to pass.

    Probably that's why your probe is failing as device is not coming out from reset.

  • Hi Ankur,

    I am also facing the same issue even if i define my interrupt it is not showing in cat /pro/interrupts. Please find my code and suggest me if there any wrong.

    In hardware we connected INTERRUPT pin to Processor INPUT and WAKEUP pin is pulled up with supply.

    -------------------------------------------------------------------------

    edt_ft5x06_pins: edt_ft5x06_pins {

                    pinctrl-single,pins = <

                    0x194 (PIN_INPUT | MUX_MODE7) /*INTERRUPT GP3_15 */

                    0x168 (PIN_OUTPUT_PULLUP | MUX_MODE7) /*WAKEUP PULL UP WITH SUPPLY GP1_8 */

                    >;

    };

    i2c0: i2c@44e0b000 {

                    pinctrl-names = "default";

                    pinctrl-0 = <&i2c0_pins>;

                    status = "okay";

                    clock-frequency = <400000>;

                    tps: tps@2d {

                                    reg = <0x2d>;

                    };

                    edt-ft5x06@38 {

                                    compatible = "edt,edt-ft5x06";

                                    reg = <0x38>;

                                    pinctrl-names = "default";

                                    pinctrl-0 = <&edt_ft5x06_pins>;

                                    interrupt-parent = <&gpio3>;

                                    interrupts = <15 1>;

                                    reset-gpios = <&gpio1 8 1>;

                                    wake-gpios = <&gpio1 8 0>;

                                    touchscreen-size-x = <800>;

                                    touchscreen-size-y = <480>;

                    };

    };

    -------------------------------------------------------------------------

    While loading the kernel the below error is giving to find the platform fields. any new fields are required to define in my dts file. Also could you share the edt-ft5x06.c source for my reference to link my drivers.

    [    1.971593] edt_ft5x06 0-0038: no platform data?

    [    1.976472] edt_ft5x06: probe of 0-0038 failed with error -22

    Regards,

    Anil

  • Hi Anil,

    I would suggest to probe the reset/wake-up line and interrupt line to see whether TSC is coming out of reset or not.

    interrupt will be generated once it is out of reset. So when you touch the screen, you should be able to see activity on interrupt line.

    Which kernel version are you using ?

    Driver http://lxr.free-electrons.com/source/drivers/input/touchscreen/edt-ft5x06.c

    Device tree http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt

    cheers

  • Hi Ankur,

    Thanks, my issue got resolved. .

    Due to my latest Linux 4.0 driver used it start working.

    Regards,

    Anil

     

  • Hi, Anil,

    You configured the reset and wake in the same GPIO. Is it works without change the driver?

    I tried it and I have the error:

    edt_ft5x06 0-0038: Failed to request GPIO 110 as reset pin, error -16

  • Hi Renato,

    I am using only INTR pin that as a input to me and there is no RST for me. WAKE signal is connected with hardware pullup with supply not connected to processor output.

    You can the below in dts file is enough:

    edt-ft5x06@38 {

    compatible = "edt,edt-ft5x06";
    reg = <0x38>;
    pinctrl-names = "default";
    pinctrl-0 = <&edt_ft5x06_pins>;
    interrupt-parent = <&gpio3>;
    interrupts = <15 0>;
    touchscreen-size-x = <800>;
    touchscreen-size-y = <480>;
    };

    Thanks
    Anil
  • Anil,

    Now I understand. Ankur said it´s not optional but if it´s pullup, then it´s works. In my case, it´s connected in GPIO pullup.

    Do you see count increases in /proc/interrupts when you touch?

    Here, I can probe the INT, but not generate interrupts in the Linux.
  • Hi, Anil,

    I think I discovered the problem.
    I tested in a BBB and I got some problems with interference in INT GPIO.
    In my custom board, something is missing to configure the GPIO correctly. As I´m using a GPIO out of cape, I need configure something else.
  • I found the problem. The interrupts need being the same of GPIO. I was set "9", but the correct is "7".

    I calibrated and the position was ok, but I can´t "click" in anywhere.

    Does anybody need more any change to work correctly?

  • Hi Renato,

    I am also having the same problem with my FT5x06 driver. My touch device is generating the interrupt i have checked by probing externally using oscilloscope. 

    I cant see my interrupt name inside /proc/interrupt ? wat i m missing

    Can u please help me , how to solve this issue

    Here is my full code,

    /dts-v1/;
    /plugin/;
    / {
            compatible = "ti,beaglebone", "ti,beaglebone-black";
    
            part-number = "BB-I2C1";
            version = "00A0";
    
            exclusive-use =
                    /* the pin header uses */
                    "P9.18",        /* i2c1_sda */
                    "P9.17",        /* i2c1_scl */
                    "P9.25",         /*interrupt, def state mcasp0_ahclkx    , change to input pin gpio3_21*/
                    "P9.21",         /*wake up from host am33  to slave ft5x"
                    /* the hardware ip uses */
                    "i2c1";
    
            fragment@0 {
                    target = <&am33xx_pinmux>;
                    __overlay__
                       {
                         bb_i2c1_pins: pinmux_bb_i2c1_pins
                        {
                            pinctrl-single,pins = <
                            0x158 0x72      /* i2c1_sda*/
                            0x15c 0x72      /* i2c1_scl */
                            >;
                        };
                        edt_ft5x06_pins:edt_ft5x06_pins
                        {
                         pinctrl-single,pins =<
                         0x1AC 0x37 /* pin interrupt P9.25 mode7 as gpio, enable input, enable input pullup*/
                         0x154 0x17 /* wake up pin control to slave from host: pullup,mode7 p9.21,gpio0_3 */
                         >;
                        };
                     };
                    };
    
    
            fragment@1 {
                    target = <&i2c1>;       /* i2c1 is numbered correctly */
                    __overlay__
                         {
                            status = "okay";
                            pinctrl-names = "default";
                            pinctrl-0 = <&bb_i2c1_pins>;
                            clock-frequency = <400000>;
                            #address-cells = <1>;
                            #size-cells = <0>;
    
    
                            edt-ft5x06@38
                            {
                            compatible = "edt,edt-ft5306","edt,edt-ft5x06";
                            pinctrl-names="default";
                            pinctrl-0=<&edt_ft5x06_pins>;
                            reg = <0x38>;
                            interrupt-parent = <&gpio3>;
                            interrupts = <21 2>; //IRQ_TYPE_EDGE_FALLING 2 as per irq.h
                            wake-gpios = <&gpio0 3 0>; //wake up pin, here i dont knwo wat is 3rd parameter, i m new to this dts 
                            touchscreen-size-x = <320>;
                            touchscreen-size-y = <240>;
                            };
                         };
                      };
    };

  • Hi, rajarajan,

    Did you look dmesg?

    Look for some problem´s in the irq interrupt or some problem with GPIO conflict´s. Post here if you found it. Post your /proc/interrupt too.

  • Hi Renato,

    Thanks you so much for ur response, I m beginner in embedded linux. I have checked dmesg, only I2C1 overlay is mapped. There is no details about FT5x06 drivers and interrupts.  I have changed part number to "BB-BONE-TOUCH" , just for testing, remaining dts code is same as my last post.

    root@beaglebone:~# echo BB-BONE-TOUCH >/sys/devices/bone_capemgr.9/slots
    root@beaglebone:~# cat /sys/devices/bone_capemgr.9/slots
    0: 54:PF---
    1: 55:PF---
    2: 56:PF---
    3: 57:PF---
    4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
    7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-BONE-LCD3-01
    8: ff:P-O-L Override Board Name,00A0,Override Manuf,pin_test_P_30
    9: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-BONE-TOUCH

    Dmesg:


    [ 22.205597] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready 
    [ 91.763802] bone-capemgr bone_capemgr.9: part_number 'BB-BONE-TOUCH', version 'N/A'
    [ 91.763988] bone-capemgr bone_capemgr.9: slot #9: generic override
    [ 91.764039] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 9
    [ 91.764090] bone-capemgr bone_capemgr.9: slot #9: 'Override Board Name,00A0,Override Manuf,BB-BONE-TOUCH'
    [ 91.764386] bone-capemgr bone_capemgr.9: slot #9: Requesting part number/version based 'BB-BONE-TOUCH-00A0.dtbo
    [ 91.764439] bone-capemgr bone_capemgr.9: slot #9: Requesting firmware 'BB-BONE-TOUCH-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
    [ 91.769211] bone-capemgr bone_capemgr.9: slot #9: dtbo 'BB-BONE-TOUCH-00A0.dtbo' loaded; converting to live tree
    [ 91.772236] bone-capemgr bone_capemgr.9: slot #9: #2 overlays
    [ 91.784589] omap_i2c 4802a000.i2c: bus 2 rev0.11 at 400 kHz
    [ 91.824771] omap_i2c 4802a000.i2c: unable to select pin group
    [ 91.825088] bone-capemgr bone_capemgr.9: slot #9: Applied #2 overlays.

    I dont have idea why "[ 91.824771] omap_i2c 4802a000.i2c: unable to select pin group" this message is coming.

    cat /proc/interrupts


    root@beaglebone:~# cat /proc/interrupts
    CPU0
    7: 1 INTC tps65217
    12: 4570 INTC edma
    14: 0 INTC edma_error
    16: 0 INTC tsc, tiadc
    18: 32780 INTC musb-hdrc.0.auto
    19: 1 INTC musb-hdrc.1.auto
    28: 14414 INTC mmc1
    30: 96 INTC 4819c000.i2c
    36: 0 INTC tilcdc
    40: 0 INTC 4a100000.ethernet
    41: 0 INTC 4a100000.ethernet
    42: 0 INTC 4a100000.ethernet
    43: 0 INTC 4a100000.ethernet
    64: 0 INTC mmc0
    67: 21568 INTC gp_timer
    70: 1499 INTC 44e0b000.i2c
    71: 0 INTC 4802a000.i2c
    72: 192 INTC OMAP UART0
    75: 0 INTC rtc0
    76: 1 INTC rtc0
    109: 0 INTC 53100000.sham
    134: 0 GPIO mmc0
    135: 0 GPIO enter
    176: 0 GPIO left
    177: 0 GPIO right
    188: 1 GPIO down
    243: 1 GPIO up
    IPI0: 0 CPU wakeup interrupts
    IPI1: 0 Timer broadcast interrupts
    IPI2: 0 Rescheduling interrupts
    IPI3: 0 Function call interrupts
    IPI4: 0 Single function call interrupts
    IPI5: 0 CPU stop interrupts
    Err: 0

    Can you please help me to solve this issue....

    Is my dts code is correct ?

    Is the edt-ft5x06.ko drive file will be installed automatically ? 

    How dtb file echo will link driver ? Because i m not finding any message related to ft5x06 in dmesg?

    Is there any other way to debug it?

    I have checked my pins mux , the wake up and interrupt pins are not used by any other modules.

  • Few more points:
    I2C pins are mapped properly and i can able to access Ft5x06 device through i2c smbs read/write command.
    But interrupts and wake up pins status are not changed to input and output pins. it was in there default state only, during boot time how it is ,the same state.
  • What´s your Linux? I´m using Ubuntu. In Ubuntu, the driver is built-in.
    Typing:
    - cat /lib/modules/3.14.41-ti-r63/modules.builtin
    Change the 3.14.41-ti-r63 for your kernel version.
    You will see all driver´s built-in in the kernel. In my case, I have edt-ft5x06.ko.
    If you don´t have a built-in driver, then you need starter it typing:
    - modprobe edt-ft5x06

    Try a I2C communication typing:
    - i2cdetect -r 1
    In my case, I see:
    0 1 2 3 4 5 6 7 8 9 a b c d e f
    00: -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    The "UU" means It have communication in 0x24 and 0x38.


    Dtb will link driver automatically. No message will be related in dmesg. Just if ocurred any error.

    One way to debug if the INT is linked with your GPIO is export your GPIO and read while you touch. This works if your GPIO not linked with interrupt.

    About your dts, I have no experience in it. I change my dtb directly.
  • Hi Reneto,

    Please use the below code and add in your dts file. Wake up pin is not required it is pull-up with resistor right?

    edt-ft5x06@38

    {
    compatible = "edt,edt-ft5306","edt,edt-ft5x06";
    pinctrl-names="default";
    pinctrl-0=<&edt_ft5x06_pins>;
    reg = <0x38>;
    interrupt-parent = <&gpio3>;
    interrupts = <21 0>;
    touchscreen-size-x = <320>;
    touchscreen-size-y = <240>;
    };

    Check your interrupt status 'cat /proc/interrupt, if it is not showing you might have used this GPIO (gpio3_21) in your kernel or some where.

    Check is there any gpio is used in gpio3-21that mean = 117. cat /sys/class/gpio/gpio117

    What is your platform is it EVM or customized board and which version of kernel sdk7 or 8.

    Regards,

    Anil 

  • Hi Renato and Anil

    Thank u so much for your valuable response,

    I am using beaglebone black REVC. I have added my own cape which has FT5x06 touch controller connected through I2C. Linux details are as follows,

    Linux version 3.8.13-bone47 (root@imx6q-wandboard-2gb-0) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Fri Apr 11 01:36:09 UTC 2014.

    Hi Anil, As u suggested I have added your dts code and compiled and echoed to slots. There is no interrupts related to ft5x06 and gpio3_21. Please check below,

    root@beaglebone:~# cat /proc/interrupts
    CPU0
    7: 1 INTC tps65217
    12: 4565 INTC edma
    14: 0 INTC edma_error
    16: 0 INTC tsc, tiadc
    18: 33633 INTC musb-hdrc.0.auto
    19: 1 INTC musb-hdrc.1.auto
    28: 14415 INTC mmc1
    30: 96 INTC 4819c000.i2c
    36: 0 INTC tilcdc
    40: 0 INTC 4a100000.ethernet
    41: 0 INTC 4a100000.ethernet
    42: 0 INTC 4a100000.ethernet
    43: 0 INTC 4a100000.ethernet
    64: 0 INTC mmc0
    67: 15058 INTC gp_timer
    70: 1561 INTC 44e0b000.i2c
    71: 0 INTC 4802a000.i2c
    72: 192 INTC OMAP UART0
    75: 0 INTC rtc0
    76: 1 INTC rtc0
    109: 0 INTC 53100000.sham
    134: 0 GPIO mmc0
    135: 0 GPIO enter
    176: 0 GPIO left
    177: 0 GPIO right
    188: 1 GPIO down
    243: 1 GPIO up
    IPI0: 0 CPU wakeup interrupts
    IPI1: 0 Timer broadcast interrupts
    IPI2: 0 Rescheduling interrupts
    IPI3: 0 Function call interrupts
    IPI4: 0 Single function call interrupts
    IPI5: 0 CPU stop interrupts
    Err: 0

    I can see only my i2c got mapped properly, 

    root@beaglebone:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups
    registered pin groups:
    group: pinmux_userled_pins
    pin 21 (44e10854)
    pin 22 (44e10858)
    pin 23 (44e1085c)
    pin 24 (44e10860)

    group: pinmux_rstctl_pins
    pin 20 (44e10850)

    group: pinmux_i2c0_pins
    pin 98 (44e10988)
    pin 99 (44e1098c)

    group: pinmux_i2c2_pins
    pin 94 (44e10978)
    pin 95 (44e1097c)

    group: pinmux_mmc1_pins
    pin 88 (44e10960)

    group: pinmux_emmc2_pins
    pin 32 (44e10880)
    pin 33 (44e10884)
    pin 0 (44e10800)
    pin 1 (44e10804)
    pin 2 (44e10808)
    pin 3 (44e1080c)
    pin 4 (44e10810)
    pin 5 (44e10814)
    pin 6 (44e10818)
    pin 7 (44e1081c)

    group: pinmux_userled_pins
    pin 21 (44e10854)
    pin 22 (44e10858)
    pin 23 (44e1085c)
    pin 24 (44e10860)

    group: pinmux_bone_lcd3_cape_led_00A0_pins
    pin 18 (44e10848)
    pin 19 (44e1084c)

    group: pinmux_bone_lcd3_cape_lcd_pins
    pin 40 (44e108a0)
    pin 41 (44e108a4)
    pin 42 (44e108a8)
    pin 43 (44e108ac)
    pin 44 (44e108b0)
    pin 45 (44e108b4)
    pin 46 (44e108b8)
    pin 47 (44e108bc)
    pin 48 (44e108c0)
    pin 49 (44e108c4)
    pin 50 (44e108c8)
    pin 51 (44e108cc)
    pin 52 (44e108d0)
    pin 53 (44e108d4)
    pin 54 (44e108d8)
    pin 55 (44e108dc)
    pin 56 (44e108e0)
    pin 57 (44e108e4)
    pin 58 (44e108e8)
    pin 59 (44e108ec)

    group: pinmux_bone_lcd3_cape_keys_00A0_pins
    pin 16 (44e10840)
    pin 17 (44e10844)
    pin 105 (44e109a4)
    pin 30 (44e10878)
    pin 89 (44e10964)

    group: pinctrl_test_7_pins
    pin 102 (44e10998)

    group: pinmux_bb_i2c1_pins
    pin 86 (44e10958)
    pin 87 (44e1095c)

    Above results shows that my interrupts pin (GPIO3_21- address 0x44e10954 - IO pin 117) not mapped with any other modules.

    >> I have checked the GPIO3_21 addrees 0x...954 state by using pinmux command. The state of GPIO3_21 is not changed to input (dts mapping we mapped pin state as 0x17).

    root@beaglebone:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | grep "954"
    pin 85 (44e10954) 00000037 pinctrl-single

    >> If i checked above pingroup result, i can see I2c1 pins are properly grouped together (group: pinmux_bb_i2c1_pins).

    >> ft5x06 structure pins are not mapped, is it problem with my driver is not present on board? because i have checked default driver on board as Renato suggested "root@beaglebone:/lib/modules/3.8.13-bone47# cat modules.builtin". There is no builtin driver for ft5x06 under modules.builtin. 

    But edt_ft5x06.ko file present inside "/lib/modules/3.8.13-bone47/kernel/drivers/input/touchscreen/". So i have installed by modprob command, after this i can see edt_ft5x06 module name inside "cat /proc/modules".

    >> I have tried by first installling ft5x06 module into kernel then installing my touch dtb file, but it does not helped. I cant able to see my GPIO3_21 as interrupts inside proc/interrupts.

    >> What I am missing,? Which is wrong? Please suggest me

    >> I have checked I2C1 with ft5x06 touch controller IC by using i2c tool commands. I got response from address 0x38 when i sent i2cdetect -r 2

    root@beaglebone:/lib# i2cdetect -r 2
    WARNING! This program can confuse your I2C bus, cause data loss and worse!
    I will probe file /dev/i2c-2 using read byte commands.
    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: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- -- --
    40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    >> I have checked my GPIO pins separately by using gpio export options , i can able to control the pins. And i can able to detect input changes by using "cat /sys/class/gpio/gpio117/value". When i touched i can see this pin value is changed to low.

    >> When we load dtb file by using echo command, i can see only i2c related messages inside dmesg. Why there is no message or log related to ft5x06 ?

    It wont appear ? then how we can figure out driver is loaded or enabled 

    Please help me to solve this issue, what i m doing wrong?

  • Hi,

    Please send your dmesg log and also please execute "lsmod" and share the modules log.

    Regards
    Anil
  • Hi, anil,

    Your touchscreen is work perfectly?

    In my board, it don´t get touch event. Just one time in first touch. The position and mouse cursor works perfectly, including multi touch. I try click something and after some 30 attempts I see the touch event.

    I´m using evtest to see the event´s. Do you have any idea what´s happened?

    Following the evtest log:

    Input driver version is 1.0.1
    Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
    Input device name: "EP0790M09"
    Supported events:
    Event type 0 (Sync)
    Event type 1 (Key)
    Event code 330 (Touch)
    Event type 3 (Absolute)
    Event code 0 (X)
    Value 0
    Min 0
    Max 4671
    Event code 1 (Y)
    Value 0
    Min 0
    Max 15807
    Event code 47 (?)
    Value 0
    Min 0
    Max 4
    Event code 53 (?)
    Value 0
    Min 0
    Max 4671
    Event code 54 (?)
    Value 0
    Min 0
    Max 15807
    Event code 57 (?)
    Value 0
    Min 0
    Max 65535
    Testing ... (interrupt to exit)
    Event: time 1444884054.010687, type 3 (Absolute), code 57 (?), value 0
    Event: time 1444884054.010687, type 3 (Absolute), code 53 (?), value 580
    Event: time 1444884054.010687, type 3 (Absolute), code 54 (?), value 290
    Event: time 1444884054.010687, type 1 (Key), code 330 (Touch), value 1
    Event: time 1444884054.010687, type 3 (Absolute), code 0 (X), value 580
    Event: time 1444884054.010687, type 3 (Absolute), code 1 (Y), value 290
    Event: time 1444884054.010687, -------------- Report Sync ------------
    Event: time 1444884055.826783, type 3 (Absolute), code 53 (?), value 222
    Event: time 1444884055.826783, type 3 (Absolute), code 54 (?), value 291
    Event: time 1444884055.826783, type 3 (Absolute), code 0 (X), value 222
    Event: time 1444884055.826783, type 3 (Absolute), code 1 (Y), value 291
    Event: time 1444884055.826783, -------------- Report Sync ------------
    Event: time 1444884056.787873, type 3 (Absolute), code 53 (?), value 357
    Event: time 1444884056.787873, type 3 (Absolute), code 54 (?), value 237
    Event: time 1444884056.787873, type 3 (Absolute), code 0 (X), value 357
    Event: time 1444884056.787873, type 3 (Absolute), code 1 (Y), value 237
    Event: time 1444884056.787873, -------------- Report Sync ------------
    Event: time 1444884057.643595, type 3 (Absolute), code 53 (?), value 455
    Event: time 1444884057.643595, type 3 (Absolute), code 54 (?), value 317
    Event: time 1444884057.643595, type 3 (Absolute), code 0 (X), value 455
    Event: time 1444884057.643595, type 3 (Absolute), code 1 (Y), value 317
    Event: time 1444884057.643595, -------------- Report Sync ------------
    Event: time 1444884058.254675, type 3 (Absolute), code 53 (?), value 238
    Event: time 1444884058.254675, type 3 (Absolute), code 54 (?), value 347
    Event: time 1444884058.254675, type 3 (Absolute), code 0 (X), value 238
    Event: time 1444884058.254675, type 3 (Absolute), code 1 (Y), value 347
    Event: time 1444884058.254675, -------------- Report Sync ------------
    Event: time 1444884058.726488, type 3 (Absolute), code 53 (?), value 400
    Event: time 1444884058.726488, type 3 (Absolute), code 54 (?), value 284
    Event: time 1444884058.726488, type 3 (Absolute), code 0 (X), value 400
    Event: time 1444884058.726488, type 3 (Absolute), code 1 (Y), value 284
    Event: time 1444884058.726488, -------------- Report Sync ------------
    Event: time 1444884059.268024, type 3 (Absolute), code 53 (?), value 343
    Event: time 1444884059.268024, type 3 (Absolute), code 54 (?), value 215
    Event: time 1444884059.268024, type 3 (Absolute), code 0 (X), value 343
    Event: time 1444884059.268024, type 3 (Absolute), code 1 (Y), value 215
    Event: time 1444884059.268024, -------------- Report Sync ------------
    Event: time 1444884059.617255, type 3 (Absolute), code 53 (?), value 386
    Event: time 1444884059.617255, type 3 (Absolute), code 54 (?), value 259
    Event: time 1444884059.617255, type 3 (Absolute), code 0 (X), value 386
    Event: time 1444884059.617255, type 3 (Absolute), code 1 (Y), value 259
    Event: time 1444884059.617255, -------------- Report Sync ------------
    Event: time 1444884059.791685, type 3 (Absolute), code 53 (?), value 339
    Event: time 1444884059.791685, type 3 (Absolute), code 54 (?), value 303
    Event: time 1444884059.791685, type 3 (Absolute), code 0 (X), value 339
    Event: time 1444884059.791685, type 3 (Absolute), code 1 (Y), value 303
    Event: time 1444884059.791685, -------------- Report Sync ------------
    Event: time 1444884059.966216, type 3 (Absolute), code 53 (?), value 249
    Event: time 1444884059.966216, type 3 (Absolute), code 54 (?), value 291
    Event: time 1444884059.966216, type 3 (Absolute), code 0 (X), value 249
    Event: time 1444884059.966216, type 3 (Absolute), code 1 (Y), value 291
    Event: time 1444884059.966216, -------------- Report Sync ------------
    Event: time 1444884060.455265, type 3 (Absolute), code 53 (?), value 350
    Event: time 1444884060.455265, type 3 (Absolute), code 54 (?), value 253
    Event: time 1444884060.455265, type 3 (Absolute), code 0 (X), value 350
    Event: time 1444884060.455265, type 3 (Absolute), code 1 (Y), value 253

  • Hi Guys
    I'm working on a project where i want to get my capacitive touchscreen working with a beaglebone black. As I have read in the answers I'm not the only one having some problems with that. I'm very new to this all which makes it much more difficult to follow you guys.
    I connected my touchscreen with a cape, so that the screen (image not touch) is working. I have to connect the the touchscreen controller via i2c to the beaglebone.
    I know that I can use the edt-ft5x06 driver which is already built-in in my linux distribution. And I know that I have to use a device tree overlay to enable i2c pins and also the interrupt pin, so that the touchscreen information is read. But I dont know how to write appropriate .dts file.
    Can somebody explain me how this has to look like or provide an example? Did anybody already achieve to get the touchscreen working properly?
  • Hi Flavio,

    I am also having similar issue, but i wrote dts file. After loading dtbo file into slots, i can see only i2c pins are configured inside pinmux. But interrupt and wake up pin status are not changed at all. I have used Ankur dts file for reference.

    My issue is,

    1. my interrupt and wake up pin status is not changed as i configured on dts

    2. Proc/interrupts not showing ft5x06 interrupts

    3. By default ft5x06 module will not be loaded, i have loaded manully by insmod. After loading module, i have loaded dtbo file - this case also my interrupt pin not configured.

    4. Important point is whatever i configured inside ft5x06 sub node of dts file, seems not loaded properly by kernel.

    /*
     * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
     *
     * This program is free software; you can redistribute it and/or modify
     * it under the terms of the GNU General Public License version 2 as
     * published by the Free Software Foundation.
     */
    /dts-v1/;
    /plugin/;
    
    / {
            compatible = "ti,beaglebone", "ti,beaglebone-black";
            /* identification */
            part-number = "BB-BONE-TS";
            version = "00A0";
            /* state the resources this cape uses */
            exclusive-use = "P9.25", "P9.21";
    
    
            fragment@0
            {
                    target = <&am33xx_pinmux>;
                    __overlay__
                    {
    
                          edt_ft5x06_pins:pinmux_edt_ft5x06_pins
                          {
                           pinctrl-single,pins =<
                           0x1AC 0x37 /* pin interrupt P9.25 mode7 as gpio, enable input, enable input pullup*/
                           0x154 0x17 /* wake up pin control to slave from host: pullup,mode7 p9.21,gpio0_3 */
                           >;
                          };
    
                    };
            };
    
    fragment@1 {
                    target = <&i2c1>;       /* i2c1 is numbered correctly */
    
                    __overlay__
                         {
                            #address-cells = <1>;
                            #size-cells = <0>;
    
    
                            edt_ft5x06@38
                            {
                            //status =  "okay";
                            compatible = "edt,edt-ft5306","edt,edt-ft5406","edt,edt-ft5206","edt,edt-ft5x06";
                            pinctrl-names="default";
                            pinctrl-0=<&edt_ft5x06_pins>;
                            reg = <0x38>;
                            interrupt-parent = <&gpio3>;
                            interrupts = <21 0>;
    
                          //  wake-gpios = <&gpio0 3 0>; //3rd para:0 - active hig, 1-active low
                            touchscreen-size-x = <320>;
                            touchscreen-size-y = <240>;
                            };
    
                         };
               }; //frag 1
    };

  • Thank you for this quick answer rajarajan! At least I have something to work on.
    What is the wake-up pin used for?
    I'll do some test and let you know if I found sth out.
  • Hi Flavio,
    As much as possible, I will help u. Please refer "www.newhavendisplay.com/.../NHD-3.5-320240MF-ATXL-CTP.pdf"

    I am waiting for help from this forum member to solve my issue. Can anyone please help,
  • With my previous post, I have added only touch configuration not an i2C configuration.

    Please use this full dts, the following code i m using currently - but still have problem with interrupt pin status and proc/interrupt. I am adding details again for others to understand my issue,

    Board details:

    I have connected ft5x06 controller with I2C1 pin of beaglebone (pins P9.17 and P9.18). Interrupt pin connected with P9.25, wake up pin connected with P9.21.



    /plugin/; / { compatible = "ti,beaglebone", "ti,beaglebone-black"; part-number = "BB-BONE-TOUCH"; version = "00A0"; exclusive-use = /* the pin header uses */ "P9.18", /* i2c1_sda */ "P9.17", /* i2c1_scl */ "P9.25", /*interrupt, def state mcasp0_ahclkx , change to input pin gpio3_21*/ "P9.21", /*wake up from host am33 to slave ft5x" /* the hardware ip uses */ "i2c1"; fragment@0 { target = <&am33xx_pinmux>; __overlay__ { bb_i2c1_pins: pinmux_bb_i2c1_pins { pinctrl-single,pins = < 0x158 0x72 /* i2c1_sda*/ 0x15c 0x72 /* i2c1_scl */ >; } ; edt_ft5x06_pins:pinmux_edt_ft5x06_pins { pinctrl-single,pins =< 0x1AC 0x37 /* pin interrupt P9.25 mode7 as gpio, enable input, enable input pullup*/ 0x154 0x17 /* wake up pin control to slave from host: pullup,mode7 p9.21,gpio0_3 */ >; }; }; }; fragment@1 { target = <&i2c1>; /* i2c1 is numbered correctly */ __overlay__ { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&bb_i2c1_pins>; clock-frequency = <400000>; #address-cells = <1>; #size-cells = <0>; edt-ft5306@38 { //status = "okay"; compatible = "edt,edt-ft5306","edt,edt-ft5x06"; pinctrl-names="default"; pinctrl-0=<&edt_ft5x06_pins>; reg = <0x38>; interrupt-parent = <&gpio3>; interrupts = <21 0>; // wake-gpios = <&gpio0 3 0>; //3rd para:0 - active hig, 1-active low touchscreen-size-x = <320>; touchscreen-size-y = <240>; }; }; }; };

  • We connected a 800*480 display with a FT5x06 capacitive touch to our 335x EVM board.

    The driver is enabled and the dts file is modified. (See am437x-sk-evm.dts)

    ts_calibrate, ts_test and ts_print works ok . (left top 0,0 right bottom 800,480)

    Matrix-gui-2.0 display the correct content but doesn't react properly to finger touchs.

    Has anyone an idea to fix this isue ?

    Thanks and regards

    Rainer

  • Hi rajarajan

    I have a problem with loading the overlay. There is another overlay loaded that is mapping the I2C1, which leads to conflicts. The problem is that I cannot unload the corresponding overlay. Everytime I try to unload the overlay, my beaglebone crashes. After a reboot, everything is the same.

    These are the loaded overlays at startup:

     0: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
     1: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
     3: ff:P-O-L Override Board Name,00A0,Override Manuf,BBBIO-SPI1
     4: ff:P-O-L Override Board Name,00A0,Override Manuf,DVK531-I2C1-01
     5: ff:P-O-L Override Board Name,00A0,Override Manuf,DVK531-I2C2-01
     6: ff:P-O-L Override Board Name,00A0,Override Manuf,DVK531-RTC-01
     7: ff:P-O-L Override Board Name,00A0,Override Manuf,DVK531-PWM-01
     8: ff:P-O-L Override Board Name,00A0,Override Manuf,DVK531-UART2-01
     9: ff:P-O-L Override Board Name,00A0,Override Manuf,DVK531-CAN1-01
    10: ff:P-O-L Override Board Name,00A0,Override Manuf,DVK531-KEYS-01
    11: ff:P-O-L Override Board Name,00A0,Override Manuf,DVK531-W1-01
    12: ff:P-O-L Override Board Name,00A0,Override Manuf,DVK531-ADC-01
    

    I don't know where these DVK531-* overlays come from.

    Can you help me?

  • Hi rajarajan. I managed to load the overlay but I face the same problem as you do, of course. I checked the pin configuration you chose for the 4 pins and I wonder why you did it like you did.

    bb_i2c1_pins: pinmux_bb_i2c1_pins
                           {
                            pinctrl-single,pins = <
                            0x158 0x72      /* i2c1_sda*/
                            0x15c 0x72      /* i2c1_scl */
                            >;
                           } ;
    
                          edt_ft5x06_pins: pinmux_edt_ft5x06_pins
                          {
                           pinctrl-single,pins = <
                           0x1AC 0x37 /* pin interrupt P9.25 mode7 as gpio, enable input, enable input pullup*/
                           0x154 0x17 /* wake up pin control to slave from host: pullup,mode7 p9.21,gpio0_3 */
                           >;
                          };

    For the I2C pins, with 0x72 you configure them to mode0 which is spi0_d0 and spi0_sclk. Shouldnt it be mode2 instead? The same for the wakeup and interrupt pin. I think you need these two pins to be in mode7 (gpio mode). My information is based on this table:

    But I still face the problem that the wakeup and interrupt pin is not mapped. Any idea?

  • Rainer Berns said:

    We connected a 800*480 display with a FT5x06 capacitive touch to our 335x EVM board.

    The driver is enabled and the dts file is modified. (See am437x-sk-evm.dts)

    ts_calibrate, ts_test and ts_print works ok . (left top 0,0 right bottom 800,480)

    Matrix-gui-2.0 display the correct content but doesn't react properly to finger touchs.

    Has anyone an idea to fix this isue ?

    Thanks and regards

    Rainer

    Hi! I have the same issue (have connect 800*480 display with a FT5x06 capacitive touch to our am335x Starter Kit).

    How to configure matrix-gui for properly working?

  • I've hooked up a display with FT5406 to a BBB and I'm seeing the exact issue as others have reported here. Specifically, apps like ts_calibrate and ts_test are working fine. However, the Matrix GUI doesn't seem to respond. I found that if I plug a mouse into my BBB that the mouse works. So far I've been focused on various environment variables thinking that perhaps I'm missing some link between Qt and Tslib.

    I was using these pages as a reference for some of the variables:

    processors.wiki.ti.com/.../How_to_use_a_Mouse_instead_of_the_Touchscreen_with_Matrix
    processors.wiki.ti.com/.../Matrix_Users_Guide

    Unfortunately at the moment I'm stuck at pretty much the same spot as several of you... We're just getting into the thick of the holidays, so I don't anticipate solving this in the next few days, but I hope to come back to it early next year when I can get appropriate help.

    Brad
  • Hai ,

    Am getting this output for  evtest, With linux-3.14 kernel 

    device tree registration,

            polytouch: edt-ft5x06@38 {
                    compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
                    reg = <0x38>;
                   interrupt-parent = <&gpio0>;
                    interrupts = <27 0>;
                    reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
                  touchscreen-size-x = <320>;
                  touchscreen-size-y = <480>;
            };

    Input driver version is 1.0.1
    Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
    Input device name: "EP0110M09"
    Supported events:
      Event type 0 (Sync)
      Event type 1 (Key)
        Event code 330 (Touch)
      Event type 3 (Absolute)
        Event code 0 (X)
          Value      0
          Min        0
          Max       -1
        Event code 1 (Y)
          Value      0
          Min        0
          Max       -1
        Event code 47 (?)
          Value      0
          Min        0
          Max        4
        Event code 53 (?)
          Value      0
          Min        0
          Max       -1
        Event code 54 (?)
          Value      0
          Min        0
          Max       -1
        Event code 57 (?)
          Value      0
          Min        0
          Max    65535
    Testing ... (interrupt to exit)
    Event: time 1419010443.571746, type 3 (Absolute), code 53 (?), value 43
    Event: time 1419010443.571746, type 3 (Absolute), code 54 (?), value 12
    Event: time 1419010443.571746, type 3 (Absolute), code 53 (?), value 0
    Event: time 1419010443.571746, type 3 (Absolute), code 54 (?), value 0
    Event: time 1419010443.571746, -------------- Report Sync ------------
    Event: time 1419010443.580699, type 3 (Absolute), code 53 (?), value 43
    Event: time 1419010443.580699, type 3 (Absolute), code 54 (?), value 12
    Event: time 1419010443.580699, type 3 (Absolute), code 53 (?), value 0
    Event: time 1419010443.580699, type 3 (Absolute), code 54 (?), value 0
    Event: time 1419010443.580699, -------------- Report Sync ------------
    Event: time 1419010443.589795, type 3 (Absolute), code 53 (?), value 41
    Event: time 1419010443.589795, type 3 (Absolute), code 54 (?), value 12
    Event: time 1419010443.589795, type 3 (Absolute), code 53 (?), value 0
    Event: time 1419010443.589795, type 3 (Absolute), code 54 (?), value 0
    Event: time 1419010443.589795, -------------- Report Sync ------------
    Event: time 1419010443.599575, type 3 (Absolute), code 53 (?), value 39
    Event: time 1419010443.599575, type 3 (Absolute), code 54 (?), value 13
    Event: time 1419010443.599575, type 3 (Absolute), code 53 (?), value 0
    Event: time 1419010443.599575, type 3 (Absolute), code 54 (?), value 0
    Event: time 1419010443.599575, -------------- Report Sync ------------
    Event: time 1419010443.610670, type 3 (Absolute), code 53 (?), value 39
    Event: time 1419010443.610670, type 3 (Absolute), code 54 (?), value 13
    Event: time 1419010443.610670, type 3 (Absolute), code 53 (?), value 0
    Event: time 1419010443.610670, type 3 (Absolute), code 54 (?), value 0
    Event: time 1419010443.610670, -------------- Report Sync ------------
    Event: time 1419010443.622245, type 3 (Absolute), code 57 (?), value -1
    Event: time 1419010443.622245, type 3 (Absolute), code 57 (?), value 54
    Event: time 1419010443.622245, -------------- Report Sync ------------

    Any idea, Why it is unable to get X & Y position, Pressure and Tracking ID

  • Hi,

    Is there any update on this problem ?

    I started using this touch controller again and still getting same problem.

    Evtest reports correct x,y position but Qt app doesn't recognize the touch.



    I am using QT5.4.1 which has in-built handler for evdev hence no need for tslib.
    My same app works with different touch controller


    regards

    Ankur
  • I ported my code to the latest Proc SDK and still see the same issue. I'm trying to get some help still.
  • Hi Brad,

    Thanks for your reply.

    Looks like FT5x06 works better with tslib rather than evdev.

    I build my Qt with tslib support and then got my app working.  For other touchscreen like egalax, my Qt app works with evdev.

    More information over here https://forum.qt.io/topic/65120/qt5-4-1-application-doesn-t-respond-to-touch-while-evtest-reports-correct-x-y/2

    regards

    Ankur

  • I would really like to get this working on my board using evdevtouch so that it retains multi-touch capability.  I've nearly got it...

    One thing I did was to define a debug variable for Qt:

    export QT_LOGGING_RULES=qt.qpa.input=true

    After defining the above, I then shut down the matrix gui:

    /etc/init.d/matrix-gui-2.0 stop

    It will print out some extra debug info thanks to that logging variable.  I noticed that it had some weird values for max X and max Y:

    root@boneblack-chipsee:/dev/input# /etc/init.d/matrix-gui-2.0 stop

    Stopping Matrix GUI applicationstart-stop-daemon: warning: killing process 860: No such process

    PVR: Hint: Setting WindowSystem to libpvrDRMWSEGL_FRONT.so

     

    mode for connector 20 is 1024x600

    mode for CRTC of connector 20 is 1024x600

    DRM SET CRTC: index: 0 fd: 6, crtc: 12, fb: 18, conn: 14, mode: 1024x600

    qt.qpa.input: evdevkeyboard: Using device discovery

    qt.qpa.input: udev device discovery for type QFlags(0x8)

    qt.qpa.input: Found matching devices ()

    qt.qpa.input: evdevmouse: Using device discovery

    qt.qpa.input: udev device discovery for type QFlags(0x1|0x2)

    qt.qpa.input: Found matching devices ()

    qt.qpa.input: evdevtouch: Using device discovery

    qt.qpa.input: udev device discovery for type QFlags(0x2|0x4)

    qt.qpa.input: Found matching devices ("/dev/input/event0")

    qt.qpa.input: Adding device at "/dev/input/event0"

    qt.qpa.input: evdevtouch: Using device /dev/input/event0

    qt.qpa.input: evdevtouch: /dev/input/event0: Protocol type B  (multi)

    qt.qpa.input: evdevtouch: /dev/input/event0: min X: 0 max X: 11519

    qt.qpa.input: evdevtouch: /dev/input/event0: min Y: 0 max Y: 3391

    qt.qpa.input: evdevtouch: /dev/input/event0: min pressure: 0 max pressure: 0

    qt.qpa.input: evdevtouch: /dev/input/event0: device name: EP0790M09

    Unable to query physical screen size, defaulting to 100 dpi.

    This was because I had missed a couple lines in my dts file:

    &i2c1 {
            status = "okay";
            clock-frequency = <400000>;
            pinctrl-names = "default";
            pinctrl-0 = <&i2c1_pins>;

            ft5x06_ts: ft5x06_ts@38 {
                    compatible = "edt,edt-ft5406", "edt,edt-ft5x06";
                    reg = <0x38>;
                    pinctrl-names = "default";
                    pinctrl-0 = <&chipsee_captouch_pin>;
                    interrupt-parent = <&gpio1>;
                    interrupts = <17 0>;
                    touchscreen-size-x = <1024>;
                    touchscreen-size-y = <600>;

            };
    };

    Those entries are not actually part of the fields defined by the edt-ft5x06 driver, but clearly they're something used by Qt!  Once I added those lines, then it started responding to touch events (since my touches were now registering as being on the actual screen!).  I did some further examination of the values being reported by running evtest:

    evtest /dev/input/touchscreen0

    When touching each corner of the screen I wrote down the corresponding coordinates.  At least for my hardware (Chipsee Cape), it was evident that the X and Y coordinates were swapped.  In the case of tslib, the calibration was apparently handling this condition!  For example, if I deleted the pointercal file then I would see behavior in ts_test such as moving my finger up and down causing the cursor to move left and right.

    So next I performed a serious hack in the edt_ft5x06 driver:

    diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
    index 8db73b9..fc1191a 100644
    --- a/drivers/input/touchscreen/edt-ft5x06.c
    +++ b/drivers/input/touchscreen/edt-ft5x06.c
    @@ -249,8 +249,8 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
                    if (!down)
                            continue;

    -               input_report_abs(tsdata->input, ABS_MT_POSITION_X, x);
    -               input_report_abs(tsdata->input, ABS_MT_POSITION_Y, y);
    +               input_report_abs(tsdata->input, ABS_MT_POSITION_X, y);
    +               input_report_abs(tsdata->input, ABS_MT_POSITION_Y, x);
            }

    With that change things nearly work right.  Running more testing though in evtest reveals that for some reason the touchscreen driver reports back values from 0-1023 in the x direction (which is fine and works accurately), but values of 0-767 in the y direction.  Since my screen is only 600 pixels tall this is causing me issues!  I have been searching everywhere trying to figure out if there's some way to account for this difference.  As far as I can tell, the ts_calibrate and the pointercal only impacts tslib and has no impact on evdevtouch.

    I feel like I'm so close!  Still banging away on this...

  • I changed touchscreen-size-y from 600 to 768. This matched up with the values being reported back from the ft5x06. At least for my board, I also needed to set QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=rotate=180. On Proc SDK 2.00.01 this is already set for you.

    My board is fully operational now with ft5x06 using evdevtouch, which enables multi-touch capabilities like pinch/zoom (which is not possible under tslib).

    So I think the summary of things I needed (beyond the basics like enabling the driver in the kernel config):

    1. Qt requires you to specify touchscreen-size-x and touchscreen-size-y.
    2. You must specify touchscreen-size-x and touchscreen-size-y based on what the ft5x06 is REPORTING/RETURNING (i.e. as can be observed through evdevtest), and not based on the display resolution.
    3. Likely due to hardware misconfiguration, I needed to hack the ft5x06 touchscreen driver to swap x and y
    4. QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=rotate=180

    I hope this helps some of the rest of you that have been struggling with this.

    Best regards,
    Brad
  • Hi Brad,

    Thanks for sharing the fix. I will try it out with ft5x06

    Parallely, I am using egalax touch screen and do not specify touchscreen-size-x and touchscreen-size-y in the dts. But my Qt application is working fine

    Wondering is it really a strict requirement from Qt to specify touchscreen size or is it working somehow in my setup that I should fix ?

    regards

    Ankur

  • I recommend that you enable the extra logging and shut down the matrix gui like I did a couple posts back (i.e. this post) to see what touchscreen resolution is being reported by Qt.  That was my first big clue into what was wrong.  The other critical item in diagnosing my own touch issues was to run evtest as I also documented in that same post.  I basically just touched each extreme corner of the screen and wrote down the coordinates that were reported by evtest.  Based on the reported coordinates and where I was touching I was able to figure out things x-y being reversed, screen being 180 degrees rotated, etc.

    e2e.ti.com/.../1828953