Skip to content

arm64: dts: apple: t8132-j713-j715: DisplayPort alt mode on both USB-C ports - #2807

Draft
RyanTheTide wants to merge 1 commit into
integration/aurorafrom
spec-m3m4/j713-j715-dp-alt-mode-v2
Draft

RyanTheTide wants to merge 1 commit into
integration/aurorafrom
spec-m3m4/j713-j715-dp-alt-mode-v2

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Replaces #2246 (same changes, commit trailers fixed, on the current integration/aurora).

Problem. The MacBook Air M4 (J713/J715) has two USB-C ports on ATC0/ATC1, each with its display crossbar, wired like the J604's left ports. DP alt mode already runs there through the T8132 PHY support (apple,dp-alt-mode in drivers/phy/apple/atc.c). The Air DT still has a note from before that support, saying these PHYs have no DP alt mode. So a plain USB-C monitor or a USB-C to HDMI/DP adapter (anything not USB4/Thunderbolt) gets no picture.

Change. Mark atcphy0 and atcphy1 with apple,dp-alt-mode and fix the comments. The dcpext routes, their loader gate and the tunnel path are unchanged. apple,dp-alt-mode is the board-wiring property the PHY driver already reads (J604 sets it on its three USB-C ports and not on ATC2, which drives HDMI).

Testing. cpp + dtc on all six T8132 boards: same warning counts as the base.

Still to run. On a J713 or J715: a non-Thunderbolt USB-C monitor on each port (mode set, hotplug, one s2r), and a USB4 display to confirm the tunnel path is unchanged.

Assisted-by: LLM (Claude:Opus 5.5)

…C ports

The MacBook Air M4's two USB-C ports are ATC0 and ATC1 with their display
crossbars, the same PHYs and routes as the J604's left ports, where DP alt
mode runs since the T8132 PHY gained it (apple,dp-alt-mode). The Air DT
still said the PHYs had no DP alt mode, a note from before that support,
so a USB-C monitor or a USB-C to HDMI adapter got no picture unless it
was a USB4/Thunderbolt display.

Mark both PHYs. The dcpext routes, their boot-loader gate and the tunnel
path are unchanged.

Not tested on hardware; needs a J713/J715
run with a USB-C (non-TB) monitor on each port.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@kazuhidet

Copy link
Copy Markdown

J715 row for this change (MacBook Air 15-inch, M4, Mac16,13). I tested it as #2246, whose DT change is the same as this head's (64d3aeeb).

Build

Result: DP alt mode works on both ports. Each run is one boot.

Port A (MagSafe side) Port B
Type-C partner on port1, svid=ff01 active=yes, host/source partner on port0, same
Crossbar / PHY 40b04c000.mux: dpphy route 2, "allocated Type-C DPTX PHY 1" 40304c000.mux: dpphy route 2, "allocated Type-C DPTX PHY 0"
HPD "display HPD asserted", IRQ_HPD raised same
DRM card1-DP-1 connected, enabled, modes up to 3840x2400 same
Picture yes, below 3840x2400 (see below) yes
Unplug and replug works works
DART faults 0 0

Modes on one port, each set from Hyprland and shown on the monitor:

  • 1280x720@60, 1920x1080@60, 2560x1440@59.95, 2560x1600@59.97, 3840x2160@30 and 3840x2160@60 all show a picture, with no frame not shown lines.

Failed units and kernel errors: the same two local services and known errors as in my other rows. Nothing new.

One finding outside this PR: a sink mode above 3840x2160 stays black. This monitor prefers 3840x2400, and with it the screen stays black:

apple-dcp 286e00000.dcp: enable 3840x2400 (timing 43, colour 91, bootstrap 0) failed: -22; no frames until an enable succeeds
apple-dcp 286e00000.dcp: dcpext-286e00000.dcp on: 3840x2400@60 Hz failed: -22
apple-dcp 286e00000.dcp: dcpext-286e00000.dcp: frame not shown: -116

The monitor shows its own resolution banner, so the link and timing are set. Hyprland counts the output as enabled, but every frame is refused.

  • Cause: dcp_m4_ext_drm_buffers() returns -EINVAL for width > 3840 || height > 2160, since its surfaces are sized for 3840x2160. dcp-m4-frame.h has the same check. Both are still there on current integration/aurora (00cbc67: iomfb_m4.c:4301, dcp-m4-frame.h:145).
  • Not bandwidth: 3840x2400@59.99 has a lower pixel clock (592.5 MHz) than 3840x2160@60 (594 MHz), which works. The size is the limit.
  • Suggestion: filter such modes in mode validation, so userspace never picks one that can't scan out. Or size the surfaces for the largest mode. Should I open an issue for it?

Not covered: s2idle with the display coming back, a USB-C to HDMI adapter, and the USB4 tunnel path.

The monitor reported no make or model to userspace. That fits this kernel, which predates "drm: apple: t8132: publish the sink's EDID on external outputs".

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.

2 participants