Skip to content

Commit 8e57cc6

Browse files
smalaekartben
authored andcommitted
drivers: spi: siwx91x: spi_loopback test support
1. Add board config and overlay files 2. Update testcase.yaml Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
1 parent c22cf49 commit 8e57cc6

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_SPI_SILABS_SIWX91X_GSPI_DMA=y
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright (c) 2025 Silicon Laboratories Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl0 {
8+
spi0_default: spi0_default {
9+
out {
10+
pinmux = <GSPI_CLK_PB9>, <GSPI_MOSI_PB11>;
11+
};
12+
in {
13+
pinmux = <GSPI_MISO_PB10>;
14+
};
15+
};
16+
};
17+
18+
&spi0 {
19+
status = "okay";
20+
cs-gpios = <&gpiob 12 GPIO_ACTIVE_LOW>;
21+
pinctrl-0 = <&spi0_default>;
22+
pinctrl-names = "default";
23+
24+
dmas = <&dma0 11>, <&dma0 10>;
25+
dma-names = "tx", "rx";
26+
27+
slow@0 {
28+
compatible = "test-spi-loopback-slow";
29+
reg = <0>;
30+
spi-max-frequency = <500000>;
31+
};
32+
fast@1 {
33+
compatible = "test-spi-loopback-fast";
34+
reg = <1>;
35+
spi-max-frequency = <10000000>;
36+
};
37+
};
38+
39+
&dma0 {
40+
status = "okay";
41+
};

tests/drivers/spi/spi_loopback/testcase.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,3 +305,7 @@ tests:
305305
extra_configs:
306306
- CONFIG_SPI_SILABS_EUSART_DMA=y
307307
- CONFIG_SPI_ASYNC=n
308+
drivers.spi.silabs_siwx91x.loopback:
309+
filter: CONFIG_SOC_FAMILY_SILABS_SIWX91X
310+
platform_allow:
311+
- siwx917_rb4338a

0 commit comments

Comments
 (0)