Skip to content

soc: apple: admit M4 Mac mini (J773g) in T8132 SEP profile and desktop apple-sleep gates - #2763

Merged
RyanTheTide merged 13 commits into
mainfrom
djdev/j773g-s2r-sep-sleep
Dec 1, 2026
Merged

RyanTheTide merged 13 commits into
mainfrom
djdev/j773g-s2r-sep-sleep

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What: Deep sleep (suspend-to-RAM) on the M4 Mac mini (J773g, T8132). The sleep driver handles a desktop whose internal display is disabled, stops every enabled APCIe port (J773g's Ethernet on port 2 as well as the radio's port 0), and the J773g device tree enables the sleep path and the enclave's domains as the J713's does.

Tested: J773g (macOS 27.2 firmware, default kernel command line, GPU driver loaded): 3/3 deep sleeps with RTC wake pass with this branch's files (bc54c7f2, with #2770 for port 2, on main dbfbced7; main between this branch's base and dbfbced7 touches none of the files here). A control without the clock-protection commit resets the Mac on its first sleep. checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks on the new commits.

Risk: two-way, M4 (T8132) only. J773g gains deep sleep. The shared sleep_display_off() change acts only where a profile names a display-0 slice and display 0 is unbound, which is T8132 alone.

Not yet: a J713 deep sleep cycle on this branch (shared T8132 path); one M1/M2 deep sleep regression row (shared sleep.c). No lid on this Mac, so only RTC wake was tested.

Details
  • apple_sleep_refuse(): when display 0 (the internal DCP) is disabled in the device tree, every available external DCP must be bound instead of refusing for display 0. A profile with no display (T6040) skips the check.
  • apple_sleep_map_apcie() maps every available apple,apcie child port, keyed by its OF PCI slot (each slot once, at most four), and sleep_apcie_port_stop_once() stops them all before APCIe is lowered, the radio's port last. Each port's down state is tracked on its own, and a PCIe host that owns its ports across sleep makes apple-sleep skip its fallback clocking on wake.
  • arm64: dts: apple: t8132-j773g: enable deep sleep and the enclave's sleep path enables the sleep controller, the cluster power gate, the SEP and its DART, gives the SEP ps_sep and ps_gpio, and states ps_sep okay and firmware-owned (the PMGR handoff policy keeps it for the J713 only). Without a domain on the SEP, every suspend is refused: sleep refused: irreversible request could not be staged (ENOENT).
  • soc: apple: sleep: release an unbound internal display's clock protection: J773g's internal DCP is disabled, but DISP0_CPU is left on with its DART's clock-protection slice armed (ADT dart-dcp, slice 42). sleep_display_off() lowered that word without releasing the slice, and the Mac reset before the sleep reached the PMU. T8132's profile now names slice 42 for display 0, and the slice of any unbound display is released. A bound display's driver still releases its own slice.
Evidence

J773g, 3 cycles, rtcwake -d /dev/rtc1 -m mem -s 15 (PMU RTC), one boot:

SUSPEND_STATS rc=0 elapsed_s=17 success=0->1 fail=0->0
PM: suspend entry (deep)
apple-sleep 380700000.sleep-controller: back from sleep, boot object resumes 0 -> 1
apple-sleep 380700000.sleep-controller: wake source: NUB.SPMI0.SW3
apple-sleep 380700000.sleep-controller: 302600000.gpu stop reported 1; physical sleep completed
apple_sep 3aa600000.sep: the enclave is back from its sleep request
PM: suspend exit
ROW cycle=1 sleep=pass tg3=pass wifi=pass sep_resume=pass sep_hwrng=pass warnings_serrors=0
... boot object resumes 1 -> 2 ... ROW cycle=2 ... pass ... warnings_serrors=0
... boot object resumes 2 -> 3 ... ROW cycle=3 ... pass ... warnings_serrors=0

Control (same tree without the clock-protection commit): the Mac reset during the first sleep, and the next boot read the PMU boot-stage byte as 0x30, not the 0x50 the sleep writes before its commit. The earlier head with only the device tree enabled failed the same way.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Read at 922c890 (draft).

  1. drivers/soc/apple/profile.rs:713: this extends a board list (apple,j713 || apple,j715 || apple,j773g), and the next T8132 Mac (J604, the iMacs) will need the same one-line edit. What the profile needs to know is whether this SEP block behaves like the Airs', which is a property of the SoC's SEP and its firmware, not of the board. The comment already says the J773g differs only in having no Touch ID sensor, which apple_sep handles. Please select the T8132 profile on apple,t8132 (or on the SEP node's compatible) and let the sensor's absence come from the tree, as it already does, with the "unread" boards covered by a row instead of a list.
  2. sleep.c, the display check: when display[0] is disabled, the new branch refuses unless at least one external display coprocessor is bound. On a mini with no external display processor enabled (no 27.2 image handed over, or a headless setup where the gate leaves them off) nothing is running that needs lowering, yet any_bound is false and every sleep is refused. Refuse only for an available display coprocessor that isn't bound, and allow the case where none is available.
  3. apple_sleep_find_radio_perst(): stopping at the first &pcie0 child with a PERST# relies on port00 being first in the tree. If the radio is meant, select the port that carries the radio (its child node or a property on it) rather than the first one found, so a reordered or differently populated tree can't pick the Ethernet port.

Rows: the J773g deep-sleep run you mention, plus one J713 deep sleep on this head (it goes through both changed paths in sleep.c).

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr
DjDeveloperr force-pushed the djdev/j773g-s2r-sep-sleep branch from 922c890 to b88b87d Compare November 22, 2026 02:27
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Addressed all three review points at b88b87d812258:

  1. drivers/soc/apple/profile.rs: dropped the T8132 board allowlist and selected &T8132 directly on apple,t8132, updating the apple_sep_profile KUnit tests (t8132_selection_matches_the_soc and t8142_sensor_boards_require_the_matching_soc).
  2. drivers/soc/apple/sleep.c (apple_sleep_refuse): when display[0] is disabled in DT, refuse only for an available external display coprocessor that is unbound — allowing headless setups where no external display coprocessor is available.
  3. drivers/soc/apple/sleep.c (apple_sleep_find_radio_perst): added apple_sleep_port_is_radio() matching the port carrying the radio (via /aliases/wifi0 parent match or a wifi/bluetooth child node) rather than relying on DT child order.

Verified scripts/checkpatch.pl --strict (0/0/0 across both commits). Live J773g 27.2 deep-sleep verification is running now (dcp63-m4prod3-full), and we will re-verify this exact head + J713 row before leaving Draft.

Assisted-by: LLM (Gemini:4 Neon)

@DjDeveloperr
DjDeveloperr force-pushed the djdev/j773g-s2r-sep-sleep branch from b88b87d to b1f547a Compare November 22, 2026 05:16
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Rebased onto integration/aurora and added b1f547a0a8955 (soc: apple: sleep: stop all enabled apcie ports before lowering apcie), which stops and asserts PERST# on every enabled APCIe port (such as J773g port 2 Ethernet alongside port 0 radio) before lowering APCIe, while preserving apple_sleep_port_is_radio() for s->radio_perst and upstream apcie_ports_unowned clock restore.

Live Verification — 3/3 Real Deep Sleep (dcp66-m4prod5-deepsleep)

Tested on live M4 Mac mini (J773g / T8132, macOS 27.2 26B123, 7.3.0-ARCH-m4prod5):

Cycle boot object resumes Wake Source apple_sep Resume /dev/hwrng Errors
1 0 -> 1 NUB.SPMI0.SW3 5395 us 16B OK 0
2 1 -> 2 NUB.SPMI0.SW3 5408 us 16B OK 0
3 2 -> 3 NUB.SPMI0.SW3 5408 us 16B OK 0

0 oops/warnings/SErrors across all 3 wakes.

Assisted-by: LLM (Gemini:4 Neon)

Select the T8132 SEP profile on apple,t8132 rather than maintaining a
per-board allowlist (apple,j713 || apple,j715). Every T8132 Mac shares the
same SEP block and firmware, and boards without a Touch ID sensor such as
J773g (M4 Mac mini) already omit the sensor node in DT so apple_sep binds
the SEP for key store, hwrng, and suspend-to-RAM without trying to probe a
missing sensor.

Update the apple_sep_profile KUnit tests accordingly.

Signed-off-by: Diljit Singh <[email protected]>
On desktop T8132 boards such as J773g on macOS 27.2, display[0] (&dcp) is
disabled in DT while display[1] (&dcpext0) is enabled and bound by
appledrm with s2r_ext support (or headless with no external display
coprocessor enabled). Requiring s->display[0].bound unconditionally in
apple_sleep_refuse() refused deep sleep even when every available display
coprocessor was bound.

Keep the exact display[0].bound check whenever display[0] is available (or
absent from DT); when display[0] is disabled in DT, refuse only when an
available external display coprocessor is unbound, allowing headless setups
where none is available.

In apple_sleep_find_radio_perst(), explicitly match the PCIe root port that
carries the wireless radio (via the /aliases/wifi0 parent or a wifi /
bluetooth child node) instead of taking whichever port appears last or
first, so enabling port02 (Ethernet/SD) cannot overwrite the radio PERST#.

Signed-off-by: Diljit Singh <[email protected]>
Multi-port T8132 hosts such as J773g enable both port0 (radio) and
port2 (Ethernet) under the shared apcie controller. Previously
apple_sleep_map_apcie() only mapped port0/phy0 and
apple_sleep_find_radio_perst() stopped after the first child port's
PERST# GPIO, leaving port2 running when apcie_gp and apcie_phy_sw are
lowered during deep sleep.

Map portN/phyN and AP reset-gpios for every available child port of
apple,apcie (falling back to port0/phy0 when the host is disabled) and
stop all mapped ports in sleep_apcie_port_stop_once(), while keeping
the PIO-DMA engine teardown on port 0 and preserving radio_perst for
T8142.

Signed-off-by: Diljit Singh <[email protected]>
…ership

When pcie-apple manages T8132 APCIe ports across real sleep directly
(without the single-port apple,managed-sids radio contract), two issues
arise in apple-sleep:

1. t8132_wake() re-clocks all ports under apcie_ports_unowned right
   before pcie-apple's noirq resume drops and re-requests REFCLK0/1.
2. apcie_port_down is a single boolean across all ports, so if one port
   recovers on wake and another fails to retrain, the next suspend
   either skips the working port or tries to stop the failed one.

Add apple_sleep_apcie_ports_owned() (kept out of struct apple_sleep so
probe order does not matter) so apple-sleep skips its fallback
unowned-port clocking when the PCIe host owns recovery, and track each
port's down state individually with apple_sleep_apcie_port_up(idx)
(while keeping apple_sleep_radio_port_up() clearing all ports for the
existing single-port managed-radio callers).

Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr
DjDeveloperr force-pushed the djdev/j773g-s2r-sep-sleep branch from b1f547a to 2dfb6d6 Compare November 22, 2026 09:52
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

@RyanTheTide Rebased onto integration/aurora (32bf9dd3569d2) and force-pushed v2 (2dfb6d6301ff2):

  1. Per-port APCIe state tracking & host ownership (2dfb6d6301ff2): Added apple_sleep_apcie_ports_owned(bool) and apple_sleep_apcie_port_up(unsigned int idx) (tracking APCIe port down state per port instead of a single boolean, and letting pcie-apple claim ownership so apple-sleep skips its unowned-port fallback REFCLK setup while preserving apple_sleep_radio_port_up() for existing single-port managed-radio callers). This directly resolves the #2770 review items on per-port restore tracking and sleep.c REFCLK overlap.
  2. Checks: scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES is 0/0/0 across all 4 commits (1aaed3b404f31, 879bc89f05289, 1d66cf2881b78, 2dfb6d6301ff2).
  3. Live hardware verification (dcp72-m4prod11-wave5-v7tc-s2r, M4 Mac mini J773g / T8132, 7.3.0-ARCH-m4prod11):
    • 2/2 consecutive real deep sleeps (rtcwake -d /dev/rtc1 -m mem -s 15): success=2 fail=0, boot object resumes 0 -> 1 -> 2, 302600000.gpu stop reported 1; physical sleep completed, wake source NUB.SPMI0.SW3, zero SErrors/BUGs/WARNs.
    • apple_sep /dev/hwrng returned live 16-byte random reads on both wakes; tg3 0000:02:00.0 end0: Link is up at 1000 Mbps, full duplex on both wakes; apple-pmc floors/rails/DCS restored cleanly.

Assisted-by: LLM (Gemini:4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Nothing equivalent is on integration/aurora: the T8132 SEP profile on the tip is still limited to the J713/J715 boards and apple-sleep still maps only port 0, and the four commits apply cleanly on daa9e2d. The earlier review points (board list, headless case, radio port selection) are addressed at 2dfb6d6, and the J773g rows are posted. What is still open is the M4 Air row asked for in the first review: one J713 deep-sleep cycle on this head, since it goes through both changed paths in sleep.c. The title and description still describe the first version; updating them to the four commits would help, as #2770 now depends on the two new apple_sleep_apcie_* helpers.

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026
satchlj
satchlj previously approved these changes Nov 25, 2026

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gemini 4 Neon on @satchlj's behalf

Verdict at 2dfb6d6301ff

Approve. Selecting the T8132 SEP profile by SoC compatible, allowing disabled display[0] in apple_sleep_refuse(), mapping/stopping all enabled APCIe ports, and adding per-port state tracking + host ownership helpers are all sound and clean.

Blockers

None.

Checked

  • 3 changed files (drivers/soc/apple/profile.rs, drivers/soc/apple/sleep.c, include/linux/soc/apple/sleep.h) across all 4 commits audited in full against sleep.c context.
  • SEP profile selection: profile.rs selects &T8132 directly on apple,t8132 and updates apple_sep_profile KUnit tests cleanly (rust-build and kunit CI green).
  • Display & multi-port APCIe sleep handling: apple_sleep_refuse() preserves exact display[0].bound refusal when display[0] is available/absent and only refuses unbound available display[1..ndisp] when display[0] is disabled in DT (permitting headless configs). apple_sleep_map_apcie() bounds mapped ports by APCIE_SLEEP_PORTS_MAX (4), balances of_node_put(child) on break, and calls iounmap() on raw of_iomap() pointers returned by apple_sleep_apcie_block() (no devres mismatch). apple_sleep_port_is_radio() balances all of_node_put() calls. apple_sleep_apcie_ports_owned() and apple_sleep_apcie_port_up(idx) have matching EXPORT_SYMBOL_GPL exports and !CONFIG_APPLE_SLEEP stubs while preserving apple_sleep_radio_port_up().
  • CI & trailers: All 7/7 CI checks (host-tests, source, rust-build, kunit, DWC3/ATC x3) SUCCESS, MERGEABLE; all 4 commits carry clean Signed-off-by: and zero AI trailers; exact-head 2dfb6d6301ff J773g 2/2 real deep-sleep row is posted.
  • Non-blocking note: Updating the PR title/description to reflect all 4 commits (including the apple_sleep_apcie_* helpers) and posting the requested J713 M4 Air deep-sleep row remain good follow-ups before merge.
  • Untested scope: Static code audit only (userspace-only review environment; no kernel build or boot performed here).
Evidence
  • Checked drivers/soc/apple/sleep.c (apple_sleep_apcie_block, apple_sleep_map_apcie, apple_sleep_port_is_radio, apple_sleep_refuse, apple_sleep_apcie_ports_owned, apple_sleep_apcie_port_up), include/linux/soc/apple/sleep.h, and drivers/soc/apple/profile.rs at 2dfb6d6301ff.
  • CI at head 2dfb6d6301ff: 7/7 checks SUCCESS.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Merge readiness at 5aa303c4: not ready yet

Check Detail
CI at head running running: apple-build, dt-checks, host-tests, kunit, source, pr-text / pr-text
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 5aa303c4, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · M4 (T8132) only. J773g gains deep sleep. The shared sleepdisplayoff() change acts only where a profile names a display-0 slice and display 0 is unbound, which is T8132 alone.

Areas: area:bringup, area:platform

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) merge-conflict Conflicts with the base branch (bot) and removed needs-review No approving review from Core or Omarchy Mac yet (bot) ready-to-merge Meets the merge policy: merge it (bot) labels Nov 25, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

I merged current main into this branch (771305b9, normal push, no rebase, your commits unchanged). The last CI failures came from main itself on 11-29: the apple-scaler-recovery and g17-compute-owed-stamp fixtures, plus the apple-dcp harness break fixed in #3672. Re-running a job would reuse the old merge commit, so a fresh merge was the only way to clear them. Both merges were conflict-free. Host tests pass on the merged tree. The PR's own code is unchanged from 3c44f030, so the existing hardware rows still cover it. Next: CI at this head and the review app's verdict.

@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Nov 30, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at 771305b9.

Checked: Compared the PR patch before and after the forward merge. The file set and added and removed lines match the reviewed revision. Keep hosted checks, J773g deep sleep, a J713 cycle and the M1/M2 regression row.

…leep path

The J773g device tree leaves the sleep controller, the P-cluster power
gate and the SEP disabled, so the Mac mini only offers s2idle. Enabling
the sleep controller alone is not enough: with no power domain on the
SEP node the enclave's sleep request cannot be staged
(sep_pm_commit_prepare() reads the first power-domains phandle), and
every suspend is refused with -ENOENT.

Wire the board as the J713 is: enable the sleep controller, the cluster
power gate, the SEP and its DART, give the SEP the ps_sep and ps_gpio
domains, and state ps_sep okay and firmware-owned here, since the PMGR
handoff policy keeps that domain for the J713 only.

Signed-off-by: DjDeveloperr <[email protected]>
…tion

On desktop T8132 boards (J773g) the internal DCP, display[0], is
disabled in the device tree, so no driver binds it, but the loader
leaves DISP0_CPU powered with its DART's clock-protection slice armed
(ADT dart-dcp, slice 42). sleep_display_off() lowers display[0]'s words
whether it is bound or not, yet only released the slice of an unbound
external display. Lowering DISP0_CPU with the slice armed faults, and
the Mac resets before the sleep reaches the PMU (its boot-stage byte
still reads 0x30 after the reset, not the sleep's 0x50).

Release the slice of every unbound display the profile names, and name
T8132's display[0] slice. A bound display's driver still releases its
own slice, so the J713 and other boards are unchanged.

Signed-off-by: DjDeveloperr <[email protected]>
@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed needs-template PR body lacks Tested or Risk (bot) labels Nov 30, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at bc54c7f2

Blockers:

  • Queued hosted CI at bc54c7f2 (2P/0F/28Q): Wait for apple-build, dt-checks, host-tests, and KUnit suites to complete green at bc54c7f2.
  • Shared T8132 (J713) deep sleep confirmation & #2770 landing order (noted in PR body Not yet:): Please post a J713 deep-sleep check confirming bound display[0] is unaffected by bc54c7f2 (note the J473 M2 s2idle regression check already passed on sleep.c at 3c44f030), and confirm whether #2770 (APCIe port 2 shared regs, which was included in the J773g 3/3 deep-sleep test) must land ahead of this PR.

Checked:

  • Audited commits 85e65a54 (t8132-j773g deep sleep + enclave DTS) and bc54c7f2 (soc: apple: sleep: release an unbound internal display's clock protection, +9/-4 in drivers/soc/apple/sleep.c):
    • Cleanly extends unbound display clock-protection slice release in sleep_display_off() to i == 0 when !s->display[0].bound and soc->disp_prot_slice[0] is non-zero, and records T8132's dart-dcp slice 42 in t8132_sleep_soc.disp_prot_slice[0]. Bound displays (J713) and other SoCs (disp_prot_slice[0] == 0) are untouched.
    • Verified J773g (27.2, default cmdline, GPU loaded) 3/3 deep sleeps with RTC wake PASS (vs reset on first sleep without bc54c7f2).
Evidence
  • Head commit: bc54c7f2052683a953245dfcf7aca348e17146e3 (MERGEABLE into main).
  • CI snapshot: 2P/0F/28Q.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

FAIL — J773g deep-sleep row, 0 of 3 required resumes verified.

I tested #2763 head 771305b97f986b4f130852f7eca5eab5e2d596bf with the six #2770 port-2 DT and PCIe prerequisites through 2995b2b3. The lab kernel was 4fd7651f82814ab11cf4bae8041ebd22ebf07e13 (7.3.0-ARCH-m4k2763-4fd7651f). Port-0 BCM4388 and port-2 tg3 were up before each attempt. The PMU RTC alarm on /dev/rtc1 fired while the system was awake on each boot.

  1. Unmodified DTB from the stacked kernel. The J773g sleep-controller node was disabled. /sys/power/mem_sleep exposed only [s2idle], so no deep sleep started.
  2. Historical J773g DT opt-in. Enabled the sleep controller, CPU cluster power gate, SEP and its DART, and enabled ps_sep with apple,firmware-owned. Linux exposed deep, but the first rtcwake -m mem aborted before physical sleep. The first error in the suspend window was apple_sep 3aa600000.sep: sleep refused: irreversible request could not be staged (ENOENT). Suspend counters were success 0→0, fail 0→1. A 32-byte read from the SEP hwrng succeeded after the abort.
  3. Historical SEP power-domain references added. Added power-domains on the SEP node with ps_sep first and ps_gpio second, matching the m4prod25d DTB. The current SEP suspend path reads the first reference to stage its sleep request. The kernel Image, modules and initramfs were identical across all attempts. SSH timed out during the first rtcwake -m mem. The persistent kernel journal ends at [50.376032] PM: suspend entry (deep), with no recorded suspend exit, wake, or panic. Stage 1 was present when recovery began. This is a suspend/resume failure. The evidence leaves the underlying cause unresolved.

Post-wake tg3 link, SEP resume and SEP hwrng checks could not be verified after a physical wake. No WARN splat or SError appears in the captured candidate logs. Stock 7.3.0-ARCH-m4mainefed1ae3 was verified after every attempt, with the saved Arch default, no pending one-shot, zero failed units and both SLC planes active.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J773g deep sleep at bc54c7f2: 3/3 pass (RTC wake, 15 s, one boot, default command line with the GPU driver loaded), with #2770 for port 2 on main dbfbced7. Main between this branch's base and dbfbced7 touches none of this PR's files. Each cycle: boot object resumes 0 -> 1 -> 2 -> 3, wake source NUB.SPMI0.SW3, the enclave back from its sleep request, 302600000.gpu stop reported 1; physical sleep completed (cycle 1), and Ethernet (port 2), Wi-Fi (port 0) and the SEP hwrng working after every wake, with no warnings.

Two new commits fix why the earlier head failed on this Mac:

  • 85e65a54 (DT): J773g never enabled the sleep controller, the cluster power gate or the SEP, so only s2idle was offered. With them enabled but no domain on the SEP, every suspend was refused with irreversible request could not be staged (ENOENT). The SEP now gets ps_sep and ps_gpio, as on the J713.
  • bc54c7f2 (sleep.c): J773g's internal DCP is disabled, but DISP0_CPU is left on with its DART's clock-protection slice armed (ADT dart-dcp, slice 42). sleep_display_off() lowered that word without releasing the slice, so the Mac reset before the sleep reached the PMU: after the reset the boot-stage byte read 0x30, not the sleep's 0x50. A control run without this commit reset the same way on its first sleep, with the GPU driver loaded. On other SoCs and on boards whose display 0 is bound, nothing changes.

Still owed: a J713 cycle and one M1/M2 deep sleep regression row on this head.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at bc54c7f20526

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: - Audited commits 85e65a54 (t8132-j773g deep sleep + enclave DTS) and bc54c7f2 (soc: apple: sleep: release an unbound internal display's clock protection, +9/-4 in drivers/soc/apple/sleep.c):

  • Cleanly extends unbound display clock-protection slice release in sleep_display_off() to i == 0 when !s->display[0].bound and soc->disp_prot_slice[0] is non-zero, and records T8132's dart-dcp slice 42 in t8132_sleep_soc.disp_prot_slice[0]. Bound displays (J713) and other SoCs (disp_prot_slice[0] == 0) are untouched.
  • Verified J773g (27.2, default cmdline, GPU loaded) 3/3 deep sleeps with RTC wake PASS (vs reset on first sleep without bc54c7f2).

Follow-ups (not blocking): queued CI; J713 deep-sleep check, confirm #2770 landing order

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Dec 1, 2026
t8132-j773g.dts: main added the video encoder nodes (ps_venc_*, dart_ave*,
ave) and this branch adds the deep sleep nodes (sleep, cluster_pwrgate,
sep_dart, ps_sep, sep) at the same place; both sets are kept.
sleep.h: main added the apple_sleep_radio_port_ready() stub and this
branch adds the apple_sleep_apcie_ports_owned()/apple_sleep_apcie_port_up()
stubs; all are kept.
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merged main in at 5aa303c40b10 (no change to this PR's own code). Conflicts in t8132-j773g.dts (main's video encoder nodes vs this PR's deep sleep nodes) and sleep.h (main's apple_sleep_radio_port_ready() stub vs this PR's apcie stubs); both sides kept in each. Built drivers/soc/apple and the t8132-j773g/j713 DTBs locally with the Apple config: no new warnings. The earlier row still covers this PR's files.

@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Dec 1, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at 5aa303c40b10 (B2 merge train, 12-01 merge bar). Approval at this head: aurora-silicon-review[bot] at bc54c7f (this head only merges main in: maintainer merge-up). Row: the hardware row at bc54c7f (same PR files; this head only merges main in). CI: linux train L5 = main + #3218 #3488 #2763 #3419 #3647 #2213 #2432 #3392: Apple driver compile pass, Apple DTBs W=1 pass, planned KUnit clpc/dcp-fabric/dcp-topology/dcp-display/macsmc/jpeg/asahi/sep pass, host tests apple-dcp + g14-v27-2 (25/25) pass. Hosted CI is queued behind the backlog. Revert: git revert -m 1 <merge commit>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) blast:m4 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants