From 4f6347a1ce5211783dc8bb7154eaa161fd9442ec Mon Sep 17 00:00:00 2001
From: Cory Henderson <dcoryh192@gmail.com>
Date: Tue, 15 Oct 2013 12:24:47 -0400
Subject: [PATCH] Add support for SST25VF512A

AAI available with different command (0xAF). Fully tested (PREW) with
BusPirate 3.5 running 6.2 beta firmware

Signed-off-by: Cory Henderson <dcoryh192@gmail.com>
---
 flashchips.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/flashchips.c b/flashchips.c
index 05eb5b3..a9f4bfa 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -9843,6 +9843,38 @@ const struct flashchip flashchips[] = {
 
 	{
 		.vendor		= "SST",
+		.name		= "SST25VF512A",
+		.bustype	= BUS_SPI,
+		.manufacture_id	= SST_ID,
+		.model_id	= SST_SST25VF512A_REMS,
+		.total_size	= 64,
+		.page_size	= 256,
+		.feature_bits	= FEATURE_WRSR_EWSR,
+		.tested		= TEST_OK_PREW,
+		.probe		= probe_spi_rems,
+		.probe_timing	= TIMING_ZERO,
+		.block_erasers	=
+		{
+			{
+				.eraseblocks = { {4 * 1024, 16} },
+				.block_erase = spi_block_erase_20,
+			}, {
+				.eraseblocks = { {32 * 1024, 2} },
+				.block_erase = spi_block_erase_52,
+			}, {
+				.eraseblocks = { {64 * 1024, 1} },
+				.block_erase = spi_block_erase_60,
+			},
+		},
+		.printlock	= spi_prettyprint_status_register_sst25,
+		.unlock		= spi_disable_blockprotect,
+		.write		= spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
+		.read		= spi_chip_read, /* Fast read (0x0B) supported */
+		.voltage	= {2700, 3600},
+	},
+	
+	{
+		.vendor		= "SST",
 		.name		= "SST25WF512",
 		.bustype	= BUS_SPI,
 		.manufacture_id	= SST_ID,
-- 
1.8.1.msysgit.1

