Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ac0befe
nvme: apple: keep the RTKit buffers of ANS across a firmware sleep
olivergreg Nov 27, 2026
2f60f7d
PCI: apple: wait once after the last retrained link on S2R resume
olivergreg Nov 26, 2026
1c3375c
PCI: apple: disable ASPM and L1SS across firmware sleep on reinit hosts
olivergreg Nov 28, 2026
2b6ad14
HID: spi-hid-apple: do not arm the wake interrupt for a firmware sleep
olivergreg Nov 26, 2026
5a610ea
dmaengine: apple-sio: keep the firmware running in a sleep dry run
olivergreg Nov 26, 2026
f502d2d
dt-bindings: mfd: apple,smc: add apple,sleep-low-pins
olivergreg Nov 28, 2026
bcb5f5d
dt-bindings: soc: apple: sleep: add the T6000 sleep controller
olivergreg Nov 28, 2026
ba6c77a
irqchip/apple-aic: keep AIC2's configuration across a firmware suspend
olivergreg Nov 26, 2026
d1d9af5
soc: apple: rtkit: split the endpoint start from its state check
olivergreg Nov 26, 2026
d9edd49
soc: apple: rtkit: restore the mailbox enables after a firmware sleep
olivergreg Nov 26, 2026
390b848
soc: apple: rtkit: add apple_rtkit_sleep_return_with_init()
olivergreg Nov 26, 2026
0c35640
soc: apple: sep: accept a power-gated enclave as a taken sleep request
olivergreg Nov 26, 2026
7abb5e9
soc: apple: aop: name the AFK endpoints of the T6000 sleep message
olivergreg Nov 26, 2026
8fec9ac
iommu/apple-dart: restore a locked T6000 DART after a firmware sleep
olivergreg Nov 26, 2026
76d2d0e
mfd: macsmc: add the T6000 sleep notice: saved lane, pmVC and SMC GPIOs
olivergreg Nov 28, 2026
4ea3b1d
mux: apple-display-crossbar: restore T6000 routes after a firmware sleep
olivergreg Nov 26, 2026
f4ba279
drm/apple: iomfb: add the A500 call to the 13.5 firmware's table
olivergreg Nov 26, 2026
f7871d7
drm/apple: dcp: stop the T6000 panel firmware for a suspend-to-RAM
olivergreg Nov 26, 2026
b297dd4
drm/apple: dcp: power the DP-to-HDMI converter down for suspend-to-RAM
olivergreg Nov 26, 2026
2f22747
soc: apple: sleep: let a profile order SEP's sleep and the CPU stop
olivergreg Nov 26, 2026
d5aeeda
soc: apple: sleep: add T6000 (M1 Pro) suspend-to-RAM support
olivergreg Nov 28, 2026
9756f63
rust: soc: apple: rtkit: wrap sleep_stop and sleep_return_with_init
olivergreg Nov 26, 2026
c18c3eb
drm/asahi: park and restart the T6000 GPU firmware around suspend-to-RAM
olivergreg Nov 26, 2026
d07fba2
arm64: dts: apple: t600x: add the sleep controller node, disabled
olivergreg Nov 28, 2026
2581889
arm64: dts: apple: j314s: enable suspend-to-RAM
olivergreg Nov 28, 2026
65b5b3f
soc: apple: sleep: make SEP's stop the last refusal where it comes first
olivergreg Nov 28, 2026
b7005a9
dmaengine: apple-sio: leave the T6000 firmware to the sleep's commit
olivergreg Nov 28, 2026
740f32f
drm/asahi: park the T6000 GPU firmware at the sleep's commit
olivergreg Nov 28, 2026
371bf9e
soc: apple: sleep: t6000: drop the fixed waits of the late commit
olivergreg Nov 28, 2026
836ec8b
soc: apple: sleep: t6000: add a power cycle of the display CPU domain
olivergreg Nov 28, 2026
8a52a02
drm/apple: iomfb: drop unanswered calls before a firmware restart
olivergreg Nov 28, 2026
ed7bf13
drm/apple: dcp: restart the 13.5 firmware after a refused sleep
olivergreg Nov 28, 2026
6c8d7e7
soc: apple: sleep: t6000: do not wait at the wake for domains that ca…
olivergreg Nov 28, 2026
305ef36
Merge branch 'main' into feat/t6000-suspend-to-ram
olivergreg Nov 28, 2026
4dc7ed2
Merge branch 'main' into feat/t6000-suspend-to-ram
DjDeveloperr Dec 3, 2026
dea5e8b
Merge branch 'main' into feat/t6000-suspend-to-ram
DjDeveloperr Dec 3, 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
13 changes: 13 additions & 0 deletions Documentation/devicetree/bindings/mfd/apple,smc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ properties:
what the SoC's sleep sequence powers on itself. Without the property
pmVC is not written.

