Skip to content

Commit e2ff107

Browse files
erwangonashif
authored andcommitted
samples: spi_flash: Add compatibility with st,stm32-qspi-nor
Enable using st,stm32-qspi-nor compatible driver for this sample. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent b711740 commit e2ff107

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

samples/drivers/spi_flash/sample.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sample:
33
tests:
44
sample.drivers.spi.flash:
55
tags: spi flash
6-
filter: dt_compat_enabled("jedec,spi-nor")
6+
filter: dt_compat_enabled("jedec,spi-nor") or dt_compat_enabled("st,stm32-qspi-nor")
77
harness: console
88
harness_config:
99
type: multi_line

samples/drivers/spi_flash/src/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
DT_NODE_HAS_STATUS(DT_INST(0, nordic_qspi_nor), okay)
2020
#define FLASH_DEVICE DT_LABEL(DT_INST(0, nordic_qspi_nor))
2121
#define FLASH_NAME "JEDEC QSPI-NOR"
22+
#elif DT_NODE_HAS_STATUS(DT_INST(0, st_stm32_qspi_nor), okay)
23+
#define FLASH_DEVICE DT_LABEL(DT_INST(0, st_stm32_qspi_nor))
24+
#define FLASH_NAME "JEDEC QSPI-NOR"
2225
#else
2326
#error Unsupported flash driver
2427
#endif

0 commit comments

Comments
 (0)