Repository navigation
J813: T8142 S2R on #2043: PMU post-timer, DCP 27.2, test changes (the commit still resets) - #3
Merged
m0d16l14n1 merged 8 commits intoNov 16, 2026
Conversation
…ops, wake restarts) Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
27.2 moved the unnamed A500 (the AP link's release, which only a firmware sleep sends) to A550, with the IOMFB calls around it: t8142dcp 26B123 compares 'A550' and 'A550' | 1 at 0x1df68c in the dispatch whose 26A428 copy at 0x1de0dc compares 'A500' and 'A501'. Without the entry dcp_s2r_capable() is false on 27.2 and the DCP never stops for a sleep. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…e return; T8142 perf_down off PMU notes 0x67 (the commit write is next) and 0x70 (back in apple_sleep_return). t8142_perf_down() only with apple_sleep.t8142_perf=1: macOS's AP never reads or writes PMGR reg[2] + 0x24000 / +0x25000 during a sleep (J813 27.2 traces, boot to wake). Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
… macOS sends it macOS 27.2 on the J813 sends the PMU four commands 0.11 to 0.25 ms after the S2R timer (traced under aura's virtualized SPTM, run g01): RTC_CTL read (0x41), the 4-byte compare at 0x2008, 0x200e <- 0, RTC_CTL <- 0x41 -- T6050's post-timer step at the same addresses. The T8142 ops had no post_timer: the timer started (PMU note 0x67) and WD2 reset the SoC. TEST: the compare is now + apple_sleep.t8142_wake_s (default 30), which doubles as a wake source. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
t6050_sleep_pmu_xfer_post() takes the opcode with the byte count in its low bits, as t6050_sleep_pmu_xfer() builds it (macOS sends 0x33 for the 4-byte compare). The post-timer step passed the bare opcode, so the alarm read before the commit failed and nothing was sent after the timer (J813: PMU note detail 0xc3, -ENODATA). Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…efore the last WFI; note a WFI that keeps returning Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I tested aurora-silicon#2043 on a J813 (macOS 27.2 stub, Linux at EL2). Two results so far:
Commits, on aurora-silicon#2043 (99e4997).
TEST ONLYmarks what is for bring-up only:TEST ONLY drm/asahi: t8142: J813:
sleep_restart. The GPU refused every deep sleep ("no firmware restart on this chip"): T8142 hassleep_restart: false, and the commit-time GPU stop is only selected for T6050 (apple_sleep_v27_late()). This makes the J813 behave like T8140: the commit stops the firmware and a real wake restarts it warm. It has not been through a real wake yet.drm/apple: iomfb: firmware 27.2: the AP link's release is A550. Without it the DCP never stops on 27.2. Also sent as drm/apple: iomfb: firmware 27.2: the AP link's release is A550 aurora-silicon/linux#2063.
soc: apple: sleep: T8142: the PMU's RTC alarm after the S2R timer, as macOS sends it, plus the fix that puts the byte count into the opcode. macOS 27.2 on the J813 sends these 0.11–0.25 ms after the timer, from the boot core:
That's T6050's post-timer step at the same addresses (
apple,pmu-alarm-rearm0x43 0x41). The T8142 ops had nopost_timer. The test parameterapple_sleep.t8142_wake_s(default 30) sets the compare to now + 30 s, so the alarm also serves as a wake source. The J813 has no RTC device under Linux, so nothing else can wake it by timer.TEST ONLY PMU notes:
apple_sleep_return();TEST ONLY
t8142_perf, off by default:t8142_perf_down()writes pmgr reg[2] + 0x24000 / + 0x25000. macOS's AP never reads or writes those words in a sleep: the whole traced run, boot to wake, has none.TEST ONLY: each core turns off its EL2/EL02 timers and the PMU FIQ modes before its last WFI.
Also needed, not in this branch
CONFIG_KEXEC: the parking spin table'scpu_disableneedsKEXEC_CORE. Without it:Error taking CPU9 down: -95.pcie-shared. Without them: "no PCIe tunables for ANS" and "the radio's port can't be trained".apple_sleep.deep=1 nvme_apple.sleep_untested=1 appledrm.s2r_untested=1.dcp didn't stop: control 0x10 status 0xcc.What the commits do (PMU notes after each reset)
smp_s2r_return_to_os()stayed empty, so the SoC never goes down. No attempt woke and failed to resume.Open: the SEP
0x1000270f: DEV_DISABLE set, actual 0. Under Linux it reads0x1f0020ff.0x20c0800). The answer0x10800comes 22 ms later.sepfw-booted 1. On the J815 the attach works (the T8142 SEP profile commit).Measured wake (aurora-silicon#2043 says "macOS's wake is not traced")
Boot core, ms from the reset:
t8142_wake()doesn't have;Traces: https://tg.st/u/j813-s2r-traces-20261116.tar.xz. They contain all ten cores' entry and the go-mode sleep and wake; README inside. The stop-mode run with the SEP mailbox hooked (s05) is not in this bundle. The branch builds as arm64 with LLVM, no new warnings.