Skip to content

arm: apple: leave the USB-C ports to the OS on machines with a keyboard - #22

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
fix/t6000-no-auto-usb-start-on-typec
Oct 30, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
fix/t6000-no-auto-usb-start-on-typec

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

On a T6000 MacBook Pro (J316s) with a Plugable UD-ULTC4K dock attached across a reboot, Linux finds only the dock's USB 3 hub. Its USB 2.0 hub, the keyboard and mouse behind it, and the SSD on its first SuperSpeed port never appear. Every boot in the journal with the dock attached shows this. A hot plug while Linux runs works.

What was measured on the M1 Pro (fleet9):

  • With the dock attached, the xHCI USB 2.0 root port stays in RxDetect with no connect. Port power cycle, xHCI rebind and tipd rebind (Type-C mux safe, ATC PHY USB2 off and on, new host) all leave it there.
  • The CD3217 DATA_STATUS is identical in the bad and good state (USB2 and USB3 connection bits set, host role, DP).
  • A Type-C reconnect from the CD3217 itself (simulated disconnect) brings everything back at once.
  • None of the Linux-side transitions reproduce the bad state from a good one: tipd teardown and re-probe, host stopped for 40 s, a USB2-only session followed by a SuperSpeed restart, the PHY off for 40 s, a reconnect with the host held off, or the CD3217 in S5. A plain Linux reboot does.

So the dock's state is set before Linux. The only pre-Linux code that runs a host session on these ports is U-Boot's default preboot=usb start: on T6000 the Aurora EFI path that clears it (t8140, t8132, t6040) is not taken, so U-Boot runs dwc3 as a USB 2.0-only host with the SuperSpeed lanes on the dummy PIPE while the dock is in DP alternate mode.

This change clears the default preboot on every machine with a built-in keyboard (SPI HID or DockChannel HID), so U-Boot leaves the Type-C ports to the OS. Machines without a built-in keyboard keep usb start, and it still works by hand.

Status: candidate, not yet proven. The A/B that decides it is a boot of this U-Boot on the M1 Pro with the dock attached (bus 1 should hold 0b00:5423 and the SteelSeries devices right after boot). Per the incident rule it must boot on the J616s first; nothing has been installed anywhere.

Build: apple_m1_defconfig with KCFLAGS=-Werror, no warnings. checkpatch flags only the product name Plugable.

🤖 Generated with Claude Code

U-Boot runs a Type-C port as a USB 2.0 host only. The SuperSpeed lanes
stay on the dummy PIPE and the alternate mode the Type-C controller set
up is not followed. On a T6000 MacBook Pro with a Plugable UD-ULTC4K
dock attached across a reboot, Linux then finds only the dock's USB 3
hub. Its USB 2.0 hub, the keyboard and mouse behind it and the device on
its first SuperSpeed port stay absent. No host-side reset in Linux brings
them back; a Type-C reconnect does. A hot plug while Linux runs works.

A machine with a built-in keyboard does not need "usb start" to reach
the boot prompt, so clear the default preboot there, as the Aurora EFI
path already does for the newer SoCs. Machines without a built-in
keyboard keep it, and "usb start" still works by hand.

Assisted-by: LLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Tested on the M1 Pro (T6000) with its dock attached, using U-Boot 2026.07-g368465ece17f (aurora-wip + #23 + this PR) installed through update-m1n1.

  • Before, on 2409ad5: only the dock's USB 3 hubs enumerated (0bda:0423, 0bda:0411). The USB 2.0 hub was missing.
  • After one boot: 0bda:5423 (4-port USB 2.0 hub) and 0bda:5411 are back alongside the USB 3 hubs. NVMe is present, and journalctl -b -k -p 3 is empty.
  • It also booted on the Neo earlier tonight, where it's a no-op.

🤖 Generated with Claude Code

@RyanTheTide
RyanTheTide marked this pull request as ready for review October 30, 2026 13:23
@RyanTheTide
RyanTheTide merged commit f22cbc0 into aurora-wip Oct 30, 2026
2 checks passed
@RyanTheTide
RyanTheTide deleted the fix/t6000-no-auto-usb-start-on-typec branch October 30, 2026 13:23
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.

1 participant