Skip to content

arm64: dts: exynos: google: gs201-lynx: enable the touchscreen - #93

Merged
derekross merged 3 commits into
derekross:omamobilefrom
latentoperator:omamobile-gs201-lynx-touch
Oct 28, 2026
Merged

derekross merged 3 commits into
derekross:omamobilefrom
latentoperator:omamobile-gs201-lynx-touch

Conversation

@latentoperator

@latentoperator latentoperator commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Enables the touchscreen on the Pixel 7a (lynx). Three commits on today's omamobile (rebased after #91 merged).

  • dt-bindings: input: goodix,gt9916: Add GT9895. The panel's controller is a Goodix GT9895, a Berlin-series part with the GT9916's register map and supplies.
  • Input: goodix-berlin - add GT9895 with 14-byte contact records. The GT9895's firmware sends 14 bytes per contact, not 8: status, x, y and width as before, then pressure, both axes and an orientation, with the checksum after the last record. With 8-byte records every touch fails the checksum. The record size becomes per-chip data (8 by default), and a GT9895 entry uses 14. The extra fields are not reported yet.
  • arm64: dts: exynos: google: gs201-lynx: enable the touchscreen. USI0 in SPI mode, with the interrupt, reset and chip select on the same pins as on cheetah. Unlike cheetah, the bootloader leaves the two touch supplies off (S2MPG12 LDO25M and LDO26M), so the board file describes the main PMIC with just those two rails and the driver turns them on. LDO25M is fixed at 1.8 V (the PP1800_L25M_TSP_DVDD I/O rail) and LDO26M at 3.0 V, as stock's lynx PMIC file pins it. With the main PMIC described, its RTC also sets the clock at boot.

Tracking issue: derekross/omarchy-mobile#36.

Device and build

  • Phone: Pixel 7a (lynx), MP1.0, bootloader lynx-17.0-15199429
  • The phone runs 7.3.0-rc6-omamobile-push1-g38b5a04d67e0 from slot B with the Arch root. That build is on an older omamobile; its PMIC and USI0 nodes and goodix-berlin sources are the same as these commits' except for the ldo25m range (below), and its touchscreen node differs only in also having touchscreen-x-mm and touchscreen-y-mm, which the binding does not allow and goodix-berlin does not read, so they are dropped here.

On the phone

  • input: Goodix Berlin Capacitive TouchScreen as .../10d10000.spi/spi_master/spi0/spi0.0/input/input0
  • The regulator summary shows vddio-ts at 1800 mV (range 1600-1950 mV in that build) and avdd-ts at 3000 mV, both enabled, one consumer each. The rail already sat at 1.8 V, so fixing ldo25m at 1800-1800 mV in this push only stops a consumer from moving it; that one line is not yet booted on the phone. The core logs avdd-ts: Bringing 3300000uV into 3000000-3000000uV once at probe.
  • No touch data checksum error in dmesg after 2 h 20 min up. Touch input works in the Hyprland session.
  • s5m-rtc s2mpg12-rtc: registered as rtc0, and it sets the system clock at boot.
  • Not tested: suspend and resume, the extra contact fields.

Checks

tools/kernel-pr-check --build OUT --merge origin/omamobile from omarchy-mobile (a74e329), with dtschema installed, over the three commits:

ok - merges cleanly onto 6beaf6d62 (test merge 412b21333)
ok - 3 commits signed off by their authors, none by an AI
ok - subjects have subsystem prefixes
ok - checkpatch --strict: no errors (0 warnings and checks to read)
ok - policy (tools/pr-check): identifiers, blobs
ok - W=1 builds of 2 touched C files
ok - 6 device trees build with W=1 and dtbs_check, no new warnings
ok - dt_binding_check on 1 bindings

I used an AI assistant (Claude Code) for this; the commits carry Assisted-by: LLM.

🤖 Generated with Claude Code

@derekross

Copy link
Copy Markdown
Owner

Thank you, @latentoperator. Touch on a second gs201 phone is a nice step, and the series is shaped the way I'd want it: the binding, then the driver, then the board, each with its own reason. The board change stays in gs201-lynx.dts.

