From a55a7f9c05a4a37179aabf4c012fc8ce591a2b8e Mon Sep 17 00:00:00 2001 From: Aksel Skauge Mellbye Date: Tue, 25 Nov 2025 15:25:14 +0100 Subject: [PATCH 01/21] boards: silabs: xg24_dk2601b: Enable commander runner Enable the use of Simplicity Commander as a runner on the xg24_dk2601b dev kit. Upstream-status: available Signed-off-by: Aksel Skauge Mellbye (cherry picked from commit 2602b707b1f285ff80c3fbe7329bda580e7ddf71) --- boards/silabs/dev_kits/xg24_dk2601b/board.cmake | 3 +++ 1 file changed, 3 insertions(+) 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) From dccdadf4d55a99ef2779d15b7e9acf1bd76ccd05 Mon Sep 17 00:00:00 2001 From: Ivan Pankratov Date: Tue, 21 Oct 2025 11:11:22 +0300 Subject: [PATCH 02/21] drivers: bluetooth: efr32: move Silabs Kconfig settings Vendor specific configuration is moved to a separate file. Upstream-status: available Signed-off-by: Ivan Pankratov (cherry picked from commit 675e6e05cd420532f10fce0a4d265f139caed74e) --- drivers/bluetooth/hci/Kconfig | 43 +--------------------------- drivers/bluetooth/hci/Kconfig.silabs | 41 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 42 deletions(-) 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..74e5094653b0c 100644 --- a/drivers/bluetooth/hci/Kconfig.silabs +++ b/drivers/bluetooth/hci/Kconfig.silabs @@ -1,6 +1,47 @@ # 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 + 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. + menu "EFR32 Bluetooth Controller Configuration" depends on BT_SILABS_EFR32 From f2896c79c237e70b1f7b59a012d00840a27f321b Mon Sep 17 00:00:00 2001 From: Ivan Pankratov Date: Tue, 21 Oct 2025 14:01:56 +0300 Subject: [PATCH 03/21] dts: bluetooth: add base binding for BLE radio hardware capabilities Create a shared base binding (ble-radio.yaml) for common Bluetooth LE radio hardware capabilities to avoid duplication between vendors and ensure consistent property naming across the ecosystem. Properties are prefixed with 'ble-' and ordered chronologically by Bluetooth Core Specification version (5.0, 5.1, 6.0). Each property indicates a hardware capability, not current enablement state. Upstream-status: available Signed-off-by: Ivan Pankratov (cherry picked from commit 0aa208d51e745ab8eec49a8a60513320cbcd2e91) --- drivers/bluetooth/hci/Kconfig.silabs | 21 +++++++--- dts/arm/nordic/nrf52820.dtsi | 2 +- dts/arm/nordic/nrf52833.dtsi | 2 +- dts/arm/nordic/nrf52840.dtsi | 2 +- dts/arm/silabs/xg21/efr32xg21.dtsi | 3 ++ dts/arm/silabs/xg22/efr32xg22.dtsi | 5 +++ dts/arm/silabs/xg24/efr32xg24.dtsi | 6 +++ dts/arm/silabs/xg27/efr32xg27.dtsi | 4 ++ dts/arm/silabs/xg29/efr32xg29.dtsi | 4 ++ dts/bindings/bluetooth/ble-radio.yaml | 42 +++++++++++++++++++ .../net/wireless/nordic,nrf-radio.yaml | 25 +---------- dts/bindings/net/wireless/radio.yaml | 23 ++++++++++ .../net/wireless/silabs,series2-radio.yaml | 2 +- dts/vendor/nordic/nrf54h20.dtsi | 2 +- dts/vendor/nordic/nrf54l_05_10_15.dtsi | 2 +- dts/vendor/nordic/nrf54lm20a.dtsi | 2 +- soc/nordic/common/Kconfig.peripherals | 4 +- soc/silabs/silabs_s2/Kconfig | 23 ++++++++++ 18 files changed, 136 insertions(+), 38 deletions(-) create mode 100644 dts/bindings/bluetooth/ble-radio.yaml create mode 100644 dts/bindings/net/wireless/radio.yaml diff --git a/drivers/bluetooth/hci/Kconfig.silabs b/drivers/bluetooth/hci/Kconfig.silabs index 74e5094653b0c..74188c1f1387d 100644 --- a/drivers/bluetooth/hci/Kconfig.silabs +++ b/drivers/bluetooth/hci/Kconfig.silabs @@ -26,6 +26,7 @@ config BT_SILABS_EFR32 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 @@ -34,10 +35,20 @@ config BT_SILABS_EFR32 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 + # 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. @@ -101,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/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/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..a77bf11a2217f 100644 --- a/dts/bindings/net/wireless/nordic,nrf-radio.yaml +++ b/dts/bindings/net/wireless/nordic,nrf-radio.yaml @@ -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/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/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 From 9a193478b9512fa972de6bb70077993f825070d8 Mon Sep 17 00:00:00 2001 From: Ivan Pankratov Date: Fri, 31 Oct 2025 14:26:59 +0200 Subject: [PATCH 04/21] dts: bindings: Rename generic-fem-two-ctrl-pins to radio-fem-two-ctrl-pins Rename generic FEM binding to use 'radio-' prefix for consistency with other radio bindings (radio.yaml, ble-radio.yaml). Updated 3 board files, Nordic BLE controller HAL, documentation, and test overlays. Added missing settle-time properties to pan1783a board. Upstream-status: available Signed-off-by: Ivan Pankratov (cherry picked from commit 6ccc58a8f610a211721b46a8be9747caed8c544a) --- boards/ezurio/bl654_dvk/bl654_dvk_nrf52840_pa.dts | 2 +- boards/panasonic/pan1783/pan1783a_pa_evb_nrf5340_cpunet.dts | 4 +++- boards/u-blox/ubx_bmd345eval/ubx_bmd345eval_nrf52840.dts | 2 +- dts/bindings/net/wireless/nordic,nrf-radio.yaml | 2 +- ...ic-fem-two-ctrl-pins.yaml => radio-fem-two-ctrl-pins.yaml} | 2 +- .../controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem.h | 4 ++-- .../ll_sw/nordic/hal/nrf5/radio/radio_nrf5_fem_generic.h | 2 +- tests/bluetooth/init/pa_lna.overlay | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) rename dts/bindings/net/wireless/{generic-fem-two-ctrl-pins.yaml => radio-fem-two-ctrl-pins.yaml} (97%) 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/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/dts/bindings/net/wireless/nordic,nrf-radio.yaml b/dts/bindings/net/wireless/nordic,nrf-radio.yaml index a77bf11a2217f..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 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/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>; From 8e2494788f65591ff155d234bbb153c68ea1e044 Mon Sep 17 00:00:00 2001 From: Ivan Pankratov Date: Fri, 31 Oct 2025 14:41:47 +0200 Subject: [PATCH 05/21] dts: bindings: Rename gpio-radio-coex to radio-gpio-coex Rename GPIO coex binding to use 'radio-' prefix for consistency with other radio bindings (radio.yaml, radio-fem-two-ctrl-pins.yaml). Updated beacon sample overlay and coex documentation. Upstream-status: available Signed-off-by: Ivan Pankratov (cherry picked from commit a44583c8f4475dd3ea17295dc7c3b637f889ea15) --- .../net/wireless/{gpio-radio-coex.yaml => radio-gpio-coex.yaml} | 2 +- samples/bluetooth/beacon/boards/nrf52840dk_nrf52840.overlay | 2 +- subsys/bluetooth/controller/coex/Kconfig | 2 +- subsys/bluetooth/controller/coex/coex_ticker.c | 2 +- subsys/bluetooth/controller/coex/readme.rst | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename dts/bindings/net/wireless/{gpio-radio-coex.yaml => radio-gpio-coex.yaml} (97%) 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/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/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>; }; From 19a1f76ba3207d13b0b6f8fe84c4e9b3f4393548 Mon Sep 17 00:00:00 2001 From: Sai Santhosh Malae Date: Sun, 16 Nov 2025 16:59:01 +0530 Subject: [PATCH 06/21] drivers: watchdog: siwx91x: Fix pause in sleep The watchdog timer on SiWx91x devices is designed to pause during deep-sleep and resume after wakeup. However, an incorrect check in`wdt_setup` was preventing this intended behavior. This patch removes the check, restoring the correct pause-in-sleep functionality. Upstream-status: available Signed-off-by: Sai Santhosh Malae (cherry picked from commit d83740f2d89dbab846c8525bcfe4e545c8bda321) --- drivers/watchdog/wdt_silabs_siwx91x.c | 4 ---- 1 file changed, 4 deletions(-) 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); From cc6682122856b5cc1c8231e563d16c9238df3f2d Mon Sep 17 00:00:00 2001 From: Sai Santhosh Malae Date: Sun, 16 Nov 2025 17:08:15 +0530 Subject: [PATCH 07/21] tests: watchdog: wdt_basic_api: Enable PM Add a new test for enabling device runtime PM for siwx917_rb4338a Upstream-status: available Signed-off-by: Sai Santhosh Malae (cherry picked from commit a80855354c83fe5cb253428f9a75502407a12aa8) --- tests/drivers/watchdog/wdt_basic_api/testcase.yaml | 6 ++++++ 1 file changed, 6 insertions(+) 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 From a0e086ffdd70e2ce1193cf471f7bdd0c0838a1c6 Mon Sep 17 00:00:00 2001 From: Aksel Skauge Mellbye Date: Thu, 27 Nov 2025 10:30:42 +0100 Subject: [PATCH 08/21] soc: silabs: Fix clock control dependency declarations Most drivers for Series 2 depend on clock control, but didn't declare it. Enable clock control by default for Series 2 SoCs. Upstream-status: available Signed-off-by: Aksel Skauge Mellbye (cherry picked from commit a83b19b3f93efa7f1bf47c16e05a47642be58e37) --- drivers/adc/Kconfig.silabs | 1 + drivers/comparator/Kconfig.silabs_acmp | 1 + drivers/dac/Kconfig.silabs | 1 + drivers/gpio/Kconfig.silabs | 1 + drivers/i2c/Kconfig.silabs | 1 + drivers/pwm/Kconfig.silabs | 2 ++ drivers/retained_mem/Kconfig.silabs | 1 + drivers/spi/Kconfig.silabs_eusart | 1 + soc/silabs/silabs_s2/Kconfig.defconfig | 3 +++ 9 files changed, 12 insertions(+) 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/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/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/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/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 From 847516c14e7865ea7162d73f73bb4f78c39657b6 Mon Sep 17 00:00:00 2001 From: Martin Hoff Date: Wed, 26 Nov 2025 16:06:59 +0100 Subject: [PATCH 09/21] drivers: power_domain: siwx91x: fix the link between pd and cpu state This patch is needed to block the pm_state "PM_STATE_SUSPEND_TO_IDLE" when a device on the power domain (actually all the peripherals) is active. Without this patch, cpu can decide to go to deep sleep while a peripheral is active. Upstream-status: available Signed-off-by: Martin Hoff (cherry picked from commit b78fe9f1aae101287e1679e7d500e91e0124b7f8) --- drivers/power_domain/power_domain_silabs_siwx91x.c | 4 +++- dts/arm/silabs/siwg917.dtsi | 1 + soc/silabs/silabs_siwx91x/Kconfig.defconfig | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) 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/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/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 From f2c5e956bae203eb9f734048c03b09038236ccf0 Mon Sep 17 00:00:00 2001 From: Martin Hoff Date: Wed, 26 Nov 2025 16:15:23 +0100 Subject: [PATCH 10/21] drivers: spi: siwx91x: ensure device runtime is released on error Added calls to pm_device_runtime_put() to ensure proper device runtime management when configuration or DMA transceive operations fail. Upstream-status: available Signed-off-by: Martin Hoff (cherry picked from commit d5c45b10e538e5db2164e086cd9e827f95062d24) --- drivers/spi/spi_silabs_siwx91x_gspi.c | 4 ++++ 1 file changed, 4 insertions(+) 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 */ From 14ada0bc23c6abb22f1a47fe1d71313b0ec37a1c Mon Sep 17 00:00:00 2001 From: Martin Hoff Date: Wed, 26 Nov 2025 16:34:45 +0100 Subject: [PATCH 11/21] drivers: dma: siwx91x: replace pm_state with pm_device (udma and gpdma) Removed unnecessary power management state lock calls since the DMA is on a power domain that already handles state locking. It will now managed directly pm_device which will active power_domain and then block pm_state. Upstream-status: available Signed-off-by: Martin Hoff (cherry picked from commit aa315948dc513eb48b7b2d3a2621ad6171ddb748) --- drivers/dma/dma_silabs_siwx91x.c | 27 +++++---------- drivers/dma/dma_silabs_siwx91x_gpdma.c | 46 ++++++++++++++------------ 2 files changed, 32 insertions(+), 41 deletions(-) diff --git a/drivers/dma/dma_silabs_siwx91x.c b/drivers/dma/dma_silabs_siwx91x.c index 21b06bc598158..68792c932fa7f 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) { + 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(); } } From ef286cb4893892c64849a0f48f8580e28090f176 Mon Sep 17 00:00:00 2001 From: Martin Hoff Date: Wed, 26 Nov 2025 16:35:35 +0100 Subject: [PATCH 12/21] drivers: dma: siwx91x: fix interrupt flag reset This patch fix a reg write that needs to be done before calling the callback. Since the user can start a new dma transfer in the callback, it can miss the interrupt from the new transfer if the new transfer is done before the interrupt bit is cleared. Upstream-status: available Signed-off-by: Martin Hoff (cherry picked from commit 8f4f1efc86d89140fc31502bf3d1475b0e3f5722) --- drivers/dma/dma_silabs_siwx91x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/dma_silabs_siwx91x.c b/drivers/dma/dma_silabs_siwx91x.c index 68792c932fa7f..be8171f4d0c96 100644 --- a/drivers/dma/dma_silabs_siwx91x.c +++ b/drivers/dma/dma_silabs_siwx91x.c @@ -669,6 +669,7 @@ 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; @@ -678,7 +679,6 @@ static void siwx91x_dma_isr(const struct device *dev) 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); } else { /* Call UDMA ROM IRQ handler. */ ROMAPI_UDMA_WRAPPER_API->uDMAx_IRQHandler(&udma_resources, udma_resources.desc, From 58e1a5c3305b31eb5be8ac20f0f252665238e00e Mon Sep 17 00:00:00 2001 From: Martin Hoff Date: Wed, 26 Nov 2025 18:00:32 +0100 Subject: [PATCH 13/21] drivers: i2s: siwx91x: ensure device runtime is released Removed conditional checks for device runtime put in DMA RX and TX callbacks, ensuring that device runtime is always released asynchronously. Upstream-status: available Signed-off-by: Martin Hoff (cherry picked from commit d02cdc734e6e4ad83960a7b97787729509c848b2) --- drivers/i2s/i2s_silabs_siwx91x.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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) From 3f6f568f8611db8e9a23a918fb69b3314d729307 Mon Sep 17 00:00:00 2001 From: Martin Hoff Date: Thu, 27 Nov 2025 14:08:26 +0100 Subject: [PATCH 14/21] soc: silabs: siwx91x: removed sscanf for nwp firmware version check This patch removes the use of sscanf to maintain compatibility with tests that use the minimal cpp library. The expected version is now defined using multiple individual values rather than a single formatted string. Upstream-status: available Signed-off-by: Martin Hoff (cherry picked from commit 29fb893bab67b2b12c22aee88b979344d2042dcf) --- modules/hal_silabs/wiseconnect/CMakeLists.txt | 1 + .../hal_silabs/wiseconnect/nwp_fw_version.c | 21 +++++++++ .../hal_silabs/wiseconnect/nwp_fw_version.h | 7 ++- .../silabs_siwx91x/siwg917/siwx91x_nwp.c | 45 +++++++++---------- 4 files changed, 46 insertions(+), 28 deletions(-) create mode 100644 modules/hal_silabs/wiseconnect/nwp_fw_version.c 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/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)) { From daae59b631a507ca18faf49bf77edf44ac816e4d Mon Sep 17 00:00:00 2001 From: Muzaffar Ahmed Date: Thu, 20 Nov 2025 16:05:01 +0530 Subject: [PATCH 15/21] drivers: wifi: siwx91x: Fix AP mode channel status when using auto channel Fixes the auto channel status by using the channel number from fetched wireless info, rather than the input config variable. Upstream-status: available Signed-off-by: Muzaffar Ahmed (cherry picked from commit f0454eb8b169d3d38e993ccfb19242326408ba5e) --- drivers/wifi/siwx91x/siwx91x_wifi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/wifi/siwx91x/siwx91x_wifi.c b/drivers/wifi/siwx91x/siwx91x_wifi.c index b6d9c4bbc4865..c6dcbf1e4d395 100644 --- a/drivers/wifi/siwx91x/siwx91x_wifi.c +++ b/drivers/wifi/siwx91x/siwx91x_wifi.c @@ -122,7 +122,7 @@ int siwx91x_status(const struct device *dev, struct wifi_iface_status *status) 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; wlan_info.sec_type = (uint8_t)sl_ap_cfg.security; From ebf609a6d6f8969b573330da327acd83b1da69bb Mon Sep 17 00:00:00 2001 From: S Mohamed Fiaz Date: Fri, 14 Nov 2025 18:21:30 +0530 Subject: [PATCH 16/21] tests: drivers: pwm: Add pwm_api overlay and update yaml file This commit adds the pwm overlay file for the brd4342a board, enabling pwm support and also updates the pwm tag in siwx917_dk2605a.yaml. Upstream-status: available Signed-off-by: S Mohamed Fiaz (cherry picked from commit c8fa6c8d341b2e90a023bc55ca8a81586fe0f563) --- .../siwx917_dk2605a/siwx917_dk2605a.yaml | 1 + .../pwm_api/boards/siwx917_rb4342a.overlay | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/drivers/pwm/pwm_api/boards/siwx917_rb4342a.overlay 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/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"; +}; From c9b76e68937386df619878d62b6d773168e767ce Mon Sep 17 00:00:00 2001 From: S Mohamed Fiaz Date: Fri, 14 Nov 2025 18:27:58 +0530 Subject: [PATCH 17/21] tests: drivers: counter: Add counter_basic_api overlay file This commit adds the counter_basic_api overlay file for the brd4338a board,enabling counter support. Upstream-status: available Signed-off-by: S Mohamed Fiaz (cherry picked from commit 8c5e3d05b5f7e3729fca9c6ff324b52f57c136ff) --- .../counter_basic_api/boards/siwx917_rb4338a.overlay | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/drivers/counter/counter_basic_api/boards/siwx917_rb4338a.overlay 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"; +}; From 58255cd26627d18fff3f0926c57a72c1ff95a8df Mon Sep 17 00:00:00 2001 From: S Mohamed Fiaz Date: Fri, 14 Nov 2025 18:33:17 +0530 Subject: [PATCH 18/21] tests: drivers: rtc: Add rtc_api overlay and update yaml file This commit adds the rtc_api overlay file for the brd4342a board, enabling rtc support and also updates the rtc tag in siwx917_rb4342a.yaml. Upstream-status: available Signed-off-by: S Mohamed Fiaz (cherry picked from commit 8dda8fc1a66e8062e0cf4992be705460030dfd00) --- .../siwx917_rb4342a/siwx917_rb4342a.yaml | 1 + .../rtc/rtc_api/boards/siwx917_rb4342a.overlay | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/drivers/rtc/rtc_api/boards/siwx917_rb4342a.overlay 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/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"; +}; From b893a989cbc1323f3220ae28b8f9927baa321bf8 Mon Sep 17 00:00:00 2001 From: S Mohamed Fiaz Date: Fri, 14 Nov 2025 17:18:11 +0530 Subject: [PATCH 19/21] tests: dma: siwx917_rb4342a: Add chan_blen_transfer overlay files This commit adds the DMA overlay and config file for the brd4342a board, enabling chan_blen_transfer support in Zephyr. Upstream-status: available Signed-off-by: S Mohamed Fiaz (cherry picked from commit 08b55fae92ba81e3cc02e9e24a2b9d67f0f0b03e) --- .../chan_blen_transfer/boards/siwx917_rb4342a.conf | 2 ++ .../chan_blen_transfer/boards/siwx917_rb4342a.overlay | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 tests/drivers/dma/chan_blen_transfer/boards/siwx917_rb4342a.conf create mode 100644 tests/drivers/dma/chan_blen_transfer/boards/siwx917_rb4342a.overlay 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 {}; From 656dc91284c63872d50c0c51d3f27e224f9bf226 Mon Sep 17 00:00:00 2001 From: Aksel Skauge Mellbye Date: Fri, 28 Nov 2025 12:34:19 +0100 Subject: [PATCH 20/21] drivers: entropy: gecko_trng: Fully initialize on read If the TRNG has been unretained, it's not sufficient to enable the clock, it must be fully reinitialized. This is a minimal fix to ensure entropy is accumulated after sleep. Long term, this driver should be made to use device power management with power domain awareness. Upstream-status: available Signed-off-by: Aksel Skauge Mellbye (cherry picked from commit e61c04e05d6e10e621e1a26651dc8050c3b4622d) --- drivers/entropy/entropy_gecko_trng.c | 40 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) 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 From 50aafe1d77fd986947b2aa23cb3b0342e0434f3f Mon Sep 17 00:00:00 2001 From: Muzaffar Ahmed Date: Mon, 24 Nov 2025 14:15:40 +0530 Subject: [PATCH 21/21] drivers: wifi: siwx91x: Fix link mode query for AP mode in channel 14 Add a channel check to update the link mode in wifi status query. Upstream-status: available Signed-off-by: Muzaffar Ahmed (cherry picked from commit d31c6e95033fd6b3763389edba6a655245ae1328) --- drivers/wifi/siwx91x/siwx91x_wifi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/wifi/siwx91x/siwx91x_wifi.c b/drivers/wifi/siwx91x/siwx91x_wifi.c index c6dcbf1e4d395..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 = 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 {