Repository navigation
Conversation
|
Thank you for publishing all of this. It's exactly what I asked for on derekross/omarchy-mobile#138. Each try now has the code it ran, one commit per variant, and the plan links them by id. The imported gnssif_spi files keep Samsung's copyright and their GPL-2.0 headers, and the policy check finds no identifiers or blobs. I'll leave this as a draft and won't merge it. The red CI is the gate refusing commits without a sign-off and with "Bring-up, not for merge" subjects, which is what we'd expect on a reference branch. You're welcome to close it once #153 merges, since the commit ids live on in your fork's branch. If you keep it open, adding your Signed-off-by to commits you've posted publicly is a good habit, but it isn't needed for a branch that never merges. A few notes for whoever picks GNSS up again, none of them needed now:
|
|
Thanks for the read. Your two notes on the scripts were right, and the second had a cause: the palmtop's g7-short was never g7-min. It was the fifth try's 240 s strace session writing to /var/log/omamobile/g7/, which is the directory run-short.sh counts; I recovered the palmtop's copy and it's on the branch now, with run-short.sh naming itself in its usage line and the README saying which script is which (e343760). I'll close this once derekross/omarchy-mobile#153 merges, as you suggest; the ids stay on the fork's branch. If the overlays ever become a step they'll move to device/tegu/overlays, agreed. |
… and GNSS parked (#153) MODEM-PLAN's GNSS section from the night of 10-28 into 10-29. The "KEP M7 HARDFAULT" at every engine start is gnssd's soft watchdog resetting Kepler because the CHPP link over the GNSS SPI loses bytes. Two kernel causes were found, USI3 stuck on the 399.36 MHz parent and spi-s3c64xx cutting a full-FIFO transfer into 63 + 1 bytes; both are in derekross/linux-omarchy-mobile#138, in review. With them, mode 0 is marginal and mode 1 loses the first byte of each back-to-back block. Stock's SPI setup, read from its device tree and Google's driver, is automatic chip select, feedback delay 0 and the controller's byte swap, in PIO; no try has run that at stock's clock, so it is the first boot (G3-A) when GNSS resumes. GNSS is parked at the owner's decision. Every try links its commit on derekross/linux-omarchy-mobile#137. The CP link hang stays open. The morning's 24 ramoops consoles hold eight watchdog hangs, each ending between the cp2ap_wakeup edge and the link coming back, while the link cycles quickly. G3-L1 (attended, on the charger, capped, M0.1 before and after) first holds the link up with a bring-up cpif parameter, then traces CPIF's BAR accesses. The six protected partitions matched the 10-28 backup after the night's and morning's boots. NOTES records two resets at about 34 s after Bluetooth started, the 03:03 one read back from the journal. Test images reached slot B through bin/omamobile push only. Co-authored-by: W4HO-ham <87742609+W4HO-ham@users.noreply.github.com>
|
Thanks for keeping this current with the G3-A tries (derekross/omarchy-mobile#179 is merged now). Since derekross/omarchy-mobile#153 has merged too, close this whenever G3-A is done; until then it's a good record as it is. If the swap-mode change ever becomes a real fix, it would follow #138's pattern: a port flag set only for zumapro. |
|
G3-A2 ran tonight (2026-10-30) on the palmtop: the swap-mode change (11ea0ef) rebuilt into the gn3 tree's own kernel (release unchanged; the first build from the GNSS worktree lacked the S2MPG15 rails and couldn't power the receiver), gn3 plus the autocs, fb0 and swap-mode overlays, gnss_spi with What's new is in the raw frames. The chip's replies carry the CHPP header So the bytes are intact but sampled out of step with SCK, by an amount that changes from read to read. That points at the receive sampling (clock phase, or the feedback delay that stock sets to 0 and we now also set to 0) or at the chip clocking its MISO on the other edge, rather than at byte order, word size or chip select, which G3-A and G3-A2 have now each changed without effect. The next step on the trace is a CPHA/feedback-delay sweep at 32 bits. The palmtop is back on the kit's gn3 + osc2 images; GNSS stays parked. |
|
The Pixel 9a's GNSS gets a fix (2026-10-30 evening, on the palmtop, cable in, near a window): in a 3-minute session 23 of 25 GGA sentences carry fix quality 1, up to 13 satellites used, HDOP 0.8, with GPS, Galileo, BeiDou and GLONASS tracked at C/N0 up to about 41 dB-Hz. CHPP is clean: every received read at bit 0 with a valid CRC32, no ACK timeouts, no permanent failure, no Kepler fault. Two things fixed it, now on this branch at d6b10ef:
The rest is stock's configuration: mode 0, 32-bit words with the controller's swap (11ea0ef), feedback delay 0, automatic chip select ( |
|
Follow-up: the fix now runs on the palmtop's normal boot (the gn3 kernel with 11ea0ef and d6b10ef, the autocs, fb0, swap-mode and pin overlays in the kit's default list, gnss_spi |
|
Last piece of the SPI side: the What remains for GNSS on the published kernel is the driver side: gnssif/gnss_spi and CPIF aren't in the tree yet, and CPIF's link power-off needs a real fix where |
|
Correction to my two comments above: the 3- and 10-minute sessions were not clean. In every boot that set keep_link_up=1 after ONLINE (six tonight) the CP crashed 103-108 s after ONLINE (cp_active_handler: PHONE_ACTIVE 0, ONLINE -> CRASH_EXIT; nothing in the kernel log before it, CHPP healthy), and the fixes I counted were the minute before that; the fixed-of-total counting hid the short totals. So refusing the CP's power-down crashes the CP about 105 s later, and letting the link cycle hangs the SoC about 170 s after ONLINE (10-29, and once tonight). The SPI side (#150, #151) stands; the CP link under GNSS traffic is G3-L1's trace, which I'm on now. |
|
The CP link, three ways, tonight (same kernel plus the doorbell commit on
So the wake line isn't a formality: high means the AP wants the link, and the CP stops serving GNSS when it goes low, while leaving it high with the link held makes the CP declare a fault. The link has to cycle, and the fix has to make cycling safe. The doorbell commit moved the hang from 170 s to 26 minutes, so that access was one of the unguarded ones and not the last. Left in that window: the MSI set-up and The two SPI commits (#150, #151) are unaffected by any of this. |
…ed for the Pixel 9a Bring-up, not for merge. The gnssif_spi driver that runs the Pixel 9a's GNSS core (Kepler, on SPI 21 of USI3 in HSI0) as it ran on the palmtop at the start of the night of 2026-10-28/29, before any of MODEM-PLAN G3's link experiments: the base every later commit on this branch changes. It is the gnssif_spi directory of google-modules/soc/gs in Google's GPL zumapro kernel (drivers/soc/google/gnssif_spi, Samsung's GPL-2.0 files), ported to this tree: mainline spi-s3c64xx has no swap mode, so the port sends 8-bit words to put the bytes on the wire in memory order (stock sends 32-bit words with the vendor driver's byte and half-word swap), and the Kepler control device uses the GNSS firmware carve-out and the two GPIO lines of the device tree's gnssif node. gnss_spi binds the samsung,gnss-spi device under spi21; gnssif gives gnssd /dev/gnss_ipc, /dev/gnss_boot and the control ioctls (IOCTL_LOAD_GNSS_IMAGE copies kepler.bin into the carve-out in RAM; nothing touches a partition). This is the "as ported" setting of G3's tables (8-bit words, 64-byte reads, feedback delay 2, SPI mode 0): the control row of the ninth to fourteenth tries and the baseline of the fifteenth to twenty-third, and what the palmtop runs again now that GNSS is parked. The Kconfig symbol defaults to n. The published omamobile branch has no drivers/soc/google yet, so this adds the directory with only this driver in it.
Bring-up, not for merge. DEFAULT_SPI_RX_SIZE 64 to 32, so rx_work reads Kepler in 32-byte transfers, which stay under spi-s3c64xx's 64-byte FIFO and never get cut. MODEM-PLAN G3, ninth to fourteenth tries: the "rx chunk 32" rows (mode 0, delay 2: 17 bad checksums, Kepler opstate 0; then with the feedback-delay-0 DTB of this branch: 93). Smaller reads alone did not give a working link.
…ameters Bring-up, not for merge. gnss_spi takes spi_mode (0-3, written into spi->mode at probe) and speed_hz (spi->max_speed_hz), so one module tries the SPI modes and a slower clock without a DTB round. MODEM-PLAN G3, ninth to fourteenth tries: mode 1 with 32-byte reads (34 bad checksums, opstate 0), mode 1 with 64-byte reads (RX clean, but Kepler never sees our RESET-ACK: TX lost), mode 0 at "1 MHz" (63; the clock did not change, see the twenty-fourth try) and mode 3 (32). The 32-byte read size of the previous commit stays in gnss_spi.h; the 64-byte row put it back by hand.
…ftware Bring-up, not for merge. SPI_BITS_PER_WORD 32, as stock, with every word swapped (swab32) before a write and after a read, so the bytes go on the wire in memory order as the vendor driver's swap-mode does; CHPP frames are padded to a multiple of 4 and a size that is not is refused. The spi_mode and speed_hz parameters go. MODEM-PLAN G3, ninth to fourteenth tries, "32-bit words (swapped in gnss_spi)": 1 bad checksum, but every 64-byte RX transfer timed out (-110) under mainline spi-s3c64xx and Kepler stayed at opstate 0, with and without the auto-chip-select DTB of this branch. The cause was found later: spi-s3c64xx cut a 64-byte PIO transfer into 63 + 1 bytes, which 32-bit words cannot be split into (fixed in kernel PR derekross#135, the base of this branch).
…s of one message Bring-up, not for merge. Back to 8-bit words; gnss_spi_xfer() splits every transfer into 60-byte spi_transfers of one spi_message (chip select held between them), so every pause falls on a 32-bit boundary and spi-s3c64xx, which cut PIO transfers of 64 bytes or more into 63-byte pieces, never cuts. MODEM-PLAN G3, "What the link does (10-29, night)": with the cut gone the link garbled just the same (369 bad checksums, Kepler tracking, then its watchdog), so the split alone was not the cause.
…32-byte reads Bring-up, not for merge. 32-bit swapped words again, every transfer cut into 32-byte spi_transfers of one message (each fits the polling path, as stock's 64-byte reads do in Google's driver), and DEFAULT_SPI_RX_SIZE 32. MODEM-PLAN G3, fifteenth to twenty-third tries: the "w32rx32" row (7 bad checksums, no watchdog, the link stops after RESET-ACK) and, with 64-byte reads, the "w32p32" row (19). The raw bytes later showed why the counts are low: with 32-bit words the CHPP frames arrive at any bit offset, so few frames are recognised at all.
…peed_hz parameters Bring-up, not for merge. 64-byte reads again, and four module parameters: fb_delay overrides the controller's feedback delay (s3c64xx_spi_csinfo fb_delay, FB_CLK_SEL) after spi_setup; cs_setup_us sets spi->cs_setup; speed_hz the rate asked for; and osc=1 writes bit 0 of CMU_HSI0's USI3 mux (0x11001020) at probe, behind the clock framework's back, moving the mux from its 399.36 MHz parent to OSCCLK; the divider (0x11001820) is read and logged after the first transfer. MODEM-PLAN G3, fifteenth to twenty-third tries: "fb3" (delay 3: 5 bad checksums), "cs200" (delay 3, 200 us setup: 0), "osc" (OSCCLK, about 1.5 MHz: 0) and "acs" (the auto-chip-select DTB: 0), all 32-bit, all stopping after RESET-ACK. The divider read showed the real clock: the mux sat on 399.36 MHz and the 4-bit divider stops at /16, so the SPI ran at 6.24 MHz, twice stock's, whatever the driver asked for. Writing CMU registers from a module is a bring-up shortcut, replaced by the clk-zumapro change of kernel PR derekross#135.
…ters Bring-up, not for merge. SPI_BITS_PER_WORD back to 8 with the swap and the multiple-of-4 check skipped for 8-bit words, and one transfer per message (piece size 64 KiB). MODEM-PLAN G3, fifteenth to twenty-third tries, "osc8": 8-bit, OSCCLK (about 1.5 MHz), feedback delay 0: 1 bad checksum, the link still stopping after RESET-ACK.
…pi_sync per 32-byte piece Bring-up, not for merge. hs=1 keeps the controller runtime-resumed, maps SPI 21's registers (0x111e0000) and sets CH_CFG bit 6 (HIGH_SPEED_EN, which spi-s3c64xx sets only at 30 MHz and up and clears in every FIFO flush) before every transfer; each 32-byte piece is its own spi_sync so the bit is set again after the flush. MODEM-PLAN G3, fifteenth to twenty-third tries, "hs": 17 bad checksums, stopping after RESET-ACK.
…ransfer
Bring-up, not for merge. The same HIGH_SPEED_EN parameter with one
transfer per message and DEFAULT_SPI_RX_SIZE 60, so spi-s3c64xx never
splits a read. MODEM-PLAN G3, fifteenth to twenty-third tries, "hs60":
408 bad checksums, Kepler tracking satellites, then its watchdog (38
hard faults). The reset at 348 s that followed came from the modem's
PCIe link ("PHY isolated"), not from the SPI path.
…k's 12 MHz, osc=1 div=1) Bring-up, not for merge. The hs parameter goes; div >= 0 maps CMU_HSI0's USI3 divider and holds it at that value, written at probe and again around every transfer (the clock driver sets it back to /16 whenever spi-s3c64xx asks for a rate), waiting for the divider's busy bit. With osc=1 div=1 this is Google's zuma CMU table for USI3's 12 MHz (cmucal-vclk.c, div_clk_hsi0_usix_12mhz_lut_params: OSCCLK / 2, 12.288 MHz, a 3.07 MHz SPI clock). 64-byte reads again. MODEM-PLAN G3, "Stock's clock, tried (twenty-fourth try)": 8-bit, delay 0, 1 bad checksum, and Kepler's frames arriving shifted by the same 4, then 5, then 6 bits across many reads, so its bit counter runs on across chip-select cycles and gains or loses clocks on OSCCLK. This is the "module that set USI3's mux and divider behind the clock framework"; kernel PR derekross#135 lets the framework do it instead.
…rites in mode 0 Bring-up, not for merge. rx_cpha=1 switches spi->mode per transfer under the driver's mutex: read-only transfers get SPI_CPHA (mode 1), transfers with a tx buffer run in mode 0. spi-s3c64xx takes the mode from spi->mode each time it reconfigures, and it reconfigures on every transfer here because its cur_speed (the 6.24 MHz it gets) never equals the rate asked. MODEM-PLAN G3, twenty-fifth to twenty-seventh tries: every frame at bit offset 0 for the first time on the as-ported clock, short frames pass, the engine reports satellites, the watchdog fires later (260 bad checksums; 101 with cs_setup_us=50 in the twenty-seventh try, through 14 Kepler watchdog resets without a reset of the palmtop); long frames (279 bytes) lose one or two bytes at each 64-byte read boundary. The twenty-sixth try ran this module with 60-byte reads (DEFAULT_SPI_RX_SIZE 60 as in the hs60 commit), with no change.
…a Kepler message Bring-up, not for merge. hold=1 sets cs_change on the last transfer of every read, so chip select stays asserted between rx_work's consecutive reads of one Kepler message; gnss_spi_release() (an empty transfer the core ends with chip select off) releases it when gnss2ap drops at the end of rx_work's loop and before every write. MODEM-PLAN G3, twenty-eighth try: with mode 1 reads it made things worse (292 bad checksums, 279-byte frames ending in zeros, footer 0): Kepler wants chip select released between its 64-byte reads, as stock does.
… one bit Bring-up, not for merge. The hold parameter and the link device's release call go. realign=1 shifts every received buffer left by one bit before the swap, because at feedback delay 3 (mode 0, 8 bits, the as-ported clock) Kepler's frames arrived intact but one bit late: offline, shifting the saved reads left one bit turned 11 valid CHPP frames into 123 (CRC32 over the 8-byte header and payload), where at delay 2 the same shift recovered nothing. MODEM-PLAN G3, twenty-ninth and thirtieth tries: Kepler is on time just after it starts and one bit late later, so the fixed shift lost its first RESET-ACKs for 2 s and set off a reset storm (125 RESETs from Kepler, 144 RESET-ACKs from gnssd).
…bit later Bring-up, not for merge. txshift=1 shifts each write right by one bit into a buffer one byte longer (the last bit lands in the extra byte) and drops the extra received byte, in case Kepler sampled our writes a slot late as it sent its own data a slot late. MODEM-PLAN G3, thirty-first try: it killed the link outright (0 RESET-ACKs, nothing received), so our writes were right as they were.
…read from the CHPP preamble Bring-up, not for merge. txshift goes. realign=2 looks for the CHPP preamble (68 43) in each read: found at bit 0, the read is kept; at bit 1, the read is shifted left one bit; a read without a preamble keeps the last choice, and each change is logged. MODEM-PLAN G3, thirty-second try: clean short frames and the engine reporting satellites, but the 279- and 361-byte frames still failed (290 bad checksums, 34 hard faults over the session); offline, setting the one dropped bit at each 64-byte boundary every possible way (tools/tegu-gnss/offline/brute.py) repaired none of them, so more than a bit goes missing at each chip-select release.
…fset 0-7, txk delays writes by it Bring-up, not for merge. realign=3 finds the preamble at any of the 8 bit offsets, shifts the read by the offset found and keeps it for reads without one, logging each change; txk=1 then sends writes that many bits later, so they land on Kepler's byte boundaries. MODEM-PLAN G3, thirty-third and thirty-fourth tries, at stock's clock through the osc/div parameters: at OSCCLK / 2 (osc=1 div=1, 3.07 MHz) the offset walked by one or two bits about every 100 ms (0, 2, 3, 5, 6, 7, 0, 1, 3 in the first second), and with the writes delayed to match, 20 frames came through clean but Kepler only answered RESETs; at OSCCLK / 1 (div=0, 6.14 MHz) the offset changed twice in 100 s. So the drift grows as the clock slows. The 05:02 reset in that session was the CP link (CLUSTER0_NONCPU_WDTRESET), not the SPI.
…l 9a's pdma1 PrimeCell IDs Bring-up, not for merge. Stock drives the GNSS SPI with DMA through pdma1, a PL330 at 0x10130000 (GIC SPI 806) that our device tree does not have. Before giving it a node, this module reads its four PrimeCell ID registers once from Linux, one register per read, and returns -EAGAIN so nothing stays loaded. MODEM-PLAN G3, "DMA" (2026-10-29): periph 0x30 0x13, cell 0x0d 0xf0, read without an abort, so a DT node can probe it (logs/tegu-gnss-autocs-20261029/pdma-probe-kmsg.txt). It ran as tegu-pdma-probe.ko on the gn3 kernel; the Kconfig entry defaults to n.
…t runtime and run a memcpy
Bring-up, not for merge. The "runtime test module" of MODEM-PLAN G3's DMA
step (2026-10-29, night): it maps GIC SPI 806 through the GIC's fwnode,
registers a fixed 200 MHz clock as pdma1's apb_pclk, allocates an AMBA
device "10130000.pdma" for stock's pdma1 (PL330 at 0x10130000) and adds
it, so the built-in pl330 driver probes it, then asks for a DMA_MEMCPY
channel of that device and copies 256 bytes through it. On the palmtop
the pl330 driver probed it ("DMAC-341330, 8 channels, 32 peripherals")
and the copy matched (logs/tegu-gnss-dma-20261029/pdma-rt-kmsg.txt),
which is why a DT node for pdma1 followed. With that node and dmas on
the GNSS SPI, RX DMA moved nothing (residue 64): the SPI's requests do
not reach pdma1, so some routing stock sets up is still missing. It ran
as tegu-pdma-rt.ko on the gn3 kernel; the Kconfig entry defaults to n.
…e GNSS SPI test overlays Bring-up, not for merge. The device-tree changes behind MODEM-PLAN G3's tries on the Pixel 9a, as overlays on the palmtop's integration DTB (gn3; the published omamobile branch has no zumapro-tegu.dts yet, so there is no board file here to change): - zumapro-tegu-gnss-spi-fb0.dtso: stock's feedback delay 0 on the GNSS SPI device (ninth to fourteenth tries, the "feedback delay 0" rows); - zumapro-tegu-gnss-spi-autocs.dtso: automatic chip select, by leaving spi21 with the google,gs101-spi compatible only (the "auto CS" rows of the ninth to fourteenth tries and "acs" of the fifteenth to twenty-third: no change with 8-bit words); - zumapro-tegu-pdma1.dtso: stock's pdma1 (PL330 at 0x10130000, GIC SPI 806, a fixed 200 MHz APB clock) and dmas on spi21 in stock's order (0x14 tx, 0x15 rx): the pl330 driver probed it at boot, but RX DMA moved nothing (residue 64); - zumapro-tegu-pdma1-swapped.dtso: the second boot, channels the other way round, the same result; the boot after it reset at 69 s, cause not seen. Each test DTB was the gn3 DTB with the change compiled in (the dts in logs/tegu-gnss-dma-20261029 is gn3's source with the pdma1 node), copied into the build kit, packed into slot B's images by the kit's "omamobile images" twice (the two packs had to match) and written with "omamobile push"; the palmtop is back on the gn3 DTB without any of them. The overlays are not wired into the Makefile: the board DTB they apply to is not in this tree.
…AN G3's tries Bring-up, not for merge. The on-palmtop scripts (g7-strace.sh from the fifth try on, g7-min for the morning's short sessions), the laptop's run-case.sh and run-short.sh that ran one case per fresh boot with the gnss_spi module parameters in GNSS_SPI_ARGS, and the offline Python checks of the saved reads (CHPP CRC32, bit offsets, shifts, the boundary brute force), as they were in /tmp/w32p32 on the laptop and logs/tegu-modem-20261027/phone in the omarchy-mobile tree, with one change: the three scripts that imported from /tmp/w32p32 now import from their own directory. The README says what each does. No captured GNSS data is included.
… run-short.sh's usage line g7-short on the palmtop was the fifth try's 240 s strace session writing to /var/log/omamobile/g7/, not g7-min; run-short.sh counts that directory, so it now ships the real script and names itself in its usage line.
… 32-bit words Stock drives the Pixel 9a's GNSS SPI with 32-bit words and the controller's own byte and half-word swap (SWAP_CFG, programmed by Google's spi-s3c64xx.c when the node has swap-mode), so the bytes land in memory in wire order. Mainline has no swap support and the night's 32-bit tries swapped in software. This adds the property and programs SWAP_CFG by word size as Google does, for G3-A's second step (32-bit words at stock's clock with the controller's swap). Compiles W=1 clean against the palmtop's tree; not booted.
…o software swap Stock drives the Pixel 9a's GNSS SPI with 32-bit words and the controller's own byte and half-word swap (SWAP_CFG), so the bytes reach the wire in memory order. Our 8-bit path, and the 32-bit tries that swapped each word in software, have never matched stock's framing. With word32=1 the transfers use 32-bit words and leave the swapping to a controller running with Google's swap-mode (the spi-s3c64xx change on this branch). Default off: nothing changes for the 8-bit path.
For the G3-A3 clock-phase sweep: in G3-A2 the chip's replies arrived intact but shifted right by 2, 4 and 6 bits on successive reads, sampled out of step with SCK. spi_mode 0..3 sets the mode for every transfer before spi_setup in probe and logs the result; -1 keeps the device tree's.
s3c64xx_flush_fifo() cleared PACKET_CNT (and with it PACKET_CNT_EN) while RXCH_ON was still set. For that register write the controller clocks freely, and with automatic chip select the slave stays selected, so it shifts out bits that the flush then discards. A slave that streams across chip-select cycles, like the Pixel 9a's GNSS core over CHPP, loses a couple of bits per transfer: on the 9a every read arrived 0, 2, 4 or 6 bits off. Google's driver turns the channels off first; do the same. With this, the 9a's GNSS SPI in stock's configuration (mode 0, 32-bit words, swap mode, feedback delay 0, automatic chip select) reads every frame at bit 0 with a valid CRC, and the receiver gets a fix. Also adds the bring-up overlay that gives the GNSS SPI's pins (gpp22-0..3) function 2 and drive 3: without a pinctrl the bus ran on the bootloader's drive 0.
734f5f8 to
77c05f4
Compare
|
Rebased onto today's omamobile; the commits you've landed since are dropped, so what remains is the bring-up test code and the two SPI commits (the flush order here is the same one as #150). Still a draft, not for merge. |
|
Next step on the hang is staged rather than guessed. I audited every register path in the cycling window from the source, and none is unguarded: DBI goes through the guarded accessors ( So the hang is most likely not a stray read but something that accumulates across the cycles: about 3000 of them in the 26 minutes that session lasted, each with a PMU write through the secure monitor, a On the branch now: a bring-up commit that numbers every cycle and logs each step of |
|
Found why the link cycles twice a second in the first place, which I think changes the order of work here.
So on stock an idle modem link parks in L1.2 and stays up. On ours the modem's only way to save power when it goes idle is to ask the AP to power the link off, which is the isolate and un-isolate pair we see about twice a second under GNSS traffic. That is not a symptom of the hang; it is what makes the hang reachable in minutes, since every cycle is another chance at whatever breaks and the console shows the hang falling inside one. So the next change after the trace is to implement |
|
Wrote it after all, as a draft on It has never been booted: the palmtop was unreachable when I wrote it, so nothing here is tested, and I would want it booted before anyone trusts it. The module is built and staged next to the trace runner, so the first run after the palmtop comes back can answer the one question that matters, whether the isolate and un-isolate pairs drop from thousands in a session to a handful. If they do, a GNSS session stops meeting the hang, and the |
|
G3-L1 is answered, and it was the L1 substates: with them the link stops being torn down and the session holds.
So the hang was never reached, because the link stopped being torn down thousands of times, which is what stock does and what the modem asks for after every link up. One correction to the commit I pushed last night: the modem driver's last call in Three mistakes of mine before I got a module that even bound, in case they save you time on a port: the module for this palmtop must carry Still a bring-up parameter rather than a finished design: the proper shape is the id mask Google keeps, so a disable during boot cannot be undone by the enable that follows it. |
|
Two more runs this morning sharpen that result, and one of them walks part of it back. L1.2 ( L1.1 only ( So: the avoidance needs L1.2, and L1.2 has a problem of its own. The commit now carries Best session so far, for the record: 157 of 165 GGA sentences fixed over five and a half minutes, CP ONLINE throughout, 7 link power-downs in that time instead of several hundred. |
|
Third run, and it corrects a guess of mine. I raised
On the pin side I checked what I suspected and it is fine: the overlay gives So the open item is narrower than this morning: not the configuration, but the unexpected LINK_DOWN while parked in L1.2, and surviving it rather than dying with it. Next for me: read the LTSSM and the endpoint's L1SS status at the moment it latches, and let the controller's existing recovery handle it instead of the power-off path running into a dead link. The trace earns its keep, by the way: it is what turned "the console stops" into "the console stops in cycle 486, at the isolate step". |
|
I have to walk back the three-row table above: those runs were measuring nothing, and the instrumentation is what caught it. With the link-down capture in place, every drop printed
So Read live during a session, with the link up:
The LTR threshold and TCommon fields are already populated; only the four enable bits are clear. The implementation now reads both offsets from the hardware and logs CTL1 back after writing, so the next run reports whether the substates are actually on instead of me assuming it. Running that now. Worth saying plainly: an earlier reading of mine that suggested the endpoint had no L1SS capability at all was also wrong, taken while the link was down, where the whole config space reads 0xffff. |
|
Closing the loop on the substates with what the hardware actually says, read live with the link up:
So both ends are willing, the timing fields are already populated by whoever set them, and only the four enable bits are clear. From userspace with The branch now has the implementation that reads the capability offset from each end (a8a6514) instead of Google's 0x19c, keeps TCommon when setting the enables, and reads CTL1 back into the trace. It has not yet been observed to take effect in the driver, so the next step is a print at the entry of For the record, the palmtop is back on the module without any of this (f06066614cad75fb), and the GNSS result that stands is the one from #150 and #151: a fix, served through the Location switch, for about a minute to five per session depending on how the link behaves. |
|
Thank you, @W4HO-ham, for keeping this record so complete. A fix on the 9a's GNSS, with the flush-order fix split out and merged as #150, is a great result, and the per-try commits made every step of it traceable. G3-A is done, so as we agreed on the 30th, this can be closed. Please do one thing first. The rebase on the 31st ( git tag tegu-gnss-g3-record 734f5f8c89202fe0326a38c2aee57c77b64cc63a
git push <your fork> tegu-gnss-g3-recordUpdating the plan's links to the new ids would also work, but the tag is less work and keeps the plan as written. Once it's pushed, please close this. The PR's description, which still lists the old ids and the #135 base, then doesn't matter. The L1-substate work from the 31st isn't GNSS SPI code, so please carry it on |
…fers
Google's gnss_spi sends 32-bit words in one transfer per call, and
relies on Google's SPI controller driver for two things this kernel's
spi-s3c64xx does not do:
- The board's SPI 21 node has swap-mode = <1>, for which Google's
driver programs the controller's SWAP_CFG to swap the bytes and
half-words of each word on TX and RX, so the bytes go on the wire in
memory order. spi-s3c64xx shifts a 32-bit word out most significant
byte first, which on a little-endian CPU reverses every group of
four bytes. Swap each word in gnss_spi instead, on the way out and on
the way in, and give the caller its TX buffer back unswapped. Every
transfer is a whole number of words (gnssif rounds writes up to 4
bytes and reads 64), so an odd size is refused.
- The core's data comes in 64-byte blocks, and reads are one block per
transfer. spi-s3c64xx moves a transfer that fills the 64-byte FIFO in
one piece on zumapro, but cuts a longer one into 60-byte pieces. Send
writes as one message of transfers of 64 bytes at most, as the reads
are.
On the Pixel 9a (MODEM-PLAN G3, 2026-10-30, the bring-up driver of
linux-omarchy-mobile#137 with these two settings, SPI mode 0, stock's
feedback delay 0 and the controller driving chip select) the receiver
got its position fix: in a session by a window 54 of 56 GGA sentences
had a fix, with 10 satellites, HDOP 1.2, and no CHPP checksum error,
ACK timeout or permanent failure. That boot had no swap mode in the
controller, which a bring-up patch also tried with the same result, so
neither the device tree nor spi-s3c64xx needs one. The palmtop has run
this setting since.
8-bit words would put the bytes in memory order too, but they have not
been tried since the SPI flush fix ("spi: s3c64xx: turn the channels off
before clearing the packet count") that ended the link's bit slips, so
this keeps stock's word size. The bring-up's module parameters for the
word size, the transfer size and the SPI mode are not carried over:
these are fixed, and the mode and clock come from the device tree.
Link: derekross#137
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
…fers
Google's gnss_spi sends 32-bit words in one transfer per call, and
relies on Google's SPI controller driver for two things this kernel's
spi-s3c64xx does not do:
- The board's SPI 21 node has swap-mode = <1>, for which Google's
driver programs the controller's SWAP_CFG to swap the bytes and
half-words of each word on TX and RX, so the bytes go on the wire in
memory order. spi-s3c64xx shifts a 32-bit word out most significant
byte first, which on a little-endian CPU reverses every group of
four bytes. Swap each word in gnss_spi instead, on the way out and on
the way in, and give the caller its TX buffer back unswapped. Every
transfer is a whole number of words (gnssif rounds writes up to 4
bytes and reads 64), so an odd size is refused.
- The core's data comes in 64-byte blocks, and reads are one block per
transfer. spi-s3c64xx moves a transfer that fills the 64-byte FIFO in
one piece on zumapro, but cuts a longer one into 60-byte pieces. Send
writes as one message of transfers of 64 bytes at most, as the reads
are.
On the Pixel 9a (MODEM-PLAN G3, 2026-10-30, the bring-up driver of
linux-omarchy-mobile#137 with these two settings, SPI mode 0, stock's
feedback delay 0 and the controller driving chip select) the receiver
got its position fix: in a session by a window 54 of 56 GGA sentences
had a fix, with 10 satellites, HDOP 1.2, and no CHPP checksum error,
ACK timeout or permanent failure. That boot had no swap mode in the
controller, which a bring-up patch also tried with the same result, so
neither the device tree nor spi-s3c64xx needs one. The palmtop has run
this setting since.
8-bit words would put the bytes in memory order too, but they have not
been tried since the SPI flush fix ("spi: s3c64xx: turn the channels off
before clearing the packet count") that ended the link's bit slips, so
this keeps stock's word size. The bring-up's module parameters for the
word size, the transfer size and the SPI mode are not carried over:
these are fixed, and the mode and clock come from the device tree.
Link: derekross#137
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
…fers
Google's gnss_spi sends 32-bit words in one transfer per call, and
relies on Google's SPI controller driver for two things this kernel's
spi-s3c64xx does not do:
- The board's SPI 21 node has swap-mode = <1>, for which Google's
driver programs the controller's SWAP_CFG to swap the bytes and
half-words of each word on TX and RX, so the bytes go on the wire in
memory order. spi-s3c64xx shifts a 32-bit word out most significant
byte first, which on a little-endian CPU reverses every group of
four bytes. Swap each word in gnss_spi instead, on the way out and on
the way in, and give the caller its TX buffer back unswapped. Every
transfer is a whole number of words (gnssif rounds writes up to 4
bytes and reads 64), so an odd size is refused.
- The core's data comes in 64-byte blocks, and reads are one block per
transfer. spi-s3c64xx moves a transfer that fills the 64-byte FIFO in
one piece on zumapro, but cuts a longer one into 60-byte pieces. Send
writes as one message of transfers of 64 bytes at most, as the reads
are.
On the Pixel 9a (MODEM-PLAN G3, 2026-10-30, the bring-up driver of
linux-omarchy-mobile#137 with these two settings, SPI mode 0, stock's
feedback delay 0 and the controller driving chip select) the receiver
got its position fix: in a session by a window 54 of 56 GGA sentences
had a fix, with 10 satellites, HDOP 1.2, and no CHPP checksum error,
ACK timeout or permanent failure. That boot had no swap mode in the
controller, which a bring-up patch also tried with the same result, so
neither the device tree nor spi-s3c64xx needs one. The palmtop has run
this setting since.
8-bit words would put the bytes in memory order too, but they have not
been tried since the SPI flush fix ("spi: s3c64xx: turn the channels off
before clearing the packet count") that ended the link's bit slips, so
this keeps stock's word size. The bring-up's module parameters for the
word size, the transfer size and the SPI mode are not carried over:
these are fixed, and the mode and clock come from the device tree.
Link: derekross#137
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
…fers
Google's gnss_spi sends 32-bit words in one transfer per call, and
relies on Google's SPI controller driver for two things this kernel's
spi-s3c64xx does not do:
- The board's SPI 21 node has swap-mode = <1>, for which Google's
driver programs the controller's SWAP_CFG to swap the bytes and
half-words of each word on TX and RX, so the bytes go on the wire in
memory order. spi-s3c64xx shifts a 32-bit word out most significant
byte first, which on a little-endian CPU reverses every group of
four bytes. Swap each word in gnss_spi instead, on the way out and on
the way in, and give the caller its TX buffer back unswapped. Every
transfer is a whole number of words (gnssif rounds writes up to 4
bytes and reads 64), so an odd size is refused.
- The core's data comes in 64-byte blocks, and reads are one block per
transfer. spi-s3c64xx moves a transfer that fills the 64-byte FIFO in
one piece on zumapro, but cuts a longer one into 60-byte pieces. Send
writes as one message of transfers of 64 bytes at most, as the reads
are.
On the Pixel 9a (MODEM-PLAN G3, 2026-10-30, the bring-up driver of
linux-omarchy-mobile#137 with these two settings, SPI mode 0, stock's
feedback delay 0 and the controller driving chip select) the receiver
got its position fix: in a session by a window 54 of 56 GGA sentences
had a fix, with 10 satellites, HDOP 1.2, and no CHPP checksum error,
ACK timeout or permanent failure. That boot had no swap mode in the
controller, which a bring-up patch also tried with the same result, so
neither the device tree nor spi-s3c64xx needs one. The palmtop has run
this setting since.
8-bit words would put the bytes in memory order too, but they have not
been tried since the SPI flush fix ("spi: s3c64xx: turn the channels off
before clearing the packet count") that ended the link's bit slips, so
this keeps stock's word size. The bring-up's module parameters for the
word size, the transfer size and the SPI mode are not carried over:
these are fixed, and the mode and clock come from the device tree.
Link: #137
Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
… and GNSS parked (derekross#153) MODEM-PLAN's GNSS section from the night of 10-28 into 10-29. The "KEP M7 HARDFAULT" at every engine start is gnssd's soft watchdog resetting Kepler because the CHPP link over the GNSS SPI loses bytes. Two kernel causes were found, USI3 stuck on the 399.36 MHz parent and spi-s3c64xx cutting a full-FIFO transfer into 63 + 1 bytes; both are in derekross/linux-omarchy-mobile#138, in review. With them, mode 0 is marginal and mode 1 loses the first byte of each back-to-back block. Stock's SPI setup, read from its device tree and Google's driver, is automatic chip select, feedback delay 0 and the controller's byte swap, in PIO; no try has run that at stock's clock, so it is the first boot (G3-A) when GNSS resumes. GNSS is parked at the owner's decision. Every try links its commit on derekross/linux-omarchy-mobile#137. The CP link hang stays open. The morning's 24 ramoops consoles hold eight watchdog hangs, each ending between the cp2ap_wakeup edge and the link coming back, while the link cycles quickly. G3-L1 (attended, on the charger, capped, M0.1 before and after) first holds the link up with a bring-up cpif parameter, then traces CPIF's BAR accesses. The six protected partitions matched the 10-28 backup after the night's and morning's boots. NOTES records two resets at about 34 s after Bluetooth started, the 03:03 one read back from the journal. Test images reached slot B through bin/omamobile push only. Co-authored-by: W4HO-ham <87742609+W4HO-ham@users.noreply.github.com>
Not for merge. This branch exists so the omarchy-mobile plan can link each of MODEM-PLAN G3's tries (derekross/omarchy-mobile#138, point 4 of the review) to the code it ran, by commit. Nobody else could read the module directories on my build machine or the scripts in my logs, so here they are, as they ran on the palmtop on the night of 2026-10-28/29 and the morning after.
GNSS is parked (the owner's decision, 10-29): no logic analyzer and no more module-level guessing. The palmtop runs the as-ported driver of the first commit on the kernel of #135. Nothing here is meant to merge; the two real fixes that came out of the night, spi-s3c64xx not cutting a transfer that fills the FIFO and clk-zumapro letting USI3 reach OSCCLK, are #135, and this branch is based on that branch's head so they are in it.
What is in it, one commit per step, each a diff on the one before, in the order of the plan's tries:
The gnssif_spi driver is the gnssif_spi directory of google-modules/soc/gs in Google's GPL zumapro kernel, ported to this tree, under drivers/soc/google (new on this branch; the symbol defaults to n). The two pdma1 test modules sit next to tegu-mif-sleep in drivers/soc/samsung, as #127's modules did. The device-tree pieces are overlays on the palmtop's integration DTB, since there is no zumapro-tegu.dts on this branch to change; each test DTB went onto slot B through the kit's
omamobile images(packed twice, the packs compared) andomamobile push. The scripts and the offline CRC checks are under tools/tegu-gnss with a README.No binaries, no firmware, no RAM dump and no captured GNSS data; I checked the diff for identifiers and sign-offs before pushing.