Skip to content

Commit 87831e6

Browse files
committed
tests: drivers: spi: loopback: Add test for pico-spi-pio driver with DMA.
With the addition of a new overlay file that specifies DMA channels. Signed-off-by: Terry Geng <[email protected]>
1 parent e5a27a9 commit 87831e6

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <zephyr/dt-bindings/dma/rpi-pico-dma-rp2040.h>
2+
3+
/* This file overrides pio0_spi0 configured in ./rpi_pico_pio.overlay
4+
* and enables DMA.
5+
*/
6+
7+
&dma {
8+
status = "okay";
9+
};
10+
11+
&pio0_spi0 {
12+
dmas = <&dma 0 0 0>, <&dma 1 0 0>;
13+
dma-names = "tx", "rx";
14+
};

tests/drivers/spi/spi_loopback/testcase.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,16 @@ tests:
217217
- DTC_OVERLAY_FILE="boards/rpi_pico_pio.overlay"
218218
- EXTRA_CONF_FILE="overlay-rpi-pico-pio.conf"
219219
platform_allow: rpi_pico
220+
drivers.spi.pio_spi_dma.loopback:
221+
extra_args:
222+
- DTC_OVERLAY_FILE="boards/rpi_pico_pio.overlay"
223+
- EXTRA_DTC_OVERLAY_FILE="boards/rpi_pico_pio_dma.overlay"
224+
- EXTRA_CONF_FILE="overlay-rpi-pico-pio.conf"
225+
extra_configs:
226+
- CONFIG_SPI_RPI_PICO_PIO_DMA=y
227+
- CONFIG_DMA=y
228+
- CONFIG_PRINTK=y
229+
platform_allow: rpi_pico
220230
drivers.spi.mcux_flexio_spi.loopback:
221231
extra_args: DTC_OVERLAY_FILE="overlay-mcux-flexio-spi.overlay"
222232
filter: CONFIG_DT_HAS_NXP_FLEXIO_ENABLED and

0 commit comments

Comments
 (0)