Skip to content

arm64: dts: apple: lay out the M4 trees like the M1/M2 ones - #1166

Merged
DjDeveloperr merged 18 commits into
integration/aurorafrom
dts/m4-asahi-layout
Nov 7, 2026
Merged

DjDeveloperr merged 18 commits into
integration/aurorafrom
dts/m4-asahi-layout

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Restructures the M4 device trees (T8132, T6040, T6041) the way the M1, M2 and M3 trees are laid out. Every commit is either output-preserving, which I checked per board below, or a separate real change with its dtb diff listed.

New layout

T8132:

  • t8132.dtsi is the SoC. It now includes t8132-gpu.dtsi, t8132-dcp.dtsi, t8132-dcpext.dtsi and the new t8132-pciec-tunables.dtsi. All six boards use one copy of these. The J713 and J715 used their own copies in t8132-j713-gpu.dtsi, -display.dtsi and -dcpext.dtsi; those files are gone.
  • t8132-jxxx.dtsi is shared by every board. It absorbs t8132-board.dtsi plus the ATC0/ATC1 port controllers and the headphone codec, which each board repeated. Boards only label their connectors.
  • t8132-laptop.dtsi is new and covers the J604, J713 and J715: keyboard, trackpad, Touch ID, backlight, speaker shutdown line, headphone card and front camera.
  • t8132-desktop.dtsi is new and covers the J773g, J623 and J624: the third PCIe port and its Ethernet controller.
  • t8132-j713-j715.dtsi and t8132-j623-j624.dtsi are the family files. Each board includes t8132.dtsi and its family file, as on the M3.
  • t8132-atc23.dtsi and t8132-apcie-port2.dtsi stay opt-in per board. See "Left out".

T604x:

  • t6041.dtsi no longer deletes anything. It used to delete 194 nodes and 26 properties from t604x.dtsi/t604x-pmgr.dtsi, then re-add the GPU, its mailbox and the P-core OPP tables. Now t604x.dtsi and t604x-pmgr.dtsi hold what both trees use. The T6040-only part moved to a new t6040-pmgr.dtsi (158 domains) and into t6040.dtsi. The J773s and J616c ADTs list the same PMGR domains at the same offsets, so the split records what each tree has qualified, not a hardware difference. The file headers say so.
  • t6041-j614c-j616c.dtsi is new and holds the body the J614c and J616c shared as two copies of about 930 lines each. Their .dts files are now 92 and 57 lines.

Style, all output-preserving:

  • status is last in 57 nodes that had it elsewhere.
  • 65 one-line nodes are expanded, and repeated &aop/&admac*/&i2c* blocks folded into one.
  • Raw cells in the four copies of the T604x PCIe node are now AIC_IRQ/GPIO_ACTIVE_* with split ranges/interrupt-map.
  • The longest comments are shorter; the 82-line thermal comment is now 21 lines.
  • Labels follow the rest of the Apple trees. T604x usb_drdN becomes dwc3_N, typecN_con_* becomes typecN_connector_*, and gfx_mbox becomes agx_mbox; the J713's typecN_con_tbt is renamed too. Branches that still use the old labels can convert with the perl one-liner in fa1e8ad.

Per-board identity, per commit

bytes means the dtb is byte-identical to the previous commit's. sorted means dtc -I dtb -O dts -s output is identical. order means the nodes and properties are identical and every phandle reference points at the same node: only node order, and therefore phandle numbers, moved. I checked this by resolving every reference to its target path. DIFF is a real change, listed further down. Boards not named in a row are bytes.

commit J614s J616s J616s-tether J773s J575c J614c J616c J604 J623 J624 J713 J715 J773g
76b6d84 display under /soc DIFF DIFF DIFF DIFF
1027007 J713 GPU/DCP okay DIFF DIFF
411ee8b J713 uses shared files sorted sorted
3d35324 SoC/common/family split order order order order order order
5aa0279 PCIe-C tunables to SoC DIFF DIFF DIFF DIFF
c5fd88e T6040-only blocks order order order order order order order
e47365e T6041 PMU/JPEG/AVE/SIO/QSPI order order order order DIFF DIFF DIFF
969cd60 720p crop DIFF DIFF DIFF DIFF DIFF
d3a3629 J616s panel width DIFF DIFF
5ee12f0 revert J616s width DIFF DIFF
6ed01be JPEG on J614s DIFF
8a947b9 J614c/J616c body sorted sorted
fa1e8ad labels
1f1f0e6 status last sorted sorted sorted sorted sorted sorted sorted sorted sorted sorted sorted sorted
875e481 one-line nodes, raw cells sorted sorted sorted sorted sorted sorted sorted
c23a8f0 comments
108975e J713 PMGR note

