Repository navigation
Conversation
…ports On the Mac Studio (M2 Ultra) no display controller is wired to the four rear USB-C ports, so a USB-C DisplayPort display there never lights up. The dcpext1 routes in t602x-j474-j475.dtsi sit inside the APPLE_T602X_NON_ULTRA block together with the USB4/PCIe-C wiring, and t6022 does not define it. The die-0 half of the t6022 keeps the plain labels and the same rear-port wiring as the M2 Max Studio. macOS on a J475d drives a DP alt mode display on rear ports 1 and 2 from DCPEXT1 through the display crossbar (ADT display-crossbar0, "display-crossbar,t602x"), the same controller the non-Ultra boards use. Keep only the USB4 aliases, the PCIe-C tunnels and the non-Ultra display iommus under the guard. The dcpext1 display routes, dpaudio2, the ATC crossbars and the always-on ATC common power domains now apply to J475d too. t6022-jxxxd.dtsi points the display subsystem at the die-1 HDMI DART only, so add dispext1_dart to it on J475d for the framebuffers of the new pipe. J474s and J475c keep the same nodes and properties; only the position of the dcpext1 alias within /aliases changes. Signed-off-by: Jacob Crowther <3944151+jcrowthe@users.noreply.github.com>
The M2 Ultra is two t6021 dies. Its die-0 ACIO, ATC and display crossbar are the ones the M2 Pro/Max laptops use, and the DCPs are the same apple,t6020-dcpext. With t6022 missing from apple_dpin_qualified_soc, a Thunderbolt display on a J475d enumerates, but the DP IN adapter never asks for a pipeline and the tunnel is torn down after the DPRX timeout: thunderbolt-apple-nhi f01f00000.nhi: 0:5 <-> 1:13 (DP): not active, tearing down Qualify t6022 with the same M2 (pre/post) flow. That flow still requires dual-stream connector wiring, so nothing changes until a board's DT describes it. Tested on a Mac Studio (M2 Ultra, J475d) with an LG 40WP95C on rear ports 1 and 2: 5120x2160@72, hotplug, and DPMS off/on. Signed-off-by: Jacob Crowther <3944151+jcrowthe@users.noreply.github.com>
… tunnels Qualify t6022 for the T602x tunnel clock sequence, as for the Thunderbolt side, and accept the ATC3 core at 0x1303000000. The 14/16-inch boards only have ATC0-2, so ATC3 was never listed, but the Mac mini and Mac Studio use it for their fourth rear port. The wiring gate still applies. Tested on a Mac Studio (M2 Ultra, J475d): a DP tunnel on rear port 1 (phy@1303000000) runs 5120x2160@72. Signed-off-by: Jacob Crowther <3944151+jcrowthe@users.noreply.github.com>
…ar ports On M2, Thunderbolt DP tunnels need dual-stream connector wiring: two DCPs per Type-C connector, each with typecN-dpin0/1 controls on cells 1 and 2 of the port's crossbar, as on the 14/16-inch boards. The J475d's HDMI runs from die 1, so die-0 dcpext0 is free. Enable it as a USB-C-only pipeline for the rear ports (crossbar state 0, dcpext1 state 2), give both die-0 DCPs the DPIN controls, add the second endpoint to each rear connector, and add dispext0_dart to the display iommus. m1n1 fills apple,firmware-compat only through the ADT-indexed dcpextN aliases. Without "dcpext0" here, probe fails with "Could not read 'apple,firmware-compat': -22" and the whole apple-drm aggregate stays down, HDMI included. Tested on a Mac Studio (M2 Ultra, J475d), together with the two previous patches: HDMI (dcpext4), a DP alt mode display on rear port 4 (dcpext0) and a Thunderbolt display on rear port 2 (dcpext1, dpin0) all run at once. Signed-off-by: Jacob Crowther <3944151+jcrowthe@users.noreply.github.com>
Die 0 of the t6022 is the M2 Max die, with four external DCPs, but the J475d enables only dcpext0 and dcpext1 for its four rear USB-C ports, so a third USB-C display waits for a free pipeline. Reuse t6021-display2.dtsi, which adds dcpext2/3 (crossbar states 4 and 6) on the 14/16-inch M2 Max, and extend it to the fourth rear port. The include gets a DISPLAY2_SOC parent so it can be placed under die 0 on t6022; the laptop trees build unchanged. The ADT on this machine matches the laptop nodes: dcpext2@8DC00000 and dcpext3@DC00000, mailbox interrupts 1043-1046 and 1079-1082, DART interrupt 1022. Signed-off-by: Jacob Crowther <3944151+jcrowthe@users.noreply.github.com>
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.
Five displays on the Mac Studio (M2 Ultra, J475d): four on the rear USB-C ports plus HDMI. Stacked on #463 (itself on #462): please review only the last commit,
arm64: dts: apple: t6022-j475d: add die-0 dcpext2/3 for the rear ports.Problem
Die 0 of the t6022 is the M2 Max die, with four external DCPs (
dcpext0–dcpext3in the ADT). The J475d tree enables onlydcpext0anddcpext1for its four rear USB-C ports (HDMI runs from die 1), so a third USB-C display waits for a free pipeline and stays dark.Change
t6021-display2.dtsialready addsdcpext2/dcpext3(crossbar states 4 and 6) for the 14/16-inch M2 Max. It gets aDISPLAY2_SOCparent macro, which defaults to&{/soc}, so it can be placed under&die0on t6022.t6022-j475d.dtsincludes it under&die0and extends both DCPs to the fourth rear port:atcphy3,atcphy3_xbar,route@3, andendpoint@2/@3ontypec3's port@3. It sets&displayiommus to the J475d list (die-1 HDMI DART first) plusdispext2_dart/dispext3_dart.dcpext2/dcpext3are DP-alt candidates only (typecNon crossbar cell 0). Thunderbolt DPIN stays on thedcpext0/dcpext1pairs from #463.The macOS ADT on this machine matches the laptop nodes:
dcpext2@8DC00000anddcpext3@DC00000,dart-dcpext2@8D30C000, mailbox interrupts0x413–0x416(1043–1046) and0x437–0x43a(1079–1082), DART interrupt0x3fe(1022). The aliases (dcpext2,dcpext3) match the ADT indices, which m1n1 needs to fillapple,firmware-compat.Device tree check
Built with the kernel's own
scripts/dtc:t6021-j414candt6021-j416c(the other users oft6021-display2.dtsi) are byte-identical before and after.t6022-j475d, all four die-0 DCPs (289c00000,315c00000,48dc00000,50dc00000) carryroute@0–route@3, and each reartypecNport@3 has four endpoints.checkpatch --strictis clean.Hardware testing
Mac Studio (M2 Ultra, 2023),
apple,j475d. Stocklinux-aurora7.2.11.aurora16-1 kernel plus #463's two rebuilt modules, with this branch's J475d dtb. m1n1 stage 2 is omacom/m1n1#48. OS firmware 13.5, system firmware 26.6.2.All five DCPs bind and boot:
Five displays at once:
new device foundNo
WARNING,BUGor oops in the boot. Not tested: suspend/resume with five displays, DP audio on dcpext2/3.Found along the way, not fixed here
A second Thunderbolt stream (
dpin1, here a monitor daisy-chained behind the 40WP95C) is refused withdpin1: DP tunnel setup failed: -16. This is independent of this PR.apple_drv.cfixes each port's secondary connector to the lowest-indexed Type-C-only pipeline, which isdcpext1on the laptops, wheredcpext0is the HDMI hybrid. On the J475d every die-0 DCP is Type-C-only, so that'sdcpext0, which thedpin0stream also prefers. The two streams collide whiledcpext1/dcpext3sit idle. I'll send that separately with a fabric change and KUnit coverage.