Skip to content

Commit 222054e

Browse files
committed
[nrf noup] samples|tests: drivers: flash: Add support for "jedec,mspi-nor" devices
Extend several flash samples and tests so that they can also be used with "jedec,mspi-nor" devices. Add configurations needed for the nrf54h20dk/nrf54h20/cpuapp target. Upstream PR #: 80042 Applied as a [nrf noup] due to a conflict. Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent 77a2a04 commit 222054e

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

samples/drivers/jesd216/sample.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tests:
1919
- hifive_unmatched
2020
- mimxrt1170_evk/mimxrt1176/cm7
2121
- mimxrt1170_evk/mimxrt1176/cm4
22-
filter: dt_compat_enabled("jedec,spi-nor")
22+
filter: dt_compat_enabled("jedec,spi-nor") or dt_compat_enabled("jedec,mspi-nor")
2323
depends_on: spi
2424
sample.drivers.jesd216.nrf52840dk_spi:
2525
extra_args:

samples/drivers/jesd216/src/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#if DT_HAS_COMPAT_STATUS_OKAY(jedec_spi_nor)
1616
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_spi_nor)
17+
#elif DT_HAS_COMPAT_STATUS_OKAY(jedec_mspi_nor)
18+
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(jedec_mspi_nor)
1719
#elif DT_HAS_COMPAT_STATUS_OKAY(nordic_qspi_nor)
1820
#define FLASH_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(nordic_qspi_nor)
1921
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_qspi_nor)
@@ -201,7 +203,7 @@ static void summarize_dw15(const struct jesd216_param_header *php,
201203
printf("0-4-4 Mode methods: entry 0x%01x ; exit 0x%02x\n",
202204
dw15.entry_044, dw15.exit_044);
203205
} else {
204-
printf("0-4-4 Mode: not supported");
206+
printf("0-4-4 Mode: not supported\n");
205207
}
206208
printf("4-4-4 Mode sequences: enable 0x%02x ; disable 0x%01x\n",
207209
dw15.enable_444, dw15.disable_444);

samples/drivers/spi_flash/sample.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ tests:
77
- flash
88
filter: dt_compat_enabled("jedec,spi-nor") or dt_compat_enabled("st,stm32-qspi-nor")
99
or dt_compat_enabled("st,stm32-ospi-nor") or dt_compat_enabled("st,stm32-xspi-nor")
10-
or (dt_compat_enabled("nordic,qspi-nor") and CONFIG_NORDIC_QSPI_NOR)
11-
platform_exclude: hifive_unmatched
10+
or dt_compat_enabled("nordic,qspi-nor") or dt_compat_enabled("jedec,mspi-nor")
11+
platform_exclude:
12+
- hifive_unmatched/fu740/s7
13+
- hifive_unmatched/fu740/u74
1214
harness: console
1315
harness_config:
1416
type: multi_line

samples/drivers/spi_flash/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

3535
#if DT_HAS_COMPAT_STATUS_OKAY(jedec_spi_nor)
3636
#define SPI_FLASH_COMPAT jedec_spi_nor
37+
#elif DT_HAS_COMPAT_STATUS_OKAY(jedec_mspi_nor)
38+
#define SPI_FLASH_COMPAT jedec_mspi_nor
3739
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_qspi_nor)
3840
#define SPI_FLASH_COMPAT st_stm32_qspi_nor
3941
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_ospi_nor)

tests/drivers/flash/common/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#define TEST_AREA_DEV_NODE DT_INST(0, nordic_qspi_nor)
1515
#elif defined(CONFIG_SPI_NOR)
1616
#define TEST_AREA_DEV_NODE DT_INST(0, jedec_spi_nor)
17+
#elif defined(CONFIG_FLASH_MSPI_NOR)
18+
#define TEST_AREA_DEV_NODE DT_INST(0, jedec_mspi_nor)
1719
#else
1820
#define TEST_AREA storage_partition
1921
#endif

0 commit comments

Comments
 (0)