Skip to content

Commit 8b77098

Browse files
nika-nordickartben
authored andcommitted
tests: drivers: spi: add test case for nRF54H20 SPIS120
New test case is for building an application simultaneously utilizing SPIM120, SPIM120, SPIS120 and SPIS13x. Signed-off-by: Nikodem Kastelik <[email protected]>
1 parent f13c8a5 commit 8b77098

File tree

2 files changed

+150
-0
lines changed

2 files changed

+150
-0
lines changed
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
spis120_default_alt: spis120_default_alt {
9+
group1 {
10+
psels = <NRF_PSEL(SPIS_SCK, 6, 0)>,
11+
<NRF_PSEL(SPIS_MISO, 6, 3)>,
12+
<NRF_PSEL(SPIS_MOSI, 6, 4)>,
13+
<NRF_PSEL(SPIS_CSN, 6, 9)>;
14+
};
15+
};
16+
17+
spis120_sleep_alt: spis120_sleep_alt {
18+
group1 {
19+
psels = <NRF_PSEL(SPIS_SCK, 6, 0)>,
20+
<NRF_PSEL(SPIS_MISO, 6, 3)>,
21+
<NRF_PSEL(SPIS_MOSI, 6, 4)>,
22+
<NRF_PSEL(SPIS_CSN, 6, 9)>;
23+
low-power-enable;
24+
};
25+
};
26+
27+
spi120_default_alt: spi120_default_alt {
28+
group1 {
29+
psels = <NRF_PSEL(SPIM_SCK, 7, 3)>,
30+
<NRF_PSEL(SPIM_MISO, 7, 6)>,
31+
<NRF_PSEL(SPIM_MOSI, 7, 7)>;
32+
};
33+
};
34+
35+
spi120_sleep_alt: spi120_sleep_alt {
36+
group1 {
37+
psels = <NRF_PSEL(SPIM_SCK, 7, 3)>,
38+
<NRF_PSEL(SPIM_MISO, 7, 6)>,
39+
<NRF_PSEL(SPIM_MOSI, 7, 7)>;
40+
low-power-enable;
41+
};
42+
};
43+
44+
spi121_default_alt: spi121_default_alt {
45+
group1 {
46+
psels = <NRF_PSEL(SPIM_SCK, 7, 2)>,
47+
<NRF_PSEL(SPIM_MISO, 7, 0)>,
48+
<NRF_PSEL(SPIM_MOSI, 7, 1)>;
49+
};
50+
};
51+
52+
spi121_sleep_alt: spi121_sleep_alt {
53+
group1 {
54+
psels = <NRF_PSEL(SPIM_SCK, 7, 2)>,
55+
<NRF_PSEL(SPIM_MISO, 7, 0)>,
56+
<NRF_PSEL(SPIM_MOSI, 7, 1)>;
57+
low-power-enable;
58+
};
59+
};
60+
61+
spis131_default_alt: spis131_default_alt {
62+
group1 {
63+
psels = <NRF_PSEL(SPIS_SCK, 1, 0)>,
64+
<NRF_PSEL(SPIS_MISO, 1, 9)>,
65+
<NRF_PSEL(SPIS_MOSI, 1, 5)>,
66+
<NRF_PSEL(SPIS_CSN, 0, 11)>;
67+
};
68+
};
69+
70+
spis131_sleep_alt: spis131_sleep_alt {
71+
group1 {
72+
psels = <NRF_PSEL(SPIS_SCK, 1, 0)>,
73+
<NRF_PSEL(SPIS_MISO, 1, 9)>,
74+
<NRF_PSEL(SPIS_MOSI, 1, 5)>,
75+
<NRF_PSEL(SPIS_CSN, 0, 11)>;
76+
low-power-enable;
77+
};
78+
};
79+
};
80+
81+
&gpio0 {
82+
status = "okay";
83+
};
84+
85+
&dma_fast_region {
86+
status = "okay";
87+
};
88+
89+
&spis120 {
90+
compatible = "nordic,nrf-spis";
91+
status = "okay";
92+
def-char = <0x00>;
93+
pinctrl-0 = <&spis120_default_alt>;
94+
pinctrl-1 = <&spis120_sleep_alt>;
95+
pinctrl-names = "default", "sleep";
96+
memory-regions = <&dma_fast_region>;
97+
};
98+
99+
&spi120 {
100+
compatible = "nordic,nrf-spim";
101+
status = "okay";
102+
pinctrl-0 = <&spi120_default_alt>;
103+
pinctrl-1 = <&spi120_sleep_alt>;
104+
pinctrl-names = "default", "sleep";
105+
overrun-character = <0x00>;
106+
memory-regions = <&dma_fast_region>;
107+
cs-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
108+
zephyr,pm-device-runtime-auto;
109+
dut_spi_dt: test-spi-dev@0 {
110+
compatible = "vnd,spi-device";
111+
reg = <0>;
112+
spi-max-frequency = <DT_FREQ_M(8)>;
113+
};
114+
};
115+
116+
&spi121 {
117+
compatible = "nordic,nrf-spim";
118+
status = "okay";
119+
pinctrl-0 = <&spi121_default_alt>;
120+
pinctrl-1 = <&spi121_sleep_alt>;
121+
pinctrl-names = "default", "sleep";
122+
overrun-character = <0x00>;
123+
memory-regions = <&dma_fast_region>;
124+
cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
125+
zephyr,pm-device-runtime-auto;
126+
};
127+
128+
dut_spis: &spi131 {
129+
compatible = "nordic,nrf-spis";
130+
status = "okay";
131+
def-char = <0x00>;
132+
pinctrl-0 = <&spis131_default_alt>;
133+
pinctrl-1 = <&spis131_sleep_alt>;
134+
pinctrl-names = "default", "sleep";
135+
memory-regions = <&cpuapp_dma_region>;
136+
/delete-property/rx-delay-supported;
137+
/delete-property/rx-delay;
138+
};

tests/drivers/spi/spi_controller_peripheral/testcase.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ tests:
6666
- nrf54h20dk/nrf54h20/cpuppr
6767
- nrf54l20pdk/nrf54l20/cpuapp
6868

69+
drivers.spi.spis_fast:
70+
# SPIS120 instance occupies P6 which is not available on nRF54H20 DK pin headers
71+
# It is added only to check the compilation.
72+
build_only: true
73+
extra_args: DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast_spis.overlay"
74+
platform_exclude:
75+
- nrf52840dk/nrf52840
76+
- nrf54l15dk/nrf54l15/cpuapp
77+
- nrf54h20dk/nrf54h20/cpurad
78+
- nrf54h20dk/nrf54h20/cpuppr
79+
- nrf54l20pdk/nrf54l20/cpuapp
80+
6981
drivers.spi.pm_runtime:
7082
extra_configs:
7183
- CONFIG_PM_DEVICE=y

0 commit comments

Comments
 (0)