This patch differentiates between the N25Q064 1.8V version and 3.0V version which have different JEDEC IDs.<div><br></div><div>It extends the chip name to include the first few characters in the part number. The first two of those characters indicate the process technology (65nm) and feature set, neither of which matter for Flashrom. The third and fourth characters specify voltage and block/sector size and uniformity, which are important.</div>

<div><br></div><div>To abstract the irrelevant portions of the part number leading up to the characters we care about, dots are used. This helps prevent unwanted changes in chip name that can break fragile scripts and confuse people. More about this schema here: <a href="http://www.flashrom.org/pipermail/flashrom/2012-July/009595.html">http://www.flashrom.org/pipermail/flashrom/2012-July/009595.html</a></div>

<div><div><br></div><div>Signed-off-by: David Hendricks <<a href="mailto:dhendrix@google.com">dhendrix@google.com</a>><br clear="all"><div><br></div><div><div>Index: flashchips.c<br></div><div>===================================================================</div>

<div>--- flashchips.c        (revision 1553)</div><div>+++ flashchips.c        (working copy)</div><div>@@ -5425,12 +5425,16 @@</div><div> </div><div>        {</div><div>                .vendor         = "Numonyx",</div>

<div>-               .name           = "N25Q064",</div><div>+               /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */</div><div>+               .name           = "N25Q064..1E",</div><div>                .bustype        = BUS_SPI,</div>

<div>                .manufacture_id = ST_ID,</div><div>-               .model_id       = ST_N25Q064,</div><div>+               .model_id       = ST_N25Q064__1E,</div><div>                .total_size     = 8192,</div><div>

                .page_size      = 256,</div><div>+               /* supports SFDP */</div><div>+               /* OTP: 64B total; read 0x4B, write 0x42 */</div><div>+               .feature_bits   = FEATURE_WRSR_WREN | FEATURE_OTP,</div>

<div>                .tested         = TEST_OK_PREW,</div><div>                .probe          = probe_spi_rdid,</div><div>                .probe_timing   = TIMING_ZERO,</div><div>@@ -5450,9 +5454,44 @@</div><div>                .unlock         = spi_disable_blockprotect,</div>

<div>                .write          = spi_chip_write_256,</div><div>                .read           = spi_chip_read,</div><div>+               .voltage        = {1700, 2000},</div><div>        },</div><div> </div><div>        {</div>

<div>+               .vendor         = "Numonyx",</div><div>+               /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */</div><div>+               .name           = "N25Q064..3E",</div><div>+               .bustype        = BUS_SPI,</div>

<div>+               .manufacture_id = ST_ID,</div><div>+               .model_id       = ST_N25Q064__3E,</div><div>+               .total_size     = 8192,</div><div>+               .page_size      = 256,</div><div>+               /* supports SFDP */</div>

<div>+               /* OTP: 64B total; read 0x4B, write 0x42 */</div><div>+               .feature_bits   = FEATURE_WRSR_WREN | FEATURE_OTP,</div><div>+               .tested         = TEST_OK_PREW,</div><div>+               .probe          = probe_spi_rdid,</div>

<div>+               .probe_timing   = TIMING_ZERO,</div><div>+               .block_erasers  =</div><div>+               {</div><div>+                       {</div><div>+                               .eraseblocks = { {4 * 1024, 2048 } },</div>

<div>+                               .block_erase = spi_block_erase_20,</div><div>+                       }, {</div><div>+                               .eraseblocks = { {64 * 1024, 128} },</div><div>+                               .block_erase = spi_block_erase_d8,</div>

<div>+                       }, {</div><div>+                               .eraseblocks = { {8 * 1024 * 1024, 1} },</div><div>+                               .block_erase = spi_block_erase_c7,</div><div>+                       }</div>

<div>+               },</div><div>+               .unlock         = spi_disable_blockprotect,</div><div>+               .write          = spi_chip_write_256,</div><div>+               .read           = spi_chip_read,</div>

<div>+               .voltage        = {2700, 3600},</div><div>+       },</div><div>+</div><div>+       {</div><div>                .vendor         = "PMC",</div><div>                .name           = "Pm25LV010",</div>

<div>                .bustype        = BUS_SPI,</div><div>Index: flashchips.h</div><div>===================================================================</div><div>--- flashchips.h        (revision 1553)</div><div>+++ flashchips.h        (working copy)</div>

<div>@@ -586,7 +586,8 @@</div><div> #define ST_M29W010B            0x23</div><div> #define ST_M29W040B            0xE3</div><div> #define ST_M29W512B            0x27</div><div>-#define ST_N25Q064             0xBA17</div>
<div>
+#define ST_N25Q064__3E         0xBA17  /* N25Q064, 3V, 64KB/4KB blocks/sectors */</div><div>+#define ST_N25Q064__1E         0xBB17  /* N25Q064, 1.8V, 64KB/4KB blocks/sectors */</div><div> </div><div> #define SYNCMOS_MVC_ID         0x40    /* SyncMOS (SM) and Mosel Vitelic Corporation (MVC) */</div>

<div> #define MVC_V29C51000T         0x00</div></div><div><br></div>-- <br>David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.<br>
</div></div>