[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250914-dt-apple-t6020-v2-0-1a738a98bb43@jannau.net>
Date: Sun, 14 Sep 2025 21:38:43 +0200
From: Janne Grunau <j@...nau.net>
To: Sven Peter <sven@...nel.org>, Janne Grunau <j@...nau.net>,
Alyssa Rosenzweig <alyssa@...enzweig.io>, Neal Gompa <neal@...pa.dev>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Hector Martin <marcan@...can.st>,
Marc Zyngier <maz@...nel.org>
Cc: asahi@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: [PATCH v2 0/6] arm64: Add initial device trees for Apple M2
Pro/Max/Ultra devices
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.
With the t602x SoC family Apple introduced two new devices:
The M2 Pro Mac mini is similar to the larger M1 and M2 Max Mac Studio. The
missing SDHCI card reader and two front USB3.1 type-c ports and their
internal USB hub can be easily deleted.
The M2 Ultra Mac Pro (tower and rack-mount cases) differs from all other
devices but may share some bits with the M2 Ultra Mac Studio. The PCIe
implementation on the M2 Ultra in the Mac Pro differs slightly. Apple
calls the PCIe controller "apcie-ge" in their device tree. The
implementation seems to be mostly compatible with the base t6020 PCIe
controller. The main difference is that there is only a single port with
with 8 or 16 PCIe Gen4 lanes. These ports connect to a Microchip
Switchtec PCIe switch with 100 lanes to which all internal PCIe devices
and PCIe slots connect too.
This series does not include PCIe support for the Mac Pro for two
reasons:
- the linux switchtec driver fails to probe and the downstream PCIe
connections come up as PCIe Gen1
- some of the internal devices require PERST# and power control to come
up. Since the device are connected via the PCIe switch the PCIe
controller can not do this. The PCI slot pwrctrl can be utilized for
power control but misses integration with PERST# as proposed in [1].
This series depends on "[PATCH v2 0/5] Apple device tree sync from
downstream kernel" [2] due to the reuse of the t600x device templates
(patch dependencies and DT compilation) and 4 page table level support
in apple-dart and io-pgtable-dart [3] since the dart instances report
42-bit IAS (IOMMU device attach fails without the series).
Both dependencies are in next and queued for the 6.18 merge window in
https://github.com/AsahiLinux/linux/commits/apple-soc/dt-6.18 and
https://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux.git/log/
After discussion with the devicetree maintainers we agreed to not extend
lists with the generic compatibles anymore [4]. Instead either the first
compatible SoC or t8103 is used as fallback compatible supported by the
drivers. t8103 is used as default since most drivers and bindings were
initially written for M1 based devices.
[1]: https://lore.kernel.org/linux-pci/20250819-pci-pwrctrl-perst-v1-0-4b74978d2007@oss.qualcomm.com/
[2]: https://lore.kernel.org/asahi/20250823-apple-dt-sync-6-17-v2-0-6dc0daeb4786@jannau.net/
[3]: https://lore.kernel.org/asahi/20250821-apple-dart-4levels-v2-0-e39af79daa37@jannau.net/
[4]: https://lore.kernel.org/asahi/12ab93b7-1fc2-4ce0-926e-c8141cfe81bf@kernel.org/
---
Changes in v2:
- Fixed copy-n-paste errors still referencing t600x (M1 series)
- Reworded outdated comments
- Dropped all dt-binding changes except "dt-bindings: arm: apple: Add
t6020x compatibles" as those were picked up in apple-soc/drivers-6.18
- Dropped all driver changes, will be sent separately if not already
picked up
- rebased onto https://github.com/AsahiLinux/linux/commits/apple-soc/dt-6.18
- Link to v1: https://lore.kernel.org/r/20250828-dt-apple-t6020-v1-0-507ba4c4b98e@jannau.net
---
Hector Martin (3):
arm64: dts: apple: Add initial t6020/t6021/t6022 DTs
arm64: dts: apple: Add J414 and J416 Macbook Pro device trees
arm64: dts: apple: Add J180d (Mac Pro, M2 Ultra, 2023) device tree
Janne Grunau (3):
dt-bindings: arm: apple: Add t6020x compatibles
arm64: dts: apple: Add ethernet0 alias for J375 template
arm64: dts: apple: Add J474s, J475c and J475d device trees
Documentation/devicetree/bindings/arm/apple.yaml | 39 +-
arch/arm64/boot/dts/apple/Makefile | 8 +
arch/arm64/boot/dts/apple/t600x-j375.dtsi | 1 +
arch/arm64/boot/dts/apple/t6020-j414s.dts | 26 +
arch/arm64/boot/dts/apple/t6020-j416s.dts | 26 +
arch/arm64/boot/dts/apple/t6020-j474s.dts | 47 +
arch/arm64/boot/dts/apple/t6020.dtsi | 22 +
arch/arm64/boot/dts/apple/t6021-j414c.dts | 26 +
arch/arm64/boot/dts/apple/t6021-j416c.dts | 26 +
arch/arm64/boot/dts/apple/t6021-j475c.dts | 37 +
arch/arm64/boot/dts/apple/t6021.dtsi | 69 +
arch/arm64/boot/dts/apple/t6022-j180d.dts | 121 ++
arch/arm64/boot/dts/apple/t6022-j475d.dts | 42 +
arch/arm64/boot/dts/apple/t6022-jxxxd.dtsi | 38 +
arch/arm64/boot/dts/apple/t6022.dtsi | 349 ++++
arch/arm64/boot/dts/apple/t602x-common.dtsi | 465 +++++
arch/arm64/boot/dts/apple/t602x-die0.dtsi | 575 ++++++
arch/arm64/boot/dts/apple/t602x-dieX.dtsi | 128 ++
arch/arm64/boot/dts/apple/t602x-gpio-pins.dtsi | 81 +
arch/arm64/boot/dts/apple/t602x-j414-j416.dtsi | 45 +
arch/arm64/boot/dts/apple/t602x-j474-j475.dtsi | 38 +
arch/arm64/boot/dts/apple/t602x-nvme.dtsi | 42 +
arch/arm64/boot/dts/apple/t602x-pmgr.dtsi | 2265 ++++++++++++++++++++++
23 files changed, 4515 insertions(+), 1 deletion(-)
---
base-commit: eef7336dc6c11f80c08b55b09b24faf124baeb0d
change-id: 20250811-dt-apple-t6020-1359ce9bf2e7
Best regards,
--
Janne Grunau <j@...nau.net>
Powered by blists - more mailing lists