Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Got bluetooth working on raspberry zero 2 w
After nearly 2 weeks of hard work finally got this working.
hw.model = raspberrypi,model-zero-2-w
[ 2.573504] bwfm0: CLM file default: brcmfmac43430-sdio.clm_blob
[ 2.573504] bwfm0: CLM file model-spec:
brcmfmac43430-sdio.raspberrypi,model-zero-2-w.clm_blob
[ 3.833579] bwfm0: CHIPACTIVE
[ 3.933584] bwfm0: address 2c:cf:67:9f:c9:14
[ 3.933584] bwfm0: wl0: Oct 23 2017 03:55:53 version 7.45.98.38
(r674442 CY) FWID 01-e58d219f
[ 12.094240] wsdisplay0: screen 4 added (default, vt100 emulation)
[ 35.655809] btuart0: major 93 minor 524288
[ 61.010189] bthub0 at btuart0 local-bdaddr 2c:cf:67:9f:c9:15
armv7# btconfig -v btuart0
btuart0: bdaddr 2c:cf:67:9f:c9:15 flags 0x3<UP,RUNNING>
num_cmd = 1
num_acl = 8 (max 8), acl_mtu = 1021
num_sco = 1 (max 1), sco_mtu = 64
HCI version: 4.1 rev 0x00b6
class: [0x000000]
name: "BCM43438A1 37.4MHz Raspberry Pi 3-0043O"
voice: [0x0060]
pin: variable
inquiry mode: std
options:
The way I did this was:
gpio=YES in rc.conf
In /etc/gpio.conf I have the below lines, apparently to initialize
this bt controller it needs a sequence of turning off then turning on
GPIO 42.
! /usr/sbin/gpioctl gpio0 42 set out
! /usr/sbin/gpioctl gpio0 42 off
! /bin/sleep 0.120
! /usr/sbin/gpioctl gpio0 42 on
Now for the changes to the kernel code
sys/arch/evbarm/conf/GENERIC line 278
bcmgpio* at fdt?
change to
bcmgpio* at fdt? pass 3
This is so that bcmgpio attaches before plcom and configures properly
the pin functions according to the device tree.
For /sys/arch/evbarm/dev/plcom.c around line 1474
lvl = PL011_IFLS_1EIGHTH;
sc->sc_ifls |= PL011_IFLS_TXIFLS(lvl);
sc->sc_burstlen = 4;
This is so that the pl011 controller can properly cross the tx fifo
threshold and generate a tx interrupt.
Finally after system boot btattach as this
btattach -i 115200 -fP bcm43xx /dev/dplcom0 3000000
and btconfig buart0 up
That's it. Yes, I know those changes may not be the best way to do it,
but as a first approach to incorporating support for this bt
controller I think this information would be useful. Thoughts?
Home |
Main Index |
Thread Index |
Old Index