xref: /OK3568_Linux_fs/u-boot/drivers/mtd/spi/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunmenu "SPI Flash Support"
2*4882a593Smuzhiyun
3*4882a593Smuzhiyunconfig DM_SPI_FLASH
4*4882a593Smuzhiyun	bool "Enable Driver Model for SPI flash"
5*4882a593Smuzhiyun	depends on DM && DM_SPI
6*4882a593Smuzhiyun	help
7*4882a593Smuzhiyun	  Enable driver model for SPI flash. This SPI flash interface
8*4882a593Smuzhiyun	  (spi_flash_probe(), spi_flash_write(), etc.) is then
9*4882a593Smuzhiyun	  implemented by the SPI flash uclass. There is one standard
10*4882a593Smuzhiyun	  SPI flash driver which knows how to probe most chips
11*4882a593Smuzhiyun	  supported by U-Boot. The uclass interface is defined in
12*4882a593Smuzhiyun	  include/spi_flash.h, but is currently fully compatible
13*4882a593Smuzhiyun	  with the old interface to avoid confusion and duplication
14*4882a593Smuzhiyun	  during the transition parent. SPI and SPI flash must be
15*4882a593Smuzhiyun	  enabled together (it is not possible to use driver model
16*4882a593Smuzhiyun	  for one and not the other).
17*4882a593Smuzhiyun
18*4882a593Smuzhiyunconfig SPI_FLASH_SANDBOX
19*4882a593Smuzhiyun	bool "Support sandbox SPI flash device"
20*4882a593Smuzhiyun	depends on SANDBOX && DM_SPI_FLASH
21*4882a593Smuzhiyun	help
22*4882a593Smuzhiyun	  Since sandbox cannot access real devices, an emulation mechanism is
23*4882a593Smuzhiyun	  provided instead. Drivers can be connected up to the sandbox SPI
24*4882a593Smuzhiyun	  bus (see CONFIG_SANDBOX_SPI) and SPI traffic will be routed to this
25*4882a593Smuzhiyun	  device. Typically the contents of the emulated SPI flash device is
26*4882a593Smuzhiyun	  stored in a file on the host filesystem.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyunconfig SPI_FLASH
29*4882a593Smuzhiyun	bool "SPI Flash Core Interface support"
30*4882a593Smuzhiyun	select SPI_MEM
31*4882a593Smuzhiyun	help
32*4882a593Smuzhiyun	  Enable the SPI flash Core support. This will include basic
33*4882a593Smuzhiyun	  standard support for things like probing, read / write, and
34*4882a593Smuzhiyun	  erasing through cmd_sf interface.
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun	  If unsure, say N
37*4882a593Smuzhiyun
38*4882a593Smuzhiyunconfig SF_DEFAULT_BUS
39*4882a593Smuzhiyun	int "SPI Flash default bus identifier"
40*4882a593Smuzhiyun	depends on SPI_FLASH || DM_SPI_FLASH
41*4882a593Smuzhiyun	default 0
42*4882a593Smuzhiyun	help
43*4882a593Smuzhiyun	  The default bus may be provided by the platform
44*4882a593Smuzhiyun	  to handle the common case when only a single serial
45*4882a593Smuzhiyun	  flash is present on the system.
46*4882a593Smuzhiyun
47*4882a593Smuzhiyunconfig SF_DEFAULT_CS
48*4882a593Smuzhiyun	int "SPI Flash default Chip-select"
49*4882a593Smuzhiyun	depends on SPI_FLASH || DM_SPI_FLASH
50*4882a593Smuzhiyun	default 0
51*4882a593Smuzhiyun	help
52*4882a593Smuzhiyun	  The default chip select may be provided by the platform
53*4882a593Smuzhiyun	  to handle the common case when only a single serial
54*4882a593Smuzhiyun	  flash is present on the system.
55*4882a593Smuzhiyun
56*4882a593Smuzhiyunconfig SF_DEFAULT_MODE
57*4882a593Smuzhiyun	hex "SPI Flash default mode (see include/spi.h)"
58*4882a593Smuzhiyun	depends on SPI_FLASH || DM_SPI_FLASH
59*4882a593Smuzhiyun	default 3
60*4882a593Smuzhiyun	help
61*4882a593Smuzhiyun	  The default mode may be provided by the platform
62*4882a593Smuzhiyun	  to handle the common case when only a single serial
63*4882a593Smuzhiyun	  flash is present on the system.
64*4882a593Smuzhiyun	  Not used for boot with device tree; the SPI driver reads
65*4882a593Smuzhiyun	  speed and mode from platdata values computed from
66*4882a593Smuzhiyun	  available node.
67*4882a593Smuzhiyun
68*4882a593Smuzhiyunconfig SF_DEFAULT_SPEED
69*4882a593Smuzhiyun	int "SPI Flash default speed in Hz"
70*4882a593Smuzhiyun	depends on SPI_FLASH || DM_SPI_FLASH
71*4882a593Smuzhiyun	default 1000000
72*4882a593Smuzhiyun	help
73*4882a593Smuzhiyun	  The default speed may be provided by the platform
74*4882a593Smuzhiyun	  to handle the common case when only a single serial
75*4882a593Smuzhiyun	  flash is present on the system.
76*4882a593Smuzhiyun	  Not used for boot with device tree; the SPI driver reads
77*4882a593Smuzhiyun	  speed and mode from platdata values computed from
78*4882a593Smuzhiyun	  available node.
79*4882a593Smuzhiyun
80*4882a593Smuzhiyunif SPI_FLASH
81*4882a593Smuzhiyun
82*4882a593Smuzhiyunconfig SPI_FLASH_SFDP_SUPPORT
83*4882a593Smuzhiyun	bool "SFDP table parsing support for SPI NOR flashes"
84*4882a593Smuzhiyun	depends on !SPI_FLASH_BAR
85*4882a593Smuzhiyun	help
86*4882a593Smuzhiyun	 Enable support for parsing and auto discovery of parameters for
87*4882a593Smuzhiyun	 SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP)
88*4882a593Smuzhiyun	 tables as per JESD216 standard.
89*4882a593Smuzhiyun
90*4882a593Smuzhiyunconfig SPI_FLASH_BAR
91*4882a593Smuzhiyun	bool "SPI flash Bank/Extended address register support"
92*4882a593Smuzhiyun	help
93*4882a593Smuzhiyun	  Enable the SPI flash Bank/Extended address register support.
94*4882a593Smuzhiyun	  Bank/Extended address registers are used to access the flash
95*4882a593Smuzhiyun	  which has size > 16MiB in 3-byte addressing.
96*4882a593Smuzhiyun
97*4882a593Smuzhiyunconfig SF_DUAL_FLASH
98*4882a593Smuzhiyun	bool "SPI DUAL flash memory support"
99*4882a593Smuzhiyun	help
100*4882a593Smuzhiyun	  Enable this option to support two flash memories connected to a single
101*4882a593Smuzhiyun	  controller. Currently Xilinx Zynq qspi supports this.
102*4882a593Smuzhiyun
103*4882a593Smuzhiyunconfig SPI_FLASH_ATMEL
104*4882a593Smuzhiyun	bool "Atmel SPI flash support"
105*4882a593Smuzhiyun	help
106*4882a593Smuzhiyun	  Add support for various Atmel SPI flash chips (AT45xxx and AT25xxx)
107*4882a593Smuzhiyun
108*4882a593Smuzhiyunconfig SPI_FLASH_EON
109*4882a593Smuzhiyun	bool "EON SPI flash support"
110*4882a593Smuzhiyun	help
111*4882a593Smuzhiyun	  Add support for various EON SPI flash chips (EN25xxx)
112*4882a593Smuzhiyun
113*4882a593Smuzhiyunconfig SPI_FLASH_GIGADEVICE
114*4882a593Smuzhiyun	bool "GigaDevice SPI flash support"
115*4882a593Smuzhiyun	help
116*4882a593Smuzhiyun	  Add support for various GigaDevice SPI flash chips (GD25xxx)
117*4882a593Smuzhiyun
118*4882a593Smuzhiyunconfig SPI_FLASH_ISSI
119*4882a593Smuzhiyun	bool "ISSI SPI flash support"
120*4882a593Smuzhiyun	help
121*4882a593Smuzhiyun	  Add support for various ISSI SPI flash chips (ISxxx)
122*4882a593Smuzhiyun
123*4882a593Smuzhiyunconfig SPI_FLASH_MACRONIX
124*4882a593Smuzhiyun	bool "Macronix SPI flash support"
125*4882a593Smuzhiyun	help
126*4882a593Smuzhiyun	  Add support for various Macronix SPI flash chips (MX25Lxxx)
127*4882a593Smuzhiyun
128*4882a593Smuzhiyunconfig SPI_FLASH_SPANSION
129*4882a593Smuzhiyun	bool "Spansion SPI flash support"
130*4882a593Smuzhiyun	help
131*4882a593Smuzhiyun	  Add support for various Spansion SPI flash chips (S25FLxxx)
132*4882a593Smuzhiyun
133*4882a593Smuzhiyunconfig SPI_FLASH_STMICRO
134*4882a593Smuzhiyun	bool "STMicro SPI flash support"
135*4882a593Smuzhiyun	help
136*4882a593Smuzhiyun	  Add support for various STMicro SPI flash chips (M25Pxxx and N25Qxxx)
137*4882a593Smuzhiyun
138*4882a593Smuzhiyunconfig SPI_FLASH_SST
139*4882a593Smuzhiyun	bool "SST SPI flash support"
140*4882a593Smuzhiyun	help
141*4882a593Smuzhiyun	  Add support for various SST SPI flash chips (SST25xxx)
142*4882a593Smuzhiyun
143*4882a593Smuzhiyunconfig SPI_FLASH_WINBOND
144*4882a593Smuzhiyun	bool "Winbond SPI flash support"
145*4882a593Smuzhiyun	help
146*4882a593Smuzhiyun	  Add support for various Winbond SPI flash chips (W25xxx)
147*4882a593Smuzhiyun
148*4882a593Smuzhiyunconfig SPI_FLASH_XMC
149*4882a593Smuzhiyun	bool "XMC SPI flash support"
150*4882a593Smuzhiyun	help
151*4882a593Smuzhiyun	  Add support for various XMC (Wuhan Xinxin Semiconductor
152*4882a593Smuzhiyun	  Manufacturing Corp.) SPI flash chips (XM25xxx)
153*4882a593Smuzhiyun
154*4882a593Smuzhiyunconfig SPI_FLASH_XTX
155*4882a593Smuzhiyun	bool "XTX SPI flash support"
156*4882a593Smuzhiyun	help
157*4882a593Smuzhiyun	  Add support for various XTX (XTX Technology Limited)
158*4882a593Smuzhiyun	  SPI flash chips (XT25xxx).
159*4882a593Smuzhiyun
160*4882a593Smuzhiyunconfig SPI_FLASH_PUYA
161*4882a593Smuzhiyun	bool "PUYA SPI flash support"
162*4882a593Smuzhiyun	help
163*4882a593Smuzhiyun	  Add support for various PUYA (PUYA Semiconductor (Shangehai) Co., Ltd)
164*4882a593Smuzhiyun	  SPI flash chips (P25Qxxx and PS25Qxxxx).
165*4882a593Smuzhiyun
166*4882a593Smuzhiyunconfig SPI_FLASH_FMSH
167*4882a593Smuzhiyun	bool "FMSH SPI flash support"
168*4882a593Smuzhiyun	help
169*4882a593Smuzhiyun	  Add support for various FMSH (FUDAN MICRO (Shangehai) Co., Ltd)
170*4882a593Smuzhiyun	  SPI flash chips (FM25Qxxx).
171*4882a593Smuzhiyun
172*4882a593Smuzhiyunconfig SPI_FLASH_DOSILICON
173*4882a593Smuzhiyun	bool "DOSILICON SPI flash support"
174*4882a593Smuzhiyun	help
175*4882a593Smuzhiyun	  Add support for various DOSILICON (Dosilicon Co., Ltd)
176*4882a593Smuzhiyun	  SPI flash chips (FM25Qxxx and FM25Mxxx).
177*4882a593Smuzhiyun
178*4882a593Smuzhiyunconfig SPI_FLASH_BOYA
179*4882a593Smuzhiyun	bool "BOYA SPI flash support"
180*4882a593Smuzhiyun	help
181*4882a593Smuzhiyun	  Add support for various BOYA (BOYA Co., Ltd)
182*4882a593Smuzhiyun	  SPI flash chips (BY25Qxxxx).
183*4882a593Smuzhiyun
184*4882a593Smuzhiyunconfig SPI_FLASH_NORMEM
185*4882a593Smuzhiyun	bool "NORMEM SPI flash support"
186*4882a593Smuzhiyun	help
187*4882a593Smuzhiyun	  Add support for various NORMEM (NORMEM Co., Ltd)
188*4882a593Smuzhiyun	  SPI flash chips (NM25Qxxxx).
189*4882a593Smuzhiyun
190*4882a593Smuzhiyunendif
191*4882a593Smuzhiyun
192*4882a593Smuzhiyunconfig SPI_FLASH_USE_4K_SECTORS
193*4882a593Smuzhiyun	bool "Use small 4096 B erase sectors"
194*4882a593Smuzhiyun	depends on SPI_FLASH
195*4882a593Smuzhiyun	default y
196*4882a593Smuzhiyun	help
197*4882a593Smuzhiyun	  Many flash memories support erasing small (4096 B) sectors. Depending
198*4882a593Smuzhiyun	  on the usage this feature may provide performance gain in comparison
199*4882a593Smuzhiyun	  to erasing whole blocks (32/64 KiB).
200*4882a593Smuzhiyun	  Changing a small part of the flash's contents is usually faster with
201*4882a593Smuzhiyun	  small sectors. On the other hand erasing should be faster when using
202*4882a593Smuzhiyun	  64 KiB block instead of 16 × 4 KiB sectors.
203*4882a593Smuzhiyun
204*4882a593Smuzhiyun	  Please note that some tools/drivers/filesystems may not work with
205*4882a593Smuzhiyun	  4096 B erase size (e.g. UBIFS requires 15 KiB as a minimum).
206*4882a593Smuzhiyun
207*4882a593Smuzhiyunconfig SPI_FLASH_DATAFLASH
208*4882a593Smuzhiyun	bool "AT45xxx DataFlash support"
209*4882a593Smuzhiyun	depends on SPI_FLASH && DM_SPI_FLASH
210*4882a593Smuzhiyun	help
211*4882a593Smuzhiyun	  Enable the access for SPI-flash-based AT45xxx DataFlash chips.
212*4882a593Smuzhiyun	  DataFlash is a kind of SPI flash. Most AT45 chips have two buffers
213*4882a593Smuzhiyun	  in each chip, which may be used for double buffered I/O; but this
214*4882a593Smuzhiyun	  driver doesn't (yet) use these for any kind of i/o overlap or prefetching.
215*4882a593Smuzhiyun
216*4882a593Smuzhiyun	  Sometimes DataFlash is packaged in MMC-format cards, although the
217*4882a593Smuzhiyun	  MMC stack can't (yet?) distinguish between MMC and DataFlash
218*4882a593Smuzhiyun	  protocols during enumeration.
219*4882a593Smuzhiyun
220*4882a593Smuzhiyun	  If unsure, say N
221*4882a593Smuzhiyun
222*4882a593Smuzhiyunconfig SPI_FLASH_MTD
223*4882a593Smuzhiyun	bool "SPI Flash MTD support"
224*4882a593Smuzhiyun	depends on SPI_FLASH && MTD_BLK
225*4882a593Smuzhiyun	help
226*4882a593Smuzhiyun          Enable the MTD support for spi flash layer, this adapter is for
227*4882a593Smuzhiyun	  translating mtd_read/mtd_write commands into spi_flash_read/write
228*4882a593Smuzhiyun	  commands. It is not intended to use it within sf_cmd or the SPI
229*4882a593Smuzhiyun	  flash subsystem. Such an adapter is needed for subsystems like
230*4882a593Smuzhiyun	  UBI which can only operate on top of the MTD layer.
231*4882a593Smuzhiyun
232*4882a593Smuzhiyun	  If unsure, say N
233*4882a593Smuzhiyun
234*4882a593Smuzhiyunconfig SPL_SPI_FLASH_MTD
235*4882a593Smuzhiyun	bool "SPI flash MTD support for SPL"
236*4882a593Smuzhiyun	depends on SPI_FLASH
237*4882a593Smuzhiyun	help
238*4882a593Smuzhiyun          Enable the MTD support for the SPI flash layer in SPL.
239*4882a593Smuzhiyun
240*4882a593Smuzhiyun	  If unsure, say N
241*4882a593Smuzhiyun
242*4882a593Smuzhiyunendmenu # menu "SPI Flash Support"
243