Skip to content

Commit d66d360

Browse files
committed
[nrf fromlist] samples: boards: nordic: spis_wakeup: Run sample on APP+PPR
Extend sample with possibility to use PPR core instead of Radio core. Upstream PR #: 97113 Signed-off-by: Sebastian Głąb <[email protected]>
1 parent 36e5878 commit d66d360

12 files changed

+203
-134
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
source "$(ZEPHYR_BASE)/share/sysbuild/Kconfig"
5+
6+
choice REMOTE_NRF54H20_CORE
7+
prompt "Remote nRF54h20 core"
8+
default REMOTE_NRF54H20_CPURAD_CORE
9+
depends on SOC_NRF54H20_CPUAPP
10+
11+
config REMOTE_NRF54H20_CPUPPR_CORE
12+
bool "ppr core"
13+
14+
config REMOTE_NRF54H20_CPURAD_CORE
15+
bool "cpurad"
16+
17+
endchoice
18+
19+
config REMOTE_BOARD
20+
string
21+
default "$(BOARD)/nrf54h20/cpurad" if SOC_NRF54H20_CPUAPP && REMOTE_NRF54H20_CPURAD_CORE
22+
default "$(BOARD)/nrf54h20/cpuppr/xip" if SOC_NRF54H20_CPUAPP && REMOTE_NRF54H20_CPUPPR_CORE
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
aliases {
8+
led = &led0;
9+
spis = &spi130;
10+
/delete-property/ sw0;
11+
/delete-property/ sw1;
12+
/delete-property/ sw2;
13+
/delete-property/ sw3;
14+
/delete-property/ mcuboot-led0;
15+
/delete-property/ mcuboot-button0;
16+
};
17+
/delete-node/ buttons;
18+
};
19+
20+
&exmif {
21+
status = "disabled";
22+
};
23+
24+
&gpiote130 {
25+
status = "okay";
26+
owned-channels = <0>;
27+
};
28+
29+
&pinctrl {
30+
spi130_default_alt: spi130_default_alt {
31+
group1 {
32+
psels = <NRF_PSEL(SPIS_SCK, 0, 0)>,
33+
<NRF_PSEL(SPIS_MOSI, 0, 6)>,
34+
<NRF_PSEL(SPIS_MISO, 0, 8)>,
35+
<NRF_PSEL(SPIS_CSN, 0, 10)>;
36+
};
37+
};
38+
39+
spi130_sleep_alt: spi130_sleep_alt {
40+
group1 {
41+
psels = <NRF_PSEL(SPIS_SCK, 0, 0)>,
42+
<NRF_PSEL(SPIS_MOSI, 0, 6)>,
43+
<NRF_PSEL(SPIS_MISO, 0, 8)>,
44+
<NRF_PSEL(SPIS_CSN, 0, 10)>;
45+
low-power-enable;
46+
};
47+
};
48+
};
49+
50+
&spi130 {
51+
compatible = "nordic,nrf-spis";
52+
status = "okay";
53+
def-char = <0x00>;
54+
pinctrl-0 = <&spi130_default_alt>;
55+
pinctrl-1 = <&spi130_sleep_alt>;
56+
pinctrl-names = "default", "sleep";
57+
wake-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
58+
memory-regions = <&cpuapp_dma_region>;
59+
/delete-property/ rx-delay-supported;
60+
/delete-property/ rx-delay;
61+
};

samples/boards/nordic/spis_wakeup/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 3 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,66 +3,13 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6+
#include "nrf54h20dk_nrf54h20_common.dtsi"
7+
8+
/* LED1 will be used by the cpurad core. */
69
/ {
710
aliases {
8-
led = &led0;
9-
spis = &spi130;
1011
/delete-property/ led1;
11-
/delete-property/ sw0;
12-
/delete-property/ sw1;
13-
/delete-property/ sw2;
14-
/delete-property/ sw3;
15-
/delete-property/ mcuboot-led0;
16-
/delete-property/ mcuboot-button0;
1712
};
18-
/delete-node/ buttons;
1913
};
2014

2115
/delete-node/ &led1;
22-
23-
&exmif {
24-
status = "disabled";
25-
};
26-
27-
&gpiote130 {
28-
status = "okay";
29-
owned-channels = <0>;
30-
};
31-
32-
&pinctrl {
33-
spi130_default_alt: spi130_default_alt {
34-
group1 {
35-
psels = <NRF_PSEL(SPIS_SCK, 0, 0)>,
36-
<NRF_PSEL(SPIS_MOSI, 0, 6)>,
37-
<NRF_PSEL(SPIS_MISO, 0, 8)>,
38-
<NRF_PSEL(SPIS_CSN, 0, 10)>;
39-
};
40-
};
41-
42-
spi130_sleep_alt: spi130_sleep_alt {
43-
group1 {
44-
psels = <NRF_PSEL(SPIS_SCK, 0, 0)>,
45-
<NRF_PSEL(SPIS_MOSI, 0, 6)>,
46-
<NRF_PSEL(SPIS_MISO, 0, 8)>,
47-
<NRF_PSEL(SPIS_CSN, 0, 10)>;
48-
low-power-enable;
49-
};
50-
};
51-
};
52-
53-
&spi130 {
54-
compatible = "nordic,nrf-spis";
55-
status = "okay";
56-
def-char = <0x00>;
57-
pinctrl-0 = <&spi130_default_alt>;
58-
pinctrl-1 = <&spi130_sleep_alt>;
59-
pinctrl-names = "default", "sleep";
60-
wake-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
61-
memory-regions = <&cpuapp_dma_region>;
62-
/delete-property/ rx-delay-supported;
63-
/delete-property/ rx-delay;
64-
};
65-
66-
&uart136 {
67-
zephyr,pm-device-runtime-auto;
68-
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include "nrf54h20dk_nrf54h20_common.dtsi"
7+
8+
&spi131 {
9+
status = "reserved";
10+
interrupt-parent = <&cpuppr_clic>;
11+
};
12+
13+
&uart135 {
14+
status = "reserved";
15+
interrupt-parent = <&cpuppr_clic>;
16+
};
Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
11
common:
22
sysbuild: true
33
depends_on: spi
4+
tags:
5+
- spi
6+
harness: console
7+
harness_config:
8+
fixture: spi_loopback
9+
type: multi_line
10+
ordered: true
11+
regex:
12+
- ".*SPIS: waiting for SPI transfer"
13+
- ".*SPIS: woken up by"
414

515
sample:
616
name: SPI wakeup sample
717
tests:
818
sample.drivers.spis.wakeup:
9-
tags:
10-
- spi
1119
platform_allow:
1220
- nrf54h20dk/nrf54h20/cpuapp
1321
integration_platforms:
1422
- nrf54h20dk/nrf54h20/cpuapp
15-
harness: console
16-
harness_config:
17-
fixture: spi_loopback
18-
type: multi_line
19-
ordered: true
20-
regex:
21-
- ".*SPIS: waiting for SPI transfer"
22-
- ".*SPIS: woken up by"
23+
sample.drivers.spis.wakeup.ppr:
24+
platform_allow:
25+
- nrf54h20dk/nrf54h20/cpuapp
26+
integration_platforms:
27+
- nrf54h20dk/nrf54h20/cpuapp
28+
extra_args:
29+
- SB_CONFIG_REMOTE_NRF54H20_CPUPPR_CORE=y
30+
- spis_wakeup_CONFIG_SOC_NRF54H20_CPURAD_ENABLE=n
31+
- spis_wakeup_SNIPPET=nordic-ppr-xip
32+
- DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_with_cpuppr.overlay"

samples/boards/nordic/spis_wakeup/sysbuild.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
# SPDX-License-Identifier: Apache-2.0
44
#
55

6-
if(SB_CONFIG_SOC_NRF54H20)
6+
if(SB_CONFIG_REMOTE_BOARD)
77
# Add remote project
88
ExternalZephyrProject_Add(
99
APPLICATION wakeup_trigger
1010
SOURCE_DIR ${APP_DIR}/wakeup_trigger
11-
BOARD ${SB_CONFIG_BOARD}/${SB_CONFIG_SOC}/cpurad
11+
BOARD ${SB_CONFIG_REMOTE_BOARD}
1212
BOARD_REVISION ${BOARD_REVISION}
1313
)
1414
endif()
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
aliases {
8+
led = &led1;
9+
};
10+
11+
leds {
12+
compatible = "gpio-leds";
13+
14+
led1: led_1 {
15+
gpios = <&gpio9 1 GPIO_ACTIVE_HIGH>;
16+
label = "Green LED 1";
17+
};
18+
};
19+
};
20+
21+
&gpiote130 {
22+
status = "okay";
23+
owned-channels = <1>;
24+
};
25+
26+
&gpio0 {
27+
status = "okay";
28+
};
29+
30+
&gpio9 {
31+
status = "okay";
32+
};
33+
34+
&pinctrl {
35+
spi131_default_alt: spi131_default_alt {
36+
group1 {
37+
psels = <NRF_PSEL(SPIM_SCK, 0, 1)>,
38+
<NRF_PSEL(SPIM_MOSI, 0, 7)>,
39+
<NRF_PSEL(SPIM_MISO, 0, 9)>;
40+
};
41+
};
42+
43+
spi131_sleep_alt: spi131_sleep_alt {
44+
group1 {
45+
psels = <NRF_PSEL(SPIM_SCK, 0, 1)>,
46+
<NRF_PSEL(SPIM_MOSI, 0, 7)>,
47+
<NRF_PSEL(SPIM_MISO, 0, 9)>;
48+
low-power-enable;
49+
};
50+
};
51+
};
52+
53+
&spi131 {
54+
compatible = "nordic,nrf-spim";
55+
status = "okay";
56+
pinctrl-0 = <&spi131_default_alt>;
57+
pinctrl-1 = <&spi131_sleep_alt>;
58+
pinctrl-names = "default", "sleep";
59+
overrun-character = <0x00>;
60+
cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
61+
wake-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
62+
63+
spim_dt: spi-device@0 {
64+
compatible = "vnd,spi-device";
65+
reg = <0>;
66+
spi-max-frequency = <DT_FREQ_M(8)>;
67+
};
68+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ASSERT=n
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include "nrf54h20dk_nrf54h20_common.dtsi"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_PM=y
2+
3+
CONFIG_ASSERT=y

0 commit comments

Comments
 (0)