mirror of
				https://review.coreboot.org/flashrom.git
				synced 2025-10-31 05:10:41 +01:00 
			
		
		
		
	Add support for more GigaDevice GD25LQ chips
Namely GD25LQ40, GD25LQ80, GD25LQ16, GD25LQ64(B), GD25LQ128. Corresponding to flashrom svn r1889. Signed-off-by: Roman Titov <titovroman@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
		 Roman Titov
					Roman Titov
				
			
				
					committed by
					
						 Stefan Tauner
						Stefan Tauner
					
				
			
			
				
	
			
			
			 Stefan Tauner
						Stefan Tauner
					
				
			
						parent
						
							f4651f612b
						
					
				
				
					commit
					95edc89a94
				
			
							
								
								
									
										199
									
								
								flashchips.c
									
									
									
									
									
								
							
							
						
						
									
										199
									
								
								flashchips.c
									
									
									
									
									
								
							| @@ -5464,6 +5464,123 @@ const struct flashchip flashchips[] = { | |||||||
| 		.voltage	= {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */ | 		.voltage	= {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */ | ||||||
| 	}, | 	}, | ||||||
|  |  | ||||||
|  | 	{ | ||||||
|  | 		.vendor		= "GigaDevice", | ||||||
|  | 		.name		= "GD25LQ40", | ||||||
|  | 		.bustype	= BUS_SPI, | ||||||
|  | 		.manufacture_id	= GIGADEVICE_ID, | ||||||
|  | 		.model_id	= GIGADEVICE_GD25LQ40, | ||||||
|  | 		.total_size	= 512, | ||||||
|  | 		.page_size	= 256, | ||||||
|  | 		/* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ | ||||||
|  | 		.feature_bits	= FEATURE_WRSR_WREN | FEATURE_OTP, | ||||||
|  | 		.tested		= TEST_UNTESTED, | ||||||
|  | 		.probe		= probe_spi_rdid, | ||||||
|  | 		.probe_timing	= TIMING_ZERO, | ||||||
|  | 		.block_erasers	= | ||||||
|  | 		{ | ||||||
|  | 			{ | ||||||
|  | 				.eraseblocks = { {4 * 1024, 128} }, | ||||||
|  | 				.block_erase = spi_block_erase_20, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {32 * 1024, 16} }, | ||||||
|  | 				.block_erase = spi_block_erase_52, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {64 * 1024, 8} }, | ||||||
|  | 				.block_erase = spi_block_erase_d8, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {512 * 1024, 1} }, | ||||||
|  | 				.block_erase = spi_block_erase_60, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {512 * 1024, 1} }, | ||||||
|  | 				.block_erase = spi_block_erase_c7, | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		.printlock	= spi_prettyprint_status_register_bp4_srwd, | ||||||
|  | 		.unlock		= spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */ | ||||||
|  | 		.write		= spi_chip_write_256, | ||||||
|  | 		.read		= spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ | ||||||
|  | 		.voltage	= {1695, 1950}, | ||||||
|  | 	}, | ||||||
|  |  | ||||||
|  | 	{ | ||||||
|  | 		.vendor		= "GigaDevice", | ||||||
|  | 		.name		= "GD25LQ80", | ||||||
|  | 		.bustype	= BUS_SPI, | ||||||
|  | 		.manufacture_id	= GIGADEVICE_ID, | ||||||
|  | 		.model_id	= GIGADEVICE_GD25LQ80, | ||||||
|  | 		.total_size	= 1024, | ||||||
|  | 		.page_size	= 256, | ||||||
|  | 		/* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ | ||||||
|  | 		.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 = { {1 * 1024 * 1024, 1} }, | ||||||
|  | 				.block_erase = spi_block_erase_60, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {1 * 1024 * 1024, 1} }, | ||||||
|  | 				.block_erase = spi_block_erase_c7, | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		.printlock	= spi_prettyprint_status_register_bp4_srwd, | ||||||
|  | 		.unlock		= spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */ | ||||||
|  | 		.write		= spi_chip_write_256, | ||||||
|  | 		.read		= spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ | ||||||
|  | 		.voltage	= {1695, 1950}, | ||||||
|  | 	}, | ||||||
|  |  | ||||||
|  | 	{ | ||||||
|  | 		.vendor		= "GigaDevice", | ||||||
|  | 		.name		= "GD25LQ16", | ||||||
|  | 		.bustype	= BUS_SPI, | ||||||
|  | 		.manufacture_id	= GIGADEVICE_ID, | ||||||
|  | 		.model_id	= GIGADEVICE_GD25LQ16, | ||||||
|  | 		.total_size	= 2048, | ||||||
|  | 		.page_size	= 256, | ||||||
|  | 		/* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ | ||||||
|  | 		.feature_bits	= FEATURE_WRSR_WREN | FEATURE_OTP, | ||||||
|  | 		.tested		= TEST_UNTESTED, | ||||||
|  | 		.probe		= probe_spi_rdid, | ||||||
|  | 		.probe_timing	= TIMING_ZERO, | ||||||
|  | 		.block_erasers	= | ||||||
|  | 		{ | ||||||
|  | 			{ | ||||||
|  | 				.eraseblocks = { {4 * 1024, 512} }, | ||||||
|  | 				.block_erase = spi_block_erase_20, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {32 * 1024, 64} }, | ||||||
|  | 				.block_erase = spi_block_erase_52, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {64 * 1024, 32} }, | ||||||
|  | 				.block_erase = spi_block_erase_d8, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {2 * 1024 * 1024, 1} }, | ||||||
|  | 				.block_erase = spi_block_erase_60, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {2 * 1024 * 1024, 1} }, | ||||||
|  | 				.block_erase = spi_block_erase_c7, | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		.printlock	= spi_prettyprint_status_register_bp4_srwd, | ||||||
|  | 		.unlock		= spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */ | ||||||
|  | 		.write		= spi_chip_write_256, | ||||||
|  | 		.read		= spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ | ||||||
|  | 		.voltage	= {1695, 1950}, | ||||||
|  | 	}, | ||||||
|  |  | ||||||
| 	{ | 	{ | ||||||
| 		.vendor		= "GigaDevice", | 		.vendor		= "GigaDevice", | ||||||
| 		.name		= "GD25LQ32", | 		.name		= "GD25LQ32", | ||||||
| @@ -5499,8 +5616,86 @@ const struct flashchip flashchips[] = { | |||||||
| 		.printlock	= spi_prettyprint_status_register_bp4_srwd, | 		.printlock	= spi_prettyprint_status_register_bp4_srwd, | ||||||
| 		.unlock		= spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */ | 		.unlock		= spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */ | ||||||
| 		.write		= spi_chip_write_256, | 		.write		= spi_chip_write_256, | ||||||
| 		.read		= spi_chip_read, | 		.read		= spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ | ||||||
| 		.voltage	= {1700, 1950}, | 		.voltage	= {1695, 1950}, | ||||||
|  | 	}, | ||||||
|  |  | ||||||
|  | 	{ | ||||||
|  | 		.vendor		= "GigaDevice", | ||||||
|  | 		.name		= "GD25LQ64(B)", | ||||||
|  | 		.bustype	= BUS_SPI, | ||||||
|  | 		.manufacture_id	= GIGADEVICE_ID, | ||||||
|  | 		.model_id	= GIGADEVICE_GD25LQ64, | ||||||
|  | 		.total_size	= 8192, | ||||||
|  | 		.page_size	= 256, | ||||||
|  | 		/* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ | ||||||
|  | 		.feature_bits	= FEATURE_WRSR_WREN | FEATURE_OTP, | ||||||
|  | 		.tested		= TEST_UNTESTED, | ||||||
|  | 		.probe		= probe_spi_rdid, | ||||||
|  | 		.probe_timing	= TIMING_ZERO, | ||||||
|  | 		.block_erasers	= | ||||||
|  | 		{ | ||||||
|  | 			{ | ||||||
|  | 				.eraseblocks = { {4 * 1024, 2048} }, | ||||||
|  | 				.block_erase = spi_block_erase_20, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {32 * 1024, 256} }, | ||||||
|  | 				.block_erase = spi_block_erase_52, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {64 * 1024, 128} }, | ||||||
|  | 				.block_erase = spi_block_erase_d8, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {8 * 1024 * 1024, 1} }, | ||||||
|  | 				.block_erase = spi_block_erase_60, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {8 * 1024 * 1024, 1} }, | ||||||
|  | 				.block_erase = spi_block_erase_c7, | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		.printlock	= spi_prettyprint_status_register_bp4_srwd, | ||||||
|  | 		.unlock		= spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */ | ||||||
|  | 		.write		= spi_chip_write_256, | ||||||
|  | 		.read		= spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ | ||||||
|  | 		.voltage	= {1695, 1950}, | ||||||
|  | 	}, | ||||||
|  |  | ||||||
|  | 	{ | ||||||
|  | 		.vendor		= "GigaDevice", | ||||||
|  | 		.name		= "GD25LQ128", | ||||||
|  | 		.bustype	= BUS_SPI, | ||||||
|  | 		.manufacture_id	= GIGADEVICE_ID, | ||||||
|  | 		.model_id	= GIGADEVICE_GD25LQ128, | ||||||
|  | 		.total_size	= 16384, | ||||||
|  | 		.page_size	= 256, | ||||||
|  | 		/* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */ | ||||||
|  | 		.feature_bits	= FEATURE_WRSR_WREN | FEATURE_OTP, | ||||||
|  | 		.tested		= TEST_UNTESTED, | ||||||
|  | 		.probe		= probe_spi_rdid, | ||||||
|  | 		.probe_timing	= TIMING_ZERO, | ||||||
|  | 		.block_erasers	= | ||||||
|  | 		{ | ||||||
|  | 			{ | ||||||
|  | 				.eraseblocks = { {4 * 1024, 4096} }, | ||||||
|  | 				.block_erase = spi_block_erase_20, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {32 * 1024, 512} }, | ||||||
|  | 				.block_erase = spi_block_erase_52, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {64 * 1024, 256} }, | ||||||
|  | 				.block_erase = spi_block_erase_d8, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {16 * 1024 * 1024, 1} }, | ||||||
|  | 				.block_erase = spi_block_erase_60, | ||||||
|  | 			}, { | ||||||
|  | 				.eraseblocks = { {16 * 1024 * 1024, 1} }, | ||||||
|  | 				.block_erase = spi_block_erase_c7, | ||||||
|  | 			} | ||||||
|  | 		}, | ||||||
|  | 		.printlock	= spi_prettyprint_status_register_bp4_srwd, | ||||||
|  | 		.unlock		= spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */ | ||||||
|  | 		.write		= spi_chip_write_256, | ||||||
|  | 		.read		= spi_chip_read, /* Fast read (0x0B) and multi I/O supported */ | ||||||
|  | 		.voltage	= {1695, 1950}, | ||||||
| 	}, | 	}, | ||||||
|  |  | ||||||
| 	{ | 	{ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user