arm64: dts: apple: Add built-in keyboard support for M4 Macbook Pro - #567
Open
Ryan1202 wants to merge 207 commits into
Open
arm64: dts: apple: Add built-in keyboard support for M4 Macbook Pro#567Ryan1202 wants to merge 207 commits into
Ryan1202 wants to merge 207 commits into
Conversation
The watchdog on the Apple silicon t8122 (M3) SoC is compatible with the existing driver. Add "apple,t8122-wdt" as SoC specific compatible under "apple,t8103-wdt" used by the driver. Acked-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com> Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Janne Grunau <j@jannau.net> Link: https://lore.kernel.org/r/20260507-apple-m3-initial-devicetrees-v3-2-ca07c81b5dc7@jannau.net Signed-off-by: Guenter Roeck <linux@roeck-us.net>
The PMGR blocks on Apple silicon M3 SoCs (t8122) are compatible with the M1 and M2 predecessors. Add "apple,t8122-pmgr" as M3 specific compatible. Acked-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com> Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Janne Grunau <j@jannau.net> Link: https://patch.msgid.link/20260505-apple-m3-initial-devicetrees-v2-1-b0c2f3519e0e@jannau.net Signed-off-by: Sven Peter <sven@kernel.org>
The device power state management of the PMGR blocks on Apple's t8122 SoC (M3) is compatible with the existing driver. Add "apple,t8122-pmgr-pwrstate" as SoC specific compatible under the existing "apple,t8103-pmgr-pwrstate" used by the driver. Acked-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com> Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Janne Grunau <j@jannau.net> Link: https://patch.msgid.link/20260507-apple-m3-initial-devicetrees-v3-1-ca07c81b5dc7@jannau.net Signed-off-by: Sven Peter <sven@kernel.org>
The PWM controller on the Apple silicon t8122 (M3) SoC is compatible with the existing driver. Add "apple,t8122-fpwm" as SoC specific compatible under "apple,s5l-fpwm" used by the driver. Acked-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Uwe Kleine-König <ukleinek@kernel.org> Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com> Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Janne Grunau <j@jannau.net> Link: https://patch.msgid.link/20260507-apple-m3-initial-devicetrees-v3-3-ca07c81b5dc7@jannau.net Signed-off-by: Sven Peter <sven@kernel.org>
The Apple devices with the t8122 SoC (M3) are very similar to their M1 and M2 predecessors. Only the 13-inch Macbook Pro is replaced by a 14-inch version based on the design of the 14-inch Macbook Pro with (M1/M2 Pro/Max). The Mac mini was not offered with M3. Acked-by: Rob Herring (Arm) <robh@kernel.org> Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com> Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Janne Grunau <j@jannau.net> Link: https://patch.msgid.link/20260507-apple-m3-initial-devicetrees-v3-4-ca07c81b5dc7@jannau.net Signed-off-by: Sven Peter <sven@kernel.org>
Add minimal device trees for all t8122 based devices. The devices are - iMac (24-inch, M3, 2023) - MacBook Air (13-inch, M3, 2024) - MacBook Air (15-inch, M3, 2024) - MacBook Pro (14-inch, M3, 2023) The device trees have a minimal set of devices limited to CPU cores, interrupt controller, power states, watchdog, serial, pin controller, i2c and the boot framebuffer. The device trees for the notebooks add a PWM controller for the keyboard LED illumination. The iMacs and the 14-inch device trees add the i2c based Apple cd321x USB Type-C port controller. Co-developed-by: Michael Reeves <michael.reeves077@gmail.com> Signed-off-by: Michael Reeves <michael.reeves077@gmail.com> Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com> Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Janne Grunau <j@jannau.net> Link: https://patch.msgid.link/20260507-apple-m3-initial-devicetrees-v3-5-ca07c81b5dc7@jannau.net Signed-off-by: Sven Peter <sven@kernel.org>
The M3 Pro, Max and Ultra Apple silicon SoC family (T6030, T6031, T6032 and T6034) differs from its M1 and M2 predecessors. Most notable is that T6030 (M3 Pro) appears to be a separately designed SoC. MMIO address spaces, interrupt and pin numbers do not match. It has two CPU clusters with 6 efficiency or performance cores. T6031 (M3 Max) as one cluster with 4 effciency cores and two clusters with 6 performance cores each. T6032 (M3 Ultra) is like in the previous generations two T6031 dies connected with an high speed interface and appears from operation system perspective as a single SoC. T6034 is a separate identifier for smaller M3 Max variant. It has fewer performance CPU cores (10 instead of 12), fewer GPU cores (30 instead of 40) and less memory controllers (384-bit instead of 512-bit combined width). Apple has only released 14- and 16-inch Macbook Pros with T6030, T6031 and T6034 (M3 Pro and Max) and as only desktop device the Mac Studio with T6032 (M3 Ultra). Signed-off-by: Janne Grunau <j@jannau.net>
…s condition
The condition for 3 or 4 #interrupt-cells list compatibles for the 3
cells variant (not used in SoCs consisting out of multiple dies). This
includes the AICv3 base compatible "apple,t8122-aic3". This will match
compatible = "apple,t6031-aic3", "apple,t8122-aic3";
shared for M3 Max and Ultra based devices which require the additional
interrupt cell for the die number.
Instead list the compatibles used for multi-die SoCs explicitly and use
4 #interrupt-cells for them.
Signed-off-by: Janne Grunau <j@jannau.net>
…ompatible The Apple M3 Max and Ultra SoCs use AICv3 as interrupt controller. It is compatible to the base M3 AICv3. Add "apple,t6031-aic3" as compatible and add it to the list for 4 #interrupt-cells used for multi-die SoCs. Signed-off-by: Janne Grunau <j@jannau.net>
The block on Apple M3 Pro, Max and Ultra SoCs is compatible with "apple,t8103-pmgr". Add "apple,t6030-pmgr" and "apple,t6031-pmgr" as per-SoC compatibles for M3 Pro and M3 Max and Ultra.
The pmgr-powerstate registers on Apple M3 Pro, Max and Ultra SoCs are compatible with "apple,t8103-pmgr-pwrstate". Add "apple,t6030-pmgr-pwrstate" for M3 Pro and "apple,t6030-pmgr-pwrstate" for M3 Max and Ultra as per-SoC compatibles.
The watchdog on Apple silicon M3 Pro, Max and Ultra SoCs is compatible with the t8103 (M1) one. Add "apple,t6030-wdt" for M3 Pro and "apple,t6031-wdt" for M3 Max and Ultra as per-SoC compatibles. Signed-off-by: Janne Grunau <j@jannau.net>
The pin controller on Apple silicon M3 Pro, Max and Ultra SoCs is compatible with the t8103 (M1) one. Add "apple,t6030-pinctrl" for M3 Pro and "apple,t6031-pinctrl" for M3 Max and Ultra as per-SoC compatibles. Signed-off-by: Janne Grunau <j@jannau.net>
The i2c block on Apple silicon M3 Pro, Max and Ultra SoCs are compatible with the t8103 (M1) one. Add "apple,t6030-i2c" for M3 Pro and "apple,t6031-i2c" for M3 Max and Ultra as per-S0C compatibles. Signed-off-by: Janne Grunau <j@jannau.net>
The PWM controller on Apple silicon M3 Pro, Max and Ultra SoCs is compatible with the t8103 (M1) one. Add "apple,t6030-fpwm" for M3 Pro and "apple,t6031-fpwm" for M3 Max and Ultra as per-SoC compatibles. Signed-off-by: Janne Grunau <j@jannau.net>
Contains minimal device trees for all M3 Max and Ultra Apple silicon devices. Those are 14-inch and 16-inch MacBook Pros with M3 Max released in November 2023 and Mac Studio with M3 Ultra released in 2025. This does not include M3 Pro since it is separate SoC and not a smaller variant of the M3 Max contrary to the M1 and M2 generations. The smaller M3 Max variant (10 performance cores) has its own chip variant (T6034) but is clearly the same design as T6031. Besides fewer CPU performance cores and GPU cores it misses also on fourth of the memory controllers and thus has an aggregated bus width of 384 bit instead of 512 bit. Both M3 Ultra variants (28 or 32 CPU cores) are based on T6031 judging by the advertised memory bandwidth of 819GB/s. This uses the same multi-die macros as t600x*.dtsi and t602x.dtsi to support M3 Max and M3 Ultra without duplicating device nodes. Since the M3 Pro can't use the same .dtsi files "t6031*.dtsi" are used to define common nodes for T6031, T6032 and T6034. The device trees have devices nodes for CPU cores, timer, interrupt controller, power states, watchdog, serial, pin controller, i2c, PWM based keyboard LED illumination and the boot framebuffer. Signed-off-by: Janne Grunau <j@jannau.net>
Minimal device trees for the M3 Pro based 14-inch and 16-inch MacBook Pro released in November 2023. The M3 Pro is a distinct SoC design and not a cut down version of the Max variant like for M1 and M2 Pro. The M3 Pro has only a single cluster with up to 6 performance cores and one cluster with 6 efficiency cores. While it no longer shares a common SoC .dtsi the devices itself are still similar to the ones with M3 Max. It is still useful to share the basic device composition in t603x-j514-j516.dtsi. For the M3 Pro based devices additional overrides for diverging pin and irq numbers are expected. The device trees have devices nodes for CPU cores, timer, interrupt controller, power states, watchdog, serial, pin controller, i2c, PWM based keyboard LED illumination and the boot framebuffer. Signed-off-by: Janne Grunau <j@jannau.net>
The core types of the M4 SoC no longer carry individual codenames.
Apple's device trees re-use the 'everest' and 'sawtooth' codenames from
the M3 generation for all later cores.
Instead, we use a combination of the SoC's codename ('Donan') and the
type of core ('e' and 'p' for the efficiency and performance cores
respectively) as compatible for these cores.
Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
…ible The Apple t8132 (M4) SoC uses an AIC3 as interrupt controller, same as the M3 predecessor. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
The watchdog on the Apple silicon t8132 (M4) SoC is compatible with the existing driver. Add "apple,t8132-wdt" as SoC specific compatible under "apple,t8103-wdt" used by the driver. The M4 wdt block additionally has a secondary watchdog, which is disabled by m1n1 and can safely be ignored by Linux. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
The PMGR blocks on Apple silicon M4 SoCs (t8132) are compatible with the M1/M2/M3 predecessors. Add "apple,t8132-pmgr" as M4 specific compatible. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
The device power state management of the PMGR blocks on Apple's t8132 SoC (M4) is compatible with the existing driver. Add "apple,t8132-pmgr-pwrstate" as SoC specific compatible under the existing "apple,t8103-pmgr-pwrstate" used by the driver. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
The pin controller on the Apple silicon t8132 (M4) SoC is compatible with the existing driver. Add "apple,t8132-pinctrl" as SoC specific compatible under "apple,t8103-pinctrl" used by the driver. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
The i2c block on the Apple silicon t8132 (M4) SoC is compatible with the existing driver. Add "apple,t8132-i2c" as SoC specific compatible under "apple,t8103-i2c" used by the driver. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
The PWM controller on the Apple silicon t8132 (M4) SoC is compatible with the existing driver. Add "apple,t8132-fpwm" as SoC specific compatible under "apple,s5l-fpwm" used by the driver. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
The Apple devices with the t8132 SoC (M4) are very similar to their M3 predecessors. In addition to the MacBook Pro and the various MacBook Air and iMac variants, a Mac mini is offered again with the M4. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
Added device trees for the following devices: - apple,j604 - MacBook Pro (14-inch, M4, 2024) - apple,j623 - iMac (24-inch, 2x USB-C, M4, 2024) - apple,j624 - iMac (24-inch, 4x USB-C, M4, 2024) - apple,j713 - MacBook Air (13-inch, M4, 2025) - apple,j715 - MacBook Air (15-inch, M4, 2025) - apple,j773g - Mac mini (M4, 2024) The device trees have a minimal set of devices limited to CPU cores, interrupt controller, power states, watchdog, serial, pin controller, i2c and framebuffer. The device trees for the notebooks add a PWM controller for the keyboard LED illumination. Using the macOS 26.6b3 iBoot/firmware, the Mac mini reliably boots on a single core using the stock kernel. Booting with smp requires avoiding the wfi and wfit instructions in the idle loop and `delay()` respectively, since those instructions cause a loss of architectural state on the secondary cores, and even then boot is unreliable. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
The APCIE_PHY_SW power state is described in Apple's device tree as child of the virtual storage and general purpose PCIe power tree. Instead of supplementing them with their derived power states keep it always on like macOS. This mirrors t602x-pgmr.dtsi ps_apcie_phy_sw. Signed-off-by: Janne Grunau <j@jannau.net>
The DART is compatible with "apple,t8110-dart" introduced with Apple M1 Pro/Max and M2 devices. Signed-off-by: Michael Reeves <michael.reeves077@gmail.com>
"apple,t8122-sart" is compatible to "apple,t6000-sart". Signed-off-by: Michael Reeves <michael.reeves077@gmail.com>
Signed-off-by: Janne Grunau <j@jannau.net>
List trackpad firmware files and activate MTP devices nodes on all t6030, t6031 and t6034 based MacBooks. Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
…ration Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: sofus <sofus.c@icloud.com>
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech> Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
The additional isp power-states from 0x4000 to 0x4060 are not in Apple's device tree and are copied from t8112.dtsi and adapted to macOS trace. Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech> Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Sasha Finkelstein <k@chaosmail.tech>
Change the "USB-C Left Rear" to "USB-C Left Back" to be consistent with Apple's "port-location" property. Signed-off-by: Janne Grunau <j@jannau.net>
All T602x DCPs support simultaneous scanout on surfaces 0, 1, and 3. Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
All T600x DCPs support simultaneous scanout on surfaces 0 and 1. Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
All T8103 DCPs support simultaneous scanout on surfaces 0 and 1. Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
All T8112 DCPs support simultaneous scanout on surfaces 0, 1, and 3. Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Add the SMC mailbox, SMC and SMC GPIO controller nodes for t8132. Tested on an M4 MacBook Pro (J604), where the SMC and GPIO controllers probe successfully. Signed-off-by: Jiajun Wang <ryan1202@foxmail.com>
Add the MTP, mailbox, DART, DockChannel and HID transport nodes for t8132. Unlike t8122, the MTP DART uses stream ID 0 on t8132. Signed-off-by: Jiajun Wang <ryan1202@foxmail.com>
Tested on an M4 MacBook Pro (J604), the built-in keyboard works. Signed-off-by: Jiajun Wang <ryan1202@foxmail.com>
jannau
force-pushed
the
bits/000-devicetree
branch
from
August 23, 2026 22:01
128734c to
d7da162
Compare
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.
Add device tree support required for the built-in keyboard on the M4 MacBook Pro (J604), including SMC, MTP, DockChannel and DART.
I wrote it based on the t8122 device tree. But unlike t8122, t8132 uses stream ID 0 instead of 1. I guess it's related to the
sidfield in/arm-io/dart-mtpin ADT.The device tree changes were only tested as part of the
asahibranch on an M4 MacBook Pro (J604).