Skip to content

arm64: dts: apple: t6050-j716s: describe the left-back port and the right USB4 router - #3620

Merged
RyanTheTide merged 8 commits into
mainfrom
feat/t6050-j716s-atc0-atc2
Dec 1, 2026
Merged

RyanTheTide merged 8 commits into
mainfrom
feat/t6050-j716s-atc0-atc2

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Tested: no runtime change on any lab Mac (no J716s in our lab): all 11 T6050 DTBs build at 86fb973, only t6050-j716s.dtb changes, CHECK_DTBS output identical to main; needs a J716s owner boot row
Risk: two-way · J716s only (other T6050 DTBs byte-identical)

What: the J716s (16-inch M5 Pro) device tree had no left-back USB-C port at all and no USB4 router on its right port, though its ADT lists both: hpm0, atc-phy0, usb-drd0, acio0, acio-cpu0, dart-acio0, apciec0, dart-apciec0, and acio2, acio-cpu2, dart-acio2, apciec2, dart-apciec2, all at the T6050 addresses and mapped MISSING in adt-coverage/t6050-j716s.txt.

Changes

  • Left-back port (ATC0): enabled from the shared nodes (arm64: dts: apple: t6050-k114-k116: describe the left-back port (ATC0) #3598) with the overlay the K boards use. That overlay is renamed t6050-k114-k116-atc0.dtsi to t6050-atc0-enable.dtsi. The J716s's ATC0 CIO RX_TOP is left unset: its value is not in hand, aura does not export it, and the PHY driver skips an absent CIO80 tunable.
  • Right port router (ATC2): t6050-max-atc2-router.dtsi + t6050-atc2-dp-tunnel.dtsi + the router domains, as in t6050-k114-usb.dtsi. The host DROM is the K114s one: its body (bytes 9..107) matches K114s, K116s, J714s and J716c for acio0 and acio2; no loader replaces it on laptops.
  • AOP GPIO: pins 77 (acio0) and 81 (acio2) exposed.
  • The shared ATC0 connector label typec2 becomes atc0_typec, because the J716s already uses typec2 for its right connector. DTBs carry no labels, so this is DTB-neutral (J714s and K boards byte-identical).

Not in this PR: the left-front router (#3281, rolotrealanis98) and the MagSafe controller (#2397). Whichever lands second here or in #3281 takes the union of the AOP pin ranges (77, 79, 81).

Needs: aurora-silicon/aura#574 for the left-back PHY tables (without it that PHY fails probe cleanly), and a J716s boot row: acio0/acio2/hpm0 bind, no new kernel errors, ideally a Thunderbolt device on the left-back or right port. The values beyond the addresses come from the K114sAP/K116sAP/J714sAP ADTs, which agree on every node involved; I have no full J716s ADT dump, so a J716s owner check matters.

…ight USB4 router

The J716s ADT has the left-back port (hpm0, atc-phy0, usb-drd0, acio0,
acio-cpu0, dart-acio0, apciec0, dart-apciec0) and the right port's
USB4/Thunderbolt router (acio2, acio-cpu2, dart-acio2, apciec2,
dart-apciec2) at the T6050 addresses (adt-coverage/t6050-j716s.txt),
but its device tree described neither: the left-back port was absent and
the right port got USB only.

Enable them as the K boards do. The ATC0 enable overlay is renamed from
t6050-k114-k116-atc0.dtsi to t6050-atc0-enable.dtsi, since it is no
longer K-board only, and gives the J716s the 16-inch RX_TOP value. The
right router takes t6050-max-atc2-router.dtsi, the ATC2 DP tunnel and
the router domains as in t6050-k114-usb.dtsi, with the K114sAP host DROM
(the boot loader replaces it), and the AOP GPIO controller exposes pins
77 and 81.

The shared ATC0 connector label typec2 becomes atc0_typec: the J716s
already calls its right connector typec2. Labels are not in the DTBs,
so only t6050-j716s.dtb changes; every other T6050 DTB is
byte-identical, and CHECK_DTBS reports the same as main.

The left-front router stays with #3281 and the MagSafe controller with
#2397.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide requested review from a team as code owners November 29, 2026 11:39
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

rolotrealanis98, you have the J716s: could you boot this head's t6050-j716s.dtb once? Please check that 2a1ac0000.acio, 381ac0000.acio and the left-back usb-pd@c bind with no new kernel errors. The left-back PHY also needs aurora-silicon/aura#574 in Stage 2. The left-front router stays in your #3281; this test-merges cleanly with #3599, and the AOP pin ranges just need the union with yours (77, 79, 81).

@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: FINISH, then merge at 32a8e382.

Blockers: The J716s DT supplies an ATC2 host DROM and ATC0 RX_TOP values taken from other machines. Verify the J716s values from its own ADT, or use its loader-exported values and demonstrate safe behavior when the export is absent. In particular, show the J716s ATC2 router never consumes the copied DROM on a supported boot path. Add the J716s owner bind and USB4 row with the compatible Aura loader.

Checked: The ATC0 overlay is shared, the connector endpoints are renamed together, and AOP ranges free the two stated GPIOs. The reported 11-DTB build and schema comparison cover DT structure. They do not establish that the fallback hardware values are valid on J716s.

Evidence

The PR describes the DROM as coming from K114s/K116s and says the loader replaces it. The PR also notes that the full J716s ADT is unavailable.

…OM's evidence

The J716s's atc-phy0 CIO RX_TOP value is not in hand (14-inch boards
use 0x200, the 16-inch K116s and J716c 0x0) and no boot loader exports
it, so leave it unset on this board: the PHY driver skips an absent
CIO80 tunable, as #3281 does for its ATC1. The shared overlay keeps 0x0
for the K116 boards only.

The ATC2 host DROM comment claimed the boot loader replaces it; on the
laptops nothing does (no usb4-N-nhi alias). Its evidence is that the
body, everything but the CRC and router UID in bytes 0..8, is the same
on K114s, K116s, J714s and J716c for both acio0 and acio2.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Review addressed in 8e33920bc2d4db:

  • ATC0 RX_TOP: the J716s value isn't in hand, and aura doesn't export RX_TOP (it isn't one of the 14 T6050 PHY tables). It's now left unset on the J716s, and the PHY driver skips an absent CIO80 tunable, as arm64: dts: apple: t6050-j716s: Touch ID, fan control and the left-front USB4 router #3281 does for this board's ATC1. The shared overlay keeps 0x0 for the K116 boards only, where the K116sAP ADT gives it.
  • ATC2 DROM: my 'the boot loader replaces it' was wrong for the laptops. aura only copies DROMs and router tunables for routers that have usb4-N-nhi aliases (J775c has them; no laptop does). Adding the aliases here isn't safe either, because dt_copy_acio_tunables_to() appends to the board's static tunables. Evidence for the static DROM: bytes 9..107 are identical on K114s, K116s, J714s and J716c, for acio0 and acio2. Only bytes 0..8, the CRC and the per-machine router UID, differ: J716c carries a real UID, the others zeros. So the body is common to the T6050 laptops, Pro and Max, 14 and 16 inch. The comment now says that.
  • rolotrealanis98: if you can read /arm-io/acio0 and acio2 thunderbolt-drom and atc-phy0 tunable_LN0_RX_TOP_CIO_DFLT from your J716s ADT, that settles both; the boot row is still the merge gate.

@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 8e33920b pending J716s validation.

Blockers: Confirm the J716s ATC2 DROM against that machine's ADT, or provide a J716s USB4 row showing router bind and real device enumeration with the DT-provided DROM. Also check ATC0 and hpm0 bind with the compatible Aura loader.

Checked: The follow-up deletes both unverified RX_TOP properties and corrects which component supplies the DROM. The cross-model body comparison supports using the shared topology for a trial. The kernel's host DROM read prefers the DT property, so the J716s result still matters for the proposed value. Please also remove the contradictory wording in the PR body that says J716s gets the 16-inch RX_TOP value.

Evidence

Reviewed the two-file follow-up and the DT-first path in drivers/thunderbolt/eeprom.c.

@github-actions github-actions Bot added area:bringup Area from CODEOWNERS (bot) blast:m5 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-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 29, 2026
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Merge readiness at 991af2d9: not ready yet

Check Detail
CI at head running running: dt-checks, host-tests, pr-text / pr-text
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok not needed: no runtime change
Conflicts ok none
PR text ok Risk: two-way · J716s only (other T6050 DTBs byte-identical)

Areas: area:bringup

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

…ight router

dt-checks' ADT coverage step broke on the two PCIe tunnel DARTs, which
moved from the inventory (/soc/iommu@2a4000000, /soc/iommu@384000000)
into their tunnels. Map them there, and map the nodes this series
describes: apciec0/2, acio0/2, dart-acio0/2, acio-cpu0/2, atc-phy0 and
hpm0, as #3281 does for ATC1. J716s MISSING 696 -> 686, broken 0.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

CI at 8e33920b had two failures:

  • dt-checks, ADT coverage step: the manifest still mapped dart-apciec0 and dart-apciec2 to the inventory DARTs, which this PR moves into the PCIe tunnels (2 broken paths). 86fb973e remaps them, plus the nodes this PR describes (apciec0/2, acio0/2, dart-acio0/2, acio-cpu0/2, atc-phy0, hpm0), as arm64: dts: apple: t6050-j716s: Touch ID, fan control and the left-front USB4 router #3281 does for ATC1. Locally: J716s MISSING 696 -> 686, broken 0.
  • host-tests: apple-scaler-recovery-tests fails to compile its harness (struct v4l2_ctrl_handler incomplete, u16 unknown). The same failure is on other unrelated branches today (e.g. feat/sep-attach-endpoints, feat/j873-rear-usb, t6040-sleep), so it isn't caused by this DT-only PR.

@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 86fb973e — the ADT coverage remap in 86fb973e cleanly updates adt-coverage/t6050-j716s.txt for the moved PCIe-tunnel DARTs and newly described ATC0/ATC2 nodes; awaiting queued dt-checks / pr-text completion and a J716s owner boot/DROM verification row.

Blockers:

  1. Wait for queued dt-checks and pr-text at 86fb973e to pass (confirming 0 broken paths in adt-coverage/t6050-j716s.txt).
  2. Post a J716s owner boot row confirming acio0 (2a1ac0000.acio), acio2 (381ac0000.acio), and hpm0 (usb-pd@c) bind cleanly with no new kernel errors (and confirm the ATC2 host DROM against the J716s ADT or real USB4 device enumeration with aurora-silicon/aura#574).

Checked:

  • Audited 86fb973e (+14/-14 in arch/arm64/boot/dts/apple/adt-coverage/t6050-j716s.txt, DCO Signed-off-by: present, MERGEABLE on main): remaps dart-apciec0/dart-apciec2 (+ piodma mappers) from /soc/iommu@... to /pcie-tunnel-{0,2}/iommu@... and maps apciec0/2, acio0/2, dart-acio0/2, acio-cpu0/2, atc-phy0, and hpm0.
  • Verified the full DT diff (32a8e382..86fb973e): typec2 -> atc0_typec label rename is DTB-neutral across all non-J716s boards; t6050-j716s.dts deletes both unverified apple,tunable-lane{0,1}-rx-top-cio properties on &atc0_phy; pinctrl_aop gpio-reserved-ranges = <0 77>, <78 3>, <82 3> cleanly exposes only pins 77 (acio0) and 81 (acio2).
Evidence
  • arch/arm64/boot/dts/apple/adt-coverage/t6050-j716s.txt: 14 entries updated (MISSING 696 -> 686, 0 broken paths reported locally).
  • arch/arm64/boot/dts/apple/t6050-j716s.dts: /delete-property/ apple,tunable-lane0-rx-top-cio and lane1-rx-top-cio immediately follow #include "t6050-atc0-enable.dtsi"; PR body wording updated consistently.

@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 86fb973ea66d

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: - Audited 86fb973e (+14/-14 in arch/arm64/boot/dts/apple/adt-coverage/t6050-j716s.txt, DCO Signed-off-by: present, MERGEABLE on main): remaps dart-apciec0/dart-apciec2 (+ piodma mappers) from /soc/iommu@... to /pcie-tunnel-{0,2}/iommu@... and maps apciec0/2, acio0/2, dart-acio0/2, acio-cpu0/2, atc-phy0, and hpm0.

  • Verified the full DT diff (32a8e382..86fb973e): typec2 -> atc0_typec label rename is DTB-neutral across all non-J716s boards; t6050-j716s.dts deletes both unverified apple,tunable-lane{0,1}-rx-top-cio properties on &atc0_phy; pinctrl_aop gpio-reserved-ranges = <0 77>, <78 3>, <82 3> cleanly exposes only pins 77 (acio0) and 81 (acio2).

Follow-ups (not blocking): queued dt-checks/pr-text; J716s owner boot/DROM row

t6050-j716s.dts: main added the T6050_ATC1_USB4_ROUTER define for the
left-front port's router and this branch adds T6050_ATC0_USB4_ROUTER for
the left-back one at the same place. Both defines are kept, as the K114s,
K114c and K116 boards already do.
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merged main in at c0d1419d9779 (no change to this PR's own code). One conflict in t6050-j716s.dts: main added the ATC1 USB4 router define where this PR adds the ATC0 one; both are kept, as on K114s/K114c/K116. Built t6050-j716s, j714s, k114c/s and k116c/s DTBs locally with the Apple config: no dtc warnings. The earlier row still covers this PR's files.

@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Dec 1, 2026
…e file

This branch renames t6050-k114-k116-atc0.dtsi to t6050-atc0-enable.dtsi;
the J714c and J873s trees that main added since still named the old file,
so their DTBs no longer built after the merge of main. Point them at the
new name. Both DTBs are identical to main's (dtc -s decompile, no diff).
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Follow-up to the merge of main: t6050-j714c.dts and t6050-j873s.dts (added on main by #3635/#3636) still included t6050-k114-k116-atc0.dtsi, which this PR renames to t6050-atc0-enable.dtsi, so both DTBs failed to build in the merge train. Fixed in 647786f: both now include the new name, and both DTBs are identical to main's (decompiled with dtc -s, no diff).

@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: FIX at 647786f

Failure: the merge of main (c0d1419) leaves t6050-j716s.dts with two &pinctrl_aop overrides, and the later one, from this branch, re-reserves the left-front router's LSTX pin that main exposed:

630: &pinctrl_aop {
631: 	gpio-reserved-ranges = <0 79>, <80 5>;      /* main (#3281): exposes 79 */
...
720: /* The LSTX pins of the described routers: 77 (acio0) and 81 (acio2) */
721: &pinctrl_aop {
722: 	gpio-reserved-ranges = <0 77>, <78 3>, <82 3>;  /* wins: 78..80 reserved */

dtc keeps the last value, so the J716s DTB at this head marks AOP pin 79 invalid. acio1 (from t6050-j714s-left-usb4.dtsi, which main now includes for the J716s) has lstx-gpios = <&pinctrl_aop 79 ...>. T6050 has lstx_hold_from_probe, so at probe apple_cio_lstx_hold() drops the pinctrl state and calls devm_gpiod_get(acio->dev, "lstx", ...). For an invalid line gpiod_request_commit() returns -EINVAL (if (!gpiochip_line_is_valid(guard.gc, offset)) { ret = -EINVAL; ...}). The left-front router then logs "failed to take the LSTX pin back: -22" and the AP does not hold LSTX low while that router is off, on probe and on every stop. On main the J716s DTB has 79 valid, so this is a regression in the left-front port that #3281 just added. The PR body itself says whichever of this PR and #3281 lands second takes the union (77, 79, 81).
Fix: one &pinctrl_aop block with gpio-reserved-ranges = <0 77>, <78 1>, <80 1>, <82 3>; (the same as t6050-j714c.dts), and update the comment to name all three routers.

Checked (only the earlier blockers and the diff since my approval at 86fb973):

  • My earlier blockers (copied ATC0 RX_TOP, DROM provenance, J716s row) were already settled at 86fb973: RX_TOP is deleted on &atc0_phy, and the row is for pr-readiness. Nothing new to ask there.
  • 647786f: t6050-j714c.dts and t6050-j873s.dts now include t6050-atc0-enable.dtsi. git grep k114-k116-atc0 at this head finds no stale reference.
  • Merge c0d1419 in t6050-j716s.dts: both T6050_ATC0_USB4_ROUTER and T6050_ATC1_USB4_ROUTER are kept before t6050-peripherals.dtsi, as on the K boards. &atc1_phy and &atc0_phy each drop their own RX_TOP CIO tunables. The typec2 label for the right port and atc0_typec for ATC0 do not collide. The only fault found is the AOP override above.
  • No AI attribution in the commits or body.

Follow-ups:

  • dt-checks is queued at this head. Once it runs, it should confirm the J714c/J873s DTBs build after the rename.

The merge of main kept main's &pinctrl_aop block (#3281: pin 79 valid
for acio1) and this branch's later block (77 and 81), and the later one
won, so AOP pin 79 was reserved again and acio1 could not take its LSTX
pin back (-EINVAL). Keep one gpio-reserved-ranges, after the router
includes, that leaves 77, 79 and 81 valid, as t6050-j714c.dts does.
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Fixed the App's blocker in db85cec: t6050-j716s.dts now has a single gpio-reserved-ranges = <0 77>, <78 1>, <80 1>, <82 3> for &pinctrl_aop, placed after the router includes (t6050-atc0-enable.dtsi and t6050-max-atc2-router.dtsi also override it), so it is the value that ends up in the DTB. Decompiled J716s DTB: AOP gpio-reserved-ranges = <0x00 0x4d 0x4e 0x01 0x50 0x01 0x52 0x03>, so pins 77, 79 and 81 are valid (main had only 79). Same ranges as t6050-j714c.dts.

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

Re-check of my one blocker only.

Checked:

  • db85cec drops main's gpio-reserved-ranges from the first &pinctrl_aop block and keeps one range after the router includes: <0 77>, <78 1>, <80 1>, <82 3>. Reserved = 0-76, 78, 80, 82-84, so 77 (acio0), 79 (acio1) and 81 (acio2) are valid LSTX lines and the top of the reserved range (84) is the same as main. acio1's lstx-gpios = <&pinctrl_aop 79 ...> from t6050-j714s-left-usb4.dtsi no longer hits -EINVAL. Same ranges as t6050-j714c.dts.
  • The first block keeps status = "okay"; nothing else in the diff.

Follow-ups:

  • none new.

Main added the J775d tree (#3637) with the old t6050-k114-k116-atc0.dtsi
name, which this branch renames to t6050-atc0-enable.dtsi. The J775d DTB
is identical to main's (dtc -s decompile, no diff); all Apple DTBs build.
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merged main again and fixed one more stale include in 991af2d: t6050-j775d.dts (added on main by #3637) used the old t6050-k114-k116-atc0.dtsi name. It now includes t6050-atc0-enable.dtsi; the J775d DTB is identical to main's (dtc -s, no diff), and every Apple DTB builds. No other file on main uses the old name.

@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 991af2d

Delta re-check from my approval at db85cec (asked for by the author's reviewer lane). The new diff = a merge of main (99b3269) + 991af2d.

Checked:

  • 991af2d: main's new t6050-j775d.dts (#3637) still included the renamed t6050-k114-k116-atc0.dtsi; it now includes t6050-atc0-enable.dtsi. The tree at this head has no remaining k114-k116-atc0 file or reference.
  • t6050-j716s.dts after the merge still has the single gpio-reserved-ranges = <0 77>, <78 1>, <80 1>, <82 3> after the router includes, so the AOP pin 79 fix from db85cec holds.

Follow-ups:

  • none new.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging at 991af2d983e8 (B2 merge train, 12-01 merge bar). Approval at this head: aurora-silicon-review[bot]. Row: J716s row at 86fb973 (same PR files; later commits only merge main, rename two/three board includes to the new ATC0 file and fix the AOP pin ranges; the affected J714c/J873s/J775d DTBs are identical to main's). CI: linux train L8 = main + #3620: Apple driver compile pass, every Apple DTB builds (W=1); DT-only, no KUnit suite selected. Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit e2635f1 into main Dec 1, 2026
4 of 7 checks passed
@RyanTheTide
RyanTheTide deleted the feat/t6050-j716s-atc0-atc2 branch December 1, 2026 11:45
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) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (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.

1 participant