Skip to content

arm64: dts: apple: t8132-j604: wire radio CLKREQ# and external DCP sleep paths - #4009

Open
espentrydal wants to merge 1 commit into
aurora-silicon:mainfrom
espentrydal:feat/t8132-j604-sleep-dt
Open

espentrydal wants to merge 1 commit into
aurora-silicon:mainfrom
espentrydal:feat/t8132-j604-sleep-dt

Conversation

@espentrydal

Copy link
Copy Markdown
Contributor

What: Wire the J604 board-specific device-tree properties required for firmware suspend-to-RAM in arch/arm64/boot/dts/apple/t8132-j604.dts, complementary to the SoC-level T8132 deep sleep enablement in #3629:

  • add wakeup-source on &wifi0 and clkreq-gpios = <&pinctrl_ap 160 GPIO_ACTIVE_LOW> on &port00 (J604 ADT pci-bridge0 function-clkreq 0xa0);
  • configure consumer-switched power states, bridge links, and retention workarounds on ps_dispext0_{sys,fe,cpu} and ps_dispext1_{sys,fe,cpu};
  • set J604 ADT clock-protection slices on dcpext0_dart (5), dispext0_dart (4), dcpext1_dart (30), and dispext1_dart (29).

Together with #3629, fix/t8132-apcie-port2-sleep-tunables, and feat/t8132-j604-dcp-power-domains, this gives J604 full firmware deep sleep (deep).

Tested:

  • At PR head a8c31fcba5f (base 53732c475cb):
    • scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks.
    • make LLVM=1 ARCH=arm64 apple/t8132-j604.dtb: 0 errors, 0 warnings.
  • Hardware (MacBook Pro 14" M4, apple,j604 / apple,t8132, OS/system fw 26.6.2, mBoot-18000.161.10, aura 1.0.0b18, Arch Linux ARM, 7.3.0-j604-dev+ carrying these J604 DT properties alongside T8132 sleep enablement): native radio sleep recovery registered, external DCP sleep bound cleanly on dcpext0/dcpext1, and firmware deep sleep (mem_sleep=deep) passed both a short wake test (keyboard wake via MTP.DOCK.CHANNELS.AP0.IRQ, GPU back in 1.1 ms, NVMe ANS back in 94 ms) and a 10.5-hour overnight deep sleep (boot object resumes 0 -> 1, Wi-Fi/display/SEP/NVMe all recovered), kernel taint 8196, 0 failed units, 0 new kernel errors.

Risk: two-way door · J604 (MacBook Pro 14" M4) DT only.

Not yet: Standalone boot at this exact single-commit head a8c31fcba5f (tested together with SoC-level T8132 sleep enablement matching #3629); deep sleep with an active external USB-C display attached was not tested.

…eep paths

Wire the J604 board-specific device-tree properties required for
firmware suspend-to-RAM (complementary to the SoC-level T8132 sleep
enablement in aurora-silicon#3629):
- mark &wifi0 as a wakeup-source and wire &port00 clkreq-gpios to AP
  GPIO 160 (ADT pci-bridge0 function-clkreq 0xa0) for native radio
  sleep recovery;
- configure consumer-switched power states and bridge/retention
  properties on ps_dispext0_{sys,fe,cpu} and ps_dispext1_{sys,fe,cpu};
- set the J604 ADT clock-protection slices on dcpext0_dart (5),
  dispext0_dart (4), dcpext1_dart (30), and dispext1_dart (29).

Signed-off-by: Espen Trydal <espen@trydal.io>
@espentrydal
espentrydal requested review from a team as code owners December 2, 2026 22:21
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Merge readiness at a8c31fcb: not ready yet

Check Detail
CI at head ok 2 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at a8c31fcb
Conflicts ok none
PR text ok Risk: two-way · J604 (MacBook Pro 14" M4) DT only.

Areas: area:bringup

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@DjDeveloperr DjDeveloperr 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.

Comment at a8c31fcba5f3. The properties are the J713's and I found no error in them. Three things are missing before I'd approve.

  1. It does more than sleep. On main today, without #3629:

    • The slices and the consumer-switched states make both external DCPs ext_idle_capable. Each one the loader hands over is powered down 5 s after it goes idle, in every boot, and restarted on the next plug.
    • wakeup-source makes brcmfmac register Wi-Fi as a wake source for s2idle.
    • clkreq-gpios does nothing until #3629 drops the J713 check in pcie-apple-radio.c.

    Please put the first two in What and Risk. They need a row with a USB-C display, and the PR has none.

  2. "Together with #3629 ... full firmware deep sleep" isn't right yet. At #3629's head 2c2788a9, the J604 keeps s2idle as its default even with this, #4007 and #4008, because the probe check names a DCP without apple,display-power. Deep is then offered but has to be chosen. Your runs had J604 checks of your own in apple-dart-sleep.c and pcie-apple-radio.c, and not that check. On 26.6.2 the panel is stopped through apple,pmc-interface, so either the J604 describes the node or the check accepts that path. That's for #3629 or a follow-up.

  3. Where the slice numbers come from. CLKREQ# on AP GPIO 160 is in the J604 tree of the public 26.6.2 IPSW (pci-bridge0 function-clkreq, 0xa0). 5 and 30 are also T8132's in sleep.c, and all four equal the J713's on main. The restore device trees I looked at (J604, J713, J715, J773g) don't have the slice property, and the four DART nodes are otherwise the same on the J604 and J713. Please paste the four lines from your live ADT.

Related work: merges cleanly with main, #4008, #3629, #3300 and the t8132-j604.dts hunks of #3988 and #1998. #3988 and #3454 conflict with main by themselves, not with this. Order: #3629, #4007, #4008, then this.

Checked on the merge with main b902937859ec: the J604 DTB builds, the other five T8132 DTBs are identical, dt-validate matches main, checkpatch --strict is clean, and the full host tests pass on the series merged together (1028/1028).

Row owed, J604 at this head: boot without a display and wait 10 s. Plug a USB-C display into each port, unplug, wait 10 s and replug, with the picture back each time and no external DCP restart failed line. Then DPMS off and on, one s2idle with the display and one without, and Wi-Fi back after each. Then, with #3629, #4007 and #4008 and deep chosen by hand, one deep sleep without a display and one with it attached. The second must either work or be refused cleanly.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at a8c31fc

Checked: Compiled the base and exact J604 DTBs. Verified the Wi-Fi wake flag, GPIO specifier, both DCP bridge phandles, parent links, consumer-switched state and retention entries, and all four DART slice references. The properties use the existing PCIe, PMGR and DART bindings, with no change to shared driver gating.

Follow-ups: On current main these properties also affect external DCP runtime idle and Wi-Fi wake. The default deep-sleep policy is tracked in #3629.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants