Asahi Linux: Updates galore! November 2022 Progress Report (UPDATED)
Until now, Asahi Linux has only supported USB2 on the Thunderbolt ports. While the hardware USB2/3 controllers are reasonably well supported by Linux already, and the Type-C port controllers are also based on existing partially-supported hardware, there was one big missing piece: the PHY driver.
M1 and later Apple Silicon machines use Apple-designed (or Apple-customized?) PHY hardware called “Apple Type-C PHY” (ATCPHY) that supports USB3, DisplayPort, and TB3/USB4 modes. This piece of hardware is in charge of turning the USB3/DP/TB protocol data into signals on the wires. Since we’re dealing with very high-speed signals (up to 20Gbps per pair), the PHY has to be very complex and there are a lot of analog knobs that need to be individually calibrated. With USB2, you can get away with having universal settings that work for every device, but that won’t work for USB3 and other higher-speed protocols!
The job of the PHY driver is to configure the physical hardware with settings specific to your particular chip, which are calibrated at the factory, and to manage reconfiguration of the entire PHY hardware as different modes are switched in and out. In practice, this means a huge number of “magic” register pokes, including some with variable data that comes from factory-written eFuses. Sven has been working hard reverse engineer all of this, and this new release includes his new ATCPHY driver with support for USB3 mode!
In addition to driving the PHY itself, the PHY driver has to very carefully coordinate with the USB controller driver (dwc3) and the Type C port controller driver (tipd). When devices are connected and disconnected, there is a complex dance of negotiation that has to happen that eventually leads to a decision on what protocols to run over which wires. This information has to be communicated to the PHY (including things like what orientation you plugged the cable in) so it can route its signals appropriately, and only after everything has been initialized in the right order can the USB controller be brought up. To make matters even trickier, the hardware is quite temperamental and if anything goes wrong the controller is likely to just lock up or fail to work!
We think USB3 mode should be pretty solid, but you can expect some glitches when doing things like hotplugging devices quickly at this point. The good news is that, since mode-switching when you hotplug the cable involves resetting almost everything, any transient issues can usually be solved by just disconnecting and reconnecting the device. Actual USB3 operation should be solid once connected, but do let us know if you encounter any issues.
Also: Asahi Linux November 2022 progress report [LWN.net]
UPDATE
-
Asahi Linux for Apple Silicon has come a long way in a few months | AppleInsider
Asahi, a project to bring Linux to the Apple Silicon Mac, has released a new progress report that details expanded USB and peripheral support.
A project to port Linux to Apple Silicon Macs, the latest update to Asahi Linux has new hardware support, new features, and fixes for "longstanding pain points." It also features a new bleeding-edge kernel branch with support for suspend and the display controller.
The team reminds users to keep their Linux installations up to date. Early in the macOS Ventura betas, they found an issue that would make Linux unbootable after the upgrade.
A package update fixed the bug earlier in 2022. However, they still see users recently upgrading to macOS Ventura, or even the latest 12.x macOS releases, and end up with unbootable Linux installations.
Also here:
-
Lilbits: Linux on Apple Silicon, and a USB charger that looks like a tiny Macintosh - Liliputing
The developers working to bring Linux to Apple’s most recent computers are making progress enabling support for the hardware on Macs with Apple M1 and M2 chips. Meanwhile a crowdfunding campaign is offering a chance to get your hands on a USB-C charger that cranks out enough power to charge a MacBook… and the charger itself is designed to look like a classic Macintosh computer.
[...]
Developers working on this GNU/Linux distribution for Macs with Apple Silicon have made major progress in bringing support for USB3 speeds to the Thunderbolt ports on Apple’s recent Macs.
-
Asahi Linux Issues "Progress Report", Improves Apple Silicon Support
The distro has added USB 3.0 support, but speaker support will have to wait. Livestreaming of its coding is a surprise hit on YouTube.
The Asahi Linux project, a distribution aiming to make a Linux desktop available for Apple Silicon-based Macs, has issued a November 2022 "progress report."