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	depends on !SPI_NOR
16	help
17	  Enable driver for Andes QSPI
18
19if FLASH_ANDES_QSPI
20
21choice FLASH_ANDES_QSPI_SFDP
22	prompt "Source for Serial Flash Discoverable Parameters"
23	default FLASH_ANDES_QSPI_SFDP_RUNTIME
24
25config FLASH_ANDES_QSPI_SFDP_DEVICETREE
26	bool "Basic Flash Parameters from devicetree node"
27	help
28	  The JESD216 Basic Flash Parameters table must be provided in the
29	  sfdp-bfp property in devicetree.  The size and jedec-id properties are
30	  also required.
31
32config FLASH_ANDES_QSPI_SFDP_RUNTIME
33	bool "Read flash parameters at runtime"
34	help
35	  Read all flash device characteristics from the device at runtime.
36	  This option is the most flexible as it should provide functionality
37	  for all supported JESD216-compatible devices.
38
39endchoice
40
41config FLASH_ANDES_QSPI_INIT_PRIORITY
42	int
43	default 80
44	help
45	  Device driver initialization priority.
46
47config FLASH_ANDES_QSPI_LAYOUT_PAGE_SIZE
48	int "Page size to use for FLASH_LAYOUT feature"
49	default 65536
50	help
51	  When CONFIG_FLASH_PAGE_LAYOUT is used this driver will support
52	  that API.  By default the page size corresponds to the block
53	  size (65536).  Other options include the 32K-byte erase size
54	  (32768), the sector size (4096), or any non-zero multiple of the
55	  sector size.
56
57endif
58