From fd6beaafbf59497b87d126544b5121c2ccf59142 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Thu, 3 Dec 2026 01:04:21 +1100 Subject: [PATCH] soc: apple: sleep: wire SLP_DDR vote word on T8122 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 --- drivers/soc/apple/sleep-t8122.h | 3 +++ drivers/soc/apple/sleep-test.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/soc/apple/sleep-t8122.h b/drivers/soc/apple/sleep-t8122.h index ad2d2661cf47d..7fa6df468f26e 100644 --- a/drivers/soc/apple/sleep-t8122.h +++ b/drivers/soc/apple/sleep-t8122.h @@ -760,6 +760,8 @@ static int t8122_sleep_map_regs(struct apple_sleep *s) if (apple_sleep_alloc_books(s)) return -ENOMEM; + sleep_slp_ddr_bind(s); + return 0; } @@ -1417,6 +1419,7 @@ static const struct apple_sleep_soc t8122_sleep_soc = { .no_pmu_notes = true, .display_no_restart = true, .early_context = true, + .coproc_slp_ddr = true, .stray = t8122_stray, .nstray = ARRAY_SIZE(t8122_stray), .wake_mask = 0x08, diff --git a/drivers/soc/apple/sleep-test.c b/drivers/soc/apple/sleep-test.c index 3774fa26749da..89bcc80ca68ae 100644 --- a/drivers/soc/apple/sleep-test.c +++ b/drivers/soc/apple/sleep-test.c @@ -713,10 +713,11 @@ static void apple_sleep_test_slp_ddr_voters(struct kunit *test) apple_sleep_usb_slp_ddr(true); KUNIT_EXPECT_EQ(test, st->fake_wake, 0xdead0000U); - /* Only T8112 enables coprocessor SLP_DDR votes among matched profiles. */ + /* Only T8112 and T8122 enable coprocessor SLP_DDR votes among matched profiles. */ for (const struct of_device_id *id = apple_sleep_of_match; id->compatible[0]; id++) { const struct apple_sleep_soc *soc = id->data; - bool want = !strcmp(id->compatible, "apple,t8112-sleep"); + bool want = !strcmp(id->compatible, "apple,t8112-sleep") || + !strcmp(id->compatible, "apple,t8122-sleep"); KUNIT_EXPECT_EQ_MSG(test, soc->coproc_slp_ddr, want, "%s", id->compatible); }