Skip to content

arm64: dts: apple: t8142: Give J813 and J815 the same SoC nodes - #2383

Draft
RyanTheTide wants to merge 3 commits into
integration/aurorafrom
spec-m5neo/t8142-air-parity
Draft

RyanTheTide wants to merge 3 commits into
integration/aurorafrom
spec-m5neo/t8142-air-parity

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The 13- and 15-inch M5 MacBook Air (J813, J815) are one T8142 die with a shared board dtsi, but several SoC-level nodes were only in t8142-j813.dts:

  • J815 did not include t8142-j813-j815-sleep.dtsi, although that file is written for both boards. J815 had no sleep controller, no PMU wake source, no dcp_power (so no DCP firmware stop), no DCP DART PS write-disable word and no cluster_pwrgate (the boot P core never powers down in WFI).
  • J813 did not enable the Neural Engine and the JPEG engines that J815 enables. Same nodes, same ADT entries (J813 27.0.1 ADT: ane ane-type 528, IRQs 751/764; jpeg0/jpeg1/dart-jpeg IRQs 1156/1159/1157, matching t8142-peripherals.dtsi).
  • t8142-j813.dts had the N1 PCIe block and the video encoder enables written twice.

Change

  • cluster_pwrgate, dcp_power, &dcp apple,display-power and the &dcp_dart ps-wr-dis words move into t8142-j813-j815.dtsi. They are PMGR/DCP words of the SoC.
  • apple,spmi-pmu-sources moves into the sleep node in t8142-j813-j815-sleep.dtsi (it names nub-spmi0 status word 0x600 bit 2, wake source NUB.SPMI0.SW3, which that file already lists from the J815 ADT).
  • t8142-j815.dts includes t8142-j813-j815-sleep.dtsi.
  • The VENC, ANE and JPEG enables move into t8142-j813-j815.dtsi, so J813 gets ANE and JPEG. aura hands the ANE preload over by the apple,t8142-ane compatible and disables the node when the ADT has no preload; JPEG needs no firmware.
  • The duplicate N1 and VENC blocks in t8142-j813.dts are dropped.

Testing

Built t8142-j813.dtb, t8142-j815.dtb, t8142-j704.dtb before and after, and compared them node by node with phandles resolved:

  • J813: only 9 status changes, all deliberate: ane, ane_dart0-2, ps_ane_sys, jpeg0, jpeg1, jpeg_dart, ps_jpg go to okay. Node order inside /soc changes (the moved nodes), values do not.
  • J815: gains the sleep controller, pcie-shared, cluster_pwrgate, dcp_power, apple,display-power on the DCP, the DCP DART ps-wr-dis reg/bit, apple,sleep-ssps on hpm0/hpm1, and a phandle on pcie0. Each of those nodes is identical to J813's. The one difference is the sleep node's apple,display-coprocessors: J813 lists dcpext0/1 through t8142-j813-dcpext.dtsi; J815 lists only the DCP until its external displays land (WIP: T8142 MacBook Airs (J813, J815): external displays over USB-C (on #1532) #1806).
  • J704: unchanged.
  • The first commit (duplicates) leaves t8142-j813.dtb byte-identical. The second leaves every J813 node and value as it was.
  • In-tree dtc, default flags: 0 warnings before and after on all three boards. W=1: J813 and J704 unchanged; J815 gains the two unique_unit_address_if_enabled notes J813 already has (power-gate/display-power at 0x380724000, power-management/sleep-controller at 0x380700000).
  • dt-validate (dtschema, processed from this tree's bindings): J815 clean before and after; J813 has the same single pre-existing disp0_piodma alias note before and after.

Still to run

Hardware rows, please. I have no M5 Air.

  • @m0d16l14n1 (J815): boot; cat /sys/power/mem_sleep; one s2idle cycle; one deep cycle with the usual apple_sleep test switches. Expected: the sleep controller probes, /sys/devices/system/cpu/cpuidle shows the boot core reaching its deep state, display stops and returns.
  • @sithglan, @gig3m, @DjDeveloperr (J813): boot, ls /dev/accel* (ANE), a JPEG decode through the V4L2 device, one s2idle and one deep cycle. Expected: no change in sleep behaviour; ANE and JPEG bind.
Details

Assisted-by: LLM (Claude:Opus 5.5)

The N1 PCIe functions (with their aliases) and the video encoder's
status overrides were each written twice in t8142-j813.dts, the second
copies coming in with merges. Drop the second copy of each. The built
t8142-j813.dtb is byte-identical before and after.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
t8142-j813-j815-sleep.dtsi describes suspend-to-RAM for both M5 Airs,
but only t8142-j813.dts included it, and the nodes around it were in
the J813 board file alone: the CPU cluster power gate, the internal
display's power words (dcp_power, and the DCP's apple,display-power),
the DCP DART's PS write-disable word and the PMU's SPMI wake source.
J815 therefore had no sleep controller, no DCP firmware stop, and its
boot P core never powered down in WFI.

All of them are words of the T8142 PMGR, DCP and nub-spmi0, the same on
both boards (the sleep dtsi already lists NUB.SPMI0.SW3 among the wake
sources taken from the J815 ADT). Move the cluster gate, dcp_power and
the DCP/DART properties into t8142-j813-j815.dtsi, the PMU source into
the sleep node, and include the sleep dtsi from t8142-j815.dts.

t8142-j813.dtb keeps every node and value (only the order of /soc
children changes). t8142-j815.dtb gains exactly J813's nodes, except
that the sleep node lists only the DCP as display coprocessor until
J815 describes its external displays.

Fixes: 4de8bf0 ("arm64: dts: apple: t8142-j813: Describe suspend-to-RAM")
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
J815 enables the Neural Engine and both JPEG engines; J813 left them
disabled although they are the same T8142 nodes, with the same ADT
entries (J813 27.0.1 ADT: ane ane-type 528, IRQs 751 and 764; jpeg0,
jpeg1 and dart-jpeg IRQs 1156, 1159 and 1157). The boot loader hands
the ANE preload over by the apple,t8142-ane compatible and disables the
node when there is none; the JPEG engines need no firmware.

Move the video encoder, ANE and JPEG enables into t8142-j813-j815.dtsi
so both boards share them. t8142-j815.dtb is unchanged; t8142-j813.dtb
changes only in those nine status properties.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@m0d16l14n1

m0d16l14n1 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

J815 (MacBook Air 15" M5) rows for this stack. Kernel = integration/aurora 0abc2f3 + #2383, #2325, #2328, #2384, #2385, #2330 (patch-ids identical to the current heads for #2383, #2384, #2385 and #2330; #2325 conflicts in t8142-j813.dts and t8142-j815.dts on top of #2383, I kept #2383's side, so #2325's and #2328's applied patches differ from the heads in those two files), plus our T8142 PRs. The J815's ANE and AVE firmware is 26B123, so #1899 and #1900 were also in.

Row Result
ANE (#2325/#2383) PASS: the camera-denoise network matches the macOS reference (luma 100% within 1)
AVE PASS: ffmpeg H.264 Baseline 150 frames, V4L2 H.264 and HEVC with B-frames 60 frames each, all decode
JPEG, both engines PASS: 720p and 1080p on video11 and video12, worst luma PSNR 42.6 dB
PMU (#2328) PASS: apple_t8142_pmu, 10 counters, cycles counted on P and E
Cluster power gate (#2328) not checked directly: apple-cluster-pwrgate is built in but logs nothing; the sleep controller's probe line reads clusters 0xf 0xf
btcentauri (#2330) binds at 0000:01:00.2 with the Beta transport, hci0 up and powered. btcentauri_t6050 also probes 01:00.2 and stays unbound. The first btcentauri probe returns -EBUSY until the Wi-Fi side has started the firmware; a reload binds. No pairing done
s2idle / deep (#2384/#2385) not run on this boot

No failed units, no Oops or WARN in dmesg. I'll post the sleep rows when I have them.

@gig3m

gig3m commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

J813 (MacBook Air 13" M5), macOS 27.2 stub. I tested the J813 side with #2325/#2328 instead. Commits 2 and 3 here conflict with them in t8142-j813.dts, and the J813 result is the same: the ANE, JPEG and their DARTs and power gates go to okay. I built this PR's head for J813 and compared it with our tree. Both enable the same engines. The other differences are nodes from PRs we carry (#2142, #1732, #2401) and this PR's newer base.

Commit 1 (the duplicate N1 and encoder blocks) applied, with one conflict: #1732 puts the sep alias inside the duplicated N1 block's aliases. Whichever of the two lands second will need to keep that alias.

Results (aura with aura#251 and aura#358):

🤖 Generated with Claude Code

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.

3 participants