Linux Driver Posted Enabling Bluetooth Support For Apple M1/M2, Some x86 Macs

Written by Michael Larabel in Apple on 1 August 2022 at 01:44 PM EDT. Add A Comment
APPLE
Sven Peter who has worked a lot on various aspects of Apple Silicon enablement for Linux today posted the patches enabling Apple Bluetooth driver support for Apple Silicon M1/M2 hardware and also for some Apple x86 Macs.

This Bluetooth "hci_bcm4377" driver posted for review is for enabling the Broadcom BCM4377/4378/4387 controllers as found in the Apple M1/M2 systems and select Apple x86 Macs too.

There are some peculiarities to these Broadcom controllers used by Apple:
Unlike regular Broadcom chips attached over UART or SDIO these no longer support the usual patchram / minidriver firmware loading. Instead the firmware is just directly mapped to the PCIe device and then booted. In general the entire PCIe configuration space is similar to brcmfmac (or the Android downstream bcmdhd driver). There are not many similarities with UART Broadcom devices.

The firmware naming itself is a bit annoying but similar to the WiFi function / brcmfmac: We need the chip id (e.g. 4377), the chip stepping (e.g. b3), the module name (e.g. apple,atlantisb) and the antenna vendor (e.g. m for Murata) to select the correct firmware file.
...
This has been tested by quite a few people on various M1/M2 machines and a few people with x86 T2 machines. So far we only know that WiFi/Bluetooth coexistence is not working yet, but that needs to be configured inside brcmfmac as far as we can tell.

Unfortunately, there isn't an easy means of distributing the necessary firmware for this driver on Linux. Sven noted that currently the Asahi Linux installer extracts it from the macOS image with not being able to redistribute the binary directly, "We unfortunately can't distribute the firmware itself but we can extract it from the official macOS update packages Apple distributes. Our installer for M1/M2 extracts the latest firmware and prepares it for Linux (and BSD) automatically"


This Bluetooth driver for modern Apple Macs is now under review on the kernel mailing list. This new Bluetooth driver comes in at 2.6k lines of code.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week