diff --git a/boards/ezurio/bl654_dvk/bl654_dvk_nrf52840_pa.dts b/boards/ezurio/bl654_dvk/bl654_dvk_nrf52840_pa.dts index ee5d7260fa4e0..34f8e2d3edc01 100644 --- a/boards/ezurio/bl654_dvk/bl654_dvk_nrf52840_pa.dts +++ b/boards/ezurio/bl654_dvk/bl654_dvk_nrf52840_pa.dts @@ -11,7 +11,7 @@ /* Information from Nordic SDK-Based Application Development and SKY66112 datasheet */ nrf_radio_fem: fem { status = "okay"; - compatible = "generic-fem-two-ctrl-pins"; + compatible = "radio-fem-two-ctrl-pins"; ctx-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; crx-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; ctx-settle-time-us = <23>; diff --git a/boards/panasonic/pan1783/pan1783a_pa_evb_nrf5340_cpunet.dts b/boards/panasonic/pan1783/pan1783a_pa_evb_nrf5340_cpunet.dts index 8e7d4c3bdd3bd..6975bdb6cc0b5 100644 --- a/boards/panasonic/pan1783/pan1783a_pa_evb_nrf5340_cpunet.dts +++ b/boards/panasonic/pan1783/pan1783a_pa_evb_nrf5340_cpunet.dts @@ -19,9 +19,11 @@ }; nrf_radio_fem: fem_node { - compatible = "skyworks,sky66407-11", "generic-fem-two-ctrl-pins"; + compatible = "skyworks,sky66407-11", "radio-fem-two-ctrl-pins"; ctx-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>; crx-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>; + ctx-settle-time-us = <5>; + crx-settle-time-us = <5>; }; }; diff --git a/boards/silabs/dev_kits/siwx917_dk2605a/siwx917_dk2605a.yaml b/boards/silabs/dev_kits/siwx917_dk2605a/siwx917_dk2605a.yaml index 52d7996a92308..e2109fb6bcf17 100644 --- a/boards/silabs/dev_kits/siwx917_dk2605a/siwx917_dk2605a.yaml +++ b/boards/silabs/dev_kits/siwx917_dk2605a/siwx917_dk2605a.yaml @@ -22,4 +22,5 @@ supported: - wifi - rtc - counter + - pwm vendor: silabs diff --git a/boards/silabs/dev_kits/xg24_dk2601b/board.cmake b/boards/silabs/dev_kits/xg24_dk2601b/board.cmake index 8ea96e1cc624d..a42e9fbc88bfa 100644 --- a/boards/silabs/dev_kits/xg24_dk2601b/board.cmake +++ b/boards/silabs/dev_kits/xg24_dk2601b/board.cmake @@ -3,3 +3,6 @@ board_runner_args(jlink "--device=EFR32MG24BxxxF1536" "--reset-after-load") include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) + +board_runner_args(silabs_commander "--device=${CONFIG_SOC}") +include(${ZEPHYR_BASE}/boards/common/silabs_commander.board.cmake) diff --git a/boards/silabs/radio_boards/siwx917_rb4342a/siwx917_rb4342a.yaml b/boards/silabs/radio_boards/siwx917_rb4342a/siwx917_rb4342a.yaml index 88ed291642413..17ce1ccb26207 100644 --- a/boards/silabs/radio_boards/siwx917_rb4342a/siwx917_rb4342a.yaml +++ b/boards/silabs/radio_boards/siwx917_rb4342a/siwx917_rb4342a.yaml @@ -20,6 +20,7 @@ supported: - pwm - uart - watchdog + - rtc - counter - wifi vendor: silabs diff --git a/boards/u-blox/ubx_bmd345eval/ubx_bmd345eval_nrf52840.dts b/boards/u-blox/ubx_bmd345eval/ubx_bmd345eval_nrf52840.dts index 13aa50c32a4b0..e96ff606d894b 100644 --- a/boards/u-blox/ubx_bmd345eval/ubx_bmd345eval_nrf52840.dts +++ b/boards/u-blox/ubx_bmd345eval/ubx_bmd345eval_nrf52840.dts @@ -127,7 +127,7 @@ }; nrf_radio_fem: fem { - compatible = "generic-fem-two-ctrl-pins"; + compatible = "radio-fem-two-ctrl-pins"; ctx-gpios = <&gpio1 5 0>; ctx-settle-time-us = <1>; crx-gpios = <&gpio1 6 0>; diff --git a/drivers/adc/Kconfig.silabs b/drivers/adc/Kconfig.silabs index a920a1fb2cce0..894d88d43663a 100644 --- a/drivers/adc/Kconfig.silabs +++ b/drivers/adc/Kconfig.silabs @@ -15,6 +15,7 @@ config ADC_SILABS_IADC bool "Silabs Incremental ADC driver" default y depends on DT_HAS_SILABS_IADC_ENABLED + depends on CLOCK_CONTROL select SILABS_SISDK_IADC select ADC_CONFIGURABLE_INPUTS help diff --git a/drivers/bluetooth/hci/Kconfig b/drivers/bluetooth/hci/Kconfig index f07d35f90d0c7..e0d137e485cca 100644 --- a/drivers/bluetooth/hci/Kconfig +++ b/drivers/bluetooth/hci/Kconfig @@ -151,48 +151,6 @@ config BT_STM32WB0 help ST STM32WB0 HCI Bluetooth interface -config BT_SILABS_EFR32 - bool "Silabs EFR32 HCI driver" - default y - depends on DT_HAS_SILABS_BT_HCI_EFR32_ENABLED - depends on ZEPHYR_HAL_SILABS_MODULE_BLOBS || BUILD_ONLY_NO_BLOBS - depends on SOC_GECKO_HAS_RADIO - select SOC_GECKO_USE_RAIL - select PSA_CRYPTO - select SILABS_SISDK_PROTOCOL_CRYPTO - select HAS_BT_CTLR - select BT_CTLR_PHY_UPDATE_SUPPORT - select BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT - select BT_CTLR_DATA_LEN_UPDATE_SUPPORT - select BT_CTLR_EXT_REJ_IND_SUPPORT - select BT_CTLR_CHAN_SEL_2_SUPPORT - select BT_CTLR_CONN_RSSI_SUPPORT - select BT_CTLR_ADV_EXT_SUPPORT - select BT_CTLR_PRIVACY_SUPPORT - select BT_CTLR_PHY_2M_SUPPORT - select BT_CTLR_SYNC_PERIODIC_SUPPORT - select BT_CTLR_SYNC_TRANSFER_RECEIVER_SUPPORT - select BT_CTLR_SYNC_TRANSFER_SENDER_SUPPORT - help - Use Silicon Labs binary Bluetooth library to connect to the - controller. - -source "drivers/bluetooth/hci/Kconfig.silabs" - -config BT_SILABS_SIWX91X - bool "Silabs SiWx91x Bluetooth interface" - default y - depends on DT_HAS_SILABS_SIWX91X_BT_HCI_ENABLED - select SILABS_SIWX91X_NWP - select ENTROPY_GENERATOR - select BT_HCI_SETUP - help - Use Silicon Labs Wiseconnect 3.x Bluetooth library to connect to the controller. - - # SiWx917 BLE controller currently does not support HCI Command: Host Number of Completed Packets - configdefault BT_HCI_ACL_FLOW_CONTROL - default n if BT_SILABS_SIWX91X - config BT_USERCHAN bool depends on BOARD_NATIVE_SIM @@ -310,6 +268,7 @@ source "drivers/bluetooth/hci/Kconfig.esp32" source "drivers/bluetooth/hci/Kconfig.infineon" source "drivers/bluetooth/hci/Kconfig.nxp" source "drivers/bluetooth/hci/Kconfig.stm32" +source "drivers/bluetooth/hci/Kconfig.silabs" config BT_DRIVER_QUIRK_NO_AUTO_DLE bool "Host auto-initiated Data Length Update quirk" diff --git a/drivers/bluetooth/hci/Kconfig.silabs b/drivers/bluetooth/hci/Kconfig.silabs index 29946e56fba3c..74188c1f1387d 100644 --- a/drivers/bluetooth/hci/Kconfig.silabs +++ b/drivers/bluetooth/hci/Kconfig.silabs @@ -1,6 +1,58 @@ # Copyright (c) 2025 Silicon Laboratories Inc. # # SPDX-License-Identifier: Apache-2.0 + +config BT_SILABS_SIWX91X + bool "Silabs SiWx91x Bluetooth interface" + default y + depends on DT_HAS_SILABS_SIWX91X_BT_HCI_ENABLED + select SILABS_SIWX91X_NWP + select ENTROPY_GENERATOR + select BT_HCI_SETUP + help + Use Silicon Labs Wiseconnect 3.x Bluetooth library to connect to the controller. + +# SiWx917 BLE controller currently does not support HCI Command: Host Number of Completed Packets +configdefault BT_HCI_ACL_FLOW_CONTROL + default n if BT_SILABS_SIWX91X + +config BT_SILABS_EFR32 + bool "Silabs EFR32 HCI driver" + default y + depends on DT_HAS_SILABS_BT_HCI_EFR32_ENABLED + depends on ZEPHYR_HAL_SILABS_MODULE_BLOBS || BUILD_ONLY_NO_BLOBS + depends on SOC_GECKO_HAS_RADIO + select SOC_GECKO_USE_RAIL + select PSA_CRYPTO + select SILABS_SISDK_PROTOCOL_CRYPTO + select HAS_BT_CTLR + # Features supported by all EFR32 devices + select BT_CTLR_PHY_UPDATE_SUPPORT + select BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT + select BT_CTLR_DATA_LEN_UPDATE_SUPPORT + select BT_CTLR_EXT_REJ_IND_SUPPORT + select BT_CTLR_CHAN_SEL_2_SUPPORT + select BT_CTLR_CONN_RSSI_SUPPORT + select BT_CTLR_ADV_EXT_SUPPORT + select BT_CTLR_PRIVACY_SUPPORT + select BT_CTLR_SYNC_PERIODIC_SUPPORT + select BT_CTLR_SYNC_TRANSFER_RECEIVER_SUPPORT + select BT_CTLR_SYNC_TRANSFER_SENDER_SUPPORT + # Features supported by some EFR32 devices + select BT_CTLR_PHY_2M_SUPPORT if HAS_HW_EFR32_RADIO_BLE_2M + select BT_CTLR_PHY_CODED_SUPPORT if HAS_HW_EFR32_RADIO_BLE_CODED + select BT_CTLR_CHANNEL_SOUNDING_SUPPORT if HAS_HW_EFR32_RADIO_CS + select BT_CTLR_DF_SUPPORT if HAS_HW_EFR32_RADIO_CTE_TX + select BT_CTLR_DF_CTE_TX_SUPPORT if HAS_HW_EFR32_RADIO_CTE_TX + select BT_CTLR_DF_CTE_RX_SUPPORT if HAS_HW_EFR32_RADIO_CTE_RX + select BT_CTLR_DF_CTE_RX_SAMPLE_1US_SUPPORT if HAS_HW_EFR32_RADIO_CTE_RX + select BT_CTLR_DF_ANT_SWITCH_1US_SUPPORT if HAS_HW_EFR32_RADIO_CTE_TX + select BT_CTLR_DF_ANT_SWITCH_2US_SUPPORT if HAS_HW_EFR32_RADIO_CTE_TX + select BT_SILABS_EFR32_HIGH_POWER if HAS_HW_EFR32_RADIO_TX_HIGH_POWER + help + Use Silicon Labs binary Bluetooth library to connect to the + controller. + menu "EFR32 Bluetooth Controller Configuration" depends on BT_SILABS_EFR32 @@ -60,11 +112,11 @@ config BT_SILABS_EFR32_MAX_QUEUED_ADV_REPORTS Additional advertising reports are dropped. config BT_SILABS_EFR32_HIGH_POWER - bool "High power transmission" + bool help - Normally the transmit power is limited to 10 dBm. Enable this option - to allow the controller to transmit at higher power levels. Note that - this feature is not available on all devices. + Normally the transmit power is limited to 10 dBm. This option + is automatically enabled on devices with high power PA support + and allows the controller to transmit at higher power levels. config BT_SILABS_EFR32_HIGH_POWER_AFH bool "Adaptive frequency hopping for high power transmitters" diff --git a/drivers/comparator/Kconfig.silabs_acmp b/drivers/comparator/Kconfig.silabs_acmp index 79f574b017471..38e89cd9bc56c 100644 --- a/drivers/comparator/Kconfig.silabs_acmp +++ b/drivers/comparator/Kconfig.silabs_acmp @@ -4,6 +4,7 @@ config COMPARATOR_SILABS_ACMP bool "Silabs ACMP comparator driver" default y depends on DT_HAS_SILABS_ACMP_ENABLED + depends on CLOCK_CONTROL select PINCTRL select SILABS_SISDK_ACMP help diff --git a/drivers/dac/Kconfig.silabs b/drivers/dac/Kconfig.silabs index 93a5d177a1f34..e1cc8a48eb0ef 100644 --- a/drivers/dac/Kconfig.silabs +++ b/drivers/dac/Kconfig.silabs @@ -5,6 +5,7 @@ config DAC_SILABS_VDAC bool "Silabs DAC driver for VDAC" default y depends on DT_HAS_SILABS_VDAC_ENABLED + depends on CLOCK_CONTROL select PINCTRL select SILABS_SISDK_VDAC help diff --git a/drivers/dma/dma_silabs_siwx91x.c b/drivers/dma/dma_silabs_siwx91x.c index 21b06bc598158..be8171f4d0c96 100644 --- a/drivers/dma/dma_silabs_siwx91x.c +++ b/drivers/dma/dma_silabs_siwx91x.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include "rsi_rom_udma.h" #include "rsi_rom_udma_wrapper.h" @@ -63,16 +63,6 @@ struct dma_siwx91x_data { */ }; -static void siwx91x_dma_pm_policy_state_lock_get(void) -{ - pm_policy_state_lock_get(PM_STATE_SUSPEND_TO_IDLE, PM_ALL_SUBSTATES); -} - -static void siwx91x_dma_pm_policy_state_lock_put(void) -{ - pm_policy_state_lock_put(PM_STATE_SUSPEND_TO_IDLE, PM_ALL_SUBSTATES); -} - static enum dma_xfer_dir siwx91x_transfer_direction(uint32_t dir) { if (dir == MEMORY_TO_MEMORY) { @@ -495,15 +485,14 @@ static int siwx91x_dma_start(const struct device *dev, uint32_t channel) return -EINVAL; } - /* Get the power management policy state lock */ if (!data->zephyr_channel_info[channel].channel_active) { - siwx91x_dma_pm_policy_state_lock_get(); + pm_device_runtime_get(dev); data->zephyr_channel_info[channel].channel_active = true; } if (RSI_UDMA_ChannelEnable(udma_handle, channel) != 0) { if (data->zephyr_channel_info[channel].channel_active) { - siwx91x_dma_pm_policy_state_lock_put(); + pm_device_runtime_put(dev); data->zephyr_channel_info[channel].channel_active = false; } return -EINVAL; @@ -534,7 +523,7 @@ static int siwx91x_dma_stop(const struct device *dev, uint32_t channel) } if (data->zephyr_channel_info[channel].channel_active) { - siwx91x_dma_pm_policy_state_lock_put(); + pm_device_runtime_put(dev); data->zephyr_channel_info[channel].channel_active = false; } @@ -680,16 +669,16 @@ static void siwx91x_dma_isr(const struct device *dev) } if (data->chan_info[channel].Cnt == data->chan_info[channel].Size) { + sys_write32(BIT(channel), (mem_addr_t)&cfg->reg->UDMA_DONE_STATUS_REG); + if (data->zephyr_channel_info[channel].channel_active) { + pm_device_runtime_put_async(dev, K_NO_WAIT); + data->zephyr_channel_info[channel].channel_active = false; + } if (data->zephyr_channel_info[channel].dma_callback) { /* Transfer complete, call user callback */ data->zephyr_channel_info[channel].dma_callback( dev, data->zephyr_channel_info[channel].cb_data, channel, 0); } - sys_write32(BIT(channel), (mem_addr_t)&cfg->reg->UDMA_DONE_STATUS_REG); - if (data->zephyr_channel_info[channel].channel_active) { - siwx91x_dma_pm_policy_state_lock_put(); - data->zephyr_channel_info[channel].channel_active = false; - } } else { /* Call UDMA ROM IRQ handler. */ ROMAPI_UDMA_WRAPPER_API->uDMAx_IRQHandler(&udma_resources, udma_resources.desc, diff --git a/drivers/dma/dma_silabs_siwx91x_gpdma.c b/drivers/dma/dma_silabs_siwx91x_gpdma.c index 629377698fb70..b678519864748 100644 --- a/drivers/dma/dma_silabs_siwx91x_gpdma.c +++ b/drivers/dma/dma_silabs_siwx91x_gpdma.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include "rsi_gpdma.h" #include "rsi_rom_gpdma.h" @@ -43,6 +43,7 @@ struct siwx91x_gpdma_channel_info { void *cb_data; RSI_GPDMA_DESC_T *desc; enum gpdma_xfer_dir xfer_direction; + bool channel_active; }; struct siwx91x_gpdma_config { @@ -62,16 +63,6 @@ struct siwx19x_gpdma_data { uint8_t reload_compatible; }; -static void siwx91x_gpdma_pm_policy_state_lock_get(void) -{ - pm_policy_state_lock_get(PM_STATE_SUSPEND_TO_IDLE, PM_ALL_SUBSTATES); -} - -static void siwx91x_gpdma_pm_policy_state_lock_put(void) -{ - pm_policy_state_lock_put(PM_STATE_SUSPEND_TO_IDLE, PM_ALL_SUBSTATES); -} - static bool siwx91x_gpdma_is_priority_valid(uint32_t channel_priority) { return (channel_priority >= GPDMA_MIN_PRIORITY && channel_priority <= GPDMA_MAX_PRIORITY); @@ -408,19 +399,22 @@ static int siwx91x_gpdma_reload(const struct device *dev, uint32_t channel, uint static int siwx91x_gpdma_start(const struct device *dev, uint32_t channel) { - const struct siwx91x_gpdma_config *cfg = dev->config; struct siwx19x_gpdma_data *data = dev->data; if (channel >= data->dma_ctx.dma_channels) { return -EINVAL; } - if (!sys_test_bit((mem_addr_t)&cfg->reg->GLOBAL.DMA_CHNL_ENABLE_REG, channel)) { - siwx91x_gpdma_pm_policy_state_lock_get(); + if (data->chan_info[channel].channel_active) { + pm_device_runtime_get(dev); + data->chan_info[channel].channel_active = true; } if (RSI_GPDMA_DMAChannelTrigger(&data->hal_ctx, channel)) { - siwx91x_gpdma_pm_policy_state_lock_put(); + if (data->chan_info[channel].channel_active) { + pm_device_runtime_put(dev); + data->chan_info[channel].channel_active = false; + } return -EINVAL; } @@ -429,7 +423,6 @@ static int siwx91x_gpdma_start(const struct device *dev, uint32_t channel) static int siwx91x_gpdma_stop(const struct device *dev, uint32_t channel) { - const struct siwx91x_gpdma_config *cfg = dev->config; struct siwx19x_gpdma_data *data = dev->data; k_spinlock_key_t key; @@ -437,10 +430,6 @@ static int siwx91x_gpdma_stop(const struct device *dev, uint32_t channel) return -EINVAL; } - if (sys_test_bit((mem_addr_t)&cfg->reg->GLOBAL.DMA_CHNL_ENABLE_REG, channel)) { - siwx91x_gpdma_pm_policy_state_lock_put(); - } - if (RSI_GPDMA_AbortChannel(&data->hal_ctx, channel)) { return -EINVAL; } @@ -449,6 +438,11 @@ static int siwx91x_gpdma_stop(const struct device *dev, uint32_t channel) siwx91x_gpdma_free_desc(data->desc_pool, data->chan_info[channel].desc); k_spin_unlock(&data->desc_pool_lock, key); + if (data->chan_info[channel].channel_active) { + pm_device_runtime_put(dev); + data->chan_info[channel].channel_active = false; + } + return 0; } @@ -552,7 +546,10 @@ static void siwx91x_gpdma_isr(const struct device *dev) if (channel_int_status & abort_mask) { RSI_GPDMA_AbortChannel(&data->hal_ctx, channel); cfg->reg->GLOBAL.INTERRUPT_STAT_REG = abort_mask; - siwx91x_gpdma_pm_policy_state_lock_put(); + if (data->chan_info[channel].channel_active) { + pm_device_runtime_put_async(dev, K_NO_WAIT); + data->chan_info[channel].channel_active = false; + } } if (channel_int_status & desc_fetch_mask) { @@ -569,11 +566,16 @@ static void siwx91x_gpdma_isr(const struct device *dev) k_spin_unlock(&data->desc_pool_lock, key); data->chan_info[channel].desc = NULL; cfg->reg->GLOBAL.INTERRUPT_STAT_REG = done_mask; + + if (data->chan_info[channel].channel_active) { + pm_device_runtime_put_async(dev, K_NO_WAIT); + data->chan_info[channel].channel_active = false; + } + if (data->chan_info[channel].cb) { data->chan_info[channel].cb(dev, data->chan_info[channel].cb_data, channel, 0); } - siwx91x_gpdma_pm_policy_state_lock_put(); } } diff --git a/drivers/entropy/entropy_gecko_trng.c b/drivers/entropy/entropy_gecko_trng.c index 1eec4ff5edf45..c629876f69362 100644 --- a/drivers/entropy/entropy_gecko_trng.c +++ b/drivers/entropy/entropy_gecko_trng.c @@ -44,6 +44,25 @@ #endif /* _SILICON_LABS_32B_SERIES_2_CONFIG_* */ #endif /* CONFIG_CRYPTO_ACC_GECKO_TRNG */ +static int entropy_gecko_trng_init(const struct device *dev) +{ + /* Enable the TRNG0 clock. */ +#ifndef CONFIG_CRYPTO_ACC_GECKO_TRNG + CMU_ClockEnable(cmuClock_TRNG0, true); + + /* Enable TRNG0. */ + TRNG0->CONTROL = TRNG_CONTROL_ENABLE; +#else + /* Enable the CRYPTO ACC clock. */ + CMU_ClockEnable(cmuClock_CRYPTOACC, true); + + /* Enable TRNG */ + S2_CTRL |= S2_CTRL_ENABLE; +#endif + + return 0; +} + static void entropy_gecko_trng_read(uint8_t *output, size_t len) { #ifndef CONFIG_CRYPTO_ACC_GECKO_TRNG @@ -77,7 +96,7 @@ static int entropy_gecko_trng_get_entropy(const struct device *dev, ARG_UNUSED(dev); #ifdef CONFIG_CRYPTO_ACC_GECKO_TRNG - CMU_ClockEnable(cmuClock_CRYPTOACC, true); + entropy_gecko_trng_init(dev); #endif while (length) { @@ -130,25 +149,6 @@ static int entropy_gecko_trng_get_entropy_isr(const struct device *dev, } } -static int entropy_gecko_trng_init(const struct device *dev) -{ - /* Enable the TRNG0 clock. */ -#ifndef CONFIG_CRYPTO_ACC_GECKO_TRNG - CMU_ClockEnable(cmuClock_TRNG0, true); - - /* Enable TRNG0. */ - TRNG0->CONTROL = TRNG_CONTROL_ENABLE; -#else - /* Enable the CRYPTO ACC clock. */ - CMU_ClockEnable(cmuClock_CRYPTOACC, true); - - /* Enable TRNG */ - S2_CTRL |= S2_CTRL_ENABLE; -#endif - - return 0; -} - static DEVICE_API(entropy, entropy_gecko_trng_api_funcs) = { .get_entropy = entropy_gecko_trng_get_entropy, .get_entropy_isr = entropy_gecko_trng_get_entropy_isr diff --git a/drivers/gpio/Kconfig.silabs b/drivers/gpio/Kconfig.silabs index 0e08e4ece2398..eccda3d094994 100644 --- a/drivers/gpio/Kconfig.silabs +++ b/drivers/gpio/Kconfig.silabs @@ -5,6 +5,7 @@ menuconfig GPIO_SILABS bool "Silabs GPIO driver" default y depends on DT_HAS_SILABS_GPIO_ENABLED + depends on CLOCK_CONTROL select SILABS_SISDK_GPIO help Enable the Silabs gpio driver. diff --git a/drivers/i2c/Kconfig.silabs b/drivers/i2c/Kconfig.silabs index 4504456ee5fda..df8e27b3600a5 100644 --- a/drivers/i2c/Kconfig.silabs +++ b/drivers/i2c/Kconfig.silabs @@ -5,6 +5,7 @@ menuconfig I2C_SILABS bool "Silabs I2C_S2 driver" default y depends on DT_HAS_SILABS_I2C_ENABLED + depends on CLOCK_CONTROL select SILABS_SISDK_I2C help Enable I2C series 2 driver for the Silabs gecko SoC series. diff --git a/drivers/i2s/i2s_silabs_siwx91x.c b/drivers/i2s/i2s_silabs_siwx91x.c index 0a38ef305e247..323a82762f446 100644 --- a/drivers/i2s/i2s_silabs_siwx91x.c +++ b/drivers/i2s/i2s_silabs_siwx91x.c @@ -442,9 +442,7 @@ static void i2s_siwx91x_dma_rx_callback(const struct device *dma_dev, void *user rx_disable: i2s_siwx91x_stream_disable(stream, dma_dev); - if (stream->state == I2S_STATE_READY && stream->last_block) { - pm_device_runtime_put_async(i2s_dev, K_NO_WAIT); - } + pm_device_runtime_put_async(i2s_dev, K_NO_WAIT); } static void i2s_siwx91x_dma_tx_callback(const struct device *dma_dev, void *user_data, @@ -511,9 +509,7 @@ static void i2s_siwx91x_dma_tx_callback(const struct device *dma_dev, void *user tx_disable: i2s_siwx91x_stream_disable(stream, dma_dev); - if (stream->state == I2S_STATE_READY && stream->last_block) { - pm_device_runtime_put_async(i2s_dev, K_NO_WAIT); - } + pm_device_runtime_put_async(i2s_dev, K_NO_WAIT); } static int i2s_siwx91x_param_config(const struct device *dev, enum i2s_dir dir) diff --git a/drivers/power_domain/power_domain_silabs_siwx91x.c b/drivers/power_domain/power_domain_silabs_siwx91x.c index 8350e8a25e15b..8b94ef9619e1b 100644 --- a/drivers/power_domain/power_domain_silabs_siwx91x.c +++ b/drivers/power_domain/power_domain_silabs_siwx91x.c @@ -5,7 +5,7 @@ */ #include -#include +#include #define DT_DRV_COMPAT silabs_siwx91x_power_domain @@ -13,10 +13,12 @@ static int siwx91x_pd_pm_action(const struct device *dev, enum pm_device_action { switch (action) { case PM_DEVICE_ACTION_RESUME: + pm_policy_device_power_lock_get(dev); pm_device_children_action_run(dev, PM_DEVICE_ACTION_TURN_ON, NULL); break; case PM_DEVICE_ACTION_SUSPEND: pm_device_children_action_run(dev, PM_DEVICE_ACTION_TURN_OFF, NULL); + pm_policy_device_power_lock_put(dev); break; case PM_DEVICE_ACTION_TURN_ON: break; diff --git a/drivers/pwm/Kconfig.silabs b/drivers/pwm/Kconfig.silabs index bceff187627e1..bf6a72facb559 100644 --- a/drivers/pwm/Kconfig.silabs +++ b/drivers/pwm/Kconfig.silabs @@ -5,6 +5,7 @@ config PWM_SILABS_LETIMER bool "Silabs LETIMER PWM driver" default y depends on DT_HAS_SILABS_LETIMER_PWM_ENABLED + depends on CLOCK_CONTROL select SILABS_SISDK_LETIMER help Enable the PWM driver for the LETIMER peripheral on Silabs Series 2 SoCs. @@ -17,6 +18,7 @@ config PWM_SILABS_TIMER bool "Silabs TIMER PWM driver" default y depends on DT_HAS_SILABS_TIMER_PWM_ENABLED + depends on CLOCK_CONTROL select SILABS_SISDK_TIMER help Enable the PWM driver for the TIMER peripheral on Silabs Series 2 SoCs. diff --git a/drivers/retained_mem/Kconfig.silabs b/drivers/retained_mem/Kconfig.silabs index bd2fc835bd352..e8f2d63f73622 100644 --- a/drivers/retained_mem/Kconfig.silabs +++ b/drivers/retained_mem/Kconfig.silabs @@ -5,5 +5,6 @@ config RETAINED_MEM_SILABS_BURAM bool "Silicon Labs BURAM driver" default y depends on DT_HAS_SILABS_BURAM_ENABLED + depends on CLOCK_CONTROL help Enable driver for Silicon Labs BURAM-based retained memory register support. diff --git a/drivers/spi/Kconfig.silabs_eusart b/drivers/spi/Kconfig.silabs_eusart index 408f2460eecdf..4622a398df7a2 100644 --- a/drivers/spi/Kconfig.silabs_eusart +++ b/drivers/spi/Kconfig.silabs_eusart @@ -9,6 +9,7 @@ config SPI_SILABS_EUSART default y depends on DT_HAS_SILABS_EUSART_SPI_ENABLED depends on GPIO + depends on CLOCK_CONTROL select SILABS_SISDK_EUSART select PINCTRL if SOC_FAMILY_SILABS_S2 help diff --git a/drivers/spi/spi_silabs_siwx91x_gspi.c b/drivers/spi/spi_silabs_siwx91x_gspi.c index 4b60676abb670..8d0984fe55d0d 100644 --- a/drivers/spi/spi_silabs_siwx91x_gspi.c +++ b/drivers/spi/spi_silabs_siwx91x_gspi.c @@ -555,6 +555,7 @@ static int gspi_siwx91x_transceive(const struct device *dev, const struct spi_co ret = gspi_siwx91x_config(dev, config, cb, userdata); if (ret) { spi_context_release(&data->ctx, ret); + pm_device_runtime_put(dev); return ret; } } @@ -566,6 +567,9 @@ static int gspi_siwx91x_transceive(const struct device *dev, const struct spi_co if (spi_siwx91x_is_dma_enabled_instance(dev)) { /* Perform DMA transceive */ ret = gspi_siwx91x_transceive_dma(dev, config); + if (ret < 0) { + pm_device_runtime_put(dev); + } spi_context_release(&data->ctx, ret); } else { /* Perform synchronous polling transceive */ diff --git a/drivers/watchdog/wdt_silabs_siwx91x.c b/drivers/watchdog/wdt_silabs_siwx91x.c index 4da0813ed5cb4..b1a96f076df36 100644 --- a/drivers/watchdog/wdt_silabs_siwx91x.c +++ b/drivers/watchdog/wdt_silabs_siwx91x.c @@ -149,10 +149,6 @@ static int siwx91x_wdt_setup(const struct device *dev, uint8_t options) return -ENOTSUP; } - if (options & (WDT_OPT_PAUSE_IN_SLEEP)) { - return -ENOTSUP; - } - RSI_WWDT_ConfigSysRstTimer(config->reg, data->delay_reset); RSI_WWDT_ConfigIntrTimer(config->reg, data->delay_irq); diff --git a/drivers/wifi/siwx91x/siwx91x_wifi.c b/drivers/wifi/siwx91x/siwx91x_wifi.c index b6d9c4bbc4865..5252070fb17f6 100644 --- a/drivers/wifi/siwx91x/siwx91x_wifi.c +++ b/drivers/wifi/siwx91x/siwx91x_wifi.c @@ -119,12 +119,15 @@ int siwx91x_status(const struct device *dev, struct wifi_iface_status *status) return -EINVAL; } status->twt_capable = false; - status->link_mode = WIFI_4; status->iface_mode = WIFI_MODE_AP; status->mfp = WIFI_MFP_DISABLE; - status->channel = sl_ap_cfg.channel.channel; + status->channel = wlan_info.channel_number; status->beacon_interval = sl_ap_cfg.beacon_interval; status->dtim_period = sl_ap_cfg.dtim_beacon_count; + status->link_mode = WIFI_4; + if (status->channel == 14) { + status->link_mode = WIFI_1; + } wlan_info.sec_type = (uint8_t)sl_ap_cfg.security; memcpy(status->bssid, wlan_info.mac_address, WIFI_MAC_ADDR_LEN); } else { diff --git a/dts/arm/nordic/nrf52820.dtsi b/dts/arm/nordic/nrf52820.dtsi index 88fc0c76dc5d6..d95a47943acbe 100644 --- a/dts/arm/nordic/nrf52820.dtsi +++ b/dts/arm/nordic/nrf52820.dtsi @@ -118,7 +118,7 @@ ieee802154-supported; ble-2mbps-supported; ble-coded-phy-supported; - tx-high-power-supported; + radio-tx-high-power-supported; ieee802154: ieee802154 { compatible = "nordic,nrf-ieee802154"; diff --git a/dts/arm/nordic/nrf52833.dtsi b/dts/arm/nordic/nrf52833.dtsi index 24addb6f3cf4e..a328193f1fe1d 100644 --- a/dts/arm/nordic/nrf52833.dtsi +++ b/dts/arm/nordic/nrf52833.dtsi @@ -119,7 +119,7 @@ ieee802154-supported; ble-2mbps-supported; ble-coded-phy-supported; - tx-high-power-supported; + radio-tx-high-power-supported; ieee802154: ieee802154 { compatible = "nordic,nrf-ieee802154"; diff --git a/dts/arm/nordic/nrf52840.dtsi b/dts/arm/nordic/nrf52840.dtsi index 77e70fa85f114..1ec04005a2f8d 100644 --- a/dts/arm/nordic/nrf52840.dtsi +++ b/dts/arm/nordic/nrf52840.dtsi @@ -107,7 +107,7 @@ ieee802154-supported; ble-2mbps-supported; ble-coded-phy-supported; - tx-high-power-supported; + radio-tx-high-power-supported; ieee802154: ieee802154 { compatible = "nordic,nrf-ieee802154"; diff --git a/dts/arm/silabs/siwg917.dtsi b/dts/arm/silabs/siwg917.dtsi index 8a85e973153ae..4fb4caa937c4d 100644 --- a/dts/arm/silabs/siwg917.dtsi +++ b/dts/arm/silabs/siwg917.dtsi @@ -138,6 +138,7 @@ siwx91x_soc_pd: siwx91x-soc-pd { compatible = "silabs,siwx91x-power-domain"; #power-domain-cells = <0>; + zephyr,disabling-power-states = <&pstate_ps4_sleep>; zephyr,pm-device-runtime-auto; status = "okay"; }; diff --git a/dts/arm/silabs/xg21/efr32xg21.dtsi b/dts/arm/silabs/xg21/efr32xg21.dtsi index 7415fc008dd45..fc928cac9af31 100644 --- a/dts/arm/silabs/xg21/efr32xg21.dtsi +++ b/dts/arm/silabs/xg21/efr32xg21.dtsi @@ -19,6 +19,9 @@ pa-initial-power-dbm = <10>; pa-ramp-time-us = <10>; pa-voltage-mv = <3300>; + ble-2mbps-supported; + ble-coded-phy-supported; + radio-tx-high-power-supported; bt_hci_silabs: bt_hci_silabs { compatible = "silabs,bt-hci-efr32"; diff --git a/dts/arm/silabs/xg22/efr32xg22.dtsi b/dts/arm/silabs/xg22/efr32xg22.dtsi index 4babab9f08235..99417981627a1 100644 --- a/dts/arm/silabs/xg22/efr32xg22.dtsi +++ b/dts/arm/silabs/xg22/efr32xg22.dtsi @@ -20,6 +20,11 @@ pa-initial-power-dbm = <10>; pa-ramp-time-us = <2>; pa-voltage-mv = <3300>; + ble-2mbps-supported; + ble-coded-phy-supported; + ble-cte-tx-supported; + ble-cte-rx-supported; + radio-tx-high-power-supported; pti: pti { compatible = "silabs,pti"; diff --git a/dts/arm/silabs/xg24/efr32xg24.dtsi b/dts/arm/silabs/xg24/efr32xg24.dtsi index b1ddf2adbc33f..8c9a32edb39e1 100644 --- a/dts/arm/silabs/xg24/efr32xg24.dtsi +++ b/dts/arm/silabs/xg24/efr32xg24.dtsi @@ -20,6 +20,12 @@ pa-initial-power-dbm = <10>; pa-ramp-time-us = <10>; pa-voltage-mv = <3300>; + ble-2mbps-supported; + ble-coded-phy-supported; + ble-cte-tx-supported; + ble-cte-rx-supported; + ble-cs-supported; + radio-tx-high-power-supported; bt_hci_silabs: bt_hci_silabs { compatible = "silabs,bt-hci-efr32"; diff --git a/dts/arm/silabs/xg27/efr32xg27.dtsi b/dts/arm/silabs/xg27/efr32xg27.dtsi index 886d81322d20d..a06f5e1c4d0ca 100644 --- a/dts/arm/silabs/xg27/efr32xg27.dtsi +++ b/dts/arm/silabs/xg27/efr32xg27.dtsi @@ -20,6 +20,10 @@ pa-initial-power-dbm = <10>; pa-ramp-time-us = <2>; pa-voltage-mv = <3300>; + ble-2mbps-supported; + ble-coded-phy-supported; + ble-cte-tx-supported; + radio-tx-high-power-supported; bt_hci_silabs: bt_hci_silabs { compatible = "silabs,bt-hci-efr32"; diff --git a/dts/arm/silabs/xg29/efr32xg29.dtsi b/dts/arm/silabs/xg29/efr32xg29.dtsi index 016e5c5de0877..cec52dc2cf176 100644 --- a/dts/arm/silabs/xg29/efr32xg29.dtsi +++ b/dts/arm/silabs/xg29/efr32xg29.dtsi @@ -20,6 +20,10 @@ pa-initial-power-dbm = <10>; pa-ramp-time-us = <2>; pa-voltage-mv = <3300>; + ble-2mbps-supported; + ble-coded-phy-supported; + ble-cte-tx-supported; + radio-tx-high-power-supported; bt_hci_silabs: bt_hci_silabs { compatible = "silabs,bt-hci-efr32"; diff --git a/dts/bindings/bluetooth/ble-radio.yaml b/dts/bindings/bluetooth/ble-radio.yaml new file mode 100644 index 0000000000000..f2dcc0f63cbb6 --- /dev/null +++ b/dts/bindings/bluetooth/ble-radio.yaml @@ -0,0 +1,42 @@ +# Copyright (c) 2025 Nordic Semiconductor ASA +# Copyright (c) 2025 Silicon Laboratories Inc. +# SPDX-License-Identifier: Apache-2.0 + +description: | + Base binding for Bluetooth LE radio hardware capabilities. + + These properties describe hardware-supported Bluetooth features based on + the Bluetooth Core Specification. They are read-only and indicate what + the hardware is capable of, not what features are currently enabled. + +properties: + # Bluetooth 5.0 + ble-2mbps-supported: + type: boolean + description: | + 2 Mbps PHY support (Bluetooth 5.0 specification). + + ble-coded-phy-supported: + type: boolean + description: | + Coded PHY support for Long Range (Bluetooth 5.0 specification). + + # Bluetooth 5.1 + ble-cte-tx-supported: + type: boolean + description: | + Constant Tone Extension transmission for Direction Finding in Angle + of Departure mode (Bluetooth 5.1 specification). + + ble-cte-rx-supported: + type: boolean + description: | + Constant Tone Extension reception with IQ sampling for Direction Finding + in Angle of Arrival mode. Requires ble-cte-tx-supported capability + (Bluetooth 5.1 specification). + + # Bluetooth 6.0 + ble-cs-supported: + type: boolean + description: | + BLE Channel Sounding feature support (Bluetooth 6.0 specification). diff --git a/dts/bindings/net/wireless/nordic,nrf-radio.yaml b/dts/bindings/net/wireless/nordic,nrf-radio.yaml index 8c73d652662ec..6e643420ea740 100644 --- a/dts/bindings/net/wireless/nordic,nrf-radio.yaml +++ b/dts/bindings/net/wireless/nordic,nrf-radio.yaml @@ -31,7 +31,7 @@ description: | Currently supported "compatible" properties for the FEM node are: - - generic-fem-two-ctrl-pins + - radio-fem-two-ctrl-pins - nordic,nrf21540-fem Refer to the bindings for these compatibles for more information @@ -108,7 +108,7 @@ description: | compatible: "nordic,nrf-radio" -include: [base.yaml] +include: [base.yaml, ble-radio.yaml, radio.yaml] properties: reg: @@ -211,26 +211,3 @@ properties: description: | If set, indicates that the radio hardware supports the IEEE 802.15.4 mode. - - ble-2mbps-supported: - type: boolean - description: | - If set, indicates that the radio hardware supports the 2 Mbps BLE mode. - - ble-coded-phy-supported: - type: boolean - description: | - If set, indicates that the radio hardware supports coded BLE PHY. - - tx-high-power-supported: - type: boolean - description: | - If set, indicates that the radio hardware supports high TX power - settings. - - cs-supported: - type: boolean - description: | - If set, the radio hardware supports the BLE Channel Sounding feature. - This property should be treated as read-only and should not be overridden; - the correct value is provided for your target's SoC already. diff --git a/dts/bindings/net/wireless/generic-fem-two-ctrl-pins.yaml b/dts/bindings/net/wireless/radio-fem-two-ctrl-pins.yaml similarity index 97% rename from dts/bindings/net/wireless/generic-fem-two-ctrl-pins.yaml rename to dts/bindings/net/wireless/radio-fem-two-ctrl-pins.yaml index edf3a632caf13..d435040b48d05 100644 --- a/dts/bindings/net/wireless/generic-fem-two-ctrl-pins.yaml +++ b/dts/bindings/net/wireless/radio-fem-two-ctrl-pins.yaml @@ -17,7 +17,7 @@ description: | (Though if you do specify a pin, you must also specify its corresponding settle-time-us property.) -compatible: "generic-fem-two-ctrl-pins" +compatible: "radio-fem-two-ctrl-pins" include: base.yaml diff --git a/dts/bindings/net/wireless/gpio-radio-coex.yaml b/dts/bindings/net/wireless/radio-gpio-coex.yaml similarity index 97% rename from dts/bindings/net/wireless/gpio-radio-coex.yaml rename to dts/bindings/net/wireless/radio-gpio-coex.yaml index 1acb8e7f9a9f0..bf8553c26f069 100644 --- a/dts/bindings/net/wireless/gpio-radio-coex.yaml +++ b/dts/bindings/net/wireless/radio-gpio-coex.yaml @@ -13,7 +13,7 @@ description: | transceiver begins their transmission. This is specified by the grant-delay-us property. -compatible: "gpio-radio-coex" +compatible: "radio-gpio-coex" include: base.yaml diff --git a/dts/bindings/net/wireless/radio.yaml b/dts/bindings/net/wireless/radio.yaml new file mode 100644 index 0000000000000..99fa9d3c09971 --- /dev/null +++ b/dts/bindings/net/wireless/radio.yaml @@ -0,0 +1,23 @@ +# Copyright (c) 2025 Nordic Semiconductor ASA +# Copyright (c) 2025 Silicon Laboratories Inc. +# SPDX-License-Identifier: Apache-2.0 + +description: | + Base binding for generic radio hardware capabilities that are not specific + to any wireless protocol or vendor. + + These properties describe hardware-supported features that are common across + different vendors but are not part of any specific wireless protocol + specification. They are read-only and indicate what the hardware is capable + of, not what features are currently enabled. + +properties: + radio-tx-high-power-supported: + type: boolean + description: | + If set, indicates that the radio hardware supports high TX power settings. + This capability enables transmission beyond standard power levels + (typically >10 dBm). + + This property should be treated as read-only and should not be overridden; + the correct value is provided for your target's SoC already. diff --git a/dts/bindings/net/wireless/silabs,series2-radio.yaml b/dts/bindings/net/wireless/silabs,series2-radio.yaml index b44c911b15e67..85bb719a03e69 100644 --- a/dts/bindings/net/wireless/silabs,series2-radio.yaml +++ b/dts/bindings/net/wireless/silabs,series2-radio.yaml @@ -8,7 +8,7 @@ description: | compatible: "silabs,series2-radio" -include: [base.yaml] +include: [base.yaml, ble-radio.yaml, radio.yaml] properties: reg: diff --git a/dts/vendor/nordic/nrf54h20.dtsi b/dts/vendor/nordic/nrf54h20.dtsi index c4c3496545cb1..6037583e7857c 100644 --- a/dts/vendor/nordic/nrf54h20.dtsi +++ b/dts/vendor/nordic/nrf54h20.dtsi @@ -487,7 +487,7 @@ status = "disabled"; ble-2mbps-supported; ble-coded-phy-supported; - cs-supported; + ble-cs-supported; dfe-supported; ieee802154-supported; interrupts = <44 NRF_DEFAULT_IRQ_PRIORITY>; diff --git a/dts/vendor/nordic/nrf54l_05_10_15.dtsi b/dts/vendor/nordic/nrf54l_05_10_15.dtsi index 1b488e433ed62..4a00d2ced6e37 100644 --- a/dts/vendor/nordic/nrf54l_05_10_15.dtsi +++ b/dts/vendor/nordic/nrf54l_05_10_15.dtsi @@ -247,7 +247,7 @@ ieee802154-supported; ble-2mbps-supported; ble-coded-phy-supported; - cs-supported; + ble-cs-supported; ieee802154: ieee802154 { compatible = "nordic,nrf-ieee802154"; diff --git a/dts/vendor/nordic/nrf54lm20a.dtsi b/dts/vendor/nordic/nrf54lm20a.dtsi index 7e511c8ff6c68..419dbb20d4cb5 100644 --- a/dts/vendor/nordic/nrf54lm20a.dtsi +++ b/dts/vendor/nordic/nrf54lm20a.dtsi @@ -280,7 +280,7 @@ ieee802154-supported; ble-2mbps-supported; ble-coded-phy-supported; - cs-supported; + ble-cs-supported; ieee802154: ieee802154 { compatible = "nordic,nrf-ieee802154"; diff --git a/modules/hal_silabs/wiseconnect/CMakeLists.txt b/modules/hal_silabs/wiseconnect/CMakeLists.txt index ee928083966af..573f722cb197e 100644 --- a/modules/hal_silabs/wiseconnect/CMakeLists.txt +++ b/modules/hal_silabs/wiseconnect/CMakeLists.txt @@ -178,6 +178,7 @@ if(CONFIG_SILABS_SIWX91X_NWP) ${WISECONNECT_DIR}/components/sli_wifi_command_engine/inc ) zephyr_library_sources( + nwp_fw_version.c ${WISECONNECT_DIR}/components/common/src/sl_utility.c ${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/ahb_interface/src/rsi_hal_mcu_m4_ram.c ${WISECONNECT_DIR}/components/device/silabs/si91x/wireless/ahb_interface/src/rsi_hal_mcu_m4_rom.c diff --git a/modules/hal_silabs/wiseconnect/nwp_fw_version.c b/modules/hal_silabs/wiseconnect/nwp_fw_version.c new file mode 100644 index 0000000000000..1358ed3b93359 --- /dev/null +++ b/modules/hal_silabs/wiseconnect/nwp_fw_version.c @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Silicon Laboratories Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/* This value needs to be updated when the Wiseconnect SDK (hal_silabs/wiseconnect) is updated + * Currently mapped to Wiseconnect SDK 3.5.2 + */ + +#include + +const sl_wifi_firmware_version_t siwx91x_nwp_fw_expected_version = { + .rom_id = 0x0B, + .major = 2, + .minor = 14, + .security_version = 5, + .patch_num = 2, + .customer_id = 0, + .build_num = 7, +}; diff --git a/modules/hal_silabs/wiseconnect/nwp_fw_version.h b/modules/hal_silabs/wiseconnect/nwp_fw_version.h index a873844442b0e..db0d97d469719 100644 --- a/modules/hal_silabs/wiseconnect/nwp_fw_version.h +++ b/modules/hal_silabs/wiseconnect/nwp_fw_version.h @@ -4,7 +4,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -/* This value needs to be updated when the Wiseconnect SDK (hal_silabs/wiseconnect) is updated - * Actually mapped to Wiseconnect SDK 3.5.0 - */ -#define SIWX91X_NWP_FW_EXPECTED_VERSION "B.2.14.5.2.0.7" +#include + +extern const sl_wifi_firmware_version_t siwx91x_nwp_fw_expected_version; diff --git a/samples/bluetooth/beacon/boards/nrf52840dk_nrf52840.overlay b/samples/bluetooth/beacon/boards/nrf52840dk_nrf52840.overlay index 3fdcfdb1228aa..5a3c06d2ebaf1 100644 --- a/samples/bluetooth/beacon/boards/nrf52840dk_nrf52840.overlay +++ b/samples/bluetooth/beacon/boards/nrf52840dk_nrf52840.overlay @@ -5,7 +5,7 @@ */ / { coex_gpio: coex { - compatible = "gpio-radio-coex"; + compatible = "radio-gpio-coex"; grant-gpios = <&gpio1 0 (GPIO_PULL_DOWN | GPIO_ACTIVE_LOW)>; grant-delay-us = <150>; }; diff --git a/soc/nordic/common/Kconfig.peripherals b/soc/nordic/common/Kconfig.peripherals index d7e489b446a5b..f2019ab91a0e5 100644 --- a/soc/nordic/common/Kconfig.peripherals +++ b/soc/nordic/common/Kconfig.peripherals @@ -206,7 +206,7 @@ config HAS_HW_NRF_RADIO_BLE_CODED def_bool $(dt_nodelabel_bool_prop,radio,ble-coded-phy-supported) config HAS_HW_NRF_RADIO_CS - def_bool $(dt_nodelabel_bool_prop,radio,cs-supported) + def_bool $(dt_nodelabel_bool_prop,radio,ble-cs-supported) config HAS_HW_NRF_RADIO_DFE def_bool $(dt_nodelabel_bool_prop,radio,dfe-supported) @@ -215,7 +215,7 @@ config HAS_HW_NRF_RADIO_IEEE802154 def_bool $(dt_nodelabel_bool_prop,radio,ieee802154-supported) config HAS_HW_NRF_RADIO_TX_PWR_HIGH - def_bool $(dt_nodelabel_bool_prop,radio,tx-high-power-supported) + def_bool $(dt_nodelabel_bool_prop,radio,radio-tx-high-power-supported) config HAS_HW_NRF_REGULATORS def_bool $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_REGULATORS)) diff --git a/soc/silabs/silabs_s2/Kconfig b/soc/silabs/silabs_s2/Kconfig index 4f03a01b339ae..bfd45e4210688 100644 --- a/soc/silabs/silabs_s2/Kconfig +++ b/soc/silabs/silabs_s2/Kconfig @@ -47,4 +47,27 @@ config SILABS_DEVICE_IS_MODULE bool default n +# Hardware capability flags (auto-detected from Device Tree) +# Bluetooth 5.0 +config HAS_HW_EFR32_RADIO_BLE_2M + def_bool $(dt_nodelabel_has_prop,radio,ble-2mbps-supported) + +config HAS_HW_EFR32_RADIO_BLE_CODED + def_bool $(dt_nodelabel_has_prop,radio,ble-coded-phy-supported) + +# Bluetooth 5.1 +config HAS_HW_EFR32_RADIO_CTE_TX + def_bool $(dt_nodelabel_has_prop,radio,ble-cte-tx-supported) + +config HAS_HW_EFR32_RADIO_CTE_RX + def_bool $(dt_nodelabel_has_prop,radio,ble-cte-rx-supported) && HAS_HW_EFR32_RADIO_CTE_TX + +# Bluetooth 6.0 +config HAS_HW_EFR32_RADIO_CS + def_bool $(dt_nodelabel_has_prop,radio,ble-cs-supported) + +# Vendor-specific +config HAS_HW_EFR32_RADIO_TX_HIGH_POWER + def_bool $(dt_nodelabel_has_prop,radio,radio-tx-high-power-supported) + endif diff --git a/soc/silabs/silabs_s2/Kconfig.defconfig b/soc/silabs/silabs_s2/Kconfig.defconfig index 32f6fbc214ce9..65c4ab8f24917 100644 --- a/soc/silabs/silabs_s2/Kconfig.defconfig +++ b/soc/silabs/silabs_s2/Kconfig.defconfig @@ -20,6 +20,9 @@ configdefault SILABS_SLEEPTIMER_TIMER configdefault CORTEX_M_SYSTICK default n if SILABS_SLEEPTIMER_TIMER || GECKO_BURTC_TIMER +configdefault CLOCK_CONTROL + default y + # silabs_s2 uses simplicity_sdk hal library, which already have by default a zero latency # IRQs mechanism with a hardcoded value. In order to be aligned with simplicity_sdk, we # need to activate Zero Latency IRQ in Zephyr by default. The level (2) depends on the diff --git a/soc/silabs/silabs_siwx91x/Kconfig.defconfig b/soc/silabs/silabs_siwx91x/Kconfig.defconfig index 848201bca2532..12487e0547c0e 100644 --- a/soc/silabs/silabs_siwx91x/Kconfig.defconfig +++ b/soc/silabs/silabs_siwx91x/Kconfig.defconfig @@ -27,6 +27,9 @@ configdefault PM_DEVICE_RUNTIME configdefault POWER_DOMAIN default y +configdefault PM_POLICY_DEVICE_CONSTRAINTS + default y + endif # PM_DEVICE if SILABS_SIWX91X_NWP diff --git a/soc/silabs/silabs_siwx91x/siwg917/siwx91x_nwp.c b/soc/silabs/silabs_siwx91x/siwg917/siwx91x_nwp.c index d7d9b7db47305..60b6a89cdff10 100644 --- a/soc/silabs/silabs_siwx91x/siwg917/siwx91x_nwp.c +++ b/soc/silabs/silabs_siwx91x/siwg917/siwx91x_nwp.c @@ -300,7 +300,6 @@ static void siwx91x_configure_network_stack(sl_si91x_boot_configuration_t *boot_ static int siwx91x_check_nwp_version(void) { - sl_wifi_firmware_version_t expected_version; sl_wifi_firmware_version_t version; int ret; @@ -309,38 +308,29 @@ static int siwx91x_check_nwp_version(void) return -EINVAL; } - sscanf(SIWX91X_NWP_FW_EXPECTED_VERSION, "%hhX.%hhd.%hhd.%hhd.%hhd.%hhd.%hd", - &expected_version.rom_id, - &expected_version.major, - &expected_version.minor, - &expected_version.security_version, - &expected_version.patch_num, - &expected_version.customer_id, - &expected_version.build_num); - /* Ignore rom_id: - * B is parsed as an hex value and we get 11 in expected_version.rom_id - * We received rom_id=17 in version.rom_id, we suspect a double hex->decimal conversion + * the right value is 0x0B but we received 17 in version.rom_id, we suspect a double + * hex->decimal conversion */ - if (expected_version.major != version.major) { + if (siwx91x_nwp_fw_expected_version.major != version.major) { return -EINVAL; } - if (expected_version.minor != version.minor) { + if (siwx91x_nwp_fw_expected_version.minor != version.minor) { return -EINVAL; } - if (expected_version.security_version != version.security_version) { + if (siwx91x_nwp_fw_expected_version.security_version != version.security_version) { return -EINVAL; } - if (expected_version.patch_num != version.patch_num) { + if (siwx91x_nwp_fw_expected_version.patch_num != version.patch_num) { return -EINVAL; } - if (expected_version.customer_id != version.customer_id) { - LOG_DBG("customer_id diverge: expected %d, actual %d", expected_version.customer_id, - version.customer_id); + if (siwx91x_nwp_fw_expected_version.customer_id != version.customer_id) { + LOG_DBG("customer_id diverge: expected %d, actual %d", + siwx91x_nwp_fw_expected_version.customer_id, version.customer_id); } - if (expected_version.build_num != version.build_num) { - LOG_DBG("build_num diverge: expected %d, actual %d", expected_version.build_num, - version.build_num); + if (siwx91x_nwp_fw_expected_version.build_num != version.build_num) { + LOG_DBG("build_num diverge: expected %d, actual %d", + siwx91x_nwp_fw_expected_version.build_num, version.build_num); } return 0; @@ -448,8 +438,15 @@ static int siwx91x_nwp_init(const struct device *dev) /* Check if the NWP firmware version is correct */ ret = siwx91x_check_nwp_version(); if (ret < 0) { - LOG_ERR("Unexpected NWP firmware version (expected: %s)", - SIWX91X_NWP_FW_EXPECTED_VERSION); + LOG_ERR("Unexpected NWP firmware version (expected: %X.%d.%d.%d.%d.%d.%d)", + siwx91x_nwp_fw_expected_version.rom_id, + siwx91x_nwp_fw_expected_version.major, + siwx91x_nwp_fw_expected_version.minor, + siwx91x_nwp_fw_expected_version.security_version, + siwx91x_nwp_fw_expected_version.patch_num, + siwx91x_nwp_fw_expected_version.customer_id, + siwx91x_nwp_fw_expected_version.build_num); + return -EINVAL; } if (IS_ENABLED(CONFIG_SOC_SIWX91X_PM_BACKEND_PMGR)) { diff --git a/subsys/bluetooth/controller/coex/Kconfig b/subsys/bluetooth/controller/coex/Kconfig index 456376164ad56..30f42918e4ebf 100644 --- a/subsys/bluetooth/controller/coex/Kconfig +++ b/subsys/bluetooth/controller/coex/Kconfig @@ -6,7 +6,7 @@ menuconfig BT_CTLR_COEX_DRIVERS bool "Bluetooth Co-existence Drivers" default y - depends on HAS_BT_CTLR && DT_HAS_GPIO_RADIO_COEX_ENABLED + depends on HAS_BT_CTLR && DT_HAS_RADIO_GPIO_COEX_ENABLED if BT_CTLR_COEX_DRIVERS diff --git a/subsys/bluetooth/controller/coex/coex_ticker.c b/subsys/bluetooth/controller/coex/coex_ticker.c index be349622ecd68..2d1bad935efa1 100644 --- a/subsys/bluetooth/controller/coex/coex_ticker.c +++ b/subsys/bluetooth/controller/coex/coex_ticker.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#define DT_DRV_COMPAT gpio_radio_coex +#define DT_DRV_COMPAT radio_gpio_coex #include #include diff --git a/subsys/bluetooth/controller/coex/readme.rst b/subsys/bluetooth/controller/coex/readme.rst index 066b3e61af9f5..8bb53776011f2 100644 --- a/subsys/bluetooth/controller/coex/readme.rst +++ b/subsys/bluetooth/controller/coex/readme.rst @@ -14,7 +14,7 @@ Similarly, as in the nordic implementation of the 1-wire interface, the coexiste .. code-block:: DTS coex_gpio: coex { - compatible = "gpio-radio-coex"; + compatible = "radio-gpio-coex"; grant-gpios = <&gpio0 0 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; grant-delay-us = <150>; }; diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem.h b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem.h index a80de9f85e548..3c03b891c3466 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem.h +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem.h @@ -34,13 +34,13 @@ */ #ifdef HAL_RADIO_HAVE_FEM -#if FEM_HAS_COMPAT(generic_fem_two_ctrl_pins) +#if FEM_HAS_COMPAT(radio_fem_two_ctrl_pins) #include "radio_nrf5_fem_generic.h" #elif FEM_HAS_COMPAT(nordic_nrf21540_fem) #include "radio_nrf5_fem_nrf21540.h" #else #error "radio node fem property has an unsupported compatible" -#endif /* FEM_HAS_COMPAT(generic_fem_two_ctrl_pins) */ +#endif /* FEM_HAS_COMPAT(radio_fem_two_ctrl_pins) */ #endif /* HAL_RADIO_HAVE_FEM */ /* diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem_generic.h b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem_generic.h index f99a73991c99f..af5c9066e5c6d 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem_generic.h +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem_generic.h @@ -7,7 +7,7 @@ /* * This file contains helper macros for dealing with the devicetree * radio node's fem property, in the case that it has compatible - * "generic-fem-two-ctrl-pins". + * "radio-fem-two-ctrl-pins". * * Do not include it directly. * diff --git a/tests/bluetooth/init/pa_lna.overlay b/tests/bluetooth/init/pa_lna.overlay index 5ff670b76e832..f0d087de407d5 100644 --- a/tests/bluetooth/init/pa_lna.overlay +++ b/tests/bluetooth/init/pa_lna.overlay @@ -1,6 +1,6 @@ / { nrf_radio_fem: fem { - compatible = "generic-fem-two-ctrl-pins"; + compatible = "radio-fem-two-ctrl-pins"; ctx-gpios = <&gpio0 26 0>; ctx-settle-time-us = <5>; crx-gpios = <&gpio0 27 0>; diff --git a/tests/drivers/counter/counter_basic_api/boards/siwx917_rb4338a.overlay b/tests/drivers/counter/counter_basic_api/boards/siwx917_rb4338a.overlay new file mode 100644 index 0000000000000..a209a5643246b --- /dev/null +++ b/tests/drivers/counter/counter_basic_api/boards/siwx917_rb4338a.overlay @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2025 Silicon Laboratories Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ +&sysrtc0 { + status = "okay"; +}; diff --git a/tests/drivers/dma/chan_blen_transfer/boards/siwx917_rb4342a.conf b/tests/drivers/dma/chan_blen_transfer/boards/siwx917_rb4342a.conf new file mode 100644 index 0000000000000..9c5a9e9034b06 --- /dev/null +++ b/tests/drivers/dma/chan_blen_transfer/boards/siwx917_rb4342a.conf @@ -0,0 +1,2 @@ +CONFIG_DMA_TRANSFER_CHANNEL_NR_0=0 +CONFIG_DMA_TRANSFER_CHANNEL_NR_1=7 diff --git a/tests/drivers/dma/chan_blen_transfer/boards/siwx917_rb4342a.overlay b/tests/drivers/dma/chan_blen_transfer/boards/siwx917_rb4342a.overlay new file mode 100644 index 0000000000000..cfda0bf28b088 --- /dev/null +++ b/tests/drivers/dma/chan_blen_transfer/boards/siwx917_rb4342a.overlay @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2025 Silicon Laboratories, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&gpdma { + status = "okay"; +}; + +tst_dma0: &gpdma {}; diff --git a/tests/drivers/pwm/pwm_api/boards/siwx917_rb4342a.overlay b/tests/drivers/pwm/pwm_api/boards/siwx917_rb4342a.overlay new file mode 100644 index 0000000000000..4d0e8cb76e031 --- /dev/null +++ b/tests/drivers/pwm/pwm_api/boards/siwx917_rb4342a.overlay @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Silicon Laboratories Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/ { + aliases { + pwm-test = &pwm; + }; +}; + +&pinctrl0 { + pwm_ch: pwm_ch { + group1 { + pinmux = ; /* GPIO_7 P20 */ + }; + }; +}; + +&pwm { + pinctrl-0 = <&pwm_ch>; + pinctrl-names = "default"; + + pwm_channel1: pwm_channel1 { + pwms = <&pwm 0 1000000>; + }; + silabs,pwm-polarity = ; + status = "okay"; +}; diff --git a/tests/drivers/rtc/rtc_api/boards/siwx917_rb4342a.overlay b/tests/drivers/rtc/rtc_api/boards/siwx917_rb4342a.overlay new file mode 100644 index 0000000000000..ba5d45157490f --- /dev/null +++ b/tests/drivers/rtc/rtc_api/boards/siwx917_rb4342a.overlay @@ -0,0 +1,15 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright (c) 2025 Silicon Laboratories Inc. + */ + +/ { + aliases { + rtc = &rtc0; + }; +}; + +&rtc0 { + status = "okay"; +}; diff --git a/tests/drivers/watchdog/wdt_basic_api/testcase.yaml b/tests/drivers/watchdog/wdt_basic_api/testcase.yaml index 01db9ce4d4044..3e7c39bc399b8 100644 --- a/tests/drivers/watchdog/wdt_basic_api/testcase.yaml +++ b/tests/drivers/watchdog/wdt_basic_api/testcase.yaml @@ -163,3 +163,9 @@ tests: platform_allow: - frdm_mcxw23 - mcxw23_evk + drivers.watchdog.pm_enabled: + platform_allow: + - siwx917_rb4338a + extra_configs: + - CONFIG_PM=y + - CONFIG_PM_DEVICE=y