Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0391b26
soc: apple: sleep: coprocessor stop helpers for a SoC sleep driver of…
AxxzyWasTaken Nov 12, 2026
9bf0afa
soc: apple: t6041-sleep: EL2 suspend-to-RAM for T6041 (M4 Max)
AxxzyWasTaken Nov 12, 2026
003d371
irqchip/apple-aic: save and restore the T6041 AIC around a firmware s…
AxxzyWasTaken Nov 12, 2026
4638699
nvme-apple: take part in a firmware sleep on T6041
AxxzyWasTaken Nov 12, 2026
fb8cc0f
soc: apple: pmp: keep the T6041 firmware data across a real sleep
AxxzyWasTaken Nov 12, 2026
56ab23a
mfd: macsmc: T6041: WKTP and pmVC before the sleep commit
AxxzyWasTaken Nov 12, 2026
1ed2d0a
soc: apple: aop: T6041 sleep order and the 27.2 firmware segment
AxxzyWasTaken Nov 12, 2026
ed4ecd2
PCI: apple: bring conventional ports back after a real sleep
AxxzyWasTaken Nov 12, 2026
bb38f3d
drm/asahi: g17: sleep on T6041
AxxzyWasTaken Nov 12, 2026
1d786d0
iommu/apple-dart: add a display DART keep/restore helper for T6041 S2R
AxxzyWasTaken Nov 11, 2026
323bce3
drm/apple: T6041 S2R display stop and restart
AxxzyWasTaken Nov 11, 2026
a435966
drm/apple: T6041 S2R: leave bridge 4 unarmed, mark external DARTs dark
AxxzyWasTaken Nov 11, 2026
d5afa12
drm/apple: T6041 S2R: shorten the display stop/restart waits
AxxzyWasTaken Nov 11, 2026
5666f21
Bluetooth: hci_bcm4377: rebind after power loss in a real sleep
AxxzyWasTaken Nov 11, 2026
da85285
PCI: apple, nvme-apple: resume asynchronously
AxxzyWasTaken Nov 11, 2026
b88f57e
pinctrl: apple: ack a level interrupt again after unmasking it
AxxzyWasTaken Nov 12, 2026
c5be49c
soc: apple: sep: refuse a deep sleep at once over a stuck enclave
AxxzyWasTaken Nov 12, 2026
540ab94
soc: apple: sep: tell the enclave at suspend where no sleep core comm…
AxxzyWasTaken Nov 12, 2026
a920305
soc: apple: t6041-sleep: say what the driver does now
AxxzyWasTaken Nov 12, 2026
3adc871
soc: apple: t6041-sleep: hold the parked CPUs before stopping them
AxxzyWasTaken Nov 12, 2026
da71fad
soc: apple: t6041-sleep: wait for the reply to each PMU write
AxxzyWasTaken Nov 12, 2026
2e27322
spmi: apple: drop replies left by firmware at a firmware-driven resume
AxxzyWasTaken Nov 12, 2026
5b3d889
soc: apple: t6041-sleep: drain the FIFO before each PMU write too
AxxzyWasTaken Nov 12, 2026
ad7fec0
soc: apple: sep: refuse to sleep at suspend over a DART without sleep…
AxxzyWasTaken Nov 12, 2026
22a2ae6
soc: apple: t6041-sleep: stay out without aura's S2R mailbox
AxxzyWasTaken Nov 12, 2026
bb10f8f
arm64: dts: apple: t6041: SEP DART sleep lists and the sleep node
AxxzyWasTaken Nov 12, 2026
6ad96de
drm/asahi: hw: t6041: restart the 40-core GPU after a sleep too
AxxzyWasTaken Nov 12, 2026
48601ec
soc: apple: t6041-sleep: drop the bring-up diagnostics
AxxzyWasTaken Nov 12, 2026
8ff7eac
iommu/apple-dart: T6041 display keep: drop the register dump
AxxzyWasTaken Nov 12, 2026
3862ef2
drm/apple: T6041 S2R: drop the bring-up test hooks
AxxzyWasTaken Nov 12, 2026
4ea9e32
soc: apple: display-gate: M4 Max: chains from a tree that describes D…
AxxzyWasTaken Nov 12, 2026
128743e
drm/apple: T6041 S2R: the external chains' DARTs dark by node
AxxzyWasTaken Nov 12, 2026
fac697f
drm/apple: T6041 S2R: every external DCP, not only the first two
AxxzyWasTaken Nov 12, 2026
f3fcc17
soc: apple: t6041-sleep: the full part's 32 memory channels
AxxzyWasTaken Nov 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions arch/arm64/boot/dts/apple/t6041-j614c-j616c.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
sep = &sep;
};

/* Suspend-to-RAM at EL2 through aura's S2R mailbox; without the mailbox it stays out. */
t6041-sleep {
compatible = "apple,t6041-sleep";
};

chosen {
#address-cells = <2>;
#size-cells = <2>;
Expand Down
14 changes: 14 additions & 0 deletions arch/arm64/boot/dts/apple/t6041.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -445,3 +445,17 @@
&{/opp-table-e/opp07} {
opp-microwatt = <531000>;
};

/*
* What the SEP's DART gets around a sleep, as offset and value: the writes T8140's has
* (t8140.dtsi), which the J616C has slept with. The SEP driver saves the DART with them
* before it tells the enclave to sleep at suspend.
*/
&sep_dart {
apple,sleep-prepare = <0x80 0xa102>, <0x704 0xffffffff>;
apple,sleep-restore = <0x210 0x0>, <0x20c 0x800005f5>,
<0x220 0xf0f0f>, <0x224 0x80808>,
<0x300 0x1>, <0x318 0x1>;
apple,sleep-restore-late = <0x80 0x8000>, <0x228 0x3f3f3f3f>,
<0x22c 0x1010101>;
};
14 changes: 14 additions & 0 deletions drivers/bluetooth/hci_bcm4377.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Copyright (C) The Asahi Linux Contributors
*/

#include <linux/suspend.h>
#include <linux/async.h>
#include <linux/atomic.h>
#include <linux/bitfield.h>
Expand Down Expand Up @@ -3168,6 +3169,19 @@ static int bcm4377_resume(struct device *dev)
bcm4377->wake_armed = false;
}

/*
* A real sleep took the function's power: the firmware is gone, and every resume command
* would only time out (two times 2 s inside the system resume, then the rebind anyway).
* Skip them and rebind from the work queue; probe boots the firmware from scratch.
*/
if (pm_resume_via_firmware() && !bcm4377->dma_window_base) {
bcm4377->quiesced = false;
bcm4377->resume_powered = false;
WRITE_ONCE(bcm4377->setup_retry_blocked, false);
bcm4377_queue_rebind(bcm4377, "power lost in the sleep");
return 0;
}

if (bcm4377->quiesced) {
iowrite32(BCM4377_BAR0_SLEEP_CONTROL_UNQUIESCE,
bcm4377->bar0 + BCM4377_BAR0_SLEEP_CONTROL);
Expand Down
6 changes: 6 additions & 0 deletions drivers/gpu/drm/apple/apple_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1964,6 +1964,9 @@ static int apple_platform_suspend(struct device *dev)
if (apple && apple->dark_held)
return 0;

if (pm_suspend_via_firmware())
dcp_t6041_s2r_all(false);

if (apple && !apple->aborted) {
apple->s2r_skipped = apple_drm_firmware_stopped(apple);
if (!apple->s2r_skipped)
Expand Down Expand Up @@ -2009,6 +2012,9 @@ static int apple_platform_resume(struct device *dev)
{
struct apple_drm_private *apple = dev_get_drvdata(dev);

/* Nothing if this suspend never took the display down. */
dcp_t6041_s2r_all(true);

if (!apple || apple->aborted || apple->s2r_skipped)
return 0;

Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/apple/dcp-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ struct apple_dcp {
*/
bool ext_failsafe;
bool ext_dead;
/* T6041 S2R: this external DCP's firmware stop ran in a sleep of this boot */
bool t6041_ext_seen;
/*
* A T6030 external processor in the main DRM device: the kernel starts
* its firmware on first use, its modes come from the attached display.
Expand Down
Loading