Skip to content

Commit 51d538f

Browse files
adamkondraciukjukkar
authored andcommitted
[nrf fromlist] tests: drivers: spi: nordic: add device PM runtime
Add configuration for testing SPI with device runtime PM enabled for nRF platforms. Upstream PR #: 75715 Signed-off-by: Adam Kondraciuk <[email protected]> Signed-off-by: Nikodem Kastelik <[email protected]>
1 parent aa120ad commit 51d538f

13 files changed

+33
-0
lines changed

tests/drivers/spi/spi_controller_peripheral/boards/nrf52840dk_nrf52840.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
pinctrl-names = "default", "sleep";
5151
overrun-character = <0x00>;
5252
cs-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
53+
zephyr,pm-device-runtime-auto;
5354
dut_spi_dt: test-spi-dev@0 {
5455
compatible = "vnd,spi-device";
5556
reg = <0>;

tests/drivers/spi/spi_controller_peripheral/boards/nrf54h20dk_nrf54h20_common.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
pinctrl-names = "default", "sleep";
6161
overrun-character = <0x00>;
6262
cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
63+
zephyr,pm-device-runtime-auto;
6364
dut_spi_dt: test-spi-dev@0 {
6465
compatible = "vnd,spi-device";
6566
reg = <0>;

tests/drivers/spi/spi_controller_peripheral/boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
overrun-character = <0x00>;
5656
memory-regions = <&dma_fast_region>;
5757
cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
58+
zephyr,pm-device-runtime-auto;
5859
dut_spi_dt: test-spi-dev@0 {
5960
compatible = "vnd,spi-device";
6061
reg = <0>;

tests/drivers/spi/spi_controller_peripheral/boards/nrf54l15dk_nrf54l15_cpuapp.overlay

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@
5454
pinctrl-names = "default", "sleep";
5555
overrun-character = <0x00>;
5656
cs-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
57+
zephyr,pm-device-runtime-auto;
5758
dut_spi_dt: test-spi-dev@0 {
5859
compatible = "vnd,spi-device";
5960
reg = <0>;
61+
spi-max-frequency = <DT_FREQ_M(16)>;
6062
};
6163
};
6264

tests/drivers/spi/spi_controller_peripheral/testcase.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,9 @@ tests:
5858
- nrf54l15dk/nrf54l15/cpuapp
5959
- nrf54h20dk/nrf54h20/cpurad
6060
- nrf54h20dk/nrf54h20/cpuppr
61+
62+
drivers.spi.pm_runtime:
63+
extra_configs:
64+
- CONFIG_PM_DEVICE=y
65+
- CONFIG_PM_DEVICE_RUNTIME=y
66+
filter: CONFIG_SOC_FAMILY_NORDIC_NRF

tests/drivers/spi/spi_loopback/boards/nrf51dk_nrf51822.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
&spi1 {
88
overrun-character = <0x00>;
99
cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
10+
zephyr,pm-device-runtime-auto;
1011
slow@0 {
1112
compatible = "test-spi-loopback-slow";
1213
reg = <0>;

tests/drivers/spi/spi_loopback/boards/nrf52840dk_nrf52840.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
overrun-character = <0x00>;
99
rx-delay = <1>;
1010
cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
11+
zephyr,pm-device-runtime-auto;
1112
slow@0 {
1213
compatible = "test-spi-loopback-slow";
1314
reg = <0>;

tests/drivers/spi/spi_loopback/boards/nrf52dk_nrf52832.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
&spi1 {
88
overrun-character = <0x00>;
99
cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
10+
zephyr,pm-device-runtime-auto;
1011
slow@0 {
1112
compatible = "test-spi-loopback-slow";
1213
reg = <0>;

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,15 @@
88
&spi130 {
99
status = "okay";
1010
memory-regions = <&cpuapp_dma_region>;
11+
zephyr,pm-device-runtime-auto;
12+
slow@0 {
13+
compatible = "test-spi-loopback-slow";
14+
reg = <0>;
15+
spi-max-frequency = <DT_FREQ_K(500)>;
16+
};
17+
fast@0 {
18+
compatible = "test-spi-loopback-fast";
19+
reg = <0>;
20+
spi-max-frequency = <DT_FREQ_M(8)>;
21+
};
1122
};

tests/drivers/spi/spi_loopback/boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
pinctrl-names = "default", "sleep";
3131
overrun-character = <0x00>;
3232
memory-regions = <&dma_fast_region>;
33+
zephyr,pm-device-runtime-auto;
3334
slow@0 {
3435
compatible = "test-spi-loopback-slow";
3536
reg = <0>;

0 commit comments

Comments
 (0)