Skip to content

Commit

Permalink
[nrf noup] samples|tests: drivers: flash: Add support for "jedec,mspi…
Browse files Browse the repository at this point in the history
…-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]>
  • Loading branch information
anangl authored and jukkar committed Dec 16, 2024
1 parent 20aa439 commit 51933f6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion samples/drivers/jesd216/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tests:
- hifive_unmatched
- mimxrt1170_evk/mimxrt1176/cm7
- mimxrt1170_evk/mimxrt1176/cm4
filter: dt_compat_enabled("jedec,spi-nor")
filter: dt_compat_enabled("jedec,spi-nor") or dt_compat_enabled("jedec,mspi-nor")
depends_on: spi
sample.drivers.jesd216.nrf52840dk_spi:
extra_args:
Expand Down
4 changes: 3 additions & 1 deletion samples/drivers/jesd216/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#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)
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_qspi_nor)
Expand Down Expand Up @@ -201,7 +203,7 @@ static void summarize_dw15(const struct jesd216_param_header *php,
printf("0-4-4 Mode methods: entry 0x%01x ; exit 0x%02x\n",
dw15.entry_044, dw15.exit_044);
} else {
printf("0-4-4 Mode: not supported");
printf("0-4-4 Mode: not supported\n");
}
printf("4-4-4 Mode sequences: enable 0x%02x ; disable 0x%01x\n",
dw15.enable_444, dw15.disable_444);
Expand Down
6 changes: 4 additions & 2 deletions samples/drivers/spi_flash/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ tests:
- flash
filter: dt_compat_enabled("jedec,spi-nor") or dt_compat_enabled("st,stm32-qspi-nor")
or dt_compat_enabled("st,stm32-ospi-nor") or dt_compat_enabled("st,stm32-xspi-nor")
or (dt_compat_enabled("nordic,qspi-nor") and CONFIG_NORDIC_QSPI_NOR)
platform_exclude: hifive_unmatched
or dt_compat_enabled("nordic,qspi-nor") or dt_compat_enabled("jedec,mspi-nor")
platform_exclude:
- hifive_unmatched/fu740/s7
- hifive_unmatched/fu740/u74
harness: console
harness_config:
type: multi_line
Expand Down
2 changes: 2 additions & 0 deletions samples/drivers/spi_flash/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

#if DT_HAS_COMPAT_STATUS_OKAY(jedec_spi_nor)
#define SPI_FLASH_COMPAT jedec_spi_nor
#elif DT_HAS_COMPAT_STATUS_OKAY(jedec_mspi_nor)
#define SPI_FLASH_COMPAT jedec_mspi_nor
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_qspi_nor)
#define SPI_FLASH_COMPAT st_stm32_qspi_nor
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_ospi_nor)
Expand Down
2 changes: 2 additions & 0 deletions tests/drivers/flash/common/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#define TEST_AREA_DEV_NODE DT_INST(0, nordic_qspi_nor)
#elif defined(CONFIG_SPI_NOR)
#define TEST_AREA_DEV_NODE DT_INST(0, jedec_spi_nor)
#elif defined(CONFIG_FLASH_MSPI_NOR)
#define TEST_AREA_DEV_NODE DT_INST(0, jedec_mspi_nor)
#else
#define TEST_AREA storage_partition
#endif
Expand Down

0 comments on commit 51933f6

Please sign in to comment.