Skip to content

Commit 1689eaf

Browse files
nordic-krchhenrikbrixandersen
authored andcommitted
tests: drivers: spi: spi_error_cases: Improve nrf54h20dk cpuppr
Rework overlays and add sysbuild/vpr_launcher folder to allow standard test configuration for nrf54h20dk cpuppr. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 949566f commit 1689eaf

File tree

7 files changed

+98
-155
lines changed

7 files changed

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

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

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,12 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
&pinctrl {
8-
spi130_default_alt: spi130_default_alt {
9-
group1 {
10-
psels = <NRF_PSEL(SPIM_SCK, 0, 0)>,
11-
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
12-
<NRF_PSEL(SPIM_MISO, 0, 6)>;
13-
};
14-
};
15-
16-
spi130_sleep_alt: spi130_sleep_alt {
17-
group1 {
18-
psels = <NRF_PSEL(SPIM_SCK, 0, 0)>,
19-
<NRF_PSEL(SPIM_MISO, 0, 6)>,
20-
<NRF_PSEL(SPIM_MOSI, 0, 8)>;
21-
low-power-enable;
22-
};
23-
};
24-
25-
spis131_default_alt: spis131_default_alt {
26-
group1 {
27-
psels = <NRF_PSEL(SPIS_SCK, 0, 1)>,
28-
<NRF_PSEL(SPIS_MISO, 0, 7)>,
29-
<NRF_PSEL(SPIS_MOSI, 0, 9)>,
30-
<NRF_PSEL(SPIS_CSN, 0, 11)>;
31-
};
32-
};
33-
34-
spis131_sleep_alt: spis131_sleep_alt {
35-
group1 {
36-
psels = <NRF_PSEL(SPIS_SCK, 0, 1)>,
37-
<NRF_PSEL(SPIS_MISO, 0, 7)>,
38-
<NRF_PSEL(SPIS_MOSI, 0, 9)>,
39-
<NRF_PSEL(SPIS_CSN, 0, 11)>;
40-
low-power-enable;
41-
};
42-
};
43-
44-
};
45-
46-
&gpio0 {
47-
status = "okay";
48-
};
7+
#include "nrf54h20dk_nrf54h20_common.dtsi"
498

509
&spi130 {
51-
compatible = "nordic,nrf-spim";
52-
status = "okay";
53-
pinctrl-0 = <&spi130_default_alt>;
54-
pinctrl-1 = <&spi130_sleep_alt>;
55-
pinctrl-names = "default", "sleep";
56-
overrun-character = <0x00>;
57-
cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
58-
dut_spi_dt: test-spi-dev@0 {
59-
compatible = "vnd,spi-device";
60-
reg = <0>;
61-
spi-max-frequency = <500000>;
62-
};
6310
memory-regions = <&cpuapp_dma_region>;
6411
};
6512

