From 85f09f72f18f14eb3b06dcfbc448e16145b75fd2 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Tue, 27 May 2014 21:27:14 +0000 Subject: Add support for ESMT F25L32PA Corresponding to flashrom svn r1801. Signed-off-by: Stefan Tauner Acked-by: Stefan Tauner --- chipdrivers.h | 1 + flashchips.c | 35 +++++++++++++++++++++++++++++++++++ flashchips.h | 1 + spi25_statusreg.c | 13 +++++++++++++ 4 files changed, 50 insertions(+) diff --git a/chipdrivers.h b/chipdrivers.h index f270b5546..4cebff964 100644 --- a/chipdrivers.h +++ b/chipdrivers.h @@ -71,6 +71,7 @@ int spi_prettyprint_status_register_default_bp1(struct flashctx *flash); int spi_prettyprint_status_register_default_bp2(struct flashctx *flash); int spi_prettyprint_status_register_default_bp3(struct flashctx *flash); int spi_prettyprint_status_register_default_bp4(struct flashctx *flash); +int spi_prettyprint_status_register_bp2_bpl(struct flashctx *flash); int spi_disable_blockprotect(struct flashctx *flash); int spi_disable_blockprotect_bp2_srwd(struct flashctx *flash); int spi_disable_blockprotect_bp3_srwd(struct flashctx *flash); diff --git a/flashchips.c b/flashchips.c index a082e75ae..a21e21ab6 100644 --- a/flashchips.c +++ b/flashchips.c @@ -3117,6 +3117,41 @@ const struct flashchip flashchips[] = { .voltage = {2700, 3600}, }, + { + .vendor = "ESMT", + .name = "F25L32PA", + .bustype = BUS_SPI, + .manufacture_id = ESMT_ID, + .model_id = ESMT_F25L32PA, + .total_size = 4096, + .page_size = 256, + .feature_bits = FEATURE_WRSR_EITHER | 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 = { {4 * 1024 * 1024, 1} }, + .block_erase = spi_block_erase_60, + }, { + .eraseblocks = { {4 * 1024 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .printlock = spi_prettyprint_status_register_bp2_bpl, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, + .voltage = {2700, 3600}, + }, + { .vendor = "Eon", .name = "EN25B05", diff --git a/flashchips.h b/flashchips.h index 234e58c68..383dc1397 100644 --- a/flashchips.h +++ b/flashchips.h @@ -208,6 +208,7 @@ #define ESMT_ID 0x8C /* Elite Semiconductor Memory Technology (ESMT) / EFST Elite Flash Storage */ #define ESMT_F25L008A 0x2014 +#define ESMT_F25L32PA 0x2016 #define ESMT_F25D08QA 0x2534 #define ESMT_F25L16QA2S 0x4015 #define ESMT_F25L32QA 0x4016 diff --git a/spi25_statusreg.c b/spi25_statusreg.c index f96d4e8f1..9f8c9ae0f 100644 --- a/spi25_statusreg.c +++ b/spi25_statusreg.c @@ -354,6 +354,19 @@ int spi_prettyprint_status_register_default_bp4(struct flashctx *flash) return 0; } +int spi_prettyprint_status_register_bp2_bpl(struct flashctx *flash) +{ + uint8_t status = spi_read_status_register(flash); + spi_prettyprint_status_register_hex(status); + + spi_prettyprint_status_register_bpl(status); + spi_prettyprint_status_register_bit(status, 6); + spi_prettyprint_status_register_bit(status, 5); + spi_prettyprint_status_register_bp(status, 2); + spi_prettyprint_status_register_welwip(status); + return 0; +} + /* === Amic === * FIXME: spi_disable_blockprotect is incorrect but works fine for chips using * spi_prettyprint_status_register_default_bp1 or -- cgit v1.2.3