Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5eb07d7
MODEM-PLAN: GNSS G3 fifth to twenty-fourth tries, the SPI link
W4HO-ham Oct 29, 2026
70ffe18
MODEM-PLAN: GNSS G3, stock's clock and mode 1 reads
W4HO-ham Oct 29, 2026
d0fd5ac
MODEM-PLAN: GNSS G3, bytes lost at each chip-select release
W4HO-ham Oct 29, 2026
b342e97
MODEM-PLAN: GNSS G3, chip select held across a message
W4HO-ham Oct 29, 2026
3a8619a
MODEM-PLAN: GNSS G3, Kepler one bit late at feedback delay 3
W4HO-ham Oct 29, 2026
bcda1c5
MODEM-PLAN: GNSS G3, stock's clock read correctly, and the link hang
W4HO-ham Oct 29, 2026
a12fd60
MODEM-PLAN: the CP link hang, read from the CPIF source
W4HO-ham Oct 29, 2026
0dacd93
MODEM-PLAN: correct the CP link hang reading
W4HO-ham Oct 29, 2026
785bdc0
MODEM-PLAN: GNSS G3 on 10-29 morning, the clock and the cut fixed
W4HO-ham Oct 29, 2026
7de735f
MODEM-PLAN: GNSS G3 parked without a hardware probe
W4HO-ham Oct 29, 2026
bd24a2d
device/tegu MODEM-PLAN: one copy of the twenty-fourth try, headings f…
W4HO-ham Oct 29, 2026
3bc0c74
device/tegu NOTES: the two resets at about 34 s after Bluetooth started
W4HO-ham Oct 29, 2026
1d4055b
device/tegu MODEM-PLAN: the partition check after the GNSS night
W4HO-ham Oct 29, 2026
e7b7feb
device/tegu MODEM-PLAN: the GNSS kernel changes are linux-omarchy-mob…
W4HO-ham Oct 29, 2026
cf9ff1c
device/tegu MODEM-PLAN: the GNSS night's test code is public
W4HO-ham Oct 29, 2026
aafd1f4
device-raven 0.1.27, tools: haptics through feedbackd on the CS40L25A…
robotosaith Oct 29, 2026
c04addf
docs/review: lessons from review round 29 (#160)
derekross Oct 29, 2026
d3b7c07
omamobile-modem 0.1.8, extract-vendor-chroot: gnssd's custom GNSS lib…
W4HO-ham Oct 29, 2026
9ec37d7
device/tegu MODEM-PLAN: the GNSS night's round-two fixes
W4HO-ham Oct 29, 2026
4d52467
device/tegu: fingerprint F6c-F10 (works) and GNSS G3's third and four…
W4HO-ham Oct 29, 2026
b552c67
tools/power-ab: a systemd suspend mode, and a gauge without charge_co…
W4HO-ham Oct 29, 2026
7162129
device/tegu NOTES: the TAS2572 RCA profile is linux-firmware's, not t…
W4HO-ham Oct 29, 2026
df8d568
device/tegu MODEM-PLAN: what the kept consoles say about the morning'…
W4HO-ham Oct 29, 2026
0294616
Merge main into tegu-gnss-g3-night after #138
W4HO-ham Oct 29, 2026
4f1e95a
device/tegu MODEM-PLAN: stock's SPI configuration for the GNSS link, …
W4HO-ham Oct 29, 2026
d46d6de
device/tegu MODEM-PLAN: eight hangs, the hold-the-link step under G3-…
W4HO-ham Oct 29, 2026
1600fc6
device/tegu NOTES: the 03:03 reset read from the journal
W4HO-ham Oct 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 152 additions & 1 deletion device/raven/HAPTICS-TORCH-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

Status (2026-10-15): **the torch works** (kernel `gd2521ee96675`, branch
`omamobile-gs101-torch`); the owner tested the LED and the quick-settings
tile. **Haptics: not started** (a CS40L25A, where cheetah has a CS40L26A).
tile. **Haptics work** (2026-10-28): the CS40L25A B1 (cheetah has a
CS40L26A) through `cs40l25-vibra` (kernel derekross/linux-omarchy-mobile#114)
and feedbackd; key presses tick (section 2, H5).
Cheetah's plan: [device/cheetah/HAPTICS-TORCH-PLAN.md](../cheetah/HAPTICS-TORCH-PLAN.md).

## 1. Torch: TI LM3644TT
Expand Down Expand Up @@ -35,3 +37,152 @@ gpa6, with its own codec node on the AoC card's haptics back end
`cs40l25a_clab.wmfw`, `cs40l25a_par.wmfw` and their `.bin` files.
Mainline has no CS40L25A driver; cheetah's CS40L26 work is the starting
point (both are Cirrus haptic DSPs, different register maps).

**H0 (2026-10-27, `g64b532aaf7e8`, read-only):** stock's `hsi2c_8` is
`i2c@10970000`, which our DT already enables (`i2c-1`, a camera EEPROM at
0x50); there's no node at 0x43 yet. The reset line `gpp24-0` is an output
driven high (the bootloader leaves the chip out of reset), the trigger
`gpp24-3` an output low. Two reads over I2C (32-bit registers at 32-bit
addresses, `i2ctransfer -f -y 1 w4@0x43 0 0 0 <reg> r4`): `DEVID` (0x0)
`0x0040A25A`, a CS40L25A; `REVID` (0x4) `0xB1`. The vendor image's
`/firmware` has `cs40l25a_cal`, `_clab` and `_par` (`.wmfw` and `.bin`)
and `cs40l20.bin`; `extract-vendor-firmware -d raven` doesn't stage them
yet. Stock's node (`gs101-raviole-audio.dtsi`): IRQ gpa6-5, reset gpp24-0,
trigger gpp24-3, boost 1000 nH / 4 uF / 4500 mA peak, 7.5 V (CLAB 7.5 V),
OVP 12 V, f0 153 Hz (140-165), `fw-id-remap` 0x1400CB.

**Next:** a driver. Nothing in our tree or mainline supports the
CS40L25 (cs40l26-vibra and mainline's cs40l50 are the newer Halo-core
parts); Google's GPL `cs40l2x` (its raviole kernel's amplifiers modules) is
the citable reference for the boot, firmware and wavetable interface.
Read alongside Google's GPL `cs40l2x` (Cirrus Logic's driver in Google's
raviole kernel, `kernel/google-modules/amplifiers`, branch
`android-gs-raviole-mainline`, `cs40l25/`; GPL-2.0; local reference copy
in `~/android/google/amplifiers-raviole`, never committed).