6613
dut_spis: &spi131 {
67-
compatible = "nordic,nrf-spis";
68-
status = "okay";
69-
def-char = <0x00>;
70-
pinctrl-0 = <&spis131_default_alt>;
71-
pinctrl-1 = <&spis131_sleep_alt>;
72-
pinctrl-names = "default", "sleep";
7314
memory-regions = <&cpuapp_dma_region>;
74-
/delete-property/rx-delay-supported;
75-
/delete-property/rx-delay;
7615
};

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

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -3,83 +3,4 @@
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
7-
&pinctrl {
8-
spi130_default_alt: spi130_default_alt {
9-
group1 {
10-
psels = <NRF_PSEL(SPIM_SCK, 0, 0)>,
11-
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
12-
<NRF_PSEL(SPIM_MISO, 0, 6)>;
13-
};
14-
};
15-
16-
spi130_sleep_alt: spi130_sleep_alt {
17-
group1 {
18-
psels = <NRF_PSEL(SPIM_SCK, 0, 0)>,
19-
<NRF_PSEL(SPIM_MISO, 0, 6)>,
20-
<NRF_PSEL(SPIM_MOSI, 0, 8)>;
21-
low-power-enable;
22-
};
23-
};
24-
25-
spis131_default_alt: spis131_default_alt {
26-
group1 {
27-
psels = <NRF_PSEL(SPIS_SCK, 0, 1)>,
28-
<NRF_PSEL(SPIS_MISO, 0, 7)>,
29-
<NRF_PSEL(SPIS_MOSI, 0, 9)>,
30-
<NRF_PSEL(SPIS_CSN, 0, 11)>;
31-
};
32-
};
33-
34-
spis131_sleep_alt: spis131_sleep_alt {
35-
group1 {
36-
psels = <NRF_PSEL(SPIS_SCK, 0, 1)>,
37-
<NRF_PSEL(SPIS_MISO, 0, 7)>,
38-
<NRF_PSEL(SPIS_MOSI, 0, 9)>,
39-
<NRF_PSEL(SPIS_CSN, 0, 11)>;
40-
low-power-enable;
41-
};
42-
};
43-
44-
};
45-
46-
&gpio0 {
47-
status = "okay";
48-
};
49-
50-
&gpiote130 {
51-
status = "okay";
52-
owned-channels = <7>;
53-
};
54-
55-
&cpuapp_dma_region {
56-
status = "okay";
57-
};
58-
59-
&spi130 {
60-
compatible = "nordic,nrf-spim";
61-
status = "okay";
62-
pinctrl-0 = <&spi130_default_alt>;
63-
pinctrl-1 = <&spi130_sleep_alt>;
64-
pinctrl-names = "default", "sleep";
65-
overrun-character = <0x00>;
66-
cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
67-
dut_spi_dt: test-spi-dev@0 {
68-
compatible = "vnd,spi-device";
69-
reg = <0>;
70-
spi-max-frequency = <500000>;
71-
};
72-
memory-regions = <&cpuapp_dma_region>;
73-
};
74-
75-
dut_spis: &spi131 {
76-
compatible = "nordic,nrf-spis";
77-
status = "okay";
78-
def-char = <0x00>;
79-
pinctrl-0 = <&spis131_default_alt>;
80-
pinctrl-1 = <&spis131_sleep_alt>;
81-
pinctrl-names = "default", "sleep";
82-
memory-regions = <&cpuapp_dma_region>;
83-
/delete-property/rx-delay-supported;
84-
/delete-property/rx-delay;
85-
};
6+
#include "nrf54h20dk_nrf54h20_common.dtsi"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "nrf54h20dk_nrf54h20_common.dtsi"
8+
9+
&spi130 {
10+
memory-regions = <&cpurad_dma_region>;
11+
};
12+
13+
dut_spis: &spi131 {
14+
memory-regions = <&cpurad_dma_region>;
15+
};

tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuppr_launcher.overlay renamed to tests/drivers/spi/spi_error_cases/sysbuild/vpr_launcher/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6+
#include "../../../boards/nrf54h20dk_nrf54h20_common.dtsi"
67

78
&spi130 {
89
status = "reserved";
910
interrupt-parent = <&cpuppr_clic>;
1011
};
1112

12-
&spi131 {
13+
&dut_spis {
1314
status = "reserved";
1415
interrupt-parent = <&cpuppr_clic>;
1516
};
16-
17-
&gpio0 {
18-
status = "reserved";
19-
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# nothing here

tests/drivers/spi/spi_error_cases/testcase.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,3 @@ tests:
1616
extra_args: DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay"
1717
platform_allow:
1818
- nrf54h20dk/nrf54h20/cpuapp
19-
drivers.spi.spi_error_cases.nrf54h20_cpuppr:
20-
platform_allow: nrf54h20dk/nrf54h20/cpuppr
21-
sysbuild: true
22-
extra_args:
23-
- vpr_launcher_DTC_OVERLAY_FILE="../../../tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuppr_launcher.overlay"
24-
- SB_CONFIG_VPR_LAUNCHER=y
25-
# Disable asserts to fit in limited code memory
26-
- CONFIG_ASSERT=n

0 commit comments

Comments
 (0)