From c0bf7928a2c11c1645ee69b75a6ca48e2b92f47d Mon Sep 17 00:00:00 2001 From: Andranux Date: Sun, 6 Jul 2025 12:33:02 +0200 Subject: [PATCH] flashchips: Add EN25QX128A I tested with an "ch341a" usb adapter. I was able to read, erase and write successfully. Datasheet: https://www.esmt.com.tw/upload/pdf/ESMT/datasheets/EN25QX128A(2V).pdf Change-Id: If6c5c3c37f3d817d93abdbc60c2d9280ff2585c3 Signed-off-by: Andranux Reviewed-on: https://review.coreboot.org/c/flashrom/+/88327 Reviewed-by: Anastasia Klimchuk Tested-by: build bot (Jenkins) --- flashchips/eon.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/flashchips.h | 1 + 2 files changed, 42 insertions(+) diff --git a/flashchips/eon.c b/flashchips/eon.c index 921eb5645..ea3616425 100644 --- a/flashchips/eon.c +++ b/flashchips/eon.c @@ -1578,6 +1578,47 @@ .voltage = {2700, 3600}, }, + { + .vendor = "Eon", + .name = "EN25QX128A", + .bustype = BUS_SPI, + .manufacture_id = EON_ID_NOPREFIX, + .model_id = EON_EN25QX128A, + .total_size = 16384, + .page_size = 256, + /* supports SFDP */ + /* OTP: 512B total;*/ + /* QPI enable 0x38, disable 0xFF */ + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI, + .tested = TEST_OK_PREW, + .probe = PROBE_SPI_RDID, + .probe_timing = TIMING_ZERO, + .block_erasers = + { + { + .eraseblocks = { {4 * 1024, 4096} }, + .block_erase = SPI_BLOCK_ERASE_20, + }, { + .eraseblocks = { {32 * 1024, 512} }, + .block_erase = SPI_BLOCK_ERASE_52, + }, { + .eraseblocks = { {64 * 1024, 256} }, + .block_erase = SPI_BLOCK_ERASE_D8, + }, { + .eraseblocks = { {16 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {16 * 1024 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_BP3_SRWD, /* bit6 is quad enable */ + .unlock = SPI_DISABLE_BLOCKPROTECT_BP3_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + }, + { .vendor = "Eon", .name = "EN25S10", diff --git a/include/flashchips.h b/include/flashchips.h index 49ef8c7f7..fb1be827f 100644 --- a/include/flashchips.h +++ b/include/flashchips.h @@ -298,6 +298,7 @@ #define EON_EN25QH64 0x7017 #define EON_EN25QH128 0x7018 #define EON_EN25QH256 0x7019 +#define EON_EN25QX128A 0x7118 #define EON_EN25S10 0x3811 #define EON_EN25S20 0x3812 #define EON_EN25S40 0x3813