From 6f1a9546c011a065bd6741525505dcab11a8bb44 Mon Sep 17 00:00:00 2001 From: Lef Date: Fri, 13 Nov 2026 20:23:59 +0200 Subject: [PATCH 1/3] device/husky: a GNSS bring-up plan before the overlay The runbook @derekross asked for on kernel #239 before the bring-up overlay: the state of the bus clocks, the rails and the node, his five points for the overlay in his own order, the gates for every boot (retry count, heat, modules, nothing that powers the chip), four stages with one change per boot (plain, bus, rails, receiver, each on top of the one before), the stop rules, the revert and what only the phone settles. The ROADMAP row now says the three kernel changes are merged. Documentation only; nothing of it has run. --- device/husky/GNSS-PLAN.md | 130 ++++++++++++++++++++++++++++++++++++++ device/husky/ROADMAP.md | 2 +- 2 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 device/husky/GNSS-PLAN.md diff --git a/device/husky/GNSS-PLAN.md b/device/husky/GNSS-PLAN.md new file mode 100644 index 000000000..c76b74c45 --- /dev/null +++ b/device/husky/GNSS-PLAN.md @@ -0,0 +1,130 @@ + +# Pixel 8 Pro GNSS plan (husky, Broadcom BCM4775x on spi21) + +Status (2026-11-13): nothing of this has run on the phone, and I have no record that the chip has ever been powered. +This is the runbook @derekross asked for on +[linux-omarchy-mobile#239](https://github.com/derekross/linux-omarchy-mobile/pull/239) before the bring-up overlay: +what the first boots do, in which order, and what stops them. It changes no device tree and runs nothing. + +[V] = read in source, in a maintainer's comment or in a capture of mine. [I] = inferred, with the step that would +settle it. [U] = unknown. References like `linux-omarchy-mobile#210` are the kernel repository; a bare `#578` is +this one. + +## Where it stands + +- The bus: `linux-omarchy-mobile#210` (merged) added the CMU_HSI0 USI3 clocks and a disabled `spi21` in + `zuma.dtsi`. [I] the gate offsets are Google's and have not been exercised on hardware; a wrong one can hang the + phone. Stage 2 below settles it. +- The rails: `linux-omarchy-mobile#211` (merged) added the S2MPG15 sub-PMIC as `pmic-2`, disabled, with the three + GNSS rails (LDO9S core 725 to 1300 mV, LDO10S RF and LDO11S AUX 1600 to 1950 mV). [V] zuma-husky.dts on + `omamobile` says that stock keeps them always on, so nothing sets a voltage at probe and the GNSS driver will + switch them. +- The receiver: `linux-omarchy-mobile#239` (merged) added the BCM4775x node on `spi21`, disabled: the stock pin + groups, 26 MHz, mode 3, feedback delay 1 and the three rails; nstandby is active high. [V] per derekross's + comment there, it matches Google's `zuma-board-gps.dtsi`. The driver is `drivers/misc/bcm4775x` on `omamobile`, + compatible `brcm,bcm4775-gnss`, module `bcm4775x-gnss`. +- [I] The chip also needs Google's `lhd` and `gpsd` and their configuration from a vendor image before it gives a + fix. This plan touches none of that: it can show the bus, the rails and the chip's answer, not a position. + Stage 1's userspace check settles whether anything on the phone would open the chip. + +## What @derekross wrote for the overlay (on #239, in his words as closely as I can) + +1. `spi21` has no `num-cs`, so the SPI driver will log "number of chip select lines not specified, assuming 1" at + probe; `num-cs = <1>` in the overlay (or in the node) quiets it. +2. The overlay needs `usi3_hsi0` enabled next to `spi21` and `pmic-2` (its mode is already SPI in `zuma.dtsi`). +3. Stock sets `swap-mode` and `dma-mode` on this bus, which our tree doesn't model, and our `google,zuma-spi` uses + zumapro's port configuration. If the first frames come back short or shifted, look there before the pins. +4. Stock keeps the three rails always on while our driver switches them, so load the driver before reading + anything from the chip. +5. The usual rules for the first boot apply: the driver blacklisted before the DTB that enables its node, a log + stream and the watchdog first, one change per boot, and a runbook in `device/husky` before it runs. + +## Open questions of mine + +- Chip select. [V] stock's `samsung,spi-chip-select-mode = 0` for this bus is not read by this tree, and + `google,zuma-spi` uses `manual_native_cs`. [I] `linux-omarchy-mobile#204` (mine, open) acts only for a device on a + GPIO chip select, and the BCM4775x is on the native one, so I don't expect it to matter. The first frames settle + it. +- Which `pmic-1` consumers wait while `sec_acpm` is not loaded (the touch rails `touch_vdd` and `touch_avdd` are + two) is [U]; stage 3 notes what is missing. + +## Gates for every boot + +I am at the phone, the cable on the desktop (USB ssh, never Wi-Fi only), and each boot is one go-ahead. + +- Exactly one fastboot device, product husky. `slot-retry-count:b` is read in the bootloader and the phone boots + only if it reads 3: refill with `fastboot set_active b` alone first (it needs no flash), and read it again. The + phone's own shutdown spends a retry (#578), so count it. If the count is not 3 after the refill, flash the known + good image set instead of booting. A boot that then leaves fewer than 2 tries ends the series. +- Battery at least 20 %, the hottest thermal zone at most 50 C with the screen off before a boot (the flash limit + is 62 C, and a hot phone is not the moment to start), PipeWire and WirePlumber stopped and the speaker route off + (a reboot hung once in `aoc_alsa_remove` while they held the card), no Chromium, backups current, no + `THERMAL-PAUSE` file. +- The kernel is a published one, or a branch built from it with the exact commit named. [I] the log setup is the + kernel's ramoops with `systemd-pstore` masked for the boot, so the record survives a reset (as in #578). + `device/husky/overlays/klog.dtso` is a second overlay with its own needs (it sets `clk_ignore_unused` and + `pd_ignore_unused`, which change the clocks this test is about, and it wants `DETECT_HUNG_TASK`, `WQ_WATCHDOG` + and `PANIC_ON_OOPS` in the kernel): use it only after reading its header, and say so in the boot's notes. +- Modules: the driver is blacklisted, `blacklist bcm4775x_gnss`, in a file under `/etc/modprobe.d/` that I `cat` + back before flashing; for the stages that enable `pmic-2`, `blacklist sec_acpm` as well (it autoloads at boot + because `pmic-1` is on, and the regulator core's one-shot cleanup 30 s after boot would switch off any GNSS rail + the bootloader left on). That file is in the shared rootfs: after a recovery from fastboot it is still there, and + the next boot of another kernel has no touch until it is removed. +- Never open `/dev/ttyBCM`, never write `nstandby`, never read the driver's debugfs `probe` file, and never + `grep -r` or `cat *` in its debugfs directory: each of them powers the chip. The pin states are read from + `/sys/kernel/debug/gpio`, or the driver's `pins` file. + +## Stages, one change per boot, each on top of the one before + +Each stage is a boot of the same kernel with one more thing enabled, ends with its checks, and the next stage +starts only after the previous one passed. Between sessions the phone goes back to the plain DTB (see Revert). + +1. **Plain** (control), nothing enabled. No `spi21`, no `vdd_gnss` regulator lines, the regulator count equals the + reference boot's, `sec_acpm` loaded because of `pmic-1`. Boot 1 only, read only: `cat /proc/cmdline`, + `pacman -Q omamobile-gnss` and a grep of `/etc/modprobe.d`, `/usr/lib/modprobe.d`, `/etc/modules-load.d` and + `/usr/lib/modules-load.d` for `sec_acpm` and `bcm4775`, and whether the initramfs carries either module [U: how + to list it on this image]. Nothing may open `/dev/ttyBCM` the moment the driver creates it: if anything like + `lhd` is installed, stop here. +2. **Bus**: `usi3_hsi0` and `spi21` enabled, the receiver's node still disabled. `/sys/class/spi_master` lists + `spi21`; no new child under `/sys/bus/spi/devices`; the USI3 pclk, ip and source clocks show enabled in + `clk_summary` (with `clk_ignore_unused` on the command line this proves less, so read the command line first); + no `spi21` error. +3. **Rails** (`sec_acpm` blacklisted): `pmic-2` enabled too. Before the modprobe, `lsmod | grep sec_acpm` is empty, + no `vdd_gnss` regulator exists and uptime is past 60 s (the regulator cleanup is one-shot, so after that it + cannot fire on a late load); note what is missing meanwhile (touch is). Then one `modprobe sec_acpm`; read + `state`, `microvolts` and `num_users` of the three rails, and through the regmap debugfs the S2MPG15 chip ID and + the LDO9S to LDO11S control registers. [I] the chip ID is register 0x0b and the controls are 0x37 to 0x39 in the + `pmic-2` regmaps (list `/sys/kernel/debug/regmap/` first and use the names it shows); the 7 Pro's 0x34 to 0x36 + are S2MPG13's, do not reuse them. Read only. Note whether touch comes back. +4. **Receiver**: the node enabled with `num-cs = <1>` on top of stage 3, so `sec_acpm` is blacklisted here too. + Only if stage 3's reads worked and touch came back: repeat stage 3's late `modprobe sec_acpm` and read the + three rails again; then check that `lsmod | grep bcm4775x` is empty and `spi21.0` is listed; then ONE command, + `modprobe bcm4775x-gnss`. After it read the kernel log tail, the pin states as above, `ls -l + /sys/bus/spi/drivers/bcm4775x-gnss/`, `ls /dev/ttyBCM /dev/bbd_*`, and `cat /sys/bus/spi/devices/spi21.0/nstandby` + (expect 0; a plain read does not power the chip). Nothing else: the chip stays unopened. + +## Stop at once + +An oops, BUG, panic or hang; no ssh within 90 s of a boot, a visible reboot, or an uptime drop inside the first +190 s; the retry count below what the gate allows; the driver or `sec_acpm` loaded before its manual modprobe; any +`vdd_gnss_*: disabling` line (it means `sec_acpm` loaded early); `sec_acpm` or S2MPG15 errors, or a failing rail or +chip-ID read (do not load the driver); USB or ssh lost when `spi21` probes; a hot phone (over 62 C) or a battery +under 20 %. Between 50 C and 62 C during a stage: finish the reads, do not start the next stage. Touch not back +within 10 s of the late `sec_acpm` is stricter than my earlier runbook, which only noted it: finish the step's +reads, then revert. If ssh still answers, `reboot-to bootloader` first; if not, the buttons (Volume Down + Power) +to the bootloader. A reset loop: bootloader by the buttons and flash from there, never from the resetting system, +and never power-cycle a half-written slot B. Every reset spends one of slot B's three tries. + +## Revert + +Remove the modprobe file and confirm it is gone, even if it was removed earlier. Flash the plain image set (known +good: `cmp` it against the set and read `DEVICE`, which must say husky), read the retry count, boot, watch the uptime +to 190 s, check `uname -r`, then `modprobe sec_acpm` if it is absent and check touch, and boot once more so the +normal path is proven. The flash goes through `fastboot -s ` after a check that exactly one device is +there, never through a helper that falls back to crashing the running kernel. + +## Still unknown (only the phone settles it) + +The USI3 gate offsets on hardware; the rail state the bootloader leaves; the chip ID; whether the native chip select +works at 26 MHz as it is; whether touch re-binds after a late `sec_acpm`; whether `swap-mode` and `dma-mode` matter +on this bus; which `pmic-1` consumers are missing while `sec_acpm` waits. diff --git a/device/husky/ROADMAP.md b/device/husky/ROADMAP.md index 250187447..106840cc9 100644 --- a/device/husky/ROADMAP.md +++ b/device/husky/ROADMAP.md @@ -43,7 +43,7 @@ Status words as in DEVICES.md. "9a" is the Pixel 9a (`tegu`) work. "Needs" lists | Battery | testing (gauge, PMIC and pack EEPROM on kernel #163 and #175, merged; the buses and the gauge's model through overlays until kernel [#205](https://github.com/derekross/linux-omarchy-mobile/pull/205)) | Lef | cheetah [POWER-PLAN](../cheetah/POWER-PLAN.md), [WIFI-BATTERY-PLAN](../cheetah/WIFI-BATTERY-PLAN.md); `gs201-cheetah.dts` has the same chip family. The 9a's [#119](https://github.com/derekross/linux-omarchy-mobile/pull/119) is the MAX77779 and does not apply as is | Stock overlay [V, same source as Display]: fuel gauge `maxim,max77759` @0x36, charger `max77759chrg` @0x69, Type-C `max77759tcpc` @0x25 and `max77729pmic` @0x66, all on `hsi2c_11`; also `nxp,pca9468` and the wireless charger `idt,p9412` (what we found: at 0x3c on `hsi2c_9`, the pack EEPROM bus, with its enable and boost lines on the PMIC GPIO expanders; no mainline driver, read from the stock tree, not tested). The gauge-model overlays are generated from Google's published `zuma-husky-battery-data.dtsi` ([#279](https://github.com/derekross/omarchy-mobile/pull/279), merged). Open: the model in the board file (or picked by the pack ID at runtime), and the charger stopping at 92 % with the bootloader's 4.35 V float ([#272](https://github.com/derekross/omarchy-mobile/issues/272), baseline in [#452](https://github.com/derekross/omarchy-mobile/pull/452)) | Done on one phone, see [BATTERY-NOTES](BATTERY-NOTES.md). Next: kernel #205 (the bus on by default), then the model. **No hand writes to the PMIC or the gauge outside a reviewed tool** (AGENTS.md §1; the notes list the ones made, and why) | | Charging, USB-C | testing (the MAX77759 charger and `tcpci_maxim` as a sink, both by hand in guarded runs) | Lef | cheetah [USB-C-PLAN](../cheetah/USB-C-PLAN.md); 9a: [#97](https://github.com/derekross/linux-omarchy-mobile/pull/97) is `tcpci_maxim` for the MAX77779 (merged) | Same I2C bus as Battery. With the Type-C driver loaded the port is a sink at the Type-C 3 A level and the charger input limit 0xc2 went 0x13 to 0x77 (the battery took +0.33 to +0.52 A, near full), and the driver closes the USB data switch on replug itself; in a separate run without the driver, a 30 W PD charger (no Type-C driver loaded, so no PD negotiation) gave +1.43 to +1.52 A into the battery (average +1.49 A) with 0xc2 unchanged at 0x13; 1.485 A is the device tree's cap, not a measurement ([REPORT-2026-11-01](https://github.com/derekross/omarchy-mobile/issues/1#issuecomment-6562547503)). Not run: PD/PPS, host mode with VBUS out (the connector has no VBUS regulator; the external boost needs a `regulator-fixed` on the MAX77759's GPIO5 plus the TCPC's EXTBST_CTRL), dongles, DP alt mode | The host-mode runbook and the `b5-host` tool are in draft [#282](https://github.com/derekross/omarchy-mobile/pull/282); nothing that sources power runs before the maintainer's review of it and a USB-C meter (his rule on #272). The replug rescue in the device package ([#250](https://github.com/derekross/omarchy-mobile/pull/250), merged) keeps the USB link until the Type-C driver is on by default | | Haptics, Torch | testing on [kernel #200](https://github.com/derekross/linux-omarchy-mobile/pull/200) (open) | Lef | 9a [#96](https://github.com/derekross/linux-omarchy-mobile/pull/96) (CS40L26 and LM3644); cheetah [HAPTICS-TORCH-PLAN](../cheetah/HAPTICS-TORCH-PLAN.md) | CS40L26A at 0x43 on PERIC1 USI0 (`hsi2c_0`) and the LM3644 at 0x63 on PERIC0 USI14 (`hsi2c_14`); #200 adds CMU_PERIC0 and the HSI1 pin controller for them. Lef felt the buzz and saw the LED; the torch is capped at 50 mA per LED like the 7 Pro's bring-up. Open: a gentle strength for UI taps (feedbackd), the shell's torch tile | Review #200 | -| GNSS | no (first steps in review: the bus clocks [#210](https://github.com/derekross/linux-omarchy-mobile/pull/210) and the PMIC rails [#211](https://github.com/derekross/linux-omarchy-mobile/pull/211), both drafts; nothing runs yet) | Lef | cheetah [GNSS-PLAN](../cheetah/GNSS-PLAN.md); the 9a's is parked | What we found: a separate Broadcom BCM4775x on `spi_21` (HSI0 USI3, 26 MHz) with its own three S2MPG15 LDOs, as on the 7 Pro. The driver, the binding and the S2MPG15 regulators are already in the tree. The vendor image carries the Broadcom GNSS service, so this is the chip Android uses; the modem-GNSS channels in `cpif` are not the path. Missing: the pin controllers (in #156), the `gnss@0` node, and Google's `lhd` and `gpsd` in a chroot built from the owner's own factory image (the extract tool needs one line for husky); the regulator rule (PMIC modules after about 30 s of late init) | A bring-up overlay for the bus and the PMIC, read-only first; then the `gnss@0` node on #156's pin controllers | +| GNSS | no (the bus clocks [#210](https://github.com/derekross/linux-omarchy-mobile/pull/210), the PMIC rails [#211](https://github.com/derekross/linux-omarchy-mobile/pull/211) and the disabled receiver node [#239](https://github.com/derekross/linux-omarchy-mobile/pull/239) are merged; the first-boot plan is [GNSS-PLAN.md](GNSS-PLAN.md); nothing has run on the phone) | Lef | cheetah [GNSS-PLAN](../cheetah/GNSS-PLAN.md); the 9a's is parked | What we found: a separate Broadcom BCM4775x on `spi_21` (HSI0 USI3, 26 MHz) with its own three S2MPG15 LDOs, as on the 7 Pro. The driver, the binding and the S2MPG15 regulators are already in the tree. The vendor image carries the Broadcom GNSS service, so this is the chip Android uses; the modem-GNSS channels in `cpif` are not the path. Missing: the pin controllers (in #156), the `gnss@0` node, and Google's `lhd` and `gpsd` in a chroot built from the owner's own factory image (the extract tool needs one line for husky); the regulator rule (PMIC modules after about 30 s of late init) | A bring-up overlay for the bus and the PMIC, read-only first; then the `gnss@0` node on #156's pin controllers | | AoC, Speakers/mics | testing (AoC, both amplifiers, stereo speakers and one microphone through UCM2 and PipeWire, on a test tree: kernel [#203](https://github.com/derekross/linux-omarchy-mobile/pull/203), [#204](https://github.com/derekross/linux-omarchy-mobile/pull/204), package [#453](https://github.com/derekross/omarchy-mobile/pull/453), plan [AOC-PLAN](AOC-PLAN.md), all open) | Lef | cheetah [AOC-PLAN](../cheetah/AOC-PLAN.md), [AUDIO-PLAN](../cheetah/AUDIO-PLAN.md) | The AoC loads through the GSA and starts through Trusty (`trusty-ipc` before `trusty-virtio`); zuma's System MMU is v9, and the 7 Pro's v8 offsets reset the phone (#450). The amplifiers share one SPI controller, one on the native chip select and one on a GPIO one (#204). The speaker-protection firmware and `aoc.bin` come from the owner's own vendor image. Levels are capped (digital 737, analog 10, no `speaker_protection`), the microphone is one of three ids and which hole it is is not settled, the earpiece and headset paths are not done. Not PRs yet: the AoC core port to zuma and the System MMU v9 file (shape asked on #1) | Review #450 and #453; the AoC core and System MMU v9 patches once the maintainer picks the file shape | | Sensors | no (read from the stock device tree, not tested) | unassigned | cheetah [AOC-PLAN](../cheetah/AOC-PLAN.md), [USF-PROTOCOL](../cheetah/USF-PROTOCOL.md) | What we found: the running AoC publishes the USF services (`com.google.usf`, its non-wake-up twin and the doorbell) and CHRE; the stock AoC node wants two sensor rails (S2MPG15 `L7S_SENSORS`, `L5S_PROX`) that our tree does not give it. Which physical sensors husky has is not known (the registry scripts are in the vendor partition). Needs the AoC char devices, Google's registry scripts loaded at boot, and the cheetah sensor proxy | After the AoC PRs: one read-only `RegistryGet` through the USF char device with the phone in hand (an AoC assert needs a reboot) | | Modem | no | Lef, once a SIM is found ([Brett asked](https://github.com/derekross/omarchy-mobile/issues/1#issuecomment-6544100933)) | cheetah [MODEM-PLAN](../cheetah/MODEM-PLAN.md); 9a [MODEM-PLAN](../tegu/MODEM-PLAN.md) ("ONLINE with IPC, no SIM yet") | A SIM (a prepaid one is the plan; the phone's own SIM is a data-only eSIM); the baseband is `g5300i` [V: fastboot], the S5300 family like cheetah's [I]; the CP's PCIe link and the `cpif` driver; modem firmware from the owner's own factory image; the NV protections. **Lef has a private read-only backup of the modem and calibration partitions (checksummed, plus an encrypted second copy) [V: not in this repository]; [#449](https://github.com/derekross/omarchy-mobile/pull/449) (open) gives husky's descriptor the `NV_PARTS` so `tools/nv-backup` takes and checks it.** | Read cheetah's and the 9a's MODEM-PLAN M0 to M2 end to end. Stage 0 is read-only: partitions, and what a booted phone answers without starting the modem | From cd9ae4bb5b62f61910c86fc33622354b1bcd34ec Mon Sep 17 00:00:00 2001 From: Lef Date: Fri, 13 Nov 2026 21:18:23 +0200 Subject: [PATCH 2/3] device/husky: GNSS-PLAN: bus name, revert retries, log stream, stages The controller is not called spi21 in sysfs: identify it by address. The revert refills slot B with set_active b and reads 3 before each boot and says where the phone is left. A live kernel log and the model check join the gates; klog.dtso is described completely and not used. num-cs belongs to the bus stage. The late sec_acpm load is its own stage so no stage changes two things. The debugfs ban covers anything under /sys/kernel/debug once the driver is loaded, and sspmcureq joins the never-write list. Derek's notes are worded as his three optional notes and the first-boot rules. The ROADMAP row no longer lists the pin controllers and the node as missing. --- device/husky/GNSS-PLAN.md | 135 ++++++++++++++++++++++---------------- device/husky/ROADMAP.md | 2 +- 2 files changed, 80 insertions(+), 57 deletions(-) diff --git a/device/husky/GNSS-PLAN.md b/device/husky/GNSS-PLAN.md index c76b74c45..d0e99e055 100644 --- a/device/husky/GNSS-PLAN.md +++ b/device/husky/GNSS-PLAN.md @@ -27,16 +27,17 @@ this one. fix. This plan touches none of that: it can show the bus, the rails and the chip's answer, not a position. Stage 1's userspace check settles whether anything on the phone would open the chip. -## What @derekross wrote for the overlay (on #239, in his words as closely as I can) +## What @derekross wrote for the overlay (three optional notes and the first-boot rules, on #239) 1. `spi21` has no `num-cs`, so the SPI driver will log "number of chip select lines not specified, assuming 1" at - probe; `num-cs = <1>` in the overlay (or in the node) quiets it. + probe; `num-cs = <1>` in the overlay (or in the node) quiets it. [V] In this tree the message is a `dev_dbg`, so + it only shows with dynamic debug. 2. The overlay needs `usi3_hsi0` enabled next to `spi21` and `pmic-2` (its mode is already SPI in `zuma.dtsi`). 3. Stock sets `swap-mode` and `dma-mode` on this bus, which our tree doesn't model, and our `google,zuma-spi` uses - zumapro's port configuration. If the first frames come back short or shifted, look there before the pins. -4. Stock keeps the three rails always on while our driver switches them, so load the driver before reading + zumapro's port configuration. If the first frames come back short or shifted, look there before the pins. And + since stock keeps the three rails always on while our driver switches them, load the driver before reading anything from the chip. -5. The usual rules for the first boot apply: the driver blacklisted before the DTB that enables its node, a log +4. The usual rules for the first boot apply: the driver blacklisted before the DTB that enables its node, a log stream and the watchdog first, one change per boot, and a runbook in `device/husky` before it runs. ## Open questions of mine @@ -50,78 +51,100 @@ this one. ## Gates for every boot -I am at the phone, the cable on the desktop (USB ssh, never Wi-Fi only), and each boot is one go-ahead. - -- Exactly one fastboot device, product husky. `slot-retry-count:b` is read in the bootloader and the phone boots - only if it reads 3: refill with `fastboot set_active b` alone first (it needs no flash), and read it again. The - phone's own shutdown spends a retry (#578), so count it. If the count is not 3 after the refill, flash the known - good image set instead of booting. A boot that then leaves fewer than 2 tries ends the series. +I am at the phone, the cable on the desktop (USB ssh, never Wi-Fi only), and each boot is one go-ahead. A +session is one sitting: from a plain boot, through the stages that sitting reaches, to the revert. + +- Exactly one fastboot device, product husky, and every fastboot command is `fastboot -s ` with the serial + read at that moment and never printed. Over ssh, `/proc/device-tree/model` must read Google Pixel 8 Pro before + any other command, before the modprobe file is written and before anything is loaded: the USB address is the + same for every phone model. +- `slot-retry-count:b` is read in the bootloader and the phone boots only if it reads 3: refill with `fastboot -s + set_active b` alone first (it needs no flash), and read it again. This holds after any recovery reboot + too. The phone's own shutdown spends a retry (#578), so count it. If the count is not 3 after the refill, flash + the known-good image set instead of booting. A boot that then leaves fewer than 2 tries ends the series. - Battery at least 20 %, the hottest thermal zone at most 50 C with the screen off before a boot (the flash limit is 62 C, and a hot phone is not the moment to start), PipeWire and WirePlumber stopped and the speaker route off (a reboot hung once in `aoc_alsa_remove` while they held the card), no Chromium, backups current, no `THERMAL-PAUSE` file. -- The kernel is a published one, or a branch built from it with the exact commit named. [I] the log setup is the - kernel's ramoops with `systemd-pstore` masked for the boot, so the record survives a reset (as in #578). - `device/husky/overlays/klog.dtso` is a second overlay with its own needs (it sets `clk_ignore_unused` and - `pd_ignore_unused`, which change the clocks this test is about, and it wants `DETECT_HUNG_TASK`, `WQ_WATCHDOG` - and `PANIC_ON_OOPS` in the kernel): use it only after reading its header, and say so in the boot's notes. +- A live kernel log: `ssh root@172.16.42.1 'dmesg -w'` (or `journalctl -kf`) into a file on the desktop, started + before the first command of the stage and kept open through the modprobe and the reads. [U] a record that survives + a hang or a watchdog reset: the kernel's ramoops with `systemd-pstore` masked for the boot kept one across the + poweroff restart in #578, but `device/husky/overlays/klog.dtso`'s own header says zuma's bootloader clears ramoops. + I do not use `klog.dtso` in this series: it sets `omamobile.deadman=20` (the init crashes on purpose if no host + configures the USB gadget in time, which is a reset and a spent retry), `panic=5`, `clk_ignore_unused` and + `pd_ignore_unused` (which change the clocks this test is about), and it needs `DETECT_HUNG_TASK`, `WQ_WATCHDOG`, + `PANIC_ON_OOPS` and `DYNAMIC_DEBUG` in the kernel. The watchdog I have is the 190 s uptime rule below. +- The kernel is a published one, or a branch built from it with the exact commit named. - Modules: the driver is blacklisted, `blacklist bcm4775x_gnss`, in a file under `/etc/modprobe.d/` that I `cat` - back before flashing; for the stages that enable `pmic-2`, `blacklist sec_acpm` as well (it autoloads at boot - because `pmic-1` is on, and the regulator core's one-shot cleanup 30 s after boot would switch off any GNSS rail - the bootloader left on). That file is in the shared rootfs: after a recovery from fastboot it is still there, and - the next boot of another kernel has no touch until it is removed. -- Never open `/dev/ttyBCM`, never write `nstandby`, never read the driver's debugfs `probe` file, and never - `grep -r` or `cat *` in its debugfs directory: each of them powers the chip. The pin states are read from - `/sys/kernel/debug/gpio`, or the driver's `pins` file. + back before flashing, for every stage up to the one that loads it. `sec_acpm` is blacklisted as well in the stages + from 3 on (it autoloads at boot because `pmic-1` is on, and the regulator core's one-shot cleanup 30 s after boot + would switch off any GNSS rail the bootloader left on). Stages 1 and 2 expect it loaded. The file is in the shared + rootfs: after a recovery from fastboot it is still there, and the next boot of another kernel has no touch until it + is removed. +- Never open `/dev/ttyBCM`, never write `nstandby` or `sspmcureq`, and never read the driver's debugfs `probe` file. + Reading `probe` powers the chip, so once the driver is loaded no recursive `grep` or `cat *` anywhere under + `/sys/kernel/debug`. Pin states come from `/sys/kernel/debug/gpio`, or the driver's `pins` file. ## Stages, one change per boot, each on top of the one before -Each stage is a boot of the same kernel with one more thing enabled, ends with its checks, and the next stage -starts only after the previous one passed. Between sessions the phone goes back to the plain DTB (see Revert). - -1. **Plain** (control), nothing enabled. No `spi21`, no `vdd_gnss` regulator lines, the regulator count equals the - reference boot's, `sec_acpm` loaded because of `pmic-1`. Boot 1 only, read only: `cat /proc/cmdline`, - `pacman -Q omamobile-gnss` and a grep of `/etc/modprobe.d`, `/usr/lib/modprobe.d`, `/etc/modules-load.d` and - `/usr/lib/modules-load.d` for `sec_acpm` and `bcm4775`, and whether the initramfs carries either module [U: how - to list it on this image]. Nothing may open `/dev/ttyBCM` the moment the driver creates it: if anything like - `lhd` is installed, stop here. -2. **Bus**: `usi3_hsi0` and `spi21` enabled, the receiver's node still disabled. `/sys/class/spi_master` lists - `spi21`; no new child under `/sys/bus/spi/devices`; the USI3 pclk, ip and source clocks show enabled in - `clk_summary` (with `clk_ignore_unused` on the command line this proves less, so read the command line first); - no `spi21` error. -3. **Rails** (`sec_acpm` blacklisted): `pmic-2` enabled too. Before the modprobe, `lsmod | grep sec_acpm` is empty, - no `vdd_gnss` regulator exists and uptime is past 60 s (the regulator cleanup is one-shot, so after that it - cannot fire on a late load); note what is missing meanwhile (touch is). Then one `modprobe sec_acpm`; read - `state`, `microvolts` and `num_users` of the three rails, and through the regmap debugfs the S2MPG15 chip ID and - the LDO9S to LDO11S control registers. [I] the chip ID is register 0x0b and the controls are 0x37 to 0x39 in the - `pmic-2` regmaps (list `/sys/kernel/debug/regmap/` first and use the names it shows); the 7 Pro's 0x34 to 0x36 - are S2MPG13's, do not reuse them. Read only. Note whether touch comes back. -4. **Receiver**: the node enabled with `num-cs = <1>` on top of stage 3, so `sec_acpm` is blacklisted here too. - Only if stage 3's reads worked and touch came back: repeat stage 3's late `modprobe sec_acpm` and read the - three rails again; then check that `lsmod | grep bcm4775x` is empty and `spi21.0` is listed; then ONE command, - `modprobe bcm4775x-gnss`. After it read the kernel log tail, the pin states as above, `ls -l - /sys/bus/spi/drivers/bcm4775x-gnss/`, `ls /dev/ttyBCM /dev/bbd_*`, and `cat /sys/bus/spi/devices/spi21.0/nstandby` - (expect 0; a plain read does not power the chip). Nothing else: the chip stays unopened. +Each stage is a boot of the same kernel with one more thing changed, ends with its checks, and the next stage starts +only after the previous one passed. The bus is not called `spi21` in sysfs: the number comes from an alias or from +the order of registration, and `spi20` (touch) is already enabled. [V in source] I identify the controller by its +address, `readlink /sys/class/spi_master/spi*/device` ending in the `spi21` node's `reg` (read it from the live +device tree; [I] it is the controller at 111e0000, USI3's own block being 111e00c0), and below `spiN` means the +number I read there. + +1. **Plain** (control), nothing enabled. No GNSS controller, no `vdd_gnss` regulator lines, the regulator count + equals the reference boot's, `sec_acpm` loaded because of `pmic-1`. First boot of a session only, read only: + `cat /proc/cmdline`; `pacman -Q omamobile-gnss`; a grep of `/etc/modprobe.d`, `/usr/lib/modprobe.d`, + `/etc/modules-load.d` and `/usr/lib/modules-load.d` for `sec_acpm` and `bcm4775`; `grep -rs ttyBCM + /etc/udev/rules.d /usr/lib/udev/rules.d /etc/systemd /usr/lib/systemd`; and whether the initramfs carries either + module [U: how to list it on this image]. Nothing may open `/dev/ttyBCM` the moment the driver creates it: if + anything like `lhd` or a rule that does is installed, stop here. +2. **Bus**: `usi3_hsi0` and the controller enabled with `num-cs = <1>`, the receiver's node still disabled (the + controller reads `num-cs` at its own probe, so it belongs to this stage). `/sys/class/spi_master` lists the new + controller; no new child under `/sys/bus/spi/devices`; the USI3 pclk, ip and source clocks show enabled in + `clk_summary` (read the command line first: `clk_ignore_unused` would make this prove less); no error from it. +3. **Late `sec_acpm`** (`sec_acpm` blacklisted, `pmic-2` still disabled): the bus DTB of stage 2. Before the + modprobe, `lsmod | grep sec_acpm` is empty and uptime is past 60 s (the regulator cleanup is one-shot, so after + that it cannot fire on a late load); note what is missing meanwhile (touch is). Then one `modprobe sec_acpm`, + and note whether touch comes back. This boot changes only when `sec_acpm` loads, so a failure here is not + confused with the rails. +4. **Rails** (still blacklisted): `pmic-2` enabled too. Same sequence as stage 3, then read `state`, `microvolts` + and `num_users` of the three rails, and through the regmap debugfs the S2MPG15 chip ID and the LDO9S to LDO11S + control registers. [I] the chip ID is register 0x0b and the controls are 0x37 to 0x39 in the `pmic-2` regmaps + (list `/sys/kernel/debug/regmap/` first and use the names it shows); the 7 Pro's 0x34 to 0x36 are S2MPG13's, do + not reuse them. Read only. [U] reading a regmap `registers` file reads every register: whether any clears on + read is not checked, so read `registers` of the three LDOs' regmap only as far as the plan names them. +5. **Receiver**: the node enabled on top of stage 4, `sec_acpm` blacklisted here too. Only if stage 4's reads worked + and touch came back: repeat the late `modprobe sec_acpm` and the rail reads; check that `lsmod | grep bcm4775x` + is empty and the node's `spiN.0` is listed; then ONE command, `modprobe bcm4775x-gnss`. After it read the kernel + log tail, the pin states as above, `ls -l /sys/bus/spi/drivers/bcm4775x-gnss/`, `ls /dev/ttyBCM /dev/bbd_*`, and + `cat /sys/bus/spi/devices/spiN.0/nstandby` (expect 0; a plain read does not power the chip). Nothing else: the + chip stays unopened. ## Stop at once An oops, BUG, panic or hang; no ssh within 90 s of a boot, a visible reboot, or an uptime drop inside the first -190 s; the retry count below what the gate allows; the driver or `sec_acpm` loaded before its manual modprobe; any +190 s; a retry count that is not 3 at a gate (read in the bootloader; the stop is for the boot that follows a refill that did not take); the driver or `sec_acpm` loaded before its manual modprobe; any `vdd_gnss_*: disabling` line (it means `sec_acpm` loaded early); `sec_acpm` or S2MPG15 errors, or a failing rail or chip-ID read (do not load the driver); USB or ssh lost when `spi21` probes; a hot phone (over 62 C) or a battery under 20 %. Between 50 C and 62 C during a stage: finish the reads, do not start the next stage. Touch not back within 10 s of the late `sec_acpm` is stricter than my earlier runbook, which only noted it: finish the step's -reads, then revert. If ssh still answers, `reboot-to bootloader` first; if not, the buttons (Volume Down + Power) -to the bootloader. A reset loop: bootloader by the buttons and flash from there, never from the resetting system, +reads, then revert. If ssh still answers, `reboot-to bootloader` first (it spends no try, but the next boot still has to pass the gate: +read 3 or refill); if not, a forced restart (Power + Volume Up for 15 to 30 s, as in `tools/husky-deadman`) and +then Power + Volume Down to the bootloader. A reset loop: bootloader by the buttons and flash from there, never from the resetting system, and never power-cycle a half-written slot B. Every reset spends one of slot B's three tries. ## Revert Remove the modprobe file and confirm it is gone, even if it was removed earlier. Flash the plain image set (known -good: `cmp` it against the set and read `DEVICE`, which must say husky), read the retry count, boot, watch the uptime -to 190 s, check `uname -r`, then `modprobe sec_acpm` if it is absent and check touch, and boot once more so the -normal path is proven. The flash goes through `fastboot -s ` after a check that exactly one device is -there, never through a helper that falls back to crashing the running kernel. +good: `cmp` it against the set and read `DEVICE`, which must say husky), `fastboot -s set_active b` and +read 3, boot, watch the uptime to 190 s, check `uname -r`, then `modprobe sec_acpm` if it is absent and check touch. +A second boot to prove the normal path goes through `reboot-to bootloader` first, with `set_active b` and a read of +3 again, because two boots from 3 leave 1, and one poweroff restart after that (#578) leaves 0. The phone is left at +the count that read after the last boot: I write it down. The flash goes through `fastboot -s ` after a +check that exactly one device is there, never through a helper that falls back to crashing the running kernel. ## Still unknown (only the phone settles it) diff --git a/device/husky/ROADMAP.md b/device/husky/ROADMAP.md index 106840cc9..6f81133cf 100644 --- a/device/husky/ROADMAP.md +++ b/device/husky/ROADMAP.md @@ -43,7 +43,7 @@ Status words as in DEVICES.md. "9a" is the Pixel 9a (`tegu`) work. "Needs" lists | Battery | testing (gauge, PMIC and pack EEPROM on kernel #163 and #175, merged; the buses and the gauge's model through overlays until kernel [#205](https://github.com/derekross/linux-omarchy-mobile/pull/205)) | Lef | cheetah [POWER-PLAN](../cheetah/POWER-PLAN.md), [WIFI-BATTERY-PLAN](../cheetah/WIFI-BATTERY-PLAN.md); `gs201-cheetah.dts` has the same chip family. The 9a's [#119](https://github.com/derekross/linux-omarchy-mobile/pull/119) is the MAX77779 and does not apply as is | Stock overlay [V, same source as Display]: fuel gauge `maxim,max77759` @0x36, charger `max77759chrg` @0x69, Type-C `max77759tcpc` @0x25 and `max77729pmic` @0x66, all on `hsi2c_11`; also `nxp,pca9468` and the wireless charger `idt,p9412` (what we found: at 0x3c on `hsi2c_9`, the pack EEPROM bus, with its enable and boost lines on the PMIC GPIO expanders; no mainline driver, read from the stock tree, not tested). The gauge-model overlays are generated from Google's published `zuma-husky-battery-data.dtsi` ([#279](https://github.com/derekross/omarchy-mobile/pull/279), merged). Open: the model in the board file (or picked by the pack ID at runtime), and the charger stopping at 92 % with the bootloader's 4.35 V float ([#272](https://github.com/derekross/omarchy-mobile/issues/272), baseline in [#452](https://github.com/derekross/omarchy-mobile/pull/452)) | Done on one phone, see [BATTERY-NOTES](BATTERY-NOTES.md). Next: kernel #205 (the bus on by default), then the model. **No hand writes to the PMIC or the gauge outside a reviewed tool** (AGENTS.md §1; the notes list the ones made, and why) | | Charging, USB-C | testing (the MAX77759 charger and `tcpci_maxim` as a sink, both by hand in guarded runs) | Lef | cheetah [USB-C-PLAN](../cheetah/USB-C-PLAN.md); 9a: [#97](https://github.com/derekross/linux-omarchy-mobile/pull/97) is `tcpci_maxim` for the MAX77779 (merged) | Same I2C bus as Battery. With the Type-C driver loaded the port is a sink at the Type-C 3 A level and the charger input limit 0xc2 went 0x13 to 0x77 (the battery took +0.33 to +0.52 A, near full), and the driver closes the USB data switch on replug itself; in a separate run without the driver, a 30 W PD charger (no Type-C driver loaded, so no PD negotiation) gave +1.43 to +1.52 A into the battery (average +1.49 A) with 0xc2 unchanged at 0x13; 1.485 A is the device tree's cap, not a measurement ([REPORT-2026-11-01](https://github.com/derekross/omarchy-mobile/issues/1#issuecomment-6562547503)). Not run: PD/PPS, host mode with VBUS out (the connector has no VBUS regulator; the external boost needs a `regulator-fixed` on the MAX77759's GPIO5 plus the TCPC's EXTBST_CTRL), dongles, DP alt mode | The host-mode runbook and the `b5-host` tool are in draft [#282](https://github.com/derekross/omarchy-mobile/pull/282); nothing that sources power runs before the maintainer's review of it and a USB-C meter (his rule on #272). The replug rescue in the device package ([#250](https://github.com/derekross/omarchy-mobile/pull/250), merged) keeps the USB link until the Type-C driver is on by default | | Haptics, Torch | testing on [kernel #200](https://github.com/derekross/linux-omarchy-mobile/pull/200) (open) | Lef | 9a [#96](https://github.com/derekross/linux-omarchy-mobile/pull/96) (CS40L26 and LM3644); cheetah [HAPTICS-TORCH-PLAN](../cheetah/HAPTICS-TORCH-PLAN.md) | CS40L26A at 0x43 on PERIC1 USI0 (`hsi2c_0`) and the LM3644 at 0x63 on PERIC0 USI14 (`hsi2c_14`); #200 adds CMU_PERIC0 and the HSI1 pin controller for them. Lef felt the buzz and saw the LED; the torch is capped at 50 mA per LED like the 7 Pro's bring-up. Open: a gentle strength for UI taps (feedbackd), the shell's torch tile | Review #200 | -| GNSS | no (the bus clocks [#210](https://github.com/derekross/linux-omarchy-mobile/pull/210), the PMIC rails [#211](https://github.com/derekross/linux-omarchy-mobile/pull/211) and the disabled receiver node [#239](https://github.com/derekross/linux-omarchy-mobile/pull/239) are merged; the first-boot plan is [GNSS-PLAN.md](GNSS-PLAN.md); nothing has run on the phone) | Lef | cheetah [GNSS-PLAN](../cheetah/GNSS-PLAN.md); the 9a's is parked | What we found: a separate Broadcom BCM4775x on `spi_21` (HSI0 USI3, 26 MHz) with its own three S2MPG15 LDOs, as on the 7 Pro. The driver, the binding and the S2MPG15 regulators are already in the tree. The vendor image carries the Broadcom GNSS service, so this is the chip Android uses; the modem-GNSS channels in `cpif` are not the path. Missing: the pin controllers (in #156), the `gnss@0` node, and Google's `lhd` and `gpsd` in a chroot built from the owner's own factory image (the extract tool needs one line for husky); the regulator rule (PMIC modules after about 30 s of late init) | A bring-up overlay for the bus and the PMIC, read-only first; then the `gnss@0` node on #156's pin controllers | +| GNSS | no (the bus clocks [#210](https://github.com/derekross/linux-omarchy-mobile/pull/210), the PMIC rails [#211](https://github.com/derekross/linux-omarchy-mobile/pull/211) and the disabled receiver node [#239](https://github.com/derekross/linux-omarchy-mobile/pull/239) are merged; the first-boot plan is [GNSS-PLAN.md](GNSS-PLAN.md); nothing has run on the phone) | Lef | cheetah [GNSS-PLAN](../cheetah/GNSS-PLAN.md); the 9a's is parked | What we found: a separate Broadcom BCM4775x on `spi_21` (HSI0 USI3, 26 MHz) with its own three S2MPG15 LDOs, as on the 7 Pro. The driver, the binding and the S2MPG15 regulators are already in the tree. The vendor image carries the Broadcom GNSS service, so this is the chip Android uses; the modem-GNSS channels in `cpif` are not the path. Missing: Google's `lhd` and `gpsd` in a chroot built from the owner's own factory image (the extract tool needs one line for husky); the regulator rule (PMIC modules after about 30 s of late init) | The bring-up overlay for the bus, the PMIC and the node, after [GNSS-PLAN.md](GNSS-PLAN.md) has been read; the first boots are read-only | | AoC, Speakers/mics | testing (AoC, both amplifiers, stereo speakers and one microphone through UCM2 and PipeWire, on a test tree: kernel [#203](https://github.com/derekross/linux-omarchy-mobile/pull/203), [#204](https://github.com/derekross/linux-omarchy-mobile/pull/204), package [#453](https://github.com/derekross/omarchy-mobile/pull/453), plan [AOC-PLAN](AOC-PLAN.md), all open) | Lef | cheetah [AOC-PLAN](../cheetah/AOC-PLAN.md), [AUDIO-PLAN](../cheetah/AUDIO-PLAN.md) | The AoC loads through the GSA and starts through Trusty (`trusty-ipc` before `trusty-virtio`); zuma's System MMU is v9, and the 7 Pro's v8 offsets reset the phone (#450). The amplifiers share one SPI controller, one on the native chip select and one on a GPIO one (#204). The speaker-protection firmware and `aoc.bin` come from the owner's own vendor image. Levels are capped (digital 737, analog 10, no `speaker_protection`), the microphone is one of three ids and which hole it is is not settled, the earpiece and headset paths are not done. Not PRs yet: the AoC core port to zuma and the System MMU v9 file (shape asked on #1) | Review #450 and #453; the AoC core and System MMU v9 patches once the maintainer picks the file shape | | Sensors | no (read from the stock device tree, not tested) | unassigned | cheetah [AOC-PLAN](../cheetah/AOC-PLAN.md), [USF-PROTOCOL](../cheetah/USF-PROTOCOL.md) | What we found: the running AoC publishes the USF services (`com.google.usf`, its non-wake-up twin and the doorbell) and CHRE; the stock AoC node wants two sensor rails (S2MPG15 `L7S_SENSORS`, `L5S_PROX`) that our tree does not give it. Which physical sensors husky has is not known (the registry scripts are in the vendor partition). Needs the AoC char devices, Google's registry scripts loaded at boot, and the cheetah sensor proxy | After the AoC PRs: one read-only `RegistryGet` through the USF char device with the phone in hand (an AoC assert needs a reboot) | | Modem | no | Lef, once a SIM is found ([Brett asked](https://github.com/derekross/omarchy-mobile/issues/1#issuecomment-6544100933)) | cheetah [MODEM-PLAN](../cheetah/MODEM-PLAN.md); 9a [MODEM-PLAN](../tegu/MODEM-PLAN.md) ("ONLINE with IPC, no SIM yet") | A SIM (a prepaid one is the plan; the phone's own SIM is a data-only eSIM); the baseband is `g5300i` [V: fastboot], the S5300 family like cheetah's [I]; the CP's PCIe link and the `cpif` driver; modem firmware from the owner's own factory image; the NV protections. **Lef has a private read-only backup of the modem and calibration partitions (checksummed, plus an encrypted second copy) [V: not in this repository]; [#449](https://github.com/derekross/omarchy-mobile/pull/449) (open) gives husky's descriptor the `NV_PARTS` so `tools/nv-backup` takes and checks it.** | Read cheetah's and the 9a's MODEM-PLAN M0 to M2 end to end. Stage 0 is read-only: partitions, and what a booted phone answers without starting the modem | From 166712a602b3577d72f016bbb64ca749c097ec0e Mon Sep 17 00:00:00 2001 From: Lef Date: Sun, 15 Nov 2026 10:39:31 +0200 Subject: [PATCH 3/3] device/husky: GNSS-PLAN: sec_acpm is built in, the watchdog, facts from the tree The late sec_acpm stage and its blacklist are gone: the shared kernel builds the driver in, so they tested nothing. The rails stage reads the three GNSS rails before and after the regulator cleanup and records a disabling line as what the bootloader left. Stages 2 to 4 arm /dev/watchdog0 with tools/husky-deadman first, and each says what covers a hang and what does not. The controller address, the S2MPG15 registers, the regmap read tables and the initramfs are now read from the tree. Signed-off-by: Lef --- device/husky/GNSS-PLAN.md | 150 +++++++++++++++++++++++++------------- device/husky/ROADMAP.md | 2 +- 2 files changed, 101 insertions(+), 51 deletions(-) diff --git a/device/husky/GNSS-PLAN.md b/device/husky/GNSS-PLAN.md index d0e99e055..f9d539d62 100644 --- a/device/husky/GNSS-PLAN.md +++ b/device/husky/GNSS-PLAN.md @@ -1,10 +1,13 @@ # Pixel 8 Pro GNSS plan (husky, Broadcom BCM4775x on spi21) -Status (2026-11-13): nothing of this has run on the phone, and I have no record that the chip has ever been powered. +Status (2026-11-15): nothing of this has run on the phone, and I have no record that the chip has ever been powered. This is the runbook @derekross asked for on [linux-omarchy-mobile#239](https://github.com/derekross/linux-omarchy-mobile/pull/239) before the bring-up overlay: what the first boots do, in which order, and what stops them. It changes no device tree and runs nothing. +Changed on 2026-11-15 after his review on #739: `sec_acpm` is built in, so the late-load stage and its blacklist are +gone, and stages 2 to 4 run with the SoC watchdog armed, except stage 3's first read, which is before the 30 s cleanup +and so before the watchdog can be armed (only the panics cover it). [V] = read in source, in a maintainer's comment or in a capture of mine. [I] = inferred, with the step that would settle it. [U] = unknown. References like `linux-omarchy-mobile#210` are the kernel repository; a bare `#578` is @@ -14,11 +17,19 @@ this one. - The bus: `linux-omarchy-mobile#210` (merged) added the CMU_HSI0 USI3 clocks and a disabled `spi21` in `zuma.dtsi`. [I] the gate offsets are Google's and have not been exercised on hardware; a wrong one can hang the - phone. Stage 2 below settles it. + phone. The controller's probe in stage 2 and a first transfer settle it, not a clock listing: the published + bootargs carry `clk_ignore_unused` and `pd_ignore_unused` [V: `zuma-husky.dts`, and `VENDOR_CMDLINE` in + `device/husky/device.conf`], so the clocks can be on without the controller having enabled them. - The rails: `linux-omarchy-mobile#211` (merged) added the S2MPG15 sub-PMIC as `pmic-2`, disabled, with the three GNSS rails (LDO9S core 725 to 1300 mV, LDO10S RF and LDO11S AUX 1600 to 1950 mV). [V] zuma-husky.dts on `omamobile` says that stock keeps them always on, so nothing sets a voltage at probe and the GNSS driver will - switch them. + switch them. [V] `sec_acpm` is built in: `kernel/configs/omamobile.config` has `CONFIG_MFD_SEC_ACPM=y` (since + #227, for the 9a's USB PHY rails) and the kernel's defconfig has `CONFIG_REGULATOR_S2MPS11=y`. So once `pmic-2` + is enabled the three rails register at boot, and the regulator core's cleanup, 30 s after late init, turns off + any of them that is on and has no consumer. A `blacklist sec_acpm` does nothing, `lsmod` never lists it and + `modprobe sec_acpm` is a no-op. The 7 Pro is the same (the unused-rails gotcha in `AGENTS.md`), and it is + harmless there because LDO9S to LDO11S feed only GNSS; the board file's comment names husky's three as the GNSS + core, RF and AUX rails too. - The receiver: `linux-omarchy-mobile#239` (merged) added the BCM4775x node on `spi21`, disabled: the stock pin groups, 26 MHz, mode 3, feedback delay 1 and the three rails; nstandby is active high. [V] per derekross's comment there, it matches Google's `zuma-board-gps.dtsi`. The driver is `drivers/misc/bcm4775x` on `omamobile`, @@ -46,8 +57,7 @@ this one. `google,zuma-spi` uses `manual_native_cs`. [I] `linux-omarchy-mobile#204` (mine, open) acts only for a device on a GPIO chip select, and the BCM4775x is on the native one, so I don't expect it to matter. The first frames settle it. -- Which `pmic-1` consumers wait while `sec_acpm` is not loaded (the touch rails `touch_vdd` and `touch_avdd` are - two) is [U]; stage 3 notes what is missing. +- Whether the bootloader leaves the three GNSS rails on is [U]; stage 3 answers it. ## Gates for every boot @@ -71,16 +81,39 @@ session is one sitting: from a plain boot, through the stages that sitting reach a hang or a watchdog reset: the kernel's ramoops with `systemd-pstore` masked for the boot kept one across the poweroff restart in #578, but `device/husky/overlays/klog.dtso`'s own header says zuma's bootloader clears ramoops. I do not use `klog.dtso` in this series: it sets `omamobile.deadman=20` (the init crashes on purpose if no host - configures the USB gadget in time, which is a reset and a spent retry), `panic=5`, `clk_ignore_unused` and - `pd_ignore_unused` (which change the clocks this test is about), and it needs `DETECT_HUNG_TASK`, `WQ_WATCHDOG`, - `PANIC_ON_OOPS` and `DYNAMIC_DEBUG` in the kernel. The watchdog I have is the 190 s uptime rule below. + configures the USB gadget in time, which is a reset and a spent retry) and `panic=5`, and it needs + `DETECT_HUNG_TASK`, `WQ_WATCHDOG`, `PANIC_ON_OOPS` and `DYNAMIC_DEBUG` in the kernel. +- The watchdog, for stages 2, 3 and 4. The 190 s uptime rule below is a stop, not a reset: [V] the watchdog driver + stops the bootloader's watchdogs (the comment over the bootargs in `zuma-husky.dts`, BRINGUP-M1 test 19), so a + hang that does not panic lasts until the buttons. Two things reset the phone by themselves: + - Panics. [V] the published bootargs have `panic=10 softlockup_panic=1 nmi_watchdog=panic + sysctl.kernel.panic_on_rcu_stall=1`, and `device/husky/kernel.config` builds the soft and hard lockup + detectors. An oops that panics, a soft or hard lockup and an RCU stall end in a reset 10 s later. I read + `/proc/cmdline` in stage 1 to see them on the phone. + - The SoC watchdog with a feeder. Before the first command of the stage I run `tools/husky-deadman noop --soak + ` on the desktop, in its own terminal. [V in the tool's source] it copies `tools/husky-deadman-phone` + to the phone, streams `/dev/kmsg` to `logs/`, and starts `husky-deadman-phone run noop` detached; that opens + `/dev/watchdog0` and feeds it every 2 s, and `noop` applies nothing. The desktop half confirms over a new ssh + login; with no confirmation in 90 s and a 60 s grace the phone stops feeding on purpose and resets, so the + stage's commands start only after the `confirmed` line. If the feeder or all of userspace stops, the watchdog + resets the phone (the tool says in about 15 s; per derekross's review its `wd-drill` reset a Pixel 8a in 26 s + in akita's test 43; [U] the time on husky, I found no drill time for it in the tree). + - Stopping it: the tool has no stop command. The feeder runs for the soak, then writes the magic close and logs + `watchdog: disarmed`, and the result reads `soaked`. So the soak is set longer than the stage's reads (600 s + is the default), and after the reads I wait for `soaked` and that log line before the reboot to the + bootloader. A `refused`, `tripped` or `failed` result means no watchdog: the stage does not start, or stops. + [U] whether `noop`'s checks pass on the stage's image: they want the `10cb0000.i2c` bus, `i2c-tools`, the + gauge's power supply and a configured gadget, and its guard reads the battery every 2 s. + - Not covered: a freeze of every CPU. The lockup detectors need a CPU that still runs, and I count the watchdog + out too (derekross's review; BRINGUP-M1 test 24 had every CPU stop on this phone, and neither the panic nor + the fallback reset it). Only the buttons undo that: Power + Volume Up for 15 to 30 s. Also not covered by the + watchdog: the boot before it is armed and the time after it is stopped; there only the panics act. + - Every one of these resets spends one of slot B's tries, like any other. - The kernel is a published one, or a branch built from it with the exact commit named. - Modules: the driver is blacklisted, `blacklist bcm4775x_gnss`, in a file under `/etc/modprobe.d/` that I `cat` - back before flashing, for every stage up to the one that loads it. `sec_acpm` is blacklisted as well in the stages - from 3 on (it autoloads at boot because `pmic-1` is on, and the regulator core's one-shot cleanup 30 s after boot - would switch off any GNSS rail the bootloader left on). Stages 1 and 2 expect it loaded. The file is in the shared - rootfs: after a recovery from fastboot it is still there, and the next boot of another kernel has no touch until it - is removed. + back before flashing, for every stage up to the one that loads it. Nothing else is blacklisted: `sec_acpm` is + built in, so a blacklist line for it would do nothing. The file is in the shared rootfs: after a recovery from + fastboot it is still there, until the revert removes it. - Never open `/dev/ttyBCM`, never write `nstandby` or `sspmcureq`, and never read the driver's debugfs `probe` file. Reading `probe` powers the chip, so once the driver is loaded no recursive `grep` or `cat *` anywhere under `/sys/kernel/debug`. Pin states come from `/sys/kernel/debug/gpio`, or the driver's `pins` file. @@ -90,48 +123,64 @@ session is one sitting: from a plain boot, through the stages that sitting reach Each stage is a boot of the same kernel with one more thing changed, ends with its checks, and the next stage starts only after the previous one passed. The bus is not called `spi21` in sysfs: the number comes from an alias or from the order of registration, and `spi20` (touch) is already enabled. [V in source] I identify the controller by its -address, `readlink /sys/class/spi_master/spi*/device` ending in the `spi21` node's `reg` (read it from the live -device tree; [I] it is the controller at 111e0000, USI3's own block being 111e00c0), and below `spiN` means the -number I read there. +address, `readlink /sys/class/spi_master/spi*/device` ending in `111e0000.spi`: [V] the node is `spi21: +spi@111e0000` with `reg = <0x111e0000 0xc0>`, inside `usi3_hsi0: usi@111e00c0` (`zuma.dtsi`). Below `spiN` means +the number I read there. The earlier draft's stage 3 (a late `modprobe sec_acpm`) is dropped, because the driver is +built in and the stage would have passed without testing anything; its stages 4 and 5 are 3 and 4 here. 1. **Plain** (control), nothing enabled. No GNSS controller, no `vdd_gnss` regulator lines, the regulator count - equals the reference boot's, `sec_acpm` loaded because of `pmic-1`. First boot of a session only, read only: - `cat /proc/cmdline`; `pacman -Q omamobile-gnss`; a grep of `/etc/modprobe.d`, `/usr/lib/modprobe.d`, - `/etc/modules-load.d` and `/usr/lib/modules-load.d` for `sec_acpm` and `bcm4775`; `grep -rs ttyBCM - /etc/udev/rules.d /usr/lib/udev/rules.d /etc/systemd /usr/lib/systemd`; and whether the initramfs carries either - module [U: how to list it on this image]. Nothing may open `/dev/ttyBCM` the moment the driver creates it: if - anything like `lhd` or a rule that does is installed, stop here. + equals the reference boot's. First boot of a session only, read only: `cat /proc/cmdline` (the panic + arguments above must be there); `grep sec-acpm /lib/modules/$(uname -r)/modules.builtin` (it must list it: the + running kernel has the driver built in); `pacman -Q omamobile-gnss`; a grep of `/etc/modprobe.d`, + `/usr/lib/modprobe.d`, `/etc/modules-load.d` and `/usr/lib/modules-load.d` for `bcm4775`; `grep -rs ttyBCM + /etc/udev/rules.d /usr/lib/udev/rules.d /etc/systemd /usr/lib/systemd`. [V] the initramfs carries no module: + `device/husky/device.conf` sets no `INITRAMFS_MODULES`, and `bin/omamobile` packs only what that names. Nothing + may open `/dev/ttyBCM` the moment the driver creates it: if anything like `lhd` or a rule that does is + installed, stop here. 2. **Bus**: `usi3_hsi0` and the controller enabled with `num-cs = <1>`, the receiver's node still disabled (the - controller reads `num-cs` at its own probe, so it belongs to this stage). `/sys/class/spi_master` lists the new - controller; no new child under `/sys/bus/spi/devices`; the USI3 pclk, ip and source clocks show enabled in - `clk_summary` (read the command line first: `clk_ignore_unused` would make this prove less); no error from it. -3. **Late `sec_acpm`** (`sec_acpm` blacklisted, `pmic-2` still disabled): the bus DTB of stage 2. Before the - modprobe, `lsmod | grep sec_acpm` is empty and uptime is past 60 s (the regulator cleanup is one-shot, so after - that it cannot fire on a late load); note what is missing meanwhile (touch is). Then one `modprobe sec_acpm`, - and note whether touch comes back. This boot changes only when `sec_acpm` loads, so a failure here is not - confused with the rails. -4. **Rails** (still blacklisted): `pmic-2` enabled too. Same sequence as stage 3, then read `state`, `microvolts` - and `num_users` of the three rails, and through the regmap debugfs the S2MPG15 chip ID and the LDO9S to LDO11S - control registers. [I] the chip ID is register 0x0b and the controls are 0x37 to 0x39 in the `pmic-2` regmaps - (list `/sys/kernel/debug/regmap/` first and use the names it shows); the 7 Pro's 0x34 to 0x36 are S2MPG13's, do - not reuse them. Read only. [U] reading a regmap `registers` file reads every register: whether any clears on - read is not checked, so read `registers` of the three LDOs' regmap only as far as the plan names them. -5. **Receiver**: the node enabled on top of stage 4, `sec_acpm` blacklisted here too. Only if stage 4's reads worked - and touch came back: repeat the late `modprobe sec_acpm` and the rail reads; check that `lsmod | grep bcm4775x` - is empty and the node's `spiN.0` is listed; then ONE command, `modprobe bcm4775x-gnss`. After it read the kernel + controller reads `num-cs` at its own probe, so it belongs to this stage). Watchdog armed first. The proof is + the probe: `/sys/class/spi_master` lists the new controller, bound to its driver, with no error from it in the + log; no new child under `/sys/bus/spi/devices`. I still note the USI3 pclk and ip lines of `clk_summary`, but + with `clk_ignore_unused` in the bootargs they do not show who enabled the clocks. The first transfer comes with + the receiver's driver at the earliest ([U] whether its probe transfers anything while the chip is in standby). + Covered here: a lockup or stall at the probe (panic, reset), a dead userspace (watchdog). Not covered: the + probe itself runs at boot, before the watchdog is armed, so a gate that freezes every CPU there needs the + buttons. +3. **Rails**: `pmic-2` enabled too. The rails register at boot, so the first command is one ssh line with a + deadline: the model check, `cat /proc/uptime` and the `state` of the three `vdd_gnss_*` regulators, before 30 s + of uptime (the cleanup runs 30 s after late init). It comes before the watchdog because arming takes longer + than the time left; only the panics cover it. [U] whether ssh answers that early: if the uptime it prints is + past 30 s, the read is late and I say so. Then the watchdog, then after the cleanup `state`, `microvolts` and + `num_users` of the three rails again, and the kernel log. A `vdd_gnss_*: disabling` line is not a stop: it is + the answer to what the bootloader leaves (the rail was on with no consumer, and the core turned it off); no + line for a rail means it was already off, or its state could not be read. After a `disabling` line the rail is + off with no user, and stage 4's driver switches it. Then, through the regmap debugfs, the S2MPG15 chip ID and the LDO9S + to LDO11S controls: [V] the chip-ID register is 0x0b in the `common` map and the controls are 0x37 to 0x39 in + the `pmic` map (`include/linux/mfd/samsung/s2mpg15.h`; the value of the ID is [U] until read). List + `/sys/kernel/debug/regmap/` first and use the names it shows; the 7 Pro's 0x34 to 0x36 are S2MPG13's, do not + reuse them. Read only. [V] reading these `registers` files clears nothing: in `drivers/mfd/sec-acpm.c` the + S2MPG15 read tables hold only the chip ID (`common`) and seven LDO control registers (`pmic`: 0x33, 0x35, 0x37 + to 0x39, 0x3a, 0x3d), with `REGCACHE_NONE`, so the file reads those from the chip and nothing else. Covered: a + lockup in a read (panic), a dead userspace (watchdog). Not covered: the PMIC's probe and the cleanup's writes + at boot before the watchdog is armed, beyond the panics, and a freeze of every CPU. +4. **Receiver**: the node enabled on top of stage 3. Only if stage 3's reads worked. Watchdog armed first, then + repeat the rail reads; check that `lsmod | grep bcm4775x` is empty and the node's `spiN.0` is listed; then ONE + command, `modprobe bcm4775x-gnss`. After it read the kernel log tail, the pin states as above, `ls -l /sys/bus/spi/drivers/bcm4775x-gnss/`, `ls /dev/ttyBCM /dev/bbd_*`, and `cat /sys/bus/spi/devices/spiN.0/nstandby` (expect 0; a plain read does not power the chip). Nothing else: the - chip stays unopened. + chip stays unopened. Covered: an oops, lockup or stall in the driver's probe (panic, reset in 10 s), and a hang + that leaves the kernel alive but stops userspace (watchdog). Not covered: a probe that freezes every CPU, which + only the buttons undo. ## Stop at once An oops, BUG, panic or hang; no ssh within 90 s of a boot, a visible reboot, or an uptime drop inside the first -190 s; a retry count that is not 3 at a gate (read in the bootloader; the stop is for the boot that follows a refill that did not take); the driver or `sec_acpm` loaded before its manual modprobe; any -`vdd_gnss_*: disabling` line (it means `sec_acpm` loaded early); `sec_acpm` or S2MPG15 errors, or a failing rail or -chip-ID read (do not load the driver); USB or ssh lost when `spi21` probes; a hot phone (over 62 C) or a battery -under 20 %. Between 50 C and 62 C during a stage: finish the reads, do not start the next stage. Touch not back -within 10 s of the late `sec_acpm` is stricter than my earlier runbook, which only noted it: finish the step's -reads, then revert. If ssh still answers, `reboot-to bootloader` first (it spends no try, but the next boot still has to pass the gate: +190 s; a retry count that is not 3 at a gate (read in the bootloader; the stop is for the boot that follows a refill that did not take); the driver loaded before its manual modprobe; a +watchdog that does not arm, or a `refused`, `tripped` or `failed` result from the tool; `sec_acpm` or S2MPG15 +errors, a `couldn't disable` line, or a failing rail or chip-ID read (do not load the driver); touch gone after +`pmic-2` is enabled; USB or ssh lost when `spi21` probes; a hot phone (over 62 C) or a battery under 20 %. Between +50 C and 62 C during a stage: finish the reads, do not start the next stage. A `vdd_gnss_*: disabling` line is +not a stop (stage 3). If ssh still answers, `reboot-to bootloader` first (it spends no try, but the next boot still has to pass the gate: read 3 or refill); if not, a forced restart (Power + Volume Up for 15 to 30 s, as in `tools/husky-deadman`) and then Power + Volume Down to the bootloader. A reset loop: bootloader by the buttons and flash from there, never from the resetting system, and never power-cycle a half-written slot B. Every reset spends one of slot B's three tries. @@ -140,7 +189,7 @@ and never power-cycle a half-written slot B. Every reset spends one of slot B's Remove the modprobe file and confirm it is gone, even if it was removed earlier. Flash the plain image set (known good: `cmp` it against the set and read `DEVICE`, which must say husky), `fastboot -s set_active b` and -read 3, boot, watch the uptime to 190 s, check `uname -r`, then `modprobe sec_acpm` if it is absent and check touch. +read 3, boot, watch the uptime to 190 s, check `uname -r` and touch. A second boot to prove the normal path goes through `reboot-to bootloader` first, with `set_active b` and a read of 3 again, because two boots from 3 leave 1, and one poweroff restart after that (#578) leaves 0. The phone is left at the count that read after the last boot: I write it down. The flash goes through `fastboot -s ` after a @@ -148,6 +197,7 @@ check that exactly one device is there, never through a helper that falls back t ## Still unknown (only the phone settles it) -The USI3 gate offsets on hardware; the rail state the bootloader leaves; the chip ID; whether the native chip select -works at 26 MHz as it is; whether touch re-binds after a late `sec_acpm`; whether `swap-mode` and `dma-mode` matter -on this bus; which `pmic-1` consumers are missing while `sec_acpm` waits. +The USI3 gate offsets on hardware; the rail state the bootloader leaves; the value of the chip ID; whether the +native chip select works at 26 MHz as it is; whether `swap-mode` and `dma-mode` matter on this bus; whether ssh is +up before the regulator cleanup; how long the watchdog takes to reset this phone, and whether `husky-deadman`'s +`noop` checks pass on these images. diff --git a/device/husky/ROADMAP.md b/device/husky/ROADMAP.md index 6f81133cf..c01f5ce28 100644 --- a/device/husky/ROADMAP.md +++ b/device/husky/ROADMAP.md @@ -43,7 +43,7 @@ Status words as in DEVICES.md. "9a" is the Pixel 9a (`tegu`) work. "Needs" lists | Battery | testing (gauge, PMIC and pack EEPROM on kernel #163 and #175, merged; the buses and the gauge's model through overlays until kernel [#205](https://github.com/derekross/linux-omarchy-mobile/pull/205)) | Lef | cheetah [POWER-PLAN](../cheetah/POWER-PLAN.md), [WIFI-BATTERY-PLAN](../cheetah/WIFI-BATTERY-PLAN.md); `gs201-cheetah.dts` has the same chip family. The 9a's [#119](https://github.com/derekross/linux-omarchy-mobile/pull/119) is the MAX77779 and does not apply as is | Stock overlay [V, same source as Display]: fuel gauge `maxim,max77759` @0x36, charger `max77759chrg` @0x69, Type-C `max77759tcpc` @0x25 and `max77729pmic` @0x66, all on `hsi2c_11`; also `nxp,pca9468` and the wireless charger `idt,p9412` (what we found: at 0x3c on `hsi2c_9`, the pack EEPROM bus, with its enable and boost lines on the PMIC GPIO expanders; no mainline driver, read from the stock tree, not tested). The gauge-model overlays are generated from Google's published `zuma-husky-battery-data.dtsi` ([#279](https://github.com/derekross/omarchy-mobile/pull/279), merged). Open: the model in the board file (or picked by the pack ID at runtime), and the charger stopping at 92 % with the bootloader's 4.35 V float ([#272](https://github.com/derekross/omarchy-mobile/issues/272), baseline in [#452](https://github.com/derekross/omarchy-mobile/pull/452)) | Done on one phone, see [BATTERY-NOTES](BATTERY-NOTES.md). Next: kernel #205 (the bus on by default), then the model. **No hand writes to the PMIC or the gauge outside a reviewed tool** (AGENTS.md §1; the notes list the ones made, and why) | | Charging, USB-C | testing (the MAX77759 charger and `tcpci_maxim` as a sink, both by hand in guarded runs) | Lef | cheetah [USB-C-PLAN](../cheetah/USB-C-PLAN.md); 9a: [#97](https://github.com/derekross/linux-omarchy-mobile/pull/97) is `tcpci_maxim` for the MAX77779 (merged) | Same I2C bus as Battery. With the Type-C driver loaded the port is a sink at the Type-C 3 A level and the charger input limit 0xc2 went 0x13 to 0x77 (the battery took +0.33 to +0.52 A, near full), and the driver closes the USB data switch on replug itself; in a separate run without the driver, a 30 W PD charger (no Type-C driver loaded, so no PD negotiation) gave +1.43 to +1.52 A into the battery (average +1.49 A) with 0xc2 unchanged at 0x13; 1.485 A is the device tree's cap, not a measurement ([REPORT-2026-11-01](https://github.com/derekross/omarchy-mobile/issues/1#issuecomment-6562547503)). Not run: PD/PPS, host mode with VBUS out (the connector has no VBUS regulator; the external boost needs a `regulator-fixed` on the MAX77759's GPIO5 plus the TCPC's EXTBST_CTRL), dongles, DP alt mode | The host-mode runbook and the `b5-host` tool are in draft [#282](https://github.com/derekross/omarchy-mobile/pull/282); nothing that sources power runs before the maintainer's review of it and a USB-C meter (his rule on #272). The replug rescue in the device package ([#250](https://github.com/derekross/omarchy-mobile/pull/250), merged) keeps the USB link until the Type-C driver is on by default | | Haptics, Torch | testing on [kernel #200](https://github.com/derekross/linux-omarchy-mobile/pull/200) (open) | Lef | 9a [#96](https://github.com/derekross/linux-omarchy-mobile/pull/96) (CS40L26 and LM3644); cheetah [HAPTICS-TORCH-PLAN](../cheetah/HAPTICS-TORCH-PLAN.md) | CS40L26A at 0x43 on PERIC1 USI0 (`hsi2c_0`) and the LM3644 at 0x63 on PERIC0 USI14 (`hsi2c_14`); #200 adds CMU_PERIC0 and the HSI1 pin controller for them. Lef felt the buzz and saw the LED; the torch is capped at 50 mA per LED like the 7 Pro's bring-up. Open: a gentle strength for UI taps (feedbackd), the shell's torch tile | Review #200 | -| GNSS | no (the bus clocks [#210](https://github.com/derekross/linux-omarchy-mobile/pull/210), the PMIC rails [#211](https://github.com/derekross/linux-omarchy-mobile/pull/211) and the disabled receiver node [#239](https://github.com/derekross/linux-omarchy-mobile/pull/239) are merged; the first-boot plan is [GNSS-PLAN.md](GNSS-PLAN.md); nothing has run on the phone) | Lef | cheetah [GNSS-PLAN](../cheetah/GNSS-PLAN.md); the 9a's is parked | What we found: a separate Broadcom BCM4775x on `spi_21` (HSI0 USI3, 26 MHz) with its own three S2MPG15 LDOs, as on the 7 Pro. The driver, the binding and the S2MPG15 regulators are already in the tree. The vendor image carries the Broadcom GNSS service, so this is the chip Android uses; the modem-GNSS channels in `cpif` are not the path. Missing: Google's `lhd` and `gpsd` in a chroot built from the owner's own factory image (the extract tool needs one line for husky); the regulator rule (PMIC modules after about 30 s of late init) | The bring-up overlay for the bus, the PMIC and the node, after [GNSS-PLAN.md](GNSS-PLAN.md) has been read; the first boots are read-only | +| GNSS | no (the bus clocks [#210](https://github.com/derekross/linux-omarchy-mobile/pull/210), the PMIC rails [#211](https://github.com/derekross/linux-omarchy-mobile/pull/211) and the disabled receiver node [#239](https://github.com/derekross/linux-omarchy-mobile/pull/239) are merged; the first-boot plan is [GNSS-PLAN.md](GNSS-PLAN.md); nothing has run on the phone) | Lef | cheetah [GNSS-PLAN](../cheetah/GNSS-PLAN.md); the 9a's is parked | What we found: a separate Broadcom BCM4775x on `spi_21` (HSI0 USI3, 26 MHz) with its own three S2MPG15 LDOs, as on the 7 Pro. The driver, the binding and the S2MPG15 regulators are already in the tree. The vendor image carries the Broadcom GNSS service, so this is the chip Android uses; the modem-GNSS channels in `cpif` are not the path. Missing: Google's `lhd` and `gpsd` in a chroot built from the owner's own factory image (the extract tool needs one line for husky); the regulator rule (`sec_acpm` is built in, so the rails register at boot and the regulator cleanup 30 s after late init turns off any the bootloader left on) | The bring-up overlay for the bus, the PMIC and the node, after [GNSS-PLAN.md](GNSS-PLAN.md) has been read; the first boots only read, until the one manual driver load in the last stage | | AoC, Speakers/mics | testing (AoC, both amplifiers, stereo speakers and one microphone through UCM2 and PipeWire, on a test tree: kernel [#203](https://github.com/derekross/linux-omarchy-mobile/pull/203), [#204](https://github.com/derekross/linux-omarchy-mobile/pull/204), package [#453](https://github.com/derekross/omarchy-mobile/pull/453), plan [AOC-PLAN](AOC-PLAN.md), all open) | Lef | cheetah [AOC-PLAN](../cheetah/AOC-PLAN.md), [AUDIO-PLAN](../cheetah/AUDIO-PLAN.md) | The AoC loads through the GSA and starts through Trusty (`trusty-ipc` before `trusty-virtio`); zuma's System MMU is v9, and the 7 Pro's v8 offsets reset the phone (#450). The amplifiers share one SPI controller, one on the native chip select and one on a GPIO one (#204). The speaker-protection firmware and `aoc.bin` come from the owner's own vendor image. Levels are capped (digital 737, analog 10, no `speaker_protection`), the microphone is one of three ids and which hole it is is not settled, the earpiece and headset paths are not done. Not PRs yet: the AoC core port to zuma and the System MMU v9 file (shape asked on #1) | Review #450 and #453; the AoC core and System MMU v9 patches once the maintainer picks the file shape | | Sensors | no (read from the stock device tree, not tested) | unassigned | cheetah [AOC-PLAN](../cheetah/AOC-PLAN.md), [USF-PROTOCOL](../cheetah/USF-PROTOCOL.md) | What we found: the running AoC publishes the USF services (`com.google.usf`, its non-wake-up twin and the doorbell) and CHRE; the stock AoC node wants two sensor rails (S2MPG15 `L7S_SENSORS`, `L5S_PROX`) that our tree does not give it. Which physical sensors husky has is not known (the registry scripts are in the vendor partition). Needs the AoC char devices, Google's registry scripts loaded at boot, and the cheetah sensor proxy | After the AoC PRs: one read-only `RegistryGet` through the USF char device with the phone in hand (an AoC assert needs a reboot) | | Modem | no | Lef, once a SIM is found ([Brett asked](https://github.com/derekross/omarchy-mobile/issues/1#issuecomment-6544100933)) | cheetah [MODEM-PLAN](../cheetah/MODEM-PLAN.md); 9a [MODEM-PLAN](../tegu/MODEM-PLAN.md) ("ONLINE with IPC, no SIM yet") | A SIM (a prepaid one is the plan; the phone's own SIM is a data-only eSIM); the baseband is `g5300i` [V: fastboot], the S5300 family like cheetah's [I]; the CP's PCIe link and the `cpif` driver; modem firmware from the owner's own factory image; the NV protections. **Lef has a private read-only backup of the modem and calibration partitions (checksummed, plus an encrypted second copy) [V: not in this repository]; [#449](https://github.com/derekross/omarchy-mobile/pull/449) (open) gives husky's descriptor the `NV_PARTS` so `tools/nv-backup` takes and checks it.** | Read cheetah's and the 9a's MODEM-PLAN M0 to M2 end to end. Stage 0 is read-only: partitions, and what a booted phone answers without starting the modem |