STM32MP257F-DK + Waveshare LVDS 10.1" FT5x06 Touchscreen: Touch event stops after first touch ??
Hi everyone,
I'm using STM32MP2 OpenSTLinux 6.6 Yocto Scarthgap MPU v24.11.06 with Linux kernel 6.6.48.
I am trying to interface a Waveshare LVDS 10.1" FT5x06 touch display with the STM32MP257F-DK. We designed a custom PCB for the required pin mapping.
1. Display :
Initially, the display was not working with the original compatible string. After changing the panel compatible to "panel-lvds" only then display started working.
panel_lvds: panel-lvds {
compatible = "panel-lvds";...
/*compatible = "edt,etml0700z9ndha", "panel-lvds";*/
} 2. I2C Touch / HDMI Address :
The FT5x06 touch controller uses I2C address 0x38.
The ADV7535 HDMI device also uses 0x38 as one of its register-map addresses. Since I am not using HDMI for this test, I changed that ADV7535 address from 0x38 to 0x39:
&i2c2
{
adv7535: hdmi@3d {
compatible = "adi,adv7535";
reg = <0x3d>, <0x3c>, <0x3f>, <0x39>; //<0x38>;
}
ili2511: ili2511@41 {
compatible = "ilitek,ili251x";
reg = <0x41>;
interrupt-parent = <&gpioi>;
interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpioi 0 GPIO_ACTIVE_LOW>;
status = "disabled";
};
ft5x06: ft5x06@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;
interrupt-parent = <&gpioi>;
interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
reset-gpios = <&gpioi 0 GPIO_ACTIVE_LOW>;
vcc-supply = <&scmi_v3v3>;
iovcc-supply = <&scmi_v3v3>;
touchscreen-size-x = <600>;
touchscreen-size-y = <1024>;
status = "okay";
};
}The FT5x06 is detected at 0x38:
root@stm32mp2-e3-cc-dd:~# i2cdetect -y -r 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
30: -- -- -- -- -- -- -- -- UU UU -- -- UU UU -- UU 3. Touch Interrupts :
The interrupt count is increasing when I touch the display:
So it appears that the FT5x06 interrupt is being generated correctly.
root@stm32mp2-e3-cc-dd:~# while true; do
> grep -i edt /proc/interrupts
> sleep 5
> done
84: 132 0 stm32gpio 6 Edge edt-ft5306
84: 420 0 stm32gpio 6 Edge edt-ft5306
But kernal is generating event for 1st time only then after it not generating the events if we touch the screen.
4. Problem: Touch Event Generated Only Once
When I run:
evtest /dev/input/event1the input device is detected correctly and supports X/Y and multitouch events, However, after touching the screen, I only get an event once:
root@stm32mp2-e3-cc-dd:~# 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: "generic ft5x06 (00)"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 0
Min 0
Max 1023
Event code 1 (ABS_Y)
Value 0
Min 0
Max 599
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 4
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 1023
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 599
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Properties:
Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 1783339619.789345, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 0
Event: time 1783339619.789345, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1783339619.789345, -------------- SYN_REPORT ------------
Interestingly, the GPIO interrupt counter continues increasing, so the interrupt appears to be happening, but new input events are not being reported.
My Question :
Why is the kernel/input driver generating an input event only for the first touch, even though the FT5x06 interrupt continues to increase for subsequent touches?
Could this indicate that the driver is getting stuck while reading the touch data over I2C, or that the touch status is not being cleared correctly?
