Repository navigation
arm64: dts: apple: t8142: Give J813 and J815 the same SoC nodes - #2383
RyanTheTide wants to merge 3 commits into
Conversation
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>
|
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.
No failed units, no Oops or WARN in dmesg. I'll post the sleep rows when I have them. |
|
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 Commit 1 (the duplicate N1 and encoder blocks) applied, with one conflict: #1732 puts the Results (aura with aura#251 and aura#358):
🤖 Generated with Claude Code |
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:t8142-j813-j815-sleep.dtsi, although that file is written for both boards. J815 had no sleep controller, no PMU wake source, nodcp_power(so no DCP firmware stop), no DCP DART PS write-disable word and nocluster_pwrgate(the boot P core never powers down in WFI).aneane-type 528, IRQs 751/764;jpeg0/jpeg1/dart-jpegIRQs 1156/1159/1157, matchingt8142-peripherals.dtsi).t8142-j813.dtshad the N1 PCIe block and the video encoder enables written twice.Change
cluster_pwrgate,dcp_power,&dcp apple,display-powerand the&dcp_dartps-wr-dis words move intot8142-j813-j815.dtsi. They are PMGR/DCP words of the SoC.apple,spmi-pmu-sourcesmoves into the sleep node int8142-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.dtsincludest8142-j813-j815-sleep.dtsi.t8142-j813-j815.dtsi, so J813 gets ANE and JPEG. aura hands the ANE preload over by theapple,t8142-anecompatible and disables the node when the ADT has no preload; JPEG needs no firmware.t8142-j813.dtsare dropped.Testing
Built
t8142-j813.dtb,t8142-j815.dtb,t8142-j704.dtbbefore and after, and compared them node by node with phandles resolved:statuschanges, all deliberate:ane,ane_dart0-2,ps_ane_sys,jpeg0,jpeg1,jpeg_dart,ps_jpggo to okay. Node order inside/socchanges (the moved nodes), values do not.pcie-shared,cluster_pwrgate,dcp_power,apple,display-poweron the DCP, the DCP DARTps-wr-disreg/bit,apple,sleep-sspson hpm0/hpm1, and a phandle onpcie0. Each of those nodes is identical to J813's. The one difference is the sleep node'sapple,display-coprocessors: J813 lists dcpext0/1 throught8142-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).t8142-j813.dtbbyte-identical. The second leaves every J813 node and value as it was.unique_unit_address_if_enablednotes J813 already has (power-gate/display-powerat 0x380724000,power-management/sleep-controllerat 0x380700000).disp0_piodmaalias note before and after.Still to run
Hardware rows, please. I have no M5 Air.
cat /sys/power/mem_sleep; one s2idle cycle; one deep cycle with the usualapple_sleeptest switches. Expected: the sleep controller probes,/sys/devices/system/cpu/cpuidleshows the boot core reaching its deep state, display stops and returns.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
Companion code changes that let J815 take the same sleep paths once these nodes exist: soc: apple: sleep, mfd: macsmc, drm/apple: Select the T8142 sleep paths by hardware, not J813 #2384 (sleep/SMC/DCP), wifi: apple: centauri: Quiesce Alpha for sleep on every N1 board #2385 (N1 Wi-Fi).
Not changed: the
TEST:override att8142-j813-dcpext.dtsi:298(dcpextapple,display-powerand DART ps-wr-dis) stays as it is. Withdcp_powernow in the shared dtsi, the dcpext dtsi resolves on either board.Not changed: J815 external displays (WIP: T8142 MacBook Airs (J813, J815): external displays over USB-C (on #1532) #1806), USB4 (Enable native rear-port USB4 and PCIe storage on J813 #2142, arm64: dts: apple: enable the J813 front USB4 port #2238), and J813's GPU
fw-textreservation.On J815 without dcpext nodes, deep sleep with
apple_sleep.dispextrefuses while iBoot's external DCPs are up ("not in apple,display-coprocessors"). That is the driver's fail-closed path; WIP: T8142 MacBook Airs (J813, J815): external displays over USB-C (on #1532) #1806 removes it.The sleep node's own header states the J813 and J815 ADTs agree for every block, wake source, GPIO and PCIe window it lists. pinctrl_ap pin 192 (radio PERST) is reserved on both boards.
Original authors: cluster power gate gig3m (c58ab8c), suspend-to-RAM nodes m0d16l14n1 (4de8bf0), PMU wake source sithglan (728db04), ANE/JPEG enables on J815 m0d16l14n1 (33d8f13, c3c1417).
Evidence:
traces/kernel/20261119-spec-m5neo/t8142-air-parity/on the lab disk (dtc dumps, comparison output).Assisted-by: LLM (Claude:Opus 5.5)