Repository navigation
J873g: USB 2 hosts as T8152 DWC3 (follow-up to #1197) - #1205
Merged
Merged
Conversation
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
marked this pull request as ready for review
November 8, 2026 09:12
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.
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
arm64: dts: apple: j873: bring back the USB 2 hostsrestores the description J873g: internal SSD, 10GbE, power and audio on aurora-wip #1197 set aside.dt-bindings: usb: apple,dwc3: Add T8152adds a standaloneapple,t8152-dwc3compatible, following the T8132 exception already in this binding.dr_mode = "host"is required.usb: dwc3: core: Bind the Apple T8152 controlleraddsapple,t8152-dwc3toof_dwc3_match.snps,dwc3description: no glue, no match data, and the same probe path.apple,t8103-dwc3fallback, so the Apple dwc3 glue (which needs the ATC PHY and a Type-C role switch) doesn't bind.arm64: dts: apple: j873: Describe the USB 2 hosts as T8152 DWC3switches both nodes fromsnps,dwc3toapple,t8152-dwc3. Nothing else in the nodes changes.snps,dwc3.yaml, which allows oneiommusentry, is no longer selected for these nodes, andapple,dwc3.yamlallows the two DARTs.Validation
scripts/dtc/apple-dt-check.shlogic,aurora-wipvs this head, all 126 Apple DTBs): 0 new warnings, 0 removed. It reports "binding ok" forusb/apple,dwc3.yaml, anddt_binding_checkpasses with both examples.--strict: clean on the three new commits.dwc3.kochanges, gaining theapple,t8152-dwc3alias. Neitherdwc3-apple.konordwc3-generic-plat.komatches the new compatible.main:apple,t8152-dwc3and are bound bydwc3, and all four xHCI buses register.power/control=onavoids it.Note: the DTB needs the
dwc3.kofrom 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.