Skip to content

Commit b6a6770

Browse files
nika-nordicnordic-krch
authored andcommitted
[nrf fromlist] tests: drivers: spi: add test case for nRF54H20 SPIS120
New test case is for building an application simultaneously utilizing SPIM120, SPIM120, SPIS120 and SPIS13x. Upstream PR #: 86968 Signed-off-by: Nikodem Kastelik <[email protected]>
1 parent 2f0ccd4 commit b6a6770

File tree

2 files changed

+148
-0
lines changed

2 files changed

+148
-0
lines changed
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
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+
/delete-property/rx-delay-supported;
98+
/delete-property/rx-delay;
99+
};
100+
101+
&spi120 {
102+
compatible = "nordic,nrf-spim";
103+
status = "okay";
104+
pinctrl-0 = <&spi120_default_alt>;
105+
pinctrl-1 = <&spi120_sleep_alt>;
106+
pinctrl-names = "default", "sleep";
107+
overrun-character = <0x00>;
108+
memory-regions = <&dma_fast_region>;
109+
cs-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
110+
zephyr,pm-device-runtime-auto;
111+
dut_spi_dt: test-spi-dev@0 {
112+
compatible = "vnd,spi-device";
113+
reg = <0>;
114+
spi-max-frequency = <DT_FREQ_M(8)>;
115+
};
116+
};
117+
118+
&spi121 {
119+
compatible = "nordic,nrf-spim";
120+
status = "okay";
121+
pinctrl-0 = <&spi121_default_alt>;
122+
pinctrl-1 = <&spi121_sleep_alt>;
123+
pinctrl-names = "default", "sleep";
124+
overrun-character = <0x00>;
125+
memory-regions = <&dma_fast_region>;
126+
cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
127+
zephyr,pm-device-runtime-auto;
128+
};
129+
130+
dut_spis: &spi131 {
131+
compatible = "nordic,nrf-spis";
132+
status = "okay";
133+
def-char = <0x00>;
134+
pinctrl-0 = <&spis131_default_alt>;
135+
pinctrl-1 = <&spis131_sleep_alt>;
136+
pinctrl-names = "default", "sleep";
137+
memory-regions = <&cpuapp_dma_region>;
138+
/delete-property/rx-delay-supported;
139+
/delete-property/rx-delay;
140+
};

tests/drivers/spi/spi_controller_peripheral/testcase.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ tests:
6565
- nrf54h20dk/nrf54h20/cpuppr
6666
- nrf54l20pdk/nrf54l20/cpuapp
6767

68+
drivers.spi.spis_fast:
69+
# SPIS120 instance occupies P6 which is not available on nRF54H20 DK pin headers
70+
# It is added only to check the compilation.
71+
build_only: true
72+
extra_args: DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast_spis.overlay"
73+
platform_allow:
74+
- nrf54h20dk/nrf54h20/cpuapp
75+
6876
drivers.spi.pm_runtime:
6977
extra_configs:
7078
- CONFIG_PM_DEVICE=y

0 commit comments

Comments
 (0)