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>
|
Follow-up stacked on this one: #463 enables Thunderbolt DP tunnels on the J475d (t6022 qualification in thunderbolt_apple and phy-apple-atc, plus dual-stream DT wiring with die-0 dcpext0). It includes this commit unchanged as its base, so merging #462 first keeps #463's diff to its own three commits. |
scottjones
left a comment
There was a problem hiding this comment.
Thanks for this. We've been wanting M2 Ultra display support for a while, and narrowing APPLE_T602X_NON_ULTRA instead of copying the routes into a J475d file is the right call. The test table and the macOS ioreg notes made it easy to follow.
I built J474s, J475c and J475d (with j414s and j416c as a control) at the base, at #462 and at #463, and diffed the decompiled trees. J474s and J475c only change in /aliases order, which is harmless since aliases are looked up by name. The J475d delta matches what you describe, with no dangling references and no dtc warnings. No bugs found.
I've put a few questions on #463, since most of them are about the tunnel side. The J474s/J475c one applies here too: has anyone run this on one of those boards, or is the DT diff the only check so far?
As a first-time contributor your CI runs need a maintainer to start them. I've started the full build, KUnit and boot run, and I'll approve once it's green and the questions are answered.
|
Thanks! I've answered the questions on #463, including J474s/J475c: I don't have either board, so the DT diff is the only check from me. I've asked @ytgconsulting, who has a J475c, whether they can try a DP-alt display on a rear port. One correction to the table above: "Coldplug" there meant attached across a reboot. I've since done a real power-on with the UltraFine attached, and it comes up (details on #463). |
scottjones
left a comment
There was a problem hiding this comment.
Approving. CI is green, and the J474s/J475c device trees come out unchanged. Before this merges I'd like the J475c check with a DP-alt display on a rear port, if ytgconsulting can run it.
On the Mac Studio (M2 Ultra, J475d) no display controller is wired to the four rear USB-C ports, so a USB-C DisplayPort display there stays dark. The
dcpext1routes int602x-j474-j475.dtsisit inside theAPPLE_T602X_NON_ULTRAblock 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, so this narrows the guard instead of adding a J475d copy:
t602x-j474-j475.dtsi: only the USB4 aliases, the PCIe-C tunnels and the non-Ultra&displayiommus stay underAPPLE_T602X_NON_ULTRA. Thedcpext1display routes,dpaudio2, the ATC crossbars and the always-on ATC common power domains apply to J475d too.t6022-j475d.dts:t6022-jxxxd.dtsipoints the display subsystem at the die-1 HDMI DART only, so adddispext1_dartthere for the framebuffers of the new pipe.Why dcpext1
From macOS on the same J475d (ioreg, IODeviceTree and service planes):
display-crossbar0(display-crossbar,t602x) hasufp-endpointsdispext0–7 anddfp-endpointsatc0–7 plus lpdptx-phy0/1. The routing is chosen at runtime, so the ADT alone doesn't fix a controller per port.dcpext1@15C00000, die 0) on rear port 2 (hpm2/Port-USB-C@3,usb-pd@3b) and again on rear port 1 (hpm3/Port-USB-C@4,usb-pd@3c). Thedisplay-crossbar0NVRAM state changes in exactly one byte between the two (0x20→0x30).dcpext0_die1(dcpext4) for HDMI, which is unchanged here.Device tree check
Built with the kernel's own
scripts/dtc(the t602x trees use floating-point literals):bed544bwithout this change,t6022-j475d.dtbis byte-identical to the one inlinux-aurora7.2.11.aurora16-1.t6020-j474sandt6021-j475ckeep the same nodes and properties. Sorteddtc -I dtb -O dts -soutput is identical; only the position of thedcpext1alias within/aliaseschanges.t6022-j475d, the only changes are thedcpext1alias,dcp@315c00000enabled withphys/mux-controls/typec-routesforusb-pd@38,@3f,@3band@3c,dpaudio2enabled, the fouratc*-dpxbarmuxes enabled,apple,always-ononps_atc0..3_common, and the secondiommusentry ondisplay-subsystem.Testing
Mac Studio (M2 Ultra, 2023),
apple,j475d/apple,t6022. Stocklinux-aurora7.2.11.aurora16-1 kernel and modules, with only this device tree swapped intoboot.bin. OS firmware 13.5, system firmware 26.6.2. m1n1 stage 2 isba130ffb+ omacom/m1n1#46 + the T602x DART patch from #379, which the HDMI DCP needs on this machine (#428);dcpext1does not depend on it. Hyprland 0.57.2. LG UltraFine 4K over a USB-C to DisplayPort cable, Dell U2718Q on HDMI at the same time.dcpext1boots cold and joins the aggregate next to the HDMI DCP:Results (rear ports counted from the left, looking at the back):
typec2)typec3)typec1)typec0)av_service_connectstarts the audio serviceNo
WARNING,BUGor oops in any of these boots.Notes, none of which keeps the display from coming up:
ERROR: Modeset done, but pipe not enabled: fSoftPowerState=1, fDisplayPowerState=0, fHardPowerState=1/set_digital_out_mode returned 80000104.dcp_dptx_connect: timed out waiting for port 0 link configuration) and came up on its own about a second later. Rear 3 and rear 4 connected without it. The HDMI DCP on this machine logs the same timeout at every boot (j475d (Mac Studio M2 Ultra): dcpext RTKit boot times out (-62), apple-drm never binds — HDMI and Thunderbolt displays all stuck on simpledrm #428), where it does not retry by itself.Related: #428 (J475d HDMI), #379 (m1n1 DART fix), and fc4add9 / 4ef8124, which added these routes for the non-Ultra boards.