Repository navigation
arm64: dts: apple: t6030: PCIe tunnels on the second and third USB4 router - #3640
RyanTheTide wants to merge 2 commits into
Conversation
…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>
There was a problem hiding this comment.
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.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Re REVIEW6 HOLD at
No code change. Item 1 (owner row) remains. |
There was a problem hiding this comment.
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
DjDeveloperr
left a comment
There was a problem hiding this comment.
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:
- A merge-up. The branch conflicts with main.
- pr-text. The body needs the template headings (What / Tested / Risk / Not yet).
- 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.
Signed-off-by: DjDeveloperr <hey@djdev.me>
|
Merged main into the branch as |
DjDeveloperr
left a comment
There was a problem hiding this comment.
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.
|
The
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, 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. |
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-check0 new,apple-sibling-drift0 new. Only the two T6030 DTBs differ, and each now has 3 tunnels and 3apple,pcie-tunnellinks. After the 12-02 merge of main, a localcpp+dtcof 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 1of 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.dtbandt6030-j516s.dtb):t6030-usb4.dtsi:usb4-pcie-tunnel-1/2with DART, PCIe-C controller and root port, plusapple,pcie-tunnelonusb4_1_acio/usb4_2_acio. Values come from the J514s/J516s 27.2 ADT (work/adt-collectionrenders27.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-vector-offsetis redacted. Each tunnel uses the 32-vector slice thatpcie-apple.c's T6030 table already expects for its ECAM (bases 0x20/0x40/0x60, AIC 1342 + base) withapple,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.pciec1_dart/pciec2_dartint6030-misc-interfaces.dtsimove into their tunnels, and the disabledapciec1/2_piodmaengines point at the new labels.usb4-1-pcie/usb4-2-pcie, so aura fills the controllers' rc/fabric/debug tunables, as it does throughusb4_0_pcie(kboot.cdt_set_pcie_tunables, which falls back to the hyphen form).Relation to other PRs: #3553 (T603x peripherals) moves
apciec0_piodmainto tunnel 0. The two don't overlap textually. After both land,apciec1/2_piodmacan 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.