xref: /openbmc/linux/drivers/mtd/spi-nor/Kconfig (revision 4ec575b7)
1# SPDX-License-Identifier: GPL-2.0-only
2menuconfig MTD_SPI_NOR
3	tristate "SPI-NOR device support"
4	depends on MTD
5	depends on MTD && SPI_MASTER
6	select SPI_MEM
7	help
8	  This is the framework for the SPI NOR which can be used by the SPI
9	  device drivers and the SPI-NOR device driver.
10
11if MTD_SPI_NOR
12
13config MTD_SPI_NOR_USE_4K_SECTORS
14	bool "Use small 4096 B erase sectors"
15	default y
16	help
17	  Many flash memories support erasing small (4096 B) sectors. Depending
18	  on the usage this feature may provide performance gain in comparison
19	  to erasing whole blocks (32/64 KiB).
20	  Changing a small part of the flash's contents is usually faster with
21	  small sectors. On the other hand erasing should be faster when using
22	  64 KiB block instead of 16 × 4 KiB sectors.
23
24	  Please note that some tools/drivers/filesystems may not work with
25	  4096 B erase size (e.g. UBIFS requires 15 KiB as a minimum).
26
27config SPI_ASPEED_SMC
28	tristate "Aspeed flash controllers in SPI mode"
29	depends on ARCH_ASPEED || COMPILE_TEST
30	depends on HAS_IOMEM && OF
31	help
32	  This enables support for the Firmware Memory controller (FMC)
33	  in the Aspeed AST2500/AST2400 SoCs when attached to SPI NOR chips,
34	  and support for the SPI flash memory controller (SPI) for
35	  the host firmware. The implementation only supports SPI NOR.
36
37config SPI_CADENCE_QUADSPI
38	tristate "Cadence Quad SPI controller"
39	depends on OF && (ARM || ARM64 || COMPILE_TEST)
40	help
41	  Enable support for the Cadence Quad SPI Flash controller.
42
43	  Cadence QSPI is a specialized controller for connecting an SPI
44	  Flash over 1/2/4-bit wide bus. Enable this option if you have a
45	  device with a Cadence QSPI controller and want to access the
46	  Flash as an MTD device.
47
48config SPI_HISI_SFC
49	tristate "Hisilicon FMC SPI-NOR Flash Controller(SFC)"
50	depends on ARCH_HISI || COMPILE_TEST
51	depends on HAS_IOMEM
52	help
53	  This enables support for HiSilicon FMC SPI-NOR flash controller.
54
55config SPI_MTK_QUADSPI
56	tristate "MediaTek Quad SPI controller"
57	depends on HAS_IOMEM
58	help
59	  This enables support for the Quad SPI controller in master mode.
60	  This controller does not support generic SPI. It only supports
61	  SPI NOR.
62
63config SPI_NXP_SPIFI
64	tristate "NXP SPI Flash Interface (SPIFI)"
65	depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
66	depends on HAS_IOMEM
67	help
68	  Enable support for the NXP LPC SPI Flash Interface controller.
69
70	  SPIFI is a specialized controller for connecting serial SPI
71	  Flash. Enable this option if you have a device with a SPIFI
72	  controller and want to access the Flash as a mtd device.
73
74config SPI_INTEL_SPI
75	tristate
76
77config SPI_INTEL_SPI_PCI
78	tristate "Intel PCH/PCU SPI flash PCI driver (DANGEROUS)"
79	depends on X86 && PCI
80	select SPI_INTEL_SPI
81	help
82	  This enables PCI support for the Intel PCH/PCU SPI controller in
83	  master mode. This controller is present in modern Intel hardware
84	  and is used to hold BIOS and other persistent settings. Using
85	  this driver it is possible to upgrade BIOS directly from Linux.
86
87	  Say N here unless you know what you are doing. Overwriting the
88	  SPI flash may render the system unbootable.
89
90	  To compile this driver as a module, choose M here: the module
91	  will be called intel-spi-pci.
92
93config SPI_INTEL_SPI_PLATFORM
94	tristate "Intel PCH/PCU SPI flash platform driver (DANGEROUS)"
95	depends on X86
96	select SPI_INTEL_SPI
97	help
98	  This enables platform support for the Intel PCH/PCU SPI
99	  controller in master mode. This controller is present in modern
100	  Intel hardware and is used to hold BIOS and other persistent
101	  settings. Using this driver it is possible to upgrade BIOS
102	  directly from Linux.
103
104	  Say N here unless you know what you are doing. Overwriting the
105	  SPI flash may render the system unbootable.
106
107	  To compile this driver as a module, choose M here: the module
108	  will be called intel-spi-platform.
109
110endif # MTD_SPI_NOR
111