Skip to content

arm64: dts: allwinner: wirenboard85x: park CPU at a boot-safe OPP across suspend#362

Closed
evgeny-boger wants to merge 1 commit into
feature/v6.18from
feature/wb85-opp-suspend
Closed

arm64: dts: allwinner: wirenboard85x: park CPU at a boot-safe OPP across suspend#362
evgeny-boger wants to merge 1 commit into
feature/v6.18from
feature/wb85-opp-suspend

Conversation

@evgeny-boger

Copy link
Copy Markdown
Member

Kernel-side belt for the WB8.5 suspend-to-off resume voltage contract: SPL programs VDD-CPU to 0.90 V on the resume path while BL31 restores the kernel-parked PLL frequency (up to 1416 MHz). Parking at the bin-universal 0.90 V-rated 480 MHz OPP across suspend (opp-suspend) keeps the resume window safe even if firmware and kernel versions skew. The primary fix is firmware-side (wirenboard/arm-trusted-firmware#4, restores the recorded voltage before the recorded frequency) — this PR is standalone and safe with or without it. Verified: sun50i-h616-wirenboard851.dtb builds and carries the property (fdtget-checked).

Root-cause evidence: 10 corruption samples (fetch faults on valid code, single-bit pointer flips, CPU-bringup lockups, always <2 s post-resume, DRAM CRC clean every time), root-caused and eliminated on the bench 2026-07-10 (210+ clean cycles since).

🤖 Generated with Claude Code

…oss suspend

On suspend-to-off resume, U-Boot SPL's board init runs before the
resume branch and programs VDD-CPU to its 0.90 V cold-boot value
(CONFIG_AXP_DCDC2_VOLT=900); BL31 then re-locks PLL_CPUX to the
frequency the kernel parked at. Under schedutil the suspend-entry work
(fs sync, freezing) spikes the load, so the kernel routinely parks at a
1.00-1.10 V OPP (up to 1416 MHz) — leaving the cluster up to 200 mV
under-volted until cpufreq's resume rewrites the regulator ~2 s later.
The resulting fetch/load transients during secondary bringup were the
WB8 post-resume corruption family (fetch faults on valid code words,
single-bit pointer flips, bringup lockups — always within ~2 s of
resume, with retained-DRAM CRC clean on every failing cycle).

Mark the 480 MHz OPP as the suspend OPP: cpufreq_generic_suspend()
parks there before the PSCI call. 480 MHz is rated 0.90 V and present
on every speed bin (opp-supported-hw 0x1f), so the parked frequency is
safe at SPL's boot voltage even if the firmware-side fix is absent or
the boot voltage changes. Costs a few hundred ms of resume latency
until the governor revives. The primary fix is in BL31 (restores the
recorded voltage before the recorded frequency); this is the
kernel-side belt so firmware and kernel cannot skew apart.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@evgeny-boger

Copy link
Copy Markdown
Member Author

Superseded by #363 — the opp-suspend commit is now the final commit of the single consolidated kernel series (same content, checkpatch-clean, rebased onto the series base). Closing.

🤖 Generated with Claude Code

@evgeny-boger evgeny-boger deleted the feature/wb85-opp-suspend branch July 10, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant