Repository navigation
arm64: dts: apple: add the T6040 (M4 Pro) SoC and the MacBook Pro J616s - #396
Merged
RyanTheTide merged 16 commits intoOct 23, 2026
Merged
RyanTheTide merged 16 commits into
RyanTheTide merged 16 commits into
Conversation
The M4 Pro/Max (T6041) compatibles of the SART, the DockChannel FIFO, the MTP helper and the DCP follow the patterns of the earlier SoCs; add them next to the T6041 compatibles already documented. The T6041 cluster cpufreq blocks are driven like the T8112's, as the T6020's are, so allow the T6041 entry with the T8112 fallback; the T6041 SPMI controllers are driven like the T8103's. apple,fast-die-effort names the cluster's lane in the PMP report. T6041 has three clusters (E, P0, P1), so allow lane 2. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
Add the Apple M4 Pro (T6040) and the MacBook Pro (16-inch, M4 Pro, 2024), J616s, in the layout of the T8140 and T6030 trees: t6040.dtsi with the SoC blocks disabled, t6040-pmgr.dtsi with their power domains, and t6040-j616s.dts enabling what the board uses. SoC blocks use the apple,t6041-* compatibles; apple,t6040 is the machine compatible. This first part is the base SoC: - the 14 CPUs in three clusters (MPIDR Aff1, also the L2 groups) with their caches, cpu-map and capacities. capacity-dmips-mhz comes from pinned single-core runs at the lowest p-state (E 1018 MHz, P 1257 MHz): E/P is 0.652 per MHz, so E 668 and P 1024; - the AIC, the timer and the 24 MHz reference clock; - the PMGR blocks and the power domains of these devices; - the AP and always-on pin controllers. The always-on bank's interrupts stay with the AOP firmware, which owns some of its pins; - the I2C controllers (the J616s wires i2c1/2/3/4/6/8; i2c6 carries the Type-C retimers); - the watchdog; - the PMIC's NVMEM cells on SPMI and the SMC with its GPIO, reboot and RTC functions. The RTC offset is the PMU's info-clock_offset, as on T6030; - the keyboard backlight PWM. The nodes sit at the root rather than under a simple-bus: the boot loader edits several of them by path. The blocks known to need non-posted writes carry nonposted-mmio themselves. The loader fills in /memory, the framebuffer and the CPU release addresses. Values are from the J616s Apple Device Tree (macOS 26.6.2). The apple,t6041-* naming follows Yureka Lilian's acked T604x bindings, merged with commit 573f98b ("Merge pull request aurora-silicon#372 from jgoyvaerts/m4pro/dt-bindings-t604x"). The RTC offset cell location follows CJ Damsleth's T6040 device tree, which read the same ADT property on a J614s. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
Add the T6040 MTP (keyboard, trackpad) for the MacBook Pro J616s: the MTP, its mailbox and DART, and the DockChannel HID. Signed-off-by: Josh Rodd <josh@rodd.us> Assisted-by: oh-my-pi:gpt-6-astra [jg: the device-tree part of "Add MacBook Air M4 MTP (keyboard, trackpad) support." (t8132.dtsi/t8132-j715.dts), carried to T6040 for the MacBook Pro J616s: the MTP, its mailbox and DART and the DockChannel HID nodes with this SoC's addresses and interrupts from the J616s ADT; the DART stream aliases as apple,remap-streams, the binding the aurora DART driver reads; the J616s multi-touch firmware name and keyboard layout id added. Adapted to the layout of the T8140 tree: the nodes disabled in t6040.dtsi and enabled in the board file, the HID function nodes and the keyboard alias in the board file. The trackpad AFE's SMC power key (apple,afe-smc) is left out, as no binding describes it yet. The T6041 MTP and DockChannel compatibles are documented in the first patch of this series.] Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
T6040 cluster cpufreq + OPP tables. Cluster DVFS bases are m1n1-proven;
OPP freqs/levels decoded from the live J614s ADT
/arm-io/pmgr/voltage-states{1,5,13}-sram (word0 = kHz): E 7 pstates
1020-2592 MHz, P 19 pstates 1260-4512 MHz. Verified live 2026-07-30: E
and P0 policies register and transition both directions.
P1 gets its OWN operating-points-v2 node even though its frequencies are
identical to P0's: `opp-shared` declares one clock/voltage domain per
table, and the two P clusters have separate performance-domains.
Signed-off-by: CJ Damsleth <kim@damsleth.no>
[jg: dts/t6040-cpufreq.dtsi from https://github.com/damsleth/wallace
commit 90ea03566545 ("006 SOLVED: 32-bit freq*1000 overflow killed
every M4 P-cluster cpufreq policy"), carried to the J616s (same SoC,
same DVFS blocks and voltage states). In the T8140 tree layout: the
cluster nodes and opp-table-e/p0/p1 in t6040.dtsi, at the root and so
with nonposted-mmio on each block; operating-points-v2 and
performance-domains in the CPU nodes; apple,t6041-cluster-cpufreq in
front of apple,t8112-cluster-cpufreq.]
Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com>
Assisted-by: LLM
Describe the CPU idle controller so the Apple cpuidle driver binds on T6040, and enable it on the J616s. Idle states are not described: the hardware power-gates a core in WFI on its own and software cannot request a deeper state. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
…rmal zone Add the SMC hwmon node with the CPU die temperature (key TCMz, the maximum of the CPU die sensors) as sensor 0, and a thermal zone with the three cpufreq policies as cooling devices (#cooling-cells on every CPU, as the cooling device belongs to a cluster's policy CPU). The SMC refreshes TCMz about once a second, hence 1 s polling. The PMP's fast die-temperature limit regulates the die (under full load TCMz settles near 111 C), so the zone is a backstop above it: a passive trip at 113 C with 5 C hysteresis and a critical trip at 118 C for an orderly shutdown. A passive trip at 95 C held the die below the PMP's target and throttled the E cluster for nothing. The J616s has two fans, and its SMC has every key of the shared common and laptop sensor lists, so include hwmon-common, hwmon-fan-dual and hwmon-laptop as the M3 Pro/Max MacBook Pros do. They only append after TCMz, so it stays sensor 0. The fans stay read-only unless macsmc_hwmon's fan_control parameter is set. The sensor and zone layout follow Kb2uka's J713 overlays (Omarchy-M4-Native). Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
Add the PCIe controller with its DART and the BCM4388 behind its port 0: Wi-Fi on function 0 and Bluetooth on function 1 (board type hostomel), the port's power enable on SMC GPIO 0x13, its reset on AP pin 4 and the CLKREQ pin. The boot loader adds the per-unit Wi-Fi calibration and antenna SKU and the Bluetooth address and beamforming calibration to these nodes, and its Bluetooth admission depends on the node as it is, so the PCIe node is the booted tree's, unchanged apart from naming the AIC in msi-ranges by label. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
Add the ANS2 NVMe controller with its mailbox, SART and power domains. The controller window, the ANS coprocessor and the separate NVMMU are from the J616s ADT; the three power domains are the ANS and the two APCIe system states, all on from boot. Binding: apple,t6041-nvme-ans2 from aurora-silicon#387 ("nvme: apple: add T6040 (M4 Pro) ANS2 support"), apple,t6041-sart from the first patch of this series. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
Add the AVD, its DART and its AVD_SYS power state. The decoder's MCU firmware on this SoC programs the T8122/T8132 register family, so the node carries apple,t8132-avd as its fallback. The MCU only boots at the first decode job. The ADT describes the block as one range; the code, SRAM, mailbox and control windows follow the T6030/T8140 layout. The driver does not map the SRAM window. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
Add the PMP (power management coprocessor) of T6040, from the J616s ADT and the macOS 25G83 PMP, PTD and DART drivers: - the PMS, PMP and PMS_SRAM power states, always on; - the report region (PTD), with always-on entries for the three CPU clusters (soc-devices 10-12), for their fast die-temperature loops, and for the GPU (13). Each entry is a power-domain provider with the T6000 fallback the driver matches; - its DART (the ADT's first range; the second is the SoC's shared clock-protection block), its mailbox and the coprocessor, with the SoC-level boot arguments pmc = 1 and pmc-pmgr = 0x3f. iBoot locks the DART (PROTECT 0x1e7, SIDs 0 and 1 translating): apple-dart adopts the SID 0 table, and apple,dma-range keeps the IOVAs in the window iBoot built. Every report entry reads 0 while the PMP is stopped. The boot loader supplies the per-unit boot arguments and the firmware's tunables; without them the driver does not probe. The GPU entry matters: without the request the running PMP treats the GPU as off and holds it at its lowest performance state (338 MHz instead of about 1.58 GHz). T8140 has the same always-on entry. The three cluster cpufreq blocks get apple,fast-die-effort, the PMP's per-cluster fast die-temperature effort (lane 0 E, 1 P0, 2 P1), which apple-soc-cpufreq turns into a frequency limit. Until it finds the PMP running, the driver holds each cluster at its fallback state. Binding: lane 2 of apple,fast-die-effort from the first patch of this series. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
Add the DCP, its mailbox and DARTs, the display subsystem node and the display's PMGR window, and the J616s panel (345 x 223 mm). All stay disabled: the boot loader enables them when it hands the display over, and also adds the firmware version and the DCP mapping pools. Binding: apple,t6041-dcp from the first patch of this series. The display handoff also needs aurora-silicon#386 ("iommu/apple-dart: mirror the firmware's display mappings on T6040"). Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
Add: - the PMC voter interface (floor words at 0x5_04800000, honoured and rail enable words at 0x5_048aa000), with the CLPC agent (1) and the AP agent (3) as static voters; - the CLPC floor driver on agent 1; - the 16 SLC planes (4 AMCC x 4). The PMP's agent (0) is not a static voter while the PMP does not run under Linux: iBoot leaves its floor word at 0x15 (DCS 5, fabric 1), and enabling the agent would pin the DCS at its top state. GFX (2) is dynamic and not described yet. The SLC waits for the display subsystem, as on T8140: the display takes over the scan-out DMA that iBoot left running. The PMC windows lie inside the display's PMGR window, which the DCP driver only passes to its firmware, so the two do not conflict; the PMC node takes its rails range's unit address. The layout comes from the J616s ADT and the macOS T6041 PMC, CLPC and MCC drivers, and matches T8140's nodes. Binding: apple,t6041-pmc, -clpc and -mcc from aurora-silicon#385 ("soc: apple: pmc, clpc, mcc: add T6040 (M4 Pro)"). Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
Add the AOP (always-on processor), its mailbox and DART, and the two audio ADMACs (admac-leap-ns and admac-base-ns), with the generic compatibles their drivers match. The AOP children are the audio component (the microphones' DMA channel, the speaker stream's and the headphone jack's channels), the ambient light sensor and the lid angle service, as on T6020. The J616s board file names the chassis for the audio component. Each ADMAC is wired to the first of its four interrupt outputs, so the other three entries are empty. Binding: apple,t6041-aop and apple,t6041-aop-audio from the T6041 AOP series, github.com/jgoyvaerts/linux branch m4pro/aop-t6041. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
The six SN012776 speaker amps, from the J616s ADT: the left amps 0x38, 0x39 and 0x3a on i2c1, the right amps 0x3b, 0x3c and 0x3d on i2c3, the shared interrupt (AP pin 55, level low) and the sense slots from the master node's speaker-config. The shared shutdown line (AP pin 54, low = shutdown) is one fixed regulator, the SDZ supply of all six, rather than per-amp shutdown-gpios: with GPIO_SHARED, six references become a vote, and one amp driving the line low would not shut the other five down. Every amp joins the SDZ fail-closed group, so an over-temperature or over-current fault on any one forces the line low. The sound card is the J616 variant of macaudio with the AOP audio component's speaker back-end (DAI 3); the AOP firmware runs the stream on one MCA serializer for all six amps. The codecs are listed in the ADT provider order, so each amp gets its native playback slot (LW1 0, RW1 1, LW2 2, RW2 3, LT 4, RT 5). The idle masks are the master node's amp-tx-zd-config rows 0 and 1: LW1 drives zeros in the right amps' sense slots, RW1 in the left amps'. Binding: apple,j616-macaudio and the TAS27xx SDZ supply from the J616s speaker series, github.com/jgoyvaerts/linux branch m4pro/speakers-j616s. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
The 3.5 mm jack's codec is a CS42L84 at address 0x4b on i2c2 (ADT /arm-io/i2c2/audio-codec-output@4B). Its reset is nub GPIO pin 58, driven high to run the codec as on the J514/J516, and its interrupt is AP pin 106, level low. The AOP firmware runs the jack's stream on MCA cluster 2. The jack gets a sound card of its own, "MacBook Pro J616 Jack", linking the AOP audio component's jack back-end (DAI 4) to the codec, so a codec that does not answer leaves the speakers working. The audio component already has the jack's DMA channels. Binding: apple,j616-macaudio-jack from the J616s jack series, github.com/jgoyvaerts/linux branch m4pro/jack-j616s. Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
From the J616s ADT (isp0, dart-isp0 and the PMGR device table): the coprocessor and its mailbox windows, the first of its four interrupts, three DART instances on one interrupt with streams 1, 6, 7, 10 and 11 aliased to stream 0, and the ISP's power states. isp_cpu and isp_fe are at PMGR +0x4000; the ADT lists isp_secure, isp_be and isp_clr without an address, so the slots follow T8140's order (CPU, FE, DPRX, SECURE, BE, CLR) without the blocks T6040 lacks. With only CPU and FE on, the firmware takes an SError while it loads its tunables. isp_sys hangs off the always-on afi and fab6_soc fabric states. The J616s front camera is an IMX958. iBoot loads the ISP firmware below the kernel's memory; its text and data segments are reserved where the firmware runs them, with the firmware's 32 MiB main memory as the heap window. Two presets of firmware configuration 5 (1920x1080, 1280x720). Binding: apple,t6041-isp from aurora-silicon#384 ("media: apple: isp: add T6040 (M4 Pro) camera support"). Signed-off-by: Jonathan Goyvaerts <jonathan.goyvaerts@gmail.com> Assisted-by: LLM
This was referenced Oct 23, 2026
Closed
Closed
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.
This adds the device tree for the Apple M4 Pro (T6040) and the MacBook Pro (16-inch, M4 Pro, Nov 2024), J616s / Mac16,7, in the layout of the T8140 and T6030 trees:
t6040.dtsi: the SoC blocks, disabled by default;t6040-pmgr.dtsi: their PMGR power domains, added to the PMGR nodes oft6040.dtsi;t6040-j616s.dts: the board, which enables what the J616s uses.The SoC blocks use the
apple,t6041-*compatibles;apple,t6040stays the machine compatible. Values come from the J616s Apple Device Tree (macOS 26.6.2).The series is ordered so the base can be merged first and each later commit as its driver lands. Every commit builds on its own.
apple,fast-die-effortapple,fast-die-effort"tip" = on
integration/aurora; #371, #372, #373, #374 and #379 are merged.Layout notes (where this differs from the T8140/T6030 trees, and why):
socsimple-bus. The nodes sit at the root because our boot loader edits several of them by path: the PMGR blocks, the AIC, the DCP, the AOP, the AVD, the NVMe and PCIe nodes,/cpusand/chosen.nonposted-mmiosits on the blocks known to need it: cpufreq, PMC, MCC, PMP report and DockChannel.msi-rangesnow names the AIC by label (<&aic AIC_IRQ 2071 IRQ_TYPE_EDGE_RISING 32>). Our loader's Bluetooth admission depends on that node.apple,brava-e/apple,brava-p(dt-bindings: Apple M4 Pro/Max (T6040/T6041) compatibles #372). The booted tree hadarm,armv8; nothing in the kernel or the loader matches CPU compatibles.Hardware tested on: Apple MacBook Pro (16-inch, M4 Pro, Nov 2024), J616s / T6040, macOS 26.6.2 firmware, booted by our own loader. Our daily tree has run Linux 7.3.0-m4.3 daily since 2026-10-22.
How tested: this tree has not been booted as such. Our daily tree is these files plus one private include. The include holds what only our loader and our not-yet-submitted drivers need, and pins the phandles the PCIe node carries. That combined tree was compiled and compared with the booted daily tree (
m4/aurora-7.3, 8af0f4d):dtc -I dtb -O dts -s, phandle cells resolved to node paths), andEvery node path is equal (apart from the dropped keyboard PWM clock node), and the PCIe node is byte-for-byte equal (raw phandles included). Property differences:
the GPU: our tree carries the Neo-style GPU node of our T6040 GPU series (not yet submitted). That node is not in this PR; it comes with the GPU series as one more commit in this layout;
the binding and review fixes:
#power-domain-cells;apple,panel-j616entry;apple,brava-*CPU compatibles;sramwindow;interrupts-extended;clkref(its separate 24 MHz clock node is gone, the only path difference);None of them changes what the drivers or the loader do. I checked the drivers' match tables and
of_device_is_compatibleusers, the loader source and our packaging. In particular, the AVD driver does not map the SRAM, and the ADMAC keeps its interrupt at output 0;cpu-release-addr = <0 0>on the 13 secondary CPUs andreg = <0 0 0 0>on the framebuffer. These are placeholders the loader overwrites on every boot;status = "okay"on the nodes the board enables.The combined tree is 62,250 bytes, under the loader's 98,304-byte board.dtb limit.
Not tested / limits:
No boot of the public tree alone, nor of the combined tree with the binding fixes. The latter is the next daily test boot. Without the private include, the public tree lacks:
direct-smp-*,dcp-map-pool*,headphone-codec-probe);apple,t6040-*second compatibles.A loader that fills
/memory, the framebuffer, the CPU release addresses and the PMP's per-unit properties should be able to boot it, but none has.Left out because no binding for them exists yet. Our daily tree keeps them in its private include:
apple,dapf-entries);apple,afe-smc);No GPU node yet: it follows with the T6040 GPU series. Its operating points will be this unit's values, binned per device, until a loader fills them in.
The i2c6 retimers have no driver. i2c4 (SD card helper) and i2c8 (HDMI converter) stay disabled.
Follow-ups (each needs a test boot or a driver or loader change, so not in this PR):
opp-microwattfor the CPU OPPs: without it, the cpufreq fallback while the PMP is not running is the slowest state.t6040.dtsi, with the measured reason (the AOP owns some of its pins and interrupt registers).nonposted-mmioon every SoC node, not only the blocks known to need it.dma-channels= 26.pmgr_ispinto the main PMGR node."apple,t6041-smc", "apple,t8103-smc". Not done because the DockChannel HID's AFE power-up refuses an SMC withoutapple,smc(dockchannel-hid.c).apple,dockchannel-hid. Not done because the daily HID driver keys its ring mode and the AFE power-up onapple,t6041-dockchannel-hid.isp-firmware-text/-dataas boot-loader placeholders (reg = <0 0 0 0>, asisp-common.dtsi). Not done: a zero-sizeregnext toiommu-addressesmakesof_iommu_get_resv_regionsset up a translated mapping of the firmware IOVA to physical address 0 (phys.endwraps), so an unfilled placeholder would point the ISP at memory 0. The fix is the IOMMU core treating a zero-sizeregas absent, or the loader filling it.Depends on: per commit, see the table. Open: #384, #385, #386 and #387; not yet opened: the AOP, speaker and jack series.
Credits:
apple,t6041-*naming follows Yureka Lilian's acked T604x bindings, merged with dt-bindings: Apple M4 Pro/Max (T6040/T6041) compatibles #372 (commit 573f98b).Base:
integration/aurora(8c2774e). Built and checked there:make dtbs W=1forapple/t6040-j616s.dtbgives no warnings. On the same base at W=1,t8140-j700.dtbgives 5 andt6030-j516s.dtb17. Each commit builds without warnings.checkpatch --strictgives three line-length warnings, all in the booted tree's PCIe node, and the "MAINTAINERS" note for the new files.apple,t6041-dockchannel-hidentry (see follow-ups), and itsmtpandtp-accelchildren are not in the binding;nonposted-mmioon the cpufreq, PMC, MCC and PMP report nodes, whose bindings do not list it;reg-nameslacks port1/2; the port properties; the Wi-Fi compatible without a PCI ID; thewifi-clkreqpin node name;local-bd-address, which the loader adds;dai-tdm-*properties, the CS42L84sound-name-prefix, and the two-entry SN012776 compatible.🤖 Generated with Claude Code