Skip to content

Commit b961338

Browse files
EmilioCBenjhedberg
authored andcommitted
tests: drivers: spi: spi_loopback: Added mimxrt1170_evk_cm7
Added overlay inside the spi loopback test for the mimxrt1170_evk_cm7, enabled DMA and Async by default. Added testcase for async and dma. Signed-off-by: Emilio Benavente <[email protected]>
1 parent 17032a0 commit b961338

File tree

6 files changed

+44
-0
lines changed

6 files changed

+44
-0
lines changed

boards/arm/mimxrt1170_evk/mimxrt1170_evk_cm7.dts

+2
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ zephyr_mipi_dsi: &mipi_dsi {
8282
};
8383

8484
&lpspi1 {
85+
dmas = <&edma0 0 36>, <&edma0 1 37>;
86+
dma-names = "rx", "tx";
8587
status = "okay";
8688
};
8789

boards/arm/mimxrt1170_evk/mimxrt1170_evkb_cm4.dts

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
};
7272

7373
&lpspi1 {
74+
dmas = <&edma_lpsr0 0 36>, <&edma_lpsr0 1 37>;
75+
dma-names = "rx", "tx";
7476
status = "okay";
7577
};
7678

boards/arm/twr_ke18f/twr_ke18f.dts

+2
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@
266266
};
267267

268268
&lpspi0 {
269+
dmas = <&edma 0 14>, <&edma 1 15>;
270+
dma-names = "rx", "tx";
269271
status = "okay";
270272
pinctrl-0 = <&lpspi0_default>;
271273
pinctrl-names = "default";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# Copyright 2023 NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
CONFIG_SPI_MCUX_LPSPI_DMA=y
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright 2023 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&lpspi1 {
8+
slow@0 {
9+
compatible = "test-spi-loopback-slow";
10+
reg = <0>;
11+
spi-max-frequency = <500000>;
12+
};
13+
fast@0 {
14+
compatible = "test-spi-loopback-fast";
15+
reg = <0>;
16+
spi-max-frequency = <16000000>;
17+
};
18+
};

tests/drivers/spi/spi_loopback/testcase.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,20 @@ tests:
1313
drivers.spi.loopback: {}
1414
drivers.spi.loopback.internal:
1515
filter: CONFIG_SPI_LOOPBACK_MODE_LOOP
16+
drivers.spi.loopback.lpspi.dma:
17+
filter: CONFIG_HAS_MCUX_LPSPI and CONFIG_HAS_MCUX_EDMA
18+
extra_configs:
19+
- CONFIG_SPI_MCUX_LPSPI_DMA=y
20+
drivers.spi.loopback.lpspi.async.unset:
21+
filter: CONFIG_HAS_MCUX_LPSPI and CONFIG_HAS_MCUX_EDMA
22+
extra_configs:
23+
- CONFIG_SPI_MCUX_LPSPI_DMA=n
24+
- CONFIG_SPI_ASYNC=n
25+
drivers.spi.loopback.lpspi.dma.async.unset:
26+
filter: CONFIG_HAS_MCUX_LPSPI and CONFIG_HAS_MCUX_EDMA
27+
extra_configs:
28+
- CONFIG_SPI_MCUX_LPSPI_DMA=y
29+
- CONFIG_SPI_ASYNC=n
1630
drivers.spi.loopback.rtio:
1731
extra_configs:
1832
- CONFIG_SPI_RTIO=y

0 commit comments

Comments
 (0)