Skip to content

t8122/t603[0124] PMP support#525

Open
yuyuyureka wants to merge 208 commits into
AsahiLinux:asahi-wipfrom
yuyuyureka:m3-pmp
Open

t8122/t603[0124] PMP support#525
yuyuyureka wants to merge 208 commits into
AsahiLinux:asahi-wipfrom
yuyuyureka:m3-pmp

Conversation

@yuyuyureka

@yuyuyureka yuyuyureka commented Jun 28, 2026

Copy link
Copy Markdown

Only T6034 is tested.

marcan and others added 30 commits June 20, 2026 16:47
Signed-off-by: Hector Martin <marcan@marcan.st>
Co-developed-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
t8103:
- WLAN (SMC PMU GPIO AsahiLinux#13)

Signed-off-by: Hector Martin <marcan@marcan.st>
- WLAN (SMC PMU GPIO AsahiLinux#13)
- SD (SMC PMU GPIO AsahiLinux#26)

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Hector Martin <marcan@marcan.st>
This causes flakiness if shut down; don't do it until we find out
what's going on.

Signed-off-by: Hector Martin <marcan@marcan.st>
This should now work properly with power domain dependencies.

With "apple,always-on" removed from ps_pmp add it as dependency for the
dcp* power-domains. Fixes dcp crashes on power state changes.
TODO: investigate if it is enough to power ps_pmp on during
SetPowerState calls.

Signed-off-by: Janne Grunau <j@jannau.net>
Enables keyboard and touchpad input on MacBook Air (M1, 2020) and
MacBook Pro (13-inch, M1, 2020).

Signed-off-by: Janne Grunau <j@jannau.net>
Enables keyboard and touchpad input on MacBook Pro (14/16-inch,
M1 Pro/Max, 2021).

Signed-off-by: Janne Grunau <j@jannau.net>
Those provide trackpad and keyboard for j413/j493.
Add keyboard alias & layout props for t8112 laptops

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
arm64: dts: apple: t8103-j274: Add speaker I/V sense slots

Specify TDM slots for the speaker amp IC to transmit I/V sense
measurements in.

arm64: dts: apple: j293/j313: Model SDZ GPIO as a regulator

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Co-developed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
arm64: dts: apple: t600x-j314-j316: Add speaker I/V sense slots

Specify TDM slots for the speaker amp IC to transmit I/V sense
measurements in. Make sure the channel order mirrors that of the
playback PCM.

arm64: dts: apple: t600x-j314-j316: Zero out unused speaker sense slots

Make one left codec and one right codec zero out the unused slots on
their respective speaker sense buses. Internally, inside the SoC, the
left and right sense buses are ORed, and zeroing-out the unused slots
on one bus is required so as not to corrupt the data on the other.

arm64: dts: apple: t600x: describe shared SDZ GPIO for tas2764

machines with the tas2764 amp codec share a GPIO line for
asserting/deasserting the SDZ pin on the chips. describe
this as a regulator to facilitate chip reset on suspend/resume

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Co-developed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Co-developed-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
arm64: dts: apple: t8112: describe shared SDZ GPIO for tas2764

machines with the tas2764 amp codec share a GPIO line for
asserting/deasserting the SDZ pin on the chips. describe
this as a regulator to facilitate chip reset on suspend/resume

Co-developed-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Hector Martin <marcan@marcan.st>
Co-developed-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
The Mac Studio M1 Max (t6001) model has a built-in USB3 hub. This hub
has a firmware flash which is also connected to an AP SPI controller.
The hub starts out in reset and the host is expected to bring it out of
reset, potentially after upgrading/validating the firmware.

We won't be doing anything with the firmware, so just use gpio-hog to
flip the two GPIOs needed to bring up the hub chip.

Signed-off-by: Hector Martin <marcan@marcan.st>
The dcp co-processor crashes on HDMI unplug while it apparently tries
to notify pmp. Handle "notify_pmp" as a parent dependency for
"ps_disp0_fe" and "ps_dispext_fe".

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
The display system is initialized by the bootloader to provide a simple
framebuffer at startup. Memory for the framebuffer and heap for the
display co-processor are alreay mapped through the IOMMU. IOMMU
intialization must preserve this mappings to avoid crashing the display
co-processor. The exisitng mappings are caried in the devicetree. They
are applied during device attach to ensure the IOMMU framework is aware
of these mapping.

Mappings are filled by m1n1 during boot.

Based on https://lore.kernel.org/asahi/20220923123557.866972-1-thierry.reding@gmail.com

arch: arm64: apple: t8103: Add connector type property for DCP*

arch: arm64: apple: Add dcp panel node for t8103 based laptops and imacs

The panel node will contain among other properties backlight control
related properties from the "backlight" node in the ADT.

arm64: dts: apple: t8103: Add "ps_disp0_cpu0" as resets for dcp

Signed-off-by: Janne Grunau <j@jannau.net>
The display system is initialized by the bootloader to provide a simple
framebuffer at startup. Memory for the framebuffer and heap for the
display co-processor are alreay mapped through the IOMMU. IOMMU
intialization must preserve this mappings to avoid crashing the display
co-processor. The exisitng mappings are caried in the devicetree. They
are applied during device attach to ensure the IOMMU framework is aware
of these mapping.

Mappings are filled by m1n1 during boot.

Based on https://lore.kernel.org/asahi/20220923123557.866972-1-thierry.reding@gmail.com

arch: arm64: apple: t600x: Add connector type property for DCP*

arch: arm64: apple: Add dcp panel node for t600x based laptops

The panel node will contain among other properties backlight control
related properties from the "backlight" node in the ADT.

arm64: dts: apple: t600x: Add "ps_disp0_cpu0" as resets for dcp

Signed-off-by: Janne Grunau <j@jannau.net>
arm64: dts: apple: t8112: Add "ps_disp0_cpu0" as resets for dcp

arm64: dts: apple: t8112-j473: Add dptx-phy power-domain

The HDMI output used by framebuffer0 requires the display controller and
external DP phy power-domains to remain active.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Hector Martin <marcan@marcan.st>
Removes the "apple,always-on" property from ps_disp0_fe/cpu0.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Asahi Lina <lina@asahilina.net>
to be dropped

Signed-off-by: Asahi Lina <lina@asahilina.net>
jannau and others added 17 commits June 28, 2026 19:46
Apple M3 Pro and Max devices are using 'gp00' keys for GPIO in addition
to 'gP00' keys. Add a second compatible to handle this keys with an
additional macsmc-gpio instance.

Signed-off-by: Janne Grunau <j@jannau.net>
Add support for SMC GPIO keys with a lower letter 'p' via the
"apple,smc-low-gpio" compatible. This adds support for a second
macsmc-gpio controller using 'gp00' keys.
These keys are used on Apple M3 Pro and Max MacBooks in the controller
for keyboard and trackpad and for the built-in DisplayPort to HDMI
converter.

Signed-off-by: Janne Grunau <j@jannau.net>
Apple M3 Pro and Max devices are using 'gp00' keys for GPIO in addition
to 'gP00' keys. These keys are handled by an additional macsmc-gpio
instance using the "apple,smc-low-gpio" compatible.

Signed-off-by: Janne Grunau <j@jannau.net>
- WLAN/BT (SMC PMU GPIO AsahiLinux#13) (all devices)
- ASM3142 (SMC PMU GPIO AsahiLinux#14) (j434, iMac with 4 USB-C ports)
- SD card reader (SMC PMU GPIO AsahiLinux#23) (j504, 14-inch MacBook Pro)

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Yureka <yuka@yuka.dev>
The internal keyboard and trackpad HID on MacBook variants
of the Apple M3 (t8122) SoC are connected through a Apple
-developed protocol called DockChannel and mediated by a
coprocessor known as the Multi-Touch Processor (MTP).

This commit adds the nessecary device tree nodes to the
M3's device tree for internal HID to work. It is disabled
by default, to be enabled only in MacBook board files
where it is tested and confirmed to work.

Co-developed-by: Alyssa Milburn <amilburn@zall.org>
Signed-off-by: Alyssa Milburn <amilburn@zall.org>
Signed-off-by: Michael Reeves <michael.reeves077@gmail.com>
Add mtp device nodes for t8122 (M3) based MacBooks.

Signed-off-by: Michael Reeves <michael.reeves077@gmail.com>
Signed-off-by: Janne Grunau <j@jannau.net>
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>
…g cycles

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
…ration

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Janne Grunau <j@jannau.net>
Comment thread arch/arm64/boot/dts/apple/t6030.dtsi Outdated
#else
power-domains = <&ps_ans>,
#endif
<&ps_apcie_sys_st>;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does moving ps_apcie_sys_st to the pmp_report subnode causes any issues? Even if I think I'd still prefer

	#if defined(APPLE_USE_PMP)
	power-domains = <&pmp_report_ans>, <&ps_apcie_sys_st>;
	#else
	power-domains = <&ps_ans>, <&ps_apcie_sys_st>;
	#endif

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to that

Comment thread arch/arm64/boot/dts/apple/t6032.dtsi Outdated
power-domains = <&ps_ans_die1>;
};
&nvme_die1 {
power-domains = <&ps_ans_die1>;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this misses ps_apcie_sys_st and ps_apcie_sys_st1

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@yuyuyureka yuyuyureka force-pushed the m3-pmp branch 2 times, most recently from f559f81 to b236a4c Compare June 30, 2026 12:50
yuyuyureka and others added 4 commits June 30, 2026 14:50
t6031/t6034 continue using the same offsets as t602x

Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
Signed-off-by: Yureka <yuka@yuka.dev>
Signed-off-by: Yureka <yuka@yuka.dev>
Tested on t6034

Signed-off-by: Yureka <yuka@yuka.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants