Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at --- flashchips.c | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flashchips.h | 10 +++ spi25_statusreg.c | 4 +- 3 files changed, 214 insertions(+), 2 deletions(-)
diff --git a/flashchips.c b/flashchips.c index cbbb138..9e1700b 100644 --- a/flashchips.c +++ b/flashchips.c @@ -6232,6 +6232,208 @@ const struct flashchip flashchips[] = { },
{ + .vendor = "Nantronics", + .name = "N25S10", + .bustype = BUS_SPI, + .manufacture_id = NANTRONICS_ID_NOPREFIX, + .model_id = NANTRONICS_N25S10, + .total_size = 128, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_UNTESTED, + .probe = probe_spi_rdid, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 32} }, + .block_erase = spi_block_erase_20, + }, { + .eraseblocks = { {4 * 1024, 32} }, + .block_erase = spi_block_erase_d7, + }, { + .eraseblocks = { {32 * 1024, 4} }, + .block_erase = spi_block_erase_52, + }, { + .eraseblocks = { {64 * 1024, 2} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { {128 * 1024, 1} }, + .block_erase = spi_block_erase_60, + }, { + .eraseblocks = { {128 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .printlock = spi_prettyprint_status_register_default_bp3, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */ + .voltage = {2700, 3600}, + }, + + { + .vendor = "Nantronics", + .name = "N25S20", + .bustype = BUS_SPI, + .manufacture_id = NANTRONICS_ID_NOPREFIX, + .model_id = NANTRONICS_N25S20, + .total_size = 256, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_UNTESTED, + .probe = probe_spi_rdid, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 64} }, + .block_erase = spi_block_erase_20, + }, { + .eraseblocks = { {4 * 1024, 64} }, + .block_erase = spi_block_erase_d7, + }, { + .eraseblocks = { {32 * 1024, 8} }, + .block_erase = spi_block_erase_52, + }, { + .eraseblocks = { {64 * 1024, 4} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { {256 * 1024, 1} }, + .block_erase = spi_block_erase_60, + }, { + .eraseblocks = { {256 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .printlock = spi_prettyprint_status_register_default_bp3, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */ + .voltage = {2700, 3600}, + }, + + { + .vendor = "Nantronics", + .name = "N25S40", + .bustype = BUS_SPI, + .manufacture_id = NANTRONICS_ID_NOPREFIX, + .model_id = NANTRONICS_N25S40, + .total_size = 512, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_UNTESTED, + .probe = probe_spi_rdid, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 128} }, + .block_erase = spi_block_erase_20, + }, { + .eraseblocks = { {4 * 1024, 128} }, + .block_erase = spi_block_erase_d7, + }, { + .eraseblocks = { {32 * 1024, 16} }, + .block_erase = spi_block_erase_52, + }, { + .eraseblocks = { {64 * 1024, 8} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { {512 * 1024, 1} }, + .block_erase = spi_block_erase_60, + }, { + .eraseblocks = { {512 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .printlock = spi_prettyprint_status_register_default_bp3, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */ + .voltage = {2700, 3600}, + }, + + { + .vendor = "Nantronics", + .name = "N25S80", + .bustype = BUS_SPI, + .manufacture_id = NANTRONICS_ID_NOPREFIX, + .model_id = NANTRONICS_N25S80, + .total_size = 1024, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_UNTESTED, + .probe = probe_spi_rdid, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 256} }, + .block_erase = spi_block_erase_20, + }, { + .eraseblocks = { {4 * 1024, 256} }, + .block_erase = spi_block_erase_d7, + }, { + .eraseblocks = { {32 * 1024, 32} }, + .block_erase = spi_block_erase_52, + }, { + .eraseblocks = { {64 * 1024, 16} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { {1024 * 1024, 1} }, + .block_erase = spi_block_erase_60, + }, { + .eraseblocks = { {1024 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .printlock = spi_prettyprint_status_register_default_bp3, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */ + .voltage = {2700, 3600}, + }, + + { + .vendor = "Nantronics", + .name = "N25S16", + .bustype = BUS_SPI, + .manufacture_id = NANTRONICS_ID_NOPREFIX, + .model_id = NANTRONICS_N25S16, + .total_size = 2048, + .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, + .tested = TEST_UNTESTED, + .probe = probe_spi_rdid, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = spi_block_erase_20, + }, { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = spi_block_erase_d7, + }, { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { {2048 * 1024, 1} }, + .block_erase = spi_block_erase_60, + }, { + .eraseblocks = { {2048 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .printlock = spi_prettyprint_status_register_default_bp3, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */ + .voltage = {2700, 3600}, + }, + + { .vendor = "Numonyx", .name = "M25PE10", .bustype = BUS_SPI, diff --git a/flashchips.h b/flashchips.h index 62be293..5f39249 100644 --- a/flashchips.h +++ b/flashchips.h @@ -447,6 +447,16 @@ #define MACRONIX_MX29SL800CB 0x6B /* Same as MX29SL802CB */ #define MACRONIX_MX29SL800CT 0xEA /* Same as MX29SL802CT */
+/* Nantronics Semiconductors is listed in JEP106AJ in bank 7, so it should have 6 continuation codes in front + * of the manufacturer ID of 0xD5. http://www.nantronicssemi.com */ +#define NANTRONICS_ID 0x7F7F7F7F7F7FD5 /* Nantronics */ +#define NANTRONICS_ID_NOPREFIX 0xD5 /* Nantronics, missing prefix */ +#define NANTRONICS_N25S10 0x3011 +#define NANTRONICS_N25S20 0x3012 +#define NANTRONICS_N25S40 0x3013 +#define NANTRONICS_N25S80 0x3014 +#define NANTRONICS_N25S16 0x3015 + /* * Programmable Micro Corp is listed in JEP106W in bank 2, so it should * have a 0x7F continuation code prefix. diff --git a/spi25_statusreg.c b/spi25_statusreg.c index 53952fe..1e1a6cc 100644 --- a/spi25_statusreg.c +++ b/spi25_statusreg.c @@ -183,10 +183,10 @@ static void spi_prettyprint_status_register_hex(uint8_t status) msg_cdbg("Chip status register is 0x%02x.\n", status); }
-/* Common highest bit: Status Register Write Disable (SRWD). */ +/* Common highest bit: Status Register Write Disable (SRWD) or Status Register Protect (SRP). */ static void spi_prettyprint_status_register_srwd(uint8_t status) { - msg_cdbg("Chip status register: Status Register Write Disable (SRWD) is %sset\n", + msg_cdbg("Chip status register: Status Register Write Disable (SRWD, SRP, ...) is %sset\n", (status & (1 << 7)) ? "" : "not "); }