Repository navigation
arm64: dts: apple: lay out the M4 trees like the M1/M2 ones - #1166
Merged
Merged
Conversation
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>
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>
This was referenced Nov 7, 2026
This was referenced Nov 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.dtsiis the SoC. It now includest8132-gpu.dtsi,t8132-dcp.dtsi,t8132-dcpext.dtsiand the newt8132-pciec-tunables.dtsi. All six boards use one copy of these. The J713 and J715 used their own copies int8132-j713-gpu.dtsi,-display.dtsiand-dcpext.dtsi; those files are gone.t8132-jxxx.dtsiis shared by every board. It absorbst8132-board.dtsiplus the ATC0/ATC1 port controllers and the headphone codec, which each board repeated. Boards only label their connectors.t8132-laptop.dtsiis new and covers the J604, J713 and J715: keyboard, trackpad, Touch ID, backlight, speaker shutdown line, headphone card and front camera.t8132-desktop.dtsiis new and covers the J773g, J623 and J624: the third PCIe port and its Ethernet controller.t8132-j713-j715.dtsiandt8132-j623-j624.dtsiare the family files. Each board includest8132.dtsiand its family file, as on the M3.t8132-atc23.dtsiandt8132-apcie-port2.dtsistay opt-in per board. See "Left out".T604x:
t6041.dtsino longer deletes anything. It used to delete 194 nodes and 26 properties fromt604x.dtsi/t604x-pmgr.dtsi, then re-add the GPU, its mailbox and the P-core OPP tables. Nowt604x.dtsiandt604x-pmgr.dtsihold what both trees use. The T6040-only part moved to a newt6040-pmgr.dtsi(158 domains) and intot6040.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.dtsiis new and holds the body the J614c and J616c shared as two copies of about 930 lines each. Their.dtsfiles are now 92 and 57 lines.Style, all output-preserving:
statusis last in 57 nodes that had it elsewhere.&aop/&admac*/&i2c*blocks folded into one.AIC_IRQ/GPIO_ACTIVE_*with splitranges/interrupt-map.usb_drdNbecomesdwc3_N,typecN_con_*becomestypecN_connector_*, andgfx_mboxbecomesagx_mbox; the J713'stypecN_con_tbtis renamed too. Branches that still use the old labels can convert with theperlone-liner in fa1e8ad.Per-board identity, per commit
bytesmeans the dtb is byte-identical to the previous commit's.sortedmeansdtc -I dtb -O dts -soutput is identical.ordermeans 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.DIFFis a real change, listed further down. Boards not named in a row arebytes.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'sps_msr0_dartlabel andscaler0_dart's new power domain go tot6040-pmgr.dtsi/t6040.dtsi, the J614c/J616c boards includet6041-j614-j616-j575-scaler.dtsiright aftert6041.dtsi, andapple,color-gamutis 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 areorderagainst 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 issortedbecausestatusmoved int8132-j713-pmgr.dtsiand the adapter reads properties by name, anddrivers/soc/apple/t6041-gate-test.dtso, which isbytes.Real changes and their dtb diffs
/display-subsystemmoves to/soc/display-subsystem, and thedisp0alias 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.status = "okay"is added to 14 GPU and DCP nodes that had no status, and#address-cells/#size-cellsare dropped from the three DCPs. Their only child,piodma, has noreg, and/socgives 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.apple,tunable-debug,-fabric,-rcand the port'sapple,tunable. I decoded the ADTapciec0/1tunables: 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.pmgr_venc, and theps_jpg,ps_sio_cpu,ps_qspiandps_venc0_*domains. The J616c ADT entriessio,dart-sio,qspi,ave0,dart-ave0,jpeg0/1anddart-jpeg0/1have the same registers and interrupts as the J773s ADT's. Only three of the new nodes are enabled: the PMU (apple_m1_cpu_pmumatchesapple,t6040-pmu), the fixed clock and thepmgr_vencsyscon. Every device and domain stays disabled as on the T6040, so nothing new probes on the J616c apart from those three. The fabric parents ofps_jpg/ps_venc0_sysand the AVE'spmc_soc_maxfloor stay T6040-only; the AVE driver treatsperfas optional, as the T6041 AVD already does.preset1 apple,cropchanges 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), andisp-cam.caccepts the scaled preset. The J713 has its camera enabled, so its 720p view changes too.j616s-panel-identitytest checks it, so the J616s keeps 345 while the J616c says 346.status = "okay"is set onjpeg0,jpeg1, their DARTs andps_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 tot604x-j614-j616.dtsi. The J616s is unchanged.Checks
./linux-build/build kernel --profile asahi linux-m4-dts -- dtbson 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.dt-checkscannot show this today.dt-validatecrashes withKeyError: 'uint8-array'on every T8132 dtb, becauseapple,tunablehas incompatible types acrossapple,pcie.yaml,apple,dart.yamlandti,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.avoid_unnecessary_addr_sizewarnings are gone (6). The four boards that moved their display node in 76b6d84 gainsimple_bus_reg(4), as the J713 already had; the merge adds none.run.pyon macOS): 86 of 86 ok,j616s-panel-identityincluded.tools/asahi/t604x-cpu-order-tests.pypasses on J614s, J616s, J616s-tether and J616c, run in the build VM.tools/testing/m4-pmgr-policy/run.pyfails withnegative-control returned 2, expected 1, identically at base, so this series did not cause it.Image modulesbuilds don't apply.Left out
t604x-j614-j616.dtsi. The J616c differs from the J616s in live behaviour: it resets the trackpad through SMC GPIO lines rather thanapple,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./soc. This would also fix the hidden unit-address mismatches.t604x.dtsisays the boot loader edits these nodes by path.disp0_piodmaalias on the other T8132 boards.iomfb_m4.clooks 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.t8132-j713-pmgr.dtsi) on every T8132 board. It would disableps_dptx_phy, which the J773g framebuffer uses.ps_gfxand 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 int8132-pmgr.dtsibut there is no device of that name in the J713 ADT, which hasISP_CandISP_KAinstead. The dump has no PMGR offsets for 26.5.1, so I couldn't pin it down.pcie0registers or node paths on the J713.reserved-memoryplaceholders without unit names and theaop@390600000unit address are node renames that m1n1 may rely on. The J713/J715reg = <0 0 0 0>GPU placeholders stay as a board override, because the loader may fill them in place.pcie0node intot604x.dtsi. There are four board copies with different ports and bus ranges.pinctrlvspinctrl_ap, andpcie_dartvsdart_apcie0.Conflicts with open drafts
I trial-merged each PR head with this branch. #1132 and #1105 have merged and are carried over.
t8132-j604.dts,t8132-j773g.dts. These already conflict with the current tip.t8132.dtsi. Its binding conflicts predate this series.t6040.dtsi,t6041.dtsi. It removest6041.dtsideletions that this series removes too.t8132-dcp.dtsi,t8132-j713-pmgr.dtsi.t8132-j713-display.dtsiis now part oft8132-dcp.dtsiplus the J713 family file.t604x.dtsi.t6040.dtsi.t6041-j616c.dts.t6040.dtsi. These already conflict with the current tip.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 tot6040.dtsi/t6040-pmgr.dtsi.🤖 Generated with Claude Code