Skip to content

arm64: dts: apple: t6050-j775c: RTC alarm wake, MTP disabled (stacked on #2102, needs #1743) - #2495

Closed
satchlj wants to merge 4 commits into
feat/j775c-rebased-20261116from
satchlj/j775c-rtc-alarm-wake-20261119
Closed

satchlj wants to merge 4 commits into
feat/j775c-rebased-20261116from
satchlj/j775c-rtc-alarm-wake-20261119

Conversation

@satchlj

@satchlj satchlj commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

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_link host, 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's t6050-max.dtsi default 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: rtc0 is the SMC RTC, with no alarm interrupt and no power/wakeup. The PMU's alarm is its peripheral interrupt 2 on /arm-io/nub-spmi0. This commit:

  • describes nub-spmi0 as an interrupt controller, at ADT interrupts[1], AIC 726;
  • gives the SMC RTC the alarm control, value and mask cells (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> and wakeup-source. rtc-macsmc already supports all three.

2. Allow s2idle with adopted links (removed again by commit 4)

This commit set apple,s2idle-retain-adopted-links on 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/mtp and no MTP dockchannel, because there is no internal keyboard or trackpad. #2102 nevertheless describes the MTP, its mailbox and the FIFO fifo@294b14000; only the MTP DART is disabled.

  • With CONFIG_APPLE_DOCKCHANNEL=y, which asahi.config selects, dockchannel_probe() touches the FIFO, which nothing has brought up.
  • The access raises an asynchronous SError, and the kernel panics at 0.138 s, before the console registers:
    SError Interrupt on CPU14, code 0x00000000be000000, in irq_domain_create_linear() ← dockchannel_probe() ← dockchannel_driver_init(). That trace was captured with earlycon=dockchannel,0x288e3c000.
  • This commit disables those three nodes, as the DART already is.

The tip's own t6050-max.dtsi enables mtp_dockchannel for every M5 Max board. The tip's stub t6050-j775c.dts includes it, so it has the same problem, but #2102 replaces that stub.

Testing

🤖 Generated with Claude Code

satchlj and others added 2 commits November 19, 2026 18:57
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>
@satchlj satchlj changed the title arm64: dts: apple: t6050-j775c: wake from the RTC alarm (stacked on #2102, needs #2494) arm64: dts: apple: t6050-j775c: RTC alarm wake and s2idle with adopted links (stacked on #2102) Nov 20, 2026
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>
@satchlj satchlj changed the title arm64: dts: apple: t6050-j775c: RTC alarm wake and s2idle with adopted links (stacked on #2102) arm64: dts: apple: t6050-j775c: RTC alarm wake, s2idle with adopted links, MTP disabled (stacked on #2102) Nov 20, 2026
@satchlj

satchlj commented Nov 20, 2026 •

Copy link
Copy Markdown
Member Author

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 integration/aurora 26294e82 + 63 commits (including #2102) + #2488 + #2494 + this PR's three commits. The config was built from arch/arm64/configs/asahi.config, so CONFIG_APPLE_DOCKCHANNEL=y and CONFIG_HID_DOCKCHANNEL=y are set. The kernel identifies as 7.3.0-lobata-cand+ #1 SMP PREEMPT Thu Nov 19 20:12:00 EST 2026. The command line added earlycon=dockchannel,0x288e3c000 keep_bootcon, so a failure would have been captured.

  • Commit 3 (MTP disabled): it gets past dockchannel_driver_init and reaches userspace. There is no SError, and no err/crit line involves the dockchannel. Without this commit, the same tree panicked at 0.138 s (SError Interrupt on CPU14, dockchannel_probe).
  • Commit 1 (RTC alarm):
    • rtc0 is macsmc-rtc, with power/wakeup = enabled.
    • /proc/interrupts shows apple_spmi 2 Edge macsmc-rtc with a count of 1, read before the s2idle cycles (corrected 2026-11-20: not "at boot").
    • With spmi: apple: support generation-4 interrupts #2494, nub-spmi0 takes its AIC 726 interrupt and probes without error.
  • Commit 2 (s2idle with adopted links): an s2idle cycle has not run yet. Real rtcwake -m freeze cycles come at the end of this boot's check run, and I'll add the result here.

Not part of this PR, but seen on the same boot: Bluetooth hci0 is bound to btcentauri_t6050 and powered.

🤖 Generated with Claude Code

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

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 APPLE_DOCKCHANNEL=y.

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 apple,s2idle-retain-adopted-links. I have left this PR's history unchanged.

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

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 integration/aurora 26294e8 (5 commits behind the tip; lacks #2444) + #2102 without its Clock-PM commit + #2488 + #2494 + this PR. The command line carried initcall_blacklist=sdhci_driver_init, a guard every lobata trial boot uses.

Method: three rtcwake -d rtc0 -m freeze -s 20 cycles, woken by the RTC alarm. Before each cycle the run waited until Thunderbolt was settled and 60 s had passed since the last resume. dmesg was taken from the kernel journal around each cycle.

Cycle Result
1-3 refused before sleeping: suspend_stats fail went 1, 2, 3; last_failed_dev 1cb0000000.pcie, errno -16

The kernel log, identical in each cycle:

pcieport 0000:00:01.0: adopted link requires accessible D0 devices for s2idle
pcie-apple 1cb0000000.pcie: PM: dpm_run_callback(): apple_pcie_suspend_noirq returns -16
PM: noirq suspend of devices failed

What this shows:

  • Commit 2 does its job. apple,s2idle-retain-adopted-links gets J775c past the property gate in apple_pcie_check_adopted_s2idle(). Without it, the refusal is the earlier -EBUSY for unqualified boards.
  • The refusal now comes from apple_pcie_check_d0(). Root port 00:01.0 carries J775c's SD reader (GL9755, 02:00.0), and on J775c the boot loader trains that link, so it is adopted. With sdhci blacklisted, the GL9755 has no driver, so it is not held in D0. Unlike the K116s/J714s SD reader, which sits under a kernel-trained port, it is not exempt.
  • Commit 1 (RTC alarm) could not be tested by a real freeze, because none happened. Its wiring is in place (see the comment above).

Next: a boot without the sdhci blacklist, so the GL9755 is driven (#1618 and #2190 are in this tree), to see whether the D0 check passes and the alarm wakes a real freeze. If the driverless case should be allowed too, that belongs in the D0 rule, not in this DT.

🤖 Generated with Claude Code

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the J775c RTC alarm work and the boot retest.

The RTC alarm and nub-spmi0 interrupt-controller lines describe the board's hardware and look good. Two dependencies to sort first:

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>
@satchlj satchlj changed the title arm64: dts: apple: t6050-j775c: RTC alarm wake, s2idle with adopted links, MTP disabled (stacked on #2102) arm64: dts: apple: t6050-j775c: RTC alarm wake, MTP disabled (stacked on #2102, needs #1743) Nov 20, 2026
@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

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 nub-spmi0 interrupt controller (AIC 726) and the PMU alarm on its peripheral interrupt 2, plus the MTP hunk until #2102 or #2507 has it. The real RTC-woken freeze on J775c comes with lobata's next candidate, which carries #1743, the reworked #2488 and this head.

🤖 Generated with Claude Code

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

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 t6050-j775c.dts is standalone and doesn't include t6050-max.dtsi, so #2507's default doesn't reach it. I've corrected the description too.

🤖 Generated with Claude Code

DjDeveloperr pushed a commit to sithglan/aurora-linux that referenced this pull request Nov 20, 2026
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>
@RyanTheTide

Copy link
Copy Markdown
Contributor

The 3/3 RTC-woken freezes on #2488 (wake IRQ 151 through apple_spmi) look like the row this PR was waiting for. Did that kernel's J775c tree carry this PR's RTC alarm and nub-spmi0 lines, or were they there another way? If they came from this PR, a line here saying so would settle it. What would remain is the ordering after #1743 and #2102.

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

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 (6ebd4f505fd5 = integration/aurora df62a8c4d38d + 84) and its built DTB:

Lines in cand-10's J775c DTS Source
smc_rtc: rtc_ctrl/rtc_alarm/rtc_alarm_mask cells, interrupts-extended = <&nub_spmi0 2 IRQ_TYPE_EDGE_RISING>, wakeup-source This PR, e248b9b957b9, carried as a3d3f44bb73d
nub_spmi0: interrupts = <AIC 726 level-high>, interrupt-controller, #interrupt-cells = <2> This PR, the same commit
MTP, its mailbox and the dockchannel disabled This PR's 7d3e8f92d3ce, which duplicates #2102's d554f54ce622
apple,s2idle-retain-adopted-links Added by e778f86f6c01 and removed again by a2ac3b35ec64, so no net change
gen4 SPMI interrupt support #1743 (42f3e094cd), carried as code-identical cherry-picks

At the tip, t6050-j775c.dts (the disabled inventory) has none of the nub_spmi0 interrupt, rtc_alarm or wakeup-source lines.

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.

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Claude Opus 5.5 on @satchlj's behalf.

Closing this PR. Its only net change, the RTC alarm commit, is now on #2102 as 3c72babd92d1 (the same patch as e248b9b957b9). See the note there: #2102. The MTP commit was already on #2102 as d554f54ce622, and the s2idle-retain add/drop pair cancels out.

@satchlj satchlj closed this Nov 20, 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.

2 participants