flashchips: Add SST26VF080A

Simple 8Mbit SPI flash, with one caveat though: SFDP reports 0xd8 as
both 32KiB and 64KiB eraser.  The datasheet[1] lists this too in the
SFDP table,  however otherwise consistently states that erase blocks
are uniform, and lists 0x52 as the 32KiB eraser.  For now, we'll try
the latter.

[1] https://ww1.microchip.com/downloads/aemDocuments/documents/MPD/ProductDocuments/DataSheets/SST26VF080A-2.5V-3.0V-8-Mbit-Serial-Quad-IO-%28SQI%29-Flash-Memory-20006203C.pdf

Change-Id: I7d66ff23ef9ded7365e9c75a1aff0a68678a4ba0
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/263
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/flashchips.c b/flashchips.c
index f9f04a8..b498b80 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -15077,6 +15077,44 @@
 
 	{
 		.vendor		= "SST",
+		.name		= "SST26VF080A",
+		.bustype	= BUS_SPI,
+		.manufacture_id	= SST_ID,
+		.model_id	= SST_SST26VF080A,
+		.total_size	= 1024,
+		.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, 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,
+			},
+		},
+		.printlock	= spi_prettyprint_status_register_bp3_srwd,
+		.unlock		= spi_disable_blockprotect_sst26_global_unprotect,
+		.write		= spi_chip_write_256, /* Multi I/O supported */
+		.read		= spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
+		.voltage	= {2700, 3600},
+	},
+
+	{
+		.vendor		= "SST",
 		.name		= "SST28SF040A",
 		.bustype	= BUS_PARALLEL,
 		.manufacture_id	= SST_ID,
diff --git a/include/flashchips.h b/include/flashchips.h
index 682a74d..2c73dd8 100644
--- a/include/flashchips.h
+++ b/include/flashchips.h
@@ -735,6 +735,7 @@
 #define SST_SST25VF032B		0x254A
 #define SST_SST25VF032B_REMS	0x4A	/* REMS or RES opcode */
 #define SST_SST25VF064C		0x254B
+#define SST_SST26VF080A		0x2618
 #define SST_SST26VF016		0x2601
 #define SST_SST26VF032		0x2602
 #define SST_SST26VF016B		0x2641