Skip to content

J813: WFxT, T8142 idle and i2c-pasemi resume - #996

Merged
Acelogic merged 2 commits into
aurora-silicon:aurora-wipfrom
sithglan:j813/rb/platform
Nov 6, 2026
Merged

Acelogic merged 2 commits into
aurora-silicon:aurora-wipfrom
sithglan:j813/rb/platform

Conversation

@sithglan

@sithglan sithglan commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Three small pieces the MacBook Air M5 needs:

  • arm64: cpufeature: treat WFxT as absent on Apple M5 and M6 cores
  • arm64: idle: T8142 idles in WFI even with idle=nop (aura passes idle=nop for kernels without the WFI register quirk; this kernel has it, and spinning idle keeps the SoC near 90 C)
  • i2c: pasemi: restore the controller after system sleep (s2idle)

Tested on the MacBook Air 13-inch M5 (J813): the nine J813 branches (nvme, platform, dts, soc, wireless, media, sound, display, gpu-m5) merged onto integration/aurora 11eccbe, built with the J813 config (7.3.0) and booted through aura's aura-try trial boot. systemd reaches running: NVMe root, the N1 Wi-Fi, the AVD and ISP drivers, PSCI cpuidle, the E/P states, CLPC/PMC and the PMP come up, the M5 GPU backend starts firmware 25G76, and drm/apple drives the panel.

Two sound findings from that boot, neither yet resolved: the installed aura predates the amp-level injection now in aura main, so macaudio disables the speakers (the card binds, but the DT this boot used carries no apple,speaker-config); and opening the microphone fails with LEAP leaf 2 did not power up: Error(110), while the same T8152 driver on the J813's current 7.1 kernel records.

Stability caveat: a second boot of the same image hung about 38 s in, just after the NTP step set off the daily fstrim/apt timers, with no panic record (no pstore). The first boot went through the same timer burst and stayed up for minutes. Until the hang is understood, the combined tree is not proven stable across reboots.

cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10

Apple T8142 (M5) and T8152 (M6) cores clear architectural state across
WFIT, the FP/SIMD registers included. apple_m5_cpu_wfit() preserves the
general-purpose registers around the WFIT in __delay(), but not FP/SIMD,
and __delay() runs from any context: apple-soc-cpufreq polls the DVFS
command register with readq_poll_timeout_atomic() on every transition,
which schedutil and ondemand do from the scheduler or a kworker on a CPU
whose current task still has live FP/SIMD state.

On a J873 (Mac mini M6), 12 workers hashing a 128 MiB tmpfs file with
sha256sum, with short sleeps in between, got 25-56% wrong results under
schedutil or ondemand, each one different; fio verify found 64-byte runs
of zeros in reads, and systemd and Python crashed. The performance,
powersave and userspace governors were clean, as was the same load with
arm64.nowfxt (0 of 288 under schedutil twice and under ondemand, with
~1200/550 transitions per run).

Do what arm64.nowfxt does for these MIDRs: ARM64_HAS_WFXT is not
detected, so __delay() falls back to the event-stream WFE loop. The
userspace HWCAP2_WFXT still follows ID_AA64ISAR2_EL1. Only T8152 was
measured; T8142 is included because apple_m5_needs_wait_save() already
groups its cores with T8152 for this state loss.

Signed-off-by: Thomas Glanzmann <[email protected]>
aura, the J813 boot loader, passes idle=nop on M5 for kernels that do
not preserve registers across WFI. This kernel does (apple_wfi_quirk_init),
so on T8142 keep WFI as the default idle: spinning keeps all ten cores
busy, cpuidle's own WFI state spins too, and the SoC sits near 90 C and
throttles.

Signed-off-by: Thomas Glanzmann <[email protected]>
@Acelogic
Acelogic changed the base branch from integration/aurora to aurora-wip November 6, 2026 06:21
@Acelogic
Acelogic merged commit fcdfd1f into aurora-silicon:aurora-wip Nov 6, 2026
RyanTheTide added a commit that referenced this pull request Nov 6, 2026
Carries the work merged on aurora-wip since #1018 into the release
branch: M5 T8142/J813 bring-up (#995 #996 #997 #998 #1001 #1002 #1003),
T8152/J873 bring-up (#984 #1009 #1013 #1022), J813 AVD/ISP (#1026)
and the selftest harness updates (#1014). The merge is clean; the 13
integration/aurora commits since #1018 are kept.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
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.

2 participants