summaryrefslogtreecommitdiffstats
path: root/flashchips.c
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2022-12-14 12:30:43 +0530
committerFelix Singer <felixsinger@posteo.net>2022-12-16 03:19:43 +0000
commit9394b84c00909354175e46550d454d4a26f7ca23 (patch)
tree412368ba08a5c934a6d301a657ad381cd85f69a0 /flashchips.c
parentc936ce4688c1d36036f28784267c28a546fdba52 (diff)
downloadflashrom-9394b84c00909354175e46550d454d4a26f7ca23.tar.gz
flashrom-9394b84c00909354175e46550d454d4a26f7ca23.tar.bz2
flashrom-9394b84c00909354175e46550d454d4a26f7ca23.zip
flashchips: Add WP settings for Flash Chip `W25Q512NW`
This patch adds WP register bits and decode range for Flash Chip `W25Q512NW`. TEST=Able to flash AP FW, wp-enable/disable on Google/rex device which has flash chip `W25Q512NW`. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: Ic5148f71404466dcf7772e3eb6e1800eb8666696 Reviewed-on: https://review.coreboot.org/c/flashrom/+/67827 Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Diffstat (limited to 'flashchips.c')
-rw-r--r--flashchips.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/flashchips.c b/flashchips.c
index f6aa9d9a8..168cc7d0a 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -18674,8 +18674,9 @@ const struct flashchip flashchips[] = {
.model_id = WINBOND_NEX_W25Q512NW_IM,
.total_size = 64 * 1024,
.page_size = 256,
- .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
- .tested = TEST_OK_PREW,
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA | FEATURE_WRSR2
+ | FEATURE_WRSR3,
+ .tested = TEST_OK_PREWB,
.probe = PROBE_SPI_RDID,
.probe_timing = TIMING_ZERO,
.block_erasers =
@@ -18707,6 +18708,16 @@ const struct flashchip flashchips[] = {
.write = SPI_CHIP_WRITE256,
.read = SPI_CHIP_READ,
.voltage = {1650, 1950},
+ .reg_bits =
+ {
+ .srp = {STATUS1, 7, RW},
+ .srl = {STATUS2, 0, RW},
+ .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
+ .tb = {STATUS1, 6, RW},
+ .cmp = {STATUS2, 6, RW},
+ .wps = {STATUS3, 2, RW},
+ },
+ .decode_range = DECODE_RANGE_SPI25,
},
{