Skip to content
Merged
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
a560eaa
pmdomain: apple: pmgr-pwrstate: restore apple,min-state after firmwar…
erikwb Nov 24, 2026
227dc13
soc: apple: sart: save entries before a coprocessor idles, restore af…
erikwb Nov 24, 2026
d1c60cd
soc: apple: rtkit: add apple_rtkit_mbox_restore() for a coprocessor t…
erikwb Nov 24, 2026
7dfc208
nvme-apple: idle ANS for a firmware sleep and start it cold after the…
erikwb Nov 24, 2026
a2ec09f
iommu: apple-dart: power T8020 display DARTs down and up with their DCP
erikwb Nov 24, 2026
66d59d1
dt-bindings: display: apple,t8140-display-power: add T8103
erikwb Nov 24, 2026
9f1ba6b
drm/apple: dcp: leave the firmware stop and restart alone without an …
erikwb Nov 24, 2026
ccfca33
drm/apple: dcp: allow display power layouts without system or retenti…
erikwb Nov 24, 2026
0be1d26
drm/apple: map firmware 27's register windows through the DCP's DART …
erikwb Nov 24, 2026
65beae9
drm/apple: dcp: power the display DART down and up with the coprocess…
erikwb Nov 24, 2026
92e0afd
drm/apple: dcp: stop and restart the T8103 DCP's firmware around DPMS…
erikwb Nov 24, 2026
de9d80c
soc: apple: aop: M1: use the firmware regions the bootloader reserves
erikwb Nov 24, 2026
1de1756
soc: apple: aop: say per SoC what the AOP hears for a firmware sleep
erikwb Nov 24, 2026
567068e
irqchip/apple-aic: target lines by AIC's CPU number, not the logical one
erikwb Nov 24, 2026
dcf02d6
irqchip/apple-aic: restore AIC1's configuration, line targets and CPU…
erikwb Nov 24, 2026
c1166e0
PCI: apple: set the ports up again after a firmware sleep that took t…
erikwb Nov 24, 2026
f1aedce
Bluetooth: hci_bcm4377: recover after a firmware sleep that took the …
erikwb Nov 24, 2026
a25aa24
mfd: macsmc: let the saved transport write keys of any size
erikwb Nov 24, 2026
0ebe6b2
soc: apple: pm_shim: accept the enclave's power-down by its actual state
erikwb Nov 24, 2026
56e04a9
dt-bindings: soc: apple: apple,t8140-sleep: add T8103
erikwb Nov 24, 2026
e8f3f34
soc: apple: sleep: add T8103 (M1) suspend-to-RAM support
erikwb Nov 24, 2026
82d65bd
mfd: macsmc: give the T8103 SMC its sleep notice after the other copr…
erikwb Nov 24, 2026
5262e83
arm64: dts: apple: t8103: describe the DCP's display power words
erikwb Nov 24, 2026
1a23bc3
arm64: dts: apple: t8103: give the SEP its power domains
erikwb Nov 24, 2026
281a9aa
arm64: dts: apple: t8103: add the sleep controller
erikwb Nov 24, 2026
8dfc622
dt-bindings: usb: ti,tps6598x: add apple,sleep-ssps for CD321x
erikwb Nov 24, 2026
8cc14f3
arm64: dts: apple: t8103-j313: enable suspend-to-RAM
erikwb Nov 24, 2026
dee9cd3
soc: apple: sleep: t8103: allow GPU commit stop and save AGX fabric t…
erikwb Nov 25, 2026
835b40a
soc: apple: sleep: t8103: enforce GPU commit-stop and wake-restore gates
erikwb Nov 25, 2026
22073d0
soc: apple: sleep: t8103: enable NCO channels across sleep commit
erikwb Nov 25, 2026
6976def
Merge remote-tracking branch 'origin/main' into feat/t8103-s2r
erikwb Nov 25, 2026
7b54ee4
PCI: apple: mask conventional port chained IRQ across firmware sleep
erikwb Nov 25, 2026
73c532b
Bluetooth: hci_bcm4377: restore BAR0 windows and mark needs_reset on …
erikwb Nov 25, 2026
697fc87
Merge remote-tracking branch 'origin/main' into feat/t8103-s2r-v2
erikwb Nov 25, 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/display/apple,t8140-display-power.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple T6041, T8140 and T8142 display power words
title: Apple T8103, T6041, T8140 and T8142 display power words

