Repository navigation
Conversation
Describe nub-spmi0 as an interrupt controller (ADT interrupts[1], AIC 726) and give the SMC RTC the PMU's alarm: its peripheral interrupt 2, the alarm control, value and mask cells, and wakeup-source. An armed RTC alarm can then wake the Mac Studio from suspend-to-idle without hands. Needs generation-4 interrupt support in spmi-apple-controller. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Satya Benson <satya@benson.earth>
Set apple,s2idle-retain-adopted-links on the PCIe host, so suspend-to-idle keeps the boot-loader-trained N1 link running instead of being refused with -EBUSY. Needs the property-based admission in pcie-apple.c. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Satya Benson <satya@benson.earth>
The Mac Studio has no internal keyboard or trackpad, and its ADT has no /arm-io/mtp and no MTP dockchannel: nothing brings the MTP up. Its FIFO block is not live, so the dockchannel driver's first register access at probe raises an asynchronous SError and the kernel panics at about 0.14 s (seen with CONFIG_APPLE_DOCKCHANNEL=y, which arch/arm64/configs/asahi.config selects). Disable the MTP, its mailbox and the FIFO, as the MTP DART already is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Satya Benson <satya@benson.earth>
|
Claude Opus 5.5 on @satchlj's behalf. Booted retest on J775c (Mac Studio, M5 Max): it boots with all three commits. This was a one-shot trial boot on 2026-11-20 of
Not part of this PR, but seen on the same boot: Bluetooth 🤖 Generated with Claude Code |
|
Claude Opus 5.5 on @satchlj's behalf: this PR's third commit, 7d3e8f9 ("disable the MTP and its dockchannel"), is now also in #2102, as d554f54, at DjDeveloperr's request. #2102 should not land a J775c DTB that panics with The two commits make the same change. Once #2102 merges, this commit is a no-op, and only the first two remain to review: the RTC alarm wake and |
|
Claude Opus 5.5 on @satchlj's behalf: s2idle on J775c with this PR, cand-2d boot (2026-11-20): refused 3 of 3, but past this PR's gate. The refusal comes from the D0 check, because of a driverless SD reader. Kernel: the same boot as the comment above. That is Method: three
The kernel log, identical in each cycle: What this shows:
Next: a boot without the 🤖 Generated with Claude Code |
|
Thanks for the J775c RTC alarm work and the boot retest. The RTC alarm and
The MTP disable is already in #2102, as you noted, so once both are in this PR reduces to the RTC wiring. |
#2488 no longer adds this property: pcie-apple keeps adopted links across s2idle on every host whose links the boot loader trains (hw->adopt_link), so J775c needs no line for it. Without the binding, the property would also fail dt-validate. Signed-off-by: Satya Benson <satya@benson.earth> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude Opus 5.5 on @satchlj's behalf: thanks. Both dependencies are now sorted, and I pushed one new commit (no force-push).
Net against #2102, this PR is now the RTC wiring alone: the 🤖 Generated with Claude Code |
|
Claude Opus 5.5 on @satchlj's behalf: a correction to my last comment. Commit 3 (the MTP disable) becomes a no-op once #2102 lands, not #2507. #2102's 🤖 Generated with Claude Code |
t6050-max.dtsi describes the MTP coprocessor (the keyboard and trackpad's), its mailbox, its DART and the DockChannel FIFO its HID transport uses, with no status, so every board that includes the file gets all four enabled. Only the laptops have this block. The ADTs of J714c, J714s, J716c, J716s, K114c, K114s, K116c and K116s carry mtp, dart-mtp and dockchannel-mtp; the Mac Studio (J775c) and Mac mini (J873s) ADTs carry none of them, and nothing brings the MTP up there. On a J775c built with CONFIG_APPLE_DOCKCHANNEL=y the first register access in dockchannel_probe() takes an SError and the kernel panics at about 0.14 s. Mark the four nodes disabled in t6050-max.dtsi and enable them in each board file that adds the HID transport: t6050-j714c.dts, t6050-j714s.dts, t6050-j716c.dts, t6050-j716s.dts and the shared t6050-k114-k116.dtsi (K114c, K114s, K116c, K116s). The MTP DART is included because it is part of the same block and is absent from the desktop ADTs as well. On the eight laptops the compiled DTBs differ only by an explicit status = "okay" on the four nodes, which had no status before, so their effective state is unchanged. J775c and J873s get the four nodes disabled. J775d does not include t6050-max.dtsi and is unchanged. Reported-by: Satya Benson <satya@benson.earth> Suggested-by: DjDeveloperr <43033058+DjDeveloperr@users.noreply.github.com> Suggested-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Link: aurora-silicon#2102 Link: aurora-silicon#2495 Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
The 3/3 RTC-woken freezes on #2488 (wake IRQ 151 through |
|
Claude Opus 5.5 on @satchlj's behalf. @RyanTheTide: yes, the J775c kernel that passed the s2idle freezes carried this PR's lines. They did not come from the tip. Checked against cand-10 (
At the tip, Net, this PR adds only the RTC alarm commit; the MTP commit is a duplicate and the other two cancel out. It is not redundant yet:
Proposal: fold the RTC alarm commit into #2102, as was done with the MTP disable, and close this PR. If #2102's J775c DTS later moves to including the shared dtsi, #2007 covers it instead and the board copy can go. Until one of those happens, this PR is the only source of the J775c RTC wake. |
Claude Opus 5.5 on @satchlj's behalf.
Stacked on #2102 (the J775c device tree); review the last four commits. They let the Mac Studio (J775c) boot a kernel built with
arch/arm64/configs/asahi.config's dockchannel driver and wake from the RTC alarm without hands. Depends on #1743 (generation-4 SPMI interrupts) for the first commit; without it the SPMI controller refuses the interrupt it adds. (#2494, which did the same, is closed in favour of #1743.)Update after review: commit 4 removes commit 2's line again, because #2488 now admits adopted-link s2idle on every
hw->adopt_linkhost, with no property. Net against #2102, this PR is the RTC wiring, plus the MTP disable until #2102 lands (#2102 carries the same hunk as d554f54; #2507'st6050-max.dtsidefault doesn't reach #2102's standalone J775c DT).1. Wake from the RTC alarm
J775c has no hands-free wake source for suspend-to-idle:
rtc0is the SMC RTC, with no alarm interrupt and nopower/wakeup. The PMU's alarm is its peripheral interrupt 2 on/arm-io/nub-spmi0. This commit:nub-spmi0as an interrupt controller, at ADTinterrupts[1], AIC 726;rtc_ctrl,rtc_alarm,rtc_alarm_mask, which arm64: dts: apple: support M5 Max Mac Studio (J775c) #2102 already defines),interrupts-extended = <&nub_spmi0 2 IRQ_TYPE_EDGE_RISING>andwakeup-source.rtc-macsmcalready supports all three.2. Allow s2idle with adopted links (removed again by commit 4)
This commit set
apple,s2idle-retain-adopted-linkson the PCIe host (#2488's property). Without it, suspend-to-idle on J775c was refused with-EBUSY, because its N1 link is boot-loader-trained.3. Disable the MTP and its dockchannel (a boot fix for #2102)
J775c's ADT has no
/arm-io/mtpand no MTP dockchannel, because there is no internal keyboard or trackpad. #2102 nevertheless describes the MTP, its mailbox and the FIFOfifo@294b14000; only the MTP DART is disabled.CONFIG_APPLE_DOCKCHANNEL=y, whichasahi.configselects,dockchannel_probe()touches the FIFO, which nothing has brought up.SError Interrupt on CPU14, code 0x00000000be000000, inirq_domain_create_linear()←dockchannel_probe()←dockchannel_driver_init(). That trace was captured withearlycon=dockchannel,0x288e3c000.The tip's own
t6050-max.dtsienablesmtp_dockchannelfor every M5 Max board. The tip's stubt6050-j775c.dtsincludes it, so it has the same problem, but #2102 replaces that stub.Testing
dtc:t6050-j775c.dtscompiles after each commit with the same 11 existing warnings. The new properties are on/soc/spmi@28a014000, its SMCrtc,/pcie@1cb0000000, and the three MTP nodes (status = "disabled").APPLE_DOCKCHANNEL=yfailed to boot three times out of three. The third boot, with earlycon, captured the trace above. The second left the PMU panic counter at 1. The first left no evidence. The third commit fixed it: cand-2d (2026-11-20,26294e82+ arm64: dts: apple: support M5 Max Mac Studio (J775c) #2102 without its Clock-PM commit + PCI: apple: keep adopted links across s2idle on every adopted host #2488's first commit + spmi: apple: support generation-4 interrupts #2494 + commits 1-3) booted; see the comments below. There, s2idle was refused 3/3 at the D0 check, because the boot-trained SD reader had no driver on that boot. Commit 4 is not yet booted.rtcwake -m freeze -s 20cycles there woke from the alarm (that kernel has its own gen-4 interrupt code, not [Joshua's agent] spmi: apple: gen4 interrupts and the gen4 mask bank (draft) #1743), which shows asapple_spmi 2 Edge macsmc-rtcin/proc/interrupts. That kernel admits s2idle with adopted links through its own board list.🤖 Generated with Claude Code