From dbea999347128c67a3e06eb34ee67f49be923658 Mon Sep 17 00:00:00 2001 From: Antoine Bout Date: Fri, 23 Jun 2023 11:52:40 +0200 Subject: [PATCH] soc/arm/silabs: Kconfig: add SOC_GECKO_USE_RAIL kconfig option Currently on zephyr, RAIL is used only for bluetooth. RAIL library is needed to use efr32 radio regardless of the protocol used. We add SOC_GECKO_USE_RAIL kconfig option to indicate if we use radio. FPU is needed when using RAIL, we configure it if SOC_GECKO_USE_RAIL is set. Signed-off-by: Antoine Bout --- boards/arm/efr32_radio/Kconfig.defconfig | 7 +++++++ boards/arm/efr32_thunderboard/Kconfig.defconfig | 7 +++++++ boards/arm/efr32xg24_dk2601b/Kconfig.defconfig | 7 +++++++ drivers/bluetooth/hci/Kconfig | 1 + soc/arm/silabs_exx32/Kconfig | 7 +++++++ 5 files changed, 29 insertions(+) diff --git a/boards/arm/efr32_radio/Kconfig.defconfig b/boards/arm/efr32_radio/Kconfig.defconfig index 830a4c90f5f..cf4be7c9dde 100644 --- a/boards/arm/efr32_radio/Kconfig.defconfig +++ b/boards/arm/efr32_radio/Kconfig.defconfig @@ -29,6 +29,13 @@ config LOG_BACKEND_SWO_FREQ_HZ default 875000 depends on LOG_BACKEND_SWO +if SOC_GECKO_USE_RAIL + +config FPU + default y + +endif # SOC_GECKO_USE_RAIL + if BT config FPU diff --git a/boards/arm/efr32_thunderboard/Kconfig.defconfig b/boards/arm/efr32_thunderboard/Kconfig.defconfig index 35059d030c8..d73779fd61a 100644 --- a/boards/arm/efr32_thunderboard/Kconfig.defconfig +++ b/boards/arm/efr32_thunderboard/Kconfig.defconfig @@ -23,6 +23,13 @@ config CMU_HFXO_FREQ config CMU_LFXO_FREQ default 32768 +if SOC_GECKO_USE_RAIL + +config FPU + default y + +endif # SOC_GECKO_USE_RAIL + if BT config FPU diff --git a/boards/arm/efr32xg24_dk2601b/Kconfig.defconfig b/boards/arm/efr32xg24_dk2601b/Kconfig.defconfig index 14405984017..0f0cf9aa163 100644 --- a/boards/arm/efr32xg24_dk2601b/Kconfig.defconfig +++ b/boards/arm/efr32xg24_dk2601b/Kconfig.defconfig @@ -18,6 +18,13 @@ config FLASH_BASE_ADDRESS hex default 0x08000000 +if SOC_GECKO_USE_RAIL + +config FPU + default y + +endif # SOC_GECKO_USE_RAIL + if BT config FPU diff --git a/drivers/bluetooth/hci/Kconfig b/drivers/bluetooth/hci/Kconfig index d7ac4f59115..8a50caa92f0 100644 --- a/drivers/bluetooth/hci/Kconfig +++ b/drivers/bluetooth/hci/Kconfig @@ -60,6 +60,7 @@ config BT_SILABS_HCI bool "Silicon Labs Bluetooth interface" depends on SOC_SERIES_EFR32BG22 || SOC_SERIES_EFR32MG24 || SOC_SERIES_EFR32BG27 depends on !PM || SOC_GECKO_PM_BACKEND_PMGR + select SOC_GECKO_USE_RAIL select ENTROPY_GENERATOR select MBEDTLS select MBEDTLS_PSA_CRYPTO_C diff --git a/soc/arm/silabs_exx32/Kconfig b/soc/arm/silabs_exx32/Kconfig index dbfd42526d1..d2faeca4bf6 100644 --- a/soc/arm/silabs_exx32/Kconfig +++ b/soc/arm/silabs_exx32/Kconfig @@ -319,4 +319,11 @@ config SOC_GECKO_HAS_HFRCO_FREQRANGE If disabled, indicates that configuration of HFRCO frequency for corresponding SOC is not supported via this field. This is the case for e.g. efm32hg, efm32wg series. +config SOC_GECKO_USE_RAIL + bool "Use RAIL (Radio Abstraction Interface Layer)" + help + RAIL (Radio Abstraction Interface Layer) is a library needed to use the EFR radio + hardware. This option enable the proper set of features to allow to properly compile + with the RAIL blob. + endif # SOC_FAMILY_EXX32