All SPI chips without a WRSR feature bit set were evaluated except the Sanyo LF25FW203A for which no datasheet is available.
The following list includes all SPI-capable chips that still have no WRSR feature bit set: - AT26DF041 - AT45CS1282 - AT45DB011D - AT45DB021D - AT45DB041D - AT45DB081D - AT45DB161D - AT45DB321C - AT45DB321D - AT45DB642D
All of them have no write function set and can be therefore ignored for now.
Apart from those the generic chips are also not tagged. The opaque flash interface should not be affected. The SFDP dummy chip is changed to explicitly set EWSR if it can't deduce it dynamically. The vendor detecting generic chips can't write anyway.
Signed-off-by: Steven Zakulec spzakulec@gmail.com Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at --- flashchips.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- sfdp.c | 4 ++- 2 files changed, 87 insertions(+), 2 deletions(-)
diff --git a/flashchips.c b/flashchips.c index 5904e2b..b48552c 100644 --- a/flashchips.c +++ b/flashchips.c @@ -545,6 +545,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L05PT, .total_size = 64, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -578,6 +579,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L05PU, .total_size = 64, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -611,6 +613,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L10PT, .total_size = 128, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -645,6 +648,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L10PU, .total_size = 128, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -679,6 +683,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L20PT, .total_size = 256, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -713,6 +718,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L20PU, .total_size = 256, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -752,6 +758,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L40PT, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PR, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -786,6 +793,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L40PU, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PR, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -820,6 +828,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L80P, .total_size = 1024, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PRE, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -854,6 +863,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L16PT, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -891,6 +901,7 @@ const struct flashchip flashchips[] = { .model_id = AMIC_A25L16PU, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PR, .probe = probe_spi_rdid4, .probe_timing = TIMING_ZERO, @@ -1701,6 +1712,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT25FS010, .total_size = 128, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -1741,6 +1753,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT25FS040, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -1778,6 +1791,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT26DF041, .total_size = 512, .page_size = 256, + /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -1839,6 +1853,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT26DF161, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -1876,6 +1891,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT26DF161A, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -1914,6 +1930,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT26DF321, .total_size = 4096, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -1932,6 +1949,7 @@ const struct flashchip flashchips[] = { .total_size = 512, .page_size = 256, .tested = TEST_UNTESTED, + .feature_bits = FEATURE_WRSR_WREN, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, .block_erasers = @@ -2062,6 +2080,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT45CS1282, .total_size = 16896 /* No power of two sizes */, .page_size = 1056 /* No power of two sizes */, + /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .tested = TEST_BAD_READ, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2078,6 +2097,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT45DB011D, .total_size = 128 /* Size can only be determined from status register */, .page_size = 256 /* Size can only be determined from status register */, + /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .tested = TEST_BAD_READ, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2094,6 +2114,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT45DB021D, .total_size = 256 /* Size can only be determined from status register */, .page_size = 256 /* Size can only be determined from status register */, + /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .tested = TEST_BAD_READ, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2110,6 +2131,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT45DB041D, .total_size = 512 /* Size can only be determined from status register */, .page_size = 256 /* Size can only be determined from status register */, + /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .tested = TEST_BAD_READ, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2126,6 +2148,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT45DB081D, .total_size = 1024 /* Size can only be determined from status register */, .page_size = 256 /* Size can only be determined from status register */, + /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .tested = TEST_BAD_READ, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2142,6 +2165,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT45DB161D, .total_size = 2048 /* Size can only be determined from status register */, .page_size = 512 /* Size can only be determined from status register */, + /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .tested = TEST_BAD_READ, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2158,6 +2182,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT45DB321C, .total_size = 4224 /* No power of two sizes */, .page_size = 528 /* No power of two sizes */, + /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .tested = TEST_BAD_READ, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2175,6 +2200,7 @@ const struct flashchip flashchips[] = { .total_size = 4096 /* Size can only be determined from status register */, .page_size = 512 /* Size can only be determined from status register */, /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */ + /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .feature_bits = FEATURE_OTP, .tested = TEST_BAD_READ, .probe = probe_spi_rdid, @@ -2192,6 +2218,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT45DB642D, .total_size = 8192 /* Size can only be determined from status register */, .page_size = 1024 /* Size can only be determined from status register */, + /* does not support EWSR nor WREN and has no writable status register bits whatsoever */ .tested = TEST_BAD_READ, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2477,6 +2504,7 @@ const struct flashchip flashchips[] = { .model_id = EMST_F25L008A, .total_size = 1024, .page_size = 256, + .feature_bits = FEATURE_WRSR_EITHER, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2510,6 +2538,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B05, .total_size = 64, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2542,6 +2571,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B05, .total_size = 64, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2574,6 +2604,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B10, .total_size = 128, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2606,6 +2637,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B10, .total_size = 128, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2638,6 +2670,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B20, .total_size = 256, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2671,6 +2704,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B20, .total_size = 256, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2704,6 +2738,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B40, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2737,6 +2772,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B40, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2770,6 +2806,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B80, .total_size = 1024, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2803,6 +2840,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B80, .total_size = 1024, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2836,6 +2874,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B16, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2869,6 +2908,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B16, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2902,6 +2942,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B32, .total_size = 4096, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -2935,6 +2976,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B32, .total_size = 4096, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -3002,6 +3044,7 @@ const struct flashchip flashchips[] = { .model_id = EON_EN25B64, .total_size = 8192, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5197,6 +5240,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25PE10, .total_size = 128, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5227,6 +5271,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25PE20, .total_size = 256, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5257,6 +5302,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25PE40, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5287,6 +5333,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25PE80, .total_size = 1024, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5317,6 +5364,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25PE16, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5376,6 +5424,7 @@ const struct flashchip flashchips[] = { .model_id = PMC_PM25LV010, .total_size = 128, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5406,6 +5455,7 @@ const struct flashchip flashchips[] = { .model_id = PMC_PM25LV016B, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5442,6 +5492,7 @@ const struct flashchip flashchips[] = { .model_id = PMC_PM25LV020, .total_size = 256, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5472,6 +5523,7 @@ const struct flashchip flashchips[] = { .model_id = PMC_PM25LV040, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5502,6 +5554,7 @@ const struct flashchip flashchips[] = { .model_id = PMC_PM25LV080B, .total_size = 1024, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5538,6 +5591,7 @@ const struct flashchip flashchips[] = { .model_id = PMC_PM25LV512, .total_size = 64, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5873,6 +5927,7 @@ const struct flashchip flashchips[] = { .model_id = SPANSION_S25FL004A, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5900,6 +5955,7 @@ const struct flashchip flashchips[] = { .model_id = SPANSION_S25FL008A, .total_size = 1024, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PRE, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5927,6 +5983,7 @@ const struct flashchip flashchips[] = { .model_id = SPANSION_S25FL016A, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PR, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5954,6 +6011,7 @@ const struct flashchip flashchips[] = { .model_id = SPANSION_S25FL032A, .total_size = 4096, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PR, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -5981,6 +6039,7 @@ const struct flashchip flashchips[] = { .model_id = SPANSION_S25FL064A, .total_size = 8192, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -6008,6 +6067,7 @@ const struct flashchip flashchips[] = { .model_id = SST_SST25VF040_REMS, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, .probe = probe_spi_res2, .probe_timing = TIMING_ZERO, @@ -6038,6 +6098,7 @@ const struct flashchip flashchips[] = { .model_id = SST_SST25VF080_REMS, .total_size = 1024, .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_UNTESTED, .probe = probe_spi_res2, .probe_timing = TIMING_ZERO, @@ -6068,6 +6129,7 @@ const struct flashchip flashchips[] = { .model_id = SST_SST25VF010_REMS, .total_size = 128, .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, .probe = probe_spi_rems, .probe_timing = TIMING_ZERO, @@ -6098,6 +6160,7 @@ const struct flashchip flashchips[] = { .model_id = SST_SST25VF016B, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -6134,6 +6197,7 @@ const struct flashchip flashchips[] = { .model_id = SST_SST25VF032B, .total_size = 4096, .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -6170,6 +6234,7 @@ const struct flashchip flashchips[] = { .model_id = SST_SST25VF064C, .total_size = 8192, .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -6206,6 +6271,7 @@ const struct flashchip flashchips[] = { .model_id = SST_SST25VF040_REMS, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PR, .probe = probe_spi_rems, .probe_timing = TIMING_ZERO, @@ -6236,6 +6302,7 @@ const struct flashchip flashchips[] = { .model_id = SST_SST25VF040B, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -6272,6 +6339,7 @@ const struct flashchip flashchips[] = { .model_id = SST_SST25VF040B_REMS, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PR, .probe = probe_spi_rems, .probe_timing = TIMING_ZERO, @@ -6308,6 +6376,7 @@ const struct flashchip flashchips[] = { .model_id = SST_SST25VF080B, .total_size = 1024, .page_size = 256, + .feature_bits = FEATURE_WRSR_EWSR, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7128,6 +7197,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P05A, .total_size = 64, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7160,6 +7230,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P05_RES, .total_size = 64, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_res1, .probe_timing = TIMING_ZERO, @@ -7187,6 +7258,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P10A, .total_size = 128, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PRE, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7215,6 +7287,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P10_RES, .total_size = 128, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_res1, .probe_timing = TIMING_ZERO, @@ -7242,6 +7315,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P20, .total_size = 256, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7269,6 +7343,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P40, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7296,6 +7371,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P40_RES, .total_size = 512, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_res1, .probe_timing = TIMING_ZERO, @@ -7322,6 +7398,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P80, .total_size = 1024, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7349,6 +7426,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P16, .total_size = 2048, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PR, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7376,6 +7454,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P32, .total_size = 4096, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7403,6 +7482,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P64, .total_size = 8192, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_UNTESTED, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7430,6 +7510,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25P128, .total_size = 16384, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7458,7 +7539,7 @@ const struct flashchip flashchips[] = { .total_size = 2048, .page_size = 256, /* OTP: 64B total; read 0x4B; write 0x42 */ - .feature_bits = FEATURE_OTP, + .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP, .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7488,6 +7569,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25PX32, .total_size = 4096, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PRE, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, @@ -7518,6 +7600,7 @@ const struct flashchip flashchips[] = { .model_id = ST_M25PX64, .total_size = 8192, .page_size = 256, + .feature_bits = FEATURE_WRSR_WREN, .tested = TEST_OK_PRE, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, diff --git a/sfdp.c b/sfdp.c index 39d59e0..708b66b 100644 --- a/sfdp.c +++ b/sfdp.c @@ -176,10 +176,12 @@ static int sfdp_fill_flash(struct flashctx *flash, uint8_t *buf, uint16_t len) flash->feature_bits = FEATURE_WRSR_EWSR; msg_cdbg2("EWSR (0x50).\n"); } - } else + } else { msg_cdbg2("non-volatile and the standard does not allow " "vendors to tell us whether EWSR/WREN is needed for " "status register writes - assuming EWSR.\n"); + flash->feature_bits = FEATURE_WRSR_EWSR; + }
msg_cdbg2(" Write chunk size is "); if (tmp32 & (1 << 2)) {