Skip to content

Input: add FocalTech FT3658 SPI touchscreen driver (Pixel 7) - #109

Merged
derekross merged 2 commits into
derekross:omamobilefrom
nesmeck:omamobile-input-ft3658
Oct 28, 2026
Merged

derekross merged 2 commits into
derekross:omamobilefrom
nesmeck:omamobile-input-ft3658

Conversation

@nesmeck

@nesmeck nesmeck commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

A driver for the FocalTech FT3658, the Pixel 7's touch controller, on SPI. Mainline has none: edt-ft5x06 covers FocalTech's I2C parts only.

Two commits:

  • dt-bindings: input: touchscreen: add FocalTech FT3658: SPI, vdd and avdd supplies, active-low reset, an interrupt, the touchscreen size required;
  • Input: add FocalTech FT3658 SPI touchscreen driver: powers the controller up in the order Google's GPL FocalTech driver uses (AVDD, VDD, 1 ms, reset released, 200 ms for the firmware), waits for chip ID 0x56, and reports up to ten touches with the MT slot protocol. It reads only: no register or firmware writes. The SPI framing (read command, 16-bit length, three dummy bytes, status byte, CRC-16/CCITT over the data), the report layout and the power-off order (reset first, then both supplies) follow Google's driver.

Not supported yet: suspend, firmware update, gestures and the heatmap.

