Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: Convert HCI drivers to use a proper Zephyr driver API #72323

Merged
merged 30 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
49db2ff
Bluetooth: Add devicetree base binding for Bluetooth HCI drivers
jhedberg May 5, 2024
b56a9d6
Bluetooth: include: Add initial HCI driver API definition
jhedberg May 5, 2024
d0e75ab
Bluetooth: host: Add support for new-style HCI drivers
jhedberg May 5, 2024
a270928
Bluetooth: drivers: Convert H4 (UART) HCI driver to new API
jhedberg May 5, 2024
fecd11f
Bluetooth: controller: Update to new HCI driver API
jhedberg May 5, 2024
fc7438f
Bluetooth: samples: hci_uart_async: Remove bt_recv() dependency
jhedberg May 6, 2024
d41a481
Bluetooth: host: hci_raw: Use existing H4 defines from hci_types.h
jhedberg May 6, 2024
07a3406
Bluetooth: drivers: h5: Convert to new HCI driver API
jhedberg May 6, 2024
d4586f5
Bluetooth: drivers: hci: Get rid of Kconfig choice
jhedberg May 6, 2024
c8b9c66
boards: nrf52_bsim: Add support for using UART as HCI
jhedberg May 8, 2024
5851e7f
Bluetooth: drivers: Convert userchan driver to new API
jhedberg May 10, 2024
ce79439
Bluetooth: drivers: userchan: don't fail everything if driver init fails
jhedberg May 13, 2024
4ffd258
Bluetooth: tests: Convert to new HCI driver API
jhedberg May 10, 2024
dd4fc43
qemu: Use BT_UART instead of BT_NO_DRIVER to enable serial port
jhedberg May 13, 2024
2118741
Bluetooth: samples: Fix PAwR samples to match board capabilities
jhedberg May 20, 2024
d8b66b6
Bluetooth: drivers: Convert Ambiq Apollo driver to new API
jhedberg May 26, 2024
e3e803d
Bluetooth: Kconfig: Remove BT_NO_DRIVER
jhedberg May 26, 2024
f86291f
Bluetooth: Use device tree to indicate vendor exension support
jhedberg May 27, 2024
191b81a
Bluetooth: drivers: Convert IPC driver to new API
jhedberg May 29, 2024
4ce2e48
Bluetooth: drivers: Convert psoc6_bless driver to new API
jhedberg May 31, 2024
6dc0995
Bluetooth: drivers: Convert ESP32 HCI driver to new API
jhedberg May 31, 2024
3e6efaf
Bluetooth: drivers: Convert SPI drivers to use new HCI API
jhedberg Jun 1, 2024
e0c30ca
Bluetooth: drivers: Convert ST STM32WBA driver to new API
jhedberg Jun 1, 2024
dfc3cf6
Bluetooth: drivers: Convert STM32 IPM driver to new API
jhedberg Jun 1, 2024
3d64a40
Bluetooth: drivers: Convert DA1469X HCI driver to new API
jhedberg Jun 1, 2024
24a3908
Bluetooth: drivers: Convert NXP HCI driver to new API
jhedberg Jun 2, 2024
68ef973
Bluetooth: drivers: Convert Silabs HCI driver to new API
jhedberg Jun 2, 2024
a3104f5
Bluetooth: deprecate old HCI driver APIs
jhedberg Jun 7, 2024
fd995f1
Bluetooth: doc: Update documentation for the new HCI API
jhedberg Jun 7, 2024
09114f4
doc: migration-guide-3.7: Add information about new HCI API
jhedberg Jun 7, 2024
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
3 changes: 2 additions & 1 deletion boards/96boards/carbon/96b_carbon_stm32f401xe.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &hci_spi;
};

leds {
Expand Down Expand Up @@ -124,7 +125,7 @@
pinctrl-names = "default";

/* Nordic nRF51822-QFAC */
bt-hci@0 {
hci_spi: bt-hci@0 {
compatible = "zephyr,bt-hci-spi";
reg = <0>;
reset-gpios = <&gpiob 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
Expand Down
5 changes: 2 additions & 3 deletions boards/96boards/carbon/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ if BT
config SPI
default y

choice BT_HCI_BUS_TYPE
default BT_SPI
endchoice
config BT_SPI
default y

endif # BT

Expand Down
1 change: 1 addition & 0 deletions boards/ambiq/apollo3_evb/apollo3_evb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-pipe = &uart0;
zephyr,flash-controller = &flash;
zephyr,bt_hci = &bt_hci_apollo;
};

aliases {
Expand Down
1 change: 1 addition & 0 deletions boards/ambiq/apollo3p_evb/apollo3p_evb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-pipe = &uart0;
zephyr,flash-controller = &flash;
zephyr,bt_hci = &bt_hci_apollo;
};

aliases {
Expand Down
4 changes: 0 additions & 4 deletions boards/ambiq/apollo4p_blue_kxr_evb/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ if BT
config MAIN_STACK_SIZE
default 2048

choice BT_HCI_BUS_TYPE
default BT_AMBIQ_HCI
endchoice

config BT_BUF_ACL_TX_COUNT
default 14

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
zephyr,shell-uart = &uart0;
zephyr,uart-pipe = &uart0;
zephyr,flash-controller = &flash;
zephyr,bt-hci = &bt_hci_apollo;
};

aliases {
Expand Down
19 changes: 12 additions & 7 deletions boards/arduino/giga_r1/arduino_giga_r1_stm32h747xx_m7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
zephyr,uart-mcumgr = &usart1;
zephyr,bt-uart = &uart7;
zephyr,bt-hci = &bt_hci_uart;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,canbus = &fdcan2;
Expand Down Expand Up @@ -97,12 +97,17 @@
status = "okay";
hw-flow-control;

murata-1dx {
compatible = "infineon,cyw43xxx-bt-hci";
bt-reg-on-gpios = <&gpioa 10 GPIO_ACTIVE_HIGH>;
bt-host-wake-gpios = <&gpiog 3 GPIO_ACTIVE_HIGH>;
bt-dev-wake-gpios = <&gpioh 7 GPIO_ACTIVE_HIGH>;
fw-download-speed = <115200>;
bt_hci_uart: bt_hci_uart {
compatible = "zephyr,bt-hci-uart";
status = "okay";

murata-1dx {
compatible = "infineon,cyw43xxx-bt-hci";
bt-reg-on-gpios = <&gpioa 10 GPIO_ACTIVE_HIGH>;
bt-host-wake-gpios = <&gpiog 3 GPIO_ACTIVE_HIGH>;
bt-dev-wake-gpios = <&gpioh 7 GPIO_ACTIVE_HIGH>;
fw-download-speed = <115200>;
};
};
};

Expand Down
4 changes: 0 additions & 4 deletions boards/espressif/esp32_devkitc_wroom/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 40960 if BT
default 4096

choice BT_HCI_BUS_TYPE
default BT_ESP32 if BT
endchoice

endif # BOARD_ESP32_DEVKITC_WROOM_ESP32_PROCPU

if BOARD_ESP32_DEVKITC_WROOM_ESP32_APPCPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};
};

Expand Down Expand Up @@ -165,3 +166,7 @@
};
};
};

&esp32_bt_hci {
status = "okay";
};
4 changes: 0 additions & 4 deletions boards/espressif/esp32_devkitc_wrover/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 40960 if BT
default 4096

choice BT_HCI_BUS_TYPE
default BT_ESP32 if BT
endchoice

endif # BOARD_ESP32_DEVKITC_WROVER_ESP32_PROCPU

if BOARD_ESP32_DEVKITC_WROVER_ESP32_APPCPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};
};

Expand Down Expand Up @@ -161,3 +162,7 @@
};
};
};

&esp32_bt_hci {
status = "okay";
};
4 changes: 0 additions & 4 deletions boards/espressif/esp32_ethernet_kit/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 40960 if BT
default 4096

choice BT_HCI_BUS_TYPE
default BT_ESP32 if BT
endchoice

endif # BOARD_ESP32_ETHERNET_KIT_ESP32_PROCPU

if BOARD_ESP32_ETHERNET_KIT_ESP32_APPCPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};
};

Expand Down Expand Up @@ -122,3 +123,7 @@
&eth {
phy-handle = <&phy>;
};

&esp32_bt_hci {
status = "okay";
};
4 changes: 0 additions & 4 deletions boards/espressif/esp32c3_devkitm/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 51200 if WIFI
default 40960 if BT
default 4096

choice BT_HCI_BUS_TYPE
default BT_ESP32 if BT
endchoice
5 changes: 5 additions & 0 deletions boards/espressif/esp32c3_devkitm/esp32c3_devkitm.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};

aliases {
Expand Down Expand Up @@ -130,3 +131,7 @@
};
};
};

&esp32_bt_hci {
status = "okay";
};
4 changes: 0 additions & 4 deletions boards/espressif/esp32s3_devkitc/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 40960 if BT
default 4096

choice BT_HCI_BUS_TYPE
default BT_ESP32 if BT
endchoice

endif # BOARD_ESP32S3_DEVKITC_ESP32S3_PROCPU

if BOARD_ESP32S3_DEVKITC_ESP32S3_APPCPU
Expand Down
5 changes: 5 additions & 0 deletions boards/espressif/esp32s3_devkitc/esp32s3_devkitc_procpu.dts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};

aliases {
Expand Down Expand Up @@ -168,3 +169,7 @@
};
};
};

&esp32_bt_hci {
status = "okay";
};
4 changes: 0 additions & 4 deletions boards/espressif/esp32s3_devkitm/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 40960 if BT
default 4096

choice BT_HCI_BUS_TYPE
default BT_ESP32 if BT
endchoice

endif # BOARD_ESP32S3_DEVKITM_ESP32S3_PROCPU

if BOARD_ESP32S3_DEVKITM_ESP32S3_APPCPU
Expand Down
5 changes: 5 additions & 0 deletions boards/espressif/esp32s3_devkitm/esp32s3_devkitm_procpu.dts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};

aliases {
Expand Down Expand Up @@ -172,3 +173,7 @@
};
};
};

&esp32_bt_hci {
status = "okay";
};
4 changes: 0 additions & 4 deletions boards/espressif/esp_wrover_kit/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 40960 if BT
default 4096

choice BT_HCI_BUS_TYPE
default BT_ESP32 if BT
endchoice

config DISK_DRIVER_SDMMC
default y

Expand Down
5 changes: 5 additions & 0 deletions boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.dts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
zephyr,code-partition = &slot0_partition;
zephyr,display = &ili9341;
zephyr,sdhc = &sdhc1;
zephyr,bt-hci = &esp32_bt_hci;
};

leds {
Expand Down Expand Up @@ -243,3 +244,7 @@
};
};
};

&esp32_bt_hci {
status = "okay";
};
5 changes: 2 additions & 3 deletions boards/ezurio/bl5340_dvk/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ config FLASH_LOAD_SIZE

endif # BOARD_BL5340_DVK_NRF5340_CPUAPP_NS

choice BT_HCI_BUS_TYPE
default BT_HCI_IPC if BT
endchoice
config BT_HCI_IPC
default y if BT

config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,display = &ili9340;
zephyr,bt-hci-ipc = &ipc0;
zephyr,bt-hci = &bt_hci_ipc0;
};

/* Main LEDs and buttons are on an I2C TCA9538 GPIO port expander */
Expand Down
4 changes: 0 additions & 4 deletions boards/hardkernel/odroid_go/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 40960 if BT
default 4096

choice BT_HCI_BUS_TYPE
default BT_ESP32 if BT
endchoice

endif # BOARD_ODROID_GO_ESP32_PROCPU

if BOARD_ODROID_GO_ESP32_APPCPU
Expand Down
5 changes: 5 additions & 0 deletions boards/hardkernel/odroid_go/odroid_go_procpu.dts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,display = &ili9341;
zephyr,bt-hci = &esp32_bt_hci;
};

leds {
Expand Down Expand Up @@ -206,3 +207,7 @@
};
};
};

&esp32_bt_hci {
status = "okay";
};
4 changes: 0 additions & 4 deletions boards/heltec/heltec_wifi_lora32_v2/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 40960 if BT
default 4096

choice BT_HCI_BUS_TYPE
default BT_ESP32 if BT
endchoice

endif # BOARD_HELTEC_WIFI_LORA32_V2_ESP32_PROCPU

if BOARD_HELTEC_WIFI_LORA32_V2_ESP32_APPCPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};
};

Expand Down Expand Up @@ -149,5 +150,9 @@
};
};

&esp32_bt_hci {
status = "okay";
};

/* Required by the ssd1306_128x64 shield which enables the OLED display */
arduino_i2c: &i2c0 {};
4 changes: 0 additions & 4 deletions boards/heltec/heltec_wireless_stick_lite_v3/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
default 40960 if BT
default 4096

choice BT_HCI_BUS_TYPE
default BT_ESP32 if BT
endchoice

endif # BOARD_HELTEC_WIRELESS_STICK_LITE_V3_ESP32S3_PROCPU

if BOARD_HELTEC_WIRELESS_STICK_LITE_V3_ESP32S3_APPCPU
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
zephyr,bt-hci = &esp32_bt_hci;
};
};

Expand Down Expand Up @@ -205,3 +206,7 @@
};
};
};

&esp32_bt_hci {
status = "okay";
};
Loading
Loading