From 63b187c38599710cc5cd380ac41bcf0a8ca6df03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Mon, 24 Jun 2024 11:54:58 +0200 Subject: [PATCH] tests: drivers: spi: spi_error_cases: Improve nrf54h20dk cpuppr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rework overlays and add sysbuild/vpr_launcher folder to allow standard test configuration for nrf54h20dk cpuppr. Signed-off-by: Krzysztof Chruściński --- .../boards/nrf54h20dk_nrf54h20_common.dtsi | 78 ++++++++++++++++++ .../boards/nrf54h20dk_nrf54h20_cpuapp.overlay | 63 +-------------- .../boards/nrf54h20dk_nrf54h20_cpuppr.overlay | 81 +------------------ .../boards/nrf54h20dk_nrf54h20_cpurad.overlay | 15 ++++ .../nrf54h20dk_nrf54h20_cpuapp.overlay} | 11 +-- .../sysbuild/vpr_launcher/prj.conf | 1 + .../drivers/spi/spi_error_cases/testcase.yaml | 8 -- 7 files changed, 98 insertions(+), 159 deletions(-) create mode 100644 tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_common.dtsi create mode 100644 tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpurad.overlay rename tests/drivers/spi/spi_error_cases/{boards/nrf54h20dk_nrf54h20_cpuppr_launcher.overlay => sysbuild/vpr_launcher/boards/nrf54h20dk_nrf54h20_cpuapp.overlay} (71%) create mode 100644 tests/drivers/spi/spi_error_cases/sysbuild/vpr_launcher/prj.conf diff --git a/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_common.dtsi b/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_common.dtsi new file mode 100644 index 000000000000000..7b8a3fa033a907e --- /dev/null +++ b/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_common.dtsi @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&pinctrl { + spi130_default_alt: spi130_default_alt { + group1 { + psels = , + , + ; + }; + }; + + spi130_sleep_alt: spi130_sleep_alt { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; + + spis131_default_alt: spis131_default_alt { + group1 { + psels = , + , + , + ; + }; + }; + + spis131_sleep_alt: spis131_sleep_alt { + group1 { + psels = , + , + , + ; + low-power-enable; + }; + }; + +}; + +&gpiote130 { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&spi130 { + compatible = "nordic,nrf-spim"; + status = "okay"; + pinctrl-0 = <&spi130_default_alt>; + pinctrl-1 = <&spi130_sleep_alt>; + pinctrl-names = "default", "sleep"; + overrun-character = <0x00>; + cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + dut_spi_dt: test-spi-dev@0 { + compatible = "vnd,spi-device"; + reg = <0>; + spi-max-frequency = <500000>; + }; +}; + +dut_spis: &spi131 { + compatible = "nordic,nrf-spis"; + status = "okay"; + def-char = <0x00>; + pinctrl-0 = <&spis131_default_alt>; + pinctrl-1 = <&spis131_sleep_alt>; + pinctrl-names = "default", "sleep"; + /delete-property/rx-delay-supported; + /delete-property/rx-delay; +}; diff --git a/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuapp.overlay index ec7e9a1702aea9b..871b62ad17deebe 100644 --- a/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuapp.overlay +++ b/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -4,73 +4,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -&pinctrl { - spi130_default_alt: spi130_default_alt { - group1 { - psels = , - , - ; - }; - }; - - spi130_sleep_alt: spi130_sleep_alt { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; - - spis131_default_alt: spis131_default_alt { - group1 { - psels = , - , - , - ; - }; - }; - - spis131_sleep_alt: spis131_sleep_alt { - group1 { - psels = , - , - , - ; - low-power-enable; - }; - }; - -}; - -&gpio0 { - status = "okay"; -}; +#include "nrf54h20dk_nrf54h20_common.dtsi" &spi130 { - compatible = "nordic,nrf-spim"; - status = "okay"; - pinctrl-0 = <&spi130_default_alt>; - pinctrl-1 = <&spi130_sleep_alt>; - pinctrl-names = "default", "sleep"; - overrun-character = <0x00>; - cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - dut_spi_dt: test-spi-dev@0 { - compatible = "vnd,spi-device"; - reg = <0>; - spi-max-frequency = <500000>; - }; memory-regions = <&cpuapp_dma_region>; }; dut_spis: &spi131 { - compatible = "nordic,nrf-spis"; - status = "okay"; - def-char = <0x00>; - pinctrl-0 = <&spis131_default_alt>; - pinctrl-1 = <&spis131_sleep_alt>; - pinctrl-names = "default", "sleep"; memory-regions = <&cpuapp_dma_region>; - /delete-property/rx-delay-supported; - /delete-property/rx-delay; }; diff --git a/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuppr.overlay b/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuppr.overlay index 7643b94190908b1..83d3121c1896364 100644 --- a/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuppr.overlay +++ b/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuppr.overlay @@ -3,83 +3,4 @@ * * SPDX-License-Identifier: Apache-2.0 */ - -&pinctrl { - spi130_default_alt: spi130_default_alt { - group1 { - psels = , - , - ; - }; - }; - - spi130_sleep_alt: spi130_sleep_alt { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; - - spis131_default_alt: spis131_default_alt { - group1 { - psels = , - , - , - ; - }; - }; - - spis131_sleep_alt: spis131_sleep_alt { - group1 { - psels = , - , - , - ; - low-power-enable; - }; - }; - -}; - -&gpio0 { - status = "okay"; -}; - -&gpiote130 { - status = "okay"; - owned-channels = <7>; -}; - -&cpuapp_dma_region { - status = "okay"; -}; - -&spi130 { - compatible = "nordic,nrf-spim"; - status = "okay"; - pinctrl-0 = <&spi130_default_alt>; - pinctrl-1 = <&spi130_sleep_alt>; - pinctrl-names = "default", "sleep"; - overrun-character = <0x00>; - cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - dut_spi_dt: test-spi-dev@0 { - compatible = "vnd,spi-device"; - reg = <0>; - spi-max-frequency = <500000>; - }; - memory-regions = <&cpuapp_dma_region>; -}; - -dut_spis: &spi131 { - compatible = "nordic,nrf-spis"; - status = "okay"; - def-char = <0x00>; - pinctrl-0 = <&spis131_default_alt>; - pinctrl-1 = <&spis131_sleep_alt>; - pinctrl-names = "default", "sleep"; - memory-regions = <&cpuapp_dma_region>; - /delete-property/rx-delay-supported; - /delete-property/rx-delay; -}; +#include "nrf54h20dk_nrf54h20_common.dtsi" diff --git a/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpurad.overlay b/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpurad.overlay new file mode 100644 index 000000000000000..2a27f133a07e4b3 --- /dev/null +++ b/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpurad.overlay @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "nrf54h20dk_nrf54h20_common.dtsi" + +&spi130 { + memory-regions = <&cpurad_dma_region>; +}; + +dut_spis: &spi131 { + memory-regions = <&cpurad_dma_region>; +}; diff --git a/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuppr_launcher.overlay b/tests/drivers/spi/spi_error_cases/sysbuild/vpr_launcher/boards/nrf54h20dk_nrf54h20_cpuapp.overlay similarity index 71% rename from tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuppr_launcher.overlay rename to tests/drivers/spi/spi_error_cases/sysbuild/vpr_launcher/boards/nrf54h20dk_nrf54h20_cpuapp.overlay index 6e30d1731551933..4343187f21fa634 100644 --- a/tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuppr_launcher.overlay +++ b/tests/drivers/spi/spi_error_cases/sysbuild/vpr_launcher/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -3,21 +3,14 @@ * * SPDX-License-Identifier: Apache-2.0 */ +#include "../../../boards/nrf54h20dk_nrf54h20_common.dtsi" &spi130 { status = "reserved"; interrupt-parent = <&cpuppr_clic>; }; -&spi131 { +&dut_spis { status = "reserved"; interrupt-parent = <&cpuppr_clic>; }; - -&shared_ram3x_region { - status = "okay"; -}; - -&gpio0 { - status = "reserved"; -}; diff --git a/tests/drivers/spi/spi_error_cases/sysbuild/vpr_launcher/prj.conf b/tests/drivers/spi/spi_error_cases/sysbuild/vpr_launcher/prj.conf new file mode 100644 index 000000000000000..b2a4ba591044eeb --- /dev/null +++ b/tests/drivers/spi/spi_error_cases/sysbuild/vpr_launcher/prj.conf @@ -0,0 +1 @@ +# nothing here diff --git a/tests/drivers/spi/spi_error_cases/testcase.yaml b/tests/drivers/spi/spi_error_cases/testcase.yaml index ba046ee0292d1de..398fec1ee4ea68e 100644 --- a/tests/drivers/spi/spi_error_cases/testcase.yaml +++ b/tests/drivers/spi/spi_error_cases/testcase.yaml @@ -16,11 +16,3 @@ tests: extra_args: DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay" platform_allow: - nrf54h20dk/nrf54h20/cpuapp - drivers.spi.spi_error_cases.nrf54h20_cpuppr: - platform_allow: nrf54h20dk/nrf54h20/cpuppr - sysbuild: true - extra_args: - - vpr_launcher_DTC_OVERLAY_FILE="../../../tests/drivers/spi/spi_error_cases/boards/nrf54h20dk_nrf54h20_cpuppr_launcher.overlay" - - SB_CONFIG_VPR_LAUNCHER=y - # Disable asserts to fit in limited code memory - - CONFIG_ASSERT=n