Repository navigation
soc: apple: sleep: wire SLP_DDR vote word on T8122 - #3967
Conversation
T8122 maps the PMGR wake block in t8122_sleep_map_regs() but never bound sleep_slp_ddr_word or enabled coproc_slp_ddr, so WAKE_SLP_DDR votes from a live adopted coprocessor with DRAM buffers (the retained MTP on macOS 27.2 firmware, where rtkit-helper votes SLP_DDR) and from the always-on USB host were silently dropped. Bind word 0 of the wake block at the end of t8122_sleep_map_regs(), set .coproc_slp_ddr = true on t8122_sleep_soc (matching T8112), and update the profile check in apple_sleep_test_slp_ddr_voters(). Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
satchlj
left a comment
There was a problem hiding this comment.
Reviewed fd6beaafbf59 against drivers/soc/apple/sleep-t8122.h, sleep-t8112.h, and sleep.c:
t8122_sleep_map_regs()mapss->wakevia theregs[]offset table (failing out on error) before callingsleep_slp_ddr_bind(s)at the end afterapple_sleep_alloc_books(s), sosleep_slp_ddr_wordis never bound on an early probe failure..coproc_slp_ddr = trueont8122_sleep_socand the updatedapple_sleep_test_slp_ddr_voters()check match the merged T8112 wiring from #3774, with zero impact on boards without a retained live DRAM coprocessor session.- DCO,
## Risk, KUnit (16/16), and exact-head J615 27.2 hardware row (3/3 s2idle, deep dry run, and guarded commit showingWAKE_SLP_DDRbehavior change) look clean. Good to merge once CI completes.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Local CI receipt for head Tree:
Everything is clean, so I'm merging at |
Problem
t8122_sleep_map_regs()maps the PMGR"wake"register block (0x2e4004000) but never callssleep_slp_ddr_bind(s), andt8122_sleep_socdoes not set.coproc_slp_ddr = true. As a result,WAKE_SLP_DDR(word 0 bit 0) votes fromdwc3and from an adopted live coprocessor retaining DRAM carve-out buffers (such as the retained MTP session on macOS 27.2 firmware, wherertkit-helpervotesapple_sleep_coproc_slp_ddr(true)after #3774) are silently dropped on T8122.Change
Mirror the T8112 wiring from #3774 for T8122:
sleep_slp_ddr_bind(s)at the end oft8122_sleep_map_regs()indrivers/soc/apple/sleep-t8122.h..coproc_slp_ddr = trueont8122_sleep_soc.apple_sleep_test_slp_ddr_voters()indrivers/soc/apple/sleep-test.cto expectcoproc_slp_ddron bothapple,t8112-sleepandapple,t8122-sleep.Boards without an adopted live DRAM coprocessor session (such as 25G83 boots where MTP is quiesced) remain unaffected and leave bit 0 clear for DRAM-off deep sleep.
Testing
0 errors, 0 warningsonfd6beaafbf59.apple-sleep-soc-data): 16/16 PASSED inqemu-system-aarch64(includingapple_sleep_test_slp_ddr_voters).fd6beaafbf59+ J615 (Apple MacBook Air 15" M3, T8122, macOS 27.2 firmware) + default cmdline (7.3.0-m3uportl1, one-shot non-default BLS entry, Stage 2 unchanged, silent) + PASS:/sys/power/mem_sleep = [s2idle],rtkit-helper 2fa400000.mtp: adopted the running RTKit session (4 retained buffers),apple_pmpstarted (c6ccb960),aurora-g16bound with thermal-zone cooling S1->S8 (Apple M3 (G15G C0)Vulkan OK), Wi-Fi OK, eDP connected,Enforcing, 0 Oops/WARN/fault, 0 AVC.s2idle: 3/3 PASS (rtcwake -d rtc0 -m freeze -s 15,suspend_stats/success=3, fail=0).apple_sleep.deep=1in non-default trial entry only, GPU +31ac00000.dcpunbound):dry run: every check passed; refusing before the first stop and the commit.untested_commit=Y,rtcwake -d rtc0 -m mem -s 20): did not trigger the prior ~60 s PMGR recovery reset (stayed dark past +180 s until VDM recovery), confirmingWAKE_SLP_DDRbehavior changed while full J615 27.2 wake still needs follow-up fixes (stray domains + PMP 27.2 SRAM/commit stop).Risk
Low. Scoped strictly to T8122 (
sleep-t8122.hand the T8122 expectation insleep-test.c), matching the merged T8112 path from #3774. Default behavior on J615 remainss2idle(apple,sleep-testedabsent).Still to run
t8122_ps_all[]ANE +t8122_stray[]) and T8122 27.2 PMP SRAM/commit stop.