Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
522b86c
device/tegu MODEM-PLAN, AGENTS: GNSS resolved, a fix on the 9a
W4HO-ham Oct 31, 2026
407b764
MODEM-PLAN, NOTES, AGENTS: the link hold crashes the CP; the fix last…
W4HO-ham Oct 31, 2026
0084409
device/tegu: the hand units that put the 9a's GNSS behind Omarchy's L…
W4HO-ham Oct 31, 2026
42825f0
MODEM-PLAN: the Location switch on the 9a, and the doorbell guard tha…
W4HO-ham Oct 31, 2026
96cf092
MODEM-PLAN, AGENTS: the CP link three ways, and why ap2cp_wakeup deci…
W4HO-ham Oct 31, 2026
4afc11f
MODEM-PLAN: every register path in the link-cycling window, audited; …
W4HO-ham Oct 31, 2026
21fb50e
MODEM-PLAN: the link cycles because our L1 substates are a stub
W4HO-ham Oct 31, 2026
b28e8f1
Merge remote-tracking branch 'origin/main' into tegu-gnss-fix
W4HO-ham Oct 31, 2026
aad8047
MODEM-PLAN: G3-L1 answered, the link cycled because L1 substates were…
W4HO-ham Oct 31, 2026
85035c8
MODEM-PLAN: L1.2 stops the cycling but drops the link after minutes; …
W4HO-ham Oct 31, 2026
ab682cb
MODEM-PLAN: three L1 substate configurations measured, and the longer…
W4HO-ham Oct 31, 2026
e7d6c45
MODEM-PLAN: the L1SS writes went to the wrong offset, so those three …
W4HO-ham Oct 31, 2026
97293c4
MODEM-PLAN: both ends support all four L1 substates; what takes and w…
W4HO-ham Oct 31, 2026
d9fbce4
MODEM-PLAN, AGENTS, NOTES: the review of #202: drop the wake-line got…
W4HO-ham Oct 31, 2026
9f7d727
MODEM-PLAN, NOTES, AGENTS: the pin drive change is withdrawn, #150 al…
W4HO-ham Oct 31, 2026
a9877d7
MODEM-PLAN: G3-L1, the L1 substates take effect but the link hang rem…
W4HO-ham Oct 31, 2026
edb3bda
Merge main into tegu-gnss-fix; MODEM-PLAN, NOTES, AGENTS: the review …
W4HO-ham Oct 31, 2026
7d3779e
MODEM-PLAN: the Location install steps need a command line that masks…
W4HO-ham Oct 31, 2026
b32af19
MODEM-PLAN: G3-L1, the SoC hangs in cpif's pci_save_state(), and afte…
W4HO-ham Nov 1, 2026
f62a788
MODEM-PLAN: the first traced hang came about 11 minutes in
W4HO-ham Nov 1, 2026
c1e0568
MODEM-PLAN: G3-L1, the power-on trace: the next hang is the link-ack …
W4HO-ham Nov 1, 2026
9d8d73b
MODEM-PLAN: G3-L1, save-once plus a write-only doorbell still hangs, …
W4HO-ham Nov 1, 2026
612abdb
MODEM-PLAN: G3-L1, 299 link cycles, and the hang lands just after the…
W4HO-ham Nov 1, 2026
704d01f
MODEM-PLAN: G3-L1, the hang is not the Wi-Fi bring-up, and lands on a…
W4HO-ham Nov 1, 2026
8d45717
MODEM-PLAN: G3-L1, the reset starts at the CP's wake with the link do…
W4HO-ham Nov 1, 2026
ba55498
MODEM-PLAN: G3-L1 found, the PERIC0 GPIO clock gate hung the SoC
W4HO-ham Nov 1, 2026
9758ee5
AGENTS: the 9a's PERIC0 GPIO clock gate hung the SoC
W4HO-ham Nov 1, 2026
7212ee6
MODEM-PLAN: G3-L1, a 30-minute GNSS session on the fixed kernel
W4HO-ham Nov 1, 2026
93c3f68
MODEM-PLAN: the status line, the GNSS hang is fixed
W4HO-ham Nov 1, 2026
d94d4ac
MODEM-PLAN: P, how the 9a's modem link goes into the published kernel
W4HO-ham Nov 1, 2026
c2be8ca
MODEM-PLAN: P, the 9a's modem link drafted as kernel #173
W4HO-ham Nov 1, 2026
b270cab
Merge remote-tracking branch 'origin/main' into tegu-gnss-fix
W4HO-ham Nov 1, 2026
95ebe56
MODEM-PLAN: the review of 11-01: the Location paragraph matches the d…
W4HO-ham Nov 1, 2026
b674922
device/tegu MODEM-PLAN, NOTES: the fixed-kernel sessions cycled the l…
W4HO-ham Nov 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ Each entry gives the gotcha, then the reason or the fix. Details are in the link
- **The AoC starts only through Trusty** (`com.android.trusty.gsa.hwmgr.aoc`). The GSA mailbox `START` leaves the A32 held. So Trusty is a dependency of audio and sensors, not just of fingerprint, and it runs at every boot on the integration kernel.
- **Fingerprint: nothing writes `persist` or the RPMB without the human's explicit go.** The first `storageproxyd` run (FINGERPRINT-PLAN F4) is irreversible, and `omamobile-fp.service` ships disabled because its first run writes Trusty's secure storage. [FINGERPRINT-PLAN](device/cheetah/FINGERPRINT-PLAN.md)
- **Set the Bluetooth address only after powering the controller on:** set on a never-powered controller, the kernel withdrew the index for good.
- **spi-s3c64xx with automatic chip select dropped bits between transfers before linux-omarchy-mobile#150 (merged 2026-10-31):** its FIFO flush cleared the packet count before turning the channels off, so the controller clocked a few bits with the slave still selected. A slave that restarts per chip-select cycle (touch) doesn't notice; one that streams across cycles (the 9a's GNSS core, CHPP) loses 2-6 bits per transfer, and every read lands at a different bit offset. [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) "G3, GNSS gets a fix"
- **A node without pinctrl runs on the bootloader's pins, and a pin change tested next to another fix proves nothing on its own.** The 9a's GNSS SPI has no pin group and runs at the bootloader's drive 0; raising the drive looked like it cleaned the data, but it was tested together with the SPI flush fix, and with the flush fix alone at drive 0 the data was just as clean (linux-omarchy-mobile#151 closed). Read the bank's CON/PUD/DRV in `/sys/kernel/debug/pinctrl/<controller>/pins` (one controller at a time, as the gs101 note above says) before changing anything, then change one thing per boot, and check whose pins they are in the vendor tree before claiming them (gpp22 is the eSE's). [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) "G3, GNSS gets a fix"
- **Samsung pinctrl takes pin groups only at its own probe:** groups added later by a runtime overlay are refused ("invalid function … in map table"), so a driver's pin states belong in the base DT even when its node comes from an overlay. [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) M2.0
- **On the 9a, a writable GPIO bus clock gate hung the SoC:** the Samsung pin controller turns its pclk off after every register access, and `CLK_GOUT_GPIO_PERIC0` was a real, manual-mode gate, so the modem's AP2CP writes on PERIC0 (twice a second under GNSS) hung the palmtop within minutes, at random points and with nothing in the log. Keep GPIO gates critical or read-only on a CMU without automatic clock gating ([linux-omarchy-mobile#172](https://github.com/derekross/linux-omarchy-mobile/pull/172)). [tegu MODEM-PLAN](device/tegu/MODEM-PLAN.md) G3-L1
- **On tegu, ABL leaves every GPA5 pin pulled down, and that hides the modem's cp2ap lines:** with the pull-down nothing rose for 10 s after power-on; with stock's pulls (wakeup up, phone-active and ps-hold floating, in the base DT) they rise within 0.5 s. Check a line's pull before blaming the device that drives it. [tegu FAR-ALIVE-PLAN](device/tegu/FAR-ALIVE-PLAN.md)
- **brcmfmac on BCM4389 needs control-ring D3 messages:** this firmware ignores the TCM mailbox, so early suspend tests ran with Wi-Fi unloaded. The D3 series on `omamobile-int` sends the D3 inform as a control message, and Wi-Fi now stays connected across s2idle (S5b-3; S5c, 31 of 31 freezes, 2026-10-19). The sleep hook (`omamobile-sleep` in device-cheetah) keeps Wi-Fi loaded when `/etc/omamobile/wifi-keep-across-sleep` exists (set on the reference phone since S5c), and otherwise unloads it; after a failed D3 handshake it falls back to unloading for the rest of the boot. Wi-Fi can't wake the phone (no host-wake consumer). [SUSPEND-PLAN](device/cheetah/SUSPEND-PLAN.md) S5

Expand Down
640 changes: 631 additions & 9 deletions device/tegu/MODEM-PLAN.md

Large diffs are not rendered by default.

23 changes: 21 additions & 2 deletions device/tegu/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ hash/build ID; this dirty release is not a published kernel package.
`[V]` marks verified observations; `[I]` marks an inference still to test.
Raw captures, recordings, backups and vendor files remain off repository.

## 2026-10-30, evening: GNSS gets a fix

The receiver gets a position fix on the owner's kernel: up to 13 satellites
used, HDOP 0.8-1.2, GPS, Galileo, BeiDou and GLONASS tracked, CHPP clean
for about a minute per boot. One fix did it: spi-s3c64xx
turned the channels off after clearing the packet count, which lost a few
bits per transfer on a streaming slave (linux-omarchy-mobile#150). A pin
drive change (linux-omarchy-mobile#151) was credited too and withdrawn on 10-31: at the
bootloader's drive 0 with linux-omarchy-mobile#150 alone, 50 of 53 fixed and every frame at bit
offset 0 with a valid CRC. What ends the fix is
the CP link under GNSS traffic: held up it crashes the CP 103-108 s after
ONLINE (six boots of six), left to cycle it hung the SoC 170 s to about 26 minutes
after ONLINE. That hang was the PERIC0 GPIO bus clock gate (found
2026-11-01, linux-omarchy-mobile#172); with the gate kept on and the link
left to cycle, a 30-minute session through the Location switch ran clean. Details, the configuration and the sweep in
[MODEM-PLAN](MODEM-PLAN.md) "G3, GNSS gets a fix" and G3-L1.

## 2026-10-30: the hands-on morning (fingerprint, card, USB-C host, GNSS)

Release `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`, device
Expand Down Expand Up @@ -173,8 +190,10 @@ list below:
- **Speakers:** the -10 dB ceiling recorded below, by hand with the AoC.
- **GNSS, 2026-10-30 evening:** a position fix on a bring-up kernel (the gn3
tree with the spi-s3c64xx swap-mode change and the flush-order fix of
linux-omarchy-mobile#137, the GNSS SPI's pins at function 2, drive 3, mode
0, 32-bit words, feedback delay 0, automatic chip select, 64-byte reads):
linux-omarchy-mobile#137, the GNSS SPI's pins at function 2, mode 0,
32-bit words, feedback delay 0, automatic chip select, 64-byte reads; that boot also
raised the pins' drive to 3, which the 10-31 check at drive 0 showed was
not needed, linux-omarchy-mobile#151 closed):
in a 3-minute session by a window, 23 of 25 GGA sentences with fix quality
1, up to 13 satellites used, HDOP 0.8, every CHPP read at bit 0 with a
valid CRC; started by hand through the modem bring-up, not by a package.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Pixel 9a (hand unit, 2026-10-30): the NMEA FIFO is the gnss-slsi profile state.
[Service]
ExecStartPre=
ExecStartPre=/bin/sh -c "for i in $(seq 1 900); do [ -p /var/lib/omamobile-vendor/gnss-slsi/data/vendor/gps/nmea_out ] && exit 0; sleep 0.2; done; exit 1"
ExecStart=
ExecStart=/usr/lib/omamobile-vendor/omamobile-gnss-nmea --fifo /var/lib/omamobile-vendor/gnss-slsi/data/vendor/gps/nmea_out --idle-exit 60
ReadWritePaths=-/var/lib/omamobile-vendor/gnss-slsi/data/vendor/gps -/run/omamobile-gnss
TimeoutStartSec=240
10 changes: 10 additions & 0 deletions device/tegu/bringup/location/omamobile-gnss.service.d-tegu.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Pixel 9a (hand unit, 2026-10-30): the GNSS stack is the modem profile plus gnss-slsi.
[Unit]
ConditionPathExists=
ConditionPathExists=/usr/lib/omamobile-vendor/gnss-slsi/root
[Service]
ExecStart=
ExecStart=/usr/bin/systemd-inhibit --what=sleep --mode=block "--who=Omarchy Mobile GNSS" "--why=A location session is running" /usr/local/sbin/tegu-gnss-start
ExecStop=
ExecStop=/usr/lib/omamobile-vendor/omamobile-vendor-chroot gnss-slsi stop
TimeoutStartSec=240
42 changes: 42 additions & 0 deletions device/tegu/bringup/location/tegu-gnss-start
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# tegu-gnss-start: the Pixel 9a's GNSS stack for omamobile-gnss.service, so
# that Omarchy's Location switch starts it (MODEM-PLAN G3).
#
# On the 7 Pro omamobile-gnss.service loads a GNSS chip driver and runs the
# gnss vendor profile. On the 9a the receiver is the modem's own GNSS core, so
# the stack is: the modem up with GNSS (gnssd listens on @GNSSND), then the
# gnss-slsi profile with its NMEA on the FIFO omamobile-gnss-nmea reads.
#
# Two bring-up limits, both in the plan: the modem starts once per boot (a
# second start needs a reboot), and the CP's PCIe link cycles about twice a
# second under GNSS traffic. With linux-omarchy-mobile#172 (the PERIC0 GPIO
# bus clock kept on) the cycling link is the working setting: 10- and
# 30-minute sessions ran clean with it (MODEM-PLAN G3-L1 found). Without
# #172 the SoC hangs 170 s to about 26 minutes after ONLINE, so don't run
# this on a kernel without it. HOLD sets cpif's keep_link_up:
# 0 (default, the one an attended session uses) lets the link cycle as the
# CP asks; 1 holds it with the wake line high (the CP crashes 103-108 s
# after ONLINE) and 2 holds it and answers the CP on ap2cp_wakeup (moves no
# data). 1 and 2 are diagnostics only.
#
# Install: /usr/local/sbin, with the two drop-ins beside this file.
set -euo pipefail
say() { printf "tegu-gnss: %s\n" "$*" >&2; }
grep -qs okay /sys/firmware/devicetree/base/soc/usi@111e00c0/spi@111e0000/status ||
{ say "SPI21 is not enabled in this device tree; nothing to do"; exit 0; }
if ! systemctl is-active -q omamobile-tegu-modem; then
if [[ -d /sys/module/cpif ]]; then
say "the modem ran this boot and is down; reboot before turning location on again"; exit 1
fi
/usr/local/bin/omamobile-tegu-modem-up --gnss
fi
# The CP's link: see HOLD in the header. 0 leaves it to cpif; 1 and 2 are
# diagnostics.
echo "${HOLD:-0}" > /sys/module/cpif/parameters/keep_link_up 2>/dev/null &&
say "CP link: keep_link_up=$(cat /sys/module/cpif/parameters/keep_link_up)"
for _ in $(seq 1 120); do grep -q "@GNSSND" /proc/net/unix && break; sleep 0.25; done
grep -q "@GNSSND" /proc/net/unix || { say "gnssd is not listening (the modem profile ran without GNSS?)"; exit 1; }
sleep 5 # let gnssd settle before the HAL opens the link
mkdir -p /run/omamobile-gnss && touch /run/omamobile-gnss/pinned
exec env OMAMOBILE_GNSS_NMEA_OUT=fifo /usr/lib/omamobile-vendor/omamobile-vendor-chroot gnss-slsi start
10 changes: 7 additions & 3 deletions device/tegu/bringup/omamobile-tegu-modem-up
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ if [[ -d /sys/module/cpif ]]; then
say "CPIF was loaded earlier this boot; reboot before starting the modem again"; exit 1
fi
[[ -e /sys/bus/platform/devices/154e0000.pinctrl ]] || { say "no FAR_ALIVE pinctrl (old DTB)"; exit 1; }
for f in tegu-modem-cpif-activate.ko tegu-pcie0-cp.ko shm_ipc.ko cpif.ko gnss_spi.ko gnssif.ko; do
for f in tegu-modem-cpif-activate.ko tegu-pcie0-cp.ko shm_ipc.ko cpif.ko cpif-keep-link.ko gnss_spi.ko gnssif.ko; do
[[ -f $M/$f ]] || { say "missing $M/$f"; exit 1; }
done
insmod $M/tegu-modem-cpif-activate.ko activate=1
insmod $M/tegu-pcie0-cp.ko allow_hw=1
insmod $M/shm_ipc.ko
insmod $M/cpif.ko
insmod $M/gnss_spi.ko
# cpif built with keep_link_up (bring-up, branch tegu-cpif-keep-link 3f76f123b):
# off at load, or the CP never reaches ONLINE; tegu-gnss-session turns it on
# after ONLINE (MODEM-PLAN G3)
insmod $M/cpif-keep-link.ko keep_link_up=0
# stock's GNSS SPI setup: mode 0, 32-bit words swapped in gnss_spi, 64-byte reads
insmod $M/gnss_spi.ko word32=2 piece=64 spi_mode=0
insmod $M/gnssif.ko
echo performance > /sys/module/pcie_aspm/parameters/policy 2>/dev/null || true
/usr/lib/omamobile-vendor/omamobile-vendor-chroot modem check
Expand Down
32 changes: 32 additions & 0 deletions device/tegu/bringup/tegu-gnss-session
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# Pixel 9a bring-up: one GNSS session (MODEM-PLAN G3). Checks the
# GNSS rails, starts the modem with GNSS (omamobile-tegu-modem-up --gnss),
# with HOLD=1 holds the CP link up once the CP is ONLINE (cpif keep_link_up=1,
# a diagnostic: the CP then crashes 103-108 s later; at load it would keep the
# CP from booting), starts the gnss-slsi HAL and its client for
# SECS seconds (default 180), then saves the HAL's NMEA, the SPI dump and the
# modem log under /var/log/omamobile/g7min.
# It starts the modem: once per boot. Reboot before running it again.
# tegu-gnss-session [SECS]
set -uo pipefail
SECS=${1:-180}
O=/var/log/omamobile/g7min; rm -rf "$O"; mkdir -p "$O"
say() { printf 'g7min: %s\n' "$*"; }
for n in gnss-core gnss-rf gnss-aux; do
r=$(grep -lx "$n" /sys/class/regulator/*/name 2>/dev/null | head -1)
[[ -n $r && $(cat "$(dirname "$r")/state") == enabled ]] || { say "STOP: $n"; exit 1; }
done
/usr/local/bin/omamobile-tegu-modem-up --gnss || { say "STOP: modem not ONLINE"; exit 1; }
[[ ${HOLD:-0} == 1 ]] && echo 1 > /sys/module/cpif/parameters/keep_link_up 2>/dev/null && say "link held up from here (keep_link_up=1; the CP crashes about 105 s after ONLINE)"
for _ in $(seq 1 120); do pgrep -x gnssd >/dev/null && break; sleep 0.25; done
pgrep -x gnssd >/dev/null || { say "STOP: no gnssd"; exit 1; }
dmesg -C
sleep 5
systemd-run -q --unit=x-gnss-slsi -p KillMode=control-group sh -c \
"OMAMOBILE_GNSS_NMEA_OUT=stdout /usr/lib/omamobile-vendor/omamobile-vendor-chroot gnss-slsi start > $O/gnss-slsi.log 2>&1"
sleep "$SECS"
systemctl stop x-gnss-slsi 2>/dev/null
dmesg | grep -a "gnss_spi: " > "$O/rx.txt"
tail -n 400 /var/log/omamobile/modem.log > "$O/modem.log"
say "done: $(wc -l < "$O/rx.txt") dump lines"
17 changes: 17 additions & 0 deletions device/tegu/overlays/gnss-spi-autocs.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
/plugin/;

/*
* Pixel 9a bring-up only; in no device's default DTB_OVERLAYS
* (MODEM-PLAN G3, resolved; the palmtop's run kit applies it): the GNSS SPI with
* the controller's automatic chip select, as Google's driver uses for
* this device (no samsung,spi-chip-select-mode). Upstream this becomes the
* SPI21 node's own compatible choice once the GNSS driver is in. Dropping the
* google,zumapro-spi compatible leaves google,gs101-spi, for which
* spi-s3c64xx in this tree lets the controller drive chip select itself.
* Applied to the palmtop's integration DTB (gn3).
*/
&spi21 {
compatible = "google,gs101-spi";
};
18 changes: 18 additions & 0 deletions device/tegu/overlays/gnss-spi-fb0.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
/plugin/;

/*
* Pixel 9a bring-up only; in no device's default DTB_OVERLAYS
* (MODEM-PLAN G3, resolved; the palmtop's run kit applies it): the GNSS SPI with
* stock's feedback delay 0 instead of the ported node's 2. Upstream this is
* the GNSS node's controller-data once the GNSS driver is in. Applied to
* the palmtop's integration DTB (gn3), which has the spi21 label.
*/
&spi21 {
gnss@0 {
controller-data {
samsung,spi-feedback-delay = <0>;
};
};
};
32 changes: 32 additions & 0 deletions device/tegu/overlays/gnss-spi-pins.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-2.0-only
/dts-v1/;
/plugin/;

/*
* Pixel 9a bring-up only; in no device's default DTB_OVERLAYS
* (MODEM-PLAN G3, resolved; the palmtop's run kit applies it): the GNSS SPI's
* pins. Replaced upstream by linux-omarchy-mobile#151, which describes the
* same pins in zumapro-tegu.dts. Our SPI21 node has no pinctrl, so the bus runs on the
* bootloader's pin state: gpp22-0..3 in function 2 at drive 0, gpp22-2
* pulled down. This gives them function 2 and drive 3 (as gpp21, the
* other SPI bus on PERIC1), keeping the pulls as found.
*/
&pinctrl_peric1 {
gnss_spi_pins: gnss-spi-pins {
samsung,pins = "gpp22-0", "gpp22-1", "gpp22-3";
samsung,pin-function = <2>;
samsung,pin-pud = <0>;
samsung,pin-drv = <3>;
};
gnss_spi_miso: gnss-spi-miso-pins {
samsung,pins = "gpp22-2";
samsung,pin-function = <2>;
samsung,pin-pud = <1>;
samsung,pin-drv = <3>;
};
};

&spi21 {
pinctrl-names = "default";
pinctrl-0 = <&gnss_spi_pins &gnss_spi_miso>;
};