From 761746754484843c41a2fc1d672e8848cc7afa6a Mon Sep 17 00:00:00 2001 From: Vasily Galkin Date: Sat, 26 Aug 2023 17:57:16 +0300 Subject: flashchips: Add WP features for Winbond W25X20 WP-related registers list from official datasheet https://www.winbond.com/resource-files/w25x20cl_revf%2020150806.pdf Commandline options tested with ft2232_spi-based "Tigard" programmer: wp-disable wp-enable wp-list wp-status wp-range=0,0 wp-range=0,0x00040000 Signed-off-by: Vasily Galkin Change-Id: I82c0cc52ca2a78d27f513234cc12d3e09d8905a5 Reviewed-on: https://review.coreboot.org/c/flashrom/+/77530 Reviewed-by: Sergii Dmytruk Tested-by: build bot (Jenkins) --- flashchips.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/flashchips.c b/flashchips.c index ce68e9508..009624fa0 100644 --- a/flashchips.c +++ b/flashchips.c @@ -19803,7 +19803,7 @@ const struct flashchip flashchips[] = { .total_size = 256, .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, - .tested = TEST_OK_PREW, + .tested = TEST_OK_PREWB, .probe = PROBE_SPI_RDID, .probe_timing = TIMING_ZERO, .block_erasers = @@ -19824,6 +19824,13 @@ const struct flashchip flashchips[] = { .write = SPI_CHIP_WRITE256, .read = SPI_CHIP_READ, .voltage = {2700, 3600}, + .reg_bits = + { + .srp = {STATUS1, 7, RW}, + .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}}, + .tb = {STATUS1, 5, RW}, + }, + .decode_range = DECODE_RANGE_SPI25, }, { -- cgit v1.2.3