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
d9b438c
arm64: apple: support coordinated suspend-to-RAM on T8140
DjDeveloperr Nov 10, 2026
2a57a36
soc: apple: sleep: look for the debug link's contract from 50 ms afte…
DjDeveloperr Nov 10, 2026
38e9c6d
mfd: macsmc: shorten the waits a cut sleep adds before its commit
DjDeveloperr Nov 10, 2026
3224a67
soc: apple: sleep: give up on a debug link reset after 1.5 s
DjDeveloperr Nov 10, 2026
f65bce9
Merge integration/aurora f404b596 into feat/s2r
DjDeveloperr Nov 10, 2026
db58075
Merge integration/aurora 451dc709 into feat/s2r
DjDeveloperr Nov 11, 2026
fbe6f66
dmaengine: apple-sio: stop the T8140 firmware at the sleep's commit
DjDeveloperr Nov 11, 2026
30c3daf
soc: apple: sleep: refuse a commit over an unbound running coprocessor
DjDeveloperr Nov 11, 2026
adcdcbb
soc: apple: sleep: clear latched power words before the commit
DjDeveloperr Nov 11, 2026
d82906e
pmdomain: apple: lower T8140 domains as macOS does
DjDeveloperr Nov 11, 2026
042933d
accel/ane: take the H17 engine down in macOS's order and check BUSY
DjDeveloperr Nov 11, 2026
6058116
accel/ane: stop the H17 firmware before its power goes
DjDeveloperr Nov 11, 2026
0a80c38
accel/ane: h17: take the deep path instead of refusing a sleep
DjDeveloperr Nov 11, 2026
7302a10
accel/ane: h17: stop the firmware and its DARTs as macOS does
DjDeveloperr Nov 11, 2026
ce8192d
accel/ane: h17: don't send EXCLAVE_MODE_STOP before the stop
DjDeveloperr Nov 11, 2026
942c008
accel/ane: h17: keep the engine off until a request needs it
DjDeveloperr Nov 11, 2026
589646b
accel/ane: h17: send SET_SNE_PMU_BASE2 on the IO ring, and wait for t…
DjDeveloperr Nov 11, 2026
74b070c
accel/ane: h17: register the node without starting the firmware
DjDeveloperr Nov 11, 2026
992923c
accel/ane: h17: deactivate the ANE DARTs before ANE_SYS powers off
DjDeveloperr Nov 11, 2026
0579996
pmdomain: apple: count a T8140 domain off only once BUSY clears
DjDeveloperr Nov 11, 2026
0b5617b
pmdomain: apple: finish a T8140 domain's power-off before a sleep
DjDeveloperr Nov 11, 2026
5801e1f
nvme-apple: give a sleep's shutdown notification the controller's time
DjDeveloperr Nov 11, 2026
8ee99a7
nvme-apple: send a sleep's shutdown notification at suspend, as macOS…
DjDeveloperr Nov 11, 2026
c2b4f4b
iommu/apple-dart: let the cold ANE DARTs runtime-suspend
DjDeveloperr Nov 11, 2026
970ec8e
Merge integration/aurora cdd7ccf571db into feat/s2r
DjDeveloperr Nov 11, 2026
269dec7
pmdomain: apple: keep the noirq suspend's comment on its function
DjDeveloperr Nov 11, 2026
a2ec625
soc: apple: sleep: document apple_sleep_request_deep_once()
DjDeveloperr Nov 11, 2026
b8f5b1e
accel/ane: h17: drop the branches left from runtime parking
DjDeveloperr Nov 11, 2026
78edcab
Merge integration/aurora f9f14be0f15a into feat/s2r
DjDeveloperr Nov 11, 2026
7fedcbe
media: apple: isp: quiesce the T8140 coprocessor before its power-down
DjDeveloperr Nov 11, 2026
e0549e4
media: apple: isp: keep the T8140 firmware up 5 s after a stream, as …
DjDeveloperr Nov 11, 2026
2573357
Merge integration/aurora 608f76fd5068 into feat/s2r
DjDeveloperr Nov 12, 2026
24d7b2e
soc: apple: sep: rate-limit the sleep messages, and fix host tests fo…
DjDeveloperr Nov 12, 2026
f1f89c7
tools: asahi: sep-suspend-errors: stub the rate-limited log macros
DjDeveloperr Nov 12, 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
41 changes: 41 additions & 0 deletions .github/workflows/sep-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ on:
- 'drivers/soc/apple/**'
- 'include/uapi/linux/apple-sep.h'
- 'tools/aurora-sep/**'
- 'Kconfig'
- '**/Kconfig*'
- 'arch/arm64/configs/defconfig'
- 'drivers/usb/dwc3/**'
- 'include/linux/phy/apple-atc.h'
- 'scripts/ci/apple-dwc3-atc-compile.sh'
- '.github/workflows/sep-source.yml'

