1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 06:23:18 +02:00

Add support for Atmel's AT25F series of SPI flash chips

This adds support for the following chips:
 - AT25F512, AT25F512A, AT25F512B
 - AT25F1024, AT25F1024A
 - AT25F2048
 - AT25F4096

Besides the definitions of the the chips in flashchips.c this includes
- a dedicated probing method (probe_spi_at25f)
- pretty printing methods (spi_prettyprint_status_register_at25f*), and
- unlocking methods (spi_disable_blockprotect_at25f*)

Corresponding to flashrom svn r1637.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
Stefan Tauner
2012-12-29 15:04:20 +00:00
parent 54aaa4ae2b
commit 57794ac158
6 changed files with 250 additions and 10 deletions

View File

@ -1665,6 +1665,65 @@ const struct flashchip flashchips[] = {
.voltage = {2700, 3600},
},
{
.vendor = "Atmel",
.name = "AT25F512",
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT25F512,
.total_size = 64,
.page_size = 256,
.feature_bits = FEATURE_WRSR_WREN,
.tested = TEST_UNTESTED,
.probe = probe_spi_at25f,
.probe_timing = TIMING_ZERO,
.block_erasers =
{
{
.eraseblocks = { {32 * 1024, 2} },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { {64 * 1024, 1} },
.block_erase = spi_block_erase_62,
}
},
.printlock = spi_prettyprint_status_register_at25f,
.unlock = spi_disable_blockprotect_at25f,
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
{
.vendor = "Atmel",
.name = "AT25F512A",
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT25F512A,
.total_size = 64,
.page_size = 128,
.feature_bits = FEATURE_WRSR_WREN,
.tested = TEST_UNTESTED,
.probe = probe_spi_at25f,
.probe_timing = TIMING_ZERO,
.block_erasers =
{
{
.eraseblocks = { {32 * 1024, 2} },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { {64 * 1024, 1} },
.block_erase = spi_block_erase_62,
}
},
.printlock = spi_prettyprint_status_register_at25f512a,
/* FIXME: It is not correct to use this one, because the BP1 bit is N/A. */
.unlock = spi_disable_blockprotect_at25f512a,
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
{
.vendor = "Atmel",
.name = "AT25F512B",
@ -1707,6 +1766,95 @@ const struct flashchip flashchips[] = {
.voltage = {2700, 3600},
},
{
.vendor = "Atmel",
/* The A suffix indicates 33MHz instead of 20MHz clock rate.
* All other properties seem to be the same.*/
.name = "AT25F1024(A)",
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT25F1024,
.total_size = 128,
.page_size = 256,
.feature_bits = FEATURE_WRSR_WREN,
.tested = TEST_OK_PREW,
.probe = probe_spi_at25f,
.probe_timing = TIMING_ZERO,
.block_erasers =
{
{
.eraseblocks = { {32 * 1024, 4} },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { {128 * 1024, 1} },
.block_erase = spi_block_erase_62,
}
},
.printlock = spi_prettyprint_status_register_at25f,
.unlock = spi_disable_blockprotect_at25f,
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
{
.vendor = "Atmel",
.name = "AT25F2048",
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT25F2048,
.total_size = 256,
.page_size = 256,
.feature_bits = FEATURE_WRSR_WREN,
.tested = TEST_UNTESTED,
.probe = probe_spi_at25f,
.probe_timing = TIMING_ZERO,
.block_erasers =
{
{
.eraseblocks = { {64 * 1024, 4} },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { {256 * 1024, 1} },
.block_erase = spi_block_erase_62,
}
},
.printlock = spi_prettyprint_status_register_at25f,
.unlock = spi_disable_blockprotect_at25f,
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
{
.vendor = "Atmel",
.name = "AT25F4096",
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT25F4096,
.total_size = 512,
.page_size = 256,
.feature_bits = FEATURE_WRSR_WREN,
.tested = TEST_UNTESTED,
.probe = probe_spi_at25f,
.probe_timing = TIMING_ZERO,
.block_erasers =
{
{
.eraseblocks = { {64 * 1024, 8} },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { {512 * 1024, 1} },
.block_erase = spi_block_erase_62,
}
},
.printlock = spi_prettyprint_status_register_at25f4096,
.unlock = spi_disable_blockprotect_at25f4096,
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
{
.vendor = "Atmel",
.name = "AT25FS010",