driver/spi/eon.c: Add the rest of >=1MB EON EN25 chips
Required for ACPI S3 suspend support at some motherboards, e.g. EN25QH32 chip entry for AMD Lenovo G505S laptop. Signed-off-by: Mike Banon <mikebdp2@gmail.com> Change-Id: I8343a1741be5ea294de0773962c021428815934c Reviewed-on: https://review.coreboot.org/c/30744 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
		
				
					committed by
					
						 Patrick Georgi
						Patrick Georgi
					
				
			
			
				
	
			
			
			
						parent
						
							313e791385
						
					
				
				
					commit
					0421ea277c
				
			| @@ -27,10 +27,27 @@ | ||||
| #define CMD_EN25_DP		0xb9	/* Deep Power-down */ | ||||
| #define CMD_EN25_RES		0xab	/* Release from DP, and Read Signature */ | ||||
|  | ||||
| #define EON_ID_EN25Q128		0x3018 | ||||
| #define EON_ID_EN25Q64		0x3017 | ||||
| #define EON_ID_EN25S64		0x3817 | ||||
| #define EON_ID_EN25B80		0x2014 | ||||
| #define EON_ID_EN25B16		0x2015 | ||||
| #define EON_ID_EN25B32		0x2016 | ||||
| #define EON_ID_EN25B64		0x2017 | ||||
| #define EON_ID_EN25F80		0x3114 | ||||
| #define EON_ID_EN25F16		0x3115 | ||||
| #define EON_ID_EN25F32		0x3116 | ||||
| #define EON_ID_EN25F64		0x3117 | ||||
| #define EON_ID_EN25Q80		0x3014 | ||||
| #define EON_ID_EN25Q16		0x3015	/* Same as EN25D16 */ | ||||
| #define EON_ID_EN25Q32		0x3016	/* Same as EN25Q32A and EN25Q32B */ | ||||
| #define EON_ID_EN25Q64		0x3017 | ||||
| #define EON_ID_EN25Q128		0x3018 | ||||
| #define EON_ID_EN25QH16		0x7015 | ||||
| #define EON_ID_EN25QH32		0x7016 | ||||
| #define EON_ID_EN25QH64		0x7017 | ||||
| #define EON_ID_EN25QH128	0x7018 | ||||
| #define EON_ID_EN25S80		0x3814 | ||||
| #define EON_ID_EN25S16		0x3815 | ||||
| #define EON_ID_EN25S32		0x3816 | ||||
| #define EON_ID_EN25S64		0x3817 | ||||
|  | ||||
| struct eon_spi_flash_params { | ||||
| 	u16 id; | ||||
| @@ -43,12 +60,92 @@ struct eon_spi_flash_params { | ||||
|  | ||||
| static const struct eon_spi_flash_params eon_spi_flash_table[] = { | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25Q128, | ||||
| 		.id = EON_ID_EN25B80, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 4096, | ||||
| 		.name = "EN25Q128", | ||||
| 		.nr_sectors = 256, | ||||
| 		.name = "EN25B80", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25B16, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 512, | ||||
| 		.name = "EN25B16", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25B32, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 1024, | ||||
| 		.name = "EN25B32", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25B64, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 2048, | ||||
| 		.name = "EN25B64", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25F80, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 256, | ||||
| 		.name = "EN25F80", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25F16, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 512, | ||||
| 		.name = "EN25F16", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25F32, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 1024, | ||||
| 		.name = "EN25F32", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25F64, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 2048, | ||||
| 		.name = "EN25F64", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25Q80, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 256, | ||||
| 		.name = "EN25Q80(A)", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25Q16, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 512, | ||||
| 		.name = "EN25Q16(D16)", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25Q32, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 1024, | ||||
| 		.name = "EN25Q32(A/B)", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25Q64, | ||||
| @@ -58,6 +155,70 @@ static const struct eon_spi_flash_params eon_spi_flash_table[] = { | ||||
| 		.nr_sectors = 2048, | ||||
| 		.name = "EN25Q64", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25Q128, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 4096, | ||||
| 		.name = "EN25Q128", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25QH16, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 512, | ||||
| 		.name = "EN25QH16", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25QH32, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 1024, | ||||
| 		.name = "EN25QH32", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25QH64, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 2048, | ||||
| 		.name = "EN25QH64", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25QH128, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 4096, | ||||
| 		.name = "EN25QH128", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25S80, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 256, | ||||
| 		.name = "EN25S80", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25S16, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 512, | ||||
| 		.name = "EN25S16", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25S32, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 1024, | ||||
| 		.name = "EN25S32", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25S64, | ||||
| 		.page_size = 256, | ||||
| @@ -66,14 +227,6 @@ static const struct eon_spi_flash_params eon_spi_flash_table[] = { | ||||
| 		.nr_sectors = 2048, | ||||
| 		.name = "EN25S64", | ||||
| 	}, | ||||
| 	{ | ||||
| 		.id = EON_ID_EN25F80, | ||||
| 		.page_size = 256, | ||||
| 		.pages_per_sector = 16, | ||||
| 		.sectors_per_block = 16, | ||||
| 		.nr_sectors = 256, | ||||
| 		.name = "EN25F80", | ||||
| 	}, | ||||
| }; | ||||
|  | ||||
| static int eon_write(const struct spi_flash *flash, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user