summaryrefslogtreecommitdiffstats
path: root/flashchips.c
diff options
context:
space:
mode:
Diffstat (limited to 'flashchips.c')
-rw-r--r--flashchips.c271
1 files changed, 249 insertions, 22 deletions
diff --git a/flashchips.c b/flashchips.c
index 9d1b923..16726ad 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -5273,10 +5273,46 @@ const struct flashchip flashchips[] = {
.block_erasers =
{
{
+ .eraseblocks = { {64 * 1024, 32} },
+ .block_erase = spi_block_erase_20,
+ }, {
+ .eraseblocks = { {64 * 1024, 32} },
+ .block_erase = spi_block_erase_d8,
+ }, {
+ .eraseblocks = { {2 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_60,
+ }, {
+ .eraseblocks = { {2 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_c7,
+ },
+ },
+ .printlock = spi_prettyprint_status_register_default_bp2, /* bit6: error flag */
+ .unlock = spi_disable_blockprotect,
+ .write = spi_chip_write_256,
+ .read = spi_chip_read, /* Fast read (0x0B) supported */
+ .voltage = {2700, 3600},
+ },
+
+ {
+ .vendor = "Macronix",
+ .name = "MX25L1605A/MX25L1606E",
+ .bustype = BUS_SPI,
+ .manufacture_id = MACRONIX_ID,
+ .model_id = MACRONIX_MX25L1605,
+ .total_size = 2048,
+ .page_size = 256,
+ /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L1606E only) */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
+ .tested = TEST_OK_PREW,
+ .probe = probe_spi_rdid,
+ .probe_timing = TIMING_ZERO,
+ .block_erasers =
+ {
+ {
.eraseblocks = { {4 * 1024, 512} },
- .block_erase = spi_block_erase_20, /* This erase function has 64k blocksize for eLiteFlash */
+ .block_erase = spi_block_erase_20,
}, {
- .eraseblocks = { {64 * 1024, 32} }, /* Not supported in MX25L1605 (eLiteFlash) and MX25L1605D */
+ .eraseblocks = { {64 * 1024, 32} },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { {64 * 1024, 32} },
@@ -5289,10 +5325,45 @@ const struct flashchip flashchips[] = {
.block_erase = spi_block_erase_c7,
},
},
- .printlock = spi_prettyprint_status_register_default_bp3, /* TODO: check */
+ .printlock = spi_prettyprint_status_register_default_bp3, /* MX25L1605A bp2 only */
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
- .read = spi_chip_read,
+ .read = spi_chip_read, /* Fast read (0x0B) supported */
+ .voltage = {2700, 3600},
+ },
+
+ {
+ .vendor = "Macronix",
+ .name = "MX25L1605D/MX25L1608D",
+ .bustype = BUS_SPI,
+ .manufacture_id = MACRONIX_ID,
+ .model_id = MACRONIX_MX25L1605,
+ .total_size = 2048,
+ .page_size = 256,
+ .feature_bits = FEATURE_WRSR_WREN,
+ .tested = TEST_OK_PREW,
+ .probe = probe_spi_rdid,
+ .probe_timing = TIMING_ZERO,
+ .block_erasers =
+ {
+ {
+ .eraseblocks = { {4 * 1024, 512} },
+ .block_erase = spi_block_erase_20,
+ }, {
+ .eraseblocks = { {64 * 1024, 32} },
+ .block_erase = spi_block_erase_d8,
+ }, {
+ .eraseblocks = { {2 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_60,
+ }, {
+ .eraseblocks = { {2 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_c7,
+ },
+ },
+ .printlock = spi_prettyprint_status_register_default_bp3, /* bit6: Continously Program (CP) mode */
+ .unlock = spi_disable_blockprotect,
+ .write = spi_chip_write_256,
+ .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
.voltage = {2700, 3600},
},
@@ -5304,7 +5375,8 @@ const struct flashchip flashchips[] = {
.model_id = MACRONIX_MX25L1635D,
.total_size = 2048,
.page_size = 256,
- .feature_bits = FEATURE_WRSR_WREN,
+ /* OTP: 64B total; enter 0xB1, exit 0xC1 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
@@ -5324,10 +5396,10 @@ const struct flashchip flashchips[] = {
.block_erase = spi_block_erase_c7,
}
},
- .printlock = spi_prettyprint_status_register_default_bp3, /* TODO: check */
+ .printlock = spi_prettyprint_status_register_default_bp3, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
- .read = spi_chip_read,
+ .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
@@ -5339,7 +5411,8 @@ const struct flashchip flashchips[] = {
.model_id = MACRONIX_MX25L1635E,
.total_size = 2048,
.page_size = 256,
- .feature_bits = FEATURE_WRSR_WREN,
+ /* OTP: 64B total; enter 0xB1, exit 0xC1 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
@@ -5359,16 +5432,16 @@ const struct flashchip flashchips[] = {
.block_erase = spi_block_erase_c7,
}
},
- .printlock = spi_prettyprint_status_register_default_bp3, /* TODO: check */
+ .printlock = spi_prettyprint_status_register_default_bp3, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
- .read = spi_chip_read,
+ .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
.voltage = {2700, 3600},
},
{
.vendor = "Macronix",
- .name = "MX25L3205",
+ .name = "MX25L3205(A)",
.bustype = BUS_SPI,
.manufacture_id = MACRONIX_ID,
.model_id = MACRONIX_MX25L3205,
@@ -5381,12 +5454,87 @@ const struct flashchip flashchips[] = {
.block_erasers =
{
{
+ .eraseblocks = { {64 * 1024, 64} },
+ .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_default_bp2, /* bit6: error flag */
+ .unlock = spi_disable_blockprotect,
+ .write = spi_chip_write_256,
+ .read = spi_chip_read, /* Fast read (0x0B) supported */
+ .voltage = {2700, 3600},
+ },
+
+ {
+ .vendor = "Macronix",
+ .name = "MX25L3205D/MX25L3208D",
+ .bustype = BUS_SPI,
+ .manufacture_id = MACRONIX_ID,
+ .model_id = MACRONIX_MX25L3205,
+ .total_size = 4096,
+ .page_size = 256,
+ /* OTP: 64B total; enter 0xB1, exit 0xC1 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
+ .tested = TEST_OK_PREW,
+ .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_default_bp3, /* bit6: CP mode */
+ .unlock = spi_disable_blockprotect,
+ .write = spi_chip_write_256,
+ .read = spi_chip_read, /* Fast read (0x0B) and dual I/O supported */
+ .voltage = {2700, 3600},
+ },
+
+ {
+ .vendor = "Macronix",
+ .name = "MX25L3206E",
+ .bustype = BUS_SPI,
+ .manufacture_id = MACRONIX_ID,
+ .model_id = MACRONIX_MX25L3205,
+ .total_size = 4096,
+ .page_size = 256,
+ /* OTP: 64B total; enter 0xB1, exit 0xC1 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
+ .tested = TEST_OK_PREW,
+ .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 = { {64 * 1024, 64} },
+ .block_erase = spi_block_erase_52,
+ }, {
.eraseblocks = { {4 * 1024 * 1024, 1} },
.block_erase = spi_block_erase_60,
}, {
@@ -5394,10 +5542,10 @@ const struct flashchip flashchips[] = {
.block_erase = spi_block_erase_c7,
},
},
- .printlock = spi_prettyprint_status_register_default_bp3, /* TODO: check */
+ .printlock = spi_prettyprint_status_register_default_bp3,
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
- .read = spi_chip_read,
+ .read = spi_chip_read, /* Fast read (0x0B) and dual I/O supported */
.voltage = {2700, 3600},
},
@@ -5409,7 +5557,8 @@ const struct flashchip flashchips[] = {
.model_id = MACRONIX_MX25L3235D,
.total_size = 4096,
.page_size = 256,
- .feature_bits = FEATURE_WRSR_WREN,
+ /* OTP: 256B total; enter 0xB1, exit 0xC1 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
@@ -5429,7 +5578,7 @@ const struct flashchip flashchips[] = {
.block_erase = spi_block_erase_c7,
}
},
- .printlock = spi_prettyprint_status_register_default_bp3, /* TODO: check */
+ .printlock = spi_prettyprint_status_register_default_bp3, /* bit6 is quad enable */
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
.read = spi_chip_read,
@@ -5438,13 +5587,14 @@ const struct flashchip flashchips[] = {
{
.vendor = "Macronix",
- .name = "MX25L6405",
+ .name = "MX25L6405(D)",
.bustype = BUS_SPI,
.manufacture_id = MACRONIX_ID,
.model_id = MACRONIX_MX25L6405,
.total_size = 8192,
.page_size = 256,
- .feature_bits = FEATURE_WRSR_WREN,
+ /* MX25L6405D has 64B of OTP; enter 0xB1, exit 0xC1 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
@@ -5464,7 +5614,7 @@ const struct flashchip flashchips[] = {
.block_erase = spi_block_erase_c7,
}
},
- .printlock = spi_prettyprint_status_register_default_bp3, /* TODO: check */
+ .printlock = spi_prettyprint_status_register_default_bp3, /* bit6 has different meanings */
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
.read = spi_chip_read,
@@ -5473,13 +5623,90 @@ const struct flashchip flashchips[] = {
{
.vendor = "Macronix",
- .name = "MX25L12805",
+ .name = "MX25L6406E/MX25L6436E",
+ .bustype = BUS_SPI,
+ .manufacture_id = MACRONIX_ID,
+ .model_id = MACRONIX_MX25L6405,
+ .total_size = 8192,
+ .page_size = 256,
+ /* OTP: 06E 64B/36E 512B total; enter 0xB1, exit 0xC1 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
+ .tested = TEST_OK_PREW,
+ .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_60,
+ }, {
+ .eraseblocks = { {8 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_c7,
+ }
+ },
+ .printlock = spi_prettyprint_status_register_default_bp3, /* bit6 for 36E is quad enable */
+ .unlock = spi_disable_blockprotect,
+ .write = spi_chip_write_256,
+ .read = spi_chip_read,
+ .voltage = {2700, 3600},
+ },
+
+ {
+ .vendor = "Macronix",
+ .name = "MX25L6445E",
+ .bustype = BUS_SPI,
+ .manufacture_id = MACRONIX_ID,
+ .model_id = MACRONIX_MX25L6405,
+ .total_size = 8192,
+ .page_size = 256,
+ /* supports SFDP */
+ /* OTP: 512B total; enter 0xB1, exit 0xC1 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
+ .tested = TEST_OK_PREW,
+ .probe = probe_spi_rdid,
+ .probe_timing = TIMING_ZERO,
+ .block_erasers =
+ {
+ {
+ .eraseblocks = { {4 * 1024, 2048} },
+ .block_erase = spi_block_erase_20,
+ }, {
+ .eraseblocks = { {32 * 1024, 256} },
+ .block_erase = spi_block_erase_52,
+ }, {
+ .eraseblocks = { {64 * 1024, 128} },
+ .block_erase = spi_block_erase_d8,
+ }, {
+ .eraseblocks = { {8 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_60,
+ }, {
+ .eraseblocks = { {8 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_c7,
+ }
+ },
+ .printlock = spi_prettyprint_status_register_default_bp3, /* bit6 is quad enable */
+ .unlock = spi_disable_blockprotect,
+ .write = spi_chip_write_256,
+ .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
+ .voltage = {2700, 3600},
+ },
+
+ {
+ .vendor = "Macronix",
+ .name = "MX25L12805(D)",
.bustype = BUS_SPI,
.manufacture_id = MACRONIX_ID,
.model_id = MACRONIX_MX25L12805,
.total_size = 16384,
.page_size = 256,
- .feature_bits = FEATURE_WRSR_WREN,
+ /* MX25L12805D has 64B of OTP; enter 0xB1, exit 0xC1 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
.tested = TEST_OK_PROBE,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
@@ -5499,10 +5726,10 @@ const struct flashchip flashchips[] = {
.block_erase = spi_block_erase_c7,
}
},
- .printlock = spi_prettyprint_status_register_default_bp3, /* TODO: check */
+ .printlock = spi_prettyprint_status_register_default_bp3,
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
- .read = spi_chip_read,
+ .read = spi_chip_read, /* MX25L12805D: Fast read (0x0B) supported */
.voltage = {2700, 3600},
},
OpenPOWER on IntegriCloud