Also, enable AAI for ESMT F25L008A.

Signed-off-by: Stefan Tauner <[email protected]>
---
 flashchips.c | 45 ++++++++++++++++++++++++++++++++++++++++-----
 flashchips.h |  1 +
 2 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/flashchips.c b/flashchips.c
index 40b6b8e..33280e6 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -3315,6 +3315,41 @@ const struct flashchip flashchips[] = {
 
        {
                .vendor         = "ESMT",
+               .name           = "F25L004A",
+               .bustype        = BUS_SPI,
+               .manufacture_id = ESMT_ID,
+               .model_id       = ESMT_F25L004A,
+               .total_size     = 512,
+               .page_size      = 256,
+               .feature_bits   = FEATURE_WRSR_EITHER,
+               .tested         = TEST_UNTESTED,
+               .probe          = probe_spi_rdid,
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {4 * 1024, 128} },
+                               .block_erase = spi_block_erase_20,
+                       }, {
+                               .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_plain, /* 
TODO: improve BP2 + AAI */
+               .unlock         = spi_disable_blockprotect_bp2_srwd,
+               .write          = spi_aai_write, /* AAI supported (0xAD) */
+               .read           = spi_chip_read, /* Fast read (0x0B) supported 
*/
+               .voltage        = {2700, 3600},
+       },
+
+       {
+               .vendor         = "ESMT",
                .name           = "F25L008A",
                .bustype        = BUS_SPI,
                .manufacture_id = ESMT_ID,
@@ -3322,7 +3357,7 @@ const struct flashchip flashchips[] = {
                .total_size     = 1024,
                .page_size      = 256,
                .feature_bits   = FEATURE_WRSR_EITHER,
-               .tested         = TEST_OK_PREW,
+               .tested         = { .probe = OK, .read = OK, .erase = OK, 
.write = NT },
                .probe          = probe_spi_rdid,
                .probe_timing   = TIMING_ZERO,
                .block_erasers  =
@@ -3341,10 +3376,10 @@ const struct flashchip flashchips[] = {
                                .block_erase = spi_block_erase_c7,
                        }
                },
-               .printlock      = spi_prettyprint_status_register_plain, /* 
TODO: improve */
-               .unlock         = spi_disable_blockprotect,
-               .write          = spi_chip_write_1,
-               .read           = spi_chip_read,
+               .printlock      = spi_prettyprint_status_register_plain, /* 
TODO: improve BP2 + AAI */
+               .unlock         = spi_disable_blockprotect_bp2_srwd,
+               .write          = spi_aai_write, /* AAI supported (0xAD) */
+               .read           = spi_chip_read, /* Fast read (0x0B) supported 
*/
                .voltage        = {2700, 3600},
        },
 
diff --git a/flashchips.h b/flashchips.h
index 9ffb30f..2553544 100644
--- a/flashchips.h
+++ b/flashchips.h
@@ -216,6 +216,7 @@
 #define CATALYST_CAT28F512     0xB8
 
 #define ESMT_ID                        0x8C    /* Elite Semiconductor Memory 
Technology (ESMT) / EFST Elite Flash Storage */
+#define ESMT_F25L004A          0x2013
 #define ESMT_F25L008A          0x2014
 #define ESMT_F25L32PA          0x2016
 #define ESMT_F25D08QA          0x2534
-- 
Kind regards, Stefan Tauner


_______________________________________________
flashrom mailing list
[email protected]
https://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to