maintainers:
- Diljit Singh <hey@djdev.me>
Expand All @@ -19,16 +19,17 @@ description:
properties:
compatible:
enum:
- apple,t8103-display-power
- apple,t6041-display-power
- apple,t8140-display-power
- apple,t8142-display-power

reg:
minItems: 2
minItems: 1
maxItems: 5

reg-names:
minItems: 2
minItems: 1
maxItems: 5

'#address-cells':
Expand Down Expand Up @@ -105,6 +106,19 @@ required:
- reg-names

allOf:
- if:
properties:
compatible:
const: apple,t8103-display-power
then:
# T8103's display has no retention words and its PMC no count of the coprocessors.
properties:
reg:
items:
- description: the power manager's power state words
reg-names:
items:
- const: ps
- if:
properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@ description: |
properties:
compatible:
enum:
- apple,t8103-sleep
- apple,t8122-sleep
- apple,t8132-sleep
- apple,t8140-sleep
- apple,t8142-sleep

reg:
minItems: 21
minItems: 7
maxItems: 41

reg-names:
minItems: 21
minItems: 7
maxItems: 41

apple,wake-enable:
Expand Down Expand Up @@ -106,6 +107,28 @@ required:
- apple,display-coprocessors

allOf:
- if:
properties:
compatible:
contains:
const: apple,t8103-sleep
then:
required:
- apple,wake-enable
- apple,pinctrl
properties:
reg:
minItems: 7
maxItems: 7
reg-names:
items:
- const: ps
- const: ps-aon
- const: clk-mux
- const: wake
- const: cpu-start
- const: wdt
- const: spmi
- if:
properties:
compatible:
Expand Down
15 changes: 15 additions & 0 deletions Documentation/devicetree/bindings/usb/ti,tps6598x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ properties:
connector:
$ref: /schemas/connector/usb-connector.yaml#

apple,sleep-ssps:
type: boolean
description:
Tell the controller the system's power state (SSPS) around a
firmware-driven suspend, S3 before it and S0 after.

firmware-name:
description: |
Should contain the name of the default patch binary
Expand Down Expand Up @@ -91,6 +97,15 @@ allOf:
properties:
reg:
maxItems: 1
- if:
properties:
compatible:
not:
contains:
const: apple,cd321x
then:
properties:
apple,sleep-ssps: false

additionalProperties: false

Expand Down
13 changes: 13 additions & 0 deletions arch/arm64/boot/dts/apple/t8103-j313.dts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,19 @@
status = "okay";
};

&sleep {
status = "okay";
};

/* The port controllers' system power state: S3 before a firmware-driven sleep, S0 after it */
&hpm0 {
apple,sleep-ssps;
};

&hpm1 {
apple,sleep-ssps;
};

