Repository navigation
soc: apple: admit M4 Mac mini (J773g) in T8132 SEP profile and desktop apple-sleep gates - #2763
DjDeveloperr wants to merge 4 commits into
Conversation
|
Read at 922c890 (draft).
Rows: the J773g deep-sleep run you mention, plus one J713 deep sleep on this head (it goes through both changed paths in Assisted-by: LLM (Claude:Opus 5.5) |
922c890 to
b88b87d
Compare
|
Addressed all three review points at
Verified Assisted-by: LLM (Gemini:4 Neon) |
b88b87d to
b1f547a
Compare
|
Rebased onto Live Verification — 3/3 Real Deep Sleep (
|
| 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 <hey@djdev.me>
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 <hey@djdev.me>
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 <hey@djdev.me>
…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 <hey@djdev.me>
b1f547a to
2dfb6d6
Compare
|
@RyanTheTide Rebased onto
Assisted-by: LLM (Gemini:4 Neon) |
Summary
Two core driver changes required for deep sleep (S2R) on desktop T8132 boards (M4 Mac mini J773g on macOS 27.2):
soc: apple: sep: admit J773g under the T8132 profile: admitapple,j773galongsideapple,j713andapple,j715indrivers/soc/apple/profile.rs(plus KUnit selection test) soapple_sepbinds and registers its deep-sleep PM hooks (J773g has no Touch ID SPI sensor, whichapple_sepalready handles cleanly).soc: apple: sleep: allow desktop display[0] disabled and keep port0 PERST:display[0](&dcp) is disabled in DT (desktop J773g on 27.2 where&dcpext0is the active HDMI display), require every available external display coprocessor to be bound (and at least one bound) instead of refusing unconditionally on!s->display[0].bound. Keep the exactdisplay[0].boundcheck wheneverdisplay[0]is available or absent.&pcie0children inapple_sleep_find_radio_perst()once the first port's PERST# is recorded so enablingport02(J773g Broadcom Ethernet) does not overwriteport00's radio PERST#.Verification
scripts/checkpatch.pl --strict:0 errors, 0 warnings, 0 checks.7.3.0-ARCH-m4prod2(paired with arm64: dts: apple: t8132-apcie-port2: keep shared APCIe register windows #2762 and drm/asahi: g16: run the M4 GPU on the macOS 27.2 firmware (26B123) #2676).Assisted-by: LLM (Gemini:4 Neon)