Add MTD SST25 driver for larger SST25 parts. From Ken Pettit

This commit is contained in:
Gregory Nutt 2013-11-28 08:04:46 -06:00
parent 881c12cad8
commit 5a18f048ce
5 changed files with 1057 additions and 2 deletions

View File

@ -6109,4 +6109,7 @@
* include/mtd/mtd.h: Packed the geometry structure so that it can
support larger erase block sizes without increasing the size of
the geometry structure (2013-11-27).
* drivers/mtd/sst25xx.c: Add another SST25 SerialFlash driver. This
one differs from sst25.c because it supports larger SST25 parts: In
the larger parts support page write instead of byte/word writes like
the smaller parts. From Ken Pettit (2013-11-28).

View File

@ -351,6 +351,42 @@ config SST25_SLOWREAD
endif
config MTD_SST25XX
bool "SPI-based SST25XX FLASH (64-MBit and larger)"
default n
select SPI
---help---
With the 64 MBit and larger parts, SST changed the write mechanism to
support page write instead of byte/word write like the smaller parts.
As a result, the SST25 driver is not compatible with the larger density
parts, and the SST25XX driver must be used instead.
if MTD_SST25XX
config SST25XX_SPIMODE
int "SST25 SPI Mode"
default 0
config SST25XX_SPIFREQUENCY
int "SST25 SPI Frequency"
default 20000000
config SST25XX_MANUFACTURER
hex "Manufacturers ID"
default 0xBF
---help---
Various manufacturers may have produced the parts. 0xBF is the manufacturer ID
for the parts manufactured by SST.
config SST25XX_MEMORY_TYPE
hex "Memory type ID"
default 0x25
---help---
The memory type for SST25VF065 series is 0x25, but this can be modified if needed
to support compatible devices from different manufacturers.
endif
config MTD_SST39FV
bool "SST39FV NOR FLASH"
default n

View File

@ -64,6 +64,10 @@ ifeq ($(CONFIG_MTD_SST25),y)
CSRCS += sst25.c
endif
ifeq ($(CONFIG_MTD_SST25XX),y)
CSRCS += sst25xx.c
endif
ifeq ($(CONFIG_MTD_SST39FV),y)
CSRCS += sst39vf.c
endif

1000
drivers/mtd/sst25xx.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -297,7 +297,7 @@ FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size);
* Name: sst25_initialize
*
* Description:
* Initializes the drvier for SPI-based SST25 FLASH
* Initializes the driver for SPI-based SST25 FLASH
*
* Supports SST25VF512, SST25VF010, SST25VF520, SST25VF540, SST25VF080,
* and SST25VF016
@ -306,6 +306,18 @@ FAR struct mtd_dev_s *rammtd_initialize(FAR uint8_t *start, size_t size);
FAR struct mtd_dev_s *sst25_initialize(FAR struct spi_dev_s *dev);
/****************************************************************************
* Name: sst25xx_initialize
*
* Description:
* Initializes the driver for SPI-based SST25XX FLASH
*
* Supports SST25VF064
*
****************************************************************************/
FAR struct mtd_dev_s *sst25xx_initialize(FAR struct spi_dev_s *dev);
/****************************************************************************
* Name: sst39vf_initialize
*