xref: /rk3399_rockchip-uboot/drivers/mtd/spi/Kconfig (revision 31d4a7d0a3f583c9c8ebbac6d1ca7335fe04affd)
1810fd696SJagan Tekimenu "SPI Flash Support"
2810fd696SJagan Teki
3f94a1bedSSimon Glassconfig DM_SPI_FLASH
4f94a1bedSSimon Glass	bool "Enable Driver Model for SPI flash"
5b3d023b4SMasahiro Yamada	depends on DM && DM_SPI
6f94a1bedSSimon Glass	help
7f94a1bedSSimon Glass	  Enable driver model for SPI flash. This SPI flash interface
8f94a1bedSSimon Glass	  (spi_flash_probe(), spi_flash_write(), etc.) is then
9f94a1bedSSimon Glass	  implemented by the SPI flash uclass. There is one standard
10f94a1bedSSimon Glass	  SPI flash driver which knows how to probe most chips
11f94a1bedSSimon Glass	  supported by U-Boot. The uclass interface is defined in
12f94a1bedSSimon Glass	  include/spi_flash.h, but is currently fully compatible
13f94a1bedSSimon Glass	  with the old interface to avoid confusion and duplication
14f94a1bedSSimon Glass	  during the transition parent. SPI and SPI flash must be
15f94a1bedSSimon Glass	  enabled together (it is not possible to use driver model
16f94a1bedSSimon Glass	  for one and not the other).
17949dd81bSSimon Glass
18949dd81bSSimon Glassconfig SPI_FLASH_SANDBOX
19949dd81bSSimon Glass	bool "Support sandbox SPI flash device"
20949dd81bSSimon Glass	depends on SANDBOX && DM_SPI_FLASH
21949dd81bSSimon Glass	help
22949dd81bSSimon Glass	  Since sandbox cannot access real devices, an emulation mechanism is
23949dd81bSSimon Glass	  provided instead. Drivers can be connected up to the sandbox SPI
24949dd81bSSimon Glass	  bus (see CONFIG_SANDBOX_SPI) and SPI traffic will be routed to this
25949dd81bSSimon Glass	  device. Typically the contents of the emulated SPI flash device is
26949dd81bSSimon Glass	  stored in a file on the host filesystem.
27810fd696SJagan Teki
282ce7e2b6SJagan Tekiconfig SPI_FLASH
2965555e9eSJagan Teki	bool "SPI Flash Core Interface support"
30f2313133SVignesh R	select SPI_MEM
312ce7e2b6SJagan Teki	help
3265555e9eSJagan Teki	  Enable the SPI flash Core support. This will include basic
332ce7e2b6SJagan Teki	  standard support for things like probing, read / write, and
342ce7e2b6SJagan Teki	  erasing through cmd_sf interface.
352ce7e2b6SJagan Teki
362ce7e2b6SJagan Teki	  If unsure, say N
372ce7e2b6SJagan Teki
38ee9b3572SPatrick Delaunayconfig SF_DEFAULT_BUS
39ee9b3572SPatrick Delaunay	int "SPI Flash default bus identifier"
40ee9b3572SPatrick Delaunay	depends on SPI_FLASH || DM_SPI_FLASH
41ee9b3572SPatrick Delaunay	default 0
42ee9b3572SPatrick Delaunay	help
43ee9b3572SPatrick Delaunay	  The default bus may be provided by the platform
44ee9b3572SPatrick Delaunay	  to handle the common case when only a single serial
45ee9b3572SPatrick Delaunay	  flash is present on the system.
46ee9b3572SPatrick Delaunay
47ee9b3572SPatrick Delaunayconfig SF_DEFAULT_CS
48ee9b3572SPatrick Delaunay	int "SPI Flash default Chip-select"
49ee9b3572SPatrick Delaunay	depends on SPI_FLASH || DM_SPI_FLASH
50ee9b3572SPatrick Delaunay	default 0
51ee9b3572SPatrick Delaunay	help
52ee9b3572SPatrick Delaunay	  The default chip select may be provided by the platform
53ee9b3572SPatrick Delaunay	  to handle the common case when only a single serial
54ee9b3572SPatrick Delaunay	  flash is present on the system.
55ee9b3572SPatrick Delaunay
56ee9b3572SPatrick Delaunayconfig SF_DEFAULT_MODE
57ee9b3572SPatrick Delaunay	hex "SPI Flash default mode (see include/spi.h)"
58ee9b3572SPatrick Delaunay	depends on SPI_FLASH || DM_SPI_FLASH
59ee9b3572SPatrick Delaunay	default 3
60ee9b3572SPatrick Delaunay	help
61ee9b3572SPatrick Delaunay	  The default mode may be provided by the platform
62ee9b3572SPatrick Delaunay	  to handle the common case when only a single serial
63ee9b3572SPatrick Delaunay	  flash is present on the system.
64ee9b3572SPatrick Delaunay	  Not used for boot with device tree; the SPI driver reads
65ee9b3572SPatrick Delaunay	  speed and mode from platdata values computed from
66ee9b3572SPatrick Delaunay	  available node.
67ee9b3572SPatrick Delaunay
68ee9b3572SPatrick Delaunayconfig SF_DEFAULT_SPEED
69ee9b3572SPatrick Delaunay	int "SPI Flash default speed in Hz"
70ee9b3572SPatrick Delaunay	depends on SPI_FLASH || DM_SPI_FLASH
71ee9b3572SPatrick Delaunay	default 1000000
72ee9b3572SPatrick Delaunay	help
73ee9b3572SPatrick Delaunay	  The default speed may be provided by the platform
74ee9b3572SPatrick Delaunay	  to handle the common case when only a single serial
75ee9b3572SPatrick Delaunay	  flash is present on the system.
76ee9b3572SPatrick Delaunay	  Not used for boot with device tree; the SPI driver reads
77ee9b3572SPatrick Delaunay	  speed and mode from platdata values computed from
78ee9b3572SPatrick Delaunay	  available node.
79ee9b3572SPatrick Delaunay
802359fc6fSVignesh Rif SPI_FLASH
812359fc6fSVignesh R
822359fc6fSVignesh Rconfig SPI_FLASH_SFDP_SUPPORT
832359fc6fSVignesh R	bool "SFDP table parsing support for SPI NOR flashes"
842359fc6fSVignesh R	depends on !SPI_FLASH_BAR
852359fc6fSVignesh R	help
862359fc6fSVignesh R	 Enable support for parsing and auto discovery of parameters for
872359fc6fSVignesh R	 SPI NOR flashes using Serial Flash Discoverable Parameters (SFDP)
882359fc6fSVignesh R	 tables as per JESD216 standard.
892359fc6fSVignesh R
9084d31b3bSJagan Tekiconfig SPI_FLASH_BAR
9184d31b3bSJagan Teki	bool "SPI flash Bank/Extended address register support"
9284d31b3bSJagan Teki	help
9384d31b3bSJagan Teki	  Enable the SPI flash Bank/Extended address register support.
9484d31b3bSJagan Teki	  Bank/Extended address registers are used to access the flash
9584d31b3bSJagan Teki	  which has size > 16MiB in 3-byte addressing.
9684d31b3bSJagan Teki
97988390b8SMike Looijmansconfig SF_DUAL_FLASH
98988390b8SMike Looijmans	bool "SPI DUAL flash memory support"
99988390b8SMike Looijmans	help
100988390b8SMike Looijmans	  Enable this option to support two flash memories connected to a single
101988390b8SMike Looijmans	  controller. Currently Xilinx Zynq qspi supports this.
102988390b8SMike Looijmans
103d5af9231SNikita Kiryanovconfig SPI_FLASH_ATMEL
104d5af9231SNikita Kiryanov	bool "Atmel SPI flash support"
105d5af9231SNikita Kiryanov	help
106d5af9231SNikita Kiryanov	  Add support for various Atmel SPI flash chips (AT45xxx and AT25xxx)
107d5af9231SNikita Kiryanov
108d5af9231SNikita Kiryanovconfig SPI_FLASH_EON
109d5af9231SNikita Kiryanov	bool "EON SPI flash support"
110d5af9231SNikita Kiryanov	help
111d5af9231SNikita Kiryanov	  Add support for various EON SPI flash chips (EN25xxx)
112d5af9231SNikita Kiryanov
113d5af9231SNikita Kiryanovconfig SPI_FLASH_GIGADEVICE
114d5af9231SNikita Kiryanov	bool "GigaDevice SPI flash support"
115d5af9231SNikita Kiryanov	help
116d5af9231SNikita Kiryanov	  Add support for various GigaDevice SPI flash chips (GD25xxx)
117d5af9231SNikita Kiryanov
1180d229d10SMichal Simekconfig SPI_FLASH_ISSI
1190d229d10SMichal Simek	bool "ISSI SPI flash support"
1200d229d10SMichal Simek	help
1210d229d10SMichal Simek	  Add support for various ISSI SPI flash chips (ISxxx)
1220d229d10SMichal Simek
123d5af9231SNikita Kiryanovconfig SPI_FLASH_MACRONIX
124d5af9231SNikita Kiryanov	bool "Macronix SPI flash support"
125d5af9231SNikita Kiryanov	help
126d5af9231SNikita Kiryanov	  Add support for various Macronix SPI flash chips (MX25Lxxx)
127d5af9231SNikita Kiryanov
128d5af9231SNikita Kiryanovconfig SPI_FLASH_SPANSION
129d5af9231SNikita Kiryanov	bool "Spansion SPI flash support"
130d5af9231SNikita Kiryanov	help
131d5af9231SNikita Kiryanov	  Add support for various Spansion SPI flash chips (S25FLxxx)
132d5af9231SNikita Kiryanov
133d5af9231SNikita Kiryanovconfig SPI_FLASH_STMICRO
134d5af9231SNikita Kiryanov	bool "STMicro SPI flash support"
135d5af9231SNikita Kiryanov	help
136d5af9231SNikita Kiryanov	  Add support for various STMicro SPI flash chips (M25Pxxx and N25Qxxx)
137d5af9231SNikita Kiryanov
138d5af9231SNikita Kiryanovconfig SPI_FLASH_SST
139d5af9231SNikita Kiryanov	bool "SST SPI flash support"
140d5af9231SNikita Kiryanov	help
141d5af9231SNikita Kiryanov	  Add support for various SST SPI flash chips (SST25xxx)
142d5af9231SNikita Kiryanov
143d5af9231SNikita Kiryanovconfig SPI_FLASH_WINBOND
144d5af9231SNikita Kiryanov	bool "Winbond SPI flash support"
145d5af9231SNikita Kiryanov	help
146d5af9231SNikita Kiryanov	  Add support for various Winbond SPI flash chips (W25xxx)
147d5af9231SNikita Kiryanov
148008a0f12SStefan Roeseconfig SPI_FLASH_XMC
149008a0f12SStefan Roese	bool "XMC SPI flash support"
150008a0f12SStefan Roese	help
151008a0f12SStefan Roese	  Add support for various XMC (Wuhan Xinxin Semiconductor
152008a0f12SStefan Roese	  Manufacturing Corp.) SPI flash chips (XM25xxx)
153008a0f12SStefan Roese
1545ce8a834SChris Morganconfig SPI_FLASH_XTX
1555ce8a834SChris Morgan	bool "XTX SPI flash support"
1565ce8a834SChris Morgan	help
1575ce8a834SChris Morgan	  Add support for various XTX (XTX Technology Limited)
1585ce8a834SChris Morgan	  SPI flash chips (XT25xxx).
1595ce8a834SChris Morgan
160*31d4a7d0SJon Linconfig SPI_FLASH_PUYA
161*31d4a7d0SJon Lin	bool "PUYA SPI flash support"
162*31d4a7d0SJon Lin	help
163*31d4a7d0SJon Lin	  Add support for various PUYA (PUYA Semiconductor (Shangehai) Co., Ltd)
164*31d4a7d0SJon Lin	  SPI flash chips (P25Qxxx and PS25Qxxxx).
165*31d4a7d0SJon Lin
166d5af9231SNikita Kiryanovendif
167d5af9231SNikita Kiryanov
1680a026554SMarek Vasutconfig SPI_FLASH_USE_4K_SECTORS
1690a026554SMarek Vasut	bool "Use small 4096 B erase sectors"
1700a026554SMarek Vasut	depends on SPI_FLASH
1710a026554SMarek Vasut	default y
1720a026554SMarek Vasut	help
1730a026554SMarek Vasut	  Many flash memories support erasing small (4096 B) sectors. Depending
1740a026554SMarek Vasut	  on the usage this feature may provide performance gain in comparison
1750a026554SMarek Vasut	  to erasing whole blocks (32/64 KiB).
1760a026554SMarek Vasut	  Changing a small part of the flash's contents is usually faster with
1770a026554SMarek Vasut	  small sectors. On the other hand erasing should be faster when using
1780a026554SMarek Vasut	  64 KiB block instead of 16 × 4 KiB sectors.
1790a026554SMarek Vasut
1800a026554SMarek Vasut	  Please note that some tools/drivers/filesystems may not work with
1810a026554SMarek Vasut	  4096 B erase size (e.g. UBIFS requires 15 KiB as a minimum).
1820a026554SMarek Vasut
183cd9accdcSJagan Tekiconfig SPI_FLASH_DATAFLASH
184cd9accdcSJagan Teki	bool "AT45xxx DataFlash support"
185cd9accdcSJagan Teki	depends on SPI_FLASH && DM_SPI_FLASH
186cd9accdcSJagan Teki	help
187cd9accdcSJagan Teki	  Enable the access for SPI-flash-based AT45xxx DataFlash chips.
188cd9accdcSJagan Teki	  DataFlash is a kind of SPI flash. Most AT45 chips have two buffers
189cd9accdcSJagan Teki	  in each chip, which may be used for double buffered I/O; but this
190cd9accdcSJagan Teki	  driver doesn't (yet) use these for any kind of i/o overlap or prefetching.
191cd9accdcSJagan Teki
192cd9accdcSJagan Teki	  Sometimes DataFlash is packaged in MMC-format cards, although the
193cd9accdcSJagan Teki	  MMC stack can't (yet?) distinguish between MMC and DataFlash
194cd9accdcSJagan Teki	  protocols during enumeration.
195cd9accdcSJagan Teki
196cd9accdcSJagan Teki	  If unsure, say N
197cd9accdcSJagan Teki
1987678dd93SJagan Tekiconfig SPI_FLASH_MTD
1997678dd93SJagan Teki	bool "SPI Flash MTD support"
2007678dd93SJagan Teki	depends on SPI_FLASH
2017678dd93SJagan Teki	help
2027678dd93SJagan Teki          Enable the MTD support for spi flash layer, this adapter is for
2037678dd93SJagan Teki	  translating mtd_read/mtd_write commands into spi_flash_read/write
2047678dd93SJagan Teki	  commands. It is not intended to use it within sf_cmd or the SPI
2057678dd93SJagan Teki	  flash subsystem. Such an adapter is needed for subsystems like
2067678dd93SJagan Teki	  UBI which can only operate on top of the MTD layer.
2077678dd93SJagan Teki
2087678dd93SJagan Teki	  If unsure, say N
2097678dd93SJagan Teki
2104d93a585SFrieder Schrempfconfig SPL_SPI_FLASH_MTD
2114d93a585SFrieder Schrempf	bool "SPI flash MTD support for SPL"
2124d93a585SFrieder Schrempf	depends on SPI_FLASH
2134d93a585SFrieder Schrempf	help
2144d93a585SFrieder Schrempf          Enable the MTD support for the SPI flash layer in SPL.
2154d93a585SFrieder Schrempf
2164d93a585SFrieder Schrempf	  If unsure, say N
2174d93a585SFrieder Schrempf
218810fd696SJagan Tekiendmenu # menu "SPI Flash Support"
219