jobs:
Expand Down Expand Up @@ -116,3 +122,38 @@ jobs:
--make_options LLVM=1 \
--kunitconfig=drivers/soc/apple/sep.kunitconfig \
--jobs="$(nproc)" --timeout=900 'apple_sep*'

dwc3-atc-compile:
name: DWC3/ATC ${{ matrix.profile }}
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
strategy:
fail-fast: false
max-parallel: 2
matrix:
profile: [builtin-no-atc, modular-no-atc, builtin-modular-atc]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install arm64 C build dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y -q clang-18 lld-18 llvm-18 libelf-dev libssl-dev \
flex bison bc pkg-config make perl
echo "/usr/lib/llvm-18/bin" >> "$GITHUB_PATH"
- name: Compile the Apple DWC3 object with the resolved PHY profile
env:
PROFILE: ${{ matrix.profile }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: scripts/ci/apple-dwc3-atc-compile.sh "$PROFILE"
- name: Keep configuration and compiler receipts
if: always()
uses: actions/upload-artifact@v4
with:
name: dwc3-atc-${{ matrix.profile }}
path: ${{ runner.temp }}/dwc3-atc-${{ matrix.profile }}/artifacts/
retention-days: 14
13 changes: 13 additions & 0 deletions Documentation/PCI/controller/apple-t8140.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ recovery remain refused. Supporting these operations requires a proven engine
teardown/reset and endpoint recovery contract first. Renaming the provider
does not qualify those operations.

Deep sleep keeps both functions bound and the radio powered, with its firmware
running. Their drivers stop for it, the link goes through L2 and PERST#, and the SoC
powers the engine off. On the way back the engine's whole register file must read as it
did before the first command, the state the bootstrap checks for; if anything differs,
the radios stay down. Only then does the retained state reopen for one more validated
read, on the same memory, which the retrained link needs before native ECAM. The
functions' configuration is then restored and their drivers resume, with no firmware
load. If a driver finds that its side didn't survive, the host removes both functions,
which resets the chip, and scans again, so that they probe and load their firmware as at
boot. If the link didn't come back, the radio's rail is cycled first. An abandoned sleep
never ran that power-off, so it replays nothing. This needs tunables
from a loader that publishes them, and is refused otherwise.

Suspend-to-idle is allowed only after radio admission, with no IRQ fault,
idle command/FIFO checks and intact arena contents. Resume restores the
configuration banks after genpd power restoration without submitting another
Expand Down
12 changes: 11 additions & 1 deletion Documentation/devicetree/bindings/display/apple,dcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ properties:
description: Optional host display-engine interrupt sources.

mboxes:
maxItems: 1
minItems: 1
maxItems: 2

mbox-names:
minItems: 1
items:
- const: mbox
- const: secure

iommus:
maxItems: 1
Expand Down Expand Up @@ -145,6 +148,13 @@ properties:
items:
pattern: '^(dp-phy|typec[0-9]+)$'

apple,display-power:
$ref: /schemas/types.yaml#/definitions/phandle
description:
A node whose ps, pwrgate and pmc-dcp registers hold the display power
words this coprocessor's driver writes around a firmware restart, such
as an apple,t8140-display-power node.

apple,bw-scratch:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/display/apple,t8140-display-power.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple T8140 display power words

maintainers:
- Diljit Singh <hey@djdev.me>

description:
The words a display coprocessor's driver writes to power its domains off
and on around a restart of its firmware, as macOS does. A display
coprocessor names this node in its apple,display-power property. The words
belong to the power manager and the display block, so no driver binds it.

properties:
compatible:
const: apple,t8140-display-power

reg:
items:
- description: the display PMC word that counts the powered coprocessors
- description: the power manager's power state words
- description: the power manager's power gate words

reg-names:
items:
- const: pmc-dcp
- const: ps
- const: pwrgate

required:
- compatible
- reg
- reg-names

additionalProperties: false

examples:
- |
soc {
#address-cells = <2>;
#size-cells = <2>;

display-power@3028a9c14 {
compatible = "apple,t8140-display-power";
reg = <0x3 0x028a9c14 0x0 0x4>,
<0x3 0x00700000 0x0 0x14000>,
<0x3 0x00724000 0x0 0x1000>;
reg-names = "pmc-dcp", "ps", "pwrgate";
};
};
9 changes: 9 additions & 0 deletions Documentation/devicetree/bindings/dma/apple,sio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ allOf:
reg:
minItems: 3
maxItems: 3
reg-names:
items:
- const: asc
- const: auxiliary
- const: asc-tail
else:
if:
properties:
Expand Down Expand Up @@ -137,6 +142,10 @@ properties:

status: true

reg-names:
minItems: 1
maxItems: 3

'#dma-cells':
const: 1
description:
Expand Down
7 changes: 7 additions & 0 deletions Documentation/devicetree/bindings/gpu/apple,agx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ properties:
GFX supplier power cannot represent GPU work on firmware that keeps
its coprocessor domain powered while the cores are idle.

apple,pmp-report-entry:
$ref: /schemas/types.yaml#/definitions/phandle
description: |
PMP report entry that tells the PMP the GPU is in use. The driver withdraws
this request before it lowers the GPU's power state for a system sleep, and
makes it again after raising it.

apple,idle-off-delay-ms:
minimum: 2
maximum: 1000
Expand Down
76 changes: 74 additions & 2 deletions Documentation/devicetree/bindings/iommu/apple,dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ properties:
- description: DART registers
- description:
Address filter (DAPF) registers, which restrict the physical
addresses the DART lets its masters reach
addresses the DART lets its masters reach, or the slice of the
fabric filter (GAPF) that protects the power state of the
coprocessor CPU behind this DART, cleared to power that CPU down

reg-names:
minItems: 1
items:
- const: dart
- enum: [dapf, auxiliary]
- enum: [dapf, gapf, auxiliary]

interrupts:
maxItems: 1
Expand Down Expand Up @@ -117,6 +119,64 @@ properties:
may select a firmware-visible alias of the translation aperture.
A consumer may further specify its own aperture in its binding.

apple,dapf-ranges:
$ref: /schemas/types.yaml#/definitions/uint64-matrix
items:
items:
- description: First address of a range
- description: Last address of a range
description:
The address filter the loader programs into the dapf registers, one
entry per range. A sleep that reaches the hardware clears it, and the
DART writes it back before its consumer's firmware starts again.

apple,dapf-r20:
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
The last word of each filter entry, one per range in apple,dapf-ranges.
1 where absent.

apple,restore-on-power-up:
type: boolean
description:
Reset and restore the DART, and write its address filter back, every
time it powers up, even where its registers still read as they were
left. For a DART that keeps its values through a sleep in which the
SoC's sleep engine runs its consumer, but whose address filter only
takes effect once written again.

apple,sleep-prepare:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
items:
items:
- description: Register offset
- description: Value
description:
Register writes before a consumer that gates itself is told about a
firmware-driven system suspend, after the DART's state is saved. Streams
they stop are started again at the restore. Needs apple,sleep-restore.

apple,sleep-restore:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
items:
items:
- description: Register offset
- description: Value
description:
Register writes after such a suspend, before the translations are put
back. With this, the consumer saves and restores the DART around the
suspend, as the order relative to its firmware's start matters.

apple,sleep-restore-late:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
items:
items:
- description: Register offset
- description: Value
description:
Register writes after the translations are back and before the streams
are enabled.

apple,dma-offset:
$ref: /schemas/types.yaml#/definitions/uint64
description: >
Expand Down Expand Up @@ -168,6 +228,18 @@ properties:
Tree by the bootloader and required to initialize dynamically powered
DART instances.

apple,resume-tunable:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
items:
items:
- description: Register offset
- description: Mask to be applied to the register value
- description: Bits to be set after applying the mask
description: >
The same tuples for a DART whose bootloader has already applied them,
written back where a power-off lost them, before its consumer's
firmware starts again.

apple,bypass-sids:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
Expand Down
20 changes: 18 additions & 2 deletions Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ properties:
AOP setup-port mailbox with a separate register layout.
const: apple,t8140-aop-setup-mailbox

- description:
A coprocessor's secure RTBuddy port, the ADT's
iop,secure-rtbuddy-proxy. It is polled, with no interrupts described.
items:
- enum:
- apple,t8140-secure-rtbuddy-proxy
- const: apple,secure-rtbuddy-proxy

- description:
Later AOP setup-port mailboxes with the T8140 register layout.
items:
Expand Down Expand Up @@ -142,6 +150,16 @@ properties:
maxItems: 2

allOf:
- if:
not:
properties:
compatible:
contains:
const: apple,secure-rtbuddy-proxy
then:
required:
- interrupts
- interrupt-names
- if:
properties:
compatible:
Expand Down Expand Up @@ -220,8 +238,6 @@ allOf:
required:
- compatible
- reg
- interrupts
- interrupt-names
- "#mbox-cells"

additionalProperties: false
Expand Down
Loading
Loading