summaryrefslogtreecommitdiff
path: root/src/drivers/spi/adesto.c
diff options
context:
space:
mode:
authorMike Banon <mikebdp2@gmail.com>2019-01-12 19:45:19 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-01-14 02:25:13 +0000
commit8a1cbf00aa11d27c492129837af959c03c6db15e (patch)
tree9589b00158113eefde3b089847ffe73c959f1fb7 /src/drivers/spi/adesto.c
parent2db6e6806b0966d5e921752aa3f91af0310b3181 (diff)
downloadcoreboot-8a1cbf00aa11d27c492129837af959c03c6db15e.tar.xz
drivers/spi/adesto.c: Add the rest of >=1MB Adesto AT25 chips
Required for ACPI S3 suspend support at some motherboards. Synchronizing with flashchips.c/h flashrom source code. Signed-off-by: Mike Banon <mikebdp2@gmail.com> Change-Id: I8c0e6d8f1487ca90f88d4a56af3fb0e21458ef1e Reviewed-on: https://review.coreboot.org/c/30883 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/spi/adesto.c')
-rw-r--r--src/drivers/spi/adesto.c74
1 files changed, 73 insertions, 1 deletions
diff --git a/src/drivers/spi/adesto.c b/src/drivers/spi/adesto.c
index 3e3e7d4dab..5195bec6b7 100644
--- a/src/drivers/spi/adesto.c
+++ b/src/drivers/spi/adesto.c
@@ -44,15 +44,47 @@ struct adesto_spi_flash_params {
static const struct adesto_spi_flash_params adesto_spi_flash_table[] = {
{
+ .id = 0x4218,
+ .l2_page_size = 8,
+ .pages_per_sector = 16,
+ .sectors_per_block = 16,
+ .nr_blocks = 256,
+ .name = "AT25SL128A",
+ },
+ {
.id = 0x4501,
.l2_page_size = 8,
.pages_per_sector = 16,
.sectors_per_block = 16,
.nr_blocks = 16,
+ .name = "AT25DF081A", /* Yes, 81A id < 81 */
+ },
+ {
+ .id = 0x4502,
+ .l2_page_size = 8,
+ .pages_per_sector = 16,
+ .sectors_per_block = 16,
+ .nr_blocks = 16,
.name = "AT25DF081",
},
{
- .id = 0x4701,
+ .id = 0x4602,
+ .l2_page_size = 8,
+ .pages_per_sector = 16,
+ .sectors_per_block = 16,
+ .nr_blocks = 32,
+ .name = "AT25DF161",
+ },
+ {
+ .id = 0x4603,
+ .l2_page_size = 8,
+ .pages_per_sector = 16,
+ .sectors_per_block = 16,
+ .nr_blocks = 32,
+ .name = "AT25DL161",
+ },
+ {
+ .id = 0x4700,
.l2_page_size = 8,
.pages_per_sector = 16,
.sectors_per_block = 16,
@@ -60,6 +92,14 @@ static const struct adesto_spi_flash_params adesto_spi_flash_table[] = {
.name = "AT25DF321",
},
{
+ .id = 0x4701,
+ .l2_page_size = 8,
+ .pages_per_sector = 16,
+ .sectors_per_block = 16,
+ .nr_blocks = 64,
+ .name = "AT25DF321A",
+ },
+ {
.id = 0x4800,
.l2_page_size = 8,
.pages_per_sector = 16,
@@ -67,6 +107,38 @@ static const struct adesto_spi_flash_params adesto_spi_flash_table[] = {
.nr_blocks = 128,
.name = "AT25DF641",
},
+ {
+ .id = 0x8501,
+ .l2_page_size = 8,
+ .pages_per_sector = 16,
+ .sectors_per_block = 16,
+ .nr_blocks = 16,
+ .name = "AT25SF081",
+ },
+ {
+ .id = 0x8600,
+ .l2_page_size = 8,
+ .pages_per_sector = 16,
+ .sectors_per_block = 16,
+ .nr_blocks = 32,
+ .name = "AT25DQ161",
+ },
+ {
+ .id = 0x8601,
+ .l2_page_size = 8,
+ .pages_per_sector = 16,
+ .sectors_per_block = 16,
+ .nr_blocks = 32,
+ .name = "AT25SF161",
+ },
+ {
+ .id = 0x8700,
+ .l2_page_size = 8,
+ .pages_per_sector = 16,
+ .sectors_per_block = 16,
+ .nr_blocks = 64,
+ .name = "AT25DQ321",
+ },
};
static int adesto_write(const struct spi_flash *flash, u32 offset, size_t len,