The AT25 and AT26 series SPI chips from Atmel are plain EEPROMs. The AT45 series SPI chips are DataFlash EEPROMs which means they have odd (non-power-of-two) sector sizes, but some of the DataFlash chips can be configured or ordered with power-of-two sector sizes.
Add probe support for the following Atmel SPI chips: AT25DF021 AT25DF041A AT25DF081 AT25DF161 AT25DF321A AT25DF641 AT25F512B AT25FS010 AT25FS040 AT26DF041 AT26DF081A AT26DF161 AT26DF161A AT26DF321 AT26F004 AT45CS1282 AT45DB011D AT45DB021D AT45DB041D AT45DB081D AT45DB161D AT45DB321C AT45DB321D AT45DB642D
Add an explanation why the following chips can't be probed: AT45BR3214B AT45D011 AT45D021A AT45D041A AT45D081A AT45D161 AT45DB011 AT45DB011B AT45DB021A AT45DB021B AT45DB041A AT45DB081A AT45DB161 AT45DB161B AT45DB321 AT45DB321B AT45DB642
Add the ID, but no probing function for this chip: AT25F512A
This is needed for some Intel boards. Patch attached for Gmail users.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-atmel/flash.h =================================================================== --- flashrom-atmel/flash.h (Revision 3751) +++ flashrom-atmel/flash.h (Arbeitskopie) @@ -139,13 +139,45 @@ #define AT_25DF321 0x4700 /* also 26DF321 */ #define AT_25DF321A 0x4701 #define AT_25DF641 0x4800 +#define AT_25F512A 0x65 /* Needs special RDID. AT25F512A_RDID 15 1d */ +#define AT_25F512B 0x6500 +#define AT_25FS010 0x6601 +#define AT_25FS040 0x6604 #define AT_26DF041 0x4400 #define AT_26DF081 0x4500 /* guessed, no datasheet available */ #define AT_26DF081A 0x4501 #define AT_26DF161 0x4600 #define AT_26DF161A 0x4601 +#define AT_26DF321 0x4700 /* also 25DF321 */ +#define AT_26F004 0x0400 #define AT_29C040A 0xA4 #define AT_29C020 0xDA +#define AT_45BR3214B /* No ID available */ +#define AT_45CS1282 0x2920 +#define AT_45D011 /* No ID available */ +#define AT_45D021A /* No ID available */ +#define AT_45D041A /* No ID available */ +#define AT_45D081A /* No ID available */ +#define AT_45D161 /* No ID available */ +#define AT_45DB011 /* No ID available */ +#define AT_45DB011B /* No ID available */ +#define AT_45DB011D 0x2200 +#define AT_45DB021A /* No ID available */ +#define AT_45DB021B /* No ID available */ +#define AT_45DB021D 0x2300 +#define AT_45DB041A /* No ID available */ +#define AT_45DB041D 0x2400 +#define AT_45DB081A /* No ID available */ +#define AT_45DB081D 0x2500 +#define AT_45DB161 /* No ID available */ +#define AT_45DB161B /* No ID available */ +#define AT_45DB161D 0x2600 +#define AT_45DB321 /* No ID available */ +#define AT_45DB321B /* No ID available */ +#define AT_45DB321C 0x2700 +#define AT_45DB321D 0x2701 /* Buggy data sheet */ +#define AT_45DB642 /* No ID available */ +#define AT_45DB642D 0x2800 #define AT_49F002N 0x07 /* for AT49F002(N) */ #define AT_49F002NT 0x08 /* for AT49F002(N)T */
Index: flashrom-atmel/flashchips.c =================================================================== --- flashrom-atmel/flashchips.c (Revision 3751) +++ flashrom-atmel/flashchips.c (Arbeitskopie) @@ -38,11 +38,36 @@ {"AMD", "Am29F040B", AMD_ID, AM_29F040B, 512, 64 * 1024, TEST_OK_PREW, probe_29f040b, erase_29f040b, write_29f040b}, {"AMD", "Am29LV040B", AMD_ID, AM_29LV040B, 512, 64 * 1024, TEST_UNTESTED, probe_29f040b, erase_29f040b, write_29f040b}, {"ASD", "AE49F2008", ASD_ID, ASD_AE49F2008, 256, 128, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_jedec}, + {"Atmel", "AT25DF021", ATMEL_ID, AT_25DF021, 256, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT25DF041A", ATMEL_ID, AT_25DF041A, 512, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT25DF081", ATMEL_ID, AT_25DF081, 1024, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT25DF161", ATMEL_ID, AT_25DF161, 2048, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT25DF321", ATMEL_ID, AT_25DF321, 4096, 256, TEST_OK_PREW, probe_spi_rdid, spi_chip_erase_c7, spi_chip_write, spi_chip_read}, + {"Atmel", "AT25DF321A", ATMEL_ID, AT_25DF321A, 4096, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT25DF641", ATMEL_ID, AT_25DF641, 8192, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT25F512B", ATMEL_ID, AT_25F512B, 64, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT25FS010", ATMEL_ID, AT_25FS010, 128, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT25FS040", ATMEL_ID, AT_25FS040, 512, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT26DF041", ATMEL_ID, AT_26DF041, 512, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL /* Incompatible Page write */, NULL}, + {"Atmel", "AT26DF081A", ATMEL_ID, AT_26DF081A, 1024, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT26DF161", ATMEL_ID, AT_26DF161, 2048, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + {"Atmel", "AT26DF161A", ATMEL_ID, AT_26DF161A, 2048, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL}, + /*The AT26DF321 has the same ID as the AT25DF321. */ + /*{"Atmel", "AT26DF321", ATMEL_ID, AT_26DF321, 4096, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL},*/ + {"Atmel", "AT26F004", ATMEL_ID, AT_26F004, 512, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL /* Incompatible Page write */, NULL}, {"Atmel", "AT29C020", ATMEL_ID, AT_29C020, 256, 256, TEST_OK_PREW, probe_jedec, erase_chip_jedec, write_jedec}, {"Atmel", "AT29C040A", ATMEL_ID, AT_29C040A, 512, 256, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_jedec}, + {"Atmel", "AT45CS1282", ATMEL_ID, AT_45CS1282, 16896/*!*/,1056/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL /* Incompatible Page write */, NULL /* Incompatible read */}, /* No power of two sizes */ + {"Atmel", "AT45DB011D", ATMEL_ID, AT_45DB011D, 128/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */ + {"Atmel", "AT45DB021D", ATMEL_ID, AT_45DB021D, 256/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */ + {"Atmel", "AT45DB041D", ATMEL_ID, AT_45DB041D, 512/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */ + {"Atmel", "AT45DB081D", ATMEL_ID, AT_45DB081D, 1024/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */ + {"Atmel", "AT45DB161D", ATMEL_ID, AT_45DB161D, 2048/*!*/,512/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */ + {"Atmel", "AT45DB321C", ATMEL_ID, AT_45DB321C, 4224/*!*/,528/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL /* Incompatible read */}, /* No power of two sizes */ + {"Atmel", "AT45DB321D", ATMEL_ID, AT_45DB321D, 4096/*!*/,512/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */ + {"Atmel", "AT45DB642D", ATMEL_ID, AT_45DB642D, 8192/*!*/,1024/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */ {"Atmel", "AT49F002(N)", ATMEL_ID, AT_49F002N, 256, 256, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_49f002}, {"Atmel", "AT49F002(N)T", ATMEL_ID, AT_49F002NT, 256, 256, TEST_OK_PREW, probe_jedec, erase_chip_jedec, write_49f002}, - {"Atmel", "AT25DF321", ATMEL_ID, AT_25DF321, 4096, 256, TEST_OK_PREW, probe_spi_rdid, spi_chip_erase_c7, spi_chip_write, spi_chip_read}, {"AMIC", "A25L40P", AMIC_ID, AMIC_A25L40P, 512, 256, TEST_OK_PREW, probe_spi_rdid4, spi_chip_erase_c7, spi_chip_write, spi_chip_read}, {"AMIC", "A29002B", AMIC_ID_NOPREFIX, AMIC_A29002B, 256, 64 * 1024, TEST_UNTESTED, probe_29f002, erase_29f002, write_29f002}, {"AMIC", "A29002T", AMIC_ID_NOPREFIX, AMIC_A29002T, 256, 64 * 1024, TEST_OK_PREW, probe_29f002, erase_29f002, write_29f002}, @@ -157,6 +182,7 @@ {"Winbond", "W39V080FA", WINBOND_ID, W_39V080FA, 1024, 64*1024, TEST_OK_PREW, probe_winbond_fwhub, erase_winbond_fwhub, write_winbond_fwhub}, {"Winbond", "W39V080FA (dual mode)",WINBOND_ID, W_39V080FA_DM, 512, 64*1024, TEST_UNTESTED, probe_winbond_fwhub, erase_winbond_fwhub, write_winbond_fwhub},
+ {"Atmel", "unknown Atmel SPI chip",ATMEL_ID, GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, {"EON", "unknown EON SPI chip", EON_ID_NOPREFIX,GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, {"Macronix", "unknown Macronix SPI chip", MX_ID, GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, {"PMC", "unknown PMC SPI chip", PMC_ID, GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, Index: flashrom-atmel/spi.h =================================================================== --- flashrom-atmel/spi.h (Revision 3751) +++ flashrom-atmel/spi.h (Arbeitskopie) @@ -29,6 +29,16 @@ #define JEDEC_RDID_OUTSIZE 0x01 #define JEDEC_RDID_INSIZE 0x03
+/* AT25F512A has bit 3 as don't care bit in commands */ +#define AT25F512A_RDID 0x15 +#define AT25F512A_RDID_OUTSIZE 0x01 +#define AT25F512A_RDID_INSIZE 0x02 + +/* Read Electronic Manufacturer Signature */ +#define JEDEC_REMS 0x +#define JEDEC_REMS_OUTSIZE 0x +#define JEDEC_REMS_INSIZE 0x + /* Read Electronic Signature */ #define JEDEC_RES 0xab #define JEDEC_RES_OUTSIZE 0x04 @@ -54,7 +64,7 @@ #define JEDEC_CE_C7_OUTSIZE 0x01 #define JEDEC_CE_C7_INSIZE 0x00
-/* Block Erase 0x52 is supported by SST chips. */ +/* Block Erase 0x52 is supported by SST and old Atmel chips. */ #define JEDEC_BE_52 0x52 #define JEDEC_BE_52_OUTSIZE 0x04 #define JEDEC_BE_52_INSIZE 0x00
On 14.11.2008 04:17, Carl-Daniel Hailfinger wrote:
The AT25 and AT26 series SPI chips from Atmel are plain EEPROMs. The AT45 series SPI chips are DataFlash EEPROMs which means they have odd (non-power-of-two) sector sizes, but some of the DataFlash chips can be configured or ordered with power-of-two sector sizes.
Add probe support for the following Atmel SPI chips: AT25DF021 AT25DF041A AT25DF081 AT25DF161 AT25DF321A AT25DF641 AT25F512B AT25FS010 AT25FS040 AT26DF041 AT26DF081A AT26DF161 AT26DF161A AT26DF321 AT26F004 AT45CS1282 AT45DB011D AT45DB021D AT45DB041D AT45DB081D AT45DB161D AT45DB321C AT45DB321D AT45DB642D
Add an explanation why the following chips can't be probed: AT45BR3214B AT45D011 AT45D021A AT45D041A AT45D081A AT45D161 AT45DB011 AT45DB011B AT45DB021A AT45DB021B AT45DB041A AT45DB081A AT45DB161 AT45DB161B AT45DB321 AT45DB321B AT45DB642
Add the ID, but no probing function for this chip: AT25F512A
This is needed for some Intel boards.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
This has been tested successfully by Jesse Brandeburg and Andriy Gapon.
Can I have an Ack from someone?
Regards, Carl-Daniel
On Thu, Nov 13, 2008 at 8:17 PM, Carl-Daniel Hailfinger < c-d.hailfinger.devel.2006@gmx.net> wrote:
The AT25 and AT26 series SPI chips from Atmel are plain EEPROMs.
This is needed for some Intel boards. Patch attached for Gmail users.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-atmel/flashchips.c
--- flashrom-atmel/flashchips.c (Revision 3751) +++ flashrom-atmel/flashchips.c (Arbeitskopie) @@ -38,11 +38,36 @@ {"AMD", "Am29F040B", AMD_ID, AM_29F040B, 512, 64 * 1024, TEST_OK_PREW, probe_29f040b, erase_29f040b, write_29f040b}, {"AMD", "Am29LV040B", AMD_ID, AM_29LV040B, 512, 64 * 1024, TEST_UNTESTED, probe_29f040b, erase_29f040b, write_29f040b}, {"ASD", "AE49F2008", ASD_ID, ASD_AE49F2008, 256, 128, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_jedec},
{"Atmel", "AT25DF021", ATMEL_ID, AT_25DF021, 256, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25DF041A", ATMEL_ID,
AT_25DF041A, 512, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL},
{"Atmel", "AT25DF081", ATMEL_ID, AT_25DF081, 1024, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25DF161", ATMEL_ID, AT_25DF161, 2048, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25DF321", ATMEL_ID, AT_25DF321, 4096, 256, TEST_OK_PREW, probe_spi_rdid,
spi_chip_erase_c7, spi_chip_write, spi_chip_read},
{"Atmel", "AT25DF321A", ATMEL_ID,
AT_25DF321A, 4096, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL},
{"Atmel", "AT25DF641", ATMEL_ID, AT_25DF641, 8192, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25F512B", ATMEL_ID, AT_25F512B, 64, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25FS010", ATMEL_ID, AT_25FS010, 128, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25FS040", ATMEL_ID, AT_25FS040, 512, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT26DF041", ATMEL_ID, AT_26DF041, 512, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL /* Incompatible Page write */, NULL},
{"Atmel", "AT26DF081A", ATMEL_ID,
AT_26DF081A, 1024, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL},
{"Atmel", "AT26DF161", ATMEL_ID, AT_26DF161, 2048, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT26DF161A", ATMEL_ID,
AT_26DF161A, 2048, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL},
/*The AT26DF321 has the same ID as the AT25DF321. */
/*{"Atmel", "AT26DF321", ATMEL_ID, AT_26DF321, 4096, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},*/
{"Atmel", "AT26F004", ATMEL_ID, AT_26F004, 512, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL /* Incompatible Page write */, NULL}, {"Atmel", "AT29C020", ATMEL_ID, AT_29C020, 256, 256, TEST_OK_PREW, probe_jedec, erase_chip_jedec, write_jedec}, {"Atmel", "AT29C040A", ATMEL_ID, AT_29C040A, 512, 256, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_jedec},
{"Atmel", "AT45CS1282", ATMEL_ID,
AT_45CS1282, 16896/*!*/,1056/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL /* Incompatible Page write */, NULL /* Incompatible read */}, /* No power of two sizes */
{"Atmel", "AT45DB011D", ATMEL_ID,
AT_45DB011D, 128/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB021D", ATMEL_ID,
AT_45DB021D, 256/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB041D", ATMEL_ID,
AT_45DB041D, 512/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB081D", ATMEL_ID,
AT_45DB081D, 1024/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB161D", ATMEL_ID,
AT_45DB161D, 2048/*!*/,512/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB321C", ATMEL_ID,
AT_45DB321C, 4224/*!*/,528/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL /* Incompatible read */}, /* No power of two sizes */
{"Atmel", "AT45DB321D", ATMEL_ID,
AT_45DB321D, 4096/*!*/,512/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB642D", ATMEL_ID,
AT_45DB642D, 8192/*!*/,1024/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */ {"Atmel", "AT49F002(N)", ATMEL_ID, AT_49F002N, 256, 256, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_49f002}, {"Atmel", "AT49F002(N)T", ATMEL_ID, AT_49F002NT, 256, 256, TEST_OK_PREW, probe_jedec, erase_chip_jedec, write_49f002},
{"Atmel", "AT25DF321", ATMEL_ID, AT_25DF321, 4096, 256, TEST_OK_PREW, probe_spi_rdid,
spi_chip_erase_c7, spi_chip_write, spi_chip_read}, {"AMIC", "A25L40P", AMIC_ID, AMIC_A25L40P, 512, 256, TEST_OK_PREW, probe_spi_rdid4, spi_chip_erase_c7, spi_chip_write, spi_chip_read}, {"AMIC", "A29002B", AMIC_ID_NOPREFIX, AMIC_A29002B, 256, 64 * 1024, TEST_UNTESTED, probe_29f002, erase_29f002, write_29f002}, {"AMIC", "A29002T", AMIC_ID_NOPREFIX, AMIC_A29002T, 256, 64 * 1024, TEST_OK_PREW, probe_29f002, erase_29f002, write_29f002}, @@ -157,6 +182,7 @@ {"Winbond", "W39V080FA", WINBOND_ID, W_39V080FA, 1024, 64*1024, TEST_OK_PREW, probe_winbond_fwhub, erase_winbond_fwhub, write_winbond_fwhub}, {"Winbond", "W39V080FA (dual mode)",WINBOND_ID, W_39V080FA_DM, 512, 64*1024, TEST_UNTESTED, probe_winbond_fwhub, erase_winbond_fwhub, write_winbond_fwhub},
{"Atmel", "unknown Atmel SPI chip",ATMEL_ID,
GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, {"EON", "unknown EON SPI chip", EON_ID_NOPREFIX,GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, {"Macronix", "unknown Macronix SPI chip", MX_ID, GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, {"PMC", "unknown PMC SPI chip", PMC_ID, GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, Index: flashrom-atmel/spi.h =================================================================== --- flashrom-atmel/spi.h (Revision 3751) +++ flashrom-atmel/spi.h (Arbeitskopie) @@ -29,6 +29,16 @@ #define JEDEC_RDID_OUTSIZE 0x01 #define JEDEC_RDID_INSIZE 0x03
+/* AT25F512A has bit 3 as don't care bit in commands */ +#define AT25F512A_RDID 0x15 +#define AT25F512A_RDID_OUTSIZE 0x01 +#define AT25F512A_RDID_INSIZE 0x02
+/* Read Electronic Manufacturer Signature */ +#define JEDEC_REMS 0x +#define JEDEC_REMS_OUTSIZE 0x +#define JEDEC_REMS_INSIZE 0x
I don't understand these defines.
Other than that: Acked-by: Myles Watson mylesgw@gmail.com
Thanks, Myles
On 15.11.2008 14:26, Myles Watson wrote:
On Thu, Nov 13, 2008 at 8:17 PM, Carl-Daniel Hailfinger < c-d.hailfinger.devel.2006@gmx.net> wrote:
The AT25 and AT26 series SPI chips from Atmel are plain EEPROMs.
This is needed for some Intel boards. Patch attached for Gmail users.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-atmel/flashchips.c
--- flashrom-atmel/flashchips.c (Revision 3751) +++ flashrom-atmel/flashchips.c (Arbeitskopie) @@ -38,11 +38,36 @@ {"AMD", "Am29F040B", AMD_ID, AM_29F040B, 512, 64 * 1024, TEST_OK_PREW, probe_29f040b, erase_29f040b, write_29f040b}, {"AMD", "Am29LV040B", AMD_ID, AM_29LV040B, 512, 64 * 1024, TEST_UNTESTED, probe_29f040b, erase_29f040b, write_29f040b}, {"ASD", "AE49F2008", ASD_ID, ASD_AE49F2008, 256, 128, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_jedec},
{"Atmel", "AT25DF021", ATMEL_ID, AT_25DF021, 256, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25DF041A", ATMEL_ID,
AT_25DF041A, 512, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL},
{"Atmel", "AT25DF081", ATMEL_ID, AT_25DF081, 1024, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25DF161", ATMEL_ID, AT_25DF161, 2048, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25DF321", ATMEL_ID, AT_25DF321, 4096, 256, TEST_OK_PREW, probe_spi_rdid,
spi_chip_erase_c7, spi_chip_write, spi_chip_read},
{"Atmel", "AT25DF321A", ATMEL_ID,
AT_25DF321A, 4096, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL},
{"Atmel", "AT25DF641", ATMEL_ID, AT_25DF641, 8192, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25F512B", ATMEL_ID, AT_25F512B, 64, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25FS010", ATMEL_ID, AT_25FS010, 128, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT25FS040", ATMEL_ID, AT_25FS040, 512, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT26DF041", ATMEL_ID, AT_26DF041, 512, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL /* Incompatible Page write */, NULL},
{"Atmel", "AT26DF081A", ATMEL_ID,
AT_26DF081A, 1024, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL},
{"Atmel", "AT26DF161", ATMEL_ID, AT_26DF161, 2048, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},
{"Atmel", "AT26DF161A", ATMEL_ID,
AT_26DF161A, 2048, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL, NULL},
/*The AT26DF321 has the same ID as the AT25DF321. */
/*{"Atmel", "AT26DF321", ATMEL_ID, AT_26DF321, 4096, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL, NULL},*/
{"Atmel", "AT26F004", ATMEL_ID, AT_26F004, 512, 256, TEST_UNTESTED, probe_spi_rdid,
NULL, NULL /* Incompatible Page write */, NULL}, {"Atmel", "AT29C020", ATMEL_ID, AT_29C020, 256, 256, TEST_OK_PREW, probe_jedec, erase_chip_jedec, write_jedec}, {"Atmel", "AT29C040A", ATMEL_ID, AT_29C040A, 512, 256, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_jedec},
{"Atmel", "AT45CS1282", ATMEL_ID,
AT_45CS1282, 16896/*!*/,1056/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL /* Incompatible Page write */, NULL /* Incompatible read */}, /* No power of two sizes */
{"Atmel", "AT45DB011D", ATMEL_ID,
AT_45DB011D, 128/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB021D", ATMEL_ID,
AT_45DB021D, 256/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB041D", ATMEL_ID,
AT_45DB041D, 512/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB081D", ATMEL_ID,
AT_45DB081D, 1024/*!*/,256/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB161D", ATMEL_ID,
AT_45DB161D, 2048/*!*/,512/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB321C", ATMEL_ID,
AT_45DB321C, 4224/*!*/,528/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL /* Incompatible read */}, /* No power of two sizes */
{"Atmel", "AT45DB321D", ATMEL_ID,
AT_45DB321D, 4096/*!*/,512/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */
{"Atmel", "AT45DB642D", ATMEL_ID,
AT_45DB642D, 8192/*!*/,1024/*!*/, TEST_BAD_READ, probe_spi_rdid, NULL, NULL, NULL}, /* Size can only be determined from status register */ {"Atmel", "AT49F002(N)", ATMEL_ID, AT_49F002N, 256, 256, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_49f002}, {"Atmel", "AT49F002(N)T", ATMEL_ID, AT_49F002NT, 256, 256, TEST_OK_PREW, probe_jedec, erase_chip_jedec, write_49f002},
{"Atmel", "AT25DF321", ATMEL_ID, AT_25DF321, 4096, 256, TEST_OK_PREW, probe_spi_rdid,
spi_chip_erase_c7, spi_chip_write, spi_chip_read}, {"AMIC", "A25L40P", AMIC_ID, AMIC_A25L40P, 512, 256, TEST_OK_PREW, probe_spi_rdid4, spi_chip_erase_c7, spi_chip_write, spi_chip_read}, {"AMIC", "A29002B", AMIC_ID_NOPREFIX, AMIC_A29002B, 256, 64 * 1024, TEST_UNTESTED, probe_29f002, erase_29f002, write_29f002}, {"AMIC", "A29002T", AMIC_ID_NOPREFIX, AMIC_A29002T, 256, 64 * 1024, TEST_OK_PREW, probe_29f002, erase_29f002, write_29f002}, @@ -157,6 +182,7 @@ {"Winbond", "W39V080FA", WINBOND_ID, W_39V080FA, 1024, 64*1024, TEST_OK_PREW, probe_winbond_fwhub, erase_winbond_fwhub, write_winbond_fwhub}, {"Winbond", "W39V080FA (dual mode)",WINBOND_ID, W_39V080FA_DM, 512, 64*1024, TEST_UNTESTED, probe_winbond_fwhub, erase_winbond_fwhub, write_winbond_fwhub},
{"Atmel", "unknown Atmel SPI chip",ATMEL_ID,
GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, {"EON", "unknown EON SPI chip", EON_ID_NOPREFIX,GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, {"Macronix", "unknown Macronix SPI chip", MX_ID, GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, {"PMC", "unknown PMC SPI chip", PMC_ID, GENERIC_DEVICE_ID, 0, 256, TEST_UNTESTED, probe_spi_rdid, NULL, NULL}, Index: flashrom-atmel/spi.h =================================================================== --- flashrom-atmel/spi.h (Revision 3751) +++ flashrom-atmel/spi.h (Arbeitskopie) @@ -29,6 +29,16 @@ #define JEDEC_RDID_OUTSIZE 0x01 #define JEDEC_RDID_INSIZE 0x03
+/* AT25F512A has bit 3 as don't care bit in commands */ +#define AT25F512A_RDID 0x15 +#define AT25F512A_RDID_OUTSIZE 0x01 +#define AT25F512A_RDID_INSIZE 0x02
+/* Read Electronic Manufacturer Signature */ +#define JEDEC_REMS 0x +#define JEDEC_REMS_OUTSIZE 0x +#define JEDEC_REMS_INSIZE 0x
I don't understand these defines.
They were part of AT25F512A support which I didn't have time to finish yet. I removed them from this patch.
Other than that: Acked-by: Myles Watson mylesgw@gmail.com
Thanks, r3754.
Regards, Carl-Daniel