2012-04-06 17:49:35 +02:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
2012-04-06 18:45:52 +02:00
|
|
|
# see misc/tools/kconfig-language.txt.
|
2012-04-06 17:49:35 +02:00
|
|
|
#
|
2013-04-30 20:37:34 +02:00
|
|
|
|
2013-05-01 18:59:57 +02:00
|
|
|
comment "MTD Configuration"
|
|
|
|
|
2013-04-30 20:37:34 +02:00
|
|
|
config MTD_PARTITION
|
|
|
|
bool "Support MTD partitions"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
MTD partitions are build as MTD drivers that manage a sub-region
|
|
|
|
of the FLASH memory. The contain the original FLASH MTD driver and
|
|
|
|
simply manage all accesses to assure that (1) FLASH accesses are
|
|
|
|
always offset to the beginning of the partition, and (2) that FLASH
|
|
|
|
accesses do not extend outside of the partition.
|
|
|
|
|
|
|
|
A FLASH device may be broken up into several partitions managed,
|
|
|
|
each managed by a separate MTD driver. The MTD parition interface
|
|
|
|
is described in:
|
|
|
|
|
2013-11-15 18:22:23 +01:00
|
|
|
include/nuttx/mtd/mtd.h
|
2013-04-30 20:37:34 +02:00
|
|
|
FAR struct mtd_dev_s *mtd_partition(FAR struct mtd_dev_s *mtd, off_t offset, off_t nblocks);
|
|
|
|
|
|
|
|
Each call to mtd_partition() will create a new MTD driver instance
|
|
|
|
managing the sub-region of flash beginning at 'offset' (in blocks)
|
|
|
|
and of size 'nblocks' on the device specified by 'mtd'.
|
|
|
|
|
2013-05-01 18:59:57 +02:00
|
|
|
config MTD_BYTE_WRITE
|
|
|
|
bool "Byte write"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Some devices (such as the EON EN25F80) support writing an arbitrary
|
|
|
|
number of bytes to FLASH. This setting enables MTD interfaces to
|
|
|
|
support such writes. The SMART file system can take advantage of
|
|
|
|
this option if it is enabled.
|
|
|
|
|
2013-11-01 14:39:20 +01:00
|
|
|
config MTD_CONFIG
|
|
|
|
bool "Enable Dev Config (MTD based) device"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Provides a /dev/config device for saving / restoring application
|
|
|
|
configuration data to a standard MTD device or partition.
|
|
|
|
|
2013-11-01 19:22:55 +01:00
|
|
|
config MTD_CONFIG_RAM_CONSOLIDATE
|
|
|
|
bool "Always use RAM consolidation method (work in progress)"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
When the MTD device used for /dev/config contains more than one
|
|
|
|
erase block, the "unused entry" consolidation reserves one erase
|
|
|
|
block by default for cleanup purposes. This consumes the minimum
|
|
|
|
amount of RAM, however it "wastes" one erase block on the device.
|
|
|
|
(For configurations that have only a single erase block assigned
|
|
|
|
to the config device, RAM consolidation is the ONLY option.)
|
|
|
|
|
|
|
|
Another apporach is to allow the driver to use the entire MTD
|
|
|
|
device (or partition) to save config data, and then allocate a
|
|
|
|
RAM buffer (the size of one erase block) to perform the
|
|
|
|
consolidation. Enabling this feature basically trades off RAM
|
|
|
|
usage for FLASH usage. If the MTD device used for config data
|
|
|
|
has small erase sizes (4K, etc.) and there is plenty of free RAM
|
|
|
|
available, then this is probably a good option.
|
|
|
|
|
|
|
|
Another benefit of this option is it reduces code space a bit
|
|
|
|
since the "reserved block" consolidate routine is not needed.
|
|
|
|
|
|
|
|
config MTD_CONFIG_ERASEDVALUE
|
|
|
|
hex "Erased value of bytes on the MTD device"
|
|
|
|
depends on MTD_CONFIG
|
|
|
|
default 0xff
|
|
|
|
---help---
|
|
|
|
Specifies the value of the erased state of the MTD FLASH. For
|
|
|
|
most FLASH parts, this is 0xff, but could also be zero depending
|
|
|
|
on the device.
|
|
|
|
|
2013-05-01 18:59:57 +02:00
|
|
|
comment "MTD Device Drivers"
|
|
|
|
|
2013-11-15 18:22:23 +01:00
|
|
|
config MTD_NAND
|
|
|
|
bool "Enable NAND support"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Enable support for NAND FLASH devices.
|
|
|
|
|
2013-11-16 18:46:35 +01:00
|
|
|
config ARCH_NAND_HWECC
|
|
|
|
bool
|
|
|
|
default n
|
|
|
|
|
2013-11-15 18:22:23 +01:00
|
|
|
if MTD_NAND
|
2013-11-15 21:11:21 +01:00
|
|
|
|
2013-11-16 18:46:35 +01:00
|
|
|
config MTD_NAND_MAXNUMBLOCKS
|
|
|
|
int "Max blocks"
|
|
|
|
default 1024
|
|
|
|
---help---
|
|
|
|
Maximum number of blocks in a device
|
|
|
|
|
|
|
|
config MTD_NAND_MAXNUMPAGESPERBLOCK
|
|
|
|
int "Max pages per block"
|
|
|
|
default 256
|
|
|
|
---help---
|
|
|
|
Maximum number of pages in one block
|
|
|
|
|
|
|
|
config MTD_NAND_MAXPAGEDATASIZE
|
|
|
|
int "Max page size"
|
|
|
|
default 4096
|
|
|
|
---help---
|
|
|
|
Maximum size of the data area of one page, in bytes.
|
|
|
|
|
|
|
|
config MTD_NAND_MAXPAGESPARESIZE
|
|
|
|
int "Max size of spare area"
|
|
|
|
default 256
|
|
|
|
---help---
|
|
|
|
Maximum size of the spare area of one page, in bytes.
|
|
|
|
|
|
|
|
config MTD_NAND_MAXSPAREECCBYTES
|
|
|
|
int "Max number of ECC bytes"
|
|
|
|
default 48
|
|
|
|
---help---
|
|
|
|
Maximum number of ECC bytes stored in the spare for one single page.
|
|
|
|
|
2013-11-18 16:43:44 +01:00
|
|
|
config MTD_NAND_BLOCKCHECK
|
|
|
|
bool "Block check"
|
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
Enable support for ECC and bad block checking.
|
|
|
|
|
|
|
|
if MTD_NAND_BLOCKCHECK
|
|
|
|
|
|
|
|
config MTD_NAND_SWECC
|
|
|
|
bool "Sofware ECC support"
|
|
|
|
default n if ARCH_NAND_HWECC
|
|
|
|
default y if !ARCH_NAND_HWECC
|
|
|
|
---help---
|
|
|
|
Build in logic to support software calculation of ECC.
|
|
|
|
|
|
|
|
config MTD_NAND_HWECC
|
|
|
|
bool "Hardware ECC support"
|
|
|
|
default n
|
|
|
|
depends on ARCH_NAND_HWECC
|
|
|
|
---help---
|
|
|
|
Build in logic to support hardware calculation of ECC.
|
|
|
|
|
2013-11-16 18:46:35 +01:00
|
|
|
config MTD_NAND_MAXSPAREEXTRABYTES
|
|
|
|
int "Max extra free bytes"
|
|
|
|
default 206
|
|
|
|
---help---
|
|
|
|
Maximum number of extra free bytes inside the spare area of a page.
|
|
|
|
|
|
|
|
config MTD_NAND_MAX_HWECCSIZE
|
|
|
|
int "Max H/W ECC size"
|
|
|
|
default 200
|
2013-11-18 16:43:44 +01:00
|
|
|
depends on MTD_NAND_HWECC
|
2013-11-16 18:46:35 +01:00
|
|
|
---help---
|
|
|
|
Maximum HW ECC size
|
|
|
|
|
2013-11-15 21:11:21 +01:00
|
|
|
config MTD_NAND_EMBEDDEDECC
|
|
|
|
bool "Support devices with Embedded ECC"
|
|
|
|
default n
|
2013-11-15 22:56:24 +01:00
|
|
|
---help---
|
2013-11-15 21:11:21 +01:00
|
|
|
Some NAND devices have internal, embedded ECC function. One (the
|
|
|
|
only one supported) is Micron, 4-bit ECC, device size = 1Gb or 2Gb
|
|
|
|
or 4Gb.
|
|
|
|
|
2013-11-15 18:22:23 +01:00
|
|
|
endif # MTD_NAND
|
|
|
|
|
2013-04-30 23:54:02 +02:00
|
|
|
config RAMMTD
|
|
|
|
bool "RAM-based MTD driver"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Build support for a RAM-based MTD driver.
|
|
|
|
|
|
|
|
if RAMMTD
|
|
|
|
|
|
|
|
config RAMMTD_BLOCKSIZE
|
|
|
|
int "RAM MTD block size"
|
|
|
|
default 512
|
|
|
|
|
|
|
|
config RAMMTD_ERASESIZE
|
|
|
|
int "RAM MTD erase block size"
|
|
|
|
default 4096
|
|
|
|
|
|
|
|
config RAMMTD_ERASESTATE
|
|
|
|
hex "Simulated erase state"
|
|
|
|
default 0xff
|
|
|
|
|
|
|
|
config RAMMTD_FLASHSIM
|
|
|
|
bool "RAM MTD FLASH Simulation"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
RAMMTD_FLASHSIM will add some extra logic to improve the level of
|
|
|
|
FLASH simulation.
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2012-04-07 16:50:57 +02:00
|
|
|
config MTD_AT24XX
|
2013-09-12 17:44:38 +02:00
|
|
|
bool "I2C-based AT24xx eeprom"
|
2012-04-07 16:50:57 +02:00
|
|
|
default n
|
|
|
|
select I2C
|
2013-04-30 20:37:34 +02:00
|
|
|
---help---
|
2013-09-12 17:44:38 +02:00
|
|
|
Build support for I2C-based AT24CXX EEPROM(at24c32, at24c64,
|
2013-04-30 20:37:34 +02:00
|
|
|
at24c128, at24c256)
|
2012-04-07 16:50:57 +02:00
|
|
|
|
2013-02-11 22:44:00 +01:00
|
|
|
if MTD_AT24XX
|
|
|
|
|
2012-04-07 16:50:57 +02:00
|
|
|
config AT24XX_SIZE
|
2013-09-12 17:44:38 +02:00
|
|
|
int "AT24xx size (kbit)"
|
2012-04-07 16:50:57 +02:00
|
|
|
default 64
|
2013-09-12 17:44:38 +02:00
|
|
|
---help---
|
|
|
|
This is the XX in the AT24Cxx part number. For example, if you have a
|
|
|
|
AT 24C512, then the correct value is 512. This value is also the capacity
|
|
|
|
of the part in kilobits. For example, the 24C512 supports 512 Kbits or
|
|
|
|
512 /8 = 64 KiB.
|
2012-04-07 16:50:57 +02:00
|
|
|
|
|
|
|
config AT24XX_ADDR
|
2013-09-12 17:44:38 +02:00
|
|
|
hex "AT24XX I2C address"
|
2012-04-07 16:50:57 +02:00
|
|
|
default 0x50
|
2013-09-12 17:44:38 +02:00
|
|
|
range 0x50 0x57
|
2013-02-11 22:44:00 +01:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2013-08-05 00:56:41 +02:00
|
|
|
config MTD_AT25
|
|
|
|
bool "SPI-based AT25 FLASH"
|
|
|
|
default n
|
|
|
|
select SPI
|
|
|
|
|
|
|
|
if MTD_AT25
|
|
|
|
|
|
|
|
config AT25_SPIMODE
|
|
|
|
int "AT25 SPI Mode"
|
|
|
|
default 0
|
|
|
|
|
|
|
|
config AT25_SPIFREQUENCY
|
|
|
|
int "AT25 SPI Frequency"
|
|
|
|
default 20000000
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2012-04-07 16:50:57 +02:00
|
|
|
config MTD_AT45DB
|
|
|
|
bool "SPI-based AT45DB flash"
|
|
|
|
default n
|
|
|
|
select SPI
|
2013-02-11 22:44:00 +01:00
|
|
|
|
|
|
|
if MTD_AT45DB
|
|
|
|
|
2012-04-07 16:50:57 +02:00
|
|
|
config AT45DB_FREQUENCY
|
2013-08-05 00:56:41 +02:00
|
|
|
int "AT45DB frequency"
|
2012-04-07 16:50:57 +02:00
|
|
|
default 1000000
|
2013-02-11 22:44:00 +01:00
|
|
|
|
2012-04-07 16:50:57 +02:00
|
|
|
config AT45DB_PREWAIT
|
2013-08-05 00:56:41 +02:00
|
|
|
bool "Enable higher performance write logic"
|
2012-04-07 16:50:57 +02:00
|
|
|
default y
|
|
|
|
|
|
|
|
config AT45DB_PWRSAVE
|
2013-08-05 00:56:41 +02:00
|
|
|
bool "Enable power save"
|
2012-04-07 16:50:57 +02:00
|
|
|
default n
|
2013-02-11 22:44:00 +01:00
|
|
|
|
|
|
|
endif
|
2012-09-17 20:35:37 +02:00
|
|
|
|
2013-05-01 20:04:39 +02:00
|
|
|
config MTD_M25P
|
2012-09-17 20:35:37 +02:00
|
|
|
bool "SPI-based M25P FLASH"
|
2012-04-07 16:50:57 +02:00
|
|
|
default n
|
|
|
|
select SPI
|
|
|
|
|
2013-05-01 20:04:39 +02:00
|
|
|
if MTD_M25P
|
2013-02-11 22:44:00 +01:00
|
|
|
|
2013-05-01 20:04:39 +02:00
|
|
|
config M25P_SPIMODE
|
|
|
|
int "M25P SPI mode"
|
2012-04-07 16:50:57 +02:00
|
|
|
default 0
|
|
|
|
|
2013-05-01 20:04:39 +02:00
|
|
|
config M25P_MANUFACTURER
|
|
|
|
hex "M25P manufacturers ID"
|
2012-04-07 16:50:57 +02:00
|
|
|
default 0x20
|
|
|
|
---help---
|
|
|
|
Various manufacturers may have produced the parts. 0x20 is the manufacturer ID
|
|
|
|
for the STMicro MP25x serial FLASH. If, for example, you are using the a Macronix
|
|
|
|
International MX25 serial FLASH, the correct manufacturer ID would be 0xc2.
|
|
|
|
|
2013-05-01 20:04:39 +02:00
|
|
|
config M25P_MEMORY_TYPE
|
|
|
|
hex "M25P memory type ID"
|
2013-05-01 03:10:54 +02:00
|
|
|
default 0x20
|
|
|
|
---help---
|
|
|
|
The memory type for M25 "P" series is 0x20, but the driver also supports "F" series
|
|
|
|
devices, such as the EON EN25F80 part which adds a 4K sector erase capability. The
|
2013-05-03 20:52:33 +02:00
|
|
|
memory type for "F" series parts from EON is 0x31. The 4K sector erase size will
|
|
|
|
automatically be enabled when filessytems that can use it are enabled, such as SMART.
|
2013-05-01 03:10:54 +02:00
|
|
|
|
2013-05-03 22:32:08 +02:00
|
|
|
config M25P_SUBSECTOR_ERASE
|
|
|
|
bool "Sub-Sector Erase"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Some devices (such as the EON EN25F80) support a smaller erase block
|
|
|
|
size (4K vs 64K). This option enables support for sub-sector erase.
|
|
|
|
The SMART file system can take advantage of this option if it is enabled.
|
|
|
|
|
2013-02-11 22:44:00 +01:00
|
|
|
endif
|
|
|
|
|
2013-05-01 03:10:54 +02:00
|
|
|
config MTD_SMART
|
|
|
|
bool "Sector Mapped Allocation for Really Tiny (SMART) Flash support"
|
2013-08-05 00:56:41 +02:00
|
|
|
default n
|
2013-05-01 03:10:54 +02:00
|
|
|
---help---
|
|
|
|
The MP25x series of Flash devices are typically very small and have a very large
|
|
|
|
erase block size. This causes issues with the standard Flash Translation Layer
|
|
|
|
block driver since it tries to allocate a RAM block the size of a flash erase
|
|
|
|
block, which is typically 64K. This block driver uses a different approach
|
|
|
|
to sacrifice performance for RAM memory footprint by saving data in sectors
|
|
|
|
(typically 2K - 4K based on memory size) and relocating sectors as needed when
|
|
|
|
an erase block needs to be erased.
|
|
|
|
|
|
|
|
config MTD_SMART_SECTOR_SIZE
|
|
|
|
int "SMART Device sector size"
|
|
|
|
depends on MTD_SMART
|
|
|
|
default 1024
|
|
|
|
---help---
|
|
|
|
Sets the size of a single alloction on the SMART device. Larger sector sizes
|
|
|
|
reduce overhead per sector, but cause more wasted space with a lot of smaller
|
|
|
|
files.
|
|
|
|
|
2012-04-07 16:50:57 +02:00
|
|
|
config MTD_RAMTRON
|
|
|
|
bool "SPI-based RAMTRON NVRAM Devices FM25V10"
|
|
|
|
default n
|
|
|
|
select SPI
|
|
|
|
---help---
|
|
|
|
SPI-based RAMTRON NVRAM Devices FM25V10
|
|
|
|
|
2012-09-17 20:35:37 +02:00
|
|
|
config MTD_SST25
|
|
|
|
bool "SPI-based SST25 FLASH"
|
|
|
|
default n
|
|
|
|
select SPI
|
|
|
|
|
2013-02-11 22:44:00 +01:00
|
|
|
if MTD_SST25
|
|
|
|
|
2012-09-17 20:35:37 +02:00
|
|
|
config SST25_SPIMODE
|
|
|
|
int "SST25 SPI Mode"
|
|
|
|
default 0
|
|
|
|
|
|
|
|
config SST25_SPIFREQUENCY
|
|
|
|
int "SST25 SPI Frequency"
|
|
|
|
default 20000000
|
|
|
|
|
|
|
|
config SST25_READONLY
|
|
|
|
bool "SST25 Read-Only FLASH"
|
|
|
|
default n
|
|
|
|
|
|
|
|
config SST25_SECTOR512
|
|
|
|
bool "Simulate 512 byte Erase Blocks"
|
|
|
|
default n
|
|
|
|
|
|
|
|
config SST25_SLOWWRITE
|
|
|
|
bool
|
2013-11-02 15:27:13 +01:00
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
There used to be a bug in the current code when using the higher speed AAI
|
|
|
|
write sequence. The nature of the bug is that the WRDI instruction is not
|
|
|
|
working. At the end of the AAI sequence, the status register continues to
|
|
|
|
report that the SST25 is write enabled (WEL bit) and in AAI mode (AAI
|
|
|
|
bit). This has been fixed by David Sidrane!
|
2012-09-17 20:35:37 +02:00
|
|
|
|
|
|
|
config SST25_SLOWREAD
|
|
|
|
bool
|
|
|
|
default n
|
2013-02-11 22:44:00 +01:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
config MTD_SST39FV
|
|
|
|
bool "SST39FV NOR FLASH"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Selects 16-bit SST NOR FLASH. This includes support for:
|
|
|
|
|
|
|
|
SST39FV1601/SST39FV1602: 2Mb
|
|
|
|
SST39FV3201/SST39FV3202: 4Mb
|
|
|
|
|
|
|
|
if MTD_SST39FV
|
|
|
|
|
|
|
|
config SST39VF_BASE_ADDRESS
|
|
|
|
hex "SST39FV bass address"
|
|
|
|
default 0x00000000
|
|
|
|
---help---
|
|
|
|
This is the address where the SST29VF FLASH can be found in memory.
|
|
|
|
|
|
|
|
endif
|
2012-09-17 20:35:37 +02:00
|
|
|
|
|
|
|
config MTD_W25
|
|
|
|
bool "SPI-based W25 FLASH"
|
|
|
|
default n
|
|
|
|
select SPI
|
|
|
|
|
2013-02-11 22:44:00 +01:00
|
|
|
if MTD_W25
|
|
|
|
|
2012-09-17 20:35:37 +02:00
|
|
|
config W25_SPIMODE
|
|
|
|
int "W25 SPI Mode"
|
|
|
|
default 0
|
|
|
|
|
|
|
|
config W25_SPIFREQUENCY
|
|
|
|
int "W25 SPI Frequency"
|
|
|
|
default 20000000
|
|
|
|
|
|
|
|
config W25_READONLY
|
|
|
|
bool "W25 Read-Only FLASH"
|
|
|
|
default n
|
|
|
|
|
|
|
|
config W25_SECTOR512
|
|
|
|
bool "Simulate 512 byte Erase Blocks"
|
|
|
|
default n
|
|
|
|
|
|
|
|
config W25_SLOWREAD
|
|
|
|
bool
|
|
|
|
default n
|
2013-02-11 22:44:00 +01:00
|
|
|
|
|
|
|
endif
|