Skip to content

J873g: USB4 on the rear USB-C ports through tipd and atc.c (T8152 routers, PCIe-C, M6 Mac mini) - #2178

Merged
DjDeveloperr merged 28 commits into
aurora-silicon:mainfrom
sithglan:thomas/j873-usb4
Nov 24, 2026
Merged

DjDeveloperr merged 28 commits into
aurora-silicon:mainfrom
sithglan:thomas/j873-usb4

Conversation

@sithglan

@sithglan sithglan commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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, sum 2fde66fde2fbe490, 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 hub 10000M), 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, sum 2fde66fde2fbe490, 3.0–3.3 GB/s) across boot and sn201202x 1-0a software replug, 0 failed units, 0 DART faults, 0 new kernel errors. Older-aura fail-closed check (USB4 refused cleanly, USB2 keeps working) at 1b969ed3f444 (issuecomment-7133214355).
Risk: one-way door (new DT bindings) · J873g (T8152); shared atc.c, apple-dart.c, pcie-apple.c and thunderbolt/apple.c changes also reach other USB4 Macs (no-regression checked on J813 T8142).
Not yet: nothing

Details

Merge of main (11-24). 77a5537c135a merges aurora/main (8a1af390c45d, including #1798, #2309, #2486, #2691, #3089). Because #1743, #1799, #2142 and #2486 are all in main, only this PR's own 23 files remain in the diff. Earlier merges:

  • c73f0911ac29: merged c6d73b1550a9 (#1798 thermal include conflict in t8152-j873g.dts resolved by keeping both t8152-j873-thermal.dtsi and t8152-j873-usb4.dtsi; #3089 fixes m3_recovery.rs host-tests).
  • 91a6d0697530: merged #2142 (router AP firmware tuning also covers T8152; aura#498 fills all three) on top of c64dfbc988e6 (phy: apple: atc: refuse T8152 USB4 before powering up without tunables).
  • 55d7bb2581fb: merged #1799 and #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. tipd owns the PD controllers, atc.c runs 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

  • Mailbox: each router's mailbox is "apple,t8152-cio-mailbox", "apple,t8152-smc-mailbox", with the two interrupts of its ADT acio-cpuN node.
  • CIO reset: T8152 (request 0x68, acknowledge 0x6c).
  • PCIe-C: T8152, with the MSI slice taken from the DT.
  • Routers: thunderbolt/apple T8152 support. The CIO power domains go through pmdomain: apple: T8152 PSD services as power domains #2459 and return to cold when unused.
  • DART: cold Gen3 init for the ACIO and PCIe-C DARTs, selected by compatible.
  • phy: apple: atc: run the T8152 Type-C ports in CIO mode:
    • A T8152 PHY without apple,fixed-usb3 is a CIO-only Type-C port (power/reset block at 0x60000, sync reset at 0x60030, crossbar at 0x4c).
    • Refuses T8152 USB4 before powering up CIO domains if the bootloader left PHY tunables out (covered by KUnit).
    • Both lanes are powered up; a reversed plug sets the lane-swap bit. Shutdown clamps AUX, drops LFPS receivers, and releases the four power domains.
    • Thunderbolt partners are refused for now (USB4 only).
  • DisplayPort and USB4 on one PHY: drm/apple's interim DP code powers the port's PHY through phy_power_on/phy_power_off; both sides arbitrate on idle state until DP moves into atc.c.
  • thunderbolt: apple: stop the T8152 routers before a reboot: stops any running router before PCIe and DART shut down.
  • DT: rear ATC PHYs (atc0/1/3), connector graph links (port@1 PHY mux/switch, port@4 router), router subtrees with bootloader tunable aliases and [00] DROM placeholders, and ACIO DART power domains. apple-t8152-port.c and its config entry are removed.
Evidence
  • J873g M6 Mac mini at 77a5537c135a (issuecomment-7143713877): 7.3.0-aurora-j873-m2178+, aura 1.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-right 411ac0000.acio / 0004:03:00.0, USB-C monitor → back-left DP-3 2560x1440): every step 20.0 Gb/s x2, sum 2fde66fde2fbe490, 4 GiB at 3.3 GB/s, HDMI (DP-1, 1920x1200) throughout, front USB3 hub 10000M. 0 failed units, 0 AVC (SELinux disabled), 0 DART faults, 0 USB4/PCIe/tipd/ATC/drm errors.
  • J813 M5 MacBook Air at 77a5537c135a (issuecomment-7143713877): 7.3.0-aurora-j813-m2178+, aura 1.0.0b15-g46c6d9b4, J813 default bootargs. Rear USB4 NVMe (409ac0000.acio / 0002:03:00.0): boot 20.0 Gb/s x2, sum 2fde66fde2fbe490, 4 GiB at 3.0 GB/s; software replug (sn201202x 1-0a unbind/bind) detached and recovered cleanly (20.0 Gb/s x2, sum 2fde66fde2fbe490, 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.
  • Older-aura fail-closed check at 1b969ed3f444 (issuecomment-7133214355): enrolled aura without #498: 4 PHYs USB2-only, routers refuse with missing RC tuning, HDMI + keyboard + tipd stay up, nothing deferred.
  • Local checks: J873g + J813 arm64 LLVM 22 builds ok; W=1 clean on spmi-apple-controller.o, atc.o, pcie-apple.o, thunderbolt/apple.o; tools/asahi/run-host-tests.py 532/532; scripts/dtc/apple-dt-check.sh against aurora/main: 0 new warnings, all 9 changed bindings pass; KUnit phy-apple-atc* 47/47.

cc @Acelogic @RyanTheTide @DjDeveloperr @LiamRay10

@sithglan
sithglan force-pushed the thomas/j873-usb4 branch 5 times, most recently from b8297ab to b43bc99 Compare November 18, 2026 11:13
@sithglan

Copy link
Copy Markdown
Contributor Author

Restacked on #2176 (ee608de). This series is unchanged.

@sithglan

Copy link
Copy Markdown
Contributor Author

Restacked on #2176 (e6186db). This series is unchanged.

@sithglan

Copy link
Copy Markdown
Contributor Author

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:

@RyanTheTide

Copy link
Copy Markdown
Contributor

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:

  • drivers/pci/controller/pcie-apple.c:3464-3465: of_machine_is_compatible("apple,t8152") with a hardcoded aic_base = 1879, although the PCIe-C nodes already carry msi-ranges. Deriving the base from msi-ranges (or at least from the T8152 match data) would avoid another SoC branch.
  • drivers/iommu/apple-dart.c:6018 and drivers/soc/apple/mailbox.c:1609: cold Gen3 DART setup and the mailbox windows are admitted only on apple,j873g plus fixed addresses. The apple,t8152-*-dart compatibles and DT resources could select them.
  • drivers/thunderbolt/apple-t8152-port.c:381: a new driver polls the PD controllers that apple_dcpib also drives. One owner of the PD controllers, driven by their interrupt, would avoid two polling paths.

We are happy to help review a reworked version.

@sithglan

Copy link
Copy Markdown
Contributor Author

Restacked on the updated #2176 (6f320f0, two new commits for the apple,dcp-rtkit-running rename). It is now 756f397 (was 9a3c8b7); this series is unchanged (git range-diff). The review points above are still open.

@sithglan

Copy link
Copy Markdown
Contributor Author

Thanks. Two of the three points are done, and the stack is rebased onto the current #2176, #2139 and #2142 (head d134970ff6cf):

  • MSI base: t8152_pciec_hw now carries .msi_aic_base = 1879 and joins the T8132/T8142 branch of the slice check that Enable native rear-port USB4 and PCIe storage on J813 #2142 moved to match data. There's no apple,t8152 machine check any more. The third bridge (CIO3, ECAM 0x1c80000000, slice 0xc0) is accepted only for t8152_pciec_hw (628d76fcd352).
  • DART: the cold Gen3 admission no longer checks apple,j873g or any instance address. apple,t8152-acio-dart and apple,t8152-pciec-dart select the instances, and the remaining checks are on the hardware and DT: version 0x300, stream count, tunables, tunneled and the power domain for PCIe-C, and inactive streams. I also dropped the table that tied each DART address to its TLBI slot. Each DART now uses the slot its tlbi resource names, as the AVD and display DARTs do. I checked whether the slot could be derived from the hardware instead: the TLBI route register doesn't give it (on the running M6, the AVD's DART reads route 0 with its slot at 0x200000300) (1c007d73d332).
  • Mailbox: no driver change any more. The ADT gives each router coprocessor (acio-cpu0/1/3) an interrupt pair: [1660, 1659], [1731, 1730], [1873, 1872]. The SMC's own pair is [760, 759], listed send-empty first. So each mailbox is now "apple,t8152-cio-mailbox", "apple,t8152-smc-mailbox" with those interrupts, and the SMC mailbox's match data serves it, as for the ANS in Merge aurora-wip 210c8f6e into integration/aurora (J873g NVMe, 10GbE, power off, USB2, audio) #1797. The j873_windows profile and the polled-provider code are gone (9f169a9405f2, 24460eb53c66).
  • I also removed a macOS class name from the port monitor's header, the USB4 DT comment and the DT commit message.

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: tipd's SPMI transport (apple,sn201202x) drives the ACE3s on the J813, T6050, T6041 and T8140 machines. It uses their interrupts where the node describes them (T6041, T8140) and polls them otherwise (J813, T6050 today), with the usb-c-connector graph to the DWC3, the ATC PHY and the DCP. On the J873g, apple_dcpib/pd.c and this port monitor both talk to the ACE3s over raw SPMI, and both poll. So the clean shape is to bring the J873g onto that stack:

  1. T8152 in atc.c (your J873g: USB3 on the front ports (T8152 in the ATC PHY driver, M6 Mac mini) #1799 point), including CIO mode.
  2. The J873g ACE3s described as apple,sn201202x with their connector graphs and their interrupts. The ADT gives each hpmN (usbc,sn201202x,spmi) three, e.g. hpm0 [11, 17, 19], so these can be interrupt-driven, not polled.
  3. DP alt mode through the shared path in drm/apple (your J873g: HDMI and USB-C displays in drm/apple (iBoot interface, T8152 Gen3 display DARTs, M6 Mac mini) #1800 point).
  4. USB4 through tipd's Thunderbolt alt-mode handling into the router.

The port monitor and pd.c then go away. These are the #1799, #1800 and #2178 asks together, and each step needs M6 runs, so I'll take them in that order rather than patch the monitor in between. Does that ordering work for you?

@sithglan

Copy link
Copy Markdown
Contributor Author

Two changes since my last comment. The head is now ffa55796045f:

  • MSI slice from the DT only. After DjDeveloperr's review of Enable native rear-port USB4 and PCIe storage on J813 #2142, T8132 and T8142 no longer carry an AIC base in the match data. The slice is checked by its shape from msi-ranges and apple,msi-vector-base. T8152 uses the same branch, so the 1879 I mentioned above is gone too: the J873g's three nodes give 1975 − 96 = 2007 − 128 = 2071 − 192 = 1879.
  • CIO power domains now use the generic apple,t8152-psd provider from pmdomain: apple: T8152 PSD services as power domains #2459. This drops this PR's two commits that extended the AVD PSD variant with CIO services. They behave as before, off while unused, and they probe and read off on the J873g.

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.

@sithglan

sithglan commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr thanks. The head is 1b969ed3f444: points 2 and 3 are done, and 1 and 4 are below.

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".

  • T8152 gets optional_tunables, with common-a counted among the lane tunables. Without the loader's tables the PHY probes and refuses every mode but USB2, before a register is written. So dwc3, tipd and the display path have nothing to wait for.
  • New KUnit case atcphy_test_t8152_no_tunables: USB3, USB3+DP, USB4, TBT and DP are all refused with no register write. A mutant without the gate fails it.
  • The phy-apple-atc* suites pass 47/47 in arm64 QEMU.

J873g rows on this exact head, with the M6's default command line:

aura#498 (1.0.0b15-g46c6d9b4, one-shot trial) enrolled aura (1.0.0b14-gd7f5a487, copies no tables)
ATC PHYs 4/4 bound with the ADT's tables 4/4 bound, each "SuperSpeed tunables missing, USB2 only"
Routers 3/3 bound; USB4 with the mini at 20 Gb/s x2 0/3: "Missing bootloader RC tuning" (-EINVAL), as designed
Front ports hub at 10000M, keyboard keyboard on the USB2 hub, no USB3
tipd / displays 3 ports / HDMI up 3 ports / HDMI up
Deferred devices none none
Live DT against the old in-tree DTB 48/48 properties (45 identical, 3 DROMs UID+CRC8) no tables
Counts 0 failed units, 0 AVC (SELinux disabled), 0 DART faults, no kernel error lines beyond the base 0 failed units, 0 DART faults; new lines are only the refusals (Missing bootloader RC tuning, its probe failure, and "CIO mode failed: -95" when tipd asked for CIO on the tether's port)

4.

  • dt-checks against da3173dfb4c9: 0 new warnings on 138 DTBs, and the bindings pass (CI follows).
  • Still owed: the USB4 NVMe tunnel rows (replug, flip, checksums), the DisplayPort/USB4 switch row, and the M1-M5 regression row. They need the enclosure, a USB-C monitor and the J813 tether moved, and nobody is at the Macs today.

1. The stack is unchanged: it waits for #1743, #2486, #1799 and #2142.

Assisted-by: LLM (Claude:Opus 5.5)

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Merge readiness at 77a5537c: not ready yet

Check Detail
CI at head running running: dt-checks, pr-text / pr-text, kunit, host-tests, kunit
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes no requested by DjDeveloperr
Hardware row at head no no line with the head SHA 77a5537c, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: one-way · (new DT bindings) · J873g (T8152); the shared atc.c, apple-dart.c, pcie-apple.c, thunderbolt/apple.c and SPMI changes also run on other Macs, which were not re-tested here.

Areas: area:bringup, area:display, area:platform, area:usb

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 by pr-text). All 31 commits themselves are clean (human author/committer and human Signed-off-by: only).
  • Unmerged multi-PR stack, merge commit & aura#498 dependency (50d8d75faa47..3287c55d219c, merge dafefeb2ba1e): Still bundles 31 commits across four open PRs (#1743 draft, #2486 draft, #1799 open, 2 commits from #2142 open) plus mid-branch merge commit dafefeb2ba1e, and requires aurora-silicon/aura#498 (open) for J873g tunables/DROMs. Land the prerequisite PRs and aura#498 first, then rebase #2178 linearly onto main with only its own commits.
  • §5 PR body template & remaining hardware rows (PR body): Add the required Tested: (Macs at head SHA + result) and Risk: (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 shared atc.c, apple-dart.c, pcie-apple.c, and thunderbolt/apple.c changes once rebased.

Checked:

  • Verified both code/history blockers from da3173dfb4c9 are resolved: all 31 commits and the full 38-file diff carry zero in-tree Apple ADT tunable tables or literal DROM blobs, and drivers/phy/apple/atc.c (optional_tunables + atcphy_configure() gate + atcphy_test_t8152_no_tunables in drivers/phy/apple/atc-test.c) now degrades safely to USB2-only without probe deferral on older aura.
  • Checked §1–§6 across commits, full diff, PR title/body, live 12/12 CI checks, aurora-silicon/aura#498, #1743, #2486, #1799, #2142, and the 1b969ed3f444 J873g dual-bootloader hardware rows.
Evidence
  • Head & CI: 1b969ed3f4446d2762f8e7ebae7b63948c3088f8 (OPEN, MERGEABLE, BLOCKED); all 12/12 checks green (dt-checks, host-tests, kunit x3, source, rust-build, DWC3/ATC x3, pr-text, pr-readiness). pr-text emitted warnings for the missing Tested:/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, and e251b2ceb140, and the example tunable lines are removed from Documentation/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-aura fallback (drivers/phy/apple/atc.c:4473-4475,7007-7009,8714, drivers/phy/apple/atc-test.c:1557-1576): atcphy_hw_t8152 sets .optional_tunables = true, counts apple,tunable-common-a toward ss_missing on ATCPHY_GENERATION_T8152, and refuses non-OFF/USB2 modes with -EOPNOTSUPP before touching registers. Confirmed on J873g at 1b969ed3f444 with enrolled aura (1.0.0b14-gd7f5a487): 4/4 PHYs bind in USB2-only mode, front USB2 hub/keyboard and 3/3 tipd ports + HDMI work, 0/3 routers bind (-EINVAL), 0 deferred devices, 0 failed units, 0 DART faults. (Non-blocking nit: checking !atcphy->ss_tunables at the top of atcphy_cio_start() in drivers/phy/apple/atc.c:5617 before atcphy_cio_pds_on() would avoid power-cycling the four domains and logging CIO mode failed: -95 on 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.

@sithglan

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr J873g USB4 storage and DisplayPort/USB4 switch row on the exact head 1b969ed3f444, with the owner at the Mac (your point 4, J873g part).

Setup

  • Kernel 7.3.0-aurora-j873-r2178+, built from this head, on the M6's default command line. SELinux is disabled on this install.
  • aura 1.0.0b15-g46c6d9b4 (kboot: T8152: copy the USB-C tunables and router DROMs from the ADT aura#498) as a one-shot Stage 2 trial from the enrolled 1.0.0b14-gd7f5a487. It copies the tunables and DROMs from the ADT.
  • Ugreen USB4 enclosure (Samsung 980 PRO 2 TB) on back-left (router 1, ATC1). EIZO EV2780 (USB-C) on back-right (ATC3). EIZO S2431W on HDMI. The mini's tether stays on back-middle.
step USB4 / NVMe displays
boot enclosure on back-left at 20 Gb/s x2, nvme1n1 with 13 queues; 64 MiB O_DIRECT checksum 2fde66fde2fbe490; 4 GiB direct read at 3.2 GB/s HDMI (main DCP, iBoot lit) 1920x1200 and back-right (DCPEXT0, ATC3) 2560x1440@60, both showing a picture
unplug and replug on back-left gone, back after 15 s on router 1 (PCIe-C repopulated after the tunnel adapter enable); same checksum, 3.2 GB/s unchanged
unplug, plug flipped into back-left back after 16 s; same checksum, 3.1 GB/s unchanged
swap ports: enclosure to back-right, monitor to back-left back-right ATC3 goes from DP to CIO; the enclosure is back on router 3 (411ac0000, PCIe domain 0004) at 20 Gb/s x2; same checksum, 3.1 GB/s DCPEXT0 releases ATC3; back-left ATC1 goes from CIO to DP: "USB-C display on ATC1 now", from cold, 2560x1440@60. HDMI kept its picture throughout

Counts on the row boot: 0 failed units, 0 AVC denials (SELinux disabled), 0 DART faults, no deferred devices. Compared with integration/aurora b10280c04c2d booted the same way, there are no new kernel error lines.

Still owed: the M1-M5 regression row for the shared atc.c, apple-dart.c, pcie-apple.c and thunderbolt/apple.c changes (on the J813), and the stack (#1743, #2486, #1799, #2142).

Assisted-by: LLM (Claude:Opus 5.5)

@github-actions github-actions Bot added blast:m5 Macs affected, from Merge risk (bot) door:one-way Revertible or not, from Merge risk (bot) merge-conflict Conflicts with the base branch (bot) and removed needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) ci-failing A check failed at the PR head (bot) labels Nov 24, 2026
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]>
@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) and removed area:gpu Area from CODEOWNERS (bot) merge-conflict Conflicts with the base branch (bot) labels Nov 24, 2026
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]>
@sithglan

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr status of your review at 1b969ed3f444, now at 91a6d0697530:

  1. PR body: no attribution line; it has the Tested/Risk/Not yet header.
  2. Stack and loader: J873g: USB3 on the front ports (T8152 in the ATC PHY driver, M6 Mac mini) #1799, Enable native rear-port USB4 and PCIe storage on J813 #2142 and aura#498 have merged. main is merged in twice (55d7bb2581fb, 91a6d0697530) rather than rebased, because this branch has an open PR and J873g: rear USB-C PD controllers through tipd, DisplayPort alt mode from Type-C (M6 Mac mini) #2486's commits under it, so it isn't force-pushed. J873g: USB3 on the front ports (T8152 in the ATC PHY driver, M6 Mac mini) #1799's and Enable native rear-port USB4 and PCIe storage on J813 #2142's commits drop out of the diff as duplicates: their patches are identical to what merged. The remaining base is J873g: rear USB-C PD controllers through tipd, DisplayPort alt mode from Type-C (M6 Mac mini) #2486, which is on spmi: apple: gen4 interrupts and the gen4 mask bank #1743. The merge commits say how the conflicts were resolved.
  3. Your nit (atcphy_cio_start() cycling the four domains on an older loader) is c64dfbc988e6. It refuses USB4 before the power-up with "USB4 needs the bootloader's PHY tunables; the port stays USB2", and the no-tunables KUnit case checks that nothing was powered.

At 91a6d0697530: the J873g kernel and the J813 DTB build, W=1 is clean on thunderbolt/apple.c, pcie-apple.c and atc.c, KUnit phy-apple-atc* 47/47, run-host-tests.py 532/532, and apple-dt-check.sh against main shows 0 new warnings. CI is running.

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.

@github-actions github-actions Bot removed the needs-hw-row No hardware row at the PR head (bot) label Nov 24, 2026
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]>
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 24, 2026
@sithglan

Copy link
Copy Markdown
Contributor Author

@DjDeveloperr hardware rows at the exact head 77a5537c135a (aurora/main 8a1af390c45d merged in, including #1798, #2309, #2486, #2691, #3089; only this PR's 23 files remain in the diff).

1. J873g (M6 Mac mini, T8152) — USB4 storage + DP alt-mode port swap

  • Build: 7.3.0-aurora-j873-m2178+ (77a5537c135a), one-shot aura Stage 2 trial (1.0.0b15-g46c6d9b4, merged aura#498), M6 committed bootargs.
  • Hardware: Ugreen USB4 NVMe enclosure (Samsung 980 PRO 2 TB) + EIZO EV2780 (USB-C) + EIZO S2431W (HDMI); mini tether on back-middle; front USB3 hub at 10000M.
  • Result: 4 PHYs, 3 routers bound. Every step trained at 20.0 Gb/s x2, matched the 64 MiB O_DIRECT SHA-256 prefix 2fde66fde2fbe490, and read 4 GiB at 3.3 GB/s with HDMI staying up throughout; 0 failed units, 0 AVC (SELinux disabled), 0 DART faults, 0 USB4/PCIe/tipd/ATC/drm errors.
J873g sequence and counts
step USB4 / NVMe displays
boot (enclosure back-left, USB-C monitor back-right) nvme1n1 on 409ac0000.acio (20.0 Gb/s x2), sum 2fde66fde2fbe490, 4 GiB at 3.3 GB/s DP-2 2560x1440, DP-1 (HDMI) 1920x1200
unplug + replug back-left nvme1n1 (0002:03:00.0, 409ac0000.acio, 20.0 Gb/s x2), sum 2fde66fde2fbe490, 4 GiB at 3.3 GB/s both up
unplug + flipped 180° replug back-left nvme1n1 (0002:03:00.0, 409ac0000.acio, 20.0 Gb/s x2), sum 2fde66fde2fbe490, 4 GiB at 3.3 GB/s both up
port swap (enclosure → back-right, USB-C monitor → back-left) nvme1n1 (0004:03:00.0, 411ac0000.acio, 20.0 Gb/s x2), sum 2fde66fde2fbe490, 4 GiB at 3.3 GB/s DP-3 2560x1440 (svid ff01 on port2), DP-1 (HDMI) 1920x1200
  • Front USB3 hub: 10000M + HID keyboard enumerated cleanly.
  • Kernel err..emerg lines: only the 4 pre-existing baseline lines on this install (snd-soc-macaudio speaker gate, Secondary ASoC, btcentauri probe -16 x2).
  • M6 cleaned and restored to default (7.3.0-aurora-j873-avd-usb4-perf+, stage2 1.0.0b14-gd7f5a487, 0 failed units).

2. J813 (M5 MacBook Air, T8142) — rear USB4 no-regression row

  • Build: 7.3.0-aurora-j813-m2178+ (77a5537c135a), chainloaded with aura 1.0.0b15-g46c6d9b4 (aura#498 / #435 router AP fw tuning), J813 default bootargs.
  • Hardware: Ugreen USB4 NVMe enclosure on the rear port (409ac0000.acio / 1c60000000.pcie), mini tether on the front port (0-1).
  • Result: rear tunnel 20.0 Gb/s x2, nvme1n1 sum 2fde66fde2fbe490, 4 GiB at 3.0 GB/s at boot; software replug (sn201202x 1-0a unbind/bind) detached and recovered cleanly at 20.0 Gb/s x2, sum 2fde66fde2fbe490, 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.
J813 sequence and counts
  • boot: 1-1: Ugreen Storage Device rx=20.0 Gb/sx2 tx=20.0 Gb/sx2, nvme1n1 (pci0002:00/0002:03:00.0), sum 2fde66fde2fbe490, 4 GiB at 3.0 GB/s.
  • swreplug (sn201202x 1-0a unbind/bind): detached in 0.2 s, back in 7.7 s, nvme1n1 20.0 Gb/s x2, sum 2fde66fde2fbe490, 4 GiB at 3.3 GB/s, 11 queues, 0 problems.
  • Kernel err..emerg diff vs errors-default.txt: 0 new lines.
  • M5 restored to default (7.3.0-aurora-j813-s2r-usb4+, enrolled aura, 0 failed units).

@DjDeveloperr DjDeveloperr added the hw-row-ok Maintainer checked the row is valid for this head label Nov 24, 2026
@DjDeveloperr
DjDeveloperr merged commit 0852a9d into aurora-silicon:main Nov 24, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:bringup Area from CODEOWNERS (bot) area:display Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) area:usb Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) changes-requested A reviewer requested changes (bot) door:one-way Revertible or not, from Merge risk (bot) hw-row-ok Maintainer checked the row is valid for this head needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants