tests: drivers: spi: nordic: add device PM runtime

Add configuration for testing SPI with device runtime PM enabled
for nRF platforms.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
This commit is contained in:
Adam Kondraciuk 2024-07-12 10:50:14 +02:00 committed by Benjamin Cabé
commit 7635455f15
13 changed files with 33 additions and 0 deletions

View file

@ -50,6 +50,7 @@
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
overrun-character = <0x00>; overrun-character = <0x00>;
cs-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; cs-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
zephyr,pm-device-runtime-auto;
dut_spi_dt: test-spi-dev@0 { dut_spi_dt: test-spi-dev@0 {
compatible = "vnd,spi-device"; compatible = "vnd,spi-device";
spi-max-frequency = <DT_FREQ_M(8)>; spi-max-frequency = <DT_FREQ_M(8)>;

View file

@ -60,6 +60,7 @@
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
overrun-character = <0x00>; overrun-character = <0x00>;
cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
zephyr,pm-device-runtime-auto;
dut_spi_dt: test-spi-dev@0 { dut_spi_dt: test-spi-dev@0 {
compatible = "vnd,spi-device"; compatible = "vnd,spi-device";
reg = <0>; reg = <0>;

View file

@ -59,6 +59,7 @@
overrun-character = <0x00>; overrun-character = <0x00>;
memory-regions = <&dma_fast_region>; memory-regions = <&dma_fast_region>;
cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
zephyr,pm-device-runtime-auto;
dut_spi_dt: test-spi-dev@0 { dut_spi_dt: test-spi-dev@0 {
compatible = "vnd,spi-device"; compatible = "vnd,spi-device";
reg = <0>; reg = <0>;

View file

@ -54,9 +54,11 @@
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
overrun-character = <0x00>; overrun-character = <0x00>;
cs-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>; cs-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
zephyr,pm-device-runtime-auto;
dut_spi_dt: test-spi-dev@0 { dut_spi_dt: test-spi-dev@0 {
compatible = "vnd,spi-device"; compatible = "vnd,spi-device";
reg = <0>; reg = <0>;
spi-max-frequency = <DT_FREQ_M(16)>;
}; };
}; };

View file

@ -63,3 +63,9 @@ tests:
- nrf54l15dk/nrf54l15/cpuapp - nrf54l15dk/nrf54l15/cpuapp
- nrf54h20dk/nrf54h20/cpurad - nrf54h20dk/nrf54h20/cpurad
- nrf54h20dk/nrf54h20/cpuppr - nrf54h20dk/nrf54h20/cpuppr
drivers.spi.pm_runtime:
extra_configs:
- CONFIG_PM_DEVICE=y
- CONFIG_PM_DEVICE_RUNTIME=y
filter: CONFIG_SOC_FAMILY_NORDIC_NRF

View file

@ -7,6 +7,7 @@
&spi1 { &spi1 {
overrun-character = <0x00>; overrun-character = <0x00>;
cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
zephyr,pm-device-runtime-auto;
slow@0 { slow@0 {
compatible = "test-spi-loopback-slow"; compatible = "test-spi-loopback-slow";
reg = <0>; reg = <0>;

View file

@ -8,6 +8,7 @@
overrun-character = <0x00>; overrun-character = <0x00>;
rx-delay = <1>; rx-delay = <1>;
cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
zephyr,pm-device-runtime-auto;
slow@0 { slow@0 {
compatible = "test-spi-loopback-slow"; compatible = "test-spi-loopback-slow";
reg = <0>; reg = <0>;

View file

@ -7,6 +7,7 @@
&spi1 { &spi1 {
overrun-character = <0x00>; overrun-character = <0x00>;
cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; cs-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
zephyr,pm-device-runtime-auto;
slow@0 { slow@0 {
compatible = "test-spi-loopback-slow"; compatible = "test-spi-loopback-slow";
reg = <0>; reg = <0>;

View file

@ -7,4 +7,15 @@
&spi130 { &spi130 {
memory-regions = <&cpuapp_dma_region>; memory-regions = <&cpuapp_dma_region>;
zephyr,pm-device-runtime-auto;
slow@0 {
compatible = "test-spi-loopback-slow";
reg = <0>;
spi-max-frequency = <DT_FREQ_K(500)>;
};
fast@0 {
compatible = "test-spi-loopback-fast";
reg = <0>;
spi-max-frequency = <DT_FREQ_M(8)>;
};
}; };

View file

@ -34,6 +34,7 @@
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
overrun-character = <0x00>; overrun-character = <0x00>;
memory-regions = <&dma_fast_region>; memory-regions = <&dma_fast_region>;
zephyr,pm-device-runtime-auto;
slow@0 { slow@0 {
compatible = "test-spi-loopback-slow"; compatible = "test-spi-loopback-slow";
reg = <0>; reg = <0>;

View file

@ -29,6 +29,7 @@
pinctrl-1 = <&spi00_sleep>; pinctrl-1 = <&spi00_sleep>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
overrun-character = <0x00>; overrun-character = <0x00>;
zephyr,pm-device-runtime-auto;
slow@0 { slow@0 {
compatible = "test-spi-loopback-slow"; compatible = "test-spi-loopback-slow";
reg = <0>; reg = <0>;

View file

@ -7,6 +7,7 @@
&spi3 { &spi3 {
overrun-character = <0x00>; overrun-character = <0x00>;
cs-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; cs-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
zephyr,pm-device-runtime-auto;
slow@0 { slow@0 {
compatible = "test-spi-loopback-slow"; compatible = "test-spi-loopback-slow";
reg = <0>; reg = <0>;

View file

@ -228,3 +228,8 @@ tests:
filter: CONFIG_SOC_FAMILY_MAX32 filter: CONFIG_SOC_FAMILY_MAX32
platform_allow: platform_allow:
- apard32690/max32690/m4 - apard32690/max32690/m4
drivers.spi.nrf_pm_runtime:
extra_configs:
- CONFIG_PM_DEVICE=y
- CONFIG_PM_DEVICE_RUNTIME=y
filter: CONFIG_SOC_FAMILY_NORDIC_NRF