Skip to content

Cherry-pick from upstream#13

Merged
Aksel Mellbye (asmellby) merged 42 commits into
SiliconLabsSoftware:silabs/devfrom
asmellby:feature/cherry-pick-fixes
Jun 4, 2026
Merged

Cherry-pick from upstream#13
Aksel Mellbye (asmellby) merged 42 commits into
SiliconLabsSoftware:silabs/devfrom
asmellby:feature/cherry-pick-fixes

Conversation

@asmellby

Copy link
Copy Markdown

Cherry-pick commits from 10 upstream merged PRs containing fixes for SiWx917 and the initial 15.4 driver for Series 2.

In AP mode, there is not enough heap memory in NWP for a WPA2 connection's
crypto operations. This issue was reported earlier and was fixed in NWP
by reserving 5kB extra memory in TCP/IP bypass mode. However this was
pushed as a hotfix and the fix was lost in the next release.

The NWP code is frozen now and the workaround to fix this issue is to
enable a feature which reserves ~5kB memory.

Removing this macro enables WPS and reserves an 5k extra memory in NWP.
It does not affect any other functionality (such as Wi-Fi IEs).

Upstream-status: available
Signed-off-by: Muzaffar Ahmed <muzaffar.ahmed@silabs.com>
(cherry picked from commit 54d512e)
The NWP ignored the host programmed listen_interval and fell back to
its ~1s default, so both WIFI_PS_WAKEUP_MODE_LISTEN_INTERVAL and
WIFI_PS_WAKEUP_MODE_DTIM woke the device roughly once per second
regardless of the AP's DTIM period or the host-requested LI.

Set SL_WIFI_JOIN_FEAT_PS_CMD_LISTEN_INTERVAL_VALID in
siwx91x_iface_init() so the NWP honors the listen_interval supplied
via the host-side power-save command path (i.e. the value programmed
through sl_wifi_set_performance_profile_v2()) instead of substituting
its built-in default.

Upstream-status: available
Signed-off-by: Tejus Subramanya <ters@silabs.com>
(cherry picked from commit 0ade264)
Introduces SYS_MEM_BLOCKS_DEFINE_TYPE() and
SYS_MEM_BLOCKS_DEFINE_STATIC_TYPE() helpers to allow the user to declare
mem blocks without having to manually ensure the alignment is correct,
which was very error-prone.

Matches the new K_MEM_SLAB_DEFINE_TYPE.

Upstream-status: available
Signed-off-by: Egill Sigurdur <egill@egill.xyz>
(cherry picked from commit a23abac)
SiWx91x provide two DMA hardware block: GPDMA and UDMA, The GPDMA is
properly named: silabs,gpdma. However, the UDMA is named
"silabs,siwx91x-dma" without any reference to the hardware block it is
supposed to run.

Rename the UDMA driver to fix this inconsistency.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 4c55936)
The GPDMA rejected any block whose size exceeded
GPDMA_DESC_MAX_TRANSFER_SIZE (4096 transfers). The was caller responsible
for splitting. There is no way for the caller to be aware of this
restriction.

This patch allow the GPDMA driver to automatically split the oversized
block and run the DMA with a linked descriptors.

Upstream-status: available
Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 527b04e)
The UDMA scatter-gather mode rejected any block whose size exceeded
DMA_MAX_TRANSFER_COUNT * burst_length bytes (1024 transfers). The was
caller responsible for splitting.

Apply the same fix as the GPDMA driver: when a dma_block_config block is
too large for a single scatter-gather descriptor, automatically split it
into as many chained descriptors as needed, advancing src/dst addresses
for each chunk (honoring DMA_ADDR_ADJ_INCREMENT / DMA_ADDR_ADJ_NO_CHANGE).

Upstream-status: available
Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 09d988e)
Until now, the SPI driver had to take care about the size of the blocks
sent to the DMA. There were several drawbacks:
  - The SPI driver need to know the DMA internal parameter and the SPI
    driver has configured for a specific DMA hardware block.
  - For large transfer, the user has to allocate a large number of
    descriptor in the SPI driver. The user had to know the DMA block size
    of set the right parameter and the descriptors were duplicated with the
    DMA driver (which store them in the hardware format).

