Version 17 (modified by 7 months ago) ( diff ) | ,
---|
Laird Sterling-LWB5+ 2.4/5.8GHz Wifi / Bluetooth module
The Laird Connectivity Sterling-LWB5+ is a Wifi5 (IEEE 802.11ac) WiFi radio with Bluetooth 5.2 Low Energy support.
Module Details
The Sterling-LWB5+ 453-00046 module:
- CYW4373E chip
- 1x MHF4 antenna shared between WiFi and Bluetooth
- WL_REG_ON pin must be driven high to enable WiFi functionality
- BT_REG_ON pin must be driven high to enable Bluetooth functionality
- UART bus provides Bluetooth
- SDIO bus provides WiFi
Board Specific Details
The Sterling-LWB5+ is installed on the following Gateworks boards:
- GW7400
- WL_REG_ON - NAND_DATA03GPIO3_IO09 - must be driven high to enable WiFi functionality (handled by kernel)
- BT_REG_ON - NAND_DATA02GPIO3_IO08 - must be driven high to enable Bluetooth functionality (handled by kernel)
- UART3 (/dev/ttymxc2) is the Bluetooth UART
- SDHC1 (/dev/mmc0) is the SDIO WiFi bus
- GW7300-D+ (replaced the Sterling LWB on previous revisions)
- WL_REG_ON - GPIO1_IO05_GPIO1_IO5 - must be driven high to enable WiFi functionality (handled by kernel)
- BT_REG_ON - GPIO1_IO03_GPIO1_IO3 - must be driven high to enable Bluetooth functionality (handled by kernel)
- UART3 (/dev/ttymxc2) is the Bluetooth UART
- SDHC1 (/dev/mmc0) is the SDIO WiFi bus
OS Support
The following notes pertain to support in various OS BSPs (Note that in all cases firmware and drivers are needed as noted above):
- Ubuntu with Gateworks kernel (should also work in mainline kernel):
- Bluetooth HCI fully supported
- WiFi client and AP fully supported
Firmware
Firmware is needed for both WiFi device and bluetooth functionality and is loaded by the drivers.
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 this link.
Drivers
WiFi
The SDIO WiFi functionality is supported by the mainline brcmfmac
(Full MAC) driver present in Linux 4.1+
kernel drivers:
- CONFIG_CFG80211 / CONFIG_WLAN / CONFIG_NETDEVICES / CONFIG_WLAN_VENDOR_BROADCOM
- CONFIG_BRCMUTIL (brcmutil.ko) (selected when you enable BRCMFMAC)
- CONFIG_BRCMFMAC (brcmfmac.ko)
- CONFIG_BRCMFMAC_SDIO=y (static; selects BRCMFMAC_PROTO_BCDC and FW_LOADER)
On the Gateworks kernels these are all enabled and you see the following:
~# dmesg | grep mmc0 root@jammy-venice:~# dmesg | grep mmc0 [ 1.284402] mmc0: SDHCI controller on 30b40000.mmc [30b40000.mmc] using ADMA [ 1.404929] mmc0: new ultra high speed SDR104 SDIO card at address 0001 [ 9.249611] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4373- sdio.gateworks,imx8mp-gw74xx.bin failed with error -2 [ 9.254288] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4373- sdio.gateworks,imx8mp-gw74xx.txt failed with error -2 ~# dmesg | grep brcm [ 9.238520] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4373-sdio fo r chip BCM4373/0 [ 9.249611] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4373- sdio.gateworks,imx8mp-gw74xx.bin failed with error -2 [ 9.251931] usbcore: registered new interface driver brcmfmac [ 9.254288] brcmfmac mmc0:0001:1: Direct firmware load for brcm/brcmfmac4373- sdio.gateworks,imx8mp-gw74xx.txt failed with error -2 [ 9.284004] Bluetooth: hci0: BCM4373A0 'brcm/BCM4373A0.hcd' Patch [ 11.373370] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4373-sdio fo r chip BCM4373/0 [ 11.388516] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4373/0 wl0: Oct 8 2021 09:44:25 version 13.10.246.261 (4410652 CY) FWID 01-9585ba52
- 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
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.
Sample output from iw command showing capabilities: CollapsibleStart(EXPAND HERE)
root@jammy-venice:~# iw list Wiphy phy0 wiphy index: 0 max # scan SSIDs: 10 max scan IEs length: 2048 bytes max # sched scan SSIDs: 0 max # match sets: 0 Retry short limit: 7 Retry long limit: 4 Coverage class: 0 (up to 0m) Device supports roaming. Supported Ciphers: * WEP40 (00-0f-ac:1) * WEP104 (00-0f-ac:5) * TKIP (00-0f-ac:2) * CCMP-128 (00-0f-ac:4) * CMAC (00-0f-ac:6) Available Antennas: TX 0 RX 0 Supported interface modes: * IBSS * managed * AP * P2P-client * P2P-GO * P2P-device Band 1: Capabilities: 0x1020 HT20 Static SM Power Save RX HT20 SGI No RX STBC Max AMSDU length: 3839 bytes DSSS/CCK HT40 Maximum RX AMPDU length 65535 bytes (exponent: 0x003) Minimum RX AMPDU time spacing: 16 usec (0x07) HT TX/RX MCS rate indexes supported: 0-7 Bitrates (non-HT): * 1.0 Mbps * 2.0 Mbps (short preamble supported) * 5.5 Mbps (short preamble supported) * 11.0 Mbps (short preamble supported) * 6.0 Mbps * 9.0 Mbps * 12.0 Mbps * 18.0 Mbps * 24.0 Mbps * 36.0 Mbps * 48.0 Mbps * 54.0 Mbps Frequencies: * 2412 MHz [1] (20.0 dBm) * 2417 MHz [2] (20.0 dBm) * 2422 MHz [3] (20.0 dBm) * 2427 MHz [4] (20.0 dBm) * 2432 MHz [5] (20.0 dBm) * 2437 MHz [6] (20.0 dBm) * 2442 MHz [7] (20.0 dBm) * 2447 MHz [8] (20.0 dBm) * 2452 MHz [9] (20.0 dBm) * 2457 MHz [10] (20.0 dBm) * 2462 MHz [11] (20.0 dBm) * 2467 MHz [12] (disabled) * 2472 MHz [13] (disabled) * 2484 MHz [14] (disabled) Supported commands: * new_interface * set_interface * new_key * start_ap * join_ibss * set_pmksa * del_pmksa * flush_pmksa * remain_on_channel * frame * set_wiphy_netns * set_channel * start_p2p_device * connect * disconnect * crit_protocol_start * crit_protocol_stop * update_connect_params software interface modes (can always be added): valid interface combinations: * #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-G O } <= 1, total <= 3, #channels <= 2 * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P -device } <= 1, total <= 4, #channels <= 1 Device supports scan flush. max # scan plans: 1 max scan plan interval: -1 max scan plan iterations: 0 Supported TX frame types: * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0x a0 0xb0 0xc0 0xd0 0xe0 0xf0 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0x b0 0xc0 0xd0 0xe0 0xf0 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa 0 0xb0 0xc0 0xd0 0xe0 0xf0 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0 Supported RX frame types: * managed: 0x40 0xd0 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0 * P2P-client: 0x40 0xd0 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0 * P2P-device: 0x40 0xd0 Supported extended features: * [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records * [ 4WAY_HANDSHAKE_STA_PSK ]: 4-way handshake with PSK in statio n mode * [ 4WAY_HANDSHAKE_STA_1X ]: 4-way handshake with 802.1X in stat ion mode * [ SAE_OFFLOAD ]: SAE offload support
Bluetooth
Bluetooth functionality is provided by a UART based Bluetooth HCI (Host Controller Interface).
kernel drivers:
- CONFIG_BT (bluetooth support; bt.ko if module)
- CONFIG_BT_HCIUART (UART based HCI support; hci_uart.ko if module)
- CONFIG_BT_HCIUART_BCM (Broadcom protocol support)
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:
[ 8.724500] Bluetooth: Core ver 2.22 [ 8.724601] Bluetooth: HCI device and connection manager initialized [ 8.724617] Bluetooth: HCI socket layer initialized [ 8.724624] Bluetooth: L2CAP socket layer initialized [ 8.724640] Bluetooth: SCO socket layer initialized [ 8.852049] Bluetooth: HCI UART driver ver 2.3 [ 8.852071] Bluetooth: HCI UART protocol H4 registered [ 8.852076] Bluetooth: HCI UART protocol BCSP registered [ 8.867795] Bluetooth: HCI UART protocol LL registered [ 8.867816] Bluetooth: HCI UART protocol ATH3K registered [ 8.867870] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 8.868056] Bluetooth: HCI UART protocol Intel registered [ 8.868227] Bluetooth: HCI UART protocol Broadcom registered [ 8.868290] Bluetooth: HCI UART protocol QCA registered [ 8.868295] Bluetooth: HCI UART protocol AG6XX registered [ 8.868339] Bluetooth: HCI UART protocol Marvell registered [ 9.257710] Bluetooth: hci0: BCM: chip id 135 [ 9.260024] Bluetooth: hci0: BCM: features 0x0f [ 9.282874] Bluetooth: hci0: BCM4373A0 [ 9.282898] Bluetooth: hci0: BCM4373A0 (001.001.025) build 0000 [ 9.284004] Bluetooth: hci0: BCM4373A0 'brcm/BCM4373A0.hcd' Patch [ 10.452359] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 10.452380] Bluetooth: BNEP filters: protocol multicast [ 10.452397] Bluetooth: BNEP socket layer initialized [ 14.250502] Bluetooth: hci0: CYW94373 UART 37.4MHz Class 1 wlbga sLNA-0090 [ 14.250525] Bluetooth: hci0: BCM4373A0 (001.001.025) build 0128