Skip to content

J813 S2R: SEP setup, PMP shutdown and GPIO IRQ recovery - #4

Merged
m0d16l14n1 merged 5 commits into
m0d16l14n1:j815/t8142-s2rfrom
sithglan:thomas/j813-s2r-sep-followup
Nov 16, 2026
Merged

m0d16l14n1 merged 5 commits into
m0d16l14n1:j815/t8142-s2rfrom
sithglan:thomas/j813-s2r-sep-followup

Conversation

@sithglan

@sithglan sithglan commented Nov 16, 2026 •

Copy link
Copy Markdown

J813 completes a first real deep-sleep/wake on the experimental test stack after powering off PMP and correcting GPIO interrupt handling. PMP previously stayed powered at the final commit; a headphone GPIO interrupt storm could then hold CPU0 in IRQ dispatch during resume.

This PR was merged at commit 2f16ec945349 on 2026-11-16 at 10:57:59 UTC. Its changes are SEP setup/high DMA-window registration, PMP shutdown, GPIO mask-and-ack, and explicitly test-only SEP/AON measurements and audio power policy.

Hardware validation of the clean GPIO fix at 10:48:23 UTC returned success with an unchanged boot ID, all ten CPUs online and a successful CPU0 task. Codec resume took 27 ms and AOP 3 ms with normal audio and parallel device resume.

The tests required the combined J813 test stack, including external-DCP support and manual shutdown of inactive SIO. This merged PR alone was not shown to resume. Wi-Fi/Bluetooth abort and repeated sleep remained unresolved at merge time.

Subsequent external-DCP retention work is on the experimental kernel branch and will be submitted as a separate follow-up. Those later commits are not part of this merged PR.

Describe the J813 SEP, mailbox and power domains, publish its alias for
aura's firmware/manifests handoff, and admit J813 to the T8142 profile.
Leave sep_dart disabled until the SEP module enables it.

Describe the ADT's SID0 DMA aperture directly with no DART offset. The
profile fallback gives the DMA API a low address and adds BIT(40) only
to the page-table mapping; the SEP consumed that registration without
replying. The explicit high window matches the existing J813 Touch ID
work (7003518) and the macOS s05 registration trace.

On J813, fresh attach with xart_writes=0 provision_keybag=0 trusted_keys=0
filevault_api=0 changes from zero replies at IOVA 0xfffc0000 to all 12
endpoints ready at IOVA 0x100fff80000. The key store opens and hwrng
registers. The sleep dry run passes with eight coprocessors; a real
commit still resets with no aura wake marker. This is sleep bring-up,
not Touch ID or suspend/resume qualification.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…commit

Record the SEP power word in PMU 0x8310..13 and the seven forced-on AON
actual-state nibbles in 0x8314..17. The writes precede the complex power
words and their 33 ms deadline.

On J813 the SEP reads 0x1000270f, matching macOS's gated state, while
all seven AON words read actual state 4. The real commit still resets
with PMU note 0x68 and no aura wake marker.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Do not apply T8132's forced state-4 audio list on T8142. All seven
J813 domains are no_ps in the ADT; the captured macOS AP never accesses
them across sleep/wake, and the stopped snapshot has them at state 0.
Keep the test telemetry reading the same words independently of the
match list so this experiment can be compared with the previous run.

Hardware A/B on J813: SEP reaches 0x1000270f in both runs. The seven
AON actual-state nibbles change from 0x04444444 to 0x0f00f004 (low
nibble first: 4,0,0,f,0,0,f). Both real commits reset at PMU note 0x68
with no aura wake marker. This removes an unsupported inherited write
sequence, but neither fixes deep sleep nor reproduces macOS's all-off
audio state. The audio shutdown still needs investigation.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The PMP firmware was idled and its RUN bit cleared, but its always-on
power domain stayed at target f. macOS lowers the AP-owned PMP domain
after the final idle and SRAM backup. PMS_SRAM then gates automatically
while retaining target f. Do the same before the final memory and CPU
sequence.

On the combined J813 test stack this permits a real physical sleep and
return, with the boot ID preserved and /sys/power/state returning 0.
Device recovery and the other local preparation changes are still under
investigation.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan sithglan changed the title J813 S2R: working SEP attach and AON diagnostics (sleep still resets) J813 S2R: attach SEP and power off PMP for deep sleep Nov 16, 2026
After a J813 deep-sleep wake, headphone GPIO 100 can be in level-low
interrupt mode while its Linux IRQ is disabled and marked masked.
The generic mask_ack_irq() fallback skips irq_mask() in that state,
leaving the asserted input to repeatedly trigger AP GPIO parent IRQ 347.
CPU0 can stay in IRQ dispatch and starve I2C completions and resume
timers.

Provide irq_mask_ack so the pin is always masked in hardware before
acknowledging it. A clean-module hardware repeat completed parallel
device resume, with CS42L84 and AOP resume succeeding, without the
diagnostic interrupt or polling used to investigate the stall.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
@sithglan sithglan changed the title J813 S2R: attach SEP and power off PMP for deep sleep J813 S2R: SEP setup, PMP shutdown and GPIO IRQ recovery Nov 16, 2026
@m0d16l14n1
m0d16l14n1 marked this pull request as ready for review November 16, 2026 10:57
@m0d16l14n1
m0d16l14n1 merged commit e95ff7b into m0d16l14n1:j815/t8142-s2r Nov 16, 2026
@sithglan sithglan changed the title J813 S2R: SEP setup, PMP shutdown and GPIO IRQ recovery J813 S2R: SEP, PMP, GPIO and external DCP recovery Nov 16, 2026
@sithglan sithglan changed the title J813 S2R: SEP, PMP, GPIO and external DCP recovery J813 S2R: SEP setup, PMP shutdown and GPIO IRQ recovery Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants