Skip to content

j416s: USB4 hub USB (CD321x USB4-before-DP + m1n1 1.6.1 aliases) - #6

Merged
DjDeveloperr merged 2 commits into
aurora-silicon:aurora-wipfrom
oliverlukschander:j416s-usb4-hub
Sep 27, 2026
Merged

DjDeveloperr merged 2 commits into
aurora-silicon:aurora-wipfrom
oliverlukschander:j416s-usb4-hub

Conversation

@oliverlukschander

Copy link
Copy Markdown
Contributor

Summary

USB4 docks that also advertise DP Alt Mode (OWC Thunderbolt 5 Hub) never started ACIO on apple,j416s: tunneled USB 3.x did not appear.

Two independent fixes, tested together on a 16-inch M2 Pro (apple,j416s) with that hub. A Keychron Q4 on the hub USB-A port enumerates and types.

DisplayPort and PCIe tunnels are not in this series (still missing in the Apple USB4 stack).

Commits

  1. usb: typec: tipd: prefer USB4/Thunderbolt over DP on CD321x
    cd321x_typec_update_mode() handled DP_CONNECTION first and forced the thunderbolt switch OFF even when USB4_CONNECTION was set. USB4, then TBT, then native DP.

  2. arm64: dts: apple: t600x: add m1n1 v1.6.1 USB4 aliases
    m1n1 v1.6.1 copies ACIO tunables via usb4_%d_rc / usb4_%d_nhi. The DT only had usb4-%d-acio. Without the underscore names, thunderbolt-apple-acio fails with Unable to load rc tunable. Newer m1n1 already falls back to hyphen names; both can coexist. t602x J414/J416 include this dtsi.

Test

  • Host: MacBook Pro 16-inch M2 Pro 2023, Mac14,10 / apple,j416s
  • Kernel: linux-aurora 7.1.12 (2439016d) + these two changes
  • m1n1: 1.6.1-1
  • Hub: OWC Thunderbolt 5 Hub
  • USB-A: Keychron Q4

Notes: https://github.com/oliverlukschander/asahi-j416s-usb4

Apple CD321x reports DP_CONNECTION together with USB4_CONNECTION on
USB4 docks that also advertise DP Alt Mode (OWC Thunderbolt 5 Hub is
one). cd321x_typec_update_mode() handled DP first and forced the
thunderbolt switch OFF, so the Apple ACIO block never started and
tunneled USB 3.x never appeared.

Check USB4, then Thunderbolt, then native DP.

Tested on MacBook Pro 16-inch M2 Pro (apple,j416s) with an OWC
Thunderbolt 5 Hub; a Keychron Q4 on the hub USB-A port enumerates.

Signed-off-by: Oliver Lukschander <[email protected]>
m1n1 v1.6.1 copies ACIO tunables and the USB4 DROM using aliases named
usb4_%d_rc and usb4_%d_nhi (underscores). The DT only provided
usb4-%d-acio (hyphens). On that m1n1 the tunable copy is skipped, so
thunderbolt-apple-acio fails with "Unable to load rc tunable" and the
Type-C ports that wait on ACIO never come up.

Newer m1n1 falls back to the hyphen names. Ship both so v1.6.1 and
current m1n1 work. t602x J414/J416 include this file.

Tested on MacBook Pro 16-inch M2 Pro (apple,j416s).

Signed-off-by: Oliver Lukschander <[email protected]>
oliverlukschander pushed a commit to oliverlukschander/asahi-j416s-usb4 that referenced this pull request Sep 20, 2026
@JJRPF

JJRPF commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Note

Testing Environment: tb branch (7.1.12-aurora-tb+) with stock m1n1 1.6.1-1 (PR #6 not yet merged).
Tester: Justin Pfister ([email protected])

Independent Confirmation on 14" M2 Pro (apple,j414s / Mac14,9)

Confirming this exact failure and the necessity of this fix on a 14-inch MacBook Pro M2 Pro (apple,j414s / Mac14,9):

Because t600x-die0.dtsi only defines hyphenated aliases (usb4-%d-acio), thunderbolt-apple-acio fails probe on boot:

thunderbolt-apple-acio 701ac0000.cio: PCIe-C tunnel disabled: m1n1 handoff is not initialized
thunderbolt-apple-acio 701ac0000.cio: error -ENOENT: Unable to load rc tunable
thunderbolt-apple-acio 701ac0000.cio: probe with driver thunderbolt-apple-acio failed with error -2

Because the CD321x controllers (0-0038, 0-003b, 0-003f) declare device links to the ACIO router, the failed probe leaves their devlink state permanently dormant:

$ cat /sys/devices/virtual/devlink/platform:701ac0000.cio--i2c:0-0038/status
dormant

This completely deadlocks Type-C port bringup: /sys/class/typec/ only registers port0 (MagSafe), VBUS is never powered, and lsusb shows 0 root hubs.

The alias additions in commit 2 of this PR (arm64: dts: apple: t600x: add m1n1 v1.6.1 USB4 aliases) are essential for all T602X machines running released m1n1 1.6.1.

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

LGTM!

@DjDeveloperr
DjDeveloperr merged commit 9220af9 into aurora-silicon:aurora-wip Sep 27, 2026
cb2206 pushed a commit to cb2206/linux that referenced this pull request Oct 5, 2026
…pple-probe-devres

usb: dwc3: apple: release the devres of a failed core probe
RyanTheTide added a commit that referenced this pull request Oct 17, 2026
Bring the 7.2.10 assembly to the tree of the canonical top-up #6
assembly, stacked on top-up #5 f34b5ae so that it is a
fast-forward of the published branch. The second parent is that
canonical assembly; the tree is identical to it.

Ported from aurora-wip, each with cherry-pick -x and its original
author:
- #347 KUNIT_ALL_TESTS=m modpost (3): the xHCI platform tests call the
  interrupt handler through the HC driver (170-usb), and module
  descriptions for the CD321x PM tests (170-usb) and the drm/apple
  KUnit test modules (200-dcp).
- #349 the CD321x IRQ test waits for the resume read before checking
  its retry (170-usb).
- #350 trusted keys keep a source that registers before
  init_trusted() (100-sep). Its test commit is already carried as
  76d70cc and is not duplicated.
- #351 SEP hwrng: recover the entropy exchange after a request times
  out, and hold entropy requests while the system sleeps (100-sep).
- #352 SEP SBIO: take a reply header only once it has landed, and
  poison it again once read and before each host send (100-sep).

Adaptations, each with a [ryan: ...] note in its commit:
- trusted-type.h: context only, the declaration goes above the
  7.2.10 CONFIG_TRUSTED_KEYS_DEBUG block;
- the CD321x IRQ test takes its data from tipd_hw_variants[], and its
  retry loop replaces the 7.2.10-only fix of the same race in
  11e0ce6.

The Co-Authored-By lines of the three #347 commits are dropped.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
RyanTheTide added a commit that referenced this pull request Oct 17, 2026
Bring the 7.2.10 assembly to the tree of the canonical top-up #6a
assembly, stacked on top-up #6 a8d71c8 so that it is a
fast-forward of that publish head. The second parent is that canonical
assembly; the tree is identical to it.

Ported from aurora-wip #353 (j700/atc-pipe-park-v3), 13 commits, each
with cherry-pick -x and its original author:
- the USB3 SuperSpeed handover v3 (9): hub port power helpers and
  their KUnit tests, the ATC fixed-hub PIPE move with the SuperSpeed
  port off and the park of a stopped controller, a fixed-hub host that
  USB3 PHY trouble does not stop, the retried SuperSpeed port power-on,
  the dwc3-apple handover comment, and the administrative-disable
  holds of the USB core (170-usb);
- the apple-dcp selftests that follow the handover (200-dcp);
- Type-C mux providers can declare their timeouts transient, the ATC
  PHY declares the J700 fixed-hub ones, and tipd keeps applying a
  Type-C state that a busy mux holds up (170-usb; their apple-dcp
  selftest parts in 200-dcp).

Adaptations, each with a [ryan: ...] note in its commit:
- atc.c: context only, atcphy_mux_switch() asserts the lock without
  the mux debug message 7.2.10 already removed;
- the apple-dcp selftests keep ATC_POST_TUNABLE, the 7.2.10 per-SoC
  post-tunable callbacks, next to the new ATC_SPLIT helpers;
- the mux and tipd commits are split between 170-usb and 200-dcp.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants