Skip to content

usb: add M5 native host support and prepare USB4 controllers - #165

Merged
Acelogic merged 3 commits into
aurora-wipfrom
codex/m5-usb4-offline
Oct 3, 2026
Merged

Acelogic merged 3 commits into
aurora-wipfrom
codex/m5-usb4-offline

Conversation

@Acelogic

@Acelogic Acelogic commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Adds native USB host support for the M5 J813 and prepares the M5-specific pieces of the USB4 driver. Targets aurora-wip.

The native USB path adds the two Type-C controllers, SPMI transport, ATC PHY and DWC3 topology. M5's PIPE clock selector uses bits 6:4, so its USB3/USB4 selections differ from earlier chips. The USB3 path was tested on J813 with a Keychron K2 and a Samsung T7 Shield: keyboard input and reconnect, 10 Gbps SSD enumeration in both cable orientations, and read-only raw/exFAT reads.

USB4 is groundwork, not working Thunderbolt support. It adds explicit T8142 Type 7 matches, receive-ring PDF handling without the older separate PDF aperture, the M5 reset request layout, an exact firmware-ready check, and rejection of missing loader tuning or mismatched ACIO/NHI generations. The optional j813-usb4.config fragment enables compilation coverage. ACIO/NHI device-tree nodes are not yet added or enabled by this PR.

Remaining before USB4 enablement: complete and qualify the firmware startup/shared-SRAM contract and controller topology, PCIe-C initialization, and real link/tunnel/hotplug behavior. USB3, PCIe and DisplayPort tunneling have not been demonstrated on M5 by this work.

No Apple firmware binaries or captured calibration tables are included. Runtime tuning and the router DROM must come from the user's machine through the bootloader. Any external firmware needed must be extracted from the user's IPSW, or extracted during installation by the installer that bundles this kernel. Firmware extraction/loading is not implemented by this PR. Register definitions use generic hardware descriptions; unverified calibration values are not replaced with guessed constants.

Validation: kernel Image and 113 Apple DTBs build with the USB4 fragment; affected USB4/reset binding checks pass; five compiled NHI schema cases accept valid M5/legacy layouts and reject invalid PDF/IOMMU layouts. Reviewed source hashes match the build inputs. No M5 reboot or physical USB4 test was performed for this draft. The existing build emits warnings outside the changed drivers; checkpatch reports no errors and one new-config-file MAINTAINERS reminder.

Requires the companion m1n1 runtime tuning handoff change.

Handle the T8142 reset request layout, firmware ready state, and receive-ring PDF masks without the older external PDF aperture. Require loader tuning and matching ACIO/NHI generations. Add an opt-in build fragment; controller DT enablement and firmware startup remain separate qualification work.
@Acelogic
Acelogic marked this pull request as ready for review October 3, 2026 01:13
@Acelogic
Acelogic merged commit 81c520f into aurora-wip Oct 3, 2026
@Acelogic
Acelogic deleted the codex/m5-usb4-offline branch October 3, 2026 01:13
m0d16l14n1 added a commit to m0d16l14n1/linux that referenced this pull request Nov 15, 2026
… alias

Next to the legacy disp0_piodma, as the t600x J314/J375 trees do: aura
aurora-silicon#165 picks the canonical alias on T8142, while the kernel's DCP DART code
still looks up the legacy path. Test tree only.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <[email protected]>
m0d16l14n1 added a commit to m0d16l14n1/linux that referenced this pull request Nov 15, 2026
…(as aurora-silicon#1532)

Same split as m0d16l14n1/linux j815/dts beb68d4: the J815 boot then
proves aura aurora-silicon#165's canonical alias path on its own.

Assisted-by: Claude Opus 5.5
Signed-off-by: Nick <[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.

1 participant