Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "Raspberry Pi Foundation Raspberry Pi Pico"

[modules]
__future__ = true
_bleio = false
_bleio = true # Zephyr board has _bleio
_eve = false
_pew = false
_pixelmap = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@ CONFIG_MBEDTLS_ENTROPY_C=y
CONFIG_MBEDTLS_CTR_DRBG_C=y

CONFIG_TEST_RANDOM_GENERATOR=y

# Bluetooth over the shared gSPI bus (CONFIG_BT itself comes from the
# zephyr,bt-hci chosen node in the overlay).
#
# The CYW43439's BT controller firmware does not implement the Bluetooth 5
# extended advertising/scanning commands, and the port defaults BT_EXT_ADV on,
# so turn it off here and let the host use the legacy 0x200B/0x200C commands.
CONFIG_BT_EXT_ADV=n
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
38 changes: 35 additions & 3 deletions ports/zephyr-cp/boards/raspberrypi/rpi_pico_w_zephyr/board.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,25 @@
code_partition: partition@100 {
compatible = "zephyr,mapped-partition";
label = "code-partition";
reg = <0x100 (0x17f000 - 0x100)>;
reg = <0x100 (0x17e000 - 0x100)>;
read-only;
};

storage_partition: partition@17f000 {
/*
* The settings partition backs Bluetooth bond keys via NVS, so it
* must be erase-sector aligned and hold at least two of the
* RP2040's 4K sectors: nvs_mount() rejects a single sector with
* -EINVAL, which makes bt_enable() fail before ever opening the HCI
* driver and surfaces as a bare OSError from "import _bleio".
*
* nvm and circuitpy must stay where ports/raspberrypi puts them
* (cptools/check_partitions.py enforces this), so the second sector
* comes out of the code partition, not out of the CIRCUITPY drive.
*/
storage_partition: partition@17e000 {
compatible = "zephyr,mapped-partition";
label = "storage";
reg = <0x17f000 0x1000>;
reg = <0x17e000 0x2000>;
};

nvm_partition: partition@180000 {
Expand All @@ -41,4 +52,25 @@
};
};

/*
* Bluetooth. Same CYW43439 as the Pico 2 W: HCI is not on a UART, it shares
* the WiFi gSPI bus, so hang the shared-bus HCI transport off the board's
* stock infineon,airoc-wifi node and point the host at it. CONFIG_BT then
* enables itself via the zephyr,bt-hci chosen (see ../../../Kconfig).
*/
&pio0_spi0 {
airoc-wifi@0 {
cyw43_bt_hci: cyw43_bt_hci {
compatible = "infineon,cyw43-bt-hci";
status = "okay";
};
};
};

/ {
chosen {
zephyr,bt-hci = &cyw43_bt_hci;
};
};

#include "../../../app.overlay"
Loading