5f0304b merges integration/aurora at 3b2861c, which adds #1132 (disabled M4 Max scalers) and #1105 (panel gamut from the ADT). The merge ports those changes into the new layout. ps_msr0's ps_msr0_dart label and scaler0_dart's new power domain go to t6040-pmgr.dtsi/t6040.dtsi, the J614c/J616c boards include t6041-j614-j616-j575-scaler.dtsi right after t6041.dtsi, and apple,color-gamut is gone from the shared J614c/J616c panel. Against the tip, every board now differs exactly as the branch differed from its previous base; I compared the canonical diffs board by board. J616s, J616s-tether and J773s are order against the tip, and the other boards differ only by the real changes below.

The two driver-side blobs that use these files are drivers/soc/apple/t8132-platform-data.dts, the J713 legacy-loader adapter, which is sorted because status moved in t8132-j713-pmgr.dtsi and the adapter reads properties by name, and drivers/soc/apple/t6041-gate-test.dtso, which is bytes.

Real changes and their dtb diffs

  • 76b6d84, J604, J623, J624, J773g. /display-subsystem moves to /soc/display-subsystem, and the disp0 alias follows it. That is where the J713, the only booted T8132 board, has it, and where the M1 and M2 trees put it. The node stays disabled.
  • 1027007, J713 and J715. status = "okay" is added to 14 GPU and DCP nodes that had no status, and #address-cells/#size-cells are dropped from the three DCPs. Their only child, piodma, has no reg, and /soc gives the same 2/2. No behaviour change. This removes 6 W=1 warnings and lets the J713 enable the shared, disabled-by-default nodes from its board file.
  • 5aa0279, J604, J623, J624, J773g. Their two disabled USB4 PCIe tunnels gain apple,tunable-debug, -fabric, -rc and the port's apple,tunable. I decoded the ADT apciec0/1 tunables: they match the DT values in both the J713 and the J773g ADT, and the J715 ADT agrees with the J713. J713 and J715 are byte-identical.
  • e47365e, J575c, J614c, J616c. 23 nodes are added: the CPU PMU, both JPEG engines and their DARTs, AVE0 and its two DARTs, SIO with its DART and mailbox, QSPI, the 200 MHz clock, pmgr_venc, and the ps_jpg, ps_sio_cpu, ps_qspi and ps_venc0_* domains. The J616c ADT entries sio, dart-sio, qspi, ave0, dart-ave0, jpeg0/1 and dart-jpeg0/1 have the same registers and interrupts as the J773s ADT's. Only three of the new nodes are enabled: the PMU (apple_m1_cpu_pmu matches apple,t6040-pmu), the fixed clock and the pmgr_venc syscon. Every device and domain stays disabled as on the T6040, so nothing new probes on the J616c apart from those three. The fabric parents of ps_jpg/ps_venc0_sys and the AVE's pmc_soc_max floor stay T6040-only; the AVE driver treats perf as optional, as the T6041 AVD already does.
  • 969cd60, J604, J623, J624, J713, J715. preset1 apple,crop changes from <0 0 1280 720> to <0 0 1920 1080>. This is the IMX958 crop conflict. The T8132 still had the off-centre 720p crop that 99ec97e fixed on the J616s. The T8132 ISP has the scaler (scl1), and isp-cam.c accepts the scaled preset. The J713 has its camera enabled, so its 720p view changes too.
  • d3a3629, the J616s panel width change from 345 to 346 mm, is reverted in 5ee12f0. The J616s EDID publishes 345 mm and apple-dcp's j616s-panel-identity test checks it, so the J616s keeps 345 while the J616c says 346.
  • 6ed01be, J614s. status = "okay" is set on jpeg0, jpeg1, their DARTs and ps_jpg. 69bcf72 enabled them on the J616s only, with no reason for leaving the J614s out. They are SoC-internal M2M codecs on the same T6040, so the enable moved to t604x-j614-j616.dtsi. The J616s is unchanged.

