1# Kconfig Andes QSPI-NOR configuration options
2#
3# Copyright (c) 2023 Andes Technology Corporation.
4#
5# SPDX-License-Identifier: Apache-2.0
6#
7
8menuconfig FLASH_ANDES_QSPI
9	bool "Andes FLASH driver"
10	default y
11	depends on DT_HAS_ANDESTECH_QSPI_NOR_ENABLED
12	select FLASH_HAS_PAGE_LAYOUT
13	select FLASH_JESD216
14	select FLASH_HAS_DRIVER_ENABLED
15	select FLASH_HAS_EXPLICIT_ERASE
16	depends on !SPI_NOR
17	help
18	  Enable driver for Andes QSPI
19
20if FLASH_ANDES_QSPI
21
22choice FLASH_ANDES_QSPI_SFDP
23	prompt "Source for Serial Flash Discoverable Parameters"
24	default FLASH_ANDES_QSPI_SFDP_RUNTIME
25
26config FLASH_ANDES_QSPI_SFDP_DEVICETREE
27	bool "Basic Flash Parameters from devicetree node"
28	help
29	  The JESD216 Basic Flash Parameters table must be provided in the
30	  sfdp-bfp property in devicetree.  The size and jedec-id properties are
31	  also required.
32
33config FLASH_ANDES_QSPI_SFDP_RUNTIME
34	bool "Read flash parameters at runtime"
35	help
36	  Read all flash device characteristics from the device at runtime.
37	  This option is the most flexible as it should provide functionality
38	  for all supported JESD216-compatible devices.
39
40endchoice
41
42config FLASH_ANDES_QSPI_INIT_PRIORITY
43	int
44	default 80
45	help
46	  Device driver initialization priority.
47
48config FLASH_ANDES_QSPI_LAYOUT_PAGE_SIZE
49	int "Page size to use for FLASH_LAYOUT feature"
50	default 65536
51	help
52	  When CONFIG_FLASH_PAGE_LAYOUT is used this driver will support
53	  that API.  By default the page size corresponds to the block
54	  size (65536).  Other options include the 32K-byte erase size
55	  (32768), the sector size (4096), or any non-zero multiple of the
56	  sector size.
57
58endif
59