Actions
Feature #523
closedAdd support for flash Winbond W25N01GV
Start date:
01/20/2024
Due date:
% Done:
0%
Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Affected OS:
Description
I'd like to try this (https://www.winbond.com/hq/product/code-storage-flash-memory/qspinand-flash/?__locale=en&partNo=W25N01GV) flash but I saw that there is no flashrom support, is it possible to add it?
At the moment I don't physically have a flash, I should have one soon so I can try.
In the meantime I developed this patch for flashrom is it ok?
diff --git a/flashchips.c b/flashchips.c
index 663b01b2..7abb95b4 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -20317,6 +20317,50 @@ const struct flashchip flashchips[] = {
.decode_range = DECODE_RANGE_SPI25,
},
+ {
+ .vendor = "Winbond",
+ .name = "W25N01GV",
+ .bustype = BUS_SPI,
+ .manufacture_id = WINBOND_NEX_ID,
+ .model_id = WINBOND_NEX_W25N01GV,
+ .total_size = 131072,
+ .page_size = 256,
+ .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
+ .tested = TEST_UNTESTED,
+ .probe = PROBE_SPI_RDID,
+ .probe_timing = TIMING_ZERO,
+ .block_erasers =
+ {
+ {
+ .eraseblocks = { {4 * 1024, 32768} },
+ .block_erase = SPI_BLOCK_ERASE_21,
+ }, {
+ .eraseblocks = { {4 * 1024, 32768} },
+ .block_erase = SPI_BLOCK_ERASE_20,
+ }, {
+ .eraseblocks = { {32 * 1024, 4096} },
+ .block_erase = SPI_BLOCK_ERASE_5C,
+ }, {
+ .eraseblocks = { {32 * 1024, 4096} },
+ .block_erase = SPI_BLOCK_ERASE_52,
+ }, {
+ .eraseblocks = { {64 * 1024, 2048} },
+ .block_erase = SPI_BLOCK_ERASE_DC,
+ }, {
+ .eraseblocks = { {64 * 1024, 2048} },
+ .block_erase = SPI_BLOCK_ERASE_D8,
+ }, {
+ .eraseblocks = { {65536 * 1024, 2} },
+ .block_erase = SPI_BLOCK_ERASE_C4,
+ }
+ },
+ .printlock = SPI_PRETTYPRINT_STATUS_REGISTER_PLAIN,
+ .unlock = SPI_DISABLE_BLOCKPROTECT,
+ .write = SPI_CHIP_WRITE256, /* Multi I/O supported */
+ .read = SPI_CHIP_READ,
+ .voltage = {2700, 3600},
+ },
+
/* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
{
.vendor = "Winbond",
diff --git a/include/flashchips.h b/include/flashchips.h
index d676cda4..fb7abae6 100644
--- a/include/flashchips.h
+++ b/include/flashchips.h
@@ -1007,6 +1007,7 @@
#define WINBOND_NEX_W25Q128_DTR 0x8018 /* W25Q128JW_DTR */
#define WINBOND_NEX_W25Q256_DTR 0x8019 /* W25Q256JW_DTR aka W25Q256256JW-IM */
#define WINBOND_NEX_W25Q512NW_IM 0x8020 /* W25Q512NW-IM */
+#define WINBOND_NEX_W25N01GV 0xAA21 /* W25N01GV */
#define WINBOND_ID 0xDA /* Winbond */
#define WINBOND_W19B160BB 0x49
I didn't understand if the FEATURE_WRSR_WREN feature bit can be enabled for these flashes.
Do I need to set the reg_bits?
I don't want to be unprepared when I get to try this flash.
Actions