Skip to content

Commit 8753fef

Browse files
TerryGengkartben
authored andcommitted
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 7210087 commit 8753fef

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 14 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,14 @@ tests:
192192
- DTC_OVERLAY_FILE="boards/rpi_pico_pio.overlay"
193193
- EXTRA_CONF_FILE="overlay-rpi-pico-pio.conf"
194194
platform_allow: rpi_pico
195+
drivers.spi.pio_spi_dma.loopback:
196+
extra_args:
197+
- DTC_OVERLAY_FILE="boards/rpi_pico_pio.overlay"
198+
- EXTRA_DTC_OVERLAY_FILE="boards/rpi_pico_pio_dma.overlay"
199+
- EXTRA_CONF_FILE="overlay-rpi-pico-pio.conf"
200+
extra_configs:
201+
- CONFIG_SPI_RPI_PICO_PIO_DMA=y
202+
platform_allow: rpi_pico
195203
drivers.spi.flexio_spi.loopback:
196204
extra_args:
197205
- platform:mimxrt1170_evk/mimxrt1176/cm7:DTC_OVERLAY_FILE="boards/mimxrt1170_evk_mimxrt1176_cm7_flexio_spi.overlay"

0 commit comments

Comments
 (0)