From 4652df95f1998440032069dd2c04ee46413b362e Mon Sep 17 00:00:00 2001 From: Mario Kicherer Date: Tue, 11 Oct 2022 12:04:59 +0200 Subject: [PATCH] flashchips: add support for ISSI IS25LP016 I took the original patch from Ondrej Hennel [1] and applied the requested changes. Reading, erasing and writing works. [1] https://patchwork.ozlabs.org/project/flashrom/list/?series=261647 Change-Id: Iffd7c4284d4d96b30a94f5dee882b5403fdfc183 Signed-off-by: Mario Kicherer Signed-off-by: Anastasia Klimchuk Reviewed-on: https://review.coreboot.org/c/flashrom/+/68295 Tested-by: build bot (Jenkins) Reviewed-by: Nikolai Artemiev --- flashchips.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/flashchips.h | 1 + 2 files changed, 42 insertions(+) diff --git a/flashchips.c b/flashchips.c index 295eb11f8..3f0968757 100644 --- a/flashchips.c +++ b/flashchips.c @@ -7550,6 +7550,47 @@ const struct flashchip flashchips[] = { .voltage = {4500, 5500}, }, + { + .vendor = "ISSI", + .name = "IS25LP016", + .bustype = BUS_SPI, + .manufacture_id = ISSI_ID_SPI, + .model_id = ISSI_IS25LP016, + .total_size = 2048, + .page_size = 256, + /* OTP: 1024B total; read 0x48; write 0x42 */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {4 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_D7, + }, { + .eraseblocks = { {32 * 1024, 64} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 32} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {2 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2300, 3600}, + }, + { .vendor = "ISSI", .name = "IS25LP064", diff --git a/include/flashchips.h b/include/flashchips.h index 7d6dc32b2..d1ec61a95 100644 --- a/include/flashchips.h +++ b/include/flashchips.h @@ -474,6 +474,7 @@ #define ISSI_ID 0xD5 /* ISSI Integrated Silicon Solutions, see also PMC. */ #define ISSI_ID_SPI 0x9D /* ISSI ID used for SPI flash, see also PMC_ID_NOPREFIX */ +#define ISSI_IS25LP016 0x6015 #define ISSI_IS25LP064 0x6017 #define ISSI_IS25LP128 0x6018 #define ISSI_IS25LP256 0x6019