Repository navigation
J873g: USB4 on the rear USB-C ports through tipd and atc.c (T8152 routers, PCIe-C, M6 Mac mini) - #2178
Conversation
b8297ab to
b43bc99
Compare
b43bc99 to
adcda13
Compare
c4bf8ff to
9a3c8b7
Compare
|
Rebased onto the refreshed #2176 (6b1ffb1, on integration/aurora 0abc2f3). It is now 9a3c8b7 (was adcda13); the old branch no longer merged.
Testing on 0abc2f3:
|
|
Thanks for the USB4 bring-up; working on all three ports with hotplug is great. In this tree we select behaviour by a hardware description, not by the machine or SoC it was tried on. A few new lines do the opposite:
We are happy to help review a reworked version. |
9a3c8b7 to
756f397
Compare
756f397 to
d134970
Compare
|
Thanks. Two of the three points are done, and the stack is rebased onto the current #2176, #2139 and #2142 (head
Checks on this head:
This head has not run on the J873g yet. The routers now depend on the mailbox interrupts firing in that order, which the M6 run will confirm. One owner of the PD controllers. I agree, and the tree already has the owner:
The port monitor and |
d134970 to
11efada
Compare
11efada to
ffa5579
Compare
|
Two changes since my last comment. The head is now
The stack is rebased onto the current #2176 and #2139 (with #1797's USB DART comment underneath). The tipd/ATC convergence for the port monitor follows. |
ffa5579 to
d4e28e5
Compare
|
@DjDeveloperr thanks. The head is 2. No tables in history. The table removal is folded into the commits that added the tables, and the separate removal commit is gone.
3. Older aura: the ATC PHYs no longer fail their probe. This is in #1799's "phy: apple: atc: add T8152 for a fixed-USB3 port".
J873g rows on this exact head, with the M6's default command line:
4.
1. The stack is unchanged: it waits for #1743, #2486, #1799 and #2142. Assisted-by: LLM (Claude:Opus 5.5) |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: HOLD at 1b969ed3f444
Blockers:
- §4 PR body attribution (
PR body): Delete the trailing attribution line at the bottom of the PR description (also flagged bypr-text). All 31 commits themselves are clean (human author/committer and humanSigned-off-by:only). - Unmerged multi-PR stack, merge commit &
aura#498dependency (50d8d75faa47..3287c55d219c, mergedafefeb2ba1e): Still bundles 31 commits across four open PRs (#1743draft,#2486draft,#1799open, 2 commits from#2142open) plus mid-branch merge commitdafefeb2ba1e, and requiresaurora-silicon/aura#498(open) for J873g tunables/DROMs. Land the prerequisite PRs andaura#498first, then rebase#2178linearly ontomainwith only its own commits. - §5 PR body template & remaining hardware rows (
PR body): Add the requiredTested:(Macs at head SHA + result) andRisk:(one-way/two-way door + affected Macs) lines to the PR body, and post the remaining exact-head J873g USB4 NVMe PCIe-tunnel (replug, flip, checksums) and DP/USB4 switch rows plus a non-T8152 (M1–M5) USB4 regression row covering the sharedatc.c,apple-dart.c,pcie-apple.c, andthunderbolt/apple.cchanges once rebased.
Checked:
- Verified both code/history blockers from
da3173dfb4c9are resolved: all 31 commits and the full 38-file diff carry zero in-tree Apple ADT tunable tables or literal DROM blobs, anddrivers/phy/apple/atc.c(optional_tunables+atcphy_configure()gate +atcphy_test_t8152_no_tunablesindrivers/phy/apple/atc-test.c) now degrades safely to USB2-only without probe deferral on olderaura. - Checked §1–§6 across commits, full diff, PR title/body, live 12/12 CI checks,
aurora-silicon/aura#498,#1743,#2486,#1799,#2142, and the1b969ed3f444J873g dual-bootloader hardware rows.
Evidence
- Head & CI:
1b969ed3f4446d2762f8e7ebae7b63948c3088f8(OPEN,MERGEABLE,BLOCKED); all 12/12 checks green (dt-checks,host-tests,kunitx3,source,rust-build,DWC3/ATCx3,pr-text,pr-readiness).pr-textemitted warnings for the missingTested:/Risk:lines and the trailing attribution line in the PR body. - Resolved — §4 Clean-room in history: Scanned all 31 commits and the final diff. Tunable removal is folded into
cc129b6f0f7c,c61cdee06824, ande251b2ceb140, and the example tunable lines are removed fromDocumentation/devicetree/bindings/phy/apple,atcphy.yaml(b620188b20ae,8148fc35b924). Only[00]DROM placeholders and bootloader aliases (atcphy{0..3},usb4-{0,1,3}-*) remain. - Resolved — §1 Older-
aurafallback (drivers/phy/apple/atc.c:4473-4475,7007-7009,8714,drivers/phy/apple/atc-test.c:1557-1576):atcphy_hw_t8152sets.optional_tunables = true, countsapple,tunable-common-atowardss_missingonATCPHY_GENERATION_T8152, and refuses non-OFF/USB2 modes with-EOPNOTSUPPbefore touching registers. Confirmed on J873g at1b969ed3f444with enrolledaura(1.0.0b14-gd7f5a487): 4/4 PHYs bind in USB2-only mode, front USB2 hub/keyboard and 3/3tipdports + HDMI work, 0/3 routers bind (-EINVAL), 0 deferred devices, 0 failed units, 0 DART faults. (Non-blocking nit: checking!atcphy->ss_tunablesat the top ofatcphy_cio_start()indrivers/phy/apple/atc.c:5617beforeatcphy_cio_pds_on()would avoid power-cycling the four domains and loggingCIO mode failed: -95on an older bootloader.) - Dependencies:
aurora-silicon/aura#498(46c6d9b47308, OPEN),aurora-silicon/linux#1743(3aa7b99a6fe4, OPEN draft),#2486(f9ad98d1d5d6, OPEN draft),#1799(cc820203214e, OPEN),#2142(a42e7dccf46c, OPEN). - §6 Naming: Clean across all commits, PR title/body, and diff.
|
@DjDeveloperr J873g USB4 storage and DisplayPort/USB4 switch row on the exact head Setup
Counts on the row boot: 0 failed units, 0 AVC denials (SELinux disabled), 0 DART faults, no deferred devices. Compared with integration/aurora Still owed: the M1-M5 regression row for the shared Assisted-by: LLM (Claude:Opus 5.5) |
main now carries aurora-silicon#1799 (06bbe5b, f349ba7, cc82020), whose patches this branch already has as b620188, 2273dcf and cc129b6 (same patch-ids). The seven files where this branch edits aurora-silicon#1799's lines afterwards are merged against cc129b6 (the old base plus aurora-silicon#1799; the integration merge below it touches none of them): six keep this branch's version, since aurora-silicon#1799 is main's only change to them, and drivers/phy/apple/atc.c also takes aurora-silicon#2868's two changes (a CIO link survives the USB host stopping on every generation, T8152 included; a drive-only DP request succeeds on PHYs without drive control). The SPMI conflict is resolved in the aurora-silicon#2486 merge. Signed-off-by: Thomas Glanzmann <[email protected]>
With an older loader a T8152 PHY has no SuperSpeed tunables and atcphy_configure() refuses every mode but OFF and USB2. A USB4 request from the Type-C mux still powered the four CIO domains up first, then failed in atcphy_configure() with "CIO mode failed: -95" and powered them down again. Refuse it before the power-up, with a message that says why the port stays USB2. The no-tunables KUnit case now also starts CIO and checks that it is refused and nothing is powered. Signed-off-by: Thomas Glanzmann <[email protected]>
main now carries aurora-silicon#2142 (52ae21a..a42e7dc), whose first two commits this branch already had as 2695b85 and 3287c55 (same patch-ids). The four files where this branch edits those lines afterwards are merged against 595384b plus those two commits: the PCIe and USB4 router bindings keep this branch's version, since the two commits are main's only change to them; drivers/pci/controller/pcie-apple.c also takes aurora-silicon#2142's later changes. drivers/thunderbolt/apple.c conflicted only where both sides add router flags and hardware tables: it keeps both, the T8152 table and main's T8142 comment. aurora-silicon#2142's router AP firmware tuning requirement also covers the T8152 routers, whose nodes name the router-ap-fw window; aura#498 fills that tuning on all three J873g routers. Signed-off-by: Thomas Glanzmann <[email protected]>
|
@DjDeveloperr status of your review at
At Still owed at this head: the J873g row (USB4 NVMe replug, flip and DP↔USB4 switch, with aura#498) and the J813 USB4 no-regression row for the shared drivers. |
Merge aurora/main (c6d73b1) to pick up aurora-silicon#1798, aurora-silicon#2309, aurora-silicon#2691 and aurora-silicon#3089. Conflict in arch/arm64/boot/dts/apple/t8152-j873g.dts: keep both the t8152-j873-thermal.dtsi include from aurora-silicon#1798 and t8152-j873-usb4.dtsi. Signed-off-by: Thomas Glanzmann <[email protected]>
Merge aurora/main (8a1af39) after aurora-silicon#2486 landed so the branch has a single merge base with main and only its own commits remain in the diff. No conflicts. Signed-off-by: Thomas Glanzmann <[email protected]>
|
@DjDeveloperr hardware rows at the exact head 1. J873g (M6 Mac mini, T8152) — USB4 storage + DP alt-mode port swap
J873g sequence and counts
2. J813 (M5 MacBook Air, T8142) — rear USB4 no-regression row
J813 sequence and counts
|
What: USB4 on the M6 Mac mini's (J873g) three rear USB-C ports through tipd and the ATC PHY driver: T8152 routers, NHIs, PCIe-C, the cold Gen3 DARTs, CIO reset and the device tree. All tunables and router DROMs come from the bootloader (aurora-silicon/aura#498). All prior stack PRs (#1743, #1799, #2142, #2486) are in
main.Tested: J873g M6 Mac mini and J813 M5 MacBook Air at
77a5537c135a(issuecomment-7143713877): on J873g with aura#498, USB4 NVMe (20.0 Gb/s x2, sum2fde66fde2fbe490, 3.3 GB/s) across boot, unplug/replug, flipped 180° replug, and port swap with a USB-C monitor (back-left ↔ back-right, each switching between DP 2560x1440 and USB4, HDMI staying up, front USB3 hub10000M), 0 failed units, 0 DART faults, 0 USB4/tipd/ATC/drm errors; on J813 with aura#498, rear USB4 NVMe (20.0 Gb/s x2, sum2fde66fde2fbe490, 3.0–3.3 GB/s) across boot andsn201202x 1-0asoftware replug, 0 failed units, 0 DART faults, 0 new kernel errors. Older-aura fail-closed check (USB4 refused cleanly, USB2 keeps working) at1b969ed3f444(issuecomment-7133214355).Risk: one-way door (new DT bindings) · J873g (T8152); shared
atc.c,apple-dart.c,pcie-apple.candthunderbolt/apple.cchanges also reach other USB4 Macs (no-regression checked on J813 T8142).Not yet: nothing
Details
Merge of main (11-24).
77a5537c135amergesaurora/main(8a1af390c45d, including#1798,#2309,#2486,#2691,#3089). Because#1743,#1799,#2142and#2486are all inmain, only this PR's own 23 files remain in the diff. Earlier merges:c73f0911ac29: mergedc6d73b1550a9(#1798thermal include conflict int8152-j873g.dtsresolved by keeping botht8152-j873-thermal.dtsiandt8152-j873-usb4.dtsi;#3089fixesm3_recovery.rshost-tests).91a6d0697530: merged#2142(router AP firmware tuning also covers T8152; aura#498 fills all three) on top ofc64dfbc988e6(phy: apple: atc: refuse T8152 USB4 before powering up without tunables).55d7bb2581fb: merged#1799and#2868(a USB host stop no longer takes a T8152 USB4 link down; the Type-C mux does, at disconnect).USB4 on the three rear USB-C ports of the M6 Mac mini (J873g, T8152), through the Type-C stack.
tipdowns the PD controllers,atc.cruns the ports' ATC PHYs in CIO mode, and the routers start from the Type-C state, as on the J813 (#2142). There is no private port monitor any more.Needs aurora-silicon/aura#498 (merged). The J873g's USB4 and ATC PHY tunables and the routers' DROMs are not in the device tree: the bootloader copies them from the Mac's own ADT, as on the J813 (#2142 with aura#302/#435). With an older loader nothing is filled, and the drivers refuse the ports instead of running them untuned.
Key pieces
"apple,t8152-cio-mailbox", "apple,t8152-smc-mailbox", with the two interrupts of its ADTacio-cpuNnode.thunderbolt/appleT8152 support. The CIO power domains go through pmdomain: apple: T8152 PSD services as power domains #2459 and return to cold when unused.phy: apple: atc: run the T8152 Type-C ports in CIO mode:apple,fixed-usb3is a CIO-only Type-C port (power/reset block at 0x60000, sync reset at 0x60030, crossbar at 0x4c).phy_power_on/phy_power_off; both sides arbitrate on idle state until DP moves intoatc.c.thunderbolt: apple: stop the T8152 routers before a reboot: stops any running router before PCIe and DART shut down.atc0/1/3), connector graph links (port@1PHY mux/switch,port@4router), router subtrees with bootloader tunable aliases and[00]DROM placeholders, and ACIO DART power domains.apple-t8152-port.cand its config entry are removed.Evidence
77a5537c135a(issuecomment-7143713877):7.3.0-aurora-j873-m2178+, aura1.0.0b15-g46c6d9b4(aura#498), M6 committed bootargs. Boot (enclosure back-left, USB-C monitor back-right), unplug/replug back-left, flipped 180° replug back-left, and port swap (enclosure → back-right411ac0000.acio/0004:03:00.0, USB-C monitor → back-leftDP-32560x1440): every step20.0 Gb/s x2, sum2fde66fde2fbe490, 4 GiB at 3.3 GB/s, HDMI (DP-1, 1920x1200) throughout, front USB3 hub10000M. 0 failed units, 0 AVC (SELinux disabled), 0 DART faults, 0 USB4/PCIe/tipd/ATC/drm errors.77a5537c135a(issuecomment-7143713877):7.3.0-aurora-j813-m2178+, aura1.0.0b15-g46c6d9b4, J813 default bootargs. Rear USB4 NVMe (409ac0000.acio/0002:03:00.0): boot20.0 Gb/s x2, sum2fde66fde2fbe490, 4 GiB at 3.0 GB/s; software replug (sn201202x 1-0aunbind/bind) detached and recovered cleanly (20.0 Gb/s x2, sum2fde66fde2fbe490, 4 GiB at 3.3 GB/s, 11 queues). 0 failed units, 0 AVC (SELinux disabled), 0 DART faults, 0 new kernel error lines vs default.1b969ed3f444(issuecomment-7133214355): enrolled aura without#498: 4 PHYs USB2-only, routers refuse with missing RC tuning, HDMI + keyboard + tipd stay up, nothing deferred.spmi-apple-controller.o,atc.o,pcie-apple.o,thunderbolt/apple.o;tools/asahi/run-host-tests.py532/532;scripts/dtc/apple-dt-check.shagainstaurora/main: 0 new warnings, all 9 changed bindings pass; KUnitphy-apple-atc*47/47.cc @Acelogic @RyanTheTide @DjDeveloperr @LiamRay10