However, our DMA drivers now automatically split the large blocks. So the
SPI driver no longer need to do that.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 7b8aadc)
GSPI can now run with UDMA, so let's test it.

In addition, remove drivers.spi.silabs_siwx91x.loopback since it is the
exact same than drivers.spi.loopback.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 52f411f)
SPI_SILABS_SIWX91X_GSPI_DMA and SPI_SILABS_SIWX91X_GSPI_DMA_MAX_BLOCKS are
redundant. We can achieve the same by checking if
SPI_SILABS_SIWX91X_GSPI_DMA_MAX_BLOCKS > 0.

Then, rather than pulling the DMA if one device use it, automatically use
the DMA it exist (the user can still disable it by settings DMA_MAX_BLOCKS
== 0).

Thanks to that change, we can remove allthe #ifdef in the SPI driver.
A test in spi_siwx91x_is_dma_enabled_instance() is sufficient to make the
DMA relative functions orphans.

Then, we can enable the dma instances in the board DTS, so the user just
have to set DMA=y to enable DMA in the drivers.

The two errors cases are:
  - DMA=y while referenced DMA instance in the DT is disabled. The user get
    a compilation error
  - DMA=n (or DMA driver is disabled) but the user explicitly set
    DMA_MAX_BLOCKS > 0. The user get an error during runtime.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 233545d)
We try to prefix all the symbols in a file with the same prefix (so the
developer easily understand if a symbols is provided by Zephyr, the HAL or
is internal to the driver).

A few symbols in dma_silabs_siwx91x_gpdma.c did not follow this rule.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit f160041)
Rather than using internal enum type to store the direction, store the
native (Zephyr) value. It will help to simplify the code in the next
changes.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 08e6898)
The UDMA drivers includes some functions to translate Zephyr values in
hardware values. However, these conversion are either trivial or not very
consistent. It is more readable to directly work with the native (Zephyr)
values. We just have to check the values requested by the caller are valid
before the processing.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit c618108)
Sanity checks were duplicated in siwx91x_udma_config_sg() and
siwx91x_udma_config_single(). Move them in the caller function.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit f51b9f3)
We try to prefix all the symbols in a file with the same prefix (so the
developer easily understand if a symbols is provided by Zephyr, the HAL or
is internal to the driver).

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 77043c2)
Some fields names contained irrelevant information (eg. "addr" in
"sg_desc_addr_info" and in "sram_desc_addr", "dma" in "dma_desc_pool").

In other case, it lacked of consistency, (eg. "chan" vs "channel",
"config_zephyr" vs "dma_config" vs "config").

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 961e4f5)
Compliance check complains about long lines.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 33cb6c4)
…ad()

Scatter Gather transfers are not supported by siwx91x_udma_reload(). Detect
and reject them.

Also check the size of valid regarding the operation width.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit bcbd445)
By replacing "udma_table = cfg->chan_desc" by "chan_desc =
&cfg->chan_desc[channel]", we can simply many statements. So, all the
statements now fits on one line.

desc_src_addr and desc_dst_addr are in fact useless.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit e0cd726)
Add a bit of history about the driver (the information I would like to
forward to my future me). Try to explain why this driver has this design.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 4552041)
Defining a Kconfig symbol several times is dangerous. It is better to use
configdefault for the CMSIS related symbols.

Bluetooth configdefault depends on NWP driver. It is more accurate to
depend on the Si91x Bluetooth driver.

Finally, configdefault is supposed to be only used in Kconfig.defconfig
files. So, relocate BT_HCI_ACL_FLOW_CONTROL.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 0e5dde8)
SLI_SI91X_ENABLE_OS and SL_SI91X_SI917_RAM_MEM_CONFIG are not specific to
the Network Co-Processor. They are also required by the Sleeptimer and for
deep sleep.

It is expected that Sleeptimer and Power Management will eventually be
usable without enabling the NWP. Move these definitions outside of the
CONFIG_SILABS_SIWX91X_NWP guard so they are always applied. This has no
impact on current builds since the NWP is always enabled alongside these
features today.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 0da5f29)
There were no reason to use integers for WIFI_SILABS_SIWX91X_ADV_MULTIPROBE
parameter.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 8fa9d53)
Reorganize the Kconfig options in preparation for a future rework of the
Wi-Fi driver. The new ordering groups related options together:

   1. Hidden configdefault entries that tune network stack parameters
   2. Native vs. offloaded network stack choice
   3. Driver feature options
   4. Scan and roaming fine-tuning options

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit aa07229)
Until now, the siwx91x wifi driver used the default log level. It make more
sense to the use the log level provided b the Wifi subsystem.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 77ae17a)
WIFI_SILABS_SIWX91X_FEAT_HIDE_PSK_CREDENTIALS impacted the way the NWp
print the log message. However, these logs are not available on production
firmware. So, it does not make sense to expose this parameter.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 985f66c)
The Zephyr implementation (and more importantly, the version of WiseConnect
SDK used in the HAL) strictly depends on a specific version of the NWP
firmware.

However, the current check prevents the user from running a newer release
of the NWP firmware. Let's relax this test to only check if the patch
number is older than what we expect.

In addition, since we bundle a copy of the NWP firmware with Zephyr (via
west blob), there are fewer risks of mismatch than when we introduced this
restriction.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit bd1aa44)
This way of allocating stack is not longer used by the NWP firmware for a
while.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 06885f6)
These pin are currently managed by the HAL. However, for the consistency,
this patch enforces their declaration in the Device Tree.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 431c3d1)
siwx91x_rb4342 uses internal antenna selection while siwx91x_rb4338 use
external antenna selection.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 18f6351)
For now, these registers are not yet used. They allows to clarify the
resources used by the NWP device.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 4ffd937)
"Doxygen Coverage Check" complained about the lack of documentation of
siwx91x-pinctrl.h.

Add a few lines of comments inspired by the other Silabs pinctrl headers
files.

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 413aea4)
siwx91x has a platform specific bootloader. Therefore, mcuboot is not
supporter and the user has to use a specific API to upgrade the firmware.
This API is already available on Zephyr through
CONFIG_SIWX91X_FIRMWARE_UPGRADE. However, no example code was provided.

This patch introduces "silabs fota <URL>" shell command that can be used as
an example for firmware update implementation.

The TLS capability is not mandatory for this example. For the record, I
have tested https capability on siwx917_rb4338a with samples/net/wifi/shell
and these parameters:

CONFIG_SIWX91X_FIRMWARE_UPGRADE=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
CONFIG_MBEDTLS_CIPHERSUITE_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256=y
CONFIG_NET_SOCKETS_TLS_CONNECT_TIMEOUT=30000
CONFIG_PSA_WANT_ALG_SHA_384=y
CONFIG_NET_BUF_RX_COUNT=80
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=4096

Upstream-status: available
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 4a5b34d)
Move header for IEEE 802.15.4-2020 constants from subsystem
location to common for usage by 15.4 radio device drivers.

Upstream-status: available
Signed-off-by: David Boullie <David.Boullie@silabs.com>
(cherry picked from commit ba3984a)
Add IEEE 802.15.4 radio driver configuration option to set the CSMA CA
backoff attempts from IEEE 802.15.4-2003+ MAC PIB attributes.

Upstream-status: available
Signed-off-by: David Boullie <David.Boullie@silabs.com>
(cherry picked from commit 26decd7)
Extend enum ieee802154_rx_fail_reason and map them
to OT errors. This ensures that otPlatRadioReceiveDone is
handled as per Openthread spec.

Upstream-status: available
Signed-off-by: sree sreerajatha <sree.sreerajatha@silabs.com>
(cherry picked from commit 6fbd02b)
Add the driver itself and Kconfig/CMakeLists/dts/bindings related to it.
Other files and libraries needed are in Silabs' dedicated folder
hal_silabs (modules/hal/silabs).

