summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chipdrivers.h1
-rw-r--r--flashchips.c31
-rw-r--r--flashchips.h1
-rw-r--r--spi25_statusreg.c7
4 files changed, 40 insertions, 0 deletions
diff --git a/chipdrivers.h b/chipdrivers.h
index ee86f83..03d922d 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -73,6 +73,7 @@ int spi_prettyprint_status_register_bp3_srwd(struct flashctx *flash);
int spi_prettyprint_status_register_bp4_srwd(struct flashctx *flash);
int spi_prettyprint_status_register_bp2_bpl(struct flashctx *flash);
int spi_disable_blockprotect(struct flashctx *flash);
+int spi_disable_blockprotect_bp1_srwd(struct flashctx *flash);
int spi_disable_blockprotect_bp2_srwd(struct flashctx *flash);
int spi_disable_blockprotect_bp3_srwd(struct flashctx *flash);
int spi_disable_blockprotect_bp4_srwd(struct flashctx *flash);
diff --git a/flashchips.c b/flashchips.c
index 1bb6f27..0c3bb68 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -9153,6 +9153,37 @@ const struct flashchip flashchips[] = {
{
.vendor = "Sanyo",
+ .name = "LE25FW106",
+ .bustype = BUS_SPI,
+ .manufacture_id = SANYO_ID,
+ .model_id = SANYO_LE25FW106,
+ .total_size = 128,
+ .page_size = 256,
+ .feature_bits = FEATURE_WRSR_WREN,
+ .tested = TEST_OK_PREW,
+ .probe = probe_spi_res2,
+ .probe_timing = TIMING_ZERO,
+ .block_erasers = {
+ {
+ .eraseblocks = { {2 * 1024, 64} },
+ .block_erase = spi_block_erase_d7,
+ }, {
+ .eraseblocks = { {32 * 1024, 4} },
+ .block_erase = spi_block_erase_d8,
+ }, {
+ .eraseblocks = { {128 * 1024, 1} },
+ .block_erase = spi_block_erase_c7,
+ }
+ },
+ .printlock = spi_prettyprint_status_register_bp1_srwd, /* FIXME: Add ERSER error flag. */
+ .unlock = spi_disable_blockprotect_bp1_srwd,
+ .write = spi_chip_write_256,
+ .read = spi_chip_read,
+ .voltage = {2700, 3600},
+ },
+
+ {
+ .vendor = "Sanyo",
.name = "LE25FW406A",
.bustype = BUS_SPI,
.manufacture_id = SANYO_ID,
diff --git a/flashchips.h b/flashchips.h
index eef681b..fb17981 100644
--- a/flashchips.h
+++ b/flashchips.h
@@ -537,6 +537,7 @@
#define SANYO_ID 0x62 /* Sanyo */
#define SANYO_LE25FW203A 0x1600
#define SANYO_LE25FW403A 0x1100
+#define SANYO_LE25FW106 0x15
#define SANYO_LE25FW406 0x07 /* RES2 */
#define SANYO_LE25FW418A 0x10 /* RES2 and some weird 1 byte RDID variant */
#define SANYO_LE25FW406A 0x1A /* RES2, no datasheet */
diff --git a/spi25_statusreg.c b/spi25_statusreg.c
index 793290a..69b2126 100644
--- a/spi25_statusreg.c
+++ b/spi25_statusreg.c
@@ -196,6 +196,13 @@ int spi_disable_blockprotect(struct flashctx *flash)
return spi_disable_blockprotect_generic(flash, 0x3C, 0, 0, 0xFF);
}
+/* A common block protection disable that tries to unset the status register bits masked by 0x0C (BP0-1) and
+ * protected/locked by bit #7. Useful when bits 4-5 may be non-0). */
+int spi_disable_blockprotect_bp1_srwd(struct flashctx *flash)
+{
+ return spi_disable_blockprotect_generic(flash, 0x0C, 1 << 7, 0, 0xFF);
+}
+
/* A common block protection disable that tries to unset the status register bits masked by 0x1C (BP0-2) and
* protected/locked by bit #7. Useful when bit #5 is neither a protection bit nor reserved (and hence possibly
* non-0). */
OpenPOWER on IntegriCloud