From 2db6e6806b0966d5e921752aa3f91af0310b3181 Mon Sep 17 00:00:00 2001
From: Mike Banon <mikebdp2@gmail.com>
Date: Sat, 12 Jan 2019 19:01:10 +0300
Subject: drivers/spi/gigadevice.c: Add the rest of >=1MB Gigadevice GD25 chips
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Required for ACPI S3 suspend support at some motherboards.
Synchronizing with flashchips.c/h flashrom source code.

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: I333c8589ddc2bece488608ff66015ca8307eae0f
Reviewed-on: https://review.coreboot.org/c/30882
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
---
 src/drivers/spi/gigadevice.c | 66 ++++++++++++++++++++++++++++++++++++++------
 1 file changed, 57 insertions(+), 9 deletions(-)

(limited to 'src')

diff --git a/src/drivers/spi/gigadevice.c b/src/drivers/spi/gigadevice.c
index 2d7544c485..ff1ce2f8e6 100644
--- a/src/drivers/spi/gigadevice.c
+++ b/src/drivers/spi/gigadevice.c
@@ -50,13 +50,21 @@ struct gigadevice_spi_flash_params {
 };
 
 static const struct gigadevice_spi_flash_params gigadevice_spi_flash_table[] = {
+	{
+		.id			= 0x3114,
+		.l2_page_size		= 8,
+		.pages_per_sector	= 16,
+		.sectors_per_block	= 16,
+		.nr_blocks		= 16,
+		.name			= "GD25T80",
+	},
 	{
 		.id			= 0x4014,
 		.l2_page_size		= 8,
 		.pages_per_sector	= 16,
 		.sectors_per_block	= 16,
 		.nr_blocks		= 16,
-		.name			= "GD25Q80",
+		.name			= "GD25Q80(B)",
 	},
 	{
 		.id			= 0x4015,
@@ -75,20 +83,60 @@ static const struct gigadevice_spi_flash_params gigadevice_spi_flash_table[] = {
 		.name			= "GD25Q32(B)",
 	},
 	{
-		.id			= 0x6016,
+		.id			= 0x4017,
 		.l2_page_size		= 8,
 		.pages_per_sector	= 16,
 		.sectors_per_block	= 16,
-		.nr_blocks		= 64,
-		.name			= "GD25LQ32",
+		.nr_blocks		= 128,
+		.name			= "GD25Q64(B)/GD25B64C",
 	},
 	{
-		.id			= 0x4017,
+		.id			= 0x4018,
 		.l2_page_size		= 8,
 		.pages_per_sector	= 16,
 		.sectors_per_block	= 16,
-		.nr_blocks		= 128,
-		.name			= "GD25Q64B/GD25B64C",
+		.nr_blocks		= 256,
+		.name			= "GD25Q128(B)",
+	},
+	{
+		.id			= 0x4214,
+		.l2_page_size		= 8,
+		.pages_per_sector	= 16,
+		.sectors_per_block	= 16,
+		.nr_blocks		= 16,
+		.name			= "GD25VQ80C",
+	},
+	{
+		.id			= 0x4215,
+		.l2_page_size		= 8,
+		.pages_per_sector	= 16,
+		.sectors_per_block	= 16,
+		.nr_blocks		= 32,
+		.name			= "GD25VQ16C",
+	},
+	{
+		.id			= 0x6014,
+		.l2_page_size		= 8,
+		.pages_per_sector	= 16,
+		.sectors_per_block	= 16,
+		.nr_blocks		= 16,
+		.name			= "GD25LQ80",
+	},
+	{
+		.id			= 0x6015,
+		.l2_page_size		= 8,
+		.pages_per_sector	= 16,
+		.sectors_per_block	= 16,
+		.nr_blocks		= 32,
+		.name			= "GD25LQ16",
+	},
+	{
+		.id			= 0x6016,
+		.l2_page_size		= 8,
+		.pages_per_sector	= 16,
+		.sectors_per_block	= 16,
+		.nr_blocks		= 64,
+		.name			= "GD25LQ32",
 	},
 	{
 		.id			= 0x6017,
@@ -99,12 +147,12 @@ static const struct gigadevice_spi_flash_params gigadevice_spi_flash_table[] = {
 		.name			= "GD25LQ64C/GD25LB64C",
 	},
 	{
-		.id			= 0x4018,
+		.id			= 0x6018,
 		.l2_page_size		= 8,
 		.pages_per_sector	= 16,
 		.sectors_per_block	= 16,
 		.nr_blocks		= 256,
-		.name			= "GD25Q128(B)",
+		.name			= "GD25LQ128",
 	},
 };
 
-- 
cgit v1.2.3