diff --git a/package/allwinner/bluetooth/btenable.sh b/package/allwinner/bluetooth/btenable.sh index 59d7db339..d31a9beff 100755 --- a/package/allwinner/bluetooth/btenable.sh +++ b/package/allwinner/bluetooth/btenable.sh @@ -18,7 +18,8 @@ bt_on() echo 1 > /sys/class/rfkill/rfkill0/state sleep 1 - $BSA_SERVER -all=0 -d/dev/ttyS1 -u$BT_SOCKET_PATH_PREFIX -k$BT_SOCKET_PATH_PREFIX$BLE_LOCAL_KEY_FILE -p/lib/firmware/bcm43436b0.hcd -r12 & + [ -f /lib/firmware/bcm43436b0.hcd ] && $BSA_SERVER -all=0 -d/dev/ttyS1 -u$BT_SOCKET_PATH_PREFIX -k$BT_SOCKET_PATH_PREFIX$BLE_LOCAL_KEY_FILE -p/lib/firmware/bcm43436b0.hcd -r12 & + [ -f /lib/firmware/bcm43438a1.hcd ] && $BSA_SERVER -all=0 -d/dev/ttyS1 -u$BT_SOCKET_PATH_PREFIX -k$BT_SOCKET_PATH_PREFIX$BLE_LOCAL_KEY_FILE -p/lib/firmware/bcm43438a1.hcd -r12 & sleep 2 } diff --git a/package/firmware/linux-firmware/broadcom_nb197sm.mk b/package/firmware/linux-firmware/broadcom_nb197sm.mk new file mode 100755 index 000000000..d96151503 --- /dev/null +++ b/package/firmware/linux-firmware/broadcom_nb197sm.mk @@ -0,0 +1,14 @@ +Package/nb197sm-firmware = $(call Package/firmware-default,Broadcom NB197SM firmware) +define Package/nb197sm-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DATA) \ + $(TOPDIR)/package/firmware/nb197sm/*.bin \ + $(1)/lib/firmware/ + $(INSTALL_DATA) \ + $(TOPDIR)/package/firmware/nb197sm/*.hcd \ + $(1)/lib/firmware/ + $(INSTALL_DATA) \ + $(TOPDIR)/package/firmware/nb197sm/nvram_nb197sm.txt \ + $(1)/lib/firmware/nvram.txt +endef +$(eval $(call BuildPackage,nb197sm-firmware)) diff --git a/package/firmware/nb197sm/bcm43438a1.hcd b/package/firmware/nb197sm/bcm43438a1.hcd new file mode 100755 index 000000000..48e1b3e5d Binary files /dev/null and b/package/firmware/nb197sm/bcm43438a1.hcd differ diff --git a/package/firmware/nb197sm/fw_bcm43438a1.bin b/package/firmware/nb197sm/fw_bcm43438a1.bin new file mode 100755 index 000000000..ffcad31aa Binary files /dev/null and b/package/firmware/nb197sm/fw_bcm43438a1.bin differ diff --git a/package/firmware/nb197sm/fw_bcm43438a1_apsta.bin b/package/firmware/nb197sm/fw_bcm43438a1_apsta.bin new file mode 100755 index 000000000..ffcad31aa Binary files /dev/null and b/package/firmware/nb197sm/fw_bcm43438a1_apsta.bin differ diff --git a/package/firmware/nb197sm/fw_bcm43438a1_p2p.bin b/package/firmware/nb197sm/fw_bcm43438a1_p2p.bin new file mode 100755 index 000000000..ffcad31aa Binary files /dev/null and b/package/firmware/nb197sm/fw_bcm43438a1_p2p.bin differ diff --git a/package/firmware/nb197sm/nvram_nb197sm.txt b/package/firmware/nb197sm/nvram_nb197sm.txt new file mode 100755 index 000000000..4246f17c6 --- /dev/null +++ b/package/firmware/nb197sm/nvram_nb197sm.txt @@ -0,0 +1,58 @@ +# NVRAM file for BCM943430WLSELG +# 2.4 GHz, 20 MHz BW mode + +# The following parameter values are just placeholders, need to be updated. +manfid=0x2d0 +prodid=0x0726 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0726 +boardrev=0x1101 +boardnum=22 +macaddr=00:11:22:33:44:55 +sromrev=11 +boardflags=0x00404201 +xtalfreq=26000 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 + +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=0xff65,0x1a68,0xfd03 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=90 +txpwrbckof=6 +cckbw202gpo=0 +legofdmbw202gpo=0x66111111 +mcsbw202gpo=0x77711111 + +# OFDM IIR : +ofdmdigfilttype=18 +ofdmdigfilttypebe=18 +# PAPD mode: +papdmode=1 +papdvalidtest=1 + +# LTECX flags +ltecxmux=1 +ltecxpadnum=0x02030401 +ltecxfnsel=0x3003 +ltecxgcigpio=0x3012 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +deadman_to=0xffffffff +# muxenab: 0x1 for UART enable, 0x10 for Host awake +muxenab=0x10 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 + + diff --git a/package/utils/brcm_patchram_plus/bt.init b/package/utils/brcm_patchram_plus/bt.init index 12c906b51..79da1fe98 100755 --- a/package/utils/brcm_patchram_plus/bt.init +++ b/package/utils/brcm_patchram_plus/bt.init @@ -13,7 +13,8 @@ fi echo 0 > /sys/class/rfkill/rfkill0/state echo 1 > /sys/class/rfkill/rfkill0/state #brcm_patchram_plus -d --tosleep=50000 --no2bytes --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 --baudrate 1500000 --patchram /lib/firmware/ap6212/bcm43438a0.hcd /dev/ttyS1 & -brcm_patchram_plus --tosleep=50000 --no2bytes --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 --baudrate 1500000 --patchram /lib/firmware/ap6212/bcm43438a0.hcd /dev/ttyS1 & +[ -f /lib/firmware/bcm43436b0.hcd ] && brcm_patchram_plus --tosleep=50000 --no2bytes --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 --baudrate 1500000 --patchram /lib/firmware/bcm43436b0.hcd /dev/ttyS1 & +[ -f /lib/firmware/bcm43438a1.hcd ] && brcm_patchram_plus --tosleep=50000 --no2bytes --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 --baudrate 1500000 --patchram /lib/firmware/bcm43438a1.hcd /dev/ttyS1 & sleep 10 #change all bluetooth type rfkillx/state to 1 diff --git a/package/utils/rftest/broadcom/bt_test.sh b/package/utils/rftest/broadcom/bt_test.sh index 1640cc723..473d46830 100755 --- a/package/utils/rftest/broadcom/bt_test.sh +++ b/package/utils/rftest/broadcom/bt_test.sh @@ -8,7 +8,8 @@ echo "uart device is $tty_dev" echo 0 > /sys/class/rfkill/rfkill0/state echo 1 > /sys/class/rfkill/rfkill0/state -brcm_patchram_plus --enable_hci --no2bytes --tosleep=200000 --baudrate 115200 --patchram /lib/firmware/bcm43438a0.hcd $tty_dev & +[ -f /lib/firmware/bcm43436b0.hcd ] && brcm_patchram_plus --enable_hci --no2bytes --tosleep=200000 --baudrate 115200 --patchram /lib/firmware/bcm43436b0.hcd $tty_dev & +[ -f /lib/firmware/bcm43438a1.hcd ] && brcm_patchram_plus --enable_hci --no2bytes --tosleep=200000 --baudrate 115200 --patchram /lib/firmware/bcm43438a1.hcd $tty_dev & sleep 10 #change all bluetooth type rfkillx/state to 1 diff --git a/target/allwinner/mandolin-pv1/defconfig b/target/allwinner/mandolin-pv1/defconfig index 9d4dc624f..1e7ae92f7 100644 --- a/target/allwinner/mandolin-pv1/defconfig +++ b/target/allwinner/mandolin-pv1/defconfig @@ -1554,6 +1554,7 @@ CONFIG_PACKAGE_ap6236-firmware=y # CONFIG_PACKAGE_atmel_mxt224s-config is not set # CONFIG_PACKAGE_esp8089-firmware is not set # CONFIG_PACKAGE_mrvl8977-firmware-cfgfile is not set +# CONFIG_PACKAGE_nb197sm-firmware is not set # CONFIG_PACKAGE_qca9377-firmware-cfgfile is not set # CONFIG_PACKAGE_r8188eu-firmware is not set # CONFIG_PACKAGE_r8723bs-firmware is not set