[PATCH 0/2] Input: add STMicroelectronics FTM5 touchscreen support

From: sthho law

Date: Fri Dec 04 2026 - 02:49:07 EST


Hi,

This series adds support for the FTM5 generation of the STMicroelectronics
FingerTip touchscreen controllers, tested on a Meizu 16X (Snapdragon 670).

The existing stmfts driver speaks the FTM4 command set. FTM5 controllers
answer a different one: the hardware register window is accessed through
command 0xFA, scanning is enabled with 0xA0 <mode> <settings>, and events
are read as 8 byte records with 0x86, the last byte carrying how many
records are still pending in the FIFO. The chip ID, 0x3936 on this panel,
comes from register 0x20000000 instead of the FTM4 system information
command. Against an FTM5 controller the FTM4 probe path never observes the
status event it waits for and fails with -ETIMEDOUT, which is what
motivated this driver.

The driver is intentionally small: it checks the chip ID, issues the soft
reset (register 0x20000024, value 0x81), waits for the controller ready
event, enables the active scan mode and drains the event FIFO into the
input subsystem from a threaded interrupt handler. Suspend and resume
re-run the same initialisation.

It does not download firmware: these controllers boot their own firmware
from flash and announce themselves with a controller ready event, so the
download protocol is out of scope. Gestures, the touch keys and switching
between AP and SLPI mode are not implemented either.

Patch 1 adds "st,fts" to the st,stmfts binding, so FTM5 panels can be
described without abusing the FTM4 compatible; the wiring, the supplies and
the interrupt are the same. Patch 2 adds the driver.

I am aware of the in-progress FTM5 work on stmfts.c by David Heidelberg and
Petr Hodina. If a single driver selecting the protocol by chip ID is
preferred, I am happy to fold this into stmfts.c instead; I kept it apart
first so that the register protocol can be reviewed on its own.

Testing was done on the Meizu 16X: SDM670, controller on an i2c-gpio bus
(the GENI controller of this board returns zeros for register reads),
level-low interrupt on a GPIO, 1080x2160 panel. Touch reporting, tracking
IDs and s2idle suspend/resume were exercised through evdev with a
framebuffer test overlay.

Signed-off-by: sthho law <17236081@xxxxxx>

sthho law (2):
dt-bindings: input: touchscreen: st,stmfts: add st,fts
Input: add STMicroelectronics FTM5 touchscreen driver

.../bindings/input/touchscreen/st,stmfts.yaml | 8 +-
drivers/input/touchscreen/Kconfig | 10 +
drivers/input/touchscreen/Makefile | 1 +
drivers/input/touchscreen/fts5_touch.c | 478 ++++++++++++++++++
4 files changed, 496 insertions(+), 1 deletion(-)
create mode 100644 drivers/input/touchscreen/fts5_touch.c