flashchips: Add Fudan FM25Q08A 3.3V part
This chip is almost identical to the older FM25Q08, however
the CMP bit is at a different offset. /o\
Datasheet used:
http://eng.fmsh.com/nvm/FM25Q08A_ds_eng.pdf
Change-Id: I703487c24491d0be1c90579af798bd5c7457148a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/289
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/flashchips.c b/flashchips.c
index a5a7a9c..8bb8eb5 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -6767,6 +6767,63 @@
{
.vendor = "Fudan",
+ .name = "FM25Q08A",
+ .bustype = BUS_SPI,
+ .manufacture_id = FUDAN_ID_NOPREFIX,
+ .model_id = FUDAN_FM25Q08,
+ .total_size = 1024,
+ .page_size = 256,
+ /* supports SFDP */
+ /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
+ .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
+ FEATURE_OTP | FEATURE_QPI_SRP,
+ .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
+ .tested = TEST_UNTESTED,
+ .probe = probe_spi_rdid,
+ .probe_timing = TIMING_ZERO,
+ .block_erasers = {
+ {
+ .eraseblocks = { {4 * 1024, 256} },
+ .block_erase = spi_block_erase_20,
+ }, {
+ .eraseblocks = { {32 * 1024, 32} },
+ .block_erase = spi_block_erase_52,
+ }, {
+ .eraseblocks = { {64 * 1024, 16} },
+ .block_erase = spi_block_erase_d8,
+ }, {
+ .eraseblocks = { {1024 * 1024, 1} },
+ .block_erase = spi_block_erase_60,
+ }, {
+ .eraseblocks = { {1024 * 1024, 1} },
+ .block_erase = spi_block_erase_c7,
+ },
+ },
+ .reg_bits =
+ {
+ .qe = {STATUS2, 1, RW},
+ .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, 4, RW},
+ },
+ .wp_write_cfg = spi_wp_write_cfg,
+ .wp_read_cfg = spi_wp_read_cfg,
+ .wp_get_ranges = spi_wp_get_available_ranges,
+ .decode_range = decode_range_spi25,
+ .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
+ .unlock = spi_disable_blockprotect_bp2_srwd,
+ .write = spi_chip_write_256,
+ .read = spi_chip_read,
+ .voltage = {2700, 3600},
+ .prepare_access = spi_prepare_io,
+ .finish_access = spi_finish_io,
+ },
+
+ {
+ .vendor = "Fudan",
.name = "FM25Q16",
.bustype = BUS_SPI,
.manufacture_id = FUDAN_ID_NOPREFIX,