Add support for old ST M25P05/M25P10 chips which only respond to the RES command and not the RDID command.
Unfortunately, either the datasheets are wrong or both chips have exactly the same ID.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-sst25_res/flashchips.c =================================================================== --- flashrom-sst25_res/flashchips.c (Revision 659) +++ flashrom-sst25_res/flashchips.c (Arbeitskopie) @@ -2249,8 +2249,29 @@ .read = spi_chip_read, },
+ /* The ST M25P05 is a bit of a problem. It has the same ID as the + * ST M25P05-A in RES mode, but supports only 128 byte writes instead + * of 256 byte writes. We rely heavily on the fact that probe_spi_res + * only is successful if RDID does not work. + */ { .vendor = "ST", + .name = "M25P05.RES", + .bustype = CHIP_BUSTYPE_SPI, + .manufacture_id = ST_ID, + .model_id = ST_M25P05_RES, + .total_size = 64, + .page_size = 256, + .tested = TEST_UNTESTED, + .probe = probe_spi_res, + .probe_timing = TIMING_ZERO, + .erase = spi_chip_erase_c7, + .write = spi_chip_write_1, /* 128 */ + .read = spi_chip_read, + }, + + { + .vendor = "ST", .name = "M25P10-A", .bustype = CHIP_BUSTYPE_SPI, .manufacture_id = ST_ID, @@ -2265,8 +2286,25 @@ .read = spi_chip_read, },
+ /* The ST M25P10 has the same problem as the M25P05. */ { .vendor = "ST", + .name = "M25P10.RES", + .bustype = CHIP_BUSTYPE_SPI, + .manufacture_id = ST_ID, + .model_id = ST_M25P10_RES, + .total_size = 128, + .page_size = 256, + .tested = TEST_UNTESTED, + .probe = probe_spi_res, + .probe_timing = TIMING_ZERO, + .erase = spi_chip_erase_c7, + .write = spi_chip_write_1, /* 128 */ + .read = spi_chip_read, + }, + + { + .vendor = "ST", .name = "M25P20", .bustype = CHIP_BUSTYPE_SPI, .manufacture_id = ST_ID, Index: flashrom-sst25_res/flashchips.h =================================================================== --- flashrom-sst25_res/flashchips.h (Revision 659) +++ flashrom-sst25_res/flashchips.h (Arbeitskopie) @@ -322,7 +322,9 @@ */ #define ST_ID 0x20 /* ST / SGS/Thomson */ #define ST_M25P05A 0x2010 +#define ST_M25P05_RES 0x10 /* Same code as M25P10. */ #define ST_M25P10A 0x2011 +#define ST_M25P10_RES 0x10 /* Same code as M25P05. */ #define ST_M25P20 0x2012 #define ST_M25P40 0x2013 #define ST_M25P40_RES 0x12
Carl-Daniel Hailfinger wrote:
Add support for old ST M25P05/M25P10 chips which only respond to the RES command and not the RDID command.
Unfortunately, either the datasheets are wrong or both chips have exactly the same ID.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
There are quite a few such cases where different chips have the same IDs on SPI.
My SF100's software prints both chip types and asks for a choice in interactive mode (in script mode it just uses whatever you specify, or the first one in the list) Anyways, Acked-by: Stefan Reinauer stepan@coresystems.de
On 23.07.2009 03:32, Stefan Reinauer wrote:
Carl-Daniel Hailfinger wrote:
Add support for old ST M25P05/M25P10 chips which only respond to the RES command and not the RDID command.
Unfortunately, either the datasheets are wrong or both chips have exactly the same ID.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
There are quite a few such cases where different chips have the same IDs on SPI.
My SF100's software prints both chip types and asks for a choice in interactive mode (in script mode it just uses whatever you specify, or the first one in the list)
flashrom prints both chips and asks the user to specify the correct one with -c.
Anyways, Acked-by: Stefan Reinauer stepan@coresystems.de
Thanks, r662.
Regards, Carl-Daniel