Skip to content

arm64: dts: apple: Enable dp-altmode for M1 Pro/Max MacBook Pro#476

Open
IntrestingBeing wants to merge 3 commits intoAsahiLinux:fairydustfrom
IntrestingBeing:fairydust-m1pro
Open

arm64: dts: apple: Enable dp-altmode for M1 Pro/Max MacBook Pro#476
IntrestingBeing wants to merge 3 commits intoAsahiLinux:fairydustfrom
IntrestingBeing:fairydust-m1pro

Conversation

@IntrestingBeing
Copy link
Copy Markdown

Summary

  • Enable USB-C DisplayPort alt-mode on MacBook Pro 14-inch and 16-inch 2021 models (M1 Pro and M1 Max)
  • Move ENABLE_DCPEXT_TYPEC from the shared dtsi into per-machine DTS files, matching the pattern used by the Mac Mini M2 Pro (t6020-j474s)
  • Increase pipehandler lock timeout from 1ms to 100ms to fix hot-plug reliability

Details

The fairydust branch already had the dp-altmode infrastructure in t600x-j314-j316.dtsi behind #ifdef ENABLE_DCPEXT_TYPEC, but it was only enabled via a hardcoded #define in the shared dtsi. This moves the define into each machine DTS (j314s, j316s, j314c, j316c) for consistency with how t6020-j474s enables it.

The blessed port is the left front USB-C (typec1 / atcphy1).

The pipehandler timeout increase (PIPEHANDLER_LOCK_ACK_TIMEOUT_US 1000 → 100000) fixes a hot-plug issue where re-plugging a USB-C display would fail with "Pipehandler lock not acked". The timeout is a maximum — readl_poll_timeout polls every 10μs and returns on success, so normal operations are unaffected.

Test plan

  • Tested on MacBook Pro 14-inch M1 Pro (t6000-j314s) with Dell P2723DE over direct USB-C
  • Cold boot: display detected in ~7 seconds
  • Hot-plug: display survives cable replug with the timeout fix
  • Triple monitor setup (eDP-1 + HDMI-A-1 + DP-1) working simultaneously
  • Untested on M1 Max variants (j314c, j316c) and 16-inch M1 Pro (j316s) — same hardware layout, should work

Move ENABLE_DCPEXT_TYPEC from the shared t600x-j314-j316.dtsi into
each individual machine DTS file (j314s, j316s, j314c, j316c), matching
the pattern used by t6020-j474s for the Mac Mini M2 Pro.

This enables USB-C DisplayPort alt-mode output on all MacBook Pro
14-inch and 16-inch 2021 models (M1 Pro and M1 Max). The blessed port
is the left front USB-C port (typec1 / atcphy1).

Tested on MacBook Pro 14-inch M1 Pro (t6000-j314s) with a Dell P2723DE
monitor over a direct USB-C cable.

Signed-off-by: Adi <39857031+IntrestingBeing@users.noreply.github.com>
Increase PIPEHANDLER_LOCK_ACK_TIMEOUT_US from 1ms to 100ms. The
original 1ms timeout is sufficient for cold boot but too tight for
USB-C DisplayPort hot-plug scenarios where the PHY state is partially
initialized from a previous connection.

The timeout is a maximum — readl_poll_timeout polls every 10us and
returns immediately on success, so this does not add latency to the
normal path. It only gives the hardware more time to respond when
re-establishing a DP link after a cable replug.

Without this change, hot-plugging a USB-C display reliably fails with
"Pipehandler lock not acked" as the PHY cannot re-lock in time, causing
the display link to drop seconds after being established.

Signed-off-by: Adi <39857031+IntrestingBeing@users.noreply.github.com>
Move the dp-altmode blessed port from the left front USB-C (typec1 /
atcphy1) to the right USB-C (typec2 / atcphy2). This frees up both
left ports for charging and peripherals while dedicating the right
port to display output.

Rewires dcpext1 from atcphy1_xbar to atcphy2_xbar and moves the
displayport property from the typec1 to typec2 connector.

Signed-off-by: Adi <39857031+IntrestingBeing@users.noreply.github.com>
@WhatAmISupposedToPutHere
Copy link
Copy Markdown

Can you explain what you are trying to achieve with this PR?

@hamza72x
Copy link
Copy Markdown

hamza72x commented Mar 31, 2026

Thanks a lot man. Finally Asahi is usable for me. I was not using Asahi (m1 pro) due to limitation of 60Hz (on my 4K external monitor)

image

One caveat: the refresh rate sometimes drops randomly, not sure why. but it's usable for now.

btw, only the "right port" is working for me

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.

3 participants