Skip to content

Commit ef995df

Browse files
ChiHuaLnashif
authored andcommitted
samples: drivers: spi_flash: add support for the NPCX EVB
This commit adds the support to run the SPI NOR sample code on the npcx7m6fb_evb and npcx9m6f_evb boards. Signed-off-by: Jun Lin <[email protected]> Change-Id: I780c5dfcf53f3ac537da946673fc03f5ee24e90c
1 parent 5d72417 commit ef995df

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright (c) 2021 Nuvoton Technology Corporation.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_SPI_NOR=y
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright (c) 2021 Nuvoton Technology Corporation.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_SPI_NOR=y

samples/drivers/spi_flash/src/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
/* The FPGA bitstream is stored in the lower 536 sectors of the flash. */
3434
#define FLASH_TEST_REGION_OFFSET \
3535
DT_REG_SIZE(DT_NODE_BY_FIXED_PARTITION_LABEL(fpga_bitstream))
36+
#elif defined(CONFIG_BOARD_NPCX9M6F_EVB) || \
37+
defined(CONFIG_BOARD_NPCX7M6FB_EVB)
38+
#define FLASH_TEST_REGION_OFFSET 0x7F000
3639
#else
3740
#define FLASH_TEST_REGION_OFFSET 0xff000
3841
#endif

0 commit comments

Comments
 (0)