diff --git a/CODEOWNERS b/CODEOWNERS index 9b7963aa4f75..073e81cd244a 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -847,6 +847,7 @@ /tests/drivers/uart/ @nrfconnect/ncs-low-level-test /tests/drivers/sensor/multicore_temp/ @nrfconnect/ncs-low-level-test /tests/drivers/sdp_asm/ @nrfconnect/ncs-low-level-test @nrfconnect/ncs-ll-ursus +/tests/drivers/nrf_qspi_flash/ @nrfconnect/ncs-low-level-test /tests/lib/at_cmd_parser/ @nrfconnect/ncs-modem /tests/lib/at_cmd_custom/ @nrfconnect/ncs-modem /tests/lib/at_parser/ @nrfconnect/ncs-modem diff --git a/scripts/ci/tags.yaml b/scripts/ci/tags.yaml index d1fc4598ce83..606f45924612 100644 --- a/scripts/ci/tags.yaml +++ b/scripts/ci/tags.yaml @@ -1206,6 +1206,7 @@ ci_tests_drivers_flash: - nrf/tests/drivers/flash/ - nrfxlib/nrf_rpc/ - zephyr/drivers/flash/ + - nrf/tests/drivers/nrf_qspi_flash/ ci_tests_unity: files: diff --git a/tests/drivers/nrf_qspi_flash/CMakeLists.txt b/tests/drivers/nrf_qspi_flash/CMakeLists.txt new file mode 100644 index 000000000000..6d779a563528 --- /dev/null +++ b/tests/drivers/nrf_qspi_flash/CMakeLists.txt @@ -0,0 +1,13 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) + +project(nrf_qspi_flash) + +target_sources(app PRIVATE ${ZEPHYR_BASE}/samples/drivers/spi_flash/src/main.c) diff --git a/tests/drivers/nrf_qspi_flash/flash_cfg/mx25r64_single_line.overlay b/tests/drivers/nrf_qspi_flash/flash_cfg/mx25r64_single_line.overlay new file mode 100644 index 000000000000..066f9d0747bc --- /dev/null +++ b/tests/drivers/nrf_qspi_flash/flash_cfg/mx25r64_single_line.overlay @@ -0,0 +1,11 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +&mx25r64 { + status="okay"; + readoc="fastread"; + writeoc="pp"; +}; diff --git a/tests/drivers/nrf_qspi_flash/prj.conf b/tests/drivers/nrf_qspi_flash/prj.conf new file mode 100644 index 000000000000..f6f9bf317a22 --- /dev/null +++ b/tests/drivers/nrf_qspi_flash/prj.conf @@ -0,0 +1,8 @@ +CONFIG_FLASH=y +CONFIG_ASSERT=y + +CONFIG_PRINTK=y +CONFIG_LOG=y +CONFIG_CONSOLE=y +CONFIG_UART_CONSOLE=y +CONFIG_SERIAL=y diff --git a/tests/drivers/nrf_qspi_flash/testcase.yaml b/tests/drivers/nrf_qspi_flash/testcase.yaml new file mode 100644 index 000000000000..a3b8159c16de --- /dev/null +++ b/tests/drivers/nrf_qspi_flash/testcase.yaml @@ -0,0 +1,46 @@ +common: + sysbuild: true + depends_on: spi + +tests: + tests.drivers.nrf_qspi_flash.qspi_multi_line_mode: + tags: + - ci_tests_drivers_flash + - drivers + - flash + - spi + platform_allow: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + integration_platforms: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + harness: console + harness_config: + type: multi_line + ordered: true + regex: + - ".*Flash erase succeeded.*" + - ".*Data read matches data written. Good.*" + + tests.drivers.nrf_qspi_flash.qspi_single_line_mode: + tags: + - ci_tests_drivers_flash + - drivers + - flash + - spi + platform_allow: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + integration_platforms: + - nrf52840dk/nrf52840 + - nrf5340dk/nrf5340/cpuapp + extra_args: + - EXTRA_DTC_OVERLAY_FILE="flash_cfg/mx25r64_single_line.overlay" + harness: console + harness_config: + type: multi_line + ordered: true + regex: + - ".*Flash erase succeeded.*" + - ".*Data read matches data written. Good.*"