One thing before it can merge: a rebase. #91 landed on omamobile as 394ff7c36415 (rebase merge, so a new id with the same patch), and this branch still carries it as 3a31f75eb, so GitHub reports a conflict in gs201-lynx.dts. git rebase github/omamobile drops the duplicate and replays your three commits cleanly. I did that here: the five files come out byte-identical to your head. On that rebased branch, kernel-pr-check --build --merge onto today's omamobile (c380e7f63) passes: sign-offs, prefixes, checkpatch with no warnings now that the bootargs line is gone from the range, W=1 on both C files, and six device trees with no new warnings. Your CI run checked dtbs_check on the same files. Since then the base has only changed bindings this board doesn't use. The Pixel 7 Pro, Fold, Pixel 6, Pixel 6 Pro and Pixel 8 Pro DTBs are byte-identical before and after (I compared them), and none of those boards binds goodix-berlin, so the existing GT9897/GT9916 path keeps its 8-byte records.

Please also make one small change in that push: ldo25m at 1.8 V, min equal to max. The 1.6-1.95 V range is the PMIC's limit for that LDO in Google's gs201-pmic.dtsi, not what the board runs it at. Google's gs201-common-touch.dtsi marks the supply /* VIO 1.8V */, the rail is PP1800_L25M_TSP_DVDD, and neither goodix driver sets a voltage. A fixed value means no consumer can move the rail, and it matches what the Fold does for the same LDO. ldo26m at 3.0 V is right: lynx's own gs201-lynx-pmic.dtsi pins it there.

Things I checked against Google's source, and some suggestions, none holding this:

  • The 14-byte record is right. Google's lynx driver (goodix_touch, goodix_brl_hw.c) parses pressure at byte 8, major and minor at 9-12 and the angle at 13, and steps through the frame by the record length, with the checksum after the last one. It doesn't hard-code that length, though. It takes it from the chip: point_struct_len in the IC info block (goodix_brl_hw.c:1028-1039, :1175-1176). goodix-berlin already parses that block and reads touch_data_addr from it (goodix_berlin_core.c:356-357); point_struct_len sits two fields later. Reading it there, bounded by the buffer, is probably what the input maintainers will ask for upstream, and then the GT9895 might need only a binding fallback. For our tree, the per-chip value behind your own compatible is fine. Either way, please put the value your chip reports into lynx's NOTES. If you keep the constant, a check that touch_size fits GOODIX_BERLIN_TOUCH_SIZE_MAX would stop a future entry from overrunning the event buffer.
  • The part name. Stock's compatible is goodix,nottingham, so "GT9895" needs a line of evidence. goodix-berlin prints the product id at probe (Goodix Berlin %s Touchscreen Controller, debug level). That line in the NOTES would do it.
  • Chip select timing. Stock's controller-data has cs-clock-delay = <1>, 1 µs from chip select to the first clock. Upstream spells that spi-cs-setup-delay-ns = <1000>, and the Fold's cover touch carries its <2> as <2000>. Touch works without it, so either add it or say in the commit why it isn't needed.
  • Evidence. As on arm64: dts: exynos: google: gs201-lynx: enable UFS #91, the boot is from a local tree (g38b5a04d67e0). When the phone runs a kernel built from omamobile with these commits, please add that uname -r, the input: line and the regulator_summary lines for the two rails to lynx's NOTES.
  • Suspend is untested, as you say. With the PMIC now a wakeup source, lynx's s2idle drop-in from drm: google: 120 Hz on the Pixel 9a (per-panel DSIM timers, gs-decon on zumapro) #88 matters before anyone tries it.

Once the rebase and the ldo25m line are in, I'll rebase-merge the three commits.

The GT9895 is a Berlin-series controller used over SPI in the Pixel 7a.
It uses the same register map and supplies as the GT9916.

Assisted-by: LLM
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
The GT9895 in the Pixel 7a uses the GT9916's register map, but its
firmware reports 14 bytes per contact instead of 8: the usual status,
x, y and width, then a pressure byte, both axes and an orientation.
The checksum follows the last record as before. With 8-byte records
every touch fails the checksum.

Make the record size part of the per-chip data, keep 8 bytes as the
default, and add a GT9895 entry that uses 14. The extra fields are not
reported yet.

Tested on a Pixel 7a: touches report with no checksum errors, and
touch input works in the desktop session.

Assisted-by: LLM
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
The touchscreen is a Goodix GT9895 on USI0's SPI, with the interrupt,
reset and chip select on the same pins as on cheetah. Unlike cheetah,
the bootloader leaves its supplies (S2MPG12 LDO25M and LDO26M) off, so
describe the main PMIC with those two rails and let the driver enable
them. LDO25M is the 1.8 V I/O rail (PP1800_L25M_TSP_DVDD), so it is
fixed at 1.8 V rather than the LDO's 1.6-1.95 V range; LDO26M is fixed
at 3.0 V as in stock's lynx PMIC description. The PMIC's RTC now sets
the clock at boot.

Tested on a Pixel 7a from slot B: the controller identifies, and
touch input works in the desktop session.

Assisted-by: LLM
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
@latentoperator
latentoperator force-pushed the omamobile-gs201-lynx-touch branch from 4f21900 to f9d10b0 Compare October 27, 2026 22:19
@latentoperator latentoperator changed the title arm64: dts: exynos: google: gs201-lynx: enable the touchscreen (stacked on #91) arm64: dts: exynos: google: gs201-lynx: enable the touchscreen Oct 27, 2026
@latentoperator

Copy link
Copy Markdown
Contributor Author

Thanks @derekross. Rebased onto omamobile: the UFS commit dropped out as a duplicate and the three touch commits replayed with the same files. ldo25m is now fixed at 1.8 V (min equal to max), and the board commit message and the description say why. The title no longer says it's stacked. kernel-pr-check --build --merge passes on the new head:

ok - merges cleanly onto 6beaf6d62 (test merge 412b21333)
ok - 3 commits signed off by their authors, none by an AI
ok - subjects have subsystem prefixes
ok - checkpatch --strict: no errors (0 warnings and checks to read)
ok - policy (tools/pr-check): identifiers, blobs
ok - W=1 builds of 2 touched C files
ok - 6 device trees build with W=1 and dtbs_check, no new warnings
ok - dt_binding_check on 1 bindings

The phone hasn't booted the ldo25m line yet. Its current kernel already shows the rail at 1800 mV, so I don't expect a change.

The rest I'll do with the next boot of an omamobile-built kernel, so the evidence comes from that boot: uname -r, the input: line and the two regulator_summary lines in lynx's NOTES, plus the product id from the probe line and the point_struct_len the chip reports. I'll add spi-cs-setup-delay-ns = <1000> and a bound check on touch_size in a follow-up once that boot has run, so they don't go in untested. The s2idle drop-in is going into #88.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @latentoperator. Everything I asked for is in. The rebase dropped the duplicate UFS commit, the binding and driver commits are unchanged, and the board commit now fixes ldo25m at 1.8 V and says why. CI ran on this head merged onto today's omamobile, dtbs_check and dt_binding_check included, and passes. My own run of kernel-pr-check --build --merge agrees. The Pixel 7 Pro and Fold device trees come out byte-identical before and after.

Holding the chip select delay and the touch_size bound check for a follow-up until a boot has run them is the right call. The same goes for the boot evidence in lynx's NOTES (uname -r, the input: line, the two regulator_summary lines, the product id and the point_struct_len the chip reports). I'll look for those in the next lynx NOTES PR.

One heads-up: FlorencioJP's Bluetooth PR (#98) also adds a block at the end of gs201-lynx.dts, so whichever of you lands second gets a small conflict there. Keeping both blocks resolves it.

I'll rebase-merge the three commits.

@derekross
derekross merged commit cf95532 into derekross:omamobile Oct 28, 2026
1 check passed
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