Skip to content

Commit 41b3824

Browse files
SuperHeroAbnerdkalowsk
authored andcommitted
samples: Update XSPI memc and flash samples on RT700
Add memc sample for XSPI PSRAM. Add spi_flash sample for XSPI Nor Flash. Signed-off-by: Ruijia Wang <[email protected]>
1 parent 4f5cf51 commit 41b3824

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

samples/drivers/memc/src/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
#define MEMC_DEV DT_ALIAS(sram_ext)
3333
#define MEMC_BASE DT_REG_ADDR(MEMC_DEV)
3434
#define MEMC_SIZE DT_REG_SIZE(MEMC_DEV)
35+
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_xspi_psram)
36+
#define MEMC_DEV DT_ALIAS(sram_ext)
37+
#define MSPI_BUS DT_BUS(MEMC_DEV)
38+
#define MEMC_BASE DT_REG_ADDR_BY_IDX(MSPI_BUS, 1)
39+
#define MEMC_SIZE (DT_PROP(MEMC_DEV, size) / 8)
3540
#else
3641
#error At least one driver should be selected!
3742
#endif

samples/drivers/spi_flash/sample.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ tests:
1010
filter: dt_compat_enabled("jedec,spi-nor") or dt_compat_enabled("st,stm32-qspi-nor")
1111
or dt_compat_enabled("st,stm32-ospi-nor") or dt_compat_enabled("st,stm32-xspi-nor")
1212
or dt_compat_enabled("nordic,qspi-nor") or dt_compat_enabled("jedec,mspi-nor")
13+
or dt_compat_enabled("nxp,xspi-nor")
1314
platform_exclude:
1415
- hifive_unmatched/fu740/s7
1516
- hifive_unmatched/fu740/u74

samples/drivers/spi_flash/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
#define SPI_FLASH_COMPAT renesas_rz_qspi_xspi
6464
#elif DT_HAS_COMPAT_STATUS_OKAY(renesas_rz_qspi_spibsc)
6565
#define SPI_FLASH_COMPAT renesas_rz_qspi_spibsc
66+
#elif DT_HAS_COMPAT_STATUS_OKAY(nxp_xspi_nor)
67+
#define SPI_FLASH_COMPAT nxp_xspi_nor
6668
#else
6769
#define SPI_FLASH_COMPAT invalid
6870
#endif

0 commit comments

Comments
 (0)