diff --git a/tests/benchmarks/peripheral_load/src/flash_thread.c b/tests/benchmarks/peripheral_load/src/flash_thread.c index f0e0ae028f3a..2c97b9a3d1e5 100644 --- a/tests/benchmarks/peripheral_load/src/flash_thread.c +++ b/tests/benchmarks/peripheral_load/src/flash_thread.c @@ -13,6 +13,8 @@ LOG_MODULE_REGISTER(flash_thd, LOG_LEVEL_INF); #if DT_HAS_COMPAT_STATUS_OKAY(jedec_spi_nor) #define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_spi_nor) +#elif DT_HAS_COMPAT_STATUS_OKAY(jedec_mspi_nor) +#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_mspi_nor) #elif DT_HAS_COMPAT_STATUS_OKAY(nordic_qspi_nor) #define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(nordic_qspi_nor) #else diff --git a/tests/benchmarks/power_consumption/flash/src/driver_test.c b/tests/benchmarks/power_consumption/flash/src/driver_test.c index 4a37b1921bc6..23f818ca54f8 100644 --- a/tests/benchmarks/power_consumption/flash/src/driver_test.c +++ b/tests/benchmarks/power_consumption/flash/src/driver_test.c @@ -8,11 +8,20 @@ #include #include +#if DT_HAS_COMPAT_STATUS_OKAY(jedec_spi_nor) +#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_spi_nor) +#elif DT_HAS_COMPAT_STATUS_OKAY(jedec_mspi_nor) +#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_mspi_nor) +#else +#error Unsupported flash driver +#define FLASH_NODE DT_INVALID_NODE +#endif + #define TEST_AREA_OFFSET 0xff000 #define EXPECTED_SIZE 512 uint8_t buf[EXPECTED_SIZE]; -static const struct device *flash_dev = DEVICE_DT_GET(DT_INST(0, jedec_spi_nor)); +static const struct device *flash_dev = DEVICE_DT_GET(FLASH_NODE); void thread_definition(void)