Skip to content

Commit 9ceb513

Browse files
nordic-seglnordicjm
authored andcommitted
[nrf fromtree] tests: drivers: spi: Run spi_loopback on nrf54lm20b
Enable SPI tests on nrf54lm20b. Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no> (cherry picked from commit 5c92576591d5a693118c0beb6585663858e534fd)
1 parent 1f78945 commit 9ceb513

File tree

4 files changed

+114
-1
lines changed

4 files changed

+114
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_SPI_IDEAL_TRANSFER_DURATION_SCALING=12
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* Test requires following loopback:
8+
* P1.13 - P1.14
9+
*/
10+
11+
&pinctrl {
12+
spi21_default: spi21_default {
13+
group1 {
14+
psels = <NRF_PSEL(SPIM_SCK, 1, 24)>,
15+
<NRF_PSEL(SPIM_MISO, 1, 13)>,
16+
<NRF_PSEL(SPIM_MOSI, 1, 14)>;
17+
};
18+
};
19+
20+
spi21_sleep: spi21_sleep {
21+
group1 {
22+
psels = <NRF_PSEL(SPIM_SCK, 1, 24)>,
23+
<NRF_PSEL(SPIM_MISO, 1, 13)>,
24+
<NRF_PSEL(SPIM_MOSI, 1, 14)>;
25+
low-power-enable;
26+
};
27+
};
28+
};
29+
30+
&spi21 {
31+
status = "okay";
32+
pinctrl-0 = <&spi21_default>;
33+
pinctrl-1 = <&spi21_sleep>;
34+
pinctrl-names = "default", "sleep";
35+
overrun-character = <0x00>;
36+
zephyr,pm-device-runtime-auto;
37+
38+
slow@0 {
39+
compatible = "test-spi-loopback-slow";
40+
reg = <0>;
41+
spi-max-frequency = <DT_FREQ_M(2)>;
42+
};
43+
44+
dut_fast: fast@0 {
45+
compatible = "test-spi-loopback-fast";
46+
reg = <0>;
47+
spi-max-frequency = <DT_FREQ_M(4)>;
48+
};
49+
};
50+
51+
&gpio1 {
52+
status = "okay";
53+
};
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright (c) 2026 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* Test requires following loopback:
8+
* P2.02 - P2.04
9+
*/
10+
11+
&pinctrl {
12+
spi00_default: spi00_default {
13+
group1 {
14+
psels = <NRF_PSEL(SPIM_MISO, 2, 4)>;
15+
};
16+
17+
group2 {
18+
psels = <NRF_PSEL(SPIM_SCK, 2, 1)>,
19+
<NRF_PSEL(SPIM_MOSI, 2, 2)>;
20+
nordic,drive-mode = <NRF_DRIVE_E0E1>;
21+
};
22+
};
23+
24+
spi00_sleep: spi00_sleep {
25+
group1 {
26+
psels = <NRF_PSEL(SPIM_SCK, 2, 1)>,
27+
<NRF_PSEL(SPIM_MISO, 2, 4)>,
28+
<NRF_PSEL(SPIM_MOSI, 2, 2)>;
29+
low-power-enable;
30+
};
31+
};
32+
};
33+
34+
&spi00 {
35+
status = "okay";
36+
pinctrl-0 = <&spi00_default>;
37+
pinctrl-1 = <&spi00_sleep>;
38+
pinctrl-names = "default", "sleep";
39+
overrun-character = <0x00>;
40+
zephyr,pm-device-runtime-auto;
41+
42+
slow@0 {
43+
compatible = "test-spi-loopback-slow";
44+
reg = <0>;
45+
spi-max-frequency = <DT_FREQ_M(16)>;
46+
};
47+
48+
dut_fast: fast@0 {
49+
compatible = "test-spi-loopback-fast";
50+
reg = <0>;
51+
spi-max-frequency = <DT_FREQ_M(32)>;
52+
};
53+
};
54+
55+
&gpio2 {
56+
status = "okay";
57+
};

tests/drivers/spi/spi_loopback/testcase.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ tests:
296296
platform_allow:
297297
- nrf54l15dk/nrf54l15/cpuapp
298298
- nrf54lm20dk/nrf54lm20a/cpuapp
299+
- nrf54lm20dk/nrf54lm20b/cpuapp
299300
- nrf7120dk/nrf7120/cpuapp
300301
- ophelia4ev/nrf54l15/cpuapp
301302
drivers.spi.nrf54l_16mhz:
@@ -315,9 +316,10 @@ tests:
315316
harness_config:
316317
fixture: spi_fast_loopback
317318
extra_args:
318-
- DTC_OVERLAY_FILE="boards/nrf54lm20dk_nrf54lm20a_cpuapp_spi00.overlay"
319+
- FILE_SUFFIX=spi00
319320
platform_allow:
320321
- nrf54lm20dk/nrf54lm20a/cpuapp
322+
- nrf54lm20dk/nrf54lm20b/cpuapp
321323
drivers.spi.ke1xz_flexio_spi.loopback:
322324
extra_args: DTC_OVERLAY_FILE="boards/frdm_ke1xz_flexio_spi.overlay"
323325
filter: CONFIG_DT_HAS_NXP_FLEXIO_ENABLED and

0 commit comments

Comments
 (0)