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 <CHLin56@nuvoton.com>
Change-Id: I780c5dfcf53f3ac537da946673fc03f5ee24e90c
This commit is contained in:
Jun Lin 2021-10-14 18:49:44 +08:00 committed by Anas Nashif
commit ef995dfbdc
3 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,7 @@
#
# Copyright (c) 2021 Nuvoton Technology Corporation.
#
# SPDX-License-Identifier: Apache-2.0
#
CONFIG_SPI_NOR=y

View file

@ -0,0 +1,7 @@
#
# Copyright (c) 2021 Nuvoton Technology Corporation.
#
# SPDX-License-Identifier: Apache-2.0
#
CONFIG_SPI_NOR=y

View file

@ -33,6 +33,9 @@
/* The FPGA bitstream is stored in the lower 536 sectors of the flash. */
#define FLASH_TEST_REGION_OFFSET \
DT_REG_SIZE(DT_NODE_BY_FIXED_PARTITION_LABEL(fpga_bitstream))
#elif defined(CONFIG_BOARD_NPCX9M6F_EVB) || \
defined(CONFIG_BOARD_NPCX7M6FB_EVB)
#define FLASH_TEST_REGION_OFFSET 0x7F000
#else
#define FLASH_TEST_REGION_OFFSET 0xff000
#endif