Commit 2d5ce3fb authored by Hector Martin's avatar Hector Martin
Browse files

arm64: dts: apple: t8112: Initial t8112 (M2) device trees



This adds device trees for the following devices:
 - Macbook Air (M2, 2022)
 - Macbook Pro 13" (M2, 2022)
 - Mac mini (M2, 2023)

This brings the hardware support of the machines to the same level as M1
and M1 Pro / Max / Ultra. Supported hardware include NVMe, PCIe, serial,
pinctrl/gpio, I2C, iommu, watchdog, admac, nco, cpufreq, boot
framebuffer for laptop panels and the interrupt controller.

The ethernet LAN device on the M2 Mac mini is the only working PCIe
device. The Wlan/BT devices are powered off and controlled by the not
yet supported SMC. The ASMedia xHCI on the M2 Mac mini requires firmware
to be loaded at startup.

The main missing hardware support to make these devices useful are the
integrated USB 2/3/4 controller, keyboard and trackpad on the laptops
and SMC to power the PCIe Wlan/BT device on.
The M2 Mac mini has currently no working display output. Due to changes
in the display pipeline it is currently not possible to initialize the
HDMI output in the bootloader.

Co-developed-by: default avatarJanne Grunau <j@jannau.net>
Signed-off-by: default avatarJanne Grunau <j@jannau.net>
Reviewed-by: default avatarSven Peter <sven@svenpeter.dev>
Signed-off-by: default avatarHector Martin <marcan@marcan.st>
parent 828fe6b6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -10,3 +10,6 @@ dtb-$(CONFIG_ARCH_APPLE) += t6000-j316s.dtb
dtb-$(CONFIG_ARCH_APPLE) += t6001-j316c.dtb
dtb-$(CONFIG_ARCH_APPLE) += t6001-j375c.dtb
dtb-$(CONFIG_ARCH_APPLE) += t6002-j375d.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8112-j413.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8112-j473.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8112-j493.dtb
+63 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
 * Apple MacBook Air (M2, 2022)
 *
 * target-type: J413
 *
 * Copyright The Asahi Linux Contributors
 */

/dts-v1/;

#include "t8112.dtsi"
#include "t8112-jxxx.dtsi"

/ {
	compatible = "apple,j413", "apple,t8112", "apple,arm-platform";
	model = "Apple MacBook Air (13-inch, M2, 2022)";

	aliases {
		bluetooth0 = &bluetooth0;
		wifi0 = &wifi0;
	};
};

/*
 * Force the bus number assignments so that we can declare some of the
 * on-board devices and properties that are populated by the bootloader
 * (such as MAC addresses).
 */
&port00 {
	bus-range = <1 1>;
	wifi0: wifi@0,0 {
		compatible = "pci14e4,4433";
		reg = <0x10000 0x0 0x0 0x0 0x0>;
		/* To be filled by the loader */
		local-mac-address = [00 10 18 00 00 10];
		apple,antenna-sku = "XX";
		brcm,board-type = "apple,hokkaido";
	};

	bluetooth0: bluetooth@0,1 {
		compatible = "pci14e4,5f71";
		reg = <0x10100 0x0 0x0 0x0 0x0>;
		/* To be filled by the loader */
		local-bd-address = [00 00 00 00 00 00];
		brcm,board-type = "apple,hokkaido";
	};
};

&i2c0 {
	/* MagSafe port */
	hpm5: usb-pd@3a {
		compatible = "apple,cd321x";
		reg = <0x3a>;
		interrupt-parent = <&pinctrl_ap>;
		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
		interrupt-names = "irq";
	};
};

&i2c4 {
	status = "okay";
};
+54 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
 * Apple Mac mini (M2, 2023)
 *
 * target-type: J473
 *
 * Copyright The Asahi Linux Contributors
 */

/dts-v1/;

#include "t8112.dtsi"
#include "t8112-jxxx.dtsi"

