While more code enabling Apple Silicon is reaching the mainline Linux kernel, a lot of important functionality so far remains under development or out-of-tree in the downstream Asahi Linux repository. One piece that’s quite important for modern computing and still working its way to the mainline kernel is enabling USB3 functionality with Apple Silicon devices on Linux.
Sven Peter continues persevering in getting more of the Apple Silicon support to the mainline kernel. One of the areas he has been focusing on recently has been getting the Apple Silicon USB3 support working.
Sent out today were the latest patches for Apple Silicon USB3 support with the DWC3 driver. Various fixes and other small changes were added compared to the prior round of patches.
While the Linux DWC3 driver is fairly common with multiple vendors relying on the Synopsys DesignWare Core USB 3.0 controller IP, a number of changes are needed to get it working for Apple hardware. The patch adding the Apple Silicon
DWC3 glue layer driver explains:
“The dwc3 controller present on Apple Silicon SoCs like the M1 requires a specific order of operations synchronized between its PHY and its Type-C controller. Specifically, the PHY first has to go through initial bringup (which requires knowledge of the lane mode and orientation) before dwc3 itself can be brought up and can then finalize the PHY configuration. Additionally, dwc3 has to be teared down and re-initialized whenever the cable is changed due to hardware quirks that prevent a new device from being recognized and due to the PHY being unable to switch lane mode or orientation while dwc3 is up and running.
These controllers also have a Apple-specific MMIO region after the common dwc3 region where some controls have to be updated. PHY bringup and shutdown also requires SUSPHY to be enabled for the ports to work correctly.
In the future, this driver will also gain support for USB3-via-USB4 tunneling which will require additional tweaks.”
Hopefully it won’t be too much longer before the Apple Silicon modern USB support is ready for the mainline Linux kernel.