Skip to content

arm64: dts: apple: t6040-j773s: USB4 on the three back Type-C ports - #2290

Closed
RyanTheTide wants to merge 2 commits into
integration/aurorafrom
m4fam/j773s-usb4
Closed

RyanTheTide wants to merge 2 commits into
integration/aurorafrom
m4fam/j773s-usb4

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

The Mac mini M4 Pro (J773s) has its three USB4 routers described in t6040-usb4.dtsi, but they stay disabled, and its Type-C connectors have no links to them. Its three back Thunderbolt 5 ports therefore only do USB and DisplayPort alt mode: no thunderbolt-net, no USB4 docks.

Change

Stacked on #2289. Review only the last commit.

The J773s has the same USB4 wiring as the M4 Pro MacBook Pros. Its ADT pairs acio0-2 with atc-phy0-2 (atc-phy-parent) and with the port controllers hpm0-2 (acio-parent): hpm0 at 0xc (back middle) to acio0, hpm1 at 0xa (back left) to acio1, hpm2 at 0x8 (back right) to acio2. The board already names those connectors typec0-2. The router, DART (vm-base 1 TiB) and lstx GPIO addresses are the laptops' too.

t604x-j614-j616-usb4.dtsi (router enables plus the typec to ACIO links) becomes t6040-usb4-typec.dtsi, and the J773s includes it as well. PCIe tunnels stay off, as on the laptops.

DTB delta
  • J614s, J616s, J616s-tether: byte-identical to arm64: dts: apple: t6040-j614s/j616s: enable USB4 from the shared file #2289 (and so to integration/aurora).
  • J773s gains: cio@381ac0000/389ac0000/391ac0000 with their nhi and iommu children and the ports/port@1 endpoints, mailboxes @381108000/389108000/391108000, the ATC0-2 cio/pcie/cio_pcie/cio_usb power states, power-management@502820000 (CIO reset), and connector/ports/port@2 on usb-pd@c/a/8 linked to ACIO0/1/2.
  • I checked the link targets in the preprocessed DTS: typec0 links to usb4_0, typec1 to usb4_1, typec2 to usb4_2, and hpm0/1/2 are at reg c/a/8, as the ADT gives.
  • The aura ACIO/DROM handoff goes through the usb4-N-* aliases, so it does not depend on the board.

Testing

Still to run

A J773s boot (community tester, #1479) once aura admits the board:

  • dmesg | grep -iE 'acio|thunderbolt|nhi' shows three routers probing without errors.
  • ls /sys/bus/thunderbolt/devices lists domain0-2.
  • On each back port, a USB4/TB peer (another Mac with thunderbolt-net, or a TB dock) comes up. cat /sys/bus/thunderbolt/devices/*/rx_speed and rx_lanes read 20.0 / 2 (40 Gb/s; Gen4 is not requested on T6040 yet).
  • Plain USB3 and DP alt mode on the same ports still work.

Assisted-by: LLM (Claude:Opus 5.5)

The J614s and J616s each carried the same 108 lines enabling the three
USB4 routers, their NHIs, DARTs, mailboxes, ATC CIO power states and the
CIO reset controller, while the Type-C to router links of both already
lived in t604x-j614-j616-usb4.dtsi. Both ADTs have the same acio0-2,
dart-acio0-2 and acio-cpu0-2, so move the enables into that shared file,
next to the links they go with.

No functional change: the J614s, J616s and J616s-tether DTBs are
byte-identical before and after (and the J773s, which does not include
the file).

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The Mac mini (J773s) left its three USB4 routers disabled and had no
links from its Type-C connectors to them, so its back Thunderbolt ports
only did USB and DisplayPort alt mode. The links and the router enables
lived in a file only the M4 Pro MacBook Pros included, but the J773s has
the same wiring: its ADT pairs acio0-2 with atc-phy0-2 and with the port
controllers hpm0-2 (back middle, back left, back right), which the board
already names typec0-2, and the router, DART (vm-base) and lstx GPIO
addresses match the laptops'.

Rename t604x-j614-j616-usb4.dtsi to t6040-usb4-typec.dtsi and include it
from the J773s as well. The J614s, J616s and J616s-tether DTBs are
byte-identical; the J773s gains ACIO0-2 with their NHIs and DARTs, the
three router mailboxes, the ATC0-2 CIO/PCIe power states, the CIO reset
controller and the port@2 links of typec0-2. PCIe tunnels stay off, as on
the laptops.

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

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #2284, which does the same move (router enables shared by every M4 Pro, J773s typec to ACIO links) and also gives the T6040 ATC PHYs mode-switch. The J773s needs that for USB4: the PHY only enters CIO mode from its Type-C mux. Review continues on #2284.

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.

1 participant