summaryrefslogtreecommitdiffstats
path: root/flashchips.c
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2018-06-04 13:52:22 +0100
committerNico Huber <nico.h@gmx.de>2018-08-17 21:17:41 +0000
commitcadd42025cf5694a391f6cedb6374117336ae2c8 (patch)
tree75a95655047afb6f9446dcb91b363f011301a162 /flashchips.c
parent45e91a278cd31019ad6ed5a465661001fbaee065 (diff)
downloadflashrom-cadd42025cf5694a391f6cedb6374117336ae2c8.tar.gz
flashrom-cadd42025cf5694a391f6cedb6374117336ae2c8.tar.bz2
flashrom-cadd42025cf5694a391f6cedb6374117336ae2c8.zip
flashchips: Add Macronix MX25U51245G
Copy 'n paste support for Macronix MX25U51245G. I don't pretend to know a whole lot about SPI FLASH so its mostly copied from other MX25U devices and double checked a few bits and pieces against the datasheet. I have tested basic probe, read, erase and write using layout files. I tested both with 4MB@0x0000000 and 64K0@0x3f00000 (the later means I have tested 4-byte addressing). Change-Id: I2117fc205006088967f3d97644375d10db1791f1 Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-on: https://review.coreboot.org/26949 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'flashchips.c')
-rw-r--r--flashchips.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/flashchips.c b/flashchips.c
index 17cb1b4b0..2bbf60fe1 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -8563,6 +8563,55 @@ const struct flashchip flashchips[] = {
{
.vendor = "Macronix",
+ .name = "MX25U51245G",
+ .bustype = BUS_SPI,
+ .manufacture_id = MACRONIX_ID,
+ .model_id = MACRONIX_MX25U51245G,
+ .total_size = 65536,
+ .page_size = 256,
+ /* OTP: 512B factory programmed and 512B customer programmed; enter 0xB1, exit 0xC1 */
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_4BA,
+ .tested = TEST_OK_PREW,
+ .probe = probe_spi_rdid,
+ .probe_timing = TIMING_ZERO,
+ .block_erasers =
+ {
+ {
+ .eraseblocks = { {4 * 1024, 16384} },
+ .block_erase = spi_block_erase_21,
+ }, {
+ .eraseblocks = { {4 * 1024, 16384} },
+ .block_erase = spi_block_erase_20,
+ }, {
+ .eraseblocks = { {32 * 1024, 2048} },
+ .block_erase = spi_block_erase_5c,
+ }, {
+ .eraseblocks = { {32 * 1024, 2048} },
+ .block_erase = spi_block_erase_52,
+ }, {
+ .eraseblocks = { {64 * 1024, 1024} },
+ .block_erase = spi_block_erase_dc,
+ }, {
+ .eraseblocks = { {64 * 1024, 1024} },
+ .block_erase = spi_block_erase_d8,
+ }, {
+ .eraseblocks = { {64 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_60,
+ }, {
+ .eraseblocks = { {64 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_c7,
+ }
+ },
+ /* TODO: security register */
+ .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
+ .unlock = spi_disable_blockprotect_bp3_srwd,
+ .write = spi_chip_write_256, /* Multi I/O supported */
+ .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
+ .voltage = {1650, 2000},
+ },
+
+ {
+ .vendor = "Macronix",
.name = "MX25L6495F",
.bustype = BUS_SPI,
.manufacture_id = MACRONIX_ID,