Skip to content

arm64: dts: apple: t6030: PCIe tunnels on the second and third USB4 router - #3640

Open
RyanTheTide wants to merge 2 commits into
mainfrom
feat/t6030-pcie-tunnels-1-2
Open

RyanTheTide wants to merge 2 commits into
mainfrom
feat/t6030-pcie-tunnels-1-2

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What: PCIe tunnels for USB4 routers 1 and 2 on the M3 Pro laptops (J514s, J516s), so a Thunderbolt PCIe device enumerates on every USB-C port. Only router 0 had a tunnel on main.

Tested: All 141 Apple DTBs built at base and head: CHECK_DTBS warnings identical (the two T6030 lines are the same pre-existing alias-regex warning), apple-dart-pd-check 0 new, apple-sibling-drift 0 new. Only the two T6030 DTBs differ, and each now has 3 tunnels and 3 apple,pcie-tunnel links. After the 12-02 merge of main, a local cpp+dtc of both T6030 DTBs gives the same 14 warnings as main.

Risk: two-way · M3 Pro (T6030: J514s, J516s), DT-only. If a tunnel value were wrong, router 1 or 2 would fail to populate its tunnel (a PCIe probe error), and USB3 and DP tunnelling on those ports would be unaffected. Revert: git revert -m 1 of the merge.

Not yet: a J516s or J514s boot with a Thunderbolt PCIe device enumerating on each of the three ports (routers 0, 1 and 2) and no DART faults.

Details

What changes (only t6030-j514s.dtb and t6030-j516s.dtb):

  • t6030-usb4.dtsi: usb4-pcie-tunnel-1/2 with DART, PCIe-C controller and root port, plus apple,pcie-tunnel on usb4_1_acio/usb4_2_acio. Values come from the J514s/J516s 27.2 ADT (work/adt-collection renders 27.2/t6030-j51{4,6}s.txt): reg windows, IRQs (controller 1134/1192, DART 1135/1193), ranges (0xc/0xe, 0x10/0x12). DART and oe-fabric tunables are apciec0's. They are identical across T8122's tunnels too.
  • MSI: the ADT's msi-vector-offset is redacted. Each tunnel uses the 32-vector slice that pcie-apple.c's T6030 table already expects for its ECAM (bases 0x20/0x40/0x60, AIC 1342 + base) with apple,msi-vector-base. Tunnel 0's move from the legacy whole window to its slice has since landed on main, so the 12-02 merge keeps main's version of that node.
  • The standalone disabled pciec1_dart/pciec2_dart in t6030-misc-interfaces.dtsi move into their tunnels, and the disabled apciec1/2_piodma engines point at the new labels.
  • Board aliases usb4-1-pcie/usb4-2-pcie, so aura fills the controllers' rc/fabric/debug tunables, as it does through usb4_0_pcie (kboot.c dt_set_pcie_tunables, which falls back to the hyphen form).

Relation to other PRs: #3553 (T603x peripherals) moves apciec0_piodma into tunnel 0. The two don't overlap textually. After both land, apciec1/2_piodma can move into tunnels 1/2 the same way. T6031/T6034/T6032 (M3 Max/Ultra) tunnels are not in this PR: their routers exist, but the driver has no MSI table for those SoCs, and the ADT renders redact the MSI offset.

…outer

The M3 Pro laptops (J514s, J516s) have three USB4 routers, but only
router 0 carried a PCIe tunnel. Ports 1 and 2 could tunnel USB3 and
DisplayPort but not PCIe, so a Thunderbolt PCIe device on those ports
never enumerated.

Describe apciec1 and apciec2 like apciec0. Each tunnel gets its DART,
its PCIe-C controller and its root port, and the router gets the
apple,pcie-tunnel link, so the router populates the tunnel on demand.
Values come from the J514s/J516s 27.2 ADT: reg windows, controller
and DART interrupts (1134/1135, 1192/1193), and the ranges
(0xc/0xe, 0x10/0x12). The DART and oe-fabric tunables match apciec0's,
as they do between T8122's tunnels. The ADT's per-bridge MSI offsets
are redacted, so each tunnel gets the 32-vector slice the driver's
T6030 table assigns to its ECAM (0x20/0x40/0x60 above AIC 1342).
Tunnel 0 moves from the legacy whole window (1342, 512 vectors, which
the driver rewrote at probe) to its own slice, with the same result.

The two DARTs were described as standalone disabled nodes in
t6030-misc-interfaces.dtsi. They move into their tunnels, and the
disabled PIODMA engines point at them. The board aliases gain
usb4-1-pcie and usb4-2-pcie, so the loader fills the controllers' rc,
fabric and debug tunables as it does for usb4_0_pcie.

Only the two T6030 DTBs change. CHECK_DTBS, apple-dart-pd-check and
apple-sibling-drift give no new warnings over all Apple DTBs.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide requested review from a team as code owners November 29, 2026 17:02

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: HOLD at 3cd3ea31 pending hosted DT checks and M3 Pro hardware.

Blockers: Obtain a J514s or J516s owner row with PCIe enumeration on both added tunnels and an existing-port control. Confirm the DART and fabric values against the target ADT or document their provenance and validate them with the owner row.

Checked: The MSI window bases are disjoint, the two DART references follow the relocated nodes, and the new router links have corresponding loader aliases. The author reports no new schema, DART power-domain or sibling-drift warnings.

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Merge readiness at 562a29a8: not ready yet

Check Detail
CI at head no failing: host-tests, pr-text / pr-text
Review no approved by DjDeveloperr, but GitHub does not count it yet (code owner from Core or Omarchy Mac needed, or approval went stale)
Requested changes ok none
Hardware row at head no no line with the head SHA 562a29a8, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · M3 Pro (T6030: J514s, J516s), DT-only. If a tunnel value were wrong, router 1 or 2 would fail to populate its tunnel (a PCIe probe error), and USB3 and DP tunnelling on those ports would be unaffected. Revert: git revert -m 1 of the merge.

Areas: area:platform

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

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Re REVIEW6 HOLD at 3cd3ea31, item 2 (DART and fabric value provenance):

  • Not in the ADT render we can read. The redacted collection we take values from (27.2/t6030-j51{4,6}s.txt) strips every tunable property: dart-apciecN and apciecN keep only reg, interrupts, ranges, compatible and so on. So the target ADT can't confirm these values here.
  • Where they come from. The DART apple,tunable and apple,tunable-oe-fabric lists for tunnels 1 and 2 are byte-identical to tunnel 0's, which is on main (t6030-usb4.dtsi, landed in main's tree with T6050 sleep: two lock checking reports at the first deep sleep #3065's merge 8453c1a). They are also byte-identical to both T8122 tunnels from Satya's 499192f (arm64: dts: apple: t8122: USB4 PCIe-C tunnels on every M3 #3516, rowed on the J615). The ADT gives every T6030 apciec the same compatible (apciec,t8122) and every tunnel DART the same compatible (dart,t8110), so these are three instances of the same blocks. Apple's tables are per block type, not per instance, wherever we have been able to compare them (T8122 tunnel 0 vs 1).
  • How the owner row checks them. A wrong DART tunable shows up as DART faults or translation errors when the tunnel populates. A wrong oe-fabric value shows up as AXI/link errors or a dead link. The owner row asked in the PR body (J514s or J516s: tunnels 1 and 2 enumerate a PCIe device, with a port-0 control) covers both: no new DART or PCIe errors on any of the three ports.

No code change. Item 1 (owner row) remains.

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

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: MERGE at 3cd3ea31c90c

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: The MSI window bases are disjoint, the two DART references follow the relocated nodes, and the new router links have corresponding loader aliases. The author reports no new schema, DART power-domain or sibling-drift warnings.

Follow-ups (not blocking): J514s/J516s owner PCIe row on added tunnels; confirm DART/fabric values vs ADT; hosted DT checks

@github-actions github-actions Bot added the merge-conflict Conflicts with the base branch (bot) label Dec 2, 2026
DjDeveloperr
DjDeveloperr previously approved these changes Dec 2, 2026

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