apple,sleep-low-pins:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 4
items:
maximum: 0xff
description:
SMC GPIO numbers (the number in the GPIO's gPxx key) that are driven
low before the SMC is told of a suspend-to-RAM and high again after the
wake, for a supply that has to be off while the machine sleeps and that
no driver switches at that point. On the J314s this is GPIO 26, the SD
card reader's power enable.

gpio:
oneOf:
- $ref: /schemas/gpio/apple,smc-gpio.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ description: |
properties:
compatible:
enum:
- apple,t6000-sleep
- apple,t8103-sleep
- apple,t8112-sleep
- apple,t8122-sleep
Expand Down Expand Up @@ -125,6 +126,42 @@ required:
- apple,display-coprocessors

allOf:
- if:
properties:
compatible:
contains:
const: apple,t6000-sleep
then:
required:
- apple,wake-enable
properties:
reg:
minItems: 22
maxItems: 22
reg-names:
items:
- const: ps
- const: ps-east
- const: ps-aon
- const: cpu-start
- const: cluster
- const: commit
- const: wdt
- const: wake
- const: sep-pg
- const: acc0
- const: acc1
- const: acc2
- const: clkgen
- const: pll0
- const: dcs
- const: apcie-q
- const: amcc0
- const: amcc1
- const: amcc2
- const: amcc3
- const: ptd
- const: spmi
- if:
properties:
compatible:
Expand Down
41 changes: 41 additions & 0 deletions arch/arm64/boot/dts/apple/t6000-j314s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,47 @@
adj-height-mm = <189>;
};

/*
* Suspend-to-RAM, qualified on this board. What follows is what its sequence
* needs from the other devices.
*/
&sleep {
/*
* Left alone across a sleep, as in the board's ADT no-restore-gpio-pins.
*/
apple,pinctrl-skip-pins = <114 115 119>;
status = "okay";
};

&smc {
/* VDD_CIO rail mask before the sleep notice: no port's rail kept up */
apple,sleep-pmvc = <0x100>;
/* The SD card reader's power enable (port01's pwren), off while asleep */
apple,sleep-low-pins = <26>;
};

&pmp {
/* The sleep takes the firmware's SRAM: all of it is kept and written back */
apple,sram-keep = <0x0 0x100000>;
};

/* macOS moves each port controller to S3 before the sleep and to S0 after it. */
&hpm0 {
apple,sleep-ssps;
};

&hpm1 {
apple,sleep-ssps;
};

&hpm2 {
apple,sleep-ssps;
};

&hpm5 {
apple,sleep-ssps;
};

&aop_audio {
apple,chassis-name = "J314";
apple,machine-kind = "MacBook Pro";
Expand Down
44 changes: 44 additions & 0 deletions arch/arm64/boot/dts/apple/t600x-die0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,50 @@
#clock-cells = <1>;
};

/*
* The registers of a suspend-to-RAM, in blocks other drivers also use.
* Only qualified on T6000: a board that sleeps enables it.
*/
sleep: sleep-controller@28e080000 {
compatible = "apple,t6000-sleep";
reg = <0x2 0x8e080000 0x0 0x1000>,
<0x2 0x8e580000 0x0 0x1000>,
<0x2 0x92280000 0x0 0x1000>,
<0x2 0x8e0d4000 0x0 0x14>,
<0x2 0x8e098000 0x0 0x24>,
<0x2 0x925c4000 0x0 0x4>,
<0x2 0x922b0000 0x0 0x40>,
<0x2 0x92004000 0x0 0x40>,
<0x2 0x8e0cc200 0x0 0x4>,
<0x2 0x10e20000 0x0 0x29000>,
<0x2 0x11e20000 0x0 0x29000>,
<0x2 0x12e20000 0x0 0x29000>,
<0x2 0x8e038000 0x0 0x200>,
<0x2 0x8e224000 0x0 0x4>,
<0x2 0x8e20c800 0x0 0x4>,
<0x5 0x8c008000 0x0 0x300>,
<0x2 0x00000000 0x0 0x160000>,
<0x2 0x01000000 0x0 0x160000>,
<0x2 0x02000000 0x0 0x160000>,
<0x2 0x03000000 0x0 0x160000>,
<0x2 0x8e3c0000 0x0 0x19000>,
<0x2 0x920a1300 0x0 0x100>;
reg-names = "ps", "ps-east", "ps-aon",
"cpu-start", "cluster", "commit",
"wdt", "wake", "sep-pg",
"acc0", "acc1", "acc2",
"clkgen", "pll0", "dcs", "apcie-q",
"amcc0", "amcc1", "amcc2", "amcc3",
"ptd", "spmi";
apple,wake-enable = <12 14 26 27
40 43 49 50 51 52 54
85 90
126 127 128 129 130 131 132 133>;
apple,display-coprocessors = <&dcp>;
apple,pinctrl = <&pinctrl_ap>;
status = "disabled";
};

