Repository navigation
rtc: apple-pmu: M2 PMU wake alarm (M1 Pro next) - #1151
Merged
Merged
Conversation
The M1 Pro/Max/Ultra (t6000) and M2 (t8112) PMUs have the same alarm as Baku and Abbey, and keep the clock offset in Abbey's format. Add their compatibles. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
The M1 Pro/Max/Ultra (Maverick) and M2 (Stowe) PMUs have the same alarm as Baku and Abbey: a 65536 Hz counter, a comparator in whole counter seconds, a mask, an arm bit in the control byte and an event that is cleared by writing one. Only the register addresses and the offset format differ. Stowe uses Baku's register block; Maverick has its own. Both keep the clock offset as signed 1/32768 s ticks like Abbey. Describe each PMU by absolute register addresses instead of a base, add the two PMUs, and let the SPMI NVMEM provider populate their RTC child. Firmware leaves the monitor bit set on Stowe, so keep it set on both, as on Abbey. Extend the host model to all four layouts, with mutations for the control address, Maverick's separate event register and Stowe's offset format. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
Make the nub SPMI controller an interrupt controller and add the PMU RTC under the PMIC, so rtcwake can wake M2 systems from s2idle. The PMU raises SPMI interrupt 2 for the alarm. Keep rtc0 on the SMC clock, which is the one userspace sets, and give the alarm rtc1, as on the Neo and the M4 Pro. Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
RyanTheTide
added a commit
that referenced
this pull request
Nov 7, 2026
Brings aurora-wip up to the 11-08 morning integration tip: DT descriptions for every Mac family (#1094, #1097, #1111, #1131, #1132, #1148, #1149, #1155, #1156, #1157, #1172), the J616s scaler (#1168), the panel primaries from boot data (#1105), AVD macOS command parity (#1116), AVD dma-coherent (#1169), the M2 PMU RTC alarm (#1151), G17 admission without spinning (#1146) and the AOP map wait (#1147). Signed-off-by: Ryan Murray <[email protected]> Assisted-by: LLM
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rtcwake now works on the M2. Its PMU has the same one-shot alarm as the Neo and M4 Pro PMUs: a 65536 Hz counter, a comparator in whole seconds, a mask, an arm bit and an event that clears on write. rtc-apple-pmu just needed the register layout, and the DT needed the SPMI interrupt.
dt-bindings: compatibles for the M2 (apple,t8112-pmu-rtc) and M1 Pro/Max/Ultra (apple,t6000-pmu-rtc) PMUs.rtc: apple-pmu: each PMU is now described by absolute register addresses, which the M1 Pro needs because its event register is not next to the rest. Adds the M2 layout (Baku's register block, offset cell in 1/32768 s like Abbey) and the M1 Pro layout. The SPMI NVMEM provider now populates the RTC child on these PMICs. Without that, the node never becomes a device. The host model covers all four layouts, with new mutations for the control address, the M1 Pro event register and the M2 offset format.arm64: dts: apple: t8112: the nub SPMI controller becomes an interrupt controller (AIC 384), and the PMU RTC sits under pmic@e with SPMI interrupt 2 andwakeup-source. rtc0 stays the SMC clock that userspace sets. The alarm is rtc1, same as on the Neo and M4 Pro.The M1 Pro DT is ready on
rtc/t600x-pmu-alarmand joins this PR once the M1 Pro is back on the network and passes the same test. The driver side is already here and does nothing without the DT.Supersedes #1130.
Testing (M2 MacBook Air, j413)
Test kernel
7.3.0-aurora-gapref1= integration/aurora a20af80 + this branch (+ unrelated test commits). Booted one-shot with the j413 DTB from this tree in a trial boot.bin; the default kernel and boot.bin were left untouched and restored afterwards. SELinux enforcing, no sound.rtc1: apple-pmu-rtc 23d714000.spmi:pmic@e:rtc, wakealarm present, wakeup enabled, time equal to rtc0 to the second. 0 SPMI errors with the controller now in interrupt mode, kernel err 0, kernel warnings same classes as the fleet kernel, 0 AVC, 0 failed units.rtcwake -d rtc1 -m no -s 8fires SPMI irq 2 once and clears wakealarm.rtcwake -d rtc1 -m freeze -s 15x4, 4/4 woke on the alarm (irq count +4,PM: suspend entry (s2idle)/PM: suspend exit~17 s apart), Wi-Fi back each time, 0 new warnings.pm_test=platformfreeze x6: 6/6, no brcmfmac D3 timeouts, 0 AVC.tools/asahi/pmu-rtc-tests.pypasses, and all 8 mutations are caught.🤖 Generated with Claude Code