| 3 | |
| 4 | [=#sterling-lwb5plus] |
| 5 | = Laird Sterling-LWB5+ 2.4/5.8GHz Wifi / Bluetooth module |
| 6 | The Laird Connectivity Sterling-LWB5+ is a Wifi5 (IEEE 802.11ac) !WiFi radio with Bluetooth 5.2 Low Energy support. |
| 7 | |
| 8 | == Module Details |
| 9 | The Sterling-LWB5+ 453-00046 module: |
| 10 | * CYW4373E chip |
| 11 | * 1x MHF4 antenna shared between !WiFi and Bluetooth |
| 12 | * WL_REG_ON pin must be driven high to enable !WiFi functionality |
| 13 | * BT_REG_ON pin must be driven high to enable Bluetooth functionality |
| 14 | * UART bus provides Bluetooth |
| 15 | * SDIO bus provides !WiFi |
| 16 | |
| 17 | |
| 18 | == Board Specific Details |
| 19 | The Sterling-LWB5+ is installed on the following Gateworks boards: |
| 20 | * GW7400 |
| 21 | * WL_REG_ON - NAND_DATA03__GPIO3_IO09 - must be driven high to enable !WiFi functionality (handled by kernel) |
| 22 | * BT_REG_ON - NAND_DATA02__GPIO3_IO08 - must be driven high to enable Bluetooth functionality (handled by kernel) |
| 23 | * UART3 (/dev/ttymxc2) is the Bluetooth UART |
| 24 | * SDHC1 (/dev/mmc0) is the SDIO !WiFi bus |
| 25 | * GW7300-D+ (replaced the Sterling LWB on previous revisions) |
| 26 | * WL_REG_ON - GPIO1_IO05_GPIO1_IO5 - must be driven high to enable !WiFi functionality (handled by kernel) |
| 27 | * BT_REG_ON - GPIO1_IO03_GPIO1_IO3 - must be driven high to enable Bluetooth functionality (handled by kernel) |
| 28 | * UART3 (/dev/ttymxc2) is the Bluetooth UART |
| 29 | * SDHC1 (/dev/mmc0) is the SDIO !WiFi bus |
| 30 | |
| 31 | |
| 32 | == OS Support |
| 33 | The following notes pertain to support in various OS BSPs (Note that in all cases firmware and drivers are needed as noted above): |
| 34 | * Ubuntu with Gateworks kernel (should also work in mainline kernel): |
| 35 | - Bluetooth HCI fully supported |
| 36 | - !WiFi client and AP fully supported |
| 37 | |
| 38 | == Firmware |
| 39 | Firmware is needed for both !WiFi device and bluetooth functionality and is loaded by the drivers. |
| 40 | |
| 41 | **Note:** The script used in debootstrap for creating our Ubuntu prebuilt images installs the linux-firmware package before this driver is downloaded and extracted. When "apt-get update" is ran it will overwrite the 3rd party driver causing an error when the Laird modules are loaded. Reference [https://github.com/Gateworks/ubuntu-rootfs/blob/master/ubuntu-rootfs.sh this link]. |
| 42 | |
| 43 | == Drivers |
| 44 | |
| 45 | === !WiFi |
| 46 | The SDIO !WiFi functionality is supported by the mainline {{{brcmfmac}}} (Full MAC) driver present in Linux 4.1+ |
| 47 | |
| 48 | kernel drivers: |
| 49 | - CONFIG_CFG80211 / CONFIG_WLAN / CONFIG_NETDEVICES / CONFIG_WLAN_VENDOR_BROADCOM |
| 50 | - CONFIG_BRCMUTIL (brcmutil.ko) (selected when you enable BRCMFMAC) |
| 51 | - CONFIG_BRCMFMAC (brcmfmac.ko) |
| 52 | - CONFIG_BRCMFMAC_SDIO=y (static; selects BRCMFMAC_PROTO_BCDC and FW_LOADER) |
| 53 | |
| 54 | On the Gateworks kernels these are all enabled and you see the following: |
| 55 | {{{#!bash |
| 56 | ~# dmesg | grep mmc0 |
| 57 | root@jammy-venice:~# dmesg | grep mmc0 |
| 58 | [ 1.284402] mmc0: SDHCI controller on 30b40000.mmc [30b40000.mmc] using ADMA |
| 59 | [ 1.404929] mmc0: new ultra high speed SDR104 SDIO card at address 0001 |
| 60 | [ 9.249611] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4373- |
| 61 | sdio.gateworks,imx8mp-gw74xx.bin failed with error -2 |
| 62 | [ 9.254288] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4373- |
| 63 | sdio.gateworks,imx8mp-gw74xx.txt failed with error -2 |
| 64 | ~# dmesg | grep brcm |
| 65 | [ 9.238520] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4373-sdio fo |
| 66 | r chip BCM4373/0 |
| 67 | [ 9.249611] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4373- |
| 68 | sdio.gateworks,imx8mp-gw74xx.bin failed with error -2 |
| 69 | [ 9.251931] usbcore: registered new interface driver brcmfmac |
| 70 | [ 9.254288] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4373- |
| 71 | sdio.gateworks,imx8mp-gw74xx.txt failed with error -2 |
| 72 | [ 9.284004] Bluetooth: hci0: BCM4373A0 'brcm/BCM4373A0.hcd' Patch |
| 73 | [ 11.373370] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4373-sdio fo |
| 74 | r chip BCM4373/0 |
| 75 | [ 11.388516] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4373/0 wl0: Oct 8 |
| 76 | 2021 09:44:25 version 13.10.246.261 (4410652 CY) FWID 01-9585ba52 |
| 77 | }}} |
| 78 | * Note the 'brcmf_fw_alloc_request' failures are normal as the driver attempts to load board-specific firmware first which fails before a generic firmware is loaded |
| 79 | |
| 80 | If you have the need for software support LAIRD has a driver package on their website that consists of a Linux backports driver with patches as well as patches for wpa_supplicant and hostapd. These are derived from periodic code-drops they get from Cypress and not all of these patches make it upstream. |
| 81 | |
| 82 | |
| 83 | === Bluetooth |
| 84 | Bluetooth functionality is provided by a UART based Bluetooth HCI (Host Controller Interface). |
| 85 | |
| 86 | kernel drivers: |
| 87 | * CONFIG_BT (bluetooth support; bt.ko if module) |
| 88 | * CONFIG_BT_HCIUART (UART based HCI support; hci_uart.ko if module) |
| 89 | * CONFIG_BT_HCIUART_BCM (Broadcom protocol support) |
| 90 | |
| 91 | If using a Linux 5.0+ kernel the HCI should be brought up {{{/sys/class/bluetooth/hci0}}} and configured via device-tree bindings if there is a node with a compatible string of 'brcm,bcm4330-bt'. If such bindings exist the kernel will attempt to load firmware patches from {{{/lib/firmware/brcm/BCM4373A0.hcd}}}. This looks like the following in kernel log: |
| 92 | {{{#!bash |
| 93 | [ 8.724500] Bluetooth: Core ver 2.22 |
| 94 | [ 8.724601] Bluetooth: HCI device and connection manager initialized |
| 95 | [ 8.724617] Bluetooth: HCI socket layer initialized |
| 96 | [ 8.724624] Bluetooth: L2CAP socket layer initialized |
| 97 | [ 8.724640] Bluetooth: SCO socket layer initialized |
| 98 | [ 8.852049] Bluetooth: HCI UART driver ver 2.3 |
| 99 | [ 8.852071] Bluetooth: HCI UART protocol H4 registered |
| 100 | [ 8.852076] Bluetooth: HCI UART protocol BCSP registered |
| 101 | [ 8.867795] Bluetooth: HCI UART protocol LL registered |
| 102 | [ 8.867816] Bluetooth: HCI UART protocol ATH3K registered |
| 103 | [ 8.867870] Bluetooth: HCI UART protocol Three-wire (H5) registered |
| 104 | [ 8.868056] Bluetooth: HCI UART protocol Intel registered |
| 105 | [ 8.868227] Bluetooth: HCI UART protocol Broadcom registered |
| 106 | [ 8.868290] Bluetooth: HCI UART protocol QCA registered |
| 107 | [ 8.868295] Bluetooth: HCI UART protocol AG6XX registered |
| 108 | [ 8.868339] Bluetooth: HCI UART protocol Marvell registered |
| 109 | [ 9.257710] Bluetooth: hci0: BCM: chip id 135 |
| 110 | [ 9.260024] Bluetooth: hci0: BCM: features 0x0f |
| 111 | [ 9.282874] Bluetooth: hci0: BCM4373A0 |
| 112 | [ 9.282898] Bluetooth: hci0: BCM4373A0 (001.001.025) build 0000 |
| 113 | [ 9.284004] Bluetooth: hci0: BCM4373A0 'brcm/BCM4373A0.hcd' Patch |
| 114 | [ 10.452359] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 |
| 115 | [ 10.452380] Bluetooth: BNEP filters: protocol multicast |
| 116 | [ 10.452397] Bluetooth: BNEP socket layer initialized |
| 117 | [ 14.250502] Bluetooth: hci0: CYW94373 UART 37.4MHz Class 1 wlbga sLNA-0090 |
| 118 | [ 14.250525] Bluetooth: hci0: BCM4373A0 (001.001.025) build 0128 |
| 119 | }}} |
| 120 | |
| 121 | |
| 122 | [=#sterling-lwb] |