Repository navigation
soc: apple: add T6020 (M2 Pro) suspend-to-RAM and DCP S2R power layouts - #3999
Conversation
Describe the registers the EL2 sleep driver uses on the M2 Pro: the PMGR's four power-state blocks, its CPM power gates, CPU start, cluster and commit words, the watchdog, both nub SPMI controllers, the wake controller, and the SoC clock, PLL and always-on words the commit reads. Every range comes from the ADT's /arm-io/pmgr, wdt, nub-spmi0 and nub-spmi1. Boards list their ADT's wake sources in apple,wake-enable. Signed-off-by: DjDeveloperr <hey@djdev.me>
The M2 Pro's AIC2 loses its configuration with the SoC's power in a deep sleep, as T8112's does. Match "apple,t6020-aic" with the T8112 settings, so the syscore save and restore run around a firmware suspend. Nothing changes for s2idle: the hooks only act when the sleep driver suspends through firmware. Signed-off-by: DjDeveloperr <hey@djdev.me>
Give T6020 its own configuration: over a sleep the PMP keeps only its __DATA segment, 0xa4000 bytes at 0x58000 in the J414s 27.2 ADT's segment-ranges, its offset read from the SRAM header as on T8132. apple,sram-keep still overrides both. Everything else stays at the defaults T6020 runs with today. On T6020 the firmware answers no idle request at the sleep's commit: with interrupts off, SET_AP_PWR_STATE(IDLE) went unanswered for 200 ms on two J414s units, and the commit after it never reached the sleep (#3336). The same stop in suspend_late, interrupts on, idles it in about 22 ms, and both units slept and woke with it. So on T6020 the PMP's stop stays in suspend_late. A dry run leaves the firmware running, since only a real sleep restarts it, and checks the SRAM range the stop would keep. A sleep refused after a real stop leaves the firmware stopped until the next real sleep, as before the commit stop existed. Signed-off-by: DjDeveloperr <hey@djdev.me>
Add suspend-to-RAM for T6020 on the T8112 profile's operations, with T6020's own register map, commit and wake. Like T8112 it is untested: deep sleep is offered only with apple_sleep.deep=1, and a sleep is a dry run that refuses after every check unless apple_sleep.untested_commit=1. The commit and wake are the J414s sequence that two J414s units slept and woke with (#3336): macOS's sleep entry as traced under a hypervisor in the Aurora-DeepIdle runs, replayed in its order, as carried by Pim Jeursen's J414s provider (patatman/linux ref/t6020-s2r-j414s at b274e09). Where T6020 differs from T8112: - The PMGR keeps its power words in four blocks. The profile keeps its own books of all 213 ADT power words, and of which ones macOS has off at its commit. - Three CPU clusters at MPIDR affinity 1, up to four cores each. - The GPU, ANS, SIO and internal display (firmware 13.5) have no stop of their own at the commit: it halts each CPU whose domain is still fully on, lowers the display and USB domains left on, then every word macOS has off. - The SoC fabric goes under AUTO_ENABLE, the complexes, clocks and PLL are parked, and the memory side is quiesced by macOS's writes. - WD0 and WD1 go off before the commit word, which arms WD2. - Each core cleans its L1 and arms CYC_OVRD. The last core of each cluster arms its ACC_OVRD, whose L2 flush the hardware does. The commit stops the held cores itself, after the memory side, so the shared commit gains commit_stops_cpus. As on T8112, the AIC masks and everything the wake reads are saved before the RAM is cleaned past the caches. A dry run reads, and only reads, every always-on word the commit would write, and reports them. Signed-off-by: DjDeveloperr <hey@djdev.me>
Describe the T6020 sleep registers, disabled by default, and enable them on J414s with its ADT's ap-wake-sources: the AOP, the NUB (the PMU's RTC alarm is 54), the SMC, the four ATC ports and the MTP. The other T6020 boards stay disabled until their own ADT's sources are listed. The profile is untested: deep sleep stays off unless apple_sleep.deep=1, and a sleep is a dry run unless apple_sleep.untested_commit=1. Signed-off-by: DjDeveloperr <hey@djdev.me>
Allow apple,t6020-display-power with the apple,t8103-display-power fallback (single "ps" PMGR power-state window, no retention or pmc-dcp words), matching T8112. Signed-off-by: DjDeveloperr <hey@djdev.me>
Add dcp_s2r_t6020 (pmgr_east disp0_cpu0/fe/sys at 0x1d8/0x1d0/0x1b0) and dcp_s2r_t6020_ext (pmgr dispext0 at 0x2d8/0x2c0/0x258 and dispext1 at 0x2b8/0x2b0/0x248), with DART streams BIT(5) and BIT(0)|BIT(4) matching T8112. Wire apple_dcp_hw_t6020 (.s2r) and apple_dcp_hw_t6020_dcpext (.s2r_ext) behind .s2r_untested = true (gated by appledrm.s2r_untested) and bounds-check dcp->index against dcp_s2r_t6020_ext so T6021 dcpext2/3 stay untouched. Signed-off-by: DjDeveloperr <hey@djdev.me>
Add display-power@290280000 (pmgr_east) for internal dcp and display-power@28e080000 (pmgr) for dcpext0 and dcpext1 so appledrm can stop and restart firmware 27.2 display coprocessors across S2R. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
Confirmed — please feel free to use: I'm pulling |
|
Tested 1. Dry run (
|
|
Thanks for the trailers and for the crumbs. Your At 10:40 UTC our J414s woke from a real deep sleep for the first time:
We're splitting these one per boot now. If you want a cheap data point on 13.5: the same |
T6020's enclave sets DEV_DISABLE in its power word once it is down, and under AUTO_ENABLE the actual state may read 0 before that. The sequence that woke J414s also waits 500 ms after the SMC answers slpa, as the entry in Aura does. Both are facts of the profile; the other SoCs keep what they have. Co-developed-by: Pim Jeursen <pim@jeursen.nl> Signed-off-by: Pim Jeursen <pim@jeursen.nl> Signed-off-by: DjDeveloperr <hey@djdev.me>
- GFX goes off before AFR, and nothing touches the GPU's power block after AFR is written 0. - PCIe's GP words are raised before the root complex's teardown: with ASPM L1 they are gated by then and the teardown was skipped. - The ANE's, ISP's and encoder's child words, which macOS has off at its S2R timer, go off with their parents. An external display coprocessor left running is halted. - SEP's floor gets up to 500 ms to drop before its word goes under AUTO_ENABLE. - The cleans before the memory side's quiesce go to the PoC, and the AIC's lines are masked after the commit word. Co-developed-by: Pim Jeursen <pim@jeursen.nl> Signed-off-by: Pim Jeursen <pim@jeursen.nl> Signed-off-by: DjDeveloperr <hey@djdev.me>
Without them AFNC2 stays on at the commit. The 22 values are those of JJRPF/linux 64564ace30be, drivers/soc/apple/sleep-t6020.h (t6020_axi2af_tunables), compared entry by entry. Signed-off-by: DjDeveloperr <hey@djdev.me>
sep_ps_down() reads apple_sleep_sep_dev_disable() and apple_pmp_suspend_late() reads apple_sleep_dry_run(), so the SEP suspend-error and the display26 bridge harnesses no longer build. Define both, and cover the new branch: an enclave that sets DEV_DISABLE is not down on its actual state alone. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
J414c (M2 Max, T6021, 13.5 firmware) data point: this draft, with a T6021 extension of the profile on top, completes deep sleep and wake from a full Hyprland desktop. Menu and lid-close entries, keyboard and lid-open wakes, through Aura's reset path into What it took beyond this branch:
Checked and not needed on this machine, each switched off for a sleep that still woke: a Two things in the profile itself:
T6021 needs, on top of the T6020 tables: the second display's cluster word, eight memory controllers, the two extra IOAs' error enables, the third and fourth external display's power words in the south PMGR block, and five words macOS zeroes. That is a branch on this one's head ( Test tree: |
…s sleep Deep sleep parks the T6020 MCA clock muxes (clk-mux +0x7c..+0x90, whose sources are configured by the boot loader) back on the 24 MHz bypass, causing audio playback after wake to run at ~375 kHz frame rate instead of the programmed NCO rate. Save the six MCA clock mux words and the five NCO channels before the SoC clocks are parked, and restore them at the end of wake: start the NCO channels first so each changed mux can complete its switch and clear T6020_CLK_BUSY, then stop any NCO channel that was stopped before sleep. Signed-off-by: DjDeveloperr <hey@djdev.me>
Hardware verification (J414s / M2 Pro, exact-head shipping row, n=2 deep sleeps in one boot)
Results (
|
| Stage | Sleep / Wake | Timed 2.0 s audio (plughw:AppleJ414,0) |
Display & Backlight | GPU 3D & Compute (aurora G14S B1) |
Keyboard (Apple MTP keyboard) |
PCIe / Wi-Fi / BT / Faults |
|---|---|---|---|---|---|---|
| Pre-sleep | resumes 0, success=0 fail=0 |
48 kHz: 2.165 s, 44.1 kHz: 2.039 s (rc=0) |
apple-panel-bl 117/500 (bl_power=0), eDP-1 connected/enabled/On, kwin_wayland active 3024x1964 AR30 fb |
dEQP-VK.api.smoke.* 8/8 PASS; clpeak float4: 5.64 TFLOPS |
/dev/input/event3 open/ioctl + Caps Lock LED round-trip 00 -> 02 -> 00 |
lspci 5/5 devices, Wi-Fi 3/3 ping, 0 GPU/MMU/RTKit faults |
Post-wake 1 (rtcwake -s 100) |
WOKE_RC=0, resumes 0 -> 1, success=1 fail=0, 194/252 AP pins put back, halted 0x19, held/macOS-off/clusters stuck 0, RTC 1796313583 -> 1796313706 |
48 kHz: 2.142 s, 44.1 kHz: 2.033 s (rc=0) |
apple-panel-bl 117/500 (bl_power=0), eDP-1 connected/enabled/On, kwin_wayland active 3024x1964 AR30 fb |
GPU fw 27.2 back in 3565 us (pending=0); dEQP-VK.api.smoke.* 8/8 PASS; clpeak float4: 5.64 TFLOPS |
/dev/input/event3 open/ioctl + Caps Lock LED round-trip 00 -> 02 -> 00 |
pci@0,0 & pci@1,0 links/bridges restored, lspci identical, Wi-Fi 3/3 ping, 0 GPU/MMU/RTKit/MTP/SPMI faults |
Post-wake 2 (rtcwake -s 30) |
WOKE_RC=0, resumes 1 -> 2, success=2 fail=0, 194/252 AP pins put back, halted 0x19, held/macOS-off/clusters stuck 0, RTC 1796313802 -> 1796313850 |
48 kHz: 2.203 s, 44.1 kHz: 2.044 s (rc=0) |
apple-panel-bl 117/500 (bl_power=0), eDP-1 connected/enabled/On, kwin_wayland active 3024x1964 AR30 fb |
GPU fw 27.2 back in 3700 us (pending=0); dEQP-VK.api.smoke.* 8/8 PASS; clpeak float4: 5.60 TFLOPS |
/dev/input/event3 open/ioctl + Caps Lock LED round-trip 00 -> 02 -> 00 |
pci@0,0 & pci@1,0 links/bridges restored, lspci identical, Wi-Fi 3/3 ping, BT Powered: yes, 0 GPU/MMU/RTKit/MTP/SPMI faults |
Notes
- Audio playback rate stayed at 1.0x across both deep-sleep wakes (
~2.14–2.20 s@ 48 kHz and~2.03–2.04 s@ 44.1 kHz for 2.0 s of silence), confirming both theclk-apple-ncosleep fix (#4200) and T6020 MCA clock mux save/restore (#3999). - Display and keyboard checks were verified programmatically over SSH (backlight sysfs, DRM connector/DPMS state,
kwin_waylandactive3024x1964framebuffer, andApple MTP keyboardEVIOCGNAME/EVIOCGLED+ Caps Lock LED round-trip); no human physically pressed keys or visually inspected the screen.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
Main gained the T6030 sleep profile (#4067) at the same places this branch adds T6020: keep both includes and both match-table entries in sleep.c, and both compatibles in sleep-test.c's profile list. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
Merged Conflicts. The only ones were with #4067 (T6030 sleep), where both sides add a line in the same place. Checks on the merge. Each one also ran on
The CHECK_DTBS warnings are the same on both sides. The one difference is a phandle number in an existing Second generation (code read on the merge): no row owed.
Same generation, no row covers it. T6021 and T6022 (M2 Max/Ultra) share those compatibles.
Hardware. The exact-head J414s ship row in the body (M2 Pro, 16:05Z) ran on the pre-merge stack, head Merge order: #4200, then #3998, then this PR. The audio fix (commit 12) depends on #4200. |
There was a problem hiding this comment.
Verdict: MERGE at b403874
Checked: The merge keeps both T6020 and T6030 includes, match entries and KUnit entries. The T6030 implementation is byte-identical to main and none of its profile fields opt into the new T6020 behavior. All 21 feature files preserve their blobs or the same added and removed lines against their respective main parents. The T6020 physical commit still requires explicit opt-in, and the two changed bindings pass dt-doc-validate. The exact SEP host C controls and all seven Rust cases passed. The J414s two-cycle receipt covers the preceding byte-equivalent feature stack. Land #4200 and #3998 first.
Follow-ups: Please split independently mergeable driver and DT changes into separate PRs where practical for changes of this size.
sithglan
left a comment
There was a problem hiding this comment.
Verdict: MERGE at b4038743451e04f60dba2364ce681c869d90378a (in the planned order #4200 -> #3998 -> #3999 once CI finishes green)
Blockers: none
Checked:
- Verified the merge resolution
b4038743451eontomain(536a613c0abe): cleanly retains both T6030 (#4067) and T6020 indrivers/soc/apple/sleep.c(include + match table) anddrivers/soc/apple/sleep-test.c(profile list + expectations). - Reviewed all shared-driver hunks (
dcp.c,irq-apple-aic.c,macsmc.c,pm_shim.c,pmp-export.c,pmp.rs,sleep.c): every behavior change is strictly scoped behindapple,t6020-*compatibles or T6020-only profile fields (smc_settle_ms,sep_dev_disable,commit_stops_cpus), leaving all other SoCs invariant. - Checked
aurora-silicon-reviewapproval atb4038743451e,apple-build/source/readiness/pr-textgreen, and the J414s 2/2 desktop deep-sleep row.
DjDeveloperr
left a comment
There was a problem hiding this comment.
Independent review at b4038743451e: no blocking findings
I read the whole diff against current main (c43014f079f5, which now has #3998) and checked it against the hardware evidence.
Merge onto current main
merge-treeontoc43014f079f5(base536a613c0abe) is clean, tree675342246b87; everything below ran on that tree.mainhas since moved tofcd7a7423d4b(#1851:mailbox.c, a T8152 DT, G18 boot). The merge onto it is still clean and differs from the checked tree only in those three files. Six files changed on both sides (t602x-die0.dtsi,dcp.c,pmp-export.c,sleep.c,sleep.h,display26-tests.py), and the hunks don't touch each other.- What
maingained beyond the tree the J414s ran:- #3300 (DCP PMC interface) has no effect on T602x. No T602x node has
apple,pmc-interfaceor a BWR/boost bit, so the lookup returns-ENODEVanddcp_s2r_domains_off/on()take the old path. - #4162's
sleep.chunk splitssleep_apcie_port_clock()without changing what it does. - #4060 (SEP enrolment) and #3524 (T6050 DT) don't touch this path.
- #3300 (DCP PMC interface) has no effect on T602x. No T602x node has
Register layouts vs the device tree. The DCP layouts match t602x-pmgr.dtsi:
disp0SYS/FE/CPU0 at0x1b0/0x1d0/0x1d8inpmgr_east(0x290280000)dispext0at0x258/0x2c0/0x2d8anddispext1at0x248/0x2b0/0x2b8inpmgr(0x28e080000)apple,dcp-index1 and 2 selectdcp_s2r_t6020_ext[0]and[1].
The T6020_PS* defines in sleep-t6020.h match the same file.
Local checks on the merge tree (arm64, LLVM, W=1, warm tree on an x86_64 host)
| Check | Result |
|---|---|
sleep.o, pmp.o (Rust), pmp-export.o, pm_shim.o, macsmc.o, irq-apple-aic.o, dcp.o, and all of drivers/gpu/drm/apple/ (84 units, including #3300's DCP KUnit files) |
rc 0, 0 warnings |
sleep.o with sleep-test.c compiled in (-DCONFIG_APPLE_SOC_SLEEP_KUNIT_TEST=1) |
0 warnings; T6030 and T6020 both in the profile list |
dt_binding_check of apple,t6020-sleep.yaml and apple,t8140-display-power.yaml |
rc 0 each |
CHECK_DTBS=y on all 8 T602x DTBs |
rc 0, no dtc warnings. 350 schema lines, all older ones (sio, opp tables, gpu and dptx-phy compatibles); none mention the new nodes or properties |
checkpatch.pl --strict on the 13 commits |
0 errors (nits below) |
Host tests, every tools/asahi family that reads a touched file |
afk-compact 11/11, apple-wdt 10/10, backlight-coldboot 2/2, dcp- 76/76, dcpaud 22/22, dcpext26 23/23, display26 1/1, neo-stability 11/11, sep-suspend 22/22, sio-engine 1/1, t6030-pmp-supplier 2/2, t6030-sleep 2/2, t8122-apcie 1/1, t8132-sleep 1/1. t6030-pmp-dt didn't run: the build host has no fdtget. It reads only T6030 device trees, which this PR doesn't touch, and passed in CI at this head. |
Hardware: exact head. J414s boot b41e00af (7.3.0-j414s-pr3811+, receipt in #3811 (comment)):
- Heads in the build:
main35bfbf3875a7, #3998845b4ad4e079(the head that merged), this PR's headb4038743451e, #4200ae343b883fbaand #3811b8c8bb060a4b. Cmdline addsappledrm.s2r_untested=1, the default. - Sleep: full desktop, 2/2 committed deep sleeps (100 s + 30 s). Resumes 0 -> 1 -> 2, 194 of 252 AP pins put back, held, macOS-off and cluster words stuck 0.
- Display: in the full dmesg, the internal DCP goes off and comes back with a
3024x1964modeset andconnected:1after both wakes.dcpext0/1restart. - GPU: in use throughout (2814 -> 3382 jobs,
pending=0at each sleep, firmware back in about 3.2 ms). - Audio and Wi-Fi: audio clean, Wi-Fi 3/3.
- Faults: none from GPU, MMU or RTKit; no WARN or Oops.
The 38a2359dad3d row in the body has the same #3999 diff and adds dEQP smoke 8/8 and clpeak 5.6 TFLOPS before and after both wakes.
Non-blocking, for follow-ups
-
The SEP wake poll always times out. After every wake the report reads
sep 0x1000030f (-110)(J414s here, and J414c in the comments).t6020_sleep_wake()writes the SEP word back with theAUTO_ENABLEit had at the commit. UnderAUTO_ENABLEthe actual state reads 0, so the 500 ms poll with interrupts off times out on every wake: about 0.5 s of wake latency, and a-110that looks like an error. Fix: skip the poll, or accept actual 0, whenAUTO_ENABLEis set. -
The Risk text understates the defaults on firmware 27.
appledrm.s2r_untesteddefaults to 1, so on T602x firmware 27.x the new layouts are on by default:- internal-panel DPMS off now stops the DCP firmware and lowers the display domains (
dcp_dpms_power_cycles()); - USB-C
dcpextoutputs take the ext-idle path on every suspend, s2idle included.
J414s 27.2 hardware covers the power cycle: 4/4
sleep refused: firmware restarted as for DPMS: 0in a capture boot on05a4e717, plus both deep sleeps above. An s2idle cycle on J414s 27.2 would close the last gap. On 13.5 the internal DCP keepshw.s2roff, anddcpext0/1act only on a firmware suspend. - internal-panel DPMS off now stops the DCP firmware and lowers the display domains (
-
#4200 should land next. Every passing row includes it, and without it a full-desktop deep sleep on J414s stalls (body table). T6020 deep sleep stays opt-in (
apple_sleep.deep=1andapple_sleep.untested_commit=1, existing parameters, as on T8112), so merging first changes nothing by default. The step toward shipping is a follow-up that qualifies the profile (drops.untested). -
Nits.
- Commits 6 to 8 have unwrapped long lines in their messages.
apple_pmp_stop_late()checks the compatible inpmp-export.c. A flag inpmp.rs'sHW_CFG_T6020would keep that choice in match data.
|
Merged as Gates at merge:
Follow-ups are in the review above: the SEP wake poll, the Risk wording for firmware 27, #4200 next, and qualifying the profile. |
|
J414s 27.2
Follow-up #1 (T6020 SEP |
What
T6020 (M2 Pro, J414s) suspend-to-RAM: the sleep profile, the PMP's and AIC's part of it, the T6020 display coprocessor power layouts, and the device tree.
dt-bindings: soc: apple: Add the T6020 sleep controllerirqchip/apple-aic: Keep the T6020 AIC's state across a firmware sleepsoc: apple: pmp: Keep the T6020 PMP's data and stop it in suspend_latesoc: apple: sleep: Add an untested T6020 (M2 Pro) profile: offered only withapple_sleep.deep=1, and a dry run unlessapple_sleep.untested_commit=1; the J414s sequence from J414s (T6020) suspend-to-RAM: PSCI-via-EFI series vs sleep.c, which way should it land? #3336 and patatman'sref/t6020-s2r-j414sarm64: dts: apple: t6020: Add the sleep controllerdt-bindings: display: apple,t8140-display-power: add T6020drm/apple: add T6020 DCP and external DCP S2R power layouts(behindappledrm.s2r_untested)arm64: dts: apple: t602x: wire apple,display-power for DCP S2Rsoc: apple: sleep: Let the profile say when SEP and the SMC are donesoc: apple: sleep: Bring T6020's commit closer to macOS's entrysoc: apple: sleep: Set SIO's AXI2AF idle settings on T6020(values from JJRPF's public T6020 port)soc: apple: sleep: Save and restore T6020 MCA audio clock muxes across sleepmain(536a613c0abe) is merged in atb4038743451e. The only conflicts were the T6030 (#4067) and T6020 lines added side by side insleep.candsleep-test.c, and both are kept.Tested
Hardware, J414s, OS firmware 27.2 (
mBoot-20457.41.3), withrtcwake -d rtc0 -m mem([deep]) sleeps.Exact-head full-desktop row
This row ran on the pre-merge head
38a2359dad3d. The later merge atb4038743451eonly brings inmain.main35bfbf3875a7+ drm/asahi: start the M2 Pro GPU (T6020, G14S) on GPU firmware 27.2 #399851e809cf3c3d+ soc: apple: add T6020 (M2 Pro) suspend-to-RAM and DCP S2R power layouts #399938a2359dad3d+ clk: apple-nco: put the probe-time registers back for a firmware sleep #4200ae343b883fba(7.3.0-j414s-ship-38a2359d+,boot_id=b3bd8ab6-6349-4319-be17-73e095979c4d, Fedora 45graphical.target, zeromodule_blacklist,aurora,appledrm, audio, SEP, MTP keyboard all active).100 s+30 s,suspend_statssuccess2/ fail0,boot object resumes 0 -> 1 -> 2,194/252AP pins restored,halted 0x19,held/macOS-off/clusters stuck 0).timed-playback.sh, 2.0 s silence onplughw:AppleJ414,0): pre-sleep2.165 s@ 48 kHz /2.039 s@ 44.1 kHz -> post-wake 12.142 s/2.033 s-> post-wake 22.203 s/2.044 s(rc=0).apple-panel-bl117/500(bl_power=0),eDP-1connected/enabled/dpms=On,kwin_waylandactive3024x1964AR30framebuffer after both wakes.auroraG14S B1): firmware 27.2 back in3565 us/3700 us(pending=0);dEQP-VK.api.smoke.*8/8PASS andclpeaksingle-precisionfloat45.64 / 5.64 / 5.60 TFLOPS(pre / wake 1 / wake 2),0GPU/MMU/RTKit faults./dev/input/by-path/platform-2a9b30000.input-event-kbd(Apple MTP keyboard) open/ioctl + Caps Lock LED round-trip00 -> 02 -> 00after both wakes,0MTP/dockchannel errors.lspci -nnintact, Wi-Fi3/3ping after both wakes, BTPowered: yes.Prior test-kernel isolation & bring-up rows
The rows below ran on test kernels (
linux#3998+ commits 1 to 8 + the content of 9 to 12 with diagnostics, not the exact head38a2359dad3d). Each row names what was left out or added.aurora, apple_sio, apple_admac, snd_soc_macaudio, snd_soc_apple_mca, snd_soc_aop, aop, aop_als, aop_las, aop_temp, aop_devmotion, apple_isp, apple_avd, ane_t6021, macsmc_hwmon, macsmc_input, macsmc_power, leds_pwm, hci_bcm4377, sdhci_pci, thunderbolt_apple(appledrmneedsapple_sio, so it was not loaded either; SEP services masked in the first boot only)apple_sioandapple_admac(soappledrmwas loaded; SIO_CPU off at the sleep)aurora, macsmc_hwmon, macsmc_input, macsmc_power, snd_soc_macaudio, snd_soc_apple_mcaaurora, snd_soc_macaudio, snd_soc_apple_mcaaurora, snd_soc_macaudioaurora, withspeakerguardd-v2*andalsa-statemasked and no PCM openedauroraclk-apple-ncomodule)aurora, thunderbolt_apple, aop, aop_als, aop_las, aop_temp, aop_devmotion, snd_soc_aopaurora, apple_isp, apple_avd, ane_t6021aurora, macsmc_hwmon, macsmc_input, macsmc_poweraurora, masked services as above, one headphone PCM prepared or played (1 s)clk-apple-ncoCTRL_ENABLE/ loader-state restore (including #4200)CTRL_ENABLEbit 31 only; 1x loaderDIV/INCwithCTRL_ENABLEcleared did not wake)c6gt6020_dev_crumbs=0+ #4200 v2ae343b883fba):auroraonly,speakerguardd-v2*andalsa-stateunmasked, 3 consecutive sleeps in one boot (100 s,300 s,30 s)boot_id=28551004,suspend_statssuccess 3 / fail 0,resumes 0 -> 1 -> 2 -> 3, Cycle 3 wake sourceNUB.SPMI0Sw3IRQ, post-wake RTC alive, Wi-Fi 3/3 ping,lspci -nnintact)Image-mca-c6g313368850e84+ #4200 v2ae343b883fba):auroraonly,speakerguardd-v2*andalsa-stateunmasked, MCA clock mux save/restore (commit 12 content), 100 s sleep + timed 2.0 s silence playback (plughw:AppleJ414,0)boot_id=702cadff,resumes 0 -> 1,mca clkmux 0 restored85100100 -> 80100100 -> 85100100,stuck 0; pre-sleep2.348 s@ 48 kHz /2.058 s@ 44.1 kHz -> post-wake2.166 s@ 48 kHz /2.043 s@ 44.1 kHz, vs0.311 s/0.272 swithout commit 12)A wake: boot object resumes increment, 194 of 252 AP pins lost and put back, same boot id,
suspend_statsfail 0, SSH and Wi-Fi back. Not waking: the machine resets about 94 to 97 s after the sleep starts (WD2), at the last stage before the memory quiesce.Build: every commit 9 to 12 compiles on its own tree (arm64, LLVM, W=1,
sleep.o,macsmc.o,pm_shim.o, 0 warnings);checkpatch.pl --strict0 errors, 0 warnings, 0 checks on commit 12.On the merge head
b4038743451e, each check matchesmain:sleep.o(also withsleep-test.ccompiled in),dcp.o, AIC,macsmc.o,pm_shim.o,pmp.oandpmp-export.o: 0 warnings.dt_binding_checkof both yamls: clean.main.display26andsep-suspend-errors: pass.The receipt is in the comments.
Risk
Two-way. T6020 deep sleep stays behind
apple_sleep.deep=1andapple_sleep.untested_commit=1. Shared code:macsmc.candpm_shim.cread two new profile fields that only T6020 sets.dcp.clayouts stay behindappledrm.s2r_untested. By default, two DCP changes apply on every T602x on firmware 27:map_reggoes through the DART, and the external DCPs echo RTKit log counters. T6021dcpext2/3have noapple,display-powerand stay untouched.Not yet
apple,t6020-*compatibles; by default only the two DCP changes in Risk apply there. No second-generation row is owed (code read on the mergeb4038743451e): no other generation's device tree includest602x-die0/dieX. Every shared hunk (AIC, PMP, DCP,macsmc.c,pm_shim.c,sleep.c) is behind anapple,t6020-*compatible or a profile field only T6020 sets.