Skip to content

Commit

Permalink
driver/bluetooth: Added initial version of hci cyw208xx driver
Browse files Browse the repository at this point in the history
Added initial version of hci cyw208xx driver

(cherry picked from commit 17889d2)

Original-Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
GitOrigin-RevId: 17889d2
Change-Id: I5a2e4108a6de9351ad67f50ba17fdd64bf3a5e2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5629513
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
  • Loading branch information
npal-cy authored and Chromeos LUCI committed Jun 13, 2024
1 parent 3e768fb commit 8774cab
Show file tree
Hide file tree
Showing 15 changed files with 643 additions and 12 deletions.
13 changes: 13 additions & 0 deletions boards/infineon/cyw920829m2evk_02/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# The Infineon AIROC™ CYW20829 Bluetooth® LE evaluation kit (CYW92089M2EVK-02)

# Copyright (c) 2024 Cypress Semiconductor Corporation.
# SPDX-License-Identifier: Apache-2.0

choice AIROC_PART
default CYW20829 if BT
endchoice

# Heap Pool Size
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 10096
5 changes: 5 additions & 0 deletions boards/infineon/cyw920829m2evk_02/cyw920829m2evk_02.dts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
zephyr,flash = &app_region;
zephyr,console = &uart2;
zephyr,shell-uart = &uart2;
zephyr,bt-hci = &bluetooth;
};
};

Expand Down Expand Up @@ -79,6 +80,10 @@ uart2: &scb2 {
status = "okay";
};

&bluetooth {
status = "okay";
};

