From 393ecf4426c7b9dfce8ff4007ae14aff055f416d Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 21 Oct 2024 17:07:13 +0300 Subject: [PATCH] drivers: bluetooth: Rename Silabs HCI driver Rename the Silabs HCI driver to hci_silabs_efr32.c to better indicate what hardware it supports. Also rename the associated devicetree binding and Kconfig options to be consistent with the new driver name. Signed-off-by: Johan Hedberg --- MAINTAINERS.yml | 2 +- drivers/bluetooth/hci/CMakeLists.txt | 4 ++-- drivers/bluetooth/hci/Kconfig | 8 ++++---- drivers/bluetooth/hci/{slz_hci.c => hci_silabs_efr32.c} | 6 +++--- dts/arm/silabs/efr32bg2x.dtsi | 2 +- dts/arm/silabs/efr32mg.dtsi | 2 +- dts/arm/silabs/efr32mg24.dtsi | 2 +- dts/arm/silabs/efr32xg13p.dtsi | 2 +- .../{silabs,bt-hci.yaml => silabs,bt-hci-efr32.yaml} | 4 ++-- modules/hal_silabs/simplicity_sdk/CMakeLists.txt | 4 ++-- 10 files changed, 18 insertions(+), 18 deletions(-) rename drivers/bluetooth/hci/{slz_hci.c => hci_silabs_efr32.c} (97%) rename dts/bindings/bluetooth/{silabs,bt-hci.yaml => silabs,bt-hci-efr32.yaml} (76%) diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index f22c80a45df..e9c2ff76f34 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -3532,7 +3532,7 @@ Silabs Platforms: - dts/arm/silabs/ - dts/bindings/*/silabs* - drivers/*/*gecko* - - drivers/bluetooth/hci/slz_hci* + - drivers/bluetooth/hci/hci_silabs_* - drivers/*/*silabs* labels: - "platform: Silabs" diff --git a/drivers/bluetooth/hci/CMakeLists.txt b/drivers/bluetooth/hci/CMakeLists.txt index 9ed95462671..91daa9d9cb7 100644 --- a/drivers/bluetooth/hci/CMakeLists.txt +++ b/drivers/bluetooth/hci/CMakeLists.txt @@ -36,8 +36,8 @@ if(CONFIG_DT_HAS_ST_HCI_STM32WBA_ENABLED) zephyr_blobs_verify(MODULE hal_stm32 REQUIRED) endif() zephyr_library_sources_ifdef(CONFIG_BT_USERCHAN userchan.c) -zephyr_library_sources_ifdef(CONFIG_BT_SILABS_HCI slz_hci.c) -if(CONFIG_DT_HAS_SILABS_BT_HCI_ENABLED) +zephyr_library_sources_ifdef(CONFIG_BT_SILABS_EFR32 hci_silabs_efr32.c) +if(CONFIG_DT_HAS_SILABS_BT_HCI_EFR32_ENABLED) zephyr_blobs_verify(MODULE hal_silabs REQUIRED) endif() zephyr_library_sources_ifdef(CONFIG_BT_PSOC6_BLESS hci_ifx_psoc6_bless.c) diff --git a/drivers/bluetooth/hci/Kconfig b/drivers/bluetooth/hci/Kconfig index 2a0852ca4d7..32ad3b72584 100644 --- a/drivers/bluetooth/hci/Kconfig +++ b/drivers/bluetooth/hci/Kconfig @@ -77,10 +77,10 @@ config BT_STM32WBA help ST STM32WBA HCI Bluetooth interface -config BT_SILABS_HCI +config BT_SILABS_EFR32 bool default y - depends on DT_HAS_SILABS_BT_HCI_ENABLED + depends on DT_HAS_SILABS_BT_HCI_EFR32_ENABLED depends on ZEPHYR_HAL_SILABS_MODULE_BLOBS depends on !PM || SOC_GECKO_PM_BACKEND_PMGR select SOC_GECKO_USE_RAIL @@ -260,9 +260,9 @@ config BT_DRV_RX_STACK_SIZE help Stack size for the HCI driver's RX thread. -config BT_SILABS_HCI_BUFFER_MEMORY +config BT_SILABS_EFR32_BUFFER_MEMORY int "Silicon Labs Bluetooth Library memory buffer size" - depends on BT_SILABS_HCI + depends on BT_SILABS_EFR32 default 6144 help Select the size of allocated memory buffer for the Silicon Labs diff --git a/drivers/bluetooth/hci/slz_hci.c b/drivers/bluetooth/hci/hci_silabs_efr32.c similarity index 97% rename from drivers/bluetooth/hci/slz_hci.c rename to drivers/bluetooth/hci/hci_silabs_efr32.c index 1c86e71bd01..e90552c2521 100644 --- a/drivers/bluetooth/hci/slz_hci.c +++ b/drivers/bluetooth/hci/hci_silabs_efr32.c @@ -13,9 +13,9 @@ #define LOG_LEVEL CONFIG_BT_HCI_DRIVER_LOG_LEVEL #include -LOG_MODULE_REGISTER(bt_hci_driver_slz); +LOG_MODULE_REGISTER(bt_hci_driver_efr32); -#define DT_DRV_COMPAT silabs_bt_hci +#define DT_DRV_COMPAT silabs_bt_hci_efr32 struct hci_data { bt_hci_recv_t recv; @@ -24,7 +24,7 @@ struct hci_data { #define SL_BT_CONFIG_ACCEPT_LIST_SIZE 1 #define SL_BT_CONFIG_MAX_CONNECTIONS 1 #define SL_BT_CONFIG_USER_ADVERTISERS 1 -#define SL_BT_CONTROLLER_BUFFER_MEMORY CONFIG_BT_SILABS_HCI_BUFFER_MEMORY +#define SL_BT_CONTROLLER_BUFFER_MEMORY CONFIG_BT_SILABS_EFR32_BUFFER_MEMORY #define SL_BT_CONTROLLER_LE_BUFFER_SIZE_MAX CONFIG_BT_BUF_ACL_TX_COUNT #define SL_BT_CONTROLLER_COMPLETED_PACKETS_THRESHOLD 1 #define SL_BT_CONTROLLER_COMPLETED_PACKETS_EVENTS_TIMEOUT 3 diff --git a/dts/arm/silabs/efr32bg2x.dtsi b/dts/arm/silabs/efr32bg2x.dtsi index 24bb3939d1c..6a3fb5e36fd 100644 --- a/dts/arm/silabs/efr32bg2x.dtsi +++ b/dts/arm/silabs/efr32bg2x.dtsi @@ -362,7 +362,7 @@ }; bt_hci_silabs: bt_hci_silabs { - compatible = "silabs,bt-hci"; + compatible = "silabs,bt-hci-efr32"; status = "disabled"; }; }; diff --git a/dts/arm/silabs/efr32mg.dtsi b/dts/arm/silabs/efr32mg.dtsi index a7926f6710f..cdfecf72398 100644 --- a/dts/arm/silabs/efr32mg.dtsi +++ b/dts/arm/silabs/efr32mg.dtsi @@ -235,7 +235,7 @@ }; bt_hci_silabs: bt_hci_silabs { - compatible = "silabs,bt-hci"; + compatible = "silabs,bt-hci-efr32"; status = "disabled"; }; diff --git a/dts/arm/silabs/efr32mg24.dtsi b/dts/arm/silabs/efr32mg24.dtsi index 5af760a8560..2eeb2eb8c86 100644 --- a/dts/arm/silabs/efr32mg24.dtsi +++ b/dts/arm/silabs/efr32mg24.dtsi @@ -425,7 +425,7 @@ bt_hci_silabs: bt_hci_silabs { - compatible = "silabs,bt-hci"; + compatible = "silabs,bt-hci-efr32"; status = "disabled"; }; }; diff --git a/dts/arm/silabs/efr32xg13p.dtsi b/dts/arm/silabs/efr32xg13p.dtsi index 3444eb6e391..22c325e093b 100644 --- a/dts/arm/silabs/efr32xg13p.dtsi +++ b/dts/arm/silabs/efr32xg13p.dtsi @@ -182,7 +182,7 @@ }; bt_hci_silabs: bt_hci_silabs { - compatible = "silabs,bt-hci"; + compatible = "silabs,bt-hci-efr32"; status = "disabled"; }; diff --git a/dts/bindings/bluetooth/silabs,bt-hci.yaml b/dts/bindings/bluetooth/silabs,bt-hci-efr32.yaml similarity index 76% rename from dts/bindings/bluetooth/silabs,bt-hci.yaml rename to dts/bindings/bluetooth/silabs,bt-hci-efr32.yaml index d14f2d54968..407394e29a3 100644 --- a/dts/bindings/bluetooth/silabs,bt-hci.yaml +++ b/dts/bindings/bluetooth/silabs,bt-hci-efr32.yaml @@ -1,12 +1,12 @@ description: Bluetooth HCI on Silabs boards -compatible: "silabs,bt-hci" +compatible: "silabs,bt-hci-efr32" include: bt-hci.yaml properties: bt-hci-name: - default: "sl:bt" + default: "efr32" bt-hci-bus: default: "virtual" bt-hci-quirks: diff --git a/modules/hal_silabs/simplicity_sdk/CMakeLists.txt b/modules/hal_silabs/simplicity_sdk/CMakeLists.txt index 100156f1070..e270d75ad17 100644 --- a/modules/hal_silabs/simplicity_sdk/CMakeLists.txt +++ b/modules/hal_silabs/simplicity_sdk/CMakeLists.txt @@ -47,12 +47,12 @@ if(CONFIG_SOC_GECKO_HAS_RADIO) ) # sl_protocol_crypto - zephyr_library_sources_ifdef(CONFIG_BT_SILABS_HCI + zephyr_library_sources_ifdef(CONFIG_BT_SILABS_EFR32 ${SECURITY_DIR}/sl_component/sl_protocol_crypto/src/sli_radioaes_management.c ${SECURITY_DIR}/sl_component/sl_protocol_crypto/src/sli_protocol_crypto_radioaes.c ) - if(CONFIG_BT_SILABS_HCI) + if(CONFIG_BT_SILABS_EFR32) # prebuilt libs add_prebuilt_library(liblinklayer protocol/bluetooth/bgstack/ll/lib/libbluetooth_controller_efr32xg${SILABS_DEVICE_FAMILY_NUMBER}_gcc_release.a) add_prebuilt_library(libbgcommon protocol/bluetooth/bgcommon/lib/build/gcc/cortex-m33/bgcommon/release/libbgcommon.a)