You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
On-board Bluetooth: loading firmware with devicetree #3459
I'm trying to understand how to load Bluetooth firmware with device-tree rather than using pi-bluetooth Raspbian package together with related btuart script and assorted downstream-patched depreciated hciattach (indeed btattach seems still unreliable for this).
Rationale is, for instance, to seamlessly setup Bluetooth on a PiZeroW with different distributions such as AlpineLinux, and enjoy proper Bluetooth operations even when audio streaming is involved (A2DP).
bcm2835-rpi-zero-w.dts seems to have the pieces together to do the trick, but firmware does NOT appear to load by default.
I noticed @lategoodbye and @pelwell discussed similar topic on Pi4 context, but I'm not sure this now supported on all Pi device with onboard Bluetooth.
Do we need any statement in config.txt or some other extra setup to do the magic?
the necessary serdev driver ( config BT_HCIUART_BCM )
the necessary bluetooth section in the DT which contains the compatible brcm,bcm43438-bt to trigger probing of the serdev driver
Both requirements should be fulfilled for all RPi variants with mainline kernel >= 5.5. Btw the RPi 4 required a patch in the serdev driver (include in Linux 5.4) to get working.
Thanks.
bcm27xx DT files for downstream kernel do not have the section indeed, but I thought it would work with bcmbt-overlay: unfortunately firmware does not happen to load Bluetooth firmware on AlpineLinux 3.11 (5.4.x).
bcm28xx DT files have the section (even on 5.4), but I guess those can only be used with upstream kernel, right?
Typically, I'm on a raspberry PiZero W under Alpine 3.11 (distribution's stock linux-rpi kernel 5.4), firmware at /lib/firmware/brcm/BCM43430A1.hcd
I compare 2 setups:
with btuart script running during sysinit: console shows firmware gets loaded (but dmesg does not). dmesg & hciconfig feature are here. All is (mostly) fine on Bluetooth side.
without that sysinit script, but with bcmbt overlay instead. dmesg & hciconfig feature are here. Firmware not loaded, and hci0 not available.
I'd like to load firmware with device-tree rather than with btuart/downstream hciattach, if at all reliably possible. I guess bcm27xx DT files will probably include this sometime soon?
Thanks for any hint.
(note, unrelated, but in all case I'm having wierd errors on my cdrom drive, I'm at lost with...usb driver issue?)
[ 19.831006] blk_update_request: I/O error, dev sr0, sector 910720 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 19.831025] Buffer I/O error on dev sr0, logical block 113840, async page read
I see there's some recent significant work on DT files stuff (upstream/downstream), including overlay_prefix firmware support...
@pelwell is there any chance Bluetooth firmware loading get integrated in downstream DT files as part of this work?
Any suggested alternative method to get it working in the meantime?
Activity
lategoodbye commentedon Feb 10, 2020
There are two essential kernel parts which are:
Both requirements should be fulfilled for all RPi variants with mainline kernel >= 5.5. Btw the RPi 4 required a patch in the serdev driver (include in Linux 5.4) to get working.
macmpi commentedon Feb 10, 2020
Thanks.
bcm27xx DT files for downstream kernel do not have the section indeed, but I thought it would work with bcmbt-overlay: unfortunately firmware does not happen to load Bluetooth firmware on AlpineLinux 3.11 (5.4.x).
bcm28xx DT files have the section (even on 5.4), but I guess those can only be used with upstream kernel, right?
lategoodbye commentedon Feb 11, 2020
I think you should provide the following information:
macmpi commentedon Feb 11, 2020
Typically, I'm on a raspberry PiZero W under Alpine 3.11 (distribution's stock linux-rpi kernel 5.4), firmware at /lib/firmware/brcm/BCM43430A1.hcd
I compare 2 setups:
with btuart script running during sysinit: console shows firmware gets loaded (but dmesg does not). dmesg &
hciconfig featureare here. All is (mostly) fine on Bluetooth side.without that sysinit script, but with bcmbt overlay instead. dmesg &
hciconfig featureare here. Firmware not loaded, and hci0 not available.I'd like to load firmware with device-tree rather than with btuart/downstream hciattach, if at all reliably possible. I guess bcm27xx DT files will probably include this sometime soon?
Thanks for any hint.
(note, unrelated, but in all case I'm having wierd errors on my cdrom drive, I'm at lost with...usb driver issue?)
lategoodbye commentedon Feb 11, 2020
Did you checked that serdev and BT_HCIUART_BCM is enabled in kernel config?
Btw the overlay looks useless to me without the definition of the shutdown-gpios.
macmpi commentedon Feb 11, 2020
Yes, that part seems ok
macmpi commentedon Feb 13, 2020
I see there's some recent significant work on DT files stuff (upstream/downstream), including
overlay_prefixfirmware support...@pelwell is there any chance Bluetooth firmware loading get integrated in downstream DT files as part of this work?
Any suggested alternative method to get it working in the meantime?
macmpi commentedon Jul 1, 2020
closing as per #3682