Skip to content

Commit 81dea96

Browse files
decsnycfriedt
authored andcommitted
tests: spi_loopback: Add arduino overlay for CS test
Add overlay for arduino r3 for the CS testing enablement of the test. Since I do not know the hardware range situations of all the vendors, for now I just put this as a platform_allow for two different version LPSPI platforms. RT1050 has LPSPI v1 and MCXN has LPSPI v2. On MCXN, lower the SPI priority to let the GPIO interrupt process in time. Signed-off-by: Declan Snyder <[email protected]>
1 parent e85c5b6 commit 81dea96

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

tests/drivers/spi/spi_loopback/boards/frdm_mcxn947_mcxn947_cpu0.overlay

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,12 @@
1515
reg = <0>;
1616
spi-max-frequency = <16000000>;
1717
};
18+
19+
transfer-delay = <100>;
20+
sck-pcs-delay = <200>;
21+
pcs-sck-delay = <200>;
22+
};
23+
24+
&flexcomm1 {
25+
interrupts = <36 1>;
1826
};

tests/drivers/spi/spi_loopback/boards/mimxrt1050_evk_mimxrt1052_hyperflash.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@
1515
reg = <0>;
1616
spi-max-frequency = <16000000>;
1717
};
18+
19+
transfer-delay = <100>;
20+
sck-pcs-delay = <200>;
21+
pcs-sck-delay = <200>;
1822
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <zephyr/dt-bindings/gpio/gpio.h>
2+
#include <zephyr/dt-bindings/gpio/arduino-header-r3.h>
3+
4+
/ {
5+
zephyr,user {
6+
/* Connect your SPI CS pin to the D8 pin to run the test */
7+
cs-loopback-gpios = <&arduino_header>,
8+
<ARDUINO_HEADER_R3_D8>,
9+
<(GPIO_ACTIVE_LOW | GPIO_PUSH_PULL | GPIO_PULL_UP)>;
10+
};
11+
};

tests/drivers/spi/spi_loopback/testcase.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,10 @@ tests:
333333
extra_configs:
334334
- CONFIG_SPI_CC23X0_DMA_DRIVEN=y
335335
- CONFIG_SPI_ASYNC=n
336+
drivers.spi.cs_loopback.disable_lpspi_dma:
337+
extra_args: EXTRA_DTC_OVERLAY_FILE="overlay-cs-loopback-gpio.overlay"
338+
extra_configs:
339+
- CONFIG_SPI_NXP_LPSPI_DMA=n
340+
platform_allow:
341+
- frdm_mcxn947/mcxn947/cpu0
342+
- mimxrt1050_evk/mimxrt1052/hyperflash

0 commit comments

Comments
 (0)