Repository navigation
arm64: dts: apple: Add the MacBook Pro 16-inch M4 Max (J616C) - #914
AxxzyWasTaken wants to merge 5 commits into
Conversation
The Chapel PMIC is on the T6030 and T6031 (M3 Pro/Max) SPMI buses, whose trees already use this compatible, and on the T6041 (M4 Max). Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
T6041 has the blocks t6040.dtsi describes at the same addresses and interrupts (checked against a J616C ADT). Three things differ: - Two clusters of six P cores instead of five. The boot loader matches the DT's CPU nodes to the ADT's by MPIDR and drops the ones a binned part leaves out (the 14-core J616C has exactly the J616s's cores), so t6040.dtsi adds the sixth core of each cluster when t6041.dtsi asks for them. - The main PMIC is a Chapel at SPMI address 0xb (ADT nub-spmi0 spmi-chapelL1-b), not an Abbey at 0xe. Its nvmem cells and RTC alarm registers (ADT info-rtc_alarm_*) sit at the Abbey offsets. - Up to eight AMCCs with four cache planes each, six on the binned part (ADT amcc-enable-mask 0x3f): the MCC lists the 24 planes every T6041 has, which needs the mcc driver to take more than 16. t6040.dtb files do not change. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
J616C is the J616s chassis with the T6041. Checked against a J616C ADT (macOS 26.6.2, iBoot mBoot-18000.161.10): every power domain of t6040-pmgr.dtsi, the display block, AVD, PMP, AOP, MTP, SMC, NVMe and USB sit at the same addresses, with the same interrupts and DART streams. What differs from J616s: - the trackpad firmware is tpmtfw-j616c.bin, and the factory data mesacal-j616c.bin and msrk-j616c.bin; - nub-spmi1 holds a Chapel at 0xb and a Spitfire at 0x9, nub-spmi2 Portiers at 0xa and 0xb, not Abbeys at 0xe; nothing on nub-spmi2 has a binding yet, so that bus is left out; - five per-unit USB3 PHY values (auspll, cio4pll, aus40cmn-shm), from this machine's ADT; every other tunable matches J616s; - iBoot moves the ISP firmware from boot to boot, so the ISP stays off until the boot loader fills in its placement; - the GPU (ADT gpu,t6041) is not described yet and stays off. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
c1ae9ce to
a52c873
Compare
Booting the J616C on 7.3 left the keyboard, trackpad and audio dead: RTKit timed out on the MTP and AOP, and dockchannel-hid failed its AFE preflight. - aura only programs a co-processor's DAPF if the device tree has its alias. The shared J614s/J616s file has only pmp, so add aop and mtp. - The J616C has no gp1c key. Its AFE and STM resets are lines 25 and 26 of the SMC's low GPIO block, so describe that block, drop apple,afe-smc and use power method 2. - Use the plain dockchannel-hid compatible: this Mac's MTP firmware runs without the J616s's ring transport on our daily tree. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
Pick up the J616C keyboard, trackpad and audio device tree fixes.
aura only opens a co-processor's DAPF if the device tree has its alias, as with the AOP and MTP. The ISP stays disabled here for now, so this changes nothing yet, but the camera can't start without it once the ISP is enabled. Signed-off-by: AxxzyWasTaken <axxzytte@gmail.com>
|
Merge train (MTL, 06/11): this conflicts with integration/aurora now. A J616c device tree already landed there through astaff's series (#525/#958, then #749 for HDMI and USB-C DP and #920 for the ANE), so The parts of this PR that the merged tree doesn't have yet look worth keeping, especially the ADT-checked bits (the Chapel PMIC at nub-spmi0 0xb and its RTC cells, the six-core P clusters behind |
|
Closing in favour of #994, which redoes this as deltas on the merged J616C tree. The six-core clusters and the rest were already in astaff's tree, so what's left there is the Chapel PMIC with its RTC and the 24 MCC planes. |
A device tree for the MacBook Pro 16" M4 Max (J616C), on the current layout:
t6041.dtsiincludest6040.dtsi, andt6041-j616c.dtsuses #795'st604x-j614-j616.dtsiwith the J616s board lines. Every difference was checked against a J616C ADT (macOS 26.6.2, mBoot-18000.161.10):t6040.dtsigets the sixth core of each cluster (cpu@10105,cpu@10205) behindT6041_SIX_CORE_P_CLUSTERS, so t6040 DTBs don't change. The 14-core part's MPIDRs are exactly the J616s's, and aura nops the two missing nodes there by MPIDR.spmi-chapelL1-b), not an Abbey at 0xe. Its nvmem cells and RTC alarm registers (ADTinfo-rtc_alarm_*) are at the Abbey offsets. nub-spmi1 has a Chapel at 0xb and a Spitfire at 0x9, and nub-spmi2 has Portiers at 0xa/0xb, so the J616s's Abbeys at 0xe there go away. Nothing on nub-spmi2 has a binding yet, so that bus is left out on the J616C. An earlier test tree that kept the J616s's Abbeys logged SPMI errors at boot. This addsapple,chapel-pmicto the spmi-nvmem binding.t6040-pmgr.dtsiexist on the J616C at the same addresses with the same names. The J616C has 31 more (amcc16-23, dcs_16-23, prores, msr1, venc1, dispext2/3); they're left out until something uses them.amcc-enable-mask0x3f).t6041.dtsilists the 24 planes every T6041 has, which needs soc: apple: mcc: allow up to 32 cache planes #911.aop,ispandmtpaliases, because aura opens a co-processor's DAPF only if it finds its alias. The J616C has nogp1ckey: its AFE and STM resets are lines 25 and 26 of the SMC's low GPIO block, sosmc_gpio_lowis added here, withapple,afe-smcdropped and power method 2. It uses the plainapple,dockchannel-hidcompatible, because this Mac's MTP firmware runs without the J616s's ring transport on our daily tree.tpmtfw-j616c.bin,mesacal-j616c.bin,msrk-j616c.bin.gpu,t6041, not described yet).@astaff: #525, #732, #749 and #805 each carry their own
t6041-j616c.dts/t6041.dtsion the oldert604x.dtsi. This is meant as the shared base on the current tree. Your GPU, SEP, external display and ANE nodes could go on top of it as small board/SoC additions. Happy to adjust anything here to fit them.Testing (J616C, 14-core M4 Max): the values here are the ones this Mac has run daily since October, from our own flattened J616C tree on a 7.2.10 kernel: the Chapel's nvmem cells (SMC RTC, reboot and poweroff), the 24 MCC planes (SLC allocation on all 24), the USB3 per-unit tunables and the board firmware names. The Chapel's alarm registers ran through our own RTC alarm code on that tree (wake from s2idle on the alarm). The
apple,t6041-pmu-rtcnode here hasn't run with this driver. This tree builds with the sameW=1dtc warnings ast6040-j616s.dtb, plus oneunit_address_vs_regonsmc_gpio_low, which is written the same way as int6030.dtsi.Booted (4 Nov): this tree with #917 on top, a one-shot boot of a 7.3 kernel with aura#67 and aura#68, no desktop session. The first boot, without the last commit here, had no keyboard, trackpad or audio: RTKit timed out on the MTP and AOP. With it: the MTP firmware starts and its keyboard, multi-touch, actuator and accelerometer interfaces report ready, the AOP reports ready, and all three sound cards register (AOP HPAI, speakers, jack). NVMe (root on it), the SMC and its RTC came up. With #929 on top, the DCP binds and DRM comes up at 3456x2234 at 120 Hz, and the system level cache is enabled on all 24 MCC planes (#911). Without #929 the panel stays on simpledrm. Nobody typed on it or played sound: this is the driver log, not a hands-on test. Still failing on that boot:
apple-ave(unexpected firmware segment sizes) and the ANE (firmware profile mismatch), neither from this tree.hid-apple-mtp-hapticlogshw start failedon the actuator interface.