Skip to content

Fix Siwx91x SPI - #26

Merged
Aksel Mellbye (asmellby) merged 3 commits into
SiliconLabsSoftware:silabs/devfrom
jerome-pouiller:fix-spi-2-downstream
Jul 7, 2026
Merged

Aksel Mellbye (asmellby) merged 3 commits into
SiliconLabsSoftware:silabs/devfrom
jerome-pouiller:fix-spi-2-downstream

Conversation

@jerome-pouiller

Copy link
Copy Markdown

Cherry-pick the upstream patches.

When the SPI hardware block is use to send data (without receiving any
data), the DMA callback is called when the data are transmitted to the SPI
controller, but before the data are actually sent over the wire.

Then, the chip-select signal could be released while the Tx was still in
progress.

Upstream-status: pr
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 79d5276)
The siwx91x SPI driver required to wait for a very small amouth of time
(100ns to 50µs).

When CONFIG_PM is enabled, the granularity of k_busy_wait() is not
sufficient (~32µs). So, the driver implement a raw busy loop.

This busy loop depends on the frequency of the CPU. This was wrongly
retrieved from CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC.
DT_PROP(DT_NODELABEL(cpu0), clock_frequency) is more accurate.

Upstream-status: pr
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 8db4d92)
With CONFIG_PM=y, the duration of the SPI transfer is slightly longer.

Upstream-status: pr
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
(cherry picked from commit 7b1c961)
@jerome-pouiller Jérôme Pouiller (jerome-pouiller) changed the title Fix spi 2 downstream Fix Siwx91x SPI Jul 7, 2026
@asmellby
Aksel Mellbye (asmellby) merged commit f60fcfc into SiliconLabsSoftware:silabs/dev Jul 7, 2026
3 checks passed
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.

2 participants