Skip to content

J873g: USB 2 hosts as T8152 DWC3 (follow-up to #1197) - #1205

Merged
Acelogic merged 4 commits into
aurora-wipfrom
j873g-usb
Nov 8, 2026
Merged

Acelogic merged 4 commits into
aurora-wipfrom
j873g-usb

Conversation

@Acelogic

@Acelogic Acelogic commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #1197. This brings back the J873g (Mac mini M6) USB 2 hosts: the back-left controller (usb-drd1) and the front ports (usb-drd2, behind the on-board hub). They're described so that dt-checks passes.

Commits

  1. arm64: dts: apple: j873: bring back the USB 2 hosts restores the description J873g: internal SSD, 10GbE, power and audio on aurora-wip #1197 set aside.
  2. dt-bindings: usb: apple,dwc3: Add T8152 adds a standalone apple,t8152-dwc3 compatible, following the T8132 exception already in this binding.
    • On T8152 the bootloader hands the controller over powered, with the USB2 side of its ATC PHY set up for host mode.
    • The node is described by its DWC3 core region as a host, and dr_mode = "host" is required.
    • The PHY reset and power domain, and on a Type-C port the role switch, exist but are left to the bootloader, so they are optional for T8152.
    • Every other compatible keeps its requirements.
  3. usb: dwc3: core: Bind the Apple T8152 controller adds apple,t8152-dwc3 to of_dwc3_match.
    • The bound driver is the same dwc3 core driver that ran on the M6 with the earlier snps,dwc3 description: no glue, no match data, and the same probe path.
    • There is no apple,t8103-dwc3 fallback, so the Apple dwc3 glue (which needs the ATC PHY and a Type-C role switch) doesn't bind.
    • When T8152 ATC PHY and Type-C support lands, this entry moves to the glue.
  4. arm64: dts: apple: j873: Describe the USB 2 hosts as T8152 DWC3 switches both nodes from snps,dwc3 to apple,t8152-dwc3. Nothing else in the nodes changes.

snps,dwc3.yaml, which allows one iommus entry, is no longer selected for these nodes, and apple,dwc3.yaml allows the two DARTs.

Validation

  • dt-checks gate, replayed locally (scripts/dtc/apple-dt-check.sh logic, aurora-wip vs this head, all 126 Apple DTBs): 0 new warnings, 0 removed. It reports "binding ok" for usb/apple,dwc3.yaml, and dt_binding_check passes with both examples.
  • checkpatch --strict: clean on the three new commits.
  • Build: the Image, DTB and 231 modules build. Only dwc3.ko changes, gaining the apple,t8152-dwc3 alias. Neither dwc3-apple.ko nor dwc3-generic-plat.ko matches the new compatible.
  • M6, guarded RAM boot through public aura main:
    • Every boot check passed.
    • Both USB nodes have apple,t8152-dwc3 and are bound by dwc3, and all four xHCI buses register.
    • The on-board hub enumerated at high speed.
    • A USB HID device plugged into a front port enumerated at full speed behind the hub.
  • Known open item: while the hub is runtime-suspended, a device plugged in later isn't noticed until the hub resumes. Remote wakeup on connect doesn't seem to work on this path yet; keeping the hub at power/control=on avoids it.
  • Not tested: a device on the back-left port, mass storage, and suspend/resume.

Note: the DTB needs the dwc3.ko from the same build, the one with the new alias. With an older module both hosts stay unbound; the debug port is unaffected.

Attribution

Thomas Glanzmann wrote the original J873g USB 2 support and found the loader steps. Acelogic ported it and wrote the T8152 binding and core match.

Restore the J873g USB 2 host description that linux#1197 set aside: the
back-left controller (usb-drd1) and the front ports (usb-drd2, behind the
on-board hub), each behind its two DART instances. aura prepares these
ports before Linux starts (j873_usb_prep()).

This is the description that worked on the M6, where both xHCI hosts
and the front-port hub enumerated. It still describes the controllers
as plain "snps,dwc3" with two iommus, which the generic dwc3 binding
rejects. Before it can merge, the nodes need to move to the Apple dwc3
binding, or the binding needs an M6 USB 2 host variant.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
The T8152 (M6) USB-C controllers are Apple DWC3 DRD controllers like
those on earlier SoCs, each with its own ATC PHY. There is no T8152 USB
power-domain, ATC PHY or Type-C support yet. Instead, the bootloader can
hand a controller over already running: powered, with the USB2 side of
its ATC PHY set up for host mode.

Add a standalone "apple,t8152-dwc3" compatible for such a controller,
following the T8132 exception already in this binding. It is described
by its DWC3 core region, as a host, so dr_mode = "host" is required. The
PHY reset and power domain, and on a Type-C port the USB role switch,
exist on T8152 but are left to the bootloader, so they are optional
there. Every other compatible still requires reg-names, resets,
usb-role-switch and two reg entries.

There is no apple,t8103-dwc3 fallback: the T8152 layout of the Apple
region is not established, and without its ATC PHY the controller cannot
switch roles, so the Apple dwc3 glue must not bind it. When T8152 ATC
PHY and Type-C support lands, full Type-C operation can key on resets
and usb-role-switch being present, so these minimal descriptions stay
valid and the dr_mode rule can be relaxed.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
On T8152 (M6) the Apple dwc3 glue cannot drive the controller yet: it
needs the ATC PHY as reset provider and a Type-C role switch, and T8152
has no driver for either. The bootloader powers the controller, sets up
the USB2 side of its ATC PHY for host mode and selects the host role
before the kernel starts, which leaves only the DWC3 core to the kernel.

Match "apple,t8152-dwc3" in the dwc3 core driver. dwc3_probe() uses no
match data, so the controller probes exactly as a "snps,dwc3" node does,
and dr_mode, maximum-speed and the quirks are read from the node as
before. dwc3-apple does not match this compatible, so only the core
binds it.

This entry is to move to dwc3-apple once that driver supports the T8152
ATC PHY and Type-C role switch, so that the two never match the same
compatible.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
The back-left (usb-drd1) and front (usb-drd2) USB 2 host nodes are
"snps,dwc3" with two iommus, one per DART instance. The generic dwc3
binding allows a single iommu, so dtbs_check rejects both nodes.

Use the T8152 Apple dwc3 compatible instead. It allows both DART
instances and documents the bootloader handover these nodes rely on.
Nothing else changes: the nodes keep their core region, interrupt,
DARTs, host mode, speed limit and SUSPHY quirks, and the same dwc3 core
driver binds them.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
@Acelogic Acelogic changed the title J873g: bring back the USB 2 hosts (follow-up to #1197) J873g: USB 2 hosts as T8152 DWC3 (follow-up to #1197) Nov 8, 2026
@Acelogic
Acelogic marked this pull request as ready for review November 8, 2026 09:12
@Acelogic
Acelogic merged commit 2991c10 into aurora-wip Nov 8, 2026
2 checks passed
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