Author: stefanct Date: Fri Mar 15 03:03:16 2013 New Revision: 1655 URL: http://flashrom.org/trac/flashrom/changeset/1655
Log: Add support for Macronix MX25U1635E, MX25U3235E/F and MX25U6435E/F.
Macronix MX25U3235 is a 4MB (32Mbits) 1.8v SPI flash supporting QPI. Code for it was refined after merging it from chromium: Change-Id: I62c7db070254ba3ec68090e783f57b25a6e8d15a Reviewed-on: https://gerrit.chromium.org/gerrit/44395 Tested-by: Vincent Palatin vpalatin@chromium.org Reviewed-by: Randall Spangler rspangler@chromium.org Commit-Queue: Vincent Palatin vpalatin@chromium.org
Based on that support for MX25U1635E and MX25U6435E/F was added by Stefan Tauner. Also, add a feature flag for QPI-enabled chips: FEATURE_QPI.
Signed-off-by: Vincent Palatin vpalatin@chromium.org Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Modified: trunk/flash.h trunk/flashchips.c
Modified: trunk/flash.h ============================================================================== --- trunk/flash.h Sat Mar 9 18:55:35 2013 (r1654) +++ trunk/flash.h Fri Mar 15 03:03:16 2013 (r1655) @@ -99,6 +99,7 @@ #define FEATURE_WRSR_EWSR (1 << 6) #define FEATURE_WRSR_WREN (1 << 7) #define FEATURE_OTP (1 << 8) +#define FEATURE_QPI (1 << 9) #define FEATURE_WRSR_EITHER (FEATURE_WRSR_EWSR | FEATURE_WRSR_WREN)
struct flashctx;
Modified: trunk/flashchips.c ============================================================================== --- trunk/flashchips.c Sat Mar 9 18:55:35 2013 (r1654) +++ trunk/flashchips.c Fri Mar 15 03:03:16 2013 (r1655) @@ -5508,6 +5508,131 @@
{ .vendor = "Macronix", + .name = "MX25U1635E", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX25U1635E, + .total_size = 2048, + .page_size = 256, + /* OTP: 512B total; enter 0xB1, exit 0xC1 */ + /* QPI enable 0x35, disable 0xF5 (0xFF et al. work too) */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_UNTESTED, + .probe = probe_spi_rdid, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = spi_block_erase_20, + }, { + .eraseblocks = { {32 * 1024, 64} }, + .block_erase = spi_block_erase_52, + }, { + .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, + } + }, + /* TODO: security register */ + .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 = {1650, 2000}, + }, + + { + .vendor = "Macronix", + .name = "MX25U3235E/F", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX25U3235E, + .total_size = 4096, + .page_size = 256, + /* F model supports SFDP */ + /* OTP: 512B total; enter 0xB1, exit 0xC1 */ + /* QPI enable 0x35, disable 0xF5 (0xFF et al. work too) */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .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 = { {32 * 1024, 128} }, + .block_erase = spi_block_erase_52, + }, { + .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, + } + }, + /* TODO: security register */ + .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 = {1650, 2000}, + }, + + { + .vendor = "Macronix", + .name = "MX25U6435E/F", + .bustype = BUS_SPI, + .manufacture_id = MACRONIX_ID, + .model_id = MACRONIX_MX25U6435E, + .total_size = 8192, + .page_size = 256, + /* F model supports SFDP */ + /* OTP: 512B total; enter 0xB1, exit 0xC1 */ + /* QPI enable 0x35, disable 0xF5 (0xFF et al. work too) */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_UNTESTED, + .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, + } + }, + /* TODO: security register */ + .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 = {1650, 2000}, + }, + + { + .vendor = "Macronix", .name = "MX29F001B", .bustype = BUS_PARALLEL, .manufacture_id = MACRONIX_ID,