Skip to content

Commit

Permalink
tests: drivers: spi: spi_loopback: Added mimxrt1170_evk_cm7
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
EmilioCBen authored and jhedberg committed Oct 14, 2023
1 parent 17032a0 commit b961338
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boards/arm/mimxrt1170_evk/mimxrt1170_evk_cm7.dts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ zephyr_mipi_dsi: &mipi_dsi {
};

&lpspi1 {
dmas = <&edma0 0 36>, <&edma0 1 37>;
dma-names = "rx", "tx";
status = "okay";
};

Expand Down
2 changes: 2 additions & 0 deletions boards/arm/mimxrt1170_evk/mimxrt1170_evkb_cm4.dts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
};

&lpspi1 {
dmas = <&edma_lpsr0 0 36>, <&edma_lpsr0 1 37>;
dma-names = "rx", "tx";
status = "okay";
};

Expand Down
2 changes: 2 additions & 0 deletions boards/arm/twr_ke18f/twr_ke18f.dts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@
};

&lpspi0 {
dmas = <&edma 0 14>, <&edma 1 15>;
dma-names = "rx", "tx";
status = "okay";
pinctrl-0 = <&lpspi0_default>;
pinctrl-names = "default";
Expand Down
6 changes: 6 additions & 0 deletions tests/drivers/spi/spi_loopback/boards/mimxrt1170_evk_cm7.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# Copyright 2023 NXP
#
# SPDX-License-Identifier: Apache-2.0
#
CONFIG_SPI_MCUX_LPSPI_DMA=y
18 changes: 18 additions & 0 deletions tests/drivers/spi/spi_loopback/boards/mimxrt1170_evk_cm7.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright 2023 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

&lpspi1 {
slow@0 {
compatible = "test-spi-loopback-slow";
reg = <0>;
spi-max-frequency = <500000>;
};
fast@0 {
compatible = "test-spi-loopback-fast";
reg = <0>;
spi-max-frequency = <16000000>;
};
};
14 changes: 14 additions & 0 deletions tests/drivers/spi/spi_loopback/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ tests:
drivers.spi.loopback: {}
drivers.spi.loopback.internal:
filter: CONFIG_SPI_LOOPBACK_MODE_LOOP
drivers.spi.loopback.lpspi.dma:
filter: CONFIG_HAS_MCUX_LPSPI and CONFIG_HAS_MCUX_EDMA
extra_configs:
- CONFIG_SPI_MCUX_LPSPI_DMA=y
drivers.spi.loopback.lpspi.async.unset:
filter: CONFIG_HAS_MCUX_LPSPI and CONFIG_HAS_MCUX_EDMA
extra_configs:
- CONFIG_SPI_MCUX_LPSPI_DMA=n
- CONFIG_SPI_ASYNC=n
drivers.spi.loopback.lpspi.dma.async.unset:
filter: CONFIG_HAS_MCUX_LPSPI and CONFIG_HAS_MCUX_EDMA
extra_configs:
- CONFIG_SPI_MCUX_LPSPI_DMA=y
- CONFIG_SPI_ASYNC=n
drivers.spi.loopback.rtio:
extra_configs:
- CONFIG_SPI_RTIO=y
Expand Down

0 comments on commit b961338

Please sign in to comment.