Repository navigation
device/husky: a GNSS bring-up plan before the overlay - #739
Conversation
The runbook @derekross asked for on kernel derekross#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.
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.
|
Thank you, Lef. This is a thorough plan and it follows my notes on linux-omarchy-mobile#239 closely: the driver blacklisted before the DTB, a log stream first, one change per boot, slot B read at 3 before every boot, nothing that opens Two things don't hold on the kernel the plan will run on, and I'd like them fixed before I merge it:
Smaller things, none blocking:
With those two changes I'll merge the plan, and then the overlay can come. |
…om 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 <me@lefteros.com>
|
Thank you @derekross, you're right on both and it's in the new commit on the branch. You're right about Watchdog: stages 2 to 4 arm The small ones are done too: Not verified: how long the watchdog takes to reset this phone (the 26 s from the 8a isn't in our tree and I haven't measured it on husky), whether |
|
Thank you, Lef. Both points are in, and better than I asked. Stage 1 now checks On your question about stage 3's first read: keep it as you have it. That read goes through the same ACPM path as the reads you repeat under the watchdog a few seconds later, and the PMIC's own probe at boot is unguarded either way. The panics cover it, and you say so in the gate. One practical thing for the first session, not for this PR to wait on: I'm merging the plan. The overlay can come next. |
@derekross, the runbook you asked for on linux-omarchy-mobile#239 before the bring-up overlay, as device/husky/GNSS-PLAN.md. It is documentation only and nothing in it has run: I have no record that the chip has ever been powered.
What's in it: where the bus clocks (linux-omarchy-mobile#210), the rails (#211) and the receiver node (#239) stand, your three optional notes for the overlay and the first-boot rules in the order you wrote them (num-cs, usi3_hsi0 and pmic-2 next to spi21, swap-mode and dma-mode, load the driver before reading the chip, the usual first-boot rules), the gates for every boot, five stages with one change per boot (plain, bus, a late sec_acpm load, rails, receiver, each on top of the one before), what stops a stage, the revert, and what only the phone can settle.
The gates are strict on purpose: slot B's retry count read in the bootloader and refilled with set_active b alone, a boot only at 3; the phone not warmer than 50 C before a boot; the driver blacklisted until the last stage, and sec_acpm blacklisted from the third stage on and loaded by hand after 60 s of uptime; nothing that opens /dev/ttyBCM or writes nstandby, and a check on the first boot that no userspace like lhd is installed. The last stage repeats the late sec_acpm load and the rail reads before the one modprobe of the driver.
I wrote it against the kernel as it is on omamobile and your comments on #239. Two reviews caught problems in my first versions, which are fixed in the pushed commits: the controller is not called spi21 in sysfs, so the plan identifies it by address; the revert refills slot B before each boot; the late sec_acpm load is a stage of its own; and parts of my old runbook that I had dropped (the userspace check, the modprobe file staying in the shared rootfs) are back. Things I could not check from here are marked [I] or [U] in the file. The ROADMAP row for GNSS now says the three kernel changes are merged. tools/pr-check passes. The overlay itself comes after you've read this.