Skip to content

Commit 691816d

Browse files
nordic-seglkartben
authored andcommitted
tests: drivers: spi: spi_loopback: Test fast spi on slow GPIO port
Add test configuration where fast SPI instance operates at slow GPIO port 2. Signed-off-by: Sebastian Głąb <[email protected]>
1 parent 623479c commit 691816d

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
spi121_default: spi121_default {
9+
group1 {
10+
psels = <NRF_PSEL(SPIM_MISO, 2, 10)>;
11+
};
12+
13+
group2 {
14+
psels = <NRF_PSEL(SPIM_SCK, 2, 2)>,
15+
<NRF_PSEL(SPIM_MOSI, 2, 11)>;
16+
nordic,drive-mode = <NRF_DRIVE_E0E1>;
17+
};
18+
};
19+
20+
spi121_sleep: spi121_sleep {
21+
group1 {
22+
psels = <NRF_PSEL(SPIM_SCK, 2, 2)>,
23+
<NRF_PSEL(SPIM_MISO, 2, 10)>,
24+
<NRF_PSEL(SPIM_MOSI, 2, 11)>;
25+
low-power-enable;
26+
};
27+
};
28+
};
29+
30+
&dma_fast_region {
31+
status = "okay";
32+
};
33+
34+
&nfct {
35+
status = "disabled";
36+
nfct-pins-as-gpios;
37+
};
38+
39+
&gpio2 {
40+
status = "okay";
41+
};
42+
43+
&spi121 {
44+
status = "okay";
45+
pinctrl-0 = <&spi121_default>;
46+
pinctrl-1 = <&spi121_sleep>;
47+
pinctrl-names = "default", "sleep";
48+
overrun-character = <0x00>;
49+
memory-regions = <&dma_fast_region>;
50+
zephyr,pm-device-runtime-auto;
51+
52+
slow@0 {
53+
compatible = "test-spi-loopback-slow";
54+
reg = <0>;
55+
spi-max-frequency = <DT_FREQ_M(4)>;
56+
};
57+
58+
dut_fast: fast@0 {
59+
compatible = "test-spi-loopback-fast";
60+
reg = <0>;
61+
spi-max-frequency = <DT_FREQ_M(8)>;
62+
};
63+
};

tests/drivers/spi/spi_loopback/testcase.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,12 @@ tests:
262262
- EXTRA_DTC_OVERLAY_FILE="boards/nrf_at_32mhz.overlay"
263263
platform_allow:
264264
- nrf54h20dk/nrf54h20/cpuapp
265+
drivers.spi.nrf54h_fast_8mhz_port2:
266+
extra_args:
267+
- DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast_p2.overlay"
268+
- CONFIG_NRF_REGTOOL_VERBOSITY=2
269+
platform_allow:
270+
- nrf54h20dk/nrf54h20/cpuapp
265271
drivers.spi.nrf54l_1mhz:
266272
extra_args: EXTRA_DTC_OVERLAY_FILE="boards/nrf_at_1mhz.overlay"
267273
platform_allow:

0 commit comments

Comments
 (0)