&aop_audio {
apple,chassis-name = "J313";
apple,machine-kind = "MacBook Air";
Expand Down
43 changes: 43 additions & 0 deletions arch/arm64/boot/dts/apple/t8103.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@

dcp: dcp@231c00000 {
compatible = "apple,t8103-dcp", "apple,dcp";
apple,display-power = <&dcp_power>;
mboxes = <&dcp_mbox>;
mbox-names = "mbox";
iommus = <&dcp_dart 0 0x0 0x0 0x0 0xfc000000>;
Expand Down Expand Up @@ -1113,6 +1114,43 @@
reg = <0x2 0x3b700000 0 0x14000>;
};

/*
* The power words the DCP's driver lowers and raises around a stop of its
* firmware: DISP0's CPU and front end, in the PMGR's power state block.
* No driver binds this.
*/
dcp_power: display-power@23b700000 {
compatible = "apple,t8103-display-power";
reg = <0x2 0x3b700000 0x0 0x14000>;
reg-names = "ps";
};

/*
* Suspend-to-RAM. The blocks the sleep writes, each shared with its own
* driver and not claimed: the main PMGR (CPM gating, the CPU clusters,
* SEP's power-gate wait), the always-on PMGR (the S2R timer), the SoC
* clock generator's muxes, the AOP's wake block (five mask, then five
* status words), the CPU start block, the watchdog and nub-spmi0.
* A board that sleeps enables it.
*/
sleep: sleep-controller@23b700000 {
compatible = "apple,t8103-sleep";
reg = <0x2 0x3b700000 0x0 0x8c000>,
<0x2 0x3d280000 0x0 0x74000>,
<0x2 0x3b000000 0x0 0x41000>,
<0x2 0x3d004000 0x0 0x30>,
<0x2 0x3b754000 0x0 0x10>,
<0x2 0x3d2b0000 0x0 0x20>,
<0x2 0x3d0d9300 0x0 0x100>;
reg-names = "ps", "ps-aon", "clk-mux", "wake",
"cpu-start", "wdt", "spmi";
/* NUB.SPMI0Sw3IRQ: the PMU RTC's alarm */
apple,wake-enable = <54>;
apple,display-coprocessors = <&dcp>;
apple,pinctrl = <&pinctrl_ap>;
status = "disabled";
};

pmgr_dcp: power-management@23b738000 {
reg = <0x2 0x3b738000 0x0 0x1000>,
<0x2 0x3bc3c000 0x0 0x1000>;
Expand Down Expand Up @@ -1395,6 +1433,11 @@
mboxes = <&sep_mbox>;
mbox-names = "mbox";
iommus = <&sep_dart 0>;
/*
* The enclave stops reading its mailbox for good once
* the GPIO power state is switched off under it.
*/
power-domains = <&ps_sep>, <&ps_gpio>;
status = "disabled";
};

Expand Down
7 changes: 6 additions & 1 deletion drivers/bluetooth/hci_bcm4377.c
Original file line number Diff line number Diff line change
Expand Up @@ -3250,11 +3250,16 @@ static int bcm4377_resume(struct device *dev)
/*
* 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.
* Restore the private BAR0 windows and mark needs_reset before queueing the rebind so
* neither hci_close() during device_reprobe() nor a stray frame can write BAR0 through
* unconfigured reset windows. Skip the resume commands 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;
bcm4377->needs_reset = true;
bcm4377_init_cfg(bcm4377);
WRITE_ONCE(bcm4377->setup_retry_blocked, false);
bcm4377_queue_rebind(bcm4377, "power lost in the sleep");
return 0;
Expand Down
12 changes: 12 additions & 0 deletions drivers/gpu/drm/apple/dcp-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,16 @@ struct apple_dcp_hw_data {
* for one second.
*/
unsigned int afk_timeout_ms;
/*
* Firmware 27 reaches its register windows through its DART here, so map_reg maps
* them there (T8103: its power-down faults on an unmapped window otherwise).
*/
bool map_reg_dart;
/*
* The display DART goes off and on with the coprocessor's own stop and start: no
* D572 turns it off first, and the stop's power-down resets it (T8103).
*/
bool s2r_disp_dart_with_dcp;
};

enum dcp_test_point {
Expand Down Expand Up @@ -769,6 +779,8 @@ struct apple_dcp {

/* Display registers mappable to the DCP */
struct resource *disp_registers[MAX_DISP_REGISTERS];
/* Their DART mappings with hw.map_reg_dart, made at the firmware's first map_reg */
dma_addr_t map_reg_dva[MAX_DISP_REGISTERS];
unsigned int nr_disp_registers;

struct resource disp_bw_scratch_res;
Expand Down
Loading
Loading