Upstream-status: available
Co-Authored-by: David Boullie <David.Boullie@silabs.com>
Co-Authored-by: Sree Sreerajatha <sree.sreerajatha@silabs.com>
Signed-off-by: David Boullie <David.Boullie@silabs.com>
(cherry picked from commit bd89985)
Add inclusion of RAIL headers.

Upstream-status: available
Co-Authored-by: David Boullie <David.Boullie@silabs.com>
Co-Authored-by: Sree Sreerajatha <sree.sreerajatha@silabs.com>
Signed-off-by: David Boullie <David.Boullie@silabs.com>
(cherry picked from commit e8cc863)
Add compilation of sl_openthread library to silabs 15.4 radio
driver to enable RAIL operations for OpenThread.

Upstream-status: available
Co-Authored-by: David Boullie <David.Boullie@silabs.com>
Co-Authored-by: Sree Sreerajatha <sree.sreerajatha@silabs.com>
Signed-off-by: David Boullie <David.Boullie@silabs.com>
(cherry picked from commit 3fcb146)
Add proper defconfig settings for OpenThread and Multiprotocol
applications.

Upstream-status: available
Co-Authored-by: David Boullie <David.Boullie@silabs.com>
Co-Authored-by: Sree Sreerajatha <sree.sreerajatha@silabs.com>
Signed-off-by: David Boullie <David.Boullie@silabs.com>
(cherry picked from commit e5cc9f2)
Added IEEE 802.15.4 driver support for
Silabs xg24 boards.

Upstream-status: available
Co-Authored-by: David Boullie <David.Boullie@silabs.com>
Co-Authored-by: Sree Sreerajatha <sree.sreerajatha@silabs.com>
Signed-off-by: David Boullie <David.Boullie@silabs.com>
(cherry picked from commit 66982c7)
Add Silabs xg24 board support for OT Shell sample.

Upstream-status: available
Co-Authored-by: David Boullie <David.Boullie@silabs.com>
Co-Authored-by: Sree Sreerajatha <sree.sreerajatha@silabs.com>
Signed-off-by: David Boullie <David.Boullie@silabs.com>
(cherry picked from commit 3e720dd)
WiseConnect zeros the BT half of its cached coex performance profile
on every Wi-Fi disconnect, leaving BT out of power save and preventing
the NWP from sleeping after re-association.

Delegate Wi-Fi power-save to siwx91x_nwp_apply_power_profile(), which
already owns both BT and Wi-Fi halves of the coex profile. Extend the
helper to accept an optional sl_wifi_performance_profile_v2_t override
so the Wi-Fi driver can pass its tailored profile (listen_interval,
dtim_aligned_type, monitor_interval); BT-only and init call sites pass
NULL to keep their current behaviour.

Upstream-status: available
Signed-off-by: Tejus Subramanya <ters@silabs.com>
(cherry picked from commit 1e044f6)
@jhedberg

Copy link
Copy Markdown

Aksel Mellbye (@asmellby) do you intend to keep updating this as more upstream PRs are identified, or we merge this and do another later PR if necessary?

@asmellby

Copy link
Copy Markdown
Author

Aksel Mellbye (Aksel Mellbye (@asmellby)) do you intend to keep updating this as more upstream PRs are identified, or we merge this and do another later PR if necessary?

I was intending to merge this now and open another PR tomorrow.

@asmellby Aksel Mellbye (asmellby) merged commit 0724048 into SiliconLabsSoftware:silabs/dev Jun 4, 2026
2 checks passed
@jerome-pouiller

Copy link
Copy Markdown

Would you mind to apply the commits in the same order than the upstream? So output of git log --oneline --author=silabs is more or less the same than the commit in the downstream?

@asmellby

Copy link
Copy Markdown
Author

Would you mind to apply the commits in the same order than the upstream? So output of git log --oneline --author=silabs is more or less the same than the commit in the downstream?

Within each PR they are in order, and the PRs are generally in the order the backports were requested. But if something got hung up in the upstream process I haven't spent time on replicating the exact order between unrelated changes. I don't think that is a worthwhile use of time.

In either case, it's too late for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants