Repository navigation
J773s: USB3 on the front USB-C ports (T6040 PHY behind an on-board hub) - #2361
Draft
RyanTheTide wants to merge 2 commits into
Draft
RyanTheTide wants to merge 2 commits into
RyanTheTide wants to merge 2 commits into
Conversation
The Mac mini M4 Pro (J773s) has two front USB-C ports behind an on-board USB2/USB3 hub on ATC3, with no PD controller. This PHY brought USB3 up only for a plug orientation from a Type-C orientation switch. Without that switch it skipped the USB3 setup entirely and was then taken for a DP-only (HDMI converter) PHY. Recognise such a port the way dwc3-apple already does: a "hub" child on the controller that the PHY's USB3 graph port (port 1) links to. The PHY then takes the connection as fixed and runs USB3 on the lanes of a normal plug orientation, with no orientation switch. The ADT gives every connector-less ATC PHY plug orientation 1, as it does the laptops' HDMI converter PHYs, which already run unflipped. PHYs with an orientation switch, and those without a hub, are unchanged. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The two front ports sit behind an on-board USB2/USB3 hub on ATC3, whose controller (ADT usb-drd3) is a fixed host. Enable atcphy3, its mailbox, the dwc3_3 DARTs and dwc3_3, and add: - the hub child on raw USB2 root port 1. It is the J773g's front hub: the ADT lists the same hub firmware (usb3hub-fw-gl3590, id 56) and the same hub port layout (usb-drd3-port-hs/-ss); - the link from the PHY's USB3 port to the controller's SuperSpeed port (raw port 2), by which the PHY finds the fixed hub; - the ATC3 power domains; - the hub's reset and SPI-flash output-enable lines (ADT usb3hub_rst 127, usb3hub_flash_oe 130), held high as the boot loader and macOS leave them, as on the J773g. The J614s, J616s and J616s-tether DTBs are unchanged. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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.
Problem
The Mac mini M4 Pro (J773s) front USB-C ports are disabled. They sit behind an on-board USB2/USB3 hub on ATC3, with no PD controller and no Type-C connector, and the T6040 PHY driver only brings USB3 up for a plug orientation reported by a Type-C orientation switch. Without that switch,
t6040_usb3_probe()also returned before the USB3 setup, so the PHY would have been treated as a DP-only (HDMI converter) PHY.Change
Two commits: the PHY change, then the J773s device tree.
phy: apple: t6040: a PHY whose USB3 graph port (port 1) links to a controller with ahubchild is wired to a fixed hub. This is the same hardware description dwc3-apple already uses to start such a controller as a host. That PHY runs USB3 on the lanes of a normal-orientation plug and registers no orientation switch. The ADT gives every connector-less ATC PHY plug orientation 1, the laptops' HDMI converter PHYs included, and Linux already drives those unflipped. PHYs withorientation-switch(every Type-C port) are unchanged.t6040-j773s-usb-front.dtsi: enable atcphy3, its mailbox, the dwc3_3 DARTs and dwc3_3. Add the hub child (usb5ac,800b: the J773g front hub, which has the same GL3590 firmware id in the ADT), the PHY to controller SuperSpeed link, the ATC3 power domains and the hub reset / flash-OE GPIO hogs (ADT usb3hub_rst = 127, usb3hub_flash_oe = 130; the loader leaves both high, as on the J773g).The J614s, J616s and J616s-tether DTBs are byte-identical. Only the J773s changes.
Details
setdid.t6040-j773s.dts(arm64: dts: apple: t6040: Thunderbolt/USB4 on the Mac mini M4 Pro, router enables shared by every M4 Pro #2284 adds an include there), the J773s rear ports.Testing
integration/aurora. dtc prints the same warning counts.drivers/phy/apple/t6040-usb2.ccompiled for arm64 with clang 22 and the W=1 warning set against a preparedintegration/auroratree (CONFIG_PHY_APPLE_T6040_USB2=m): 0 warnings, the same as before the change.Still to run
A J773s boot (community tester, #1479):
dmesg | grep 39aa90000showsUSB3 PIPE on the PHYand noUSB3: no plug orientation.lsusb -tshows the front hub on the usb@39a280000 bus at 480M and at 5000M or 10000M.Assisted-by: LLM (Claude:Opus 5.5)