/ {
	compatible = "apple,j473", "apple,t8112", "apple,arm-platform";
	model = "Apple Mac mini (M2, 2023)";

	aliases {
		ethernet0 = &ethernet0;
	};
};

/*
 * Force the bus number assignments so that we can declare some of the
 * on-board devices and properties that are populated by the bootloader
 * (such as MAC addresses).
 */
&port00 {
	bus-range = <1 1>;
};

&port01 {
	bus-range = <2 2>;
	status = "okay";
};

&port02 {
	bus-range = <3 3>;
	status = "okay";
	ethernet0: ethernet@0,0 {
		reg = <0x30000 0x0 0x0 0x0 0x0>;
		/* To be filled by the loader */
		local-mac-address = [00 10 18 00 00 00];
	};
};

&pcie1_dart {
	status = "okay";
};

&pcie2_dart {
	status = "okay";
};
+52 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
 * Apple MacBook Pro (13-inch, M1, 2022)
 *
 * target-type: J493
 *
 * Copyright The Asahi Linux Contributors
 */

/dts-v1/;

#include "t8112.dtsi"
#include "t8112-jxxx.dtsi"

/ {
	compatible = "apple,j493", "apple,t8112", "apple,arm-platform";
	model = "Apple MacBook Pro (13-inch, M2, 2022)";

	aliases {
		bluetooth0 = &bluetooth0;
		wifi0 = &wifi0;
	};
};

/*
 * Force the bus number assignments so that we can declare some of the
 * on-board devices and properties that are populated by the bootloader
 * (such as MAC addresses).
 */
&port00 {
	bus-range = <1 1>;
	wifi0: wifi@0,0 {
		compatible = "pci14e4,4425";
		reg = <0x10000 0x0 0x0 0x0 0x0>;
		/* To be filled by the loader */
		local-mac-address = [00 00 00 00 00 00];
		apple,antenna-sku = "XX";
		brcm,board-type = "apple,kyushu";
	};

	bluetooth0: bluetooth@0,1 {
		compatible = "pci14e4,5f69";
		reg = <0x10100 0x0 0x0 0x0 0x0>;
		/* To be filled by the loader */
		local-bd-address = [00 00 00 00 00 00];
		brcm,board-type = "apple,kyushu";
	};
};

&i2c4 {
	status = "okay";
};
+81 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
 * Apple M2 MacBook Air/Pro (M2, 2022)
 *
 * This file contains parts common to all Apple M2 devices using the t8112.
 *
 * target-type: J493, J413
 *
 * Copyright The Asahi Linux Contributors
 */

/ {
	aliases {
		serial0 = &serial0;
		serial2 = &serial2;
	};

	chosen {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		stdout-path = "serial0";

		framebuffer0: framebuffer@0 {
			compatible = "apple,simple-framebuffer", "simple-framebuffer";
			reg = <0 0 0 0>; /* To be filled by loader */
			/* Format properties will be added by loader */
			status = "disabled";
		};
	};

	memory@800000000 {
		device_type = "memory";
		reg = <0x8 0 0x2 0>; /* To be filled by loader */
	};
};

&serial0 {
	status = "okay";
};

&serial2 {
	status = "okay";
};

&i2c0 {
	status = "okay";

	hpm0: usb-pd@38 {
		compatible = "apple,cd321x";
		reg = <0x38>;
		interrupt-parent = <&pinctrl_ap>;
		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
		interrupt-names = "irq";
	};

	hpm1: usb-pd@3f {
		compatible = "apple,cd321x";
		reg = <0x3f>;
		interrupt-parent = <&pinctrl_ap>;
		interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
		interrupt-names = "irq";
	};
};

&i2c1 {
	status = "okay";
};

&i2c2 {
	status = "okay";
};

&i2c3 {
	status = "okay";
};

&nco_clkref {
	clock-frequency = <900000000>;
};
Loading