**H0b (the same day, read-only, the boot checks Google's probe makes):**
`IRQ1_STATUS4` (0x1001C) 0x3, OTP boot done; `IRQ1_STATUS3` (0x10018)
0x2000002f, no OTP error (bit 31 clear); `BASIC_AMP_STATUS` (0x280018C)
0x1, basic-mode boot done; `BASIC_HALO_HEARTBEAT` (0x2800158) 0x4bace,
0x4bb9e 200 ms later, about 1 kHz. So the bootloader leaves the chip in
basic mode with its ROM firmware running, which is what Google's probe
expects. The B1 core is Halo, as the CS40L26's, so mainline `cs_dsp`
covers its DSP.

**What Google's probe does on a CS40L25A B1** (`cs40l2x_part_num_resolve`
and the `B1ROM` paths): wait for OTP boot; read DEVID and REVID; exit
basic mode (`cs40l2x_basic_mode_exit`: wait for basic boot done and a
moving heartbeat, then hand the chip to the driver); apply and sequence
the B0 errata. On a CS40L25A the firmware ID is the DT's remap (stock:
`CLAB`, 0x1400CB; `B1ROM` 0x1400BA is refused as a remap), and probe
always ends by loading that RAM firmware (`cs40l25a_clab.wmfw` and its
coefficient files). The ROM heartbeat seen in H0b is basic mode, a
stand-alone ROM program the handover shuts down: nothing plays until the
RAM firmware runs. (An earlier version of this plan said the B1 could play
from ROM; it can't, through this driver's path.) A waveform plays by writing its index to the firmware's mailbox
(`MBOX_TRIGGERINDEX`, DSP virtual mailbox 1): 0 the vibration, 0x1-0x7FFF
clicks, 0x8000-0xFFF6 continuous; `MBOX_POWERCONTROL` (mailbox 4) wakes
and hibernates it.

