summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@google.com>2012-10-04 14:41:20 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2012-10-04 14:41:20 +0000
commit99f947ddc8156eb37b5dafc076480f405c9be0b6 (patch)
treea8cd886b564f34d69e82bd133f25436a9c0d3708
parent9e349e43c413b087769bc5dc4c5aaf94fd16937f (diff)
downloadast2050-flashrom-99f947ddc8156eb37b5dafc076480f405c9be0b6.zip
ast2050-flashrom-99f947ddc8156eb37b5dafc076480f405c9be0b6.tar.gz
Differentiate Numonyx N25Q064 1.8V and 3.0V versions
This patch differentiates between the N25Q064 1.8V version and 3.0V version which have different JEDEC IDs. It extends the chip name to include more characters of the part number. The first two of those characters indicate the process technology (65nm) and feature set (hold pin etc.), neither of which matter for flashrom at the moment. The third and fourth characters specify voltage and block/sector size and uniformity, which are important and hence included. 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: http://www.flashrom.org/pipermail/flashrom/2012-July/009595.html Corresponding to flashrom svn r1612. Signed-off-by: David Hendricks <dhendrix@google.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
-rw-r--r--flashchips.c41
-rw-r--r--flashchips.h3
2 files changed, 41 insertions, 3 deletions
diff --git a/flashchips.c b/flashchips.c
index e290e2f..4e09ab1 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -5587,12 +5587,48 @@ const struct flashchip flashchips[] = {
{
.vendor = "Numonyx",
- .name = "N25Q064",
+ .name = "N25Q064..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
.bustype = BUS_SPI,
.manufacture_id = ST_ID,
- .model_id = ST_N25Q064,
+ .model_id = ST_N25Q064__1E,
.total_size = 8192,
.page_size = 256,
+ /* supports SFDP */
+ /* OTP: 64B total; read 0x4B, write 0x42 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
+ .tested = TEST_UNTESTED,
+ .probe = probe_spi_rdid,
+ .probe_timing = TIMING_ZERO,
+ .block_erasers =
+ {
+ {
+ .eraseblocks = { {4 * 1024, 2048 } },
+ .block_erase = spi_block_erase_20,
+ }, {
+ .eraseblocks = { {64 * 1024, 128} },
+ .block_erase = spi_block_erase_d8,
+ }, {
+ .eraseblocks = { {8 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_c7,
+ }
+ },
+ .unlock = spi_disable_blockprotect,
+ .write = spi_chip_write_256,
+ .read = spi_chip_read,
+ .voltage = {1700, 2000},
+ },
+
+ {
+ .vendor = "Numonyx",
+ .name = "N25Q064..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
+ .bustype = BUS_SPI,
+ .manufacture_id = ST_ID,
+ .model_id = ST_N25Q064__3E,
+ .total_size = 8192,
+ .page_size = 256,
+ /* supports SFDP */
+ /* OTP: 64B total; read 0x4B, write 0x42 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
@@ -5612,6 +5648,7 @@ const struct flashchip flashchips[] = {
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
.read = spi_chip_read,
+ .voltage = {2700, 3600},
},
{
diff --git a/flashchips.h b/flashchips.h
index 8e51d35..2115930 100644
--- a/flashchips.h
+++ b/flashchips.h
@@ -591,7 +591,8 @@
#define ST_M29W010B 0x23
#define ST_M29W040B 0xE3
#define ST_M29W512B 0x27
-#define ST_N25Q064 0xBA17
+#define ST_N25Q064__3E 0xBA17 /* N25Q064, 3.0V, 64KB/4KB blocks/sectors */
+#define ST_N25Q064__1E 0xBB17 /* N25Q064, 1.8V, 64KB/4KB blocks/sectors */
#define SYNCMOS_MVC_ID 0x40 /* SyncMOS (SM) and Mosel Vitelic Corporation (MVC) */
#define MVC_V29C51000T 0x00
OpenPOWER on IntegriCloud