i've tried using flashrom for reading the SPI Flash of my Thinkpad X60s. It seems like it is using the (yet) unsupported M25P16.RES. I've added the few lines required to get it working, and at least reading the Flash works. Haven't tried writing the Flash (yes, i know about the risk regarding EC and friends) ;-)
Signed-off-by: Sven Schnelle svens@stackframe.org
Index: flashchips.c =================================================================== --- flashchips.c (revision 1246) +++ flashchips.c (working copy) @@ -6188,9 +6188,33 @@ .write = spi_chip_write_256, .read = spi_chip_read, }, - { .vendor = "ST", + .name = "M25P16.RES", + .bustype = CHIP_BUSTYPE_SPI, + .manufacture_id = 0, /* Unused */ + .model_id = ST_M25P16_RES, + .total_size = 2048, + .page_size = 256, + .tested = TEST_OK_PR, + .probe = probe_spi_res1, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, + }, + { + .vendor = "ST", .name = "M25P32", .bustype = CHIP_BUSTYPE_SPI, .manufacture_id = ST_ID, Index: flashchips.h =================================================================== --- flashchips.h (revision 1246) +++ flashchips.h (working copy) @@ -528,6 +528,7 @@ #define ST_M25P40_RES 0x12 #define ST_M25P80 0x2014 #define ST_M25P16 0x2015 +#define ST_M25P16_RES 0x14 #define ST_M25P32 0x2016 #define ST_M25P64 0x2017 #define ST_M25P128 0x2018
Hi Sven, [adding flashrom@flashrom.org to CC]
thanks for your patch.
Please note that a huge number of incompatible chips share the same RES ID. A quick glance at my datasheet collection (I stopped after 5 minutes) resulted in the following matches: AMIC A25L016, A25L16P Eon EN25P16 ESMT F25L016A Generalplus GPR25L161B Macronix MX25L1605*, MX25L1635* PMC Pm25LV016B Spansion S25FL016A ST M25P16 Winbond W25Q16*
Are you 100% sure you have a ST M25P16?
Regards, Carl-Daniel
Your mail follows unqoted so flashrom patchwork will pick it up.
On 06.12.2010 17:04, Sven Schnelle wrote:
i've tried using flashrom for reading the SPI Flash of my Thinkpad X60s. It seems like it is using the (yet) unsupported M25P16.RES. I've added the few lines required to get it working, and at least reading the Flash works. Haven't tried writing the Flash (yes, i know about the risk regarding EC and friends) ;-)
Signed-off-by: Sven Schnelle svens@stackframe.org
Index: flashchips.c =================================================================== --- flashchips.c (revision 1246) +++ flashchips.c (working copy) @@ -6188,9 +6188,33 @@ .write = spi_chip_write_256, .read = spi_chip_read, }, - { .vendor = "ST", + .name = "M25P16.RES", + .bustype = CHIP_BUSTYPE_SPI, + .manufacture_id = 0, /* Unused */ + .model_id = ST_M25P16_RES, + .total_size = 2048, + .page_size = 256, + .tested = TEST_OK_PR, + .probe = probe_spi_res1, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = spi_block_erase_d8, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = spi_block_erase_c7, + } + }, + .unlock = spi_disable_blockprotect, + .write = spi_chip_write_256, + .read = spi_chip_read, + }, + { + .vendor = "ST", .name = "M25P32", .bustype = CHIP_BUSTYPE_SPI, .manufacture_id = ST_ID, Index: flashchips.h =================================================================== --- flashchips.h (revision 1246) +++ flashchips.h (working copy) @@ -528,6 +528,7 @@ #define ST_M25P40_RES 0x12 #define ST_M25P80 0x2014 #define ST_M25P16 0x2015 +#define ST_M25P16_RES 0x14 #define ST_M25P32 0x2016 #define ST_M25P64 0x2017 #define ST_M25P128 0x2018
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Carl-Daniel,
On 12/07/2010 02:46 AM, Carl-Daniel Hailfinger wrote:
Please note that a huge number of incompatible chips share the same RES ID. A quick glance at my datasheet collection (I stopped after 5 minutes) resulted in the following matches: AMIC A25L016, A25L16P Eon EN25P16 ESMT F25L016A Generalplus GPR25L161B Macronix MX25L1605*, MX25L1635* PMC Pm25LV016B Spansion S25FL016A ST M25P16 Winbond W25Q16*
Are you 100% sure you have a ST M25P16?
i've disassembled my X60s yesterday, and indeed it is not a M25P16. Instead it is a MX25L160AM2C. So i think the best is to discard this patch. I'll send an updated one after i re-assembled my X60s (which may take a while, as i'm trying to fit a SXGA+ TFT in it)
Regards and sorry for the noise,
Sven.