Skip to content

USB4 and Thunderbolt on the J516M (M3 Max) #1

Open
4 of 9 issues completed
Open

Description

@hungbenjamin402

Destination

An implementation spec for USB4 and Thunderbolt on the J516M (M3 Max, T6034): every build slice, from NHI bring-up to eGPU compute, specified sharply enough to become its own patch, derived from the sibling boards' work already in integration/aurora.

Notes

  • Domain: Linux kernel bring-up on Apple Silicon (drivers/thunderbolt, drivers/phy/apple, drivers/pci/controller/pcie-apple*, arch/arm64/boot/dts/apple), plus m1n1 where needed.
  • Vocabulary: GLOSSARY.md on the usb4-m3max branch. Use its terms (port, ACIO, NHI, ATC PHY, tunnel root port, bring-up, baseline).
  • Skills: research for research tickets; grilling and domain-modeling for grilling tickets; ipsw for macOS kext and device-tree work.
  • Scope: NHI bring-up on all three ports; PCIe and USB3 tunnels; DisplayPort tunnels through a dock; hotplug and s2idle; AMD eGPU compute.
  • Acceptance: a USB4 NVMe enclosure reaches at least 90% of the macOS baseline on the same port. A TB4/USB4 dock works, including its display output to a monitor. eGPU compute is specified, but its acceptance waits for eGPU hardware.
  • Hardware on hand: a TB4/USB4 dock, a USB4 NVMe enclosure, a monitor. macOS still boots on the J516M, for baselines and m1n1 hypervisor traces.
  • Standing preferences:
    • m1n1 changes are allowed only as isolated slices with a rollback plan; kernel-only slices come first.
    • Upstream hears about this effort at PR time.
    • Commits are authored and signed off as Benjamin Nguyen, with no AI attribution.
    • Branch usb4-m3max is based on the J516M kernel.
  • Starting fact: on the J516M today, the three ACIOs and four ATC PHYs bind, but no NHI binds. /sys/bus/thunderbolt is empty and only the internal PCIe controller is up.

Decisions so far

Not yet specified

  • Whether the tunnel and DisplayPort slices need m1n1 (bring-up does not: m1n1 already fills the ACIO, NHI and PHY tunables on the J516M).
  • Hotplug and s2idle behaviour per tunnel type, and what the J516S sleep work already covers; macOS also switches the CIO power rail off when every port is off, which Linux never does.
  • Whether an m1n1 hypervisor trace of macOS attaching the dock is needed, to settle the CIO reconfigure trigger, power-gate index 4 and the live tunable values. It depends on what the first Linux plug-in and the live ADT dump show, and it needs a second computer.
  • Throughput tuning if the enclosure falls short of 90% (link width and generation in the tunnel, interrupt and DMA paths).
  • How the finished slices are stacked into test kernels on the J516M kernel, and how they are cut into upstream PRs.

Out of scope

  • eGPU display output and gaming (x86 games through FEX/Proton): beyond compute, much larger, ruled out at charting.
  • NVIDIA eGPUs: no open arm64 path in this tree; ruled out at charting.
  • Thunderbolt networking, USB4 v2 / Thunderbolt 5 speeds: not needed for the destination.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions