Repository navigation
Pixel 8a (akita): touchscreen, its supplies, and the panel size - #241
Conversation
ABL can leave LDO4M at another voltage than the touch controller needs:
on a Pixel 8a it leaves 3.3 V, read back through the driver's own
get_voltage_sel, while the stock phone runs the Goodix GT9895 there at
3.0 V (its live device tree). With voltage selectors firmware-owned, a
board that fixes 3.0 V fails to probe ("failed to apply
3000000-3000000uV constraint: -EINVAL"), and one without a constraint
would power the controller at ABL's 3.3 V.
Give LDO4M and LDO25M a set_voltage_sel through the regmap, which goes
to the PMIC through ACPM as enable does. The selector tables are
Google's: s2mpg14-regulator.c puts LDO4M in voltage group 5 (1.8 V
minimum) and LDO25M in group 4 (0.7 V), each with 64 steps of 25 mV
(s2mpg14-register.h), and writes the selector into the low six bits of
the control register (0x2e and 0x43), as the descriptors here already
read it. The other S2MPG14 outputs keep firmware-owned selectors.
The core calls the setter only to bring a voltage into the board's
constraints, so a board without voltage constraints (zumapro-tegu), or
whose constraint already matches what ABL left (zuma-husky's fixed
3.3 V, which probes today without a setter), sees no write.
Tested on a Pixel 8a from slot B (7.3.0-rc6), with LDO4M fixed at
3.0 V and LDO25M at 1.8 V in the board file and nothing consuming them:
the core logs "touch-avdd: Bringing 3300000uV into 3000000-3000000uV";
both rails then read back 3000000 and 1800000 uV (the PMIC regmap has
no cache, so that is the register through ACPM), disabled, with no
users, and stay so past the unused-regulator cleanup. Nothing enabled
them in that boot.
Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/regulator/s2mpg14-regulator.c
Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/include/linux/mfd/samsung/s2mpg14-register.h
Assisted-by: Claude Opus 5.5
Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com>
The Pixel 8a's touch controller takes vdd from the S2MPG14's LDO25M at 1.8 V and avdd from its LDO4M at 3.0 V (the stock phone's live device tree; Google's zuma-akita-touch.dtsi fixes both and drops always-on). Describe the main PMIC on ACPM with those two regulators, as zuma-husky does, but with akita's 3.0 V avdd rather than the Pixel 8 Pro's 3.3 V. Nothing uses them yet: the touchscreen node follows in its own commit. Tested on a Pixel 8a from slot B (7.3.0-rc6, with the S2MPG14 setter): the core logs "touch-avdd: Bringing 3300000uV into 3000000-3000000uV" and both rails read back 3000000 and 1800000 uV, disabled, with no users, in a boot with no consumer. Assisted-by: Claude Opus 5.5 Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com>
The Pixel 8a's touchscreen is a Goodix GT9895 (Berlin) on USI2_HSI0's SPI, the bus, interrupt and reset lines of the Pixel 8 Pro's: 10 MHz, interrupt on gpn0-0 (falling edge, as stock's goodix,irq-flags = 2), reset on gpp21-2 (Google's zuma-akita-touch.dtsi; the stock phone's /proc/interrupts lists goodix_ts on gpn0 0 Edge). Both of stock's firmware files, goodix_firmware_ak3a.bin and goodix_firmware_ak3b.bin, carry "9895" in their Berlin header, so it takes the gt9895 match data (14-byte contact records), as the Pixel 7a does. The driver runs the firmware already on the chip and loads none. The supplies are the LDO4M and LDO25M described with the PMIC, at stock's 3.0 V and 1.8 V. Tested on a Pixel 8a from slot B (7.3.0-rc6), in a later boot than the one that first set the voltage: with the driver held back, the rails read 3.0 V and 1.8 V and off; loading goodix_berlin_spi enabled them and registered "Goodix Berlin Capacitive TouchScreen". Touches in the four corners came in at (110,121), (1004,118), (118,2311) and (971,2298), so no axis swap or inversion is needed, and 842 interrupts gave no checksum errors. In the next boots the driver loads by itself, and the PIN pad, the shell and the on-screen keyboard work by touch. Assisted-by: Claude Opus 5.5 Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com>
|
Thank you, @aninmucek. This went the way I hoped after #238: the supplies read back at 3.0 V and 1.8 V with nothing connected before the controller was ever powered, the driver held back for its first load and released afterwards, and four corners plus 842 interrupts with no checksum errors to show the 14-byte records are right. The 8a is usable by hand now, which is a real step. What I checked:
One thing before I merge, and one question. 1. The panel size. Your citation is right: 2. Which tree booted? The smoke report is from 01:14Z on On merging: this PR carries #240's commit, so I'll rebase-merge this one, which lands #240's commit first, and close #240 as landed. No rebase needed from you for that. |
Without a panel node, simpledrm estimates the display's size from its pixels at 96 dpi, so the compositor sees a 285x635 mm screen and the on-screen keyboard comes out a fraction of its height. Add a disabled panel node with width-mm and height-mm and point the framebuffer at it, as zuma-husky does. 64x141 mm is the lit area, measured with a ruler on a Pixel 8a: what a 6.1-inch 20:9 panel gives (63.6x141.3 mm), and the height Google's touch node names (goodix,panel-height-mm = <141>). Stock's own figure is larger than the glass: Google's panel-google-ak3b.c gives the ak3b 70x149 mm, and the stock phone's DPI follows from it (dumpsys display: xDpi 391.885, yDpi 409.127 for 1080x2400), so stock sizes everything about 9 % small. The comment names both. Tested on a Pixel 8a from slot B (7.3.0-rc6): Hyprland reports the monitor as 64x141 mm (285x635 mm without the node), and the on-screen keyboard comes out at its normal height. An earlier boot with stock's 70x149 mm also worked, with everything about 9 % smaller. Assisted-by: Claude Opus 5.5 Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com>
0d0f8ec to
9613d79
Compare
|
Thank you, and you're right about the panel size. I took stock's figure without weighing it against our own NOTES.
The other three commits are unchanged, so #240's commit is still |
|
Thank you, @aninmucek. Both points from last time are done.
The other three commits are unchanged, and #240's commit is still One thing on my side, not yours: the CI job for this push was cancelled while it was still installing its tools, so it never reached the checks. I'll re-run it, and once it's green I'll rebase-merge this, which lands #240's commit first, and close #240 as landed. omarchy-mobile#650 follows right after. The 8a has buttons and touch now. Nice work. |
The Pixel 8a's touchscreen, its supplies, and the panel's physical size. This finishes akita's M3 (input) after #238's buttons.
Stacked on #240 (the S2MPG14 supply setter): until it merges, the diff also shows its commit,
7d143b515. The three commits that are this PR:-EINVAL.goodix,gt9895with 14-byte contact records, as on the 7a.goodix_firmware_ak3a.binand_ak3b.bin, carry9895in their Berlin header.gpn0-0(falling edge, stock'sgoodix,irq-flags = 2), reset ongpp21-2. Pin groups come fromzuma-pinctrl.dtsi.panel0node, with 64×141 mm, the lit area measured with a ruler.goodix,panel-height-mm = <141>).width_mm/height_mmin Google'spanel-google-ak3b.care 70×149, and stock's DPI follows from them (xDpi 391.885, yDpi 409.127). The comment names both. (Updated after your review; the first version used 70×149.)Tested on a Pixel 8a from slot B (7.3.0-rc6,
fc7086a68+ #240 + these three; the last boot was release…g3933790300a1), one change per boot, as you asked on #238:The supplies with no consumer:
touch-avdd: Bringing 3300000uV into 3000000-3000000uV. The rails read back 3.0 V and 1.8 V, disabled, with 0 users (the evidence in regulator: s2mps11: Let the S2MPG14 touch supplies set their voltage #240).The touchscreen, in a later boot: with
goodix_berlin_spiheld back by a modprobe blacklist, the rails read 3.0 V and 1.8 V and off. Then the driver was loaded by hand:The blacklist was then removed.
The next boots, with the driver loading by itself at 3.6 s:
The panel size: first with stock's 70×149 mm. Then, after your review, with the measured 64×141 mm: Hyprland reports 64×141, and the keyboard is at its normal height. That's the tree here:
zuma-akita.dtsis blob3714d9502168.What isn't covered:
tools/kernel-pr-check --build OUT --merge origin/omamobile, with the dtschema validator, passes everything over the four commits (#240's included):fc7086a68;checkpatch --strictwith no errors and no warnings;drivers/regulator/s2mps11.cbuilds withW=1;W=1and passdtbs_check, with no new warnings.tools/phone-smokereport (the 64×141 boot, omarchy-mobile main)phone-smoke: akita
Kernel
7.3.0-rc6-omamobile-push1-g3933790300a1, tools at2db3f2b, 2026-11-11T16:33Z.Packages: hyprland 0.57.0-3.2, libcamera 0.7.2-4.23, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.2-1, omamobile-device-akita 0.1.1-1, omamobile-firstboot 0.1.3-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-omarchy 0.1.38-1, omamobile-owl-widgets 0.1.2-1, omamobile-shell 0.2.108-1, omamobile-voice 0.1.0-1, omaphone 0.2.3-1, omarchy 4.0.6-1, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1
🤖 Generated with Claude Code