Tested on a Pixel 7 (slot B), kernel 7.3.0-rc6-omamobile-push1-g08996b25d807: omamobile at 6beaf6d plus this series, the panther board series (#108) and its touch node (touchscreen@0 on USI0 SPI, reset gpp23-2, interrupt gpa7-0 falling edge, LDO25M/LDO26M):

  • the module loads from its OF alias at boot; FT3658, chip id 0x56, firmware 0x16, 3.7 s into the boot;
  • touches at the four corners report (44, 19), (1071, 45), (34, 2389) and (1033, 2333) on the 1080x2400 panel, with no CRC or status error in 1632 reports; swipes track; the Omarchy lock screen takes the PIN by touch;
  • with no touch the line stays quiet; unbinding asserts reset and switches both rails off, with no other rail changing.

Checks: tools/kernel-pr-check --build OUT --merge origin/omamobile passes (W=1 build, dt_binding_check, checkpatch --strict with only the new-file MAINTAINERS note).

Two questions:

  • The binding needs a maintainers: entry. I put myself there for now, but I can't take on maintaining it upstream; would you rather be listed?
  • There is no MAINTAINERS entry, as for the other touch drivers here. Say if you want one.

🤖 Generated with Claude Code

The FT3658 is the touch controller of the Google Pixel 7, on SPI. It
runs its own firmware from flash and needs a digital and an analog
supply, an active-low reset and an interrupt line. The FocalTech parts
in edt-ft5x06.yaml are I2C controllers and are not compatible.

Assisted-by: Claude Opus 5.5
Signed-off-by: Alejandro Garcia <skipper.pelygro@gmail.com>
The Google Pixel 7 (panther) uses a FocalTech FT3658 touch controller on
SPI. Mainline has no driver for it: edt-ft5x06 covers FocalTech's I2C
family only.

The controller runs its own firmware from flash. This driver powers it
up, waits for its chip ID (0x56) and reports up to ten touches with the
MT slot protocol; it never writes a register or the firmware. The SPI
framing (a read command with a 16-bit length, three dummy bytes, a
status byte and a CRC-16/CCITT over the data), the report layout and
the power sequence follow Google's GPL FocalTech driver for Pixel
devices: AVDD on, VDD on, 1 ms, reset released, then 200 ms for the
firmware to boot; on removal reset is asserted before both supplies go
off, so the supplies never drop under a running controller.

Suspend, firmware update, gestures and the heatmap are not supported.

Tested on a Pixel 7 from slot B, with the panther board file and its
touch node: the controller answers with chip ID 0x56 and firmware
version 0x16; touches at the four corners report (44, 19), (1071, 45),
(34, 2389) and (1033, 2333) on the 1080x2400 panel, with no CRC or
status error in 1632 reports; the lock screen takes a PIN by touch.
Unbinding asserts reset and switches both rails off. Built as a module,
it loads from its OF alias at boot.

Assisted-by: Claude Opus 5.5
Signed-off-by: Alejandro Garcia <skipper.pelygro@gmail.com>
@derekross

Copy link
Copy Markdown
Owner

Thank you, @nesmeck. A small, read-only driver with a clear power sequence is exactly what a first touch driver should be. I checked it against Google's driver (kernel/google-modules/touch/focaltech_touch, ft3658/, branch android-gs-pantah-6.1-android16), and it matches:

  • power-on is AVDD, then DVDD, 1 ms, then reset released; power-off asserts reset, waits 1 ms, then turns off AVDD and DVDD (focaltech_core.c, fts_power_source_ctrl);
  • the read framing, the rx[3] & 0xA0 status check, the 64-byte alignment rule and the 150 µs CS-high delay match focaltech_spi.c;
  • the CRC is the reflected 0x8408 with initial value 0xFFFF that crc_ccitt() computes.

The driver never writes the controller's flash. That matters because Google's driver updates the firmware at probe, and this one skips that. The W=1 build is clean. It merges cleanly with #108.

Nothing here blocks. A few suggestions for the upstream version, in any order:

  • Put the Google source above (repository, branch and file) in the commit message, so a reviewer can follow "follows Google's GPL FocalTech driver" to the file.
  • tx and rx sit inside struct ft3658 next to other fields, but SPI buffers should be DMA-safe, and the 90-byte report is long enough for the Exynos SPI driver to use DMA. Marking them ____cacheline_aligned (or allocating them separately) is what upstream reviewers will ask for.
  • udelay(FT3658_CS_HIGH_US) busy-waits 150 µs on every transfer from a threaded handler that is allowed to sleep. fsleep() or usleep_range() does the same job without the busy-wait.

On your two questions: for this tree, no MAINTAINERS entry is needed, as for the other touch drivers. I'll come back to you on the binding's maintainers: line before anything goes upstream. Keep your name there for now.

When the touch node lands, the omarchy-mobile side will also need CONFIG_TOUCHSCREEN_FOCALTECH_FT3658=m in panther's kernel config. CI is waiting for my approval; I'll approve it and merge once it's green.

@derekross
derekross merged commit 2f18e90 into derekross:omamobile Oct 28, 2026
1 check passed
derekross added a commit to derekross/omarchy-mobile that referenced this pull request Oct 29, 2026
The matrix after the merges since #118, with each cell going by the
merged notes:

- Pixel 7 (panther): the board file (derekross/linux-omarchy-mobile#108) and the
  FT3658 touch driver (derekross/linux-omarchy-mobile#109) have merged
  into the published kernel, so Boot, Storage, Buttons and USB net say
  "in the published kernel" instead of "in review". Touch stays "no":
  the driver and the touch rails are published, but the board file has
  no touch node, and panther's notes end at boot 8 with the controller
  not answering. BRINGUP-M1's status and NOTES' header say the same.
- Pixel 6 Pro (raven), Charging: no -> works. device-raven 0.1.26 (#112,
  #126) loads the MAX77759 charger at boot with its temperature guard;
  USB-PLAN section 4 records C0-C5 passed on 2026-10-28, a full charge to
  100 % included. The battery node is derekross/linux-omarchy-mobile#112;
  the runs were on an unpublished integration kernel, and the cell says so.
- raven, Torch: still works; the LED's node is now in the published
  kernel (derekross/linux-omarchy-mobile#113), tested on
  omamobile-gs101-torch and not yet run from the published kernel.
- Pixel 9a (tegu), Fingerprint: no -> WIP. FINGERPRINT-PLAN records F0
  and F2-F6b passed on an unpublished kernel: Trusty's TA runs and the HAL
  sees the sensor; enrollment waits for the factory calibration (F6c).
  omamobile-fingerprint 0.1.10 (#101) maps Trusty's stores for it.

Left as they were: tegu's Charging (the MAX77779 charger driver,
derekross/linux-omarchy-mobile#92, is published, but tegu's notes record
no run of it), the gs201 HSI2 pin controller
(derekross/linux-omarchy-mobile#123, no cell), felix (#35 is a plan) and
cheetah (nothing merged for it).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants