Repository navigation
Conversation
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
Like J813, J704 (MacBook Pro 14-inch, M5) needs the SMC sleep notice deferred until after SEP and peer coprocessors stop, using the saved IRQ-independent RTKit transport. Without this, SMC raises SMC.OutboxNotEmpty right at commit and immediately wakes the machine from deep sleep. With this enabled on J704, deep sleep stays asleep until woken by the built-in keyboard (MTP.DOCK.CHANNELS.AP0.IRQ) with TEST: SMC notice after peer stops: 0. Signed-off-by: WJW <rjianwei@gmail.com>
Wire up the shared T8142 Secure Enclave (t8142-j813-sep.dtsi) and suspend-to-RAM (t8142-j813-j815-sleep.dtsi) descriptions on J704 (MacBook Pro 14-inch, M5): - Add cluster_pwrgate, dcp_power, and DART ps-wr-dis properties for dcp, dcpext0 (USB-C), and dcpext1 (HDMI). - List all three display coprocessors in &sleep. - Enable apple,sleep-ssps and apple,sleep-ssps-rules on all three USB-C PD controllers (hpm0, hpm1, hpm3). Tested on MacBook Pro (14-inch, M5, 24 GB, J704) running macOS 27.2 stub with Aura Stage 2 (1.0.0b17-g378497cf) alongside aurora-silicon#3782 and aurora-silicon#1847: - apple_sep 30a600000.sep ready with 12 endpoints and hwrng registered. - All 3 USB-C PD controllers enter S3 cleanly in 10-11 ms. - 10 coprocessors stop cleanly; real deep sleep (boot object resumes 0 -> 1) stays asleep until built-in keyboard wake (MTP.DOCK.CHANNELS.AP0.IRQ). - Radio PCIe link retrains cleanly, M5 GPU restarts cleanly, and desktop/Wi-Fi resume with 0 errors. Signed-off-by: WJW <rjianwei@gmail.com>
ba75aa3 to
96b26cf
Compare
|
Additional external-display Deep S2R test results on J704 (with #1847 + #3782 + #3791 + #3823):
|
Add the SPI2 controller (ps_spi2, spi@3a5108000) and Mesa Touch ID fingerprint sensor node (apple,mesa-fingerprint, NUB GPIO 36 power, AP GPIO 200 data-ready IRQ, per-device apple/mesacal-j704.bin and apple/msrk-j704.bin) to t8142-j704.dts, matching t8142-j813.dts and t8142-j815.dts. Expose AP GPIO 200 and NUB GPIO 36 in pinctrl_ap and pinctrl_nub gpio-reserved-ranges alongside the existing audio pins. Verified on MacBook Pro 14-inch (M5 / J704) with SEP enabled (#3791): apple-mesa binds on spi0.0 at 8 MHz, aurora-touchid-setup builds mesacal-j704.bin and msrk-j704.bin from factory data, aurora-sep-ready activates Touch ID, and fprintd-enroll + fprintd-verify succeed with enclave identity match and persisted template update. Signed-off-by: WJW <rjianwei@gmail.com>
There was a problem hiding this comment.
Thanks for the thorough J704 testing. The DT and the SMC/sleep parts look right. Two blockers.
Blocker: this PR makes deep sleep the default on J704, but J704 doesn't keep the PMP domain on, and every row here ran with #1847.
t8142-j813-j815-sleep.dtsiturns on deep sleep (mem_sleepdefaults todeep, as your log shows).- On main,
ps_pmpint8142-j704-peripherals.dtsi:55has noapple,always-on. The J813 node has it. - Your "Not yet" line says the A/B test without
apple,always-ononps_pmphangs on a real deep-sleep wake. Every row in the body and the 03:34 comment ran with #1847, which adds it, and #1847 is still a draft. - So if this merges alone, the next
systemctl suspendon a J704 can hang on wake.
Fix: add the one property to this PR (the part of #1847 your rows depend on):
/* t8142-j704-peripherals.dtsi, in ps_pmp */
apple,always-on;
Then post one J704 deep-sleep row at the new head without the rest of #1847: sleep, wake, and the desktop coming back are enough. #1847 can keep the actuator and MCC parts.
Blocker 2: the new of_machine_is_compatible("apple,j704") checks in sleep.c and macsmc.c. The merge policy treats a board gate that a hardware property could replace as blocking, and #3736 adds exactly that property: apple,sleep-late-notice on the SMC node. Fix: once #3736 lands, merge main, drop both compatible checks and add apple,sleep-late-notice; to the J704 SMC node. The DT-only result is the cleanest version of this PR. If #3736 is still open when you're ready, say so here and we'll land it first.
|
Thanks for the clear review! Both items make total sense:
|
# Conflicts: # arch/arm64/boot/dts/apple/t8142-j704.dts
Keep the J704 PMP power domain always on, matching J813. Without apple,always-on on ps_pmp, waking from deep suspend-to-RAM hangs on J704; including it here ensures this PR is self-contained without depending on draft PR aurora-silicon#1847. Signed-off-by: WJW <rjianwei@gmail.com>
|
Updated
@DjDeveloperr |
In dcp_s2r_restart_done(), dcp_fabric_hdmi_reinit() was gated on dcp->external_native (apple,t6030-dcpext). On fixed-HDMI external pipelines that are not external_native (such as T8142 J704 dcpext1 driving atcphy2 and dpxbar2), deep sleep drops the PHY common power domain and crossbar state behind genpd's back, causing atcphy_resume_noirq() to mark pd_was_off so the next mux update restores the PHY. Because dcp_s2r_restart_done() only re-asserted the converter power GPIOs without calling dcp_fabric_hdmi_reinit(), atcphy2 and dpxbar2 stayed unconfigured after deep sleep and dcp_fixed_hdmi_reconnect() timed out with firmware link fault 22/24 (-110). Allow dcp_fixed_hdmi_reinit_locked() whenever dcp->fixed_phy and dcp->hdmi_hpd are present, and call dcp_fabric_hdmi_reinit() from dcp_s2r_restart_done() for any fixed-PHY HDMI pipeline. Leave the non-S2R dcp_resume() caller gated on dcp->external_native so s2idle behavior on other platforms is unchanged. Tested on MacBook Pro (14-inch, M5, 24 GB, apple,j704) running macOS 27.2 stub with #1847 + #3782 + #3791 + #3823: - Before: HDMI (3aae00000.dcp, 3840x2160@60) worked on cold boot, but failed after deep sleep with DPTXPort link fault 22/24 and 'HDMI DPTX connect failed: -110'. - After: 'HDMI: setting up the output again (after deep sleep)' runs on wake; 3aae00000.dcp reconnects immediately with 0 link faults and restores 3840x2160@60 alongside eDP-1. Signed-off-by: WJW <rjianwei@gmail.com>
t8142-j704.dts: aurora-silicon#3782 appended the J704 GPU nodes (fw-text, opp13, gpu memory regions) where this branch appends the SEP and sleep nodes. Keep both blocks. Signed-off-by: DjDeveloperr <hey@djdev.me>
|
#3782 (the J704 GPU DT) just landed and appends to the end of Against main
The plan from the review is unchanged: once #3736 lands, merge main again, switch J704 to |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: two points left at 7e2fb616082b. apple,always-on on ps_pmp is in, so that blocker is gone.
-
The two
apple,j704checks insleep.candmacsmc.c. They go once either #3736 or #2384 is inmain:- With #3736: add
apple,sleep-late-notice;tosmc@38c600000int8142-j704-peripherals.dtsi. - With #2384: nothing to add, the
apple,t8142-sleepprofile covers the J704.
Either way this PR becomes DT only. Both wait on a J815 deep-sleep row, not on you; we'll land one of them.
- With #3736: add
-
A J704 row at that head, without #1847: boot, deep sleep, wake, desktop back,
TEST: SMC notice after peer stops: 0.
The branch merges cleanly with main f7e3388dd07d, so nothing needs a push before then.
What: Enable Secure Enclave (
sep@30a600000) and deep suspend-to-RAM (apple,t8142-sleep) on J704 (MacBook Pro 14-inch, M5), including deferred late SMC sleep notice (apple,j704) and USB-C PD S3 support.Tested: J704 MacBook Pro 14-inch M5 at
96b26cf9(clean rebase ofba75aa3donto latestmain, zero patch diff): PASS —mem_sleep: s2idle [deep],apple_sepready (12 endpoints,hwrng), full hardware deep sleep (systemctl suspend) with10 coprocessors up and stopped,TEST: SMC notice after peer stops: 0, 0 spurious wakes, clean keyboard wake (boot object resumes 0 -> 1) with Wi-Fi PCIe retrain, M5 GPU restart, and GNOME/Hyprland desktop recovery;checkpatch.pl0 errors/warnings.Risk: two-way · M5 J704 (T8142) only; shared
sleep.c/macsmc.cchecks are strictly gated onof_machine_is_compatible("apple,j704"), zero impact on other Macs.Not yet: External HDMI/USB-C display hotplug across deep sleep on J704; requires
ps_pmp { apple,always-on; }(#1847) so PMP stays powered across hardware sleep (confirmed by A/B DTB testing: omittingapple,always-ononps_pmpcauses real Deep S2R wake to hang, matchingt8142-j813-peripherals.dtsiceaab64d4f7).Details
soc: apple: sleep, mfd: macsmc: enable deferred late SMC notice on J704(765d3de77):apple,j704alongsideapple,j813inapple_sleep_smc_defer_notice()andapple_smc_probe()so SMC uses the saved IRQ-independent RTKit transport and receives the sleep notice after SEP/peer stops.wake source: SMC.OutboxNotEmpty.arm64: dts: apple: t8142-j704: Enable SEP and suspend-to-RAM(ba75aa3df):cluster_pwrgate,dcp_power, and DARTps-wr-disproperties fordcp,dcpext0(USB-C), anddcpext1(HDMI).t8142-j813-sep.dtsiandt8142-j813-j815-sleep.dtsi.<&dcp &dcpext0 &dcpext1>) into&sleep.apple,sleep-sspsandapple,sleep-ssps-ruleson all three USB-C PD controllers (hpm0,hpm1,hpm3).Evidence
Tested on MacBook Pro (14-inch, M5, 24 GB,
apple,j704) running macOS 27.2 stub, Aura Stage 2 (1.0.0b17-g378497cf), and Arch Linux ARM with this series + #3782 (J704 GPU) + #1847 (PMP always-on / MCC / actuator):mem_sleep: s2idle [deep],apple-sleep 380700000.sleep-controller: deep sleep is the default: boot object resumes 0apple_sep 30a600000.sep: ready in 1450 ms, 12 endpoints, key store open,hwrngregistered0-0a,0-0c,1-0c) enter S3 cleanly in 10–11 mssystemctl suspend):10 coprocessors up and stoppedTEST: SMC notice after peer stops: 0wake source: MTP.DOCK.CHANNELS.AP0.IRQ)back from sleep, boot object resumes 0 -> 1the radio's PCIe link trained again after the wakeaurora 582600000.gpurestarted cleanly; both GNOME and Hyprland desktops + Wi-Fi + Bluetooth + audio resumed with 0 errorsscripts/checkpatch.pl: 0 errors, 0 warnings across both commits.