While the Asahi Linux project has faced some setbacks, such as most recently with Alyssa Rosenzweig leaving the project and still working to bring-up M3/M4 support, the upstreaming effort by Asahi Linux developers to get their changes to the upstream Linux kernel continues.
Janne Grunau posted the set of 37 patches today to the Linux kernel mailing list in working to get the Device Tree (DT) files upstreamed for the Apple M2 Pro, Max, and Ultra devices. The M2 Pro / Max / Ultra SoCs with their respective Apple Mac devices have been supported in Asahi Linux but the needed Device Tree files and other elements not yet to the mainline Linux kernel.
Grunau explained in today’s patch series:
“This series adds device trees for Apple’s M2 Pro, Max and Ultra based devices. The M2 Pro (t6020), M2 Max (t6021) and M2 Ultra (t6022) SoCs follow design of the t600x family so copy the structure of SoC *.dtsi files.
t6020 is a cut-down version of t6021, so the former just includes the latter and disables the missing bits.
t6022 is two connected t6021 dies. The implementation seems to use t6021 and disables blocks based on whether it is useful to carry multiple instances. The disabled blocks are mostly on the second die. MMIO addresses on the second die have a constant offset. The interrupt controller is multi-die aware. This setup can be represented in the device tree with two top level “soc” nodes. The MMIO offset is applied via “ranges” and devices are included with preprocessor macros to make the node labels unique and to specify the die number for the interrupt definition.
The devices itself are very similar to their M1 Pro, M1 Max and M1 Ultra counterparts. The existing device templates are SoC agnostic so the new devices can reuse them and include their t602{0,1,2}.dtsi file. The minor differences in pinctrl and gpio numbers can be easily adjusted.”
While the initial Device Tree support is in place, the patches posted today don’t include PCI Express support for the M2-powered Apple Mac Pro. Due to two issues there the PCIe support isn’t yet ready for enabling in the mainline kernel for the Apple Mac Pro.