Skip to content

cpuidle: apple: add T8132 and enable it on J713 (s2idle groundwork) - #432

Merged
erykwieliczko merged 3 commits into
aurora-silicon:integration/aurorafrom
erikwb:j713/t8132-cpuidle
Nov 4, 2026
Merged

erykwieliczko merged 3 commits into
aurora-silicon:integration/aurorafrom
erikwb:j713/t8132-cpuidle

Conversation

@erikwb

@erikwb erikwb commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

This adds apple,t8132-cpuidle and enables it on the J713 (MacBook Air 13" M4), the same way T6040 (#371) and T8140 already do it.

What it changes, and what it doesn't

On T8132, as on T6040, iBoot locks CYC_OVRD, so the CPU PD state can't run. A plain WFI already lets the hardware power-gate an idle core. The kernel already saves the registers that WFI loses (Apple: preserving registers across WFI at boot). Both entries therefore go through WFI, and normal idle power doesn't change: the cores were already idling in that same WFI.

What it does add is the path for suspend-to-idle. Without a cpuidle driver, s2idle never reaches cpuidle_enter_s2idle(), so the tick is never frozen and timekeeping is never suspended. It's groundwork for J713 sleep. Index 1 is kept selectable, with no CPUIDLE_FLAG_OFF, for the reason in Jonathan's a391e53.

Commits

  1. dt-bindings: cpu: apple,t8140-cpuidle: Add t8132 compatible
  2. cpuidle: apple: Add T8132: apple,t8132-cpuidle takes the same WFI-only path as apple,t6041-cpuidle. It never touches CYC_OVRD, so it's safe whether or not iBoot locks it.
  3. arm64: dts: apple: t8132: Add the CPU idle node and enable it on J713: the node is disabled in t8132.dtsi, as on T6040 and T8140, and enabled in t8132-j713.dts.

Hardware tested on: J713 (8-core GPU), integration/aurora 420a1c8 plus these three commits, plus #429 and the #389 hash:

  • cpuidle binds: current_driver reads apple_idle with the menu governor.
  • Both states show up as WFI and both are used. After a few minutes of desktop use, cpu0 showed state0 about 2.2k entries and state1 about 67k entries, and cpu4 (P core) state1 about 13k.
  • GPU, display, Wi-Fi and input are unchanged.

Not tested: s2idle itself. J713 suspend is still refused, so the path this enables hasn't run yet.

Checks: checkpatch --strict is clean on all three commits.

The T8132 (M4) idles like the T6040 and T8140: iBoot locks CYC_OVRD,
and a plain WFI already lets the hardware power-gate an idle core. Add
"apple,t8132-cpuidle" to select the same driver behaviour.

Signed-off-by: Erik Bourget <erik@ebourget.net>
The T8132 (M4) behaves like the T6040: iBoot locks CYC_OVRD, so the
CPU PD state cannot run, and a plain WFI already powers an idle core
down (the arm64 idle code saves the registers it loses). Run both
entries through WFI when the device tree has an "apple,t8132-cpuidle"
node, as for "apple,t6041-cpuidle".

Without a cpuidle driver, suspend-to-idle never reaches
cpuidle_enter_s2idle(), so the tick is never frozen and timekeeping is
never suspended. Normal idle does not change: it is already WFI.

Signed-off-by: Erik Bourget <erik@ebourget.net>
Describe the T8132 CPU idle controller, disabled by default as on T6040
and T8140, and enable it on the MacBook Air J713.

Signed-off-by: Erik Bourget <erik@ebourget.net>

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the T8132 match, the WFI-only state replacement and the disabled-by-default SoC node with board enablement. Index 1 remains available for the generic s2idle selector, and the new path does not write CYC_OVRD. The binding and DT changes follow the existing T6040 shape. The attribution check found no additional Gravity-derived implementation.

The commits are checkpatch-clean. The combined tree passed the targeted bindings and J713/J616s DTB checks without diagnostics, apple-dcp 63/63 and Asahi KUnit 86/86. The first defconfig plus asahi.config WERROR build passed. The shipping and final fixup-tree builds are still running.

I have no J713 runtime or s2idle result of my own. This is not merge-ready while the universal build gates and the shared config dependency in #438 remain outstanding.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Final software gates now pass on the combined tree containing these heads and the proposed common config correction in #438. Both defconfig plus asahi.config and the Fedora-base recipe build Image, modules and DTBs with WERROR enabled. The Fedora recipe also covers KUNIT=m. Every requested asahi.config setting survives resolution. Asahi KUnit passes 86/86 and apple-dcp host tests pass 63/63. The targeted J713/J616s binding and DTB checks have no diagnostics.

The T8132 code, bindings and final source-style checks pass. The remaining hold is the common-config review dependency in #438; I am not adding a J713 hardware requirement beyond the agreed scope.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Final qualification for 3ef17de. The combined test source is 031f7dec92a1bef6b72509b08c5c597f50474adb, tree 36854d3a72e4efdf2c352166498ab436adaf3c48.

Both defconfig plus asahi.config and the Fedora-base shipping recipe pass the full Image/modules/DTB build with WERROR enabled. Every requested fragment value survives olddefconfig. Asahi KUnit passes 86/86, apple-dcp host tests pass 63/63, and targeted J713/J616s binding/DTB checks have no diagnostics. Strict source-style checks pass; commit sign-offs are checked separately. The attribution audit found no new material Gravity implementation blocks. Existing GPL-2.0-only Cody Ho and Niklas Sheth credit is preserved.

The T8132 WFI-only path preserves index 1 and avoids CYC_OVRD writes. Its M4-only runtime follows the agreed review/build-only scope. No code hold remains. Not merge-ready yet because #438 still needs the required common-config review.

@RyanTheTide

RyanTheTide commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

The T8132 match takes the WFI-only path, keeps state index 1 selectable for s2idle, and avoids CYC_OVRD writes. Its SoC node is disabled until the J713 board enables it. The reported J713 idle-state counts are useful evidence, and #449 now supplies the separate suspend result.

The stacked kernel at 5b6f5515e2f8 passed both full universal and Fedora-base WERROR builds (Image, modules and DTBs); both preserve all 131 common-config settings. ARM64 16 KiB KUnit passed 275/275. DCP host tests passed 63/63, and the PMGR and radio SID checks passed. The M4 host suite has the same five failing groups as the pinned base (18/23 on each); the AFKv2 HPD harness also fails on both. These are recorded failures, not a full host-suite pass. All six T8132 DTBs were checked: 13 schema diagnostics against 11 on the base, with exactly two new DCP dma-noncoherent binding errors from #429. The seven targeted binding checks passed. These software gates do not replace the required shared-code boots.

No new code issue found. The shared cpuidle probe still needs the Neo regression boot in this train, checking idle entry and suspend/resume. Merge with the reviewed #394 recipe before #449.

@erykwieliczko

Copy link
Copy Markdown
Member

Merging as it is, no changes. This comment is from Claude Opus 5.5, working for Eryk, not from Eryk himself.

It still merges cleanly, and cpuidle-apple.c and its binding are unchanged on integration/aurora.

Testing

  • On Eryk's J713, in a test kernel with the other J713 PRs: current_driver reads apple_idle, and both idle states are in use.
  • Built together with the rest of this batch on integration/aurora (arm64: Image, modules, DTB).

🤖 Written by Claude Opus 5.5 (in Claude Code) for Eryk.

@erykwieliczko
erykwieliczko merged commit 4dfed5d into aurora-silicon:integration/aurora Nov 4, 2026
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.

3 participants