From 86752777d54954a777b329755fb3530de5d06832 Mon Sep 17 00:00:00 2001 From: boyesm Date: Wed, 8 May 2024 12:23:29 -0400 Subject: [PATCH] flashchips: Add support for Boya B25Q64AS The B25Q64AS has been tested by ch341a programmer: read, write, erase Datasheet: https://archive.org/details/1912111437-boyamicro-by-25-q-64-assig-c-383793 Change-Id: I05ecf2b118902db974544d86e023a348912371dd Signed-off-by: Malcolm Boyes Reviewed-on: https://review.coreboot.org/c/flashrom/+/82259 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk --- flashchips.c | 38 ++++++++++++++++++++++++++++++++++++++ include/flashchips.h | 1 + 2 files changed, 39 insertions(+) diff --git a/flashchips.c b/flashchips.c index 59edeb3e8..80aab2061 100644 --- a/flashchips.c +++ b/flashchips.c @@ -3605,6 +3605,44 @@ const struct flashchip flashchips[] = { .voltage = {2700, 3600}, }, + { + .vendor = "Boya/BoHong Microelectronics", + .name = "B.25Q64AS", + .bustype = BUS_SPI, + .manufacture_id = BOYA_BOHONG_ID, + .model_id = BOYA_BOHONG_B_25Q64AS, + .total_size = 8192, + .page_size = 256, + .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, 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 = { {16 * 512 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_60, + }, { + .eraseblocks = { {16 * 512 * 1024, 1} }, + .block_erase = SPI_BLOCK_ERASE_C7, + } + }, + .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN, + .unlock = SPI_DISABLE_BLOCKPROTECT_BP4_SRWD, + .write = SPI_CHIP_WRITE256, + .read = SPI_CHIP_READ, + .voltage = {2700, 3600}, + }, + { .vendor = "Boya/BoHong Microelectronics", .name = "B.25Q128AS", diff --git a/include/flashchips.h b/include/flashchips.h index 1e30e84ee..26c4cbc97 100644 --- a/include/flashchips.h +++ b/include/flashchips.h @@ -213,6 +213,7 @@ #define BOYA_BOHONG_ID 0x68 #define BOYA_BOHONG_B__25D80A 0x4014 #define BOYA_BOHONG_B_25D16A 0x4015 +#define BOYA_BOHONG_B_25Q64AS 0x4017 #define BOYA_BOHONG_B_25Q128AS 0x4018 /* Bright Microelectronics has the same manufacturer ID as Hyundai... */