1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

Add support for AMIC A25LQ16 and A25LQ64

Also, refine unlocking of A25L032, A25LQ32A and A25LQ032.

Corresponding to flashrom svn r1689.

Signed-off-by: Nikolay Nikolaev <evrinoma@gmail.com>
Reviewed-by: Steven Zakulec <spzakulec@gmail.com>
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:
Nikolay Nikolaev 2013-06-28 21:29:21 +00:00 committed by Stefan Tauner
parent c08542b977
commit d07fde6884
2 changed files with 89 additions and 6 deletions

View File

@ -1155,8 +1155,8 @@ const struct flashchip flashchips[] = {
.block_erase = spi_block_erase_c7, .block_erase = spi_block_erase_c7,
} }
}, },
.printlock = spi_prettyprint_status_register_amic_a25l032, .printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
.unlock = NULL, /* Two status reg bytes (read with 0x35 and 0x05) */ .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
.write = spi_chip_write_256, .write = spi_chip_write_256,
.read = spi_chip_read, .read = spi_chip_read,
.voltage = {2700, 3600}, .voltage = {2700, 3600},
@ -1164,12 +1164,52 @@ const struct flashchip flashchips[] = {
{ {
.vendor = "AMIC", .vendor = "AMIC",
.name = "A25LQ032", .name = "A25LQ16",
.bustype = BUS_SPI,
.manufacture_id = AMIC_ID_NOPREFIX,
.model_id = AMIC_A25LQ16,
.total_size = 2048,
.page_size = 256,
/* supports SFDP */
/* OTP: 64B total; read 0x4B, 0x48; write 0x42 */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
.block_erasers = {
{
.eraseblocks = { { 4 * 1024, 512 } },
.block_erase = spi_block_erase_20,
}, {
.eraseblocks = { { 64 * 1024, 32 } },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { { 64 * 1024, 32 } },
.block_erase = spi_block_erase_d8,
}, {
.eraseblocks = { { 2048 * 1024, 1 } },
.block_erase = spi_block_erase_60,
}, {
.eraseblocks = { { 2048 * 1024, 1 } },
.block_erase = spi_block_erase_c7,
}
},
.printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
.unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
{
.vendor = "AMIC",
.name = "A25LQ032/A25LQ32A",
.bustype = BUS_SPI, .bustype = BUS_SPI,
.manufacture_id = AMIC_ID_NOPREFIX, .manufacture_id = AMIC_ID_NOPREFIX,
.model_id = AMIC_A25LQ032, .model_id = AMIC_A25LQ032,
.total_size = 4096, .total_size = 4096,
.page_size = 256, .page_size = 256,
/* A25LQ32A supports SFDP */
/* OTP: 64B total; read 0x4B, 0x48; write 0x42 */ /* OTP: 64B total; read 0x4B, 0x48; write 0x42 */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
.tested = TEST_UNTESTED, .tested = TEST_UNTESTED,
@ -1194,8 +1234,49 @@ const struct flashchip flashchips[] = {
.block_erase = spi_block_erase_c7, .block_erase = spi_block_erase_c7,
} }
}, },
.printlock = spi_prettyprint_status_register_amic_a25l032, .printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
.unlock = NULL, /* Two status reg bytes (read with 0x35 and 0x05) */ .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {2700, 3600},
},
{
.vendor = "AMIC",
.name = "A25LQ64",
.bustype = BUS_SPI,
.manufacture_id = AMIC_ID_NOPREFIX,
.model_id = AMIC_A25LQ032,
.total_size = 8192,
.page_size = 256,
/* supports SFDP */
/* OTP: 512B total; enter 0xB1, exit 0xC1 */
/* QPI enable 0x35, disable 0xF5 */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI,
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
.block_erasers =
{
{
.eraseblocks = { { 4 * 1024, 2048 } },
.block_erase = spi_block_erase_20,
}, {
.eraseblocks = { { 32 * 1024, 256 } },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { { 64 * 1024, 128 } },
.block_erase = spi_block_erase_d8,
}, {
.eraseblocks = { { 8192 * 1024, 1 } },
.block_erase = spi_block_erase_60,
}, {
.eraseblocks = { { 8192 * 1024, 1 } },
.block_erase = spi_block_erase_c7,
}
},
.printlock = spi_prettyprint_status_register_default_bp3, /* bit6 is quad enhance (sic!) */
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256, .write = spi_chip_write_256,
.read = spi_chip_read, .read = spi_chip_read,
.voltage = {2700, 3600}, .voltage = {2700, 3600},

View File

@ -112,7 +112,9 @@
#define AMIC_A25L080 0x3014 #define AMIC_A25L080 0x3014
#define AMIC_A25L016 0x3015 #define AMIC_A25L016 0x3015
#define AMIC_A25L032 0x3016 #define AMIC_A25L032 0x3016
#define AMIC_A25LQ032 0x4016 #define AMIC_A25LQ16 0x4015
#define AMIC_A25LQ032 0x4016 /* Same as A25LQ32A, but the latter supports SFDP */
#define AMIC_A25LQ64 0x4017
#define AMIC_A29002B 0x0d #define AMIC_A29002B 0x0d
#define AMIC_A29002T 0x8C /* Same as A290021T */ #define AMIC_A29002T 0x8C /* Same as A290021T */
#define AMIC_A29040B 0x86 #define AMIC_A29040B 0x86