Skip to content

arm64: dts: apple: give the remaining DARTs their engines' power domains - #1676

Merged
RyanTheTide merged 4 commits into
integration/aurorafrom
dts/dart-power-domains
Nov 12, 2026
Merged

RyanTheTide merged 4 commits into
integration/aurorafrom
dts/dart-power-domains

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #1668 for the SoCs not covered there or in the parallel T8103/T600x/T603x/T8122/T8132 PR. #1668 fixed the J713 boot panic: a DART probes as its own device, and when it names no power domain (or the wrong one), its first register read can land on an unpowered block. That read takes an SError and panics in apple_dart_readl.

I checked every apple,*-dart node in the T8112, T602x, T6034, T604x, T6050, T8140, T8142 and T8152 device trees against its consumers (iommus and iommu-map) on all 137 Apple boards. I then compared each candidate with the macOS 27.2.1 device trees, using the DeviceTree images in the public IPSW. Evidence rule: if the ADT gives the DART a PMGR vote of its own (clock-gates naming an X-DART device), use that vote's parent. Otherwise use the domain of the engine that names the DART in iommu-parent, as #1668 did.

One commit per SoC family:

Commit DARTs Was Now Evidence
t8112 m2_dart_apr_0, m2_dart_apr_1, m2_dart_scdc none ps_scodec ADT DARTs have no gates; the apr and scdc engines gate SCODEC; the T602x copies already use ps_scodec
t602x m2_dart_scaler0 (T6020/1/2) ps_avd_sys ps_msr0 ADT dart-scaler0 votes AVD-SYS-DART (the AVD DART's vote), while MSR0-DART (parent MSR0) is used by no node; dart-scaler1/3 vote MSR1-DART; the engine votes MSR0; the M1 Pro/Max/Ultra DARTs at the same address use ps_msr0
t602x m2_dart_scaler2 (T6022 die 1) ps_spi3 ps_msr0_die1 ADT dart-scaler2 votes 0xb6 without the die-1 bit, which is die 0's SPI3
t602x J475c and T6022 m2_dart_dispext{2,3,6,7}_0, m2_dart_dcpext{2,3,6,7} none the DCP's ps_dispextN_cpu0[_die1] ADT DARTs have no gates; the DCPs vote DISPEXTn_CPU0; the J414c/J416c copies in t6021-display2.dtsi already use these domains
t602x ane_dart0 ps_pmp ps_ane_sys ADT dart-ane0 votes ANE-SYS-DART (parent ANE_SYS); the T8103, T8112 and T600x ANE DARTs use ps_ane_sys
t6050 auss0_dart, rsm_dart none ps_auss, ps_debug_gated ADT DARTs have no gates; engines vote AUSS_V (parent AUSS) and DEBUG_GATED
t8142 scaler0_dart none ps_msr ADT DART has no gates; the scaler0 engine votes MSR-V (parent MSR)

Every node except ane_dart0 is disabled on every board, so only the ANE commit changes a current boot. ane_dart0 is enabled on J414s, J416s, J474s, J414c, J416c and J475c. Today it probes before anything has powered ANE_SYS, so it relies on the loader having left ANE_SYS on. ane_dart1 and ane_dart2 (on ps_ane_cpu, a child of ps_ane_sys) hold ANE_SYS on after they probe, so after probe nothing changes. It is a separate commit in case reviewers want to drop it.

Checked, no change:

  • USB4 PCIe-C tunnel DARTs (T8112, T602x, T604x): only the ACIO driver populates them, after the PCIe-C port is clocked. They are not boot-time probes.
  • T6040/T6041 PCIe DARTs: the APCIE power states are left to iBoot (status = "disabled"), except on J616s where they are always-on. Pointing a DART at a disabled domain would make it defer forever.
  • T8140 display DARTs: ps_disp_cpu is always-on and firmware-owned. ps_dispext0_cpu stays disabled until the loader's J700 dcpext group turns it on, so a domain on the DART could make it defer.
  • SEP DARTs: the SEP domain is always-on, or firmware-owned on T6050.
  • T8142 JPEG/APR/SCDC/SIO and all T8152 DARTs: their engines' domains have no power-state node in the DT yet.
  • All other engine DARTs (scaler, JPEG, AVE, AVD, ANE, ISP, SIO, USB) on these SoCs already match the ADT.
  • T6034: built from the T6031 files, so it is covered by the other PR.

Validation, build-checked only:

  • make dtbs W=1 for all 26 T8112, T602x, T6050 and T8142 boards: no new dtc warnings against the base.
  • apple-adt-coverage.py --report on J413, J716s and J873s: no broken paths.
  • dt-check-style on the changed files: clean.
  • A semantic DTB diff shows only the listed DART power-domains changes.

No hardware boot yet.

Before merge: the ane_dart0 commit (856b8d4) needs one boot on a T602x machine (any of J414s, J416s, J474s, J414c, J416c or J475c). Check that 285800000.iommu probes cleanly, that the ANE still binds, and that there is no SError. If no T602x tester is available, drop that commit from this merge and resubmit it as its own PR. The other commits only touch DARTs that are disabled on every board (the J475c/Ultra dispext/dcpext DARTs included), so build-checked is enough for them.

🤖 Generated with Claude Code

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through 49931e7 one commit at a time. For each DART I checked the domain of every engine that uses it in the DT, and checked the ADT evidence quoted in each commit message against the macOS device trees for J413, J414s, J475c, J180d, J873s and J813.

Commit DART(s) → domain Consumer engine domain ADT evidence in the commit Result
t8112 m2_dart_apr_0/1, m2_dart_scdc → ps_scodec m2_apr, m2_scdc on ps_scodec agrees OK
t602x m2_dart_scaler0 → ps_msr0 scaler0 on ps_msr0 agrees (the ADT DART vote names the AVD DART) OK
t602x m2_dart_scaler2 (T6022 die 1) → ps_msr0_die1 scaler2 on ps_msr0_die1 agrees (the ADT vote is missing the die-1 bit) OK
t602x J475c/T6022 dispext{2,3,6,7}/dcpext{2,3,6,7} DARTs → ps_dispextN_cpu0[_die1] DCPs on the same domains agrees OK
t602x ane_dart0 ps_pmp → ps_ane_sys ANE under ps_ane_sys agrees OK, needs a boot (see below)
t6050 rsm_dart → ps_debug_gated, auss0_dart → ps_auss rsm, usb_auss0 on the same agrees OK
t8142 scaler0_dart → ps_msr scaler0 on ps_msr agrees OK

DTBs: I built all 137 Apple DTBs with dtc, before (f173f7c) and after. 26 change: 8 T602x, 11 T6050, 4 T8112 and 3 T8142. The preprocessed sources differ only in power-domains lines. t6000-j316s, t6040-j616s and t8140-j700 come out byte-identical. In t8112-j413 only the three apr/scdc DARTs change, and all three stay disabled.

Hardware (J413, M2). One boot of the live Stage 2 with only the j413 DTB changed, run as an aura-try trial on the production kernel 7.3.0-aurora-fleet67:

  • The trial DTB is the live j413 DTB plus power-domains = <&ps_scodec> on iommu@27d024000, iommu@27d028000 and iommu@27d02c000. For this boot only, I also set the three DARTs to okay so the new domain gets exercised. The PR itself leaves them disabled.
  • All three bound to apple-dart, each with a device link to the scodec power controller. They runtime-suspend, and pm_genpd_summary shows scodec off. Writing on to their power/control powered scodec up, and auto powered it down again. No SError.
  • 0 DART faults, SELinux enforcing, 0 failed units, 0 AVCs. s2idle 3/3 (rtcwake on rtc1), Wi-Fi back after each resume.
  • Kernel errors: one new entry, a UBSAN shift-out-of-bounds in apple_dart_probe at dart->dma_max = DMA_BIT_MASK(dart->ias). DMA_BIT_MASK(n) is GENMASK_ULL((n) - 1, 0), so ias was 0: at least one of these DARTs read a zero VA width from PARAMS3 with only scodec on. This comes from my extra okay override, not from this PR. Before ProRes or SCDC gets enabled on T8112, someone should check whether these DARTs need another domain or clock to report valid params. The probe could also reject ias == 0 with an error rather than computing a mask from it.
  • The production boot afterwards was clean (0 kernel errors), and the Stage 2 hash was unchanged.
  • No trial was needed on J316s, J616s or J700, since their DTBs do not change.

Approving the series. ane_dart0 (856b8d4) is the only change to a node that is enabled, and it still needs the T602x boot listed in the description before merge.

…domains

The M2 ProRes engine (m2_apr) and its SCDC coprocessor (m2_scdc) name
ps_scodec, but their three DARTs (m2_dart_apr_0, m2_dart_apr_1 and
m2_dart_scdc) name no power domain. A DART probes as a device of its
own, so once these nodes are enabled the probe's first register read
lands on an unpowered block, takes an SError and panics the boot in
apple_dart_readl, as the T8132 scaler and JPEG DARTs did.

The J413 device tree (macOS 27.2.1) gives dart-apr (both of its
windows, 0x27d028000 and 0x27d024000) and dart-scdc no clock-gates of
their own; their engines, apr and scdc, gate SCODEC. macOS powers these
DARTs with their engines, so give each one the engines' domain, as the
T602x ProRes and SCDC DARTs have.

The nodes stay disabled, so no current boot changes.

Fixes: 168d614 ("arm64: dts: apple: describe disabled T8112 peripheral resources")
Signed-off-by: Diljit Singh <hey@djdev.me>
…r power domains

Two groups of disabled T602x DARTs name the wrong power domain, or none,
for their block. A DART probes as a device of its own, so once one is
enabled its first register read needs its block powered, or it takes an
SError and panics the boot in apple_dart_readl, as the T8132 scaler and
JPEG DARTs did.

Scaler DARTs. m2_dart_scaler0 names ps_avd_sys, and the M2 Ultra's die 1
copy, m2_dart_scaler2, names ps_spi3, a die 0 SPI controller. Both copy
the M2 device trees (macOS 27.2.1) literally, and those entries are
wrong there: dart-scaler0 votes AVD-SYS-DART, the vote of the AVD's
DART, and dart-scaler2 votes 0xb6 without the die 1 bit, which is die
0's SPI3. The PMGR table has an MSR0-DART vote, parent MSR0, that no node
uses, and the second scaler's DARTs (dart-scaler1, dart-scaler3) vote
MSR1-DART. The scaler engines vote MSR0 on their own die, and the M1
Pro/Max/Ultra scaler DARTs at the same address already name ps_msr0 and
ps_msr0_die1. Name the engine's domain: ps_msr0 on die 0, ps_msr0_die1
on die 1.

External DCP DARTs. The J475c's dispext2/dispext3 and the M2 Ultra's
dispext2/3/6/7 piodma and DCP DARTs name no domain, while their DCPs
name ps_dispextN_cpu0. These DARTs have no clock-gates in the Apple
device tree; their DCPs gate DISPEXTn_CPU0. Give each DART its DCP's
domain, as the J414c and J416c copies in t6021-display2.dtsi have.

All of these nodes stay disabled, so no current boot changes.

Fixes: c91d838 ("arm64: dts: apple: describe disabled T602x peripheral resources")
Signed-off-by: Diljit Singh <hey@djdev.me>
…ains

The T6050 AUSS USB block (usb_auss0) names ps_auss and the RSM block
names ps_debug_gated, but their DARTs (auss0_dart, rsm_dart) name no
power domain. A DART probes as a device of its own, so once one is
enabled its first register read lands on an unpowered block, takes an
SError and panics the boot in apple_dart_readl, as the T8132 scaler and
JPEG DARTs did.

The J714s device tree (macOS 27.2.1) gives dart-auss0 and dart-rsm no
clock-gates of their own; their engines vote AUSS_V (parent AUSS) and
DEBUG_GATED. macOS powers these DARTs with their engines, so give each
one its engine's domain. Both domains are disabled until a board
enables the block, and the DART then waits for its domain instead of
probing on an unpowered block.

The nodes stay disabled on every T6050 board, so no current boot
changes.

Fixes: 7e0f7c7 ("arm64: dts: apple: stage disabled T6050 peripheral inventories")
Signed-off-by: Diljit Singh <hey@djdev.me>
The T8142 scaler (scaler0) names ps_msr and ps_msr_ase_core, but its
DART, scaler0_dart, names no power domain. A DART probes as a device of
its own, so once the scaler is enabled the DART's first register read
lands on an unpowered block, takes an SError and panics the boot in
apple_dart_readl, as the T8132 scaler and JPEG DARTs did.

The J813 and J704 device trees (macOS 27.2.1) give dart-scaler no
clock-gates, which is what the node's comment said. That does not leave
the DART without a domain: its engine, scaler0, votes MSR-V, parent
MSR, and macOS powers the DART with it. Give the DART the engine's
domain, ps_msr, as the T8112, T8132 and T8140 scaler DARTs have.

The node stays disabled, so no current boot changes.

Fixes: 234da6d ("arm64: dts: apple: share T8142 die resources with canonical labels")
Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

The t602x ane_dart0 commit (ps_pmp -> ps_ane_sys, formerly 856b8d4) has moved to draft #1694 until someone boots it on T602x hardware. This branch is now the other four commits rebased onto the current integration/aurora. Their content is unchanged from what @RyanTheTide approved (git range-diff shows all four as =).

@DjDeveloperr DjDeveloperr reopened this Nov 12, 2026
@DjDeveloperr DjDeveloperr reopened this Nov 12, 2026
@RyanTheTide
RyanTheTide merged commit 2b4523c into integration/aurora Nov 12, 2026
2 of 5 checks passed
satchlj added a commit to satchlj/linux that referenced this pull request Nov 13, 2026
Carry the RSM and AUSS0 DART power domains from aurora-silicon#1676 into the loader-compatible layout. Also sync the ProRes register names/reset and DART aperture, JPEG register sizes and DART aperture, CLPC SMC supplier, and CPU PMU description added upstream since the previous merge.

Keep the identity-mapped board includes: including the shared modern peripheral layout would change installed-loader paths. Disabled inventory stays disabled; GPU handoff resources are unchanged.

Signed-off-by: Satya Benson <satya@benson.earth>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants