diff --git a/tests/drivers/mspi/api/boards/nrf54l15dk_nrf54l15_cpuapp.overlay b/tests/drivers/mspi/api/boards/nrf54l15dk_nrf54l15_cpuapp.overlay new file mode 100644 index 00000000000..0bc92a235bc --- /dev/null +++ b/tests/drivers/mspi/api/boards/nrf54l15dk_nrf54l15_cpuapp.overlay @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + + / { + aliases { + mspi0 = &sdp_mspi; + }; +}; + +&cpuflpr_vpr { + status = "okay"; + + sdp_mspi: sdp_mspi@5004c000 { + mspi_device: mspi_device@0 { + status = "okay"; + compatible = "zephyr,mspi-emul-device"; + reg = <0x0>; + mspi-max-frequency = <48000000>; + }; + }; +}; \ No newline at end of file diff --git a/tests/drivers/mspi/api/src/main.c b/tests/drivers/mspi/api/src/main.c index d6b632f29c1..7d5daa7bbbe 100644 --- a/tests/drivers/mspi/api/src/main.c +++ b/tests/drivers/mspi/api/src/main.c @@ -20,7 +20,11 @@ typedef struct mspi_ambiq_timing_cfg mspi_timing_cfg; typedef enum mspi_ambiq_timing_param mspi_timing_param; #endif +// #if defined(CONFIG_SOC_NRF54L15_CPUAPP) +// #define MSPI_BUS_NODE DT_NODELABEL(sdp_mspi) +// #else #define MSPI_BUS_NODE DT_ALIAS(mspi0) +// #endif static const struct device *mspi_devices[] = { DT_FOREACH_CHILD_STATUS_OKAY_SEP(MSPI_BUS_NODE, DEVICE_DT_GET, (,)) @@ -51,13 +55,17 @@ static struct mspi_dev_cfg device_cfg[] = { DT_FOREACH_CHILD_STATUS_OKAY_SEP(MSPI_BUS_NODE, MSPI_DEVICE_CONFIG_DT, (,)) }; +#if CONFIG_MSPI_XIP static struct mspi_xip_cfg xip_cfg[] = { DT_FOREACH_CHILD_STATUS_OKAY_SEP(MSPI_BUS_NODE, MSPI_XIP_CONFIG_DT, (,)) }; +#endif +#if CONFIG_MSPI_SCRAMBLE static struct mspi_scramble_cfg scramble_cfg[] = { DT_FOREACH_CHILD_STATUS_OKAY_SEP(MSPI_BUS_NODE, MSPI_SCRAMBLE_CONFIG_DT, (,)) }; +#endif ZTEST(mspi_api, test_mspi_api) { @@ -102,9 +110,11 @@ ZTEST(mspi_api, test_mspi_api) zassert_equal(ret, 0, "mspi_timing_config failed."); #endif +#if CONFIG_MSPI_ASYNC ret = mspi_register_callback(mspi_bus, &dev_id[dev_idx], MSPI_BUS_XFER_COMPLETE, NULL, NULL); zassert_equal(ret, 0, "mspi_register_callback failed."); +#endif ret = mspi_get_channel_status(mspi_bus, 0); zassert_equal(ret, 0, "mspi_get_channel_status failed."); diff --git a/tests/drivers/mspi/api/testcase.yaml b/tests/drivers/mspi/api/testcase.yaml index 3675cc485f3..730f6f61438 100644 --- a/tests/drivers/mspi/api/testcase.yaml +++ b/tests/drivers/mspi/api/testcase.yaml @@ -15,3 +15,19 @@ tests: - apollo3p_evb integration_platforms: - native_sim + + drivers.mspi.api.emspi: + tags: + - drivers + - mspi + - api + harness: ztest + platform_allow: + - nrf54l15dk_nrf54l15_cpuapp + integration_platforms: + - nrf54l15dk_nrf54l15_cpuapp + extra_args: + - SB_CONFIG_VPR_LAUNCHER=n + - SB_CONFIG_PARTITION_MANAGER=n + - SB_CONFIG_SDP=y + - SB_CONFIG_SDP_MSPI=y