aic: interrupt-controller@28e100000 {
compatible = "apple,t6000-aic", "apple,aic2";
#interrupt-cells = <4>;
Expand Down
15 changes: 15 additions & 0 deletions drivers/dma/apple-sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,16 @@ static const struct sio_hw_data sio_hw_generic = {
.cfg_word4 = 0x800,
};

/*
* The generic words, and stopped by the sleep's commit where the board has a sleep
* controller: idled any earlier, a sleep refused after that would leave it stopped.
*/
static const struct sio_hw_data sio_hw_t6000 = {
.stop_at_commit = true,
.fifo_threshold = 0x800,
.cfg_word4 = 0x800,
};

static const struct sio_hw_data sio_hw_t6030 = {
.stop_at_commit = true,
.commit_no_cpu_down = true,
Expand Down Expand Up @@ -815,6 +825,7 @@ static const struct of_device_id sio_of_match[] = {
*/
{ .compatible = "apple,t8122-sio", .data = &sio_hw_t8140 },
{ .compatible = "apple,t6030-sio", .data = &sio_hw_t6030 },
{ .compatible = "apple,t6000-sio", .data = &sio_hw_t6000 },
{ .compatible = "apple,sio", .data = &sio_hw_generic },
{ }
};
Expand Down Expand Up @@ -3314,6 +3325,10 @@ static __maybe_unused int sio_suspend_late(struct device *dev)
return -EBUSY;
}

/* A dry run ends before the commit: the firmware would be stopped for nothing. */
if (apple_sleep_dry_run())
return 0;

ret = apple_rtkit_sleep_stop(sio->rtk, sio->base + REG_CPU_CONTROL);
if (ret) {
dev_err(dev, "firmware did not stop for sleep: %d\n", ret);
Expand Down
8 changes: 8 additions & 0 deletions drivers/gpu/drm/apple/dcp-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ struct apple_dcp_hw_data {
*/
bool s2r;
bool s2r_ext;
/*
* Firmware 13.5: a firmware-driven sleep takes the internal processor's power. It is
* stopped before the sleep and booted from scratch after it, see dcp_sleep_13_5_stop().
*/
bool sleep_13_5;
/* An external display processor (a dcpext block), not the internal display's */
bool external_processor;
/* The firmware crashes on any mode but the 120 Hz boot timing, see dcp_mode_settable(). */
Expand Down Expand Up @@ -1482,6 +1487,8 @@ struct apple_dcp {
struct gpio_desc *hdmi_hpd;
struct gpio_desc *hdmi_pwren;
struct gpio_desc *dp2hdmi_pwren;
/* The converter was powered down for a firmware sleep: resume powers it up again. */
bool dp2hdmi_sleep_off;

struct mutex hpd_mutex;

Expand Down Expand Up @@ -1699,6 +1706,7 @@ int iomfb_queue_callback(struct apple_dcp *dcp, dcp_callback_t callback,
void iomfb_queue_init(struct apple_dcp *dcp);
void iomfb_queue_stop(struct apple_dcp *dcp);
void iomfb_reset_transport(struct apple_dcp *dcp);
void iomfb_channels_reset(struct apple_dcp *dcp);
bool iomfb_queue_drain(struct apple_dcp *dcp, unsigned long timeout);
int iomfb_queue_settle(struct apple_dcp *dcp, unsigned long timeout);
void iomfb_pause_presentation(struct apple_dcp *dcp, bool pause);
Expand Down
Loading
Loading