diff --git a/AGENTS.md b/AGENTS.md index 5e4034c7b..2fd89b7fb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -172,7 +172,7 @@ Each entry gives the gotcha, then the reason or the fix. Details are in the link ### Suspend and modem -- **On the 9a, NFC must not poll through s2idle.** A suspend with neard polling reset the palmtop (2026-10-27); with polling stopped, 35 s2idle cycles with RTC wakes that day all woke. The cause isn't known: nxp-nci has no PM callbacks, but neither does the 7 Pro's st-nci, so the controller's interrupt or the I2C bus during the freeze are the next suspects. A sleep hook on the palmtop, `omamobile-tegu-nfc` (not in the repository yet; it comes with tegu's device package), stops neard's poll loop before a systemd sleep and restarts it after; a sleep written straight to `/sys/power/state` (`rtcwake -m mem`) skips the hook, so stop polling by hand first. [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) "Suspend with the modem on" +- **On the 9a, NFC must not poll through s2idle.** A suspend with neard polling reset the palmtop (2026-10-27); with polling stopped, 35 s2idle cycles with RTC wakes that day all woke (`7.3.0-rc6-omamobile-tegu-s2mpg15-m1`). The cause isn't known: nxp-nci has no PM callbacks, but neither does the 7 Pro's st-nci, so the controller's interrupt or the I2C bus during the freeze are the next suspects. A sleep hook on the palmtop, `omamobile-tegu-nfc` (not in the repository yet; it comes with tegu's device package), stops neard's poll loop before a systemd sleep and restarts it after; a sleep written straight to `/sys/power/state` (`rtcwake -m mem`) skips the hook, so stop polling by hand first. [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) "Suspend with the modem on" - **UFS must be at `spm_lvl` 5 in system suspend.** At the core default 3, UFS failed its first hibern8 exit on resume and needed a host reset (it recovered, no I/O errors); at 5 the first real s2idle freeze resumed clean. gs201 now defaults to 5 in the kernel (S3a, `a7e5e1d95`), so a suspend test only checks that `spm_lvl` reads 5; on a kernel without that commit, `echo 5` first. [SUSPEND-PLAN](device/cheetah/SUSPEND-PLAN.md) S1-S3 - **Only s2idle, never `deep`.** The firmware advertises PSCI SYSTEM_SUSPEND, so mainline offers `deep`, but Linux has no gs201 SoC sleep sequence (SYS_SLEEP), and the phone wouldn't wake. `mem_sleep_default=s2idle` in the bootargs and device-cheetah's `sleep.conf` drop-in keep it on s2idle. [SUSPEND-PLAN](device/cheetah/SUSPEND-PLAN.md) §1, §5 - **Some unattended RTC cycles wake early on the PMIC interrupt** (2 of 20 in S4, 4 of 31 in S5c, at 13-16 s instead of 30 s). Which PMIC event it is hasn't been read yet; count it, don't treat it as a failed cycle. [SUSPEND-PLAN](device/cheetah/SUSPEND-PLAN.md) S4, S5c diff --git a/device/tegu/MODEM-PLAN.md b/device/tegu/MODEM-PLAN.md index 19d7460ff..3ae22ec63 100644 --- a/device/tegu/MODEM-PLAN.md +++ b/device/tegu/MODEM-PLAN.md @@ -30,7 +30,12 @@ The 9a's GNSS is the modem's own: stock's `cp_shmem` carries a over SPI (`gnss@0`, `samsung,gnss-spi`, interrupt on gpa5-4). So GNSS needs the modem up, but not a SIM. Following Derek's advice on issue #51, the modem comes up for GNSS first, and the SIM (a prepaid physical one on a -T-Mobile-network MVNO, PIN off, activated on slot A) comes later. +T-Mobile-network MVNO) comes later. It is activated in another phone or +through the carrier's web activation, with its PIN turned off there, then +put in the 9a with the 9a off. Not on slot A: stock there overwrites +`userdata` before it reaches recovery ([NOTES, 2026-10-26 and 2026-10-28](NOTES.md#2026-10-26-and-2026-10-28-slot-a-fallbacks-that-cost-userdata)), so booting it loses the Linux +root. The backup check and a +fresh read-only backup before the first Linux modem session stay as below. ## Safety diff --git a/device/tegu/NOTES.md b/device/tegu/NOTES.md index 53be7f2b6..fcd51c864 100644 --- a/device/tegu/NOTES.md +++ b/device/tegu/NOTES.md @@ -117,6 +117,145 @@ The laptop keeps the command log. The 10-28 harness copy differed from the Only byte 0x35 changed (bit 0x02), and slot A was untouched. +## 2026-10-28: what the device table's claims rest on + +Each line is a run on this 9a, on `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty` +unless it says otherwise; the kernel pull request has the details. + +- **Display:** the published kernel drives the panel at 60 Hz. 120 Hz runs + on the palmtop with kernel #88's two files (DECON timers per panel), in + review. +- **Touch, sleep fix (kernel #82):** 20 s2idle cycles with RTC wakes in a + row, no `bad message header`, touch working after each; without it touch + broke at the 13th. +- **Buttons, Power wakes s2idle:** checked by hand on 2026-10-27, Power from + a freeze back to the desktop. +- **Bluetooth, BCM4383 (kernel #94, merged):** `hci_uart` reloaded with that + exact `hci_bcm.c`: the controller came up as `hci0` on its REG_ON latch. + Pairing (A2DP) ran with the older form of the code. +- **Charging, status and inhibit (kernel #92):** the driver bound at 0x69; + status, and inhibit through `charge_behaviour`, read and set on the + palmtop. +- **Haptics, CS40L26 with VPBR (kernel #95, merged):** binds, loads its + firmware with brownout prevention at 3.008 V, plays effects. +- **Torch, LM3644 (DT in kernel #96):** 25 brightness steps up to 75 mA on + the torch LED. +- **Suspend, Power and RTC wakes:** Power by hand as above; RTC wakes in the + #82 run and in the 2026-10-28 sleep tests, where one of four never woke + (recorded in the camera switching entry below). + +## 2026-10-28: camera switching, pstore, idle hints, sleep memory rate + +Kernel `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`. + +- **Camera switching works** (kernel #103). The first capture after a + switch away from the ultrawide or front camera came back empty about + half the time. The LoCH's EN_STATUS (0x0a8) stays active with the old + link in its low bits after a stream that stopped cleanly, and a disabled + LoCH ignores the abort, so the next stream on another link got no + interrupts. Enabling it for the abort fixes it: nine captures, every + switch order, all write frames. +- **pstore** (kernel #106): ramoops on stock's region survives a watchdog + reset on zumapro (the bootloader writes its own log at the start of the + console zone). +- **Core and cluster power-down hints** (the CPU_INFORM register Google's + driver writes at every idle entry): powering down cluster 0 stops ACPM + answering its DVFS channel, and the palmtop resets (pstore shows it); + Google never powers down cluster 0. Clusters 1 and 2 are stable, but + neither hint saves anything measurable, screen on or off. Dropped. +- **Memory rate in s2idle:** with the cable in and charging paused, + 10-minute RTC-woken freezes drew 371 and 373 mA at MIF 2028 MHz and + 314 mA at 421 MHz. One later freeze never woke (in s2idle the watchdog + is stopped); a hand restart brings it back. +- **Link errors** on every camera are ERR_WRONG_CONFIG: packets on VC 0 + with a data type no channel takes (an embedded-data line a frame on the + front and ultrawide, about 527 PDAF packets a frame on the main camera). +- **Fingerprint:** the trusted app's secure storage is up, with Trusty's + stores at the paths stock uses (`0`, `persist/0`) but on loop devices of + Linux-owned images under `/var/lib/omamobile-fp`, not on stock's + `trusty_userdata` and `trusty_persist` (omarchy-mobile #101; + FINGERPRINT-PLAN D1 and F4b). The factory + calibration lives with Google: the bootloader names the file (its + `get-cal-url` answer) and it comes from a manufacturing bucket. The panel's + id isn't the key (omarchy-mobile #101). +- **GNSS:** the S2MPG15's three GNSS rails are off at hand-off and stock + turns them on; they're now described (kernel #101) and on. + +### Reserved memory beyond Google's map (kernel #80) + +`zumapro-reserved-memory.dtsi` in #80 carries Google's fixed regions from +`zumapro-rmem.dtsi`, zuma's xhci pools, and three more: + +- `abl@f8800000`: predeclared in stock's own factory base DTB as 32 MiB, + which ABL shrinks to 16 MiB at hand-off. +- `0x913a0000` (+0x60000) and `0xfd7ff000` (+0x1000): two ranges the early + bring-up kept reserved, next to GXP and the debug tail. They come from the + private DRAM map the first boots were built from, not from a public + source. + +Keeping them reserved is the safe direction. What would free the two gaps +is stock's live `/proc/iomem` and reserved-memory nodes compared with ours; +this palmtop can't produce that (stock on slot A overwrites `userdata` +before it reaches recovery: [2026-10-26 and 2026-10-28](#2026-10-26-and-2026-10-28-slot-a-fallbacks-that-cost-userdata)), +so it needs a second 9a or a reinstall of stock. + +## 2026-10-27: cameras, NFC, USB-C, storage power, fingerprint, drain + +Kernel `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty` (the +integration tree; the pieces are kernel PRs, linked below) for everything +here. The 35 s2idle cycles in AGENTS.md's NFC entry ran on this release too. + +**Cameras (kernel #63, #103).** `cam -l`: + + 1: Internal back camera (/base/soc/usi@108c00c0/i2c@108c0000/camera@56) + 2: Internal back camera (/base/soc/usi@108900c0/i2c@10890000/camera@1a) + 3: Internal front camera (/base/soc/usi@108a00c0/i2c@108a0000/camera@1a) + +`tools/phone-smoke`: `| cameras | ok | 3 listed by libcamera |`. With the +ultrawide's test pattern on, LoCH 0 on link 1 (CTL 0x01000200, RESOL +0x0c001070, 5312 bytes a line, format 4) wrote three 4208x3072 frames +(48955392 bytes) showing the sensor's eight colour bars, full width and +height; the solid-colour pattern (R 1023, Gr 0, B 341, Gb 682) reads back as +BGGR. The main camera (S5KGN8, C-PHY) delivers whole 4000x3000 frames once +gs201-csis raises the INT domain and the ISP front end's NOC clock while it +streams. The ultrawide and the front stream at about 29 fps through the +software ISP. The tested `phy-gs201-mipi-dcphy-rx.c` is #63's (ed3dacc7f958); +the tested `gs201-csis.c` (acd8d7d0987a) differs from #63's in one comment. +Open: the first capture after a camera switch is often empty. + +**NFC (kernel #100).** The ST54L reads a contactless card through the +kernel and neard once nxp-nci sends ST's CORE_SET_CONFIG after init: an +ISO-DEP target on NFC-A, 15 activations in 45 s with the card held, neard +lists a tag, with no periodic discovery restart. NFC polling costs about +60 mA, so omamobile-shell 0.2.33 (PR #99 here) stops it with the screen off. + +**USB-C.** tcpci_maxim (merged, kernel #97) loads at boot: a PD contract at +5 V 3 A, replug back within 1 s. Host mode: VBUS comes from the RT9470 on +USI10 (Google's ext-otg-only use case; USI10 clocks in kernel #102), the +TCPC sees VBUS, dwc3 goes host, but a flash drive never connects: the +eUSB2 repeater (hsi2c9 0x3e) doesn't take the host role yet. Plug-in wakes +s2idle once the TCPC's interrupt is armed. + +**Storage power (kernel #99).** UFS idle clock gating: the cores spend +60-68 % of an idle minute in C2 with the core's latency request left on +(0 % with the clocks held on), no UFS errors under load. + +**Fingerprint.** The sensor's 3.3 V is S2MPG15 LDO15S, off at hand-off +(kernel #101); with it on the trusted app finds the sensor and the HAL +reports it at (540, 1769), radius 113. Init still ends without factory +calibration: `mfg_data` is all zeros on this palmtop and the TA's +calibration objects don't open (FINGERPRINT-PLAN.md). + +**Drain, cable out.** Awake with the screen off: 556 mA before UFS gating, +409 mA after it at MIF 2028 MHz and 366 mA at 421 MHz (ACPM lowers MIF on +request); NFC polling about 60 mA of that; Wi-Fi off and the CPUs at their +lowest changed little. s2idle: about 140 mA over 59 min. MIF stays at the +bootloader's 2028 MHz until something asks for less. + +**Recovery.** A reboot stuck in `device_shutdown` needs Power held about +30 s, then Power; with a task stuck in D, reboot with `echo b > +/proc/sysrq-trigger` instead of `systemctl reboot`. + ## 2026-10-26: audio (speakers, microphones, A2DP) with omamobile-audio 0.5.0 Kernel `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`: the private diff --git a/docs/DEVICES.md b/docs/DEVICES.md index 8303835a9..88bbd7f4c 100644 --- a/docs/DEVICES.md +++ b/docs/DEVICES.md @@ -25,7 +25,7 @@ The status of each device, as verified on real hardware. Rows in the matrix have | Pixel 6 | oriole | gs101 (Tensor G1) | WIP ([#2](https://github.com/derekross/omarchy-mobile/issues/2): descriptor and boot images from the factory image and a retail phone; not booted yet) | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | | Pixel 4 | flame | SM8150 (Snapdragon 855) | testing (temporary RAM boot; [notes](../device/flame/BRINGUP-M1.md)) | testing (RAM probe; all UFS read-only) | testing (1080x2280 console; software desktop in separate Arch payload) | testing (separate Arch payload; FD640 contexts, llvmpipe desktop) | testing (separate Arch payload; events and PIN unlock verified) | no | testing (NCM + ACM + SSH; sustained transfers can disconnect) | testing (guarded RAM scan; association untested) | no | no | no | no | no | no | - | no | no | no | no | no | no | - | | Pixel 4 XL ([notes](../device/coral/NOTES.md)) | coral | SM8150 (Snapdragon 855) | WIP (direct ABL v2 boot on the test handset's slot A; slot-B install and §3.1 entry pending; [notes](../device/coral/BRINGUP-M1.md)) | testing (read-only `blockdev` guard + RAM `overlayfs`) | testing (1440x3040@60Hz S6E3HC2 DSC 1.1 KMS, DPMS, brightness) | testing (Adreno 640 / FD640 Mesa Freedreno, Hyprland) | testing (FTS SPI multitouch + read-only flash guard) | testing (power via `qcom-pon` + volume via `gpio-keys`) | testing (CDC ECM + ACM + SSH; stays up with host USB switched off) | testing (`WCN3990` `ath10k_snoc` + `rmtfs -r`, WPA2/DHCP/HTTPS; radio sessions ran before the modem baseline) | WIP (`WCN3990` `hci_qca` `hci0` up + BLE scan; audio/pairing open) | WIP (PM8150B ADC `VBAT_SNS` voltage + FG temp; aftermarket pack on test unit: no reply from `1-0036`) | testing (PM8150B SMB5 charger with `4.20 V` / `500 mA` kernel clamp) | testing (`CS40L25A` I2C click waveform) | testing (PM8150L flash LEDs + quick-settings tile) | no | - | testing (QDSP6 + dual `CS35L36` amps capped at `-26 dB` + `IA8508` SPI mic DSP) | testing (`SLPI` + `fastrpc` + RAM-backed `hexagonrpcd` + QMI SSC: 7 sensors + Soli radar) | WIP (`MPSS` boots with `rmtfs -r` + patched `tqftpserv`, SIM detected; no IPA/voice yet; radio sessions ran before the modem baseline) | no | testing (`CAMSS` + `IMX363`, `IMX481`, `IMX520`, dual `OV7251` NIR; `libcamera` softISP) | no | - | -| Pixel 9a ([notes](../device/tegu/NOTES.md)) | tegu | zumapro (Tensor G4) | WIP ([#28](https://github.com/derekross/omarchy-mobile/issues/28): the SoC's clocks and bindings are merged into linux-omarchy-mobile; the SoC and board device tree is in review, [kernel #80](https://github.com/derekross/linux-omarchy-mobile/pull/80)) | WIP | WIP (DSI panel, 1080x2424; unpublished kernel) | WIP (Panthor, the desktop renders; unpublished kernel) | WIP | WIP (gpio-keys; unpublished kernel) | WIP | WIP (brcmfmac joins WPA2; driver in review, [kernel #56](https://github.com/derekross/linux-omarchy-mobile/pull/56)) | WIP (powered; unpublished kernel) | WIP (the gauge reads; unpublished kernel) | no | no | no | no | WIP (audio and sensors; unpublished kernel) | WIP (speakers capped, mics, A2DP; unpublished kernel) | WIP (accelerometer, light, proximity; unpublished kernel) | no | no | no | no | WIP (Trusty's TA runs and the HAL sees the sensor, unpublished kernel; enrollment waits for the factory calibration; [plan](../device/tegu/FINGERPRINT-PLAN.md)) | +| Pixel 9a ([notes](../device/tegu/NOTES.md)) | tegu | zumapro (Tensor G4) | WIP ([#28](https://github.com/derekross/omarchy-mobile/issues/28): clocks, ACPM, panel and TCPC merged; the SoC and board device tree is in review, [kernel #80](https://github.com/derekross/linux-omarchy-mobile/pull/80)) | WIP (UFS root; reset across suspend merged, idle clock gating [kernel #99](https://github.com/derekross/linux-omarchy-mobile/pull/99)) | WIP (DSI panel 1080x2424 at 60 Hz, 120 Hz in review; panel driver merged, display DT [kernel #90](https://github.com/derekross/linux-omarchy-mobile/pull/90), 120 Hz [kernel #88](https://github.com/derekross/linux-omarchy-mobile/pull/88)) | WIP (Panthor to 890 MHz; DT [kernel #85](https://github.com/derekross/linux-omarchy-mobile/pull/85), [kernel #87](https://github.com/derekross/linux-omarchy-mobile/pull/87)) | WIP (DT [kernel #81](https://github.com/derekross/linux-omarchy-mobile/pull/81), sleep fix [kernel #82](https://github.com/derekross/linux-omarchy-mobile/pull/82)) | WIP (gpio-keys; Power wakes s2idle) | WIP (gadget and replug; host mode: VBUS on, no enumeration yet; repeater driver [kernel #107](https://github.com/derekross/linux-omarchy-mobile/pull/107)) | WIP (brcmfmac joins WPA2; driver in review, [kernel #56](https://github.com/derekross/linux-omarchy-mobile/pull/56)) | WIP (BCM4383 merged, [kernel #94](https://github.com/derekross/linux-omarchy-mobile/pull/94); BlueZ, A2DP) | WIP (the gauge reads; unpublished kernel) | WIP (status and inhibit [kernel #92](https://github.com/derekross/linux-omarchy-mobile/pull/92); PD contract, tcpci_maxim merged, [kernel #97](https://github.com/derekross/linux-omarchy-mobile/pull/97)) | WIP (CS40L26, VPBR merged, [kernel #95](https://github.com/derekross/linux-omarchy-mobile/pull/95); DT [kernel #96](https://github.com/derekross/linux-omarchy-mobile/pull/96)) | WIP (LM3644, 25 steps; DT [kernel #96](https://github.com/derekross/linux-omarchy-mobile/pull/96)) | no (firmware and CHPP run; the engine faulted with its three rails off at hand-off, now on, [kernel #101](https://github.com/derekross/linux-omarchy-mobile/pull/101)) | WIP (audio and sensors; unpublished kernel) | WIP (speakers capped, mics, A2DP; unpublished kernel) | WIP (accelerometer, light, proximity; unpublished kernel) | WIP (ONLINE with IPC, no SIM yet) | WIP (reads cards, [kernel #100](https://github.com/derekross/linux-omarchy-mobile/pull/100), clock [kernel #104](https://github.com/derekross/linux-omarchy-mobile/pull/104)) | WIP (all three stream through libcamera, switching between them works; [kernel #63](https://github.com/derekross/linux-omarchy-mobile/pull/63), [kernel #103](https://github.com/derekross/linux-omarchy-mobile/pull/103)) | WIP (s2idle; Power and RTC alarm wake; drain still high) | WIP (sensor, trusted app and secure storage up, its stores on loop devices of images in `userdata`, [#101](https://github.com/derekross/omarchy-mobile/pull/101); factory calibration fetched, not loaded yet) | | Pixel 8 Pro ([notes](../device/husky/NOTES.md)) | husky | zuma (Tensor G3) | WIP ([#1](https://github.com/derekross/omarchy-mobile/issues/1): our kernel boots from slot B; the zuma device tree is merged ([kernel #13](https://github.com/derekross/linux-omarchy-mobile/pull/13))) | testing (UFS at HS-G4 behind the read-only guard; Arch on `userdata`; [UFS-PLAN](../device/husky/UFS-PLAN.md)) | WIP (simple-framebuffer console) | no | no | no | testing (USB and SSH) | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | | Pixel 7 ([notes](../device/panther/NOTES.md)) | panther | gs201 (Tensor G2) | WIP (slot B, not marked successful; Arch and Hyprland boot; [BRINGUP-M1](../device/panther/BRINGUP-M1.md); board file merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (UFS behind the read-only guard; Arch on `userdata`; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | WIP (simple-framebuffer: console and the Hyprland lock screen) | testing (Panthor on the Mali-G710; Hyprland renders on it; in review, [kernel #129](https://github.com/derekross/linux-omarchy-mobile/pull/129)) | WIP (FocalTech FT3658 driver merged, [kernel #109](https://github.com/derekross/linux-omarchy-mobile/pull/109); the touch node is next) | testing (gpio-keys: power, volume; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (USB and SSH; a replug needs a reboot; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | no | no | no | no | testing (CS40L26 with the phone's own firmware, `tools/extract-vendor-firmware -d panther`; in review, [kernel #130](https://github.com/derekross/linux-omarchy-mobile/pull/130)) | no | no | no | no | no | no | no | no | no | no | | *Template* | *codename* | *SoC* | | | | | | | | | | | | | | | | | | | | | | |