* Updated according to manufacturers datasheet (to the best of my abilities to read it) * Tested with actual S25FL164K via arduino spi
Signed-off-by: Nikolay Martynov mar.kolya@gmail.com --- flashchips.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ flashchips.h | 3 +++ 2 files changed, 75 insertions(+)
diff --git a/flashchips.c b/flashchips.c index a6db11e..3347e4e 100644 --- a/flashchips.c +++ b/flashchips.c @@ -9451,6 +9451,78 @@ const struct flashchip flashchips[] = {
{ .vendor = "Spansion", + .name = "S25FL132K", + .bustype = BUS_SPI, + .manufacture_id = SPANSION_ID, + .model_id = SPANSION_S25FL132K, + .total_size = 4096, + .page_size = 256, + /* OTP: 1024B total, 256B reserved; read 0x48; write + * 0x42, erase 0x44 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .tested = TEST_UNTESTED, + .probe = probe_spi_rdid, + .probe_timing = TIMING_ZERO, + .block_erasers = { + { + .eraseblocks = { {4 * 1024, 1024} }, + .block_erase = spi_block_erase_20, + }, { + .eraseblocks = { {64 * 1024, 64} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { { 4096 * 1024, 1} }, + .block_erase = spi_block_erase_60, + }, { + .eraseblocks = { { 4096 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .printlock = spi_prettyprint_status_register_default_bp3, + .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */ + .write = spi_chip_write_256, + .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */ + .voltage = {2700, 3600}, + }, + + { + .vendor = "Spansion", + .name = "S25FL164K", + .bustype = BUS_SPI, + .manufacture_id = SPANSION_ID, + .model_id = SPANSION_S25FL164K, + .total_size = 8192, + .page_size = 256, + /* OTP: 1024B total, 256B reserved; read 0x48; write + * 0x42, erase 0x44 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .tested = TEST_UNTESTED, + .probe = probe_spi_rdid, + .probe_timing = TIMING_ZERO, + .block_erasers = { + { + .eraseblocks = { {4 * 1024, 2048} }, + .block_erase = spi_block_erase_20, + }, { + .eraseblocks = { {64 * 1024, 128} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { { 8192 * 1024, 1} }, + .block_erase = spi_block_erase_60, + }, { + .eraseblocks = { { 8192 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .printlock = spi_prettyprint_status_register_default_bp3, + .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */ + .write = spi_chip_write_256, + .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */ + .voltage = {2700, 3600}, + }, + + { + .vendor = "Spansion", .name = "S25FL128S......0", /* uniform 256kB sectors */ .bustype = BUS_SPI, .manufacture_id = SPANSION_ID, diff --git a/flashchips.h b/flashchips.h index e6e5e8a..b0d64be 100644 --- a/flashchips.h +++ b/flashchips.h @@ -565,6 +565,9 @@ #define SPANSION_S25FL204 0x4013 #define SPANSION_S25FL208 0x4014 #define SPANSION_S25FL216 0x4015 /* Same as S25FL216K, but the latter supports OTP, 3 status regs, quad I/O, SFDP etc. */ +#define SPANSION_S25FL132K 0x4016 +#define SPANSION_S25FL164K 0x4017 + /* * SST25 chips are SPI, first byte of device ID is memory type, second * byte of device ID is related to log(bitsize) at least for some chips.
On Sun, 9 Mar 2014 22:20:23 -0400 Nikolay Martynov mar.kolya@gmail.com wrote:
- Updated according to manufacturers datasheet (to the best of my abilities to read it)
- Tested with actual S25FL164K via arduino spi
Signed-off-by: Nikolay Martynov mar.kolya@gmail.com
Hello Nikolay,
thank you very much for the patch; it looks very good on a first glance. I need to verify it with the datasheet but I have a small nitpick/question before that: You wrote that you have tested the patch with the S25FL164K but the .tested field of the respective chip does not reflect that. May I assume that the .tested field of the S25FL164K should be set to TEST_OK_PREW?
Hi.
Yes, I was able to flash that this chip on arduino. I was hesitant to change value of .tested field because my setup was somewhat 'wacky' - long wires and stuff, and flashing was not very stable. But this instability was probably due to my setup, not because of code/arduino/chip, so I guess you can change it to TEST_OK_PREW.
Thanks. Nikolay.
2014-05-03 9:00 GMT-04:00 Stefan Tauner stefan.tauner@alumni.tuwien.ac.at:
On Sun, 9 Mar 2014 22:20:23 -0400 Nikolay Martynov mar.kolya@gmail.com wrote:
- Updated according to manufacturers datasheet (to the best of my abilities to read it)
- Tested with actual S25FL164K via arduino spi
Signed-off-by: Nikolay Martynov mar.kolya@gmail.com
Hello Nikolay,
thank you very much for the patch; it looks very good on a first glance. I need to verify it with the datasheet but I have a small nitpick/question before that: You wrote that you have tested the patch with the S25FL164K but the .tested field of the respective chip does not reflect that. May I assume that the .tested field of the S25FL164K should be set to TEST_OK_PREW?
-- Kind regards/Mit freundlichen Grüßen, Stefan Tauner