Correct as far as the DT can be checked here. The registers and IRQs match the 27.2 ADT render, the three MSI slices (1374/1406/1438 with bases 0x20/0x40/0x60) match the T6030 table in pcie-apple.c, and moving tunnel 0 off the legacy whole window gives the same result the driver produced by rewriting it. The DART tunables can't be checked from the redacted ADT. They're byte-identical to tunnel 0 on main and to both T8122 tunnels, so a row settles them.

Left before merge:

  1. A merge-up. The branch conflicts with main.
  2. pr-text. The body needs the template headings (What / Tested / Risk / Not yet).
  3. A J516s row at the merged head: a Thunderbolt PCIe device enumerates on each of the three ports (routers 0, 1 and 2), with no DART faults. I've queued it.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 2, 2026
Signed-off-by: DjDeveloperr <hey@djdev.me>
@github-actions github-actions Bot added needs-review No approving review from Core or Omarchy Mac yet (bot) ci-failing A check failed at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) labels Dec 2, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Merged main into the branch as 562a29a8b29e (merge commit, no rebase). The one conflict was router 0's MSI slice in t6030-usb4.dtsi: main has since landed the same move (1374/32 vectors, base <32>), so the merge keeps main's node. Everything else in the merge's diff against main is this PR's own diff. Local cpp+dtc of J514s and J516s on main and on the merge: both compile, with the same 14 warnings as main. I also moved the body to the What / Tested / Risk / Not yet template for pr-text. Left before merge: hosted dt-checks at this head, and the J516s row (a Thunderbolt PCIe device enumerating on routers 0, 1 and 2, no DART faults).

@github-actions github-actions Bot added blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed needs-template PR body lacks Tested or Risk (bot) labels Dec 2, 2026

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

Approve at 562a29a8b29e.

The main merge differs from a clean git merge-tree of its parents only in t6030-usb4.dtsi. Main had already moved router 0 to its own 32-vector MSI slice (AIC 1374, vector base 32), the same values as this PR's 0x20, so the merge keeps main's router 0 node and adds tunnels 1 and 2. The merge's diff against main is the rest of the PR, unchanged.

Checked on pc: all 141 Apple DTBs at this head against its main parent 87c01c2c901d. Only J514s and J516s change: the two new tunnel containers with their DART and PCIe nodes (the disabled DART placeholders move into them), apple,pcie-tunnel on ACIO 1 and 2, and the two loader aliases. The MSI slices (1374, 1406 and 1438 with bases 0x20, 0x40 and 0x60) don't overlap. The dtc W=1 warnings are the same before and after (36). Hosted dt-checks passed, and it merges cleanly with current main.

Before merge: hosted CI, and the J516s row that is already queued: a Thunderbolt PCIe device enumerates on routers 0, 1 and 2, with no DART faults. The merge was pushed from this account, so it needs another approver or an admin merge.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

The ci-failing label at 562a29a8b29e isn't from this diff:

  • host-tests ran 998 jobs and 996 passed. The two failures are centauri-scan-tests (both modes), a Bluetooth harness that was stale on the main this branch merged (87c01c2c901d). Main fixed it in 0510750fb159. With this head merged into main 49fa570626f5, both modes pass locally. Nothing to change here.
  • pr-text failed on the old body at 20:12:27 and passed 30 seconds later.

Same merge, with #4014 included: it's clean (no shared file, and main hasn't touched these four files since the merge-up). All T603x DTBs build, CHECK_DTBS and dtc W=1 give no new warnings, and the DART power-domain and sibling-drift checks add none. Either PR can go first.

One correction to the MSI note. Apple's public 27.2.1 J516s device tree does list these: window 1342, with bridge bases 128, 160 and 192, and bases 0 and 32 for the internal host's two bridges. The driver's fixed 32/64/96 is our own choice, not Apple's table. It doesn't collide today, because our internal host only uses vectors 0 to 31. The other values (registers, interrupts, ranges, adapter windows) match that tree on all three tunnels.

Still owed: the J516s or J514s row with a Thunderbolt PCIe device on routers 0, 1 and 2.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:platform Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) 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.

2 participants