Merge pull request #73 from balena-os/bt-rev
nanopi-air-bt: Load BT firmware according to chip revision
This commit is contained in:
commit
0f6d04a3b8
1 changed files with 8 additions and 1 deletions
|
@ -13,5 +13,12 @@ echo "Resetting BT chip"
|
|||
echo 0 > /sys/class/gpio/gpio205/value
|
||||
echo 1 > /sys/class/gpio/gpio205/value
|
||||
|
||||
/usr/bin/brcm_patchram_plus -d --patchram /lib/firmware/brcm/bcm43438a1.hcd --no2bytes --tosleep 5000 $1 > /tmp/brcm_log 2>&1
|
||||
CHIP_REV=`dmesg | grep brcmfm | grep "chip 0x00a9a6" | awk '{print $11}'`
|
||||
BT_FIRMWARE="bcm43438a0.hcd" # AP6212 chip
|
||||
|
||||
if [ "$CHIP_REV" = "0x000001" ]; then
|
||||
BT_FIRMWARE="bcm43438a1.hcd" # AP6212A chip
|
||||
fi
|
||||
|
||||
/usr/bin/brcm_patchram_plus -d --patchram /lib/firmware/brcm/$BT_FIRMWARE --no2bytes --tosleep 5000 $1 > /tmp/brcm_log 2>&1
|
||||
hciattach -n $1 bcm43xx 115200 flow
|
||||
|
|
Loading…
Add table
Reference in a new issue