Skip to content

Commit 588baa4

Browse files
mstasiaknordicfabiobaltieri
authored andcommitted
tests: drivers: spi: Add further support for nRF54L20 PDK
Added support for nRF54L20 PDK in tests involving multiple instances. Corrected pin assignements in spi_error_cases test. Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
1 parent f68a086 commit 588baa4

File tree

3 files changed

+101
-16
lines changed

3 files changed

+101
-16
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
spi22_default_alt: spi22_default_alt {
9+
group1 {
10+
psels = <NRF_PSEL(SPIM_SCK, 1, 9)>,
11+
<NRF_PSEL(SPIM_MISO, 1, 10)>,
12+
<NRF_PSEL(SPIM_MOSI, 1, 2)>;
13+
};
14+
};
15+
16+
spi22_sleep_alt: spi22_sleep_alt {
17+
group1 {
18+
psels = <NRF_PSEL(SPIM_SCK, 1, 9)>,
19+
<NRF_PSEL(SPIM_MISO, 1, 10)>,
20+
<NRF_PSEL(SPIM_MOSI, 1, 2)>;
21+
low-power-enable;
22+
};
23+
};
24+
25+
spi21_default_alt: spi21_default_alt {
26+
group1 {
27+
psels = <NRF_PSEL(SPIS_SCK, 1, 8)>,
28+
<NRF_PSEL(SPIS_MISO, 1, 11)>,
29+
<NRF_PSEL(SPIS_MOSI, 1, 3)>,
30+
<NRF_PSEL(SPIS_CSN, 1, 1)>;
31+
};
32+
};
33+
34+
spi21_sleep_alt: spi21_sleep_alt {
35+
group1 {
36+
psels = <NRF_PSEL(SPIS_SCK, 1, 8)>,
37+
<NRF_PSEL(SPIS_MISO, 1, 11)>,
38+
<NRF_PSEL(SPIS_MOSI, 1, 3)>,
39+
<NRF_PSEL(SPIS_CSN, 1, 1)>;
40+
low-power-enable;
41+
};
42+
};
43+
44+
};
45+
46+
47+
&gpio1 {
48+
status = "okay";
49+
};
50+
51+
&spi22 {
52+
status = "okay";
53+
pinctrl-0 = <&spi22_default_alt>;
54+
pinctrl-1 = <&spi22_sleep_alt>;
55+
pinctrl-names = "default", "sleep";
56+
overrun-character = <0x00>;
57+
cs-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
58+
zephyr,pm-device-runtime-auto;
59+
dut_spi_dt: test-spi-dev@0 {
60+
compatible = "vnd,spi-device";
61+
reg = <0>;
62+
spi-max-frequency = <DT_FREQ_M(16)>;
63+
};
64+
};
65+
66+
dut_spis: &spi21 {
67+
compatible = "nordic,nrf-spis";
68+
status = "okay";
69+
def-char = <0x00>;
70+
pinctrl-0 = <&spi21_default_alt>;
71+
pinctrl-1 = <&spi21_sleep_alt>;
72+
pinctrl-names = "default", "sleep";
73+
/delete-property/rx-delay-supported;
74+
/delete-property/rx-delay;
75+
};
76+
77+
&uicr {
78+
nfct-pins-as-gpios;
79+
};

tests/drivers/spi/spi_controller_peripheral/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ tests:
6363
- nrf54l15dk/nrf54l15/cpuapp
6464
- nrf54h20dk/nrf54h20/cpurad
6565
- nrf54h20dk/nrf54h20/cpuppr
66+
- nrf54l20pdk/nrf54l20/cpuapp
6667

6768
drivers.spi.pm_runtime:
6869
extra_configs:

tests/drivers/spi/spi_error_cases/boards/nrf54l20pdk_nrf54l20_cpuapp.overlay

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,43 +7,44 @@
77
&pinctrl {
88
spi22_default_alt: spi22_default_alt {
99
group1 {
10-
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
11-
<NRF_PSEL(SPIM_MISO, 1, 11)>,
12-
<NRF_PSEL(SPIM_MOSI, 1, 9)>;
10+
psels = <NRF_PSEL(SPIM_SCK, 1, 9)>,
11+
<NRF_PSEL(SPIM_MISO, 1, 10)>,
12+
<NRF_PSEL(SPIM_MOSI, 1, 2)>;
1313
};
1414
};
1515

1616
spi22_sleep_alt: spi22_sleep_alt {
1717
group1 {
18-
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
19-
<NRF_PSEL(SPIM_MISO, 1, 11)>,
20-
<NRF_PSEL(SPIM_MOSI, 1, 9)>;
18+
psels = <NRF_PSEL(SPIM_SCK, 1, 9)>,
19+
<NRF_PSEL(SPIM_MISO, 1, 10)>,
20+
<NRF_PSEL(SPIM_MOSI, 1, 2)>;
2121
low-power-enable;
2222
};
2323
};
2424

2525
spi21_default_alt: spi21_default_alt {
2626
group1 {
27-
psels = <NRF_PSEL(SPIS_SCK, 1, 12)>,
28-
<NRF_PSEL(SPIS_MISO, 1, 10)>,
29-
<NRF_PSEL(SPIS_MOSI, 1, 8)>,
30-
<NRF_PSEL(SPIS_CSN, 1, 14)>;
27+
psels = <NRF_PSEL(SPIS_SCK, 1, 8)>,
28+
<NRF_PSEL(SPIS_MISO, 1, 11)>,
29+
<NRF_PSEL(SPIS_MOSI, 1, 3)>,
30+
<NRF_PSEL(SPIS_CSN, 1, 1)>;
3131
};
3232
};
3333

3434
spi21_sleep_alt: spi21_sleep_alt {
3535
group1 {
36-
psels = <NRF_PSEL(SPIS_SCK, 1, 12)>,
37-
<NRF_PSEL(SPIS_MISO, 1, 10)>,
38-
<NRF_PSEL(SPIS_MOSI, 1, 8)>,
39-
<NRF_PSEL(SPIS_CSN, 1, 14)>;
36+
psels = <NRF_PSEL(SPIS_SCK, 1, 8)>,
37+
<NRF_PSEL(SPIS_MISO, 1, 11)>,
38+
<NRF_PSEL(SPIS_MOSI, 1, 3)>,
39+
<NRF_PSEL(SPIS_CSN, 1, 1)>;
4040
low-power-enable;
4141
};
4242
};
4343

4444
};
4545

46-
&gpio2 {
46+
47+
&gpio1 {
4748
status = "okay";
4849
};
4950

@@ -53,7 +54,7 @@
5354
pinctrl-1 = <&spi22_sleep_alt>;
5455
pinctrl-names = "default", "sleep";
5556
overrun-character = <0x00>;
56-
cs-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
57+
cs-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
5758
dut_spi_dt: test-spi-dev@0 {
5859
compatible = "vnd,spi-device";
5960
reg = <0>;
@@ -71,3 +72,7 @@ dut_spis: &spi21 {
7172
/delete-property/rx-delay-supported;
7273
/delete-property/rx-delay;
7374
};
75+
76+
&uicr {
77+
nfct-pins-as-gpios;
78+
};

0 commit comments

Comments
 (0)