1# Flash driver configuration options
2
3# Copyright (c) 2016 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6#
7# Flash driver
8#
9config FLASH_HAS_DRIVER_ENABLED
10	bool
11	help
12	  This option is enabled when any flash driver is enabled.
13
14config FLASH_HAS_EX_OP
15	bool
16	help
17	  This option is selected by drivers that support flash extended
18	  operations.
19
20config FLASH_HAS_PAGE_LAYOUT
21	bool
22	help
23	  This option is enabled when the SoC flash driver supports
24	  retrieving the layout of flash memory pages.
25
26config FLASH_JESD216
27	bool
28	help
29	 Selected by drivers that support JESD216-compatible flash
30	 devices to enable building a common support module.
31
32menuconfig FLASH
33	bool "Flash drivers"
34	help
35	  Enable support for the flash hardware.
36
37if FLASH
38
39module = FLASH
40module-str = flash
41source "subsys/logging/Kconfig.template.log_config"
42
43config FLASH_JESD216_API
44	bool "Provide API to read JESD216 flash parameters"
45	depends on FLASH_JESD216
46	help
47	  This option extends the Zephyr flash API with the ability
48	  to access the Serial Flash Discoverable Parameter section
49	  allowing runtime determination of serial flash parameters
50	  for flash drivers that expose this capability.
51
52config FLASH_SHELL
53	bool "Flash shell"
54	depends on SHELL && FLASH_PAGE_LAYOUT
55	default y
56	help
57	  Enable the flash shell with flash related commands such as test,
58	  write, read and erase.
59
60if FLASH_SHELL
61
62config FLASH_SHELL_TEST_COMMANDS
63	bool "Flash read/write/erase test commands"
64	select CBPRINTF_FP_SUPPORT
65	help
66	  Enable additional flash shell commands for performing
67	  read/write/erase tests with speed output.
68
69config FLASH_SHELL_BUFFER_SIZE
70	hex "Flash shell buffer size"
71	default 0x4000 if FLASH_SHELL_TEST_COMMANDS
72	default 0x1000
73	range 0x400 0x1000000
74	help
75	  Size of the buffer used for flash commands, will determine the
76	  maximum size that can be used with a read/write test.
77
78endif # FLASH_SHELL
79
80config FLASH_PAGE_LAYOUT
81	bool "API for retrieving the layout of pages"
82	depends on FLASH_HAS_PAGE_LAYOUT
83	default y
84	help
85	  Enables API for retrieving the layout of flash memory pages.
86
87config FLASH_EX_OP_ENABLED
88	bool "API for extended flash operations"
89	depends on FLASH_HAS_EX_OP
90	default n
91	help
92	  Enables flash extended operations API. It can be used to perform
93	  non-standard operations e.g. manipulating flash protection.
94
95config FLASH_INIT_PRIORITY
96	int "Flash init priority"
97	default KERNEL_INIT_PRIORITY_DEVICE
98	help
99	  Flash driver device initialization priority. This initialization
100	  priority is used unless the driver implementation has its own
101	  initialization priority
102
103source "drivers/flash/Kconfig.b91"
104
105source "drivers/flash/Kconfig.cc13xx_cc26xx"
106
107source "drivers/flash/Kconfig.at45"
108
109source "drivers/flash/Kconfig.esp32"
110
111source "drivers/flash/Kconfig.it8xxx2"
112
113source "drivers/flash/Kconfig.nrf"
114
115source "drivers/flash/Kconfig.lpc"
116
117source "drivers/flash/Kconfig.mcux"
118
119source "drivers/flash/Kconfig.nios2_qspi"
120
121source "drivers/flash/Kconfig.npcx_fiu"
122
123source "drivers/flash/Kconfig.gecko"
124
125source "drivers/flash/Kconfig.nor"
126
127source "drivers/flash/Kconfig.rpi_pico"
128
129source "drivers/flash/Kconfig.stm32"
130
131source "drivers/flash/Kconfig.stm32_qspi"
132
133source "drivers/flash/Kconfig.stm32_ospi"
134
135source "drivers/flash/Kconfig.sam0"
136
137source "drivers/flash/Kconfig.sam"
138
139source "drivers/flash/Kconfig.simulator"
140
141source "drivers/flash/Kconfig.rv32m1"
142
143source "drivers/flash/Kconfig.nordic_qspi_nor"
144
145source "drivers/flash/Kconfig.smartbond"
146
147source "drivers/flash/Kconfig.cadence_qspi_nor"
148
149source "drivers/flash/Kconfig.gd32"
150
151source "drivers/flash/Kconfig.xmc4xxx"
152
153source "drivers/flash/Kconfig.ifx_cat1"
154
155source "drivers/flash/Kconfig.numaker"
156
157source "drivers/flash/Kconfig.nxp_s32"
158
159source "drivers/flash/Kconfig.andes"
160
161endif # FLASH
162