Skip to content

Commit d982c42

Browse files
nordic-seglnordicjm
authored andcommitted
[nrf fromlist] 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. Upstream PR #: 90157 Signed-off-by: Sebastian Głąb <[email protected]>
1 parent ce7b5e8 commit d982c42

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
@@ -260,6 +260,12 @@ tests:
260260
- EXTRA_DTC_OVERLAY_FILE="boards/nrf_at_32mhz.overlay"
261261
platform_allow:
262262
- nrf54h20dk/nrf54h20/cpuapp
263+
drivers.spi.nrf54h_fast_8mhz_port2:
264+
extra_args:
265+
- DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast_p2.overlay"
266+
- CONFIG_NRF_REGTOOL_VERBOSITY=2
267+
platform_allow:
268+
- nrf54h20dk/nrf54h20/cpuapp
263269
drivers.spi.nrf54l_1mhz:
264270
extra_args: EXTRA_DTC_OVERLAY_FILE="boards/nrf_at_1mhz.overlay"
265271
platform_allow:

0 commit comments

Comments
 (0)