Repository navigation
Conversation
Somnius
left a comment
There was a problem hiding this comment.
Tested on the same second Pixel 8 Pro (Kioxia 256 GB UFS 4.0) with the husky-test-20261031-c6 tag (c7a0b2e), built with the repo's husky config, then modules-push and a reboot. The details are in my comments on #1. Short version: salixp binds at about 3.7 s and logs sense echo yes events 2, SALIXP Touchscreen shows up as an input device, and decoded raw events from hand taps on the four corners and the centre land in the right corners on 0..1343 by 0..2991 with no swapped or flipped axis. On screen I swiped up on the lock screen, entered my PIN on the pad and it unlocked, then used the app drawer, quick settings and Omarchy's menu by touch. Same salixp lines and firmware (fw 0083, afe/cx/panel 03) as Brett's phone.
ACPM: I confirmed the module-order problem I mentioned on #1. One note for the fix: the skip on -EPROBE_DEFER isn't in this diff. It's the existing channel loop in exynos-acpm.c on omamobile (no mailbox channel (%pe), skipped, around line 739 on 1c5ba1a), and #153's change to that file only adds the zuma match data. So the defer fix changes a loop that gs101, gs201 and zumapro also run: it should defer for -EPROBE_DEFER and keep the continue for channels that really can't be used (the queues-outside-the-SRAM case a few lines above), or the cheetah behaviour changes.
Gate: tools/kernel-pr-check --build --merge on this PR in the project container. It merges cleanly onto today's omamobile (1c5ba1a), the 21 commits are signed off by their authors, prefixes are fine, checkpatch --strict has no errors (the UNKNOWN_COMMIT_ID warning on the Fixes: sha in 20f2645 is only because that commit isn't in my shallow clone, it exists in this repo), the W=1 builds of the 5 touched C files are fine and the 8 device trees build with no new warnings. dt_binding_check and dtbs_check didn't run locally (no dtschema); the CI job for this PR passes.
Shared code: the changes are additive. exynos-acpm.c gets the zuma match data, spi-s3c64xx.c gets google,zuma-spi (the same port config as zumapro, and zuma.dtsi has the gs101 fallback like the other SoCs), and the pinctrl change only touches zuma_pin_ctrl. salixp's echo wait goes from 50 ms to 2.5 s: the loop msleeps while the FIFO is empty and stops at the echo, so the worst case is 2.5 s without CPU use. gs201-felix.dts also binds salixp, so a Fold is the one place this could show up (felix blacklists the module's autoload, and I can't test one).
What I didn't review: the tables in clk-zuma.c, the 303-line zuma-pinctrl.dtsi and the bindings, against Google's tree. They work on my phone, and that's all I can say about them.
|
Not a review, just a heads-up from the 9a since this adds |
|
Thanks Brett, great work getting touch up on zuma. I spot-checked clk-zuma.c against Google's CMUCAL tables: the offsets and fields match, and the other phones' DTBs don't change. #148 is merged, so this rebases down to the touch commits. One thing before merge: the ACPM defer fix you mentioned on issue #1 isn't in the head yet. That loop is shared with the Pixel 6, 7 and 9a, so please make it its own commit that returns -EPROBE_DEFER from |
The channel loop skips a channel that gets no mailbox, so that one bad
channel doesn't fail the rest. -EPROBE_DEFER isn't such a channel: it
only means the mailbox driver hasn't probed yet. When ACPM probes
first, every channel is skipped, the probe succeeds with "16 channels,
0 usable" and never retries, and everything behind ACPM fails for the
whole boot. On the Pixel 8 Pro the touchscreen then can't enable its
supply ("error -ENODEV: enabling vdd").
This happens when a module load or `udevadm trigger` binds ACPM ahead
of the mailbox, or with fw_devlink=permissive, which drops the
supplier ordering.
Return -EPROBE_DEFER from the probe instead, so it runs again once the
mailbox is there. Keep skipping the channels for any other error, and
the ones whose queues are outside the SRAM. The channels already
requested are freed by the devm action, and the per-channel buffers
are devm allocations.
Fixes: c8e4c99 ("firmware: samsung: acpm: skip channels the AP cannot use")
Assisted-by: LLM
Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Document zuma's (Tensor G3) CMU_TOP and CMU_HSI0 as far as the touchscreen's SPI needs them: CMU_TOP's HSI0 NoC and peripheral clocks, and CMU_HSI0's USI2 clocks with the NoC path its bus clock comes from. HSI0 takes the board-level ALT clock as an input. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma has no clock driver, and the bootloader leaves HSI0's USI2, the touchscreen's SPI, at 399.36 MHz (PLL_SHARED2 / 2). The SPI controller takes its rate from the CMU, so the bus would run at a quarter of that, far above the 10 MHz stock gives the touch controller. Describe the path from CMU_TOP's shared PLLs to USI2, with registers and parents from Google's GPL CMUCAL tables for zuma. Only USI2's divider and its three gates are written; the PLLs, muxes and the other dividers and gates are read-only and keep their firmware settings. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Add the 24.576 MHz oscillator, HSI0's ALT input at the CAL's nominal 213 MHz, and the TOP and HSI0 clock controllers. Nothing consumes them yet; the touchscreen's SPI will. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's (Tensor G3) AP-to-APM mailbox is gs101's, as on gs201 and Tensor G4: same registers, one interrupt and one bus clock. Document it with gs101's compatible as the fallback. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's (Tensor G3) ACPM firmware speaks the same protocol, from the same shared memory layout, as Tensor G4's, and its main PMIC is the same S2MPG14. Document its compatible, with the S2MPG14 as its main PMIC. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Pixel 8 Pro's (Tensor G3) main PMIC is the S2MPG14, at the same ACPM channel and with the same touchscreen rails on LDO4M and LDO25M. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's ACPM firmware keeps its channel table at 0xa000 in the APM SRAM, as stock's device tree gives it (initdata-base). Add zuma's match data. No driver binds its clocks device yet. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Add CMU_APM, the AP-to-APM mailbox (SPI 80), the APM SRAM and the ACPM firmware node, at the addresses stock's acpm_ipc node gives them. CMU_APM is read-only: it only names the mailbox's and the SRAM's clocks, which the always-on domain keeps running. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Describe the S2MPG14 behind ACPM. No regulators yet: each will come with its consumer, starting with the touchscreen's. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's (Tensor G3) USI blocks are Exynos850-style, like Tensor G4's: the mode lives in a system register, and the block's own control sits at offset 0xc0. Document zuma's compatible with the Exynos850 fallback. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
HSI0's system registers hold the USI mode of the touchscreen's USI2. Like zuma's UFS sysreg, it takes no clock: HSI0 is firmware-owned. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's (Tensor G3) SPI controllers are gs101-style, as on Tensor G4. Document zuma's compatible with gs101's as the fallback. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
zuma's (Tensor G3) SPI controllers match Tensor G4's: rate from the CMU, 64-byte FIFOs, 32-bit access. Stock drives the Pixel 8 Pro's touchscreen with manual chip select (samsung,spi-chip-select-mode = <0>), as the Pixel 9a's, so use Tensor G4's port configuration, which holds native chip select for a whole message. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
… controllers Add the CUSTOM_ALIVE controller at 0x15060000 (gpn0-gpn9, one wake-up interrupt each, SPI 0 to 9) and PERIC1 at 0x10c40000 (gpp19-gpp24, SPI 649), with the banks and interrupts of stock's live device tree, as controllers 1 and 12 of the driver's zuma data. CUSTOM_ALIVE's bus clock comes from CMU_APM; PERIC1 takes the bus-clock stand-in, as PERIC0 does. The touchscreen's attention line is on gpn0 and its reset on gpp21. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
Add HSI0's system registers and USI2 at 0x111d00c0 with its SPI controller (SPI 408), clocked from CMU_HSI0, as stock's spi@111D0000 (usi-offset 0x101c). This is the touchscreen's bus. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Pixel 8 Pro's FTM5 firmware first reports a forced calibration (status 43 05 01) after the scan command, then echoes the command about 60 ms after it was sent, past the 50 ms window. Probe then failed with "turning sensing on". Wait up to 2.5 s, as stock's checkEcho does (TIEMOUT_ECHO), and stop polling once the echo arrives, so the longer window costs nothing when the firmware answers promptly. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
The Pixel 8 Pro's touchscreen is an ST FTM5 (SALIXP, chip id 36 40) on USI2's SPI, as in stock's fts node: 10 MHz, attention on gpn0-0, reset on gpp21-2, 1344 x 2992. Its rails are the main PMIC's LDO25M (1.8 V digital) and LDO4M (3.3 V analog), which the firmware leaves off and at those voltages. Pin them there, as stock does. Stock's node inverts both axes, but salixp already reports in the panel's orientation: with stock's inversion, a tap at the top-left came in at the bottom-right. Assisted-by: LLM Signed-off-by: Brett-Michael Green <brett@bmgvisualtech.com>
99fe40c to
10c6a39
Compare
|
Thanks, Derek. I rebased onto omamobile now that #148 is in, so the PR is down to the touch commits (18). The ACPM deferral is its own commit now, first in the series: I tested it on husky with
The zuma.dtsi comments: the USB control block and DWC3 comments are back above The LDOs: done. LDO4M is pinned to 3.3 V and LDO25M to 1.8 V. The driver already read those voltages, so this changes nothing at registration. It stops a consumer from moving them.
@Somnius, thanks for the second-phone test and the review, and for pinning down the loop. @W4HO-ham, noted on #150. Nothing on husky streams over this port yet, but I'll keep it in mind. |
|
Booted the ACPM defer commit (8ff899d) on my Pixel 7 Pro on top of my test kernel (7.3.0-rc6-omamobile-push1-gd15487384604): ACPM comes up as before (15 channels, 14 usable, the known type-2 channel skipped), and everything behind it works: the S2MPG12 RTC, GPU devfreq (12 levels), the AoC rails on both PMICs, the speaker amplifiers, and phone-smoke passes 19 of 19. Merged, thanks Brett! The two block comments in zuma.dtsi (USB control block and DWC3) can be moved back in your next PR. #157 and #158 rebase down onto this now; please push the g1, g2 and c1 tags for them. |
This series gives the Pixel 8 Pro its touchscreen. The touchscreen is an ST FTM5 (SALIXP, chip id 36 40) on HSI0's USI2 SPI, powered from the main PMIC's LDO4M and LDO25M. The series adds what that path needs: zuma's first clock driver, ACPM and the S2MPG14, the USI and SPI, and two more pin controllers. It also has one salixp fix.
Stacked on #148 (buttons): it uses #148's ALIVE pin-controller work, so its first four commits are #148's. Review from
dt-bindings: clock: google: Add the Tensor G3 TOP and HSI0 CMUson. The branch merges cleanly into the currentomamobile.Clocks
dt-bindings: clock: google: Add the Tensor G3 TOP and HSI0 CMUs:google,zuma-cmu-top,-cmu-apmand-cmu-hsi0, withinclude/dt-bindings/clock/google,zuma.h. These cover only the clocks the touchscreen path uses.clk: samsung: Add the Tensor G3 touchscreen SPI clocks:clk-zuma.c, with registers and parents from Google's GPL CMUCAL tables for zuma.arm64: dts: exynos: google: zuma: add CMU_TOP and CMU_HSI0: the 24.576 MHz oscillator, HSI0's ALT input (213 MHz nominal) and the two controllers.ACPM and the PMIC
4–7. Bindings and the driver match for the mailbox, ACPM and S2MPG14 (
google,zuma-mbox,google,zuma-acpm-ipc), and the s2mpg14 description:0xa000, as stock'sinitdata-basegives it.arm64: dts: exynos: google: zuma: add ACPM and its mailbox: CMU_APM (read-only), the AP-to-APM mailbox (SPI 80), the APM SRAM and the ACPM node, at stock's addresses.arm64: dts: exynos: google: zuma-husky: add the main PMIC: the S2MPG14. Its regulators come with their consumers.The bus
10–13. Bindings for the USI (Exynos850-style), the HSI0 sysreg and the SPI (gs101-style), and the
spi-s3c64xxmatch:arm64: dts: exynos: google: zuma: add the CUSTOM_ALIVE and PERIC1 pin controllers: CUSTOM_ALIVE (gpn0–gpn9, one wake-up interrupt each) and PERIC1 (gpp19–gpp24). The touchscreen's attention line is on gpn0 and its reset on gpp21.arm64: dts: exynos: google: zuma: add HSI0's USI2 and its SPI: the HSI0 sysreg, USI2 and its SPI (SPI 408), as stock'sspi@111D0000.The touchscreen
Input: salixp: stop at the scan echo, and wait up to stock's 2.5 s: husky's firmware reports a forced calibration (43 05 01) after the scan command and echoes the command after salixp's 50 ms window, so probe failed with "turning sensing on".TIEMOUT_ECHO.arm64: dts: exynos: google: zuma-husky: add the touchscreen: 10 MHz, 1344 × 2992, with the LDO25M (1.8 V) and LDO4M (3.3 V) rails. It leaves out stock's axis inversion: salixp already reports in the panel's orientation, and with the inversion, taps came in rotated 180°.Tested on a Pixel 8 Pro. The tests booted the U4 Omarchy image (omarchy-mobile#187) from
userdatawith U4's kernel config, on greenbrettmichael/linux-omarchy-mobile tags.husky-test-20261031-c5: this series with the echo wait as a plain 2.5 s delay.husky-test-20261031-c6: this series' head. Since then, only blank lines between parent arrays inclk-zuma.chave changed, for checkpatch.runningwith no failed units.Checks:
kernel-pr-check --buildon the series:--strictshows 0 errors and 0 warnings (its three blank-line checks are fixed in the head);🤖 Generated with Claude Code