Submitter | Wei Hu |
---|---|
Date | 2014-02-26 22:57:32 |
Message ID | <CANwcMEYauCeZpsocmWyeN_7FHvdQdbE__Zy2RpXqJTL_YQZFng@mail.gmail.com> |
Download | mbox | patch |
Permalink | /patch/4111/ |
State | Superseded |
Headers | show |
Comments
On Wed, 26 Feb 2014 14:57:32 -0800 Wei Hu <wei@aristanetworks.com> wrote: > Hi flashrom folks, > > I'm trying to add support for SST26VF064B after I got a patch from Elias. I > made some changes to it after reading the datasheet, but none of the block > erasing commands worked, and I don't know why... I don't see obvious problems either, but I did not read the datasheet. Two things I would check: - is there a write protection pin or register bits that might silently block any modification requests? - is the opcode sequence including wren? (this is probably done automatically by the ichspi driver, but i cant remember the details) And you could test if hardware sequencing (or SFDP) works as a workaround (but I doubt SFDP would behave differently for the lower block sizes and some of them are obviously wrong in the SFDP table anyway (or you have found a bug)). A full verbose log could shed some more light on it too, but I doubt it. If we get this to work we would probably like to commit this patch. For this either of you must sign it off according to http://www.coreboot.org/Development_Guidelines#Sign-off_Procedure
Patch
Index: flashrom-0.9.8/flashchips.c =================================================================== --- flashrom-0.9.8.orig/flashchips.c +++ flashrom-0.9.8/flashchips.c @@ -9881,6 +9881,38 @@ const struct flashchip flashchips[] = { { .vendor = "SST", + .name = "SST26VF064B", + .bustype = BUS_SPI, + .manufacture_id = SST_ID, + .model_id = SST_SST26VF064B, + .total_size = 8192, + .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, + .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_c7, + }, + }, + .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */ + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, + .voltage = {2700, 3600}, + }, + + { + .vendor = "SST", .name = "SST25WF512", .bustype = BUS_SPI, .manufacture_id = SST_ID, Index: flashrom-0.9.8/flashchips.h =================================================================== --- flashrom-0.9.8.orig/flashchips.h +++ flashrom-0.9.8/flashchips.h @@ -590,6 +590,7 @@ #define SST_SST25VF064C 0x254B #define SST_SST26VF016 0x2601 #define SST_SST26VF032 0x2602 +#define SST_SST26VF064B 0x2643 #define SST_SST27SF512 0xA4 #define SST_SST27SF010 0xA5 #define SST_SST27SF020 0xA6