**Runbook (each step gated; read-only first; a step that writes is the
human's call):**

| Step | What | Writes | Pass | Stop | Risk |
| --- | --- | --- | --- | --- | --- |
| H1 | a driver probe that reads only: IDs, OTP and basic-mode status, the heartbeat | none | `CS40L25A revision B1`, heartbeat moving | any read error | low |
| H2 | reset pulse, basic-mode handover and the B0 errata, as Google's probe | reset, the handover, the errata | state machine SHUTDOWN, no OTP or amplifier error, the basic-mode heartbeat stopped | any error flag, no acknowledge (rollback: a reset pulse returns basic mode) | low-medium |
| H3 | the RAM firmware (`cs40l25a_clab.wmfw` and coefficients) through `cs_dsp`, as stock | firmware | firmware ID 0x1400CB, heartbeat moving, DSP scratch 0 | load error, scratch non-zero | medium |
| H4 | boost from stock's DT (1000 nH, 4 uF, 4.5 A peak, 7.5 V), one short click at a low gain | boost, gain, one mailbox write | one tick felt, no fault IRQ | a fault IRQ, a buzz that doesn't stop (rollback: reset pulse) | medium |
| H5 | FF_RUMBLE through the input layer, feedbackd's udev rule as cheetah's | as H4 | the shell's haptic feedback | as H4 | low |

**H1 result (2026-10-27, `g64b532aaf7e8`):** passed. The read-only probe
(`omamobile-gs101-haptics`, NOT FOR MERGE `cs40l25-h1`, an out-of-tree
module bound by hand through `new_device`) logged `devid 0x40a25a revid
0xb1, OTP boot done, basic mode booted, heartbeat 420111 -> 420133 in 20
ms`; unbound and unloaded afterwards.

**H2 result (the same day, `g64b532aaf7e8`):** passed (`cs40l25-h2`, the
same branch, bound the same way; `libgpiod` installed on the phone first
so a reset pulse on gpp24-0 can undo it). `basic mode shut down (state
4), no error flags; revert and errata written (trim12 0x002f0065, trim13
0x00002b4f); basic-mode heartbeat stopped`. Read by hand after it: state
4, `BASIC_AMP_STATUS` 0x1, the heartbeat still 0xadacb 200 ms later.
`IRQ1_STATUS3` went 0x2000002f to 0x2000003f: bit 4, PLL unlock in the
CS35L41's layout of the same block, latched by the PLL errata (no error
bit). (Later the same day: the PLL errata keep the lock; what unlocks the
PLL is the revert's `PWR_CTRL1` = 0, global enable off; see H3.) The
chip stays shut down until a reset.

**H3 and H4 (the same day, `g64b532aaf7e8`): the firmware runs and the
motor buzzes.** `cs40l25-h3` (the same branch; the owner's
`cs40l25a_clab.wmfw` and the wavetable `cs40l20.bin` from the factory
image, copied to the phone's `/usr/lib/firmware/updates/` for the test,
never into the repo), in this order, as Google's probe:

1. the basic-mode handover and B0 errata (H2);
2. `cs40l2x_init()`: stock's boost (K1/K2 0x24, slope 0x75, peak 0x4a,
7.5 V 0x64, OVP 0x130) and its short test (passed, `IRQ1_STATUS1`
0x01c00000), the PCM routing, wake sources 0x98 (I2C SDA and GPIO1);
3. the firmware through `cs_dsp` (the CS40L50's Halo memory map, system
info at 0x25e0000): `Firmware: 1400cb vendor: 0x2 v10.7.9, 2
algorithms`, `cs40l20.bin (v2): v10.3.2`;
4. in `pre_run`, `cs40l2x_dsp_pre_config()`'s controls (an empty power-on
sequence, GPIO1 button detection, GPIO1 and events off, the IRQ2 mask
sequence and valid), the DSP errata, memory-ready and global enable.

`HALO_STATE` settles at **201**, not the 203 the cs40l2x tables give
(Google's mainline and Android 14 branches alike), and stays there. What
took a while: the firmware drops global enable itself, and the PLL,
locked to the MCLK on GPIO2 (`PLL_CLK_CTRL` 0x15: MCLK, enabled, 32 kHz;
locked in basic mode, so the clock is wired and running), unlocks with
it. So 201 is the firmware's idle state on this setup, not a hang;
neither `lock_regions`, the power-on sequence nor any other control
changed it.

H4: with the firmware idle, index 1 written to the trigger mailbox
(`MBOX_TRIGGERINDEX`, 0x13020) was taken within 5 ms; the firmware set
global enable, the PLL locked, no error flag came up (`IRQ1_STATUS1`
unchanged), and the owner felt **a strong vibration for about half a
second**, until the test's reset pulse 0.5 s later. So index 1 may not be
a short click in this wavetable, or nothing stopped it; and it played at
the firmware's default gain. Next: the waveform list and lengths
(`NUMBEROFWAVES`, the wavetable header), a stop, a low gain, then a short
click; then FF_RUMBLE.

The firmware files stay off the repo: `extract-vendor-firmware -d raven`
gets them from the owner's factory image when H3 needs them.

**H5 (2026-10-27/28, `g97f09c8cfada` and `g3ba8c15c89b8`): passed.** The
bring-up probes became one driver, `cs40l25-vibra` (kernel
`omamobile-gs101-haptics`, upstream as derekross/linux-omarchy-mobile#114,
with its binding and raven's node), which probes at boot from the DT and
exposes FF_RUMBLE through ff-memless:

- a start plays the continuous effect (index 0) through the trigger
mailbox, a stop writes ENDPLAYBACK;
- the strength sets the firmware's trigger gain, mapped onto -8 to -18 dB;
- themes ask for 7-12 ms clicks, shorter than the actuator needs to build
up, so a stop is held back to 30 ms (`min_on_ms`).

feedbackd drives it through `72-omamobile-feedbackd.rules` (FEEDBACKD_TYPE
vibra, as cheetah's CS40L26). The owner confirmed key-press haptics on
the on-screen keyboard.

**H5 again (2026-10-28/29, `ge1e6adb69bbf`): passed** on the reworked driver
that lands with #114 (reset active low, boost from the DT): the CS40L25A
(revision B1) probes at boot with firmware 0x1400cb running, and key
presses on the on-screen keyboard still tick.

**The boot race:** the motor's input device appears only once its
firmware has loaded, about 5 s into the boot. feedbackd, started by D-Bus,
only looks for haptics devices when it starts, so a boot where something
asked for feedback first ran without haptics until feedbackd was restarted
by hand. The rule now also starts `omamobile-feedbackd-rescan.service`
when the motor appears, which stops a running feedbackd; the next request
starts it again with the motor. Checked on the phone by replaying the
motor's arrival (`udevadm trigger --action=add`): feedbackd was stopped,
the next request started a new one, and it buzzed.

Not yet: the IRQ, hibernation, braking (the CLAB configuration
`cs40l25a_clab.bin` is extracted but not loaded), calibration and the codec
path.
11 changes: 7 additions & 4 deletions device/raven/kernel.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@
# about a symbol a kernel doesn't have, so the published kernel still builds:
# the AoC (omamobile-gs101-aoc), the modem's SPI boot device
# (omamobile-gs101-cpif), the panel (omamobile-gs101-display), the touch
# transport (kernel #8) and the thermal sensors (kernel #7).
# transport (kernel #8), the thermal sensors (kernel #7) and the haptic
# driver (kernel #114).
# The AoC drivers against gs101's firmware interface (AUDIO-PLAN.md R0).
CONFIG_GOOGLE_AOC_GS101=y
# The modem (S5123) takes its first boot stage over SPI bus 9 before its PCIe
# link (device/raven/MODEM-PLAN.md section 2). Cheetah's CPIF options come
# from kernel/configs/omamobile.config; this adds the SPI boot device.
CONFIG_BOOT_DEVICE_SPI=m
# Raven's own hardware, as modules (BRINGUP-M1.md, DISPLAY-PLAN.md): the
# S6SY79x touchscreen through s6sy761, the S6E3HC3 panel and the gs101
# thermal sensors through ACPM.
# Raven's own hardware, as modules (BRINGUP-M1.md, DISPLAY-PLAN.md,
# HAPTICS-TORCH-PLAN.md): the S6SY79x touchscreen through s6sy761, the
# S6E3HC3 panel, the gs101 thermal sensors through ACPM and the CS40L25A
# haptics.
CONFIG_TOUCHSCREEN_S6SY761=m
CONFIG_DRM_PANEL_SAMSUNG_S6E3HC3=m
CONFIG_GS101_ACPM_THERMAL=m
CONFIG_INPUT_CS40L25_VIBRA=m
68 changes: 67 additions & 1 deletion device/tegu/FINGERPRINT-PLAN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- SPDX-License-Identifier: MIT -->
# Fingerprint plan (tegu / zumapro): fingerprint unlock on the palmtop

Status (2026-10-28): **F0 and F2-F5 passed (F4, the first RPMB write, on 2026-10-27 under D1 = A); F6a and F6b passed; F6c waits for the factory calibration, which the owner fetched on 2026-10-28.** Earlier: **research and plan only, nothing run on the palmtop for
Status (2026-10-29): **works on the owner's kernel: F0-F10 passed. The enrolled finger matches and other fingers don't, through the HAL and through fprintd, and the lock screen unlocks by fingerprint.** It runs on `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`, the integration tree, with tg4c's LHBM loaded by hand. That LHBM isn't in the published tree yet: it's open as derekross/linux-omarchy-mobile#126, on the panel's own bands, which need no DSI reads (the reads are derekross/linux-omarchy-mobile#125, used only for the overdrive experiments). It also needs the bridge and runner fixes in #135. (F4, the first RPMB write, ran on 2026-10-27 under D1 = A.) Earlier: **research and plan only, nothing run on the palmtop for
fingerprint.** Stage 16 of ALL-HARDWARE-PLAN (private). The
Pixel 7 Pro stack works ([cheetah FINGERPRINT-PLAN](../cheetah/FINGERPRINT-PLAN.md),
opt-in); this plan says what carries over to the Pixel 9a and what is new.
Expand Down Expand Up @@ -533,3 +533,69 @@ needs them.
and its id stay in the owner's private reference folder, never in the
repository or a log. Next: hand it to the TA from Linux, without writing
`mfg_data`.
- 2026-10-28, afternoon: the HAL injects the calibration itself
(`DataSynchronizer::injectMtCali`). It reads a 112-byte header from offset
0 of `/dev/block/by-name/mfg_data` and logged "No SA calibration present"
on the zeros. The file `get-cal-url` names has exactly that layout: magic
`0xca11ca11`, version 1, and at 0x6c the payload length (file size − 112).
With the file written at offset 0 of the chroot's private `mfg_data.img`
copy (the real partition untouched), the "No SA calibration" line is gone
and the HAL sets `vendor.gf.cali.state = 1`. Next: enrollment (F8/F9, the
owner's finger).

## F7-F8 results (2026-10-28, evening, `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`)

- **F7 seen by eye.** LHBM, ported into the upstream-form `panel-google-tg4c`
(`allow_lhbm=1`, `local_hbm_mode` and `local_hbm_max_timeout` on the
backlight device), lit
the circle at 120 Hz, and the owner saw a white circle at the sensor.
- **F8 passed: a finger is enrolled.** With the factory calibration in
the chroot's `mfg_data.img`, the bridge (rebuilt for the runner's
`--panel`) and `omamobile-fp-ctl enroll`: FINGER DOWN, ACQUIRED, and
PROGRESS counting down from 12 to 0, then ENROLLED.
- **F9 doesn't match yet.** Every authenticate touch comes back ACQUIRED 2
(PARTIAL), with the HAL logging `valid_area=100` but `image_quality=29`.
A 300 ms LHBM settle changed nothing. Lead: the port wrote only `0x87 0x05`.
Google's tg4c first writes the LHBM brightness, the panel's own RGB values
per band read from 0xD1 on CMD2 page 2 plus an overdrive offset chosen by
the gray level under the circle, and then the LHBM gamma
(`0x6F 0x07; 0x87 0x01-0x04` by brightness).
- **F9, later that evening.**
DSI reads now work (`gs-dsim-cmd` read support: the read request needs
`DSIM_PKTHDR_BTA`, bit 24), so the LHBM brightness bands are read from the
panel and written with overdrive group 0 and the gamma. PARTIAL stayed.
The HAL's log then showed three bridge and runner bugs (omamobile-fingerprint
0.1.11, PR #135): the HAL got raw touchscreen positions (10x panel pixels,
5432,17847 for the 540,1756 circle), it captures at
`onPointerDownWithContext` (before `onUiReady`, while the circle was still
dark), and it parses the refresh rate after the `@` in
`panel0-backlight/state` (`on: 1080x2424@120`; a bare `on` logged "Failed
to parse refresh rate"). With all three fixed, enrollment completes and
authenticate captures come back GOOD and reach the matcher, but every one
is NOMATCH at `image_quality` 15-26, at screen brightness 1500 and 3628
alike. Lead one: Google overdrives only the first stage. After the
effective delay (2 frames, 3 with IRC off) `tg4c_set_local_hbm_mode_post`
writes the normal bands, so stock captures under the normal circle, while
the port kept overdrive group 0 the whole time. From 2026-10-29 the
palmtop runs `lhbm_od=4` (the normal bands, read from the panel), and the
next step is to re-enroll and match under it. Other leads: whether the circle reaches LHBM luminance at all (nobody has yet
compared it with the shell's drawn target); the HAL's raw capture dump
(`vendor.gf.debug.dump_data=1` wrote nothing). Many misses lock the sensor
out (`LOCKOUT -1`); `omamobile-fp-ctl resetlockout` clears it.

## F9-F10 results (2026-10-29, `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`)

- **F9 passed.** With `lhbm_od=4` (the normal LHBM bands read from the
panel, which is where Google's tg4c sits after its first-stage
overdrive) and a fresh enrollment, `omamobile-fp-ctl auth` gave MATCH on
the first touch twice. A different finger gave NOMATCH.
- **F10 passed.** fprintd was masked on the palmtop's own root: a link
to `/dev/null` from the same batch as the 9a's other bring-up masks
(ModemManager, NetworkManager, omamobile-aoc, omamobile-fp), made by the
private bring-up root it was installed from. Nothing in this repository
masks it. Unmasked, it
finds the bridge's device, `fprintd-enroll` completes (20 stages), and
`fprintd-verify` matches. Locked with `omarchy-shell lock lock`, the
palmtop unlocked with the enrolled finger, and refused a different finger
several times. The libfprint driver still names the device "Pixel 7 Pro
under-display fingerprint sensor".
Loading