Repository navigation
spi: s3c64xx, clk: zumapro: the Pixel 9a's GNSS SPI at stock's clock, without the 63+1 cut - #138
Conversation
|
Thanks for both fixes, and for re-posting them with your sign-off. The gate passes on the PR merged onto today's clk: samsung: zumapro. This one is ready. I checked it against Google's zuma CMU table: spi: s3c64xx. I think the change is right, but it reaches the Pixel 7 Pro, so it needs one change before merge. gs201's SPI nodes have no The easiest way is the one you used in Two small things for the record:
|
|
Thanks for the careful read of both. spi: s3c64xx. I took the flag route, as a third commit (b8ce74a) rather than a rewrite, since I can't force-push from here today; please squash it into the first at merge if you prefer one commit. clk: samsung: zumapro. Your pointer to The boot, for the record. Release The smoke report below is from today's boot of that kernel (the palmtop has rebooted a few times since the morning on the same Image). phone-smoke: teguKernel
Packages: hyprland 0.56.2-5.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamobile-apps 0.2.0-1, omamobile-audio 0.4.1-1, omamobile-device-tegu 0.2.0-1, omamobile-fingerprint 0.1.8-1, omamobile-firstboot 0.1.0-1, omamobile-gnss 0.2.1-1, omamobile-keyring 20261013-1, omamobile-mirror 0.1.1-1, omamobile-modem 0.1.4-1, omamobile-omarchy 0.1.12-1, omamobile-owl-widgets 0.1.1-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.36-1, omarchy 4.0.6-1 |
… 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, @W4HO-ham, for the flag. With |
A PIO transfer of fifo_depth bytes or more is cut into pieces of fifo_depth - 1 bytes, because the RX trigger level of the interrupt mode stops one short of the FIFO. On the Pixel 9a's GNSS link the slave hands out one 64-byte block per chip-select cycle, and the cut loses data at the piece boundary (the channel is reset between the pieces). On ports that ask for it with the new port-config flag poll_full_fifo, set only for zumapro, transfer a full FIFO in one piece, polled, as the vendor driver does; every other board keeps its transfers exactly as before, the cut having always worked there. For all ports, keep the pieces of longer transfers a whole number of words, so a 16- or 32-bit transfer's packet count does not round down and time out. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The Pixel 9a's GNSS SPI (SPI21 on HSI0 USI3) asks for 12.5 MHz, but the USI3 mux is read-only on the 399.36 MHz parent and its 4-bit divider stops at /16, so the IP clock is 24.96 MHz and the bus runs at 6.24 MHz, twice what stock uses. Google's clock table makes the 12 MHz setting from OSCCLK / 2 (cmucal-vclklut.c, div_clk_hsi0_usix_12mhz_lut_params). Let the rate request reach the mux (nMUX, so the clock framework may reparent) and pass it up through the divider and the source gate; the framework then picks OSCCLK and /2, 12.288 MHz, a 3.072 MHz bus. USI2 (the touchscreen) is unchanged. Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
b8ce74a to
9403888
Compare
… 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>
Two changes for the Pixel 9a's GNSS SPI (SPI21 on HSI0 USI3), each on its own.
spi: s3c64xx: Do not cut a PIO transfer that fills the FIFO. A 64-byte transfer on a 64-deep FIFO was cut into 63 + 1 with a channel reset between the pieces, because the interrupt mode's RX trigger level stops one short of the FIFO. On the GNSS link the slave moves one 64-byte block per chip-select cycle, and a 32 + 32 experiment with chip select held showed every frame that crossed a piece boundary failing its checksum, so the cut is what loses the data. A transfer of exactly the FIFO depth is now polled in one piece, as Google's driver does; pieces of longer transfers are kept a whole number of words, so a 32-bit transfer's packet count no longer rounds down and times out. The touchscreen (SPI20, the same driver) is unaffected: a day of use on the palmtop.
clk: samsung: zumapro: Let USI3 reach OSCCLK for the GNSS SPI. The bus asked for 12.5 MHz but got 24.96 MHz (a 6.24 MHz SPI clock, twice stock's): the mux was read-only on the 399.36 MHz parent and the 4-bit divider stops at /16. Google's clock table makes the 12 MHz setting from OSCCLK / 2. With
nMUX(reparenting allowed) andCLK_SET_RATE_PARENTon the divider and the source gate, the framework picks OSCCLK and /2:zumapro_gout_hsi0_usi3_ipreads 12.288 MHz after the first transfer, a 3.072 MHz bus. USI2 (the touchscreen) keeps its read-only mux.Both booted on the palmtop today from the gn3 integration source with gn3's reproducible build stamp; graphics, audio, touch and the rest come up as before. They do not make GNSS work yet: with the clock and the cut right, the reads still either sample half a bit off (mode 0) or lose the first byte of each back-to-back block (mode 1), which is a logic-analyzer question now (MODEM-PLAN G3 on omarchy-mobile #138). The changes stand on their own as fixes to what the driver and the clock table did wrong.
This replaces #135, whose two commits went up without my sign-off (CI caught it); the code is the same, cherry-picked with the sign-off. checkpatch's one CHECK is the
nMUXname, which is Samsung's own macro.