Checks

  • ./linux-build/build kernel --profile asahi linux-m4-dts -- dtbs on the merge: exit 0, no warnings on the M4 dtbs. The kbuild dtbs are byte-identical to my host dtc pipeline for all 13 boards, which I used for the per-commit table above.
  • CHECK_DTBS, using dt-validate with the merged tree's schema on the tip and the merge: 41 warning lines at both, none new and none gone. CI's dt-checks cannot show this today. dt-validate crashes with KeyError: 'uint8-array' on every T8132 dtb, because apple,tunable has incompatible types across apple,pcie.yaml, apple,dart.yaml and ti,cd2e22.yaml. The traceback line is the same at base and head, so CI passes without having validated those boards. I patched my local dtschema copy around the crash to get the numbers above. The binding conflict itself is not fixed here.
  • dtc W=1: 85 warnings on the tip, 83 on the merge. The DCP avoid_unnecessary_addr_size warnings are gone (6). The four boards that moved their display node in 76b6d84 gain simple_bus_reg (4), as the J713 already had; the merge adds none.
  • apple-dcp selftests (run.py on macOS): 86 of 86 ok, j616s-panel-identity included.
  • tools/asahi/t604x-cpu-order-tests.py passes on J614s, J616s, J616s-tether and J616c, run in the build VM.
  • tools/testing/m4-pmgr-policy/run.py fails with negative-control returned 2, expected 1, identically at base, so this series did not cause it.
  • No driver files changed, so the host harnesses and Image modules builds don't apply.

Left out

  • J616c on t604x-j614-j616.dtsi. The J616c differs from the J616s in live behaviour: it resets the trackpad through SMC GPIO lines rather than apple,afe-smc, its PCIe has no SD-reader port (pci@1,0) or second DART, and its keyboard layout id differs. Choosing one side would change a working machine, so the J614c/J616c share their own body for now.
  • T6041 PMGR domains beyond what J616c qualified. The ADTs agree on them, but describing the 152 others as enabled would let genpd power off domains that iBoot left on.
  • Moving T604x nodes under /soc. This would also fix the hidden unit-address mismatches. t604x.dtsi says the boot loader edits these nodes by path.
  • disp0_piodma alias on the other T8132 boards. iomfb_m4.c looks it up, but the underscore already fails the aliases schema on the J713/J715 and would add 4 CHECK_DTBS lines. A hyphenated alias needs a driver fallback first.
  • The J713 PMGR policy (t8132-j713-pmgr.dtsi) on every T8132 board. It would disable ps_dptx_phy, which the J773g framebuffer uses.
  • The 9 domains the J713 policy disables and the board re-enables. These are ps_gfx and the ATC0/1 PCIe and CIO domains. The legacy-loader adapter keeps the 8 ATC ones disabled. 108975e documents this; changing it would change the adapter's behaviour on J713.
  • isp_dprx. It is in t8132-pmgr.dtsi but there is no device of that name in the J713 ADT, which has ISP_C and ISP_KA instead. The dump has no PMGR offsets for 26.5.1, so I couldn't pin it down.
  • ATC2/3, the third PCIe port, and the ISP placeholders' unit names on every T8132 board. These change the pcie0 registers or node paths on the J713.
  • Remaining W=1 warnings. The reserved-memory placeholders without unit names and the aop@390600000 unit address are node renames that m1n1 may rely on. The J713/J715 reg = <0 0 0 0> GPU placeholders stay as a board override, because the loader may fill them in place.
  • Hoisting the T604x pcie0 node into t604x.dtsi. There are four board copies with different ports and bus ranges.
  • Other mixed labels. For example pinctrl vs pinctrl_ap, and pcie_dart vs dart_apcie0.

Conflicts with open drafts

I trial-merged each PR head with this branch. #1132 and #1105 have merged and are carried over.

Most of these move content rather than change it, so a conflict usually means re-applying the draft's hunk to the file the node now lives in: J616c body to t6041-j614c-j616c.dtsi, J713 SoC overrides to the shared SoC files, and T6040-only nodes to t6040.dtsi/t6040-pmgr.dtsi.

🤖 Generated with Claude Code

The J713 describes its display subsystem at /soc/display-subsystem, and
the shared t8132-dcp.dtsi at /display-subsystem. Use the J713's place,
which is also where the M1 and M2 trees put it, so all T8132 boards can
share one description. The J713 is the only booted T8132 board and its
loader handoff is qualified with this layout.

The node stays disabled. The disp0 alias follows it on the J604, J623,
J624 and J773g; the J713 and J715 trees do not change.

Signed-off-by: Diljit Singh <hey@djdev.me>
The J713 GPU and DCP files enable their nodes by leaving status out; the
shared T8132 files, which the J713 is about to use, describe them
disabled. Say status = "okay" on the J713 so it can enable them the same
way from its board file.

Also drop #address-cells and #size-cells from its three DCPs. Their only
child, piodma, has no reg, and /soc gives the same 2/2. This removes
three W=1 avoid_unnecessary_addr_size warnings per board.

No behaviour change. The J713 and J715 dtbs gain status = "okay" on 14
nodes and lose the six cell properties; nothing else changes.

Signed-off-by: Diljit Singh <hey@djdev.me>
The J713 and J715 kept their own copies of the T8132 GPU, internal and
external DCP, ISP and board wiring (t8132-j713-gpu.dtsi,
t8132-j713-display.dtsi, t8132-j713-dcpext.dtsi and the first half of
t8132-j713-j715.dtsi), while the J604, J623, J624 and J773g use
t8132-gpu.dtsi, t8132-dcp.dtsi, t8132-dcpext.dtsi, t8132-isp.dtsi and
t8132-board.dtsi. Use the shared files on the Airs too, and keep only
what differs in t8132-j713-j715.dtsi: the enables, the panel size and
J713 native-handoff flags, the port controllers, the keyboard, trackpad,
Touch ID and backlight, the radio's firmware island, the hwmon keys and
the external display routes.

No output change: the J713 and J715 dtbs are identical under
dtc -I dtb -O dts -s; the other dtbs are byte-identical.

Signed-off-by: Diljit Singh <hey@djdev.me>
…y files

Lay the T8132 trees out like the M1, M2 and M3 ones:

- t8132.dtsi includes the GPU and the internal and external DCPs, which
  every board now uses.
- t8132-jxxx.dtsi takes t8132-board.dtsi, which every board included,
  and the parts each board repeated: the headphone codec on i2c1 and
  the ATC0/ATC1 port controllers. Boards only label the connectors.
- t8132-laptop.dtsi holds what the J604, J713 and J715 share: the
  keyboard, trackpad, Touch ID, backlight, speaker shutdown line,
  headphone card, AOP audio streams and the front camera.
- t8132-desktop.dtsi holds what the J773g, J623 and J624 share: the
  third PCIe port and its Ethernet controller.
- t8132-j713-j715.dtsi and t8132-j623-j624.dtsi include those, and each
  board includes t8132.dtsi and its family file.

No output change: every T8132 dtb has the same nodes and properties,
and its phandle references point at the same nodes; only node order and
phandle numbers move. The T604x dtbs are byte-identical.

Signed-off-by: Diljit Singh <hey@djdev.me>
t8132-j713-pciec-tunables.dtsi holds the USB4 PCIe tunnel calibration
(ADT apciec0/1 atc-apcie-debug, -fabric and -rc tunables and the
bridge's apcie-config-tunables). These are SoC values, not J713 ones:
all of them match in the J713 and J773g ADTs, and the J715 ADT agrees
with the J713. Rename the file to t8132-pciec-tunables.dtsi and include
it from t8132.dtsi.

The J713 and J715 dtbs are byte-identical. The J604, J623, J624 and
J773g dtbs gain the eight tunable properties on their PCIe-C nodes,
which stay disabled.

Signed-off-by: Diljit Singh <hey@djdev.me>
t604x.dtsi and t604x-pmgr.dtsi describe everything the T6040 tree uses,
and t6041.dtsi deletes the 194 nodes and 26 properties the J616c has not
qualified, then re-adds the GPU, its mailbox and the P-core OPP tables.

Turn that around. t604x.dtsi and t604x-pmgr.dtsi now hold only what
both trees use. The rest moves to the T6040 side: the 158 power domains
into a new t6040-pmgr.dtsi, and the other blocks, the CPU PMU, the
Abbey PMIC and the properties t6041.dtsi deleted into t6040.dtsi.
t6041.dtsi no longer deletes anything; it keeps its own GPU, OPP
tables, Chapel PMIC and register overrides.

The J773s and J616c ADTs list the same PMGR domains at the same
offsets, so this records what each tree has qualified, not a hardware
difference.

No output change: every T604x dtb has the same nodes and properties,
and its phandle references point at the same nodes; only node order and
phandle numbers move. The T8132 dtbs are byte-identical.

Signed-off-by: Diljit Singh <hey@djdev.me>
The T6041 tree left out the CPU PMU, both JPEG engines, the first video
encoder (AVE0), the SIO coprocessor and the QSPI controller, although
they have drivers and the J616c ADT lists them: sio, dart-sio, qspi,
ave0, dart-ave0, jpeg0, jpeg1 and their DARTs have the same registers
and interrupts as in the J773s (T6040) ADT. The CPUs are the T6040's,
which apple_m1_cpu_pmu supports.

Move these blocks and their power domains from the T6040 files to
t604x.dtsi and t604x-pmgr.dtsi. As on the T6040, the devices and their
domains stay disabled until a board enables them. The fabric parents of
ps_jpg and ps_venc0_sys, and the AVE's PMC performance floor, stay
T6040-only: the T6041 tree does not describe them, as for the AVD.

The J575c, J614c and J616c dtbs gain 23 nodes. Only three are enabled:
the CPU PMU, the 200 MHz QSPI reference clock and the VENC PMGR syscon,
whose domains are disabled. The T6040 and T8132 dtbs do not change
(identical under dtc -s apart from phandle numbers, or byte-identical).

Signed-off-by: Diljit Singh <hey@djdev.me>
The T8132 1280x720 preset crops the top-left 1280x720 corner of the
1920x1080 window that firmware configuration 5 delivers, as the J616s
preset did before 99ec97e ("arm64: dts: apple: t604x-j614-j616:
scale the 720p camera preset"): a 720p stream shows an off-centre view
about two thirds as wide as the 1080p one.

Crop the whole window and let the scaler bring it down, as on the J616s.
The T8132 ISP has the scaler (apple_isp_hw_t8132.scl1), and isp-cam.c
accepts a crop at the origin with the output's aspect ratio.

The J604, J623, J624, J713 and J715 dtbs change only in preset1's
apple,crop, from <0 0 1280 720> to <0 0 1920 1080>.

Signed-off-by: Diljit Singh <hey@djdev.me>
The J616s panel is 345 mm wide, the J616c's 346 mm, for the same
3456x2234 panel at 254 ppi: 3456 / 254 in = 345.6 mm. Every other
16-inch MacBook Pro tree (J316, J416, J516) rounds it to 346 mm. Use 346
on the J616s too. The DCP driver only reports it as the physical size.

The J616s and J616s-tether dtbs change only in the panel's width-mm.

Signed-off-by: Diljit Singh <hey@djdev.me>
69bcf72 ("arm64: dts: apple: t6040-j616s: enable the JPEG engines")
enabled both JPEG engines, their DARTs and the JPG power domain on the
J616s only, and the J614s left them off with no reason given. They are
SoC-internal M2M codecs with no board wiring, and the J614s has the same
T6040. Enable them in the shared J614/J616 file.

The J614s dtb changes only in status = "okay" on jpeg0, jpeg1, their
DARTs and ps_jpg. The J616s dtb is unchanged under dtc -s.

Signed-off-by: Diljit Singh <hey@djdev.me>
The J614c tree is a copy of the J616c's with its own panel, Wi-Fi
island, firmware names and disabled speakers. Move what they share
into t6041-j614c-j616c.dtsi and keep only those differences in the
board files. The J614c's "guess" notes move to its header.

They still do not use t604x-j614-j616.dtsi: the J616c's trackpad
resets, PCIe, keyboard and display chains differ from the J616s's and
are qualified as they are.

No output change: the J614c and J616c dtbs are identical under
dtc -I dtb -O dts -s; the other dtbs are byte-identical.

Signed-off-by: Diljit Singh <hey@djdev.me>
The T604x trees label their USB controllers usb_drdN, their Type-C
endpoints typecN_con_hs/ss/tbt and the GPU mailbox gfx_mbox, where
every other Apple tree, the T8132 included, uses dwc3_N,
typecN_connector_hs/ss and agx_mbox. Rename them, and the J713's
typecN_con_tbt to typecN_connector_tbt.

A tree that still uses the old labels can be converted with:

  perl -pi -e 's/\busb_drd(\d+)/dwc3_$1/g;
    s/\btypec(\d)_con_(hs|ss|tbt)\b/typec$1_connector_$2/g;
    s/\bgfx_mbox\b/agx_mbox/g'

No output change: labels are not in these dtbs, which are byte-identical.

Signed-off-by: Diljit Singh <hey@djdev.me>
Move status after the other properties of each node, before its child
nodes, as the DTS coding style asks; 57 nodes had it elsewhere. A
one-line comment about the status moves with it.

No output change: the dtbs are identical under dtc -I dtb -O dts -s.

Signed-off-by: Diljit Singh <hey@djdev.me>
The J614c/J616c, J575c, J614s and J773s sources still have parts that
read like a decompiled tree:

- 65 one-line nodes ('temperature-Tpx0 { apple,key-id = ...; };',
  '&i2c1 { nonposted-mmio; };'), now one statement per line;
- repeated &aop, &admac0, &admac1, &aop_dart and &i2c1-3 blocks in the
  J614c/J616c body, now folded into the first block for each;
- raw cells in the four copies of the PCIe controller node: interrupts
  <0 0x6bb 4> is <AIC_IRQ 1723 IRQ_TYPE_LEVEL_HIGH>, the GPIO flags are
  GPIO_ACTIVE_HIGH/LOW, and ranges and interrupt-map are split per
  entry, with #address-cells before #size-cells.

No output change: the dtbs are identical under dtc -I dtb -O dts -s.

Signed-off-by: Diljit Singh <hey@djdev.me>
Cut the 82-line thermal zone comment in t6040-gpu-thermal.dtsi to the
facts the values depend on, and tighten the SMC key, OPP and PMC
comments. Drop the issue reference from the DISPEXT0 PMP comment, and
point the T8132 USB4 comment at t8132-pciec-tunables.dtsi, which now
holds the PCIe-C calibration.

No output change: the dtbs are byte-identical.

Signed-off-by: Diljit Singh <hey@djdev.me>
… board

t8132-j713-pmgr.dtsi disables ps_gfx and the ATC0/ATC1 PCIe and CIO
domains, which the J713 and J715 trees then enable for the GPU and USB4.
The legacy-loader adapter, which includes the policy too, enables only
ps_gfx. Say so in the header, so the policy and the later files do not
read as a contradiction.

Every label in the policy names a device in the J713 ADT pmgr table
except isp_dprx; the ADT has ISP_C and ISP_KA instead, which the tree
does not describe. That is left as it is.

Comment only; the dtbs are byte-identical.

Signed-off-by: Diljit Singh <hey@djdev.me>
…dth"

The J616s publishes 345 mm in its panel EDID (75e9502), and the
apple-dcp j616s-panel-identity test checks it against this node. Keep the
hardware-tested value; 3456 px at 254 ppi is 345.6 mm either way.

This reverts commit d3a3629.

Signed-off-by: Diljit Singh <hey@djdev.me>
Take #1132 (disabled M4 Max scalers), #1148 and #1105 (panel gamut from
the ADT), and carry their M4 changes into the new layout:

- ps_msr0's ps_msr0_dart label and comment, and scaler0_dart's
  power-domains = <&ps_msr0_dart>, go to t6040-pmgr.dtsi and t6040.dtsi,
  where those T6040-only nodes now live;
- t6041-j614-j616-j575-scaler.dtsi is included by the J614c and J616c
  board files, after t6041.dtsi as before;
- apple,color-gamut goes from the shared J614c/J616c panel.

Each M4 dtb differs from the integration/aurora tip exactly as it
differed from this branch's previous base.

Signed-off-by: Diljit Singh <hey@djdev.me>
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.

1 participant