Skip to content

Commit

Permalink
flashchips.c: enable WP for W25Q32.V, W25Q32.W and W25Q32JW...M
Browse files Browse the repository at this point in the history
Split chips:
 * W25Q32.V -> W25Q32BV/W25Q32CV/W25Q32DV, W25Q32FV and W25Q32JV
 * W25Q32.W -> W25Q32BW/W25Q32CW/W25Q32DW, W25Q32FW and W25Q32JW...Q

Change-Id: Id259c27dfa6c681bbadc73b3bd7559ad6a5865f4
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
  • Loading branch information
SergiiDmytruk committed Aug 17, 2022
1 parent 4695736 commit 42a16ce
Showing 1 changed file with 248 additions and 6 deletions.
254 changes: 248 additions & 6 deletions flashchips.c
Original file line number Diff line number Diff line change
Expand Up @@ -17966,15 +17966,15 @@ const struct flashchip flashchips[] = {

{
.vendor = "Winbond",
.name = "W25Q32.V",
.name = "W25Q32BV/W25Q32CV/W25Q32DV",
.bustype = BUS_SPI,
.manufacture_id = WINBOND_NEX_ID,
.model_id = WINBOND_NEX_W25Q32_V,
.total_size = 4096,
.page_size = 256,
/* supports SFDP */
/* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_WRSR_EXT2,
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
Expand Down Expand Up @@ -18002,19 +18002,184 @@ const struct flashchip flashchips[] = {
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
{
.srp = {STATUS1, 7, RW},
.srl = {STATUS2, 0, RW},
.bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
.tb = {STATUS1, 5, RW},
.sec = {STATUS1, 6, RW},
.cmp = {STATUS2, 6, RW},
},
.decode_range = decode_range_spi25,
},

{
.vendor = "Winbond",
.name = "W25Q32.W",
.name = "W25Q32FV",
.bustype = BUS_SPI,
.manufacture_id = WINBOND_NEX_ID,
.model_id = WINBOND_NEX_W25Q32_V,
.total_size = 4096,
.page_size = 256,
/* supports SFDP */
/* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI |
FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
.block_erasers =
{
{
.eraseblocks = { {4 * 1024, 1024} },
.block_erase = spi_block_erase_20,
}, {
.eraseblocks = { {32 * 1024, 128} },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { {64 * 1024, 64} },
.block_erase = spi_block_erase_d8,
}, {
.eraseblocks = { {4 * 1024 * 1024, 1} },
.block_erase = spi_block_erase_60,
}, {
.eraseblocks = { {4 * 1024 * 1024, 1} },
.block_erase = spi_block_erase_c7,
}
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
{
.srp = {STATUS1, 7, RW},
.srl = {STATUS2, 0, RW},
.bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
.tb = {STATUS1, 5, RW},
.sec = {STATUS1, 6, RW},
.cmp = {STATUS2, 6, RW},
.wps = {STATUS3, 2, RW},
},
.decode_range = decode_range_spi25,
},

{
.vendor = "Winbond",
.name = "W25Q32JV",
.bustype = BUS_SPI,
.manufacture_id = WINBOND_NEX_ID,
.model_id = WINBOND_NEX_W25Q32_V,
.total_size = 4096,
.page_size = 256,
/* supports SFDP */
/* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
.block_erasers =
{
{
.eraseblocks = { {4 * 1024, 1024} },
.block_erase = spi_block_erase_20,
}, {
.eraseblocks = { {32 * 1024, 128} },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { {64 * 1024, 64} },
.block_erase = spi_block_erase_d8,
}, {
.eraseblocks = { {4 * 1024 * 1024, 1} },
.block_erase = spi_block_erase_60,
}, {
.eraseblocks = { {4 * 1024 * 1024, 1} },
.block_erase = spi_block_erase_c7,
}
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {2700, 3600},
.reg_bits =
{
.srp = {STATUS1, 7, RW},
.srl = {STATUS2, 0, RW},
.bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
.tb = {STATUS1, 5, RW},
.sec = {STATUS1, 6, RW},
.cmp = {STATUS2, 6, RW},
.wps = {STATUS3, 2, RW},
},
.decode_range = decode_range_spi25,
},

{
.vendor = "Winbond",
.name = "W25Q32BW/W25Q32CW/W25Q32DW",
.bustype = BUS_SPI,
.manufacture_id = WINBOND_NEX_ID,
.model_id = WINBOND_NEX_W25Q32_W,
.total_size = 4096,
.page_size = 256,
/* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
/* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
/* QPI enable 0x38, disable 0xFF */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI,
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI | FEATURE_WRSR_EXT2,
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
.block_erasers =
{
{
.eraseblocks = { {4 * 1024, 1024} },
.block_erase = spi_block_erase_20,
}, {
.eraseblocks = { {32 * 1024, 128} },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { {64 * 1024, 64} },
.block_erase = spi_block_erase_d8,
}, {
.eraseblocks = { {4 * 1024 * 1024, 1} },
.block_erase = spi_block_erase_60,
}, {
.eraseblocks = { {4 * 1024 * 1024, 1} },
.block_erase = spi_block_erase_c7,
}
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
.reg_bits =
{
.srp = {STATUS1, 7, RW},
.srl = {STATUS2, 0, RW},
.bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
.tb = {STATUS1, 5, RW},
.sec = {STATUS1, 6, RW},
.cmp = {STATUS2, 6, RW},
},
.decode_range = decode_range_spi25,
},

{
.vendor = "Winbond",
.name = "W25Q32FW",
.bustype = BUS_SPI,
.manufacture_id = WINBOND_NEX_ID,
.model_id = WINBOND_NEX_W25Q32_W,
.total_size = 4096,
.page_size = 256,
/* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
/* QPI enable 0x38, disable 0xFF */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI |
FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
Expand Down Expand Up @@ -18042,6 +18207,69 @@ const struct flashchip flashchips[] = {
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
.reg_bits =
{
.srp = {STATUS1, 7, RW},
.srl = {STATUS2, 0, RW},
.bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
.tb = {STATUS1, 5, RW},
.sec = {STATUS1, 6, RW},
.cmp = {STATUS2, 6, RW},
.wps = {STATUS3, 2, RW},
},
.decode_range = decode_range_spi25,
},

{
.vendor = "Winbond",
.name = "W25Q32JW...Q",
.bustype = BUS_SPI,
.manufacture_id = WINBOND_NEX_ID,
.model_id = WINBOND_NEX_W25Q32_W,
.total_size = 4096,
.page_size = 256,
/* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
/* QPI enable 0x38, disable 0xFF */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
.block_erasers =
{
{
.eraseblocks = { {4 * 1024, 1024} },
.block_erase = spi_block_erase_20,
}, {
.eraseblocks = { {32 * 1024, 128} },
.block_erase = spi_block_erase_52,
}, {
.eraseblocks = { {64 * 1024, 64} },
.block_erase = spi_block_erase_d8,
}, {
.eraseblocks = { {4 * 1024 * 1024, 1} },
.block_erase = spi_block_erase_60,
}, {
.eraseblocks = { {4 * 1024 * 1024, 1} },
.block_erase = spi_block_erase_c7,
}
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
.reg_bits =
{
.srp = {STATUS1, 7, RW},
.srl = {STATUS2, 0, RW},
.bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
.tb = {STATUS1, 5, RW},
.sec = {STATUS1, 6, RW},
.cmp = {STATUS2, 6, RW},
.wps = {STATUS3, 2, RW},
},
.decode_range = decode_range_spi25,
},

{
Expand All @@ -18052,7 +18280,10 @@ const struct flashchip flashchips[] = {
.model_id = WINBOND_NEX_W25Q32JW_M,
.total_size = 4096,
.page_size = 256,
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
/* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
/* QPI enable 0x38, disable 0xFF */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_WRSR_EXT2,
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
Expand Down Expand Up @@ -18080,6 +18311,17 @@ const struct flashchip flashchips[] = {
.write = spi_chip_write_256,
.read = spi_chip_read,
.voltage = {1700, 1950},
.reg_bits =
{
.srp = {STATUS1, 7, RW},
.srl = {STATUS2, 0, RW},
.bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
.tb = {STATUS1, 5, RW},
.sec = {STATUS1, 6, RW},
.cmp = {STATUS2, 6, RW},
.wps = {STATUS3, 2, RW},
},
.decode_range = decode_range_spi25,
},

{
Expand Down

0 comments on commit 42a16ce

Please sign in to comment.