Skip to main content
Graduate
March 18, 2025
Solved

Interfacing Touchscreen (edt-ft5406) with stm32mp157c in Linux-Kernel

  • March 18, 2025
  • 2 replies
  • 1147 views

Hi everyone,

We have developed a custom board based on stm32mp157 mpu. We have used openstlinux distribution and the branch is "kirkstone". We have interfaced edt_ft5x06 display. Display is working perfectly fine but problem arises when we try to interact with the touch. It is completely unresponsive. With "evtest" in Linux kernel I do not see any touch event. Devicetree entry for my touch-screen is following:

 

 

 touchscreen@38 {
 compatible ="edt,edt-ft5406";
 reg = <0x38>;
 interrupts = <2 2>;
 interrupt-parent = <&gpiof>;
 interrupt-controller;
 touchscreen-size-x = <480>;
 touchscreen-size-y = <800>;
 vcc-supply = <&v3v3>;
 iovcc-supply = <&v3v3>;
 status = "okay";
 };

 

 

If I look thorough the dmesg, then I get following entry:

 

 

[ 2.081938] input: EP0700M12 as /devices/platform/soc/40012000.i2c/i2c-0/0-0038/input/input0

 


Also I have following entry for the interrupt:

 

 

 cat /proc/interrupts
 CPU0 CPU1 
 26: 22514 70457 GIC-0 27 Level arch_timer
 30: 0 0 GIC-0 67 Level 44004000.spi
 31: 0 0 GIC-0 43 Level dma1chan0
 32: 0 0 GIC-0 44 Level dma1chan1
 33: 0 0 GIC-0 45 Level dma1chan2
 34: 382 0 GIC-0 46 Level dma1chan3
 35: 0 0 GIC-0 47 Level dma1chan4
 36: 0 0 GIC-0 48 Level dma1chan5
 37: 0 0 GIC-0 49 Level dma1chan6
 38: 0 0 GIC-0 79 Level dma1chan7
 41: 2 0 GIC-0 154 Level 58000000.dma-controller
 42: 0 0 GIC-0 124 Level 58003000.spi
 43: 68928 0 GIC-0 81 Level mmci-pl18x (cmd)
 44: 1181 0 GIC-0 156 Level mmci-pl18x (cmd)
 45: 11211 0 GIC-0 93 Level eth0
 46: 1 0 GIC-0 106 Level ohci_hcd:usb2
 47: 455 0 GIC-0 120 Level 5a001000.display-controller
 48: 0 0 GIC-0 121 Level 5a001000.display-controller
 53: 37 0 stm32-exti-h-direct 32 Level 40018000.serial
 54: 0 0 stm32-exti-h-direct 70 Level eth0
 55: 26 0 stm32-exti-h-direct 43 Level ehci_hcd:usb1
 56: 0 0 stm32-exti-h-direct 19 Level 5c004000.rtc
 57: 58 0 stm32-exti-h-direct 21 Level 40012000.i2c
 58: 0 0 GIC-0 64 Level 40012000.i2c
 59: 0 0 stm32gpio 2 Edge edt-ft5406
 60: 0 0 stm32-exti-h-direct 25 Level 40015000.i2c
 61: 0 0 GIC-0 140 Level 40015000.i2c
IPI0: 0 0 CPU wakeup interrupts
IPI1: 0 0 Timer broadcast interrupts
IPI2: 36 72 Rescheduling interrupts
IPI3: 4883 77663 Function call interrupts
IPI4: 0 0 CPU stop interrupts
IPI5: 0 0 IRQ work interrupts
IPI6: 0 0 completion interrupts
Err: 0

 


I tried possible solutions, but could not get it to work. Can anyone tell me what is the reason for this behavior? Thanks a lot.

    This topic has been closed for replies.
    Best answer by ahamod3.1416

    Thanks for your reply. I fixed it, I was referring to wrong interrupt pin. After correcting "interrupts" parameter, touch is working perfectly. Thanks again.

    2 replies

    Graduate II
    March 19, 2025

    Yes, documentation for panels is often lacking. You could contact the supplier of the panel but often they developed the panel with old linux version or don't even have any Linux experience.. You can also edit the driver and put some debug messages in the code to see what is happening. check the device tree binding documentation in the kernel as well. This works for me but YMMV depending on your hardware (which seems ok as the input driver was found)

     
    ft5x06: ft5x06@38 {
    compatible = "edt,edt-ft5306";
    reg = <0x38>;
    interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
    interrupt-parent = <&gpiog>;
    interrupt-controller;
    reset-gpios = <&gpiog 8 GPIO_ACTIVE_LOW>;
    status = "okay";

    touchscreen-swapped-x-y = "true";
    touchscreen-size-x = <600>;
    touchscreen-size-y = <1024>;
    };
     
    ahamod3.1416AuthorAnswer
    Graduate
    March 19, 2025

    Thanks for your reply. I fixed it, I was referring to wrong interrupt pin. After correcting "interrupts" parameter, touch is working perfectly. Thanks again.

    Graduate II
    March 19, 2025

    You can mark this as solved by your own answer. interesting though, because some touch drivers don't event load with the wrong interrupt pin