Commit 399dee9
zephyr-cp: enable BLE on the Raspberry Pi Pico 2 W
The CYW43439's Bluetooth controller shares the WiFi gSPI bus rather than
sitting on a UART, so it needs the new shared-bus HCI driver (see the
companion zephyr branch). With a bt_hci device in the devicetree, the
port's existing Kconfig turns CONFIG_BT on by itself and common-hal
_bleio needs no board-specific work.
Wire it up for the Pico 2 W:
- board overlay: add the infineon,cyw43-bt-hci node as a child of the
stock infineon,airoc-wifi node, and point zephyr,bt-hci at it. The
hyphenated chosen name matters — the port's Kconfig derives CONFIG_BT
via dt_chosen_enabled(zephyr,bt-hci).
- board conf: deeper system workqueue stack and HW stack protection, as
the WHD WiFi, cybt and coexistence call chains are deeper than the
port defaults.
- compat2driver: map infineon_cyw43_bt_hci to bluetooth/hci, which is
what makes zephyr2cp.py set _bleio. Added by hand rather than
regenerating the file, which would churn 500+ unrelated lines against
the current Zephyr revision.
Builds at 67.1% flash and 43.4% RAM, up from 59.7%/38.0% without BLE.
Not hardware-tested.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent b4709a2 commit 399dee9
4 files changed
Lines changed: 32 additions & 1 deletion
File tree
- ports/zephyr-cp
- boards
- raspberrypi/rpi_pico2_w_zephyr
- cptools
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
33 | 54 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
0 commit comments