/ {
flash0: flash@60000000 {
compatible = "soc-nv-flash";
Expand Down
11 changes: 11 additions & 0 deletions boards/infineon/cyw920829m2evk_02/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ The AIROC™ CYW20829 Bluetooth® MCU SoC is configured to use the internal IMO
the system clock. Other sources for the system clock are provided in the SOC, depending on your
system requirements.

Fetch Binary Blobs
******************

cyw920829m2evk_02 board requires fetch binary files (e.g Bluetooth controller firmware).

To fetch Binary Blobs:

.. code-block:: console
west blobs fetch hal_infineon
Build blinking led sample
*************************

Expand Down
6 changes: 4 additions & 2 deletions drivers/bluetooth/hci/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if(CONFIG_BT_HCI_IPC)
endif()
endif()

zephyr_library_sources_ifdef(CONFIG_BT_AIROC cyw43xxx.c)
zephyr_library_sources_ifdef(CONFIG_BT_ESP32 hci_esp32.c)
zephyr_library_sources_ifdef(CONFIG_BT_H4 h4.c)
zephyr_library_sources_ifdef(CONFIG_BT_H5 h5.c)
Expand All @@ -25,11 +24,14 @@ if(CONFIG_BT_SPI)
zephyr_library_sources(spi.c)
endif()
endif()
zephyr_library_sources_ifdef(CONFIG_BT_CYW43XX h4_ifx_cyw43xxx.c)
zephyr_library_sources_ifdef(CONFIG_BT_CYW208XX hci_ifx_cyw208xx.c)

zephyr_library_sources_ifdef(CONFIG_BT_STM32_IPM ipm_stm32wb.c)
zephyr_library_sources_ifdef(CONFIG_BT_STM32WBA hci_stm32wba.c)
zephyr_library_sources_ifdef(CONFIG_BT_USERCHAN userchan.c)
zephyr_library_sources_ifdef(CONFIG_BT_SILABS_HCI slz_hci.c)
zephyr_library_sources_ifdef(CONFIG_BT_PSOC6_BLESS hci_psoc6_bless.c)
zephyr_library_sources_ifdef(CONFIG_BT_PSOC6_BLESS hci_ifx_psoc6_bless.c)
zephyr_library_sources_ifdef(CONFIG_SOC_NRF5340_CPUAPP nrf53_support.c)
zephyr_library_sources_ifdef(CONFIG_BT_AMBIQ_HCI hci_ambiq.c apollox_blue.c)
zephyr_library_sources_ifdef(CONFIG_BT_DA1469X hci_da1469x.c)
Expand Down
18 changes: 14 additions & 4 deletions drivers/bluetooth/hci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ config BT_NXP
help
NXP HCI bluetooth interface

config BT_CYW208XX
bool "CYW208XX BLE driver"
default y
depends on DT_HAS_INFINEON_CYW208XX_HCI_ENABLED
help
Infineon CYW208XX HCI bluetooth interface

config BT_AMBIQ_HCI
bool "AMBIQ BT HCI driver"
default y
Expand All @@ -145,6 +152,7 @@ config BT_AMBIQ_HCI
Supports Ambiq Bluetooth SoC using SPI as the communication protocol.
HCI packets are sent and received as single Byte transfers.


if BT_SPI

config BT_SPI_INIT_PRIORITY
Expand Down Expand Up @@ -175,11 +183,13 @@ config BT_STM32_IPM_RX_STACK_SIZE
menuconfig BT_AIROC
bool "AIROC BT connectivity"
default y
select GPIO if BT_H4
select UART if BT_H4
select UART_USE_RUNTIME_CONFIGURE if BT_H4
select BT_HCI_SETUP
select UART_USE_RUNTIME_CONFIGURE
depends on GPIO
depends on DT_HAS_INFINEON_CYW43XXX_BT_HCI_ENABLED
depends on BT_H4
select USE_INFINEON_ABSTRACTION_RTOS if BT_CYW208XX
select EVENTS if BT_CYW208XX
depends on DT_HAS_INFINEON_CYW43XXX_BT_HCI_ENABLED || DT_HAS_INFINEON_CYW208XX_HCI_ENABLED
help
Infineon's AIROC™ Wi-Fi & combos portfolio integrates
IEEE 802.11a/b/g/n/ac/ax Wi-Fi and Bluetooth® 5.2 in a single-chip
Expand Down
72 changes: 72 additions & 0 deletions drivers/bluetooth/hci/Kconfig.infineon
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,61 @@

if BT_AIROC

config BT_CYW43XX
bool
default y if BT_AIROC && BT_H4

choice AIROC_PART
prompt "Select AIROC part"

config CYW4343W
bool "CYW4343W"
depends on BT_H4
help
Enable Infineon CYW4343W BLE connectivity,
More information about CYW4343W device you can find on
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-wi-fi-plus-bluetooth-combos/cyw4343w/

config CYW4373
bool "CYW4373"
depends on BT_H4
help
Enable Infineon CYW4373 BLE connectivity,
More information about CYW4373 device you can find on
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-wi-fi-plus-bluetooth-combos/cyw4373/

config CYW43012
bool "CYW43012"
depends on BT_H4
help
Enable Infineon CYW43012 BLE connectivity,
More information about CYW43012 device you can find on
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-wi-fi-plus-bluetooth-combos/cyw43012/

config CYW43438
bool "CYW43438"
depends on BT_H4
help
Enable Infineon CYW43438 BLE connectivity,
More information about CYW43438 device you can find on
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-wi-fi-plus-bluetooth-combos/cyw43438/

config CYW43439
bool "CYW43439"
depends on BT_H4
help
Enable Infineon CYW43439 BLE connectivity,
More information about CYW43439 device you can find on
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-wi-fi-plus-bluetooth-combos/cyw43439/

config CYW20829
bool "CYW20829"
depends on BT_CYW208XX
help
Enable Infineon CYW20829 BLE connectivity,
More information about CYW20829 device you can find on
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-bluetooth-le-bluetooth-multiprotocol/airoc-bluetooth-le/cyw20829/

config BT_AIROC_CUSTOM
bool "Custom AIROC device/module"
help
Expand Down Expand Up @@ -117,6 +134,61 @@ config CYW43439_MURATA_1YN

endchoice

if CYW20829

config CYW20829_BT_FW_TX10DBM_POWER
bool "CYW20829_BT_FW_TX10DBM_POWER"
help
Enable 10dBm TX Power variant of CYW20829 FW patch.

choice CYW20829_BT_FW
prompt "Select variant of default CYW20829 BT FW"
default CYW20829_BT_FW_ISOC_TX10 if BT_ISO && CYW20829_BT_FW_TX10DBM_POWER
default CYW20829_BT_FW_ISOC_TX0 if BT_ISO && !CYW20829_BT_FW_TX10DBM_POWER
default CYW20829_BT_FW_PAWR_TX10 if BT_PER_ADV_RSP && CYW20829_BT_FW_TX10DBM_POWER
default CYW20829_BT_FW_PAWR_TX0 if BT_PER_ADV_RSP && !CYW20829_BT_FW_TX10DBM_POWER
default CYW20829_BT_FW_TX10 if CYW20829_BT_FW_TX10DBM_POWER
default CYW20829_BT_FW_TX0

config CYW20829_BT_FW_TX0
bool "CYW20829_BT_FW_TX0"
help
Enable CYW20829 FW patch for 0dBm TX Power.
This configuration should be used with non-PAWR and non-ISOC applications.

config CYW20829_BT_FW_TX10
bool "CYW20829_BT_FW_TX10"
help
Enable CYW20829 FW patch for 10dBm TX Power.
This configuration should be used with non-PAwR and non-ISOC applications.

config CYW20829_BT_FW_PAWR_TX0
bool "CYW20829_BT_FW_PAWR_TX0"
help
Enable CYW20829 FW patch with PAwR support for 0dBm TX Power.
This configuration should be used with PAwR applications.

config CYW20829_BT_FW_PAWR_TX10
bool "CYW20829_BT_FW_PAWR_TX10"
help
Enable CYW20829 FW patch for 10dBm TX Power.
This configuration should be used with PAwR applications.

config CYW20829_BT_FW_ISOC_TX0
bool "CYW20829_BT_FW_ISOC_TX0"
help
Enable CYW20829 FW patch for 0dBm TX Power.
This configuration should be used with ISOC applications.

config CYW20829_BT_FW_ISOC_TX10
bool "CYW20829_BT_FW_ISOC_TX10"
help
Enable CYW20829 FW patch for 10dBm TX Power.
This configuration should be used with ISOC applications.

endchoice
endif # CYW20829

config AIROC_CUSTOM_FIRMWARE_HCD_BLOB
depends on BT_AIROC_CUSTOM
string "Path to user BT firmware HCD file"
Expand Down
File renamed without changes.
Loading

0 comments on commit 8774cab

Please sign in to comment.