flashchips.c 409 KB
Newer Older
1
/*
2
 * This file is part of the flashrom project.
3
 *
4 5
 * Copyright (C) 2000 Silicon Integrated System Corporation
 * Copyright (C) 2004 Tyan Corp
6
 * Copyright (C) 2005-2008 coresystems GmbH <stepan@openbios.org>
7
 * Copyright (C) 2006-2009 Carl-Daniel Hailfinger
8
 * Copyright (C) 2009 Sean Nelson <audiohacked@gmail.com>
9
 *
10 11 12 13
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
14
 *
15 16 17 18
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
19
 *
20 21
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
22
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
23 24 25
 */

#include "flash.h"
26
#include "flashchips.h"
27
#include "chipdrivers.h"
28

29
/**
30
 * List of supported flash chips.
31
 *
32 33
 * Please keep the list sorted by vendor name and chip family, so that the output of 'flashrom -L' is roughly
 * alphabetically sorted. Within families keep them in order of density.
34
 */
35
const struct flashchip flashchips[] = {
36

37 38 39 40 41 42 43 44 45 46 47
	/*
	 * .vendor		= Vendor name
	 * .name		= Chip name
	 * .bustype		= Supported flash bus types (Parallel, LPC...)
	 * .manufacture_id	= Manufacturer chip ID
	 * .model_id		= Model chip ID
	 * .total_size		= Total size in (binary) kbytes
	 * .page_size		= Page or eraseblock(?) size in bytes
	 * .tested		= Test status
	 * .probe		= Probe function
	 * .probe_timing	= Probe function delay
48 49 50 51 52
	 * .block_erasers[]	= Array of erase layouts and erase functions
	 * {
	 *	.eraseblocks[]	= Array of { blocksize, blockcount }
	 *	.block_erase	= Block erase function
	 * }
53 54
	 * .printlock		= Chip lock status function
	 * .unlock		= Chip unlock function
55 56
	 * .write		= Chip write function
	 * .read		= Chip read function
57
	 * .voltage		= Voltage range in millivolt
58 59
	 */

60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
	{
		.vendor		= "AMD",
		.name		= "Am29F010",
		.bustype	= BUS_PARALLEL,
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29F010,
		.total_size	= 128,
		.page_size	= 16 * 1024,
		.feature_bits	= FEATURE_SHORT_RESET,
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = { {16 * 1024, 8} },
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {128 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
		.voltage	= {4500, 5500},
	},

87 88 89
	{
		.vendor		= "AMD",
		.name		= "Am29F010A/B",
90
		.bustype	= BUS_PARALLEL,
91
		.manufacture_id	= AMD_ID,
92
		.model_id	= AMD_AM29F010,
93 94
		.total_size	= 128,
		.page_size	= 16 * 1024,
95
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
96
		.tested		= TEST_UNTESTED,
97
		.probe		= probe_jedec,
98
		.probe_timing	= TIMING_ZERO,
99 100 101 102
		.block_erasers	=
		{
			{
				.eraseblocks = { {16 * 1024, 8} },
103
				.block_erase = erase_sector_jedec,
104 105
			}, {
				.eraseblocks = { {128 * 1024, 1} },
106
				.block_erase = erase_chip_block_jedec,
107 108
			},
		},
109
		.write		= write_jedec_1,
110
		.read		= read_memmapped,
111
		.voltage	= {4500, 5500},
112 113
	},

114 115 116
	{
		.vendor		= "AMD",
		.name		= "Am29F002(N)BB",
117
		.bustype	= BUS_PARALLEL,
118
		.manufacture_id	= AMD_ID,
119
		.model_id	= AMD_AM29F002BB,
120 121
		.total_size	= 256,
		.page_size	= 256,
122
		.feature_bits	= FEATURE_SHORT_RESET | FEATURE_ADDR_2AA,
123 124
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
125
		.probe_timing	= TIMING_ZERO,
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
		.block_erasers	=
		{
			{
				.eraseblocks = {
					{16 * 1024, 1},
					{8 * 1024, 2},
					{32 * 1024, 1},
					{64 * 1024, 3},
				},
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {256 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
141
		.write		= write_jedec_1,
142
		.read		= read_memmapped,
143
		.voltage	= {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
144 145 146 147 148
	},

	{
		.vendor		= "AMD",
		.name		= "Am29F002(N)BT",
149
		.bustype	= BUS_PARALLEL,
150
		.manufacture_id	= AMD_ID,
151
		.model_id	= AMD_AM29F002BT,
152 153
		.total_size	= 256,
		.page_size	= 256,
154 155
		.feature_bits	= FEATURE_EITHER_RESET | FEATURE_ADDR_2AA,
		.tested		= TEST_UNTESTED,
156
		.probe		= probe_jedec,
157
		.probe_timing	= TIMING_ZERO,
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
		.block_erasers	=
		{
			{
				.eraseblocks = {
					{64 * 1024, 3},
					{32 * 1024, 1},
					{8 * 1024, 2},
					{16 * 1024, 1},
				},
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {256 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
173
		.write		= write_jedec_1,
174
		.read		= read_memmapped,
175
		.voltage	= {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
176 177 178 179 180
	},

	{
		.vendor		= "AMD",
		.name		= "Am29F016D",
181
		.bustype	= BUS_PARALLEL,
182
		.manufacture_id	= AMD_ID,
183
		.model_id	= AMD_AM29F016D,
184
		.total_size	= 2 * 1024,
185
		.page_size	= 64 * 1024,
186
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
187
		.tested		= TEST_UNTESTED,
188
		.probe		= probe_jedec,
189
		.probe_timing	= TIMING_ZERO,
190 191 192 193
		.block_erasers	=
		{
			{
				.eraseblocks = { {64 * 1024, 32} },
194
				.block_erase = erase_sector_jedec,
195 196
			}, {
				.eraseblocks = { {2048 * 1024, 1} },
197
				.block_erase = erase_chip_block_jedec,
198 199
			},
		},
200
		.write		= write_jedec_1,
201
		.read		= read_memmapped,
202
		.voltage	= {4500, 5500},
203 204
	},

205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
	{
		.vendor		= "AMD",
		.name		= "Am29F040",
		.bustype	= BUS_PARALLEL,
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29F040,
		.total_size	= 512,
		.page_size	= 64 * 1024,
		.feature_bits	= FEATURE_EITHER_RESET,
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = { {64 * 1024, 8} },
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {512 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
		.voltage	= {4500, 5500},
	},

232 233 234
	{
		.vendor		= "AMD",
		.name		= "Am29F040B",
235
		.bustype	= BUS_PARALLEL,
236
		.manufacture_id	= AMD_ID,
237
		.model_id	= AMD_AM29F040,
238 239
		.total_size	= 512,
		.page_size	= 64 * 1024,
240 241 242
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
243
		.probe_timing	= TIMING_ZERO,
244 245 246 247
		.block_erasers	=
		{
			{
				.eraseblocks = { {64 * 1024, 8} },
248
				.block_erase = erase_sector_jedec,
249 250
			}, {
				.eraseblocks = { {512 * 1024, 1} },
251
				.block_erase = erase_chip_block_jedec,
252 253
			},
		},
254
		.write		= write_jedec_1,
255
		.read		= read_memmapped,
256
		.voltage	= {4500, 5500},
257 258
	},

259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
	{
		.vendor		= "AMD",
		.name		= "Am29F080",
		.bustype	= BUS_PARALLEL,
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29F080,
		.total_size	= 1024,
		.page_size	= 64 * 1024,
		.feature_bits	= FEATURE_EITHER_RESET,
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = { {64 * 1024, 16} },
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {1024 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
		.voltage	= {4500, 5500},
	},

286 287 288
	{
		.vendor		= "AMD",
		.name		= "Am29F080B",
289
		.bustype	= BUS_PARALLEL,
290
		.manufacture_id	= AMD_ID,
291
		.model_id	= AMD_AM29F080,
292 293
		.total_size	= 1024,
		.page_size	= 64 * 1024,
294
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
295 296
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
297
		.probe_timing	= TIMING_ZERO,
298 299 300 301
		.block_erasers	=
		{
			{
				.eraseblocks = { {64 * 1024, 16} },
302
				.block_erase = erase_sector_jedec,
303 304
			}, {
				.eraseblocks = { {1024 * 1024, 1} },
305
				.block_erase = erase_chip_block_jedec,
306 307
			},
		},
308
		.write		= write_jedec_1,
309
		.read		= read_memmapped,
310
		.voltage	= {4500, 5500},
311 312
	},

313 314 315
	{
		.vendor		= "AMD",
		.name		= "Am29LV001BB",
316
		.bustype	= BUS_PARALLEL,
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29LV001BB,
		.total_size	= 128,
		.page_size	= 64 * 1024, /* unused */
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
		.tested		= TEST_OK_PREW,
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = {
					{8 * 1024, 1},
					{4 * 1024, 2},
					{16 * 1024, 7},
				},
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {128 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
341
		.voltage	= {3000, 3600}, /* 3.0-3.6V for type -45R, others 2.7-3.6V */
342 343 344 345 346
	},

	{
		.vendor		= "AMD",
		.name		= "Am29LV001BT",
347
		.bustype	= BUS_PARALLEL,
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29LV001BT,
		.total_size	= 128,
		.page_size	= 64 * 1024, /* unused */
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = {
					{16 * 1024, 7},
					{4 * 1024, 2},
					{8 * 1024, 1},
				},
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {128 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
372
		.voltage	= {3000, 3600}, /* 3.0-3.6V for type -45R, others 2.7-3.6V */
373 374 375 376 377
	},

	{
		.vendor		= "AMD",
		.name		= "Am29LV002BB",
378
		.bustype	= BUS_PARALLEL,
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29LV002BB,
		.total_size	= 256,
		.page_size	= 64 * 1024, /* unused */
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = {
					{16 * 1024, 1},
					{8 * 1024, 2},
					{32 * 1024, 1},
					{64 * 1024, 3},
				},
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {256 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
404
		.voltage	= {3000, 3600}, /* 3.0-3.6V for type -55, others 2.7-3.6V */
405 406 407 408 409
	},

	{
		.vendor		= "AMD",
		.name		= "Am29LV002BT",
410
		.bustype	= BUS_PARALLEL,
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29LV002BT,
		.total_size	= 256,
		.page_size	= 64 * 1024, /* unused */
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = {
					{64 * 1024, 3},
					{32 * 1024, 1},
					{8 * 1024, 2},
					{16 * 1024, 1},
				},
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {256 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
436
		.voltage	= {3000, 3600}, /* 3.0-3.6V for type -55, others 2.7-3.6V */
437 438 439 440 441
	},

	{
		.vendor		= "AMD",
		.name		= "Am29LV004BB",
442
		.bustype	= BUS_PARALLEL,
443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29LV004BB,
		.total_size	= 512,
		.page_size	= 64 * 1024, /* unused */
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = {
					{16 * 1024, 1},
					{8 * 1024, 2},
					{32 * 1024, 1},
					{64 * 1024, 7},
				},
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {512 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
468
		.voltage	= {2700, 3600},
469 470 471 472 473
	},

	{
		.vendor		= "AMD",
		.name		= "Am29LV004BT",
474
		.bustype	= BUS_PARALLEL,
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29LV004BT,
		.total_size	= 512,
		.page_size	= 64 * 1024, /* unused */
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = {
					{64 * 1024, 7},
					{32 * 1024, 1},
					{8 * 1024, 2},
					{16 * 1024, 1},
				},
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {512 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
500
		.voltage	= {2700, 3600},
501 502 503 504 505
	},

	{
		.vendor		= "AMD",
		.name		= "Am29LV008BB",
506
		.bustype	= BUS_PARALLEL,
507 508 509 510 511
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29LV008BB,
		.total_size	= 1024,
		.page_size	= 64 * 1024, /* unused */
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
512
		.tested		= TEST_OK_PREW,
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = {
					{16 * 1024, 1},
					{8 * 1024, 2},
					{32 * 1024, 1},
					{64 * 1024, 15},
				},
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {1024 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
532
		.voltage	= {3000, 3600} /* 3.0-3.6V for type -70R, others 2.7-3.6V */
533 534 535 536 537
	},

	{
		.vendor		= "AMD",
		.name		= "Am29LV008BT",
538
		.bustype	= BUS_PARALLEL,
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563
		.manufacture_id	= AMD_ID,
		.model_id	= AMD_AM29LV008BT,
		.total_size	= 1024,
		.page_size	= 64 * 1024, /* unused */
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
		.tested		= TEST_UNTESTED,
		.probe		= probe_jedec,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = {
					{64 * 1024, 15},
					{32 * 1024, 1},
					{8 * 1024, 2},
					{16 * 1024, 1},
				},
				.block_erase = erase_sector_jedec,
			}, {
				.eraseblocks = { {1024 * 1024, 1} },
				.block_erase = erase_chip_block_jedec,
			},
		},
		.write		= write_jedec_1,
		.read		= read_memmapped,
564
		.voltage	= {3000, 3600} /* 3.0-3.6V for type -70R, others 2.7-3.6V */
565 566
	},

567 568 569
	{
		.vendor		= "AMD",
		.name		= "Am29LV040B",
570
		.bustype	= BUS_PARALLEL,
571
		.manufacture_id	= AMD_ID,
572
		.model_id	= AMD_AM29LV040B,
573 574
		.total_size	= 512,
		.page_size	= 64 * 1024,
575
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
576
		.tested		= TEST_OK_PRE,
577
		.probe		= probe_jedec,
578
		.probe_timing	= TIMING_ZERO,
579 580 581 582
		.block_erasers	=
		{
			{
				.eraseblocks = { {64 * 1024, 8} },
583
				.block_erase = erase_sector_jedec,
584 585
			}, {
				.eraseblocks = { {512 * 1024, 1} },
586
				.block_erase = erase_chip_block_jedec,
587 588
			},
		},
589
		.write		= write_jedec_1,
590
		.read		= read_memmapped,
591
		.voltage	= {3000, 3600}, /* 3.0-3.6V for type -60R, others 2.7-3.6V*/
592 593
	},

594 595 596
	{
		.vendor		= "AMD",
		.name		= "Am29LV081B",
597
		.bustype	= BUS_PARALLEL,
598
		.manufacture_id	= AMD_ID,
599
		.model_id	= AMD_AM29LV080B,
600 601
		.total_size	= 1024,
		.page_size	= 64 * 1024,
602
		.feature_bits	= FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, /* datasheet specifies address as don't care */
603
		.tested		= TEST_UNTESTED,
604
		.probe		= probe_jedec,
605
		.probe_timing	= TIMING_ZERO,
606 607 608 609
		.block_erasers	=
		{
			{
				.eraseblocks = { {64 * 1024, 16} },
610
				.block_erase = erase_sector_jedec,
611 612
			}, {
				.eraseblocks = { {1024 * 1024, 1} },
613
				.block_erase = erase_chip_block_jedec,
614 615
			},
		},
616
		.write		= write_jedec_1,
617
		.read		= read_memmapped,
618
		.voltage	= {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
619 620
	},

621
	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
622 623
		.vendor		= "AMIC",
		.name		= "A25L05PT",
624
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
625 626 627 628
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L05PT,
		.total_size	= 64,
		.page_size	= 256,
629
		.feature_bits	= FEATURE_WRSR_WREN,
630
		.tested		= TEST_UNTESTED,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
631 632
		.probe		= probe_spi_rdid4,
		.probe_timing	= TIMING_ZERO,
633 634 635 636
		.block_erasers	=
		{
			{
				.eraseblocks = {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
637
					{32 * 1024, 1},
638
					{16 * 1024, 1},
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
639 640
					{8 * 1024, 1},
					{4 * 1024, 2},
641
				},
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
642
				.block_erase = spi_block_erase_d8,
643
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
644 645
				.eraseblocks = { {64 * 1024, 1} },
				.block_erase = spi_block_erase_c7,
646 647
			}
		},
648
		.printlock	= spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
649 650 651
		.unlock		= spi_disable_blockprotect,
		.write		= spi_chip_write_256,
		.read		= spi_chip_read,
652
		.voltage	= {2700, 3600},
653 654 655
	},

	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
656 657
		.vendor		= "AMIC",
		.name		= "A25L05PU",
658
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
659 660 661
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L05PU,
		.total_size	= 64,
662
		.page_size	= 256,
663
		.feature_bits	= FEATURE_WRSR_WREN,
664
		.tested		= TEST_UNTESTED,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
665
		.probe		= probe_spi_rdid4,
666
		.probe_timing	= TIMING_ZERO,
667 668 669
		.block_erasers	=
		{
			{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
670 671 672 673 674 675
				.eraseblocks = {
					{4 * 1024, 2},
					{8 * 1024, 1},
					{16 * 1024, 1},
					{32 * 1024, 1},
				},
676 677
				.block_erase = spi_block_erase_d8,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
678
				.eraseblocks = { {64 * 1024, 1} },
679 680 681
				.block_erase = spi_block_erase_c7,
			}
		},
682
		.printlock	= spi_prettyprint_status_register_bp1_srwd,
683
		.unlock		= spi_disable_blockprotect,
684
		.write		= spi_chip_write_256,
685
		.read		= spi_chip_read,
686
		.voltage	= {2700, 3600},
687 688 689
	},

	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
690 691
		.vendor		= "AMIC",
		.name		= "A25L10PT",
692
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
693 694 695
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L10PT,
		.total_size	= 128,
696
		.page_size	= 256,
697
		.feature_bits	= FEATURE_WRSR_WREN,
698
		.tested		= TEST_UNTESTED,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
699
		.probe		= probe_spi_rdid4,
700
		.probe_timing	= TIMING_ZERO,
701 702 703
		.block_erasers	=
		{
			{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
704 705 706 707 708 709 710
				.eraseblocks = {
					{64 * 1024, 1},
					{32 * 1024, 1},
					{16 * 1024, 1},
					{8 * 1024, 1},
					{4 * 1024, 2},
				},
711 712
				.block_erase = spi_block_erase_d8,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
713
				.eraseblocks = { {128 * 1024, 1} },
714 715 716
				.block_erase = spi_block_erase_c7,
			}
		},
717
		.printlock	= spi_prettyprint_status_register_bp1_srwd,
718
		.unlock		= spi_disable_blockprotect,
719
		.write		= spi_chip_write_256,
720
		.read		= spi_chip_read,
721
		.voltage	= {2700, 3600},
722 723 724
	},

	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
725 726
		.vendor		= "AMIC",
		.name		= "A25L10PU",
727
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
728 729 730
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L10PU,
		.total_size	= 128,
731
		.page_size	= 256,
732
		.feature_bits	= FEATURE_WRSR_WREN,
733
		.tested		= TEST_UNTESTED,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
734
		.probe		= probe_spi_rdid4,
735
		.probe_timing	= TIMING_ZERO,
736 737 738
		.block_erasers	=
		{
			{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
739 740 741 742 743 744 745
				.eraseblocks = {
					{4 * 1024, 2},
					{8 * 1024, 1},
					{16 * 1024, 1},
					{32 * 1024, 1},
					{64 * 1024, 1},
				},
746 747
				.block_erase = spi_block_erase_d8,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
748
				.eraseblocks = { {128 * 1024, 1} },
749 750 751
				.block_erase = spi_block_erase_c7,
			}
		},
752
		.printlock	= spi_prettyprint_status_register_bp1_srwd,
753
		.unlock		= spi_disable_blockprotect,
754
		.write		= spi_chip_write_256,
755
		.read		= spi_chip_read,
756
		.voltage	= {2700, 3600},
757 758 759
	},

	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
760 761
		.vendor		= "AMIC",
		.name		= "A25L20PT",
762
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
763 764 765
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L20PT,
		.total_size	= 256,
766
		.page_size	= 256,
767
		.feature_bits	= FEATURE_WRSR_WREN,
768
		.tested		= TEST_UNTESTED,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
769
		.probe		= probe_spi_rdid4,
770
		.probe_timing	= TIMING_ZERO,
771 772 773
		.block_erasers	=
		{
			{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
774 775 776 777 778 779 780
				.eraseblocks = {
					{64 * 1024, 3},
					{32 * 1024, 1},
					{16 * 1024, 1},
					{8 * 1024, 1},
					{4 * 1024, 2},
				},
781 782
				.block_erase = spi_block_erase_d8,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
783
				.eraseblocks = { {256 * 1024, 1} },
784 785 786
				.block_erase = spi_block_erase_c7,
			}
		},
787
		.printlock	= spi_prettyprint_status_register_bp1_srwd,
788
		.unlock		= spi_disable_blockprotect,
789
		.write		= spi_chip_write_256,
790
		.read		= spi_chip_read,
791
		.voltage	= {2700, 3600},
792 793 794
	},

	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
795 796
		.vendor		= "AMIC",
		.name		= "A25L20PU",
797
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
798 799 800
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L20PU,
		.total_size	= 256,
801
		.page_size	= 256,
802
		.feature_bits	= FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
803 804
		.tested		= TEST_UNTESTED,
		.probe		= probe_spi_rdid4,
805
		.probe_timing	= TIMING_ZERO,
806 807 808
		.block_erasers	=
		{
			{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
809 810 811 812 813 814 815
				.eraseblocks = {
					{4 * 1024, 2},
					{8 * 1024, 1},
					{16 * 1024, 1},
					{32 * 1024, 1},
					{64 * 1024, 3},
				},
816 817
				.block_erase = spi_block_erase_d8,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
818
				.eraseblocks = { {256 * 1024, 1} },
819 820 821
				.block_erase = spi_block_erase_c7,
			}
		},
822
		.printlock	= spi_prettyprint_status_register_bp1_srwd,
823
		.unlock		= spi_disable_blockprotect,
824
		.write		= spi_chip_write_256,
825
		.read		= spi_chip_read,
826
		.voltage	= {2700, 3600},
827 828
	},

Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
829 830 831 832 833
	/* The A25L40P{T,U} chips are distinguished by their
	 * erase block layouts, but without any distinction in RDID.
	 * This inexplicable quirk was verified by Rudolf Marek
	 * and discussed on the flashrom mailing list on 2010-07-12.
	 */
834
	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
835 836
		.vendor		= "AMIC",
		.name		= "A25L40PT",
837
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
838 839 840
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L40PT,
		.total_size	= 512,
841
		.page_size	= 256,
842
		.feature_bits	= FEATURE_WRSR_WREN,
843
		.tested		= TEST_OK_PR,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
844
		.probe		= probe_spi_rdid4,
845
		.probe_timing	= TIMING_ZERO,
846 847 848
		.block_erasers	=
		{
			{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
849 850 851 852 853 854 855
				.eraseblocks = {
					{64 * 1024, 7},
					{32 * 1024, 1},
					{16 * 1024, 1},
					{8 * 1024, 1},
					{4 * 1024, 2},
				},
856 857
				.block_erase = spi_block_erase_d8,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
858
				.eraseblocks = { {512 * 1024, 1} },
859 860 861
				.block_erase = spi_block_erase_c7,
			}
		},
862
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
863
		.unlock		= spi_disable_blockprotect,
864
		.write		= spi_chip_write_256,
865
		.read		= spi_chip_read,
866
		.voltage	= {2700, 3600},
867 868 869
	},

	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
870 871
		.vendor		= "AMIC",
		.name		= "A25L40PU",
872
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
873 874 875
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L40PU,
		.total_size	= 512,
876
		.page_size	= 256,
877
		.feature_bits	= FEATURE_WRSR_WREN,
878
		.tested		= TEST_OK_PR,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
879
		.probe		= probe_spi_rdid4,
880
		.probe_timing	= TIMING_ZERO,
881 882 883
		.block_erasers	=
		{
			{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
884 885 886 887 888 889 890 891
				.eraseblocks = {
					{4 * 1024, 2},
					{8 * 1024, 1},
					{16 * 1024, 1},
					{32 * 1024, 1},
					{64 * 1024, 7},
				},
				.block_erase = spi_block_erase_d8,
892
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
893
				.eraseblocks = { {512 * 1024, 1} },
894 895 896
				.block_erase = spi_block_erase_c7,
			}
		},
897
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
898
		.unlock		= spi_disable_blockprotect,
899
		.write		= spi_chip_write_256,
900
		.read		= spi_chip_read,
901
		.voltage	= {2700, 3600},
902 903 904
	},

	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
905 906
		.vendor		= "AMIC",
		.name		= "A25L80P",
907
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
908 909 910
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L80P,
		.total_size	= 1024,
911
		.page_size	= 256,
912
		.feature_bits	= FEATURE_WRSR_WREN,
913
		.tested		= TEST_OK_PRE,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
914
		.probe		= probe_spi_rdid4,
915
		.probe_timing	= TIMING_ZERO,
916 917 918
		.block_erasers	=
		{
			{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
919 920 921 922 923 924 925
				.eraseblocks = {
					{4 * 1024, 2},
					{8 * 1024, 1},
					{16 * 1024, 1},
					{32 * 1024, 1},
					{64 * 1024, 15},
				},
926 927
				.block_erase = spi_block_erase_d8,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
928
				.eraseblocks = { {1024 * 1024, 1} },
929 930 931
				.block_erase = spi_block_erase_c7,
			}
		},
932
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
933
		.unlock		= spi_disable_blockprotect,
934
		.write		= spi_chip_write_256,
935
		.read		= spi_chip_read,
936
		.voltage	= {2700, 3600},
937 938 939
	},

	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
940 941
		.vendor		= "AMIC",
		.name		= "A25L16PT",
942
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
943 944 945
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L16PT,
		.total_size	= 2048,
946
		.page_size	= 256,
947
		.feature_bits	= FEATURE_WRSR_WREN,
948
		.tested		= TEST_UNTESTED,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
949
		.probe		= probe_spi_rdid4,
950
		.probe_timing	= TIMING_ZERO,
951 952 953
		.block_erasers	=
		{
			{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
954 955 956 957 958 959 960
				.eraseblocks = {
					{64 * 1024, 31},
					{32 * 1024, 1},
					{16 * 1024, 1},
					{8 * 1024, 1},
					{4 * 1024, 2},
				},
961 962
				.block_erase = spi_block_erase_d8,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
963
				.eraseblocks = { {2048 * 1024, 1} },
964 965
				.block_erase = spi_block_erase_60,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
966
				.eraseblocks = { {2048 * 1024, 1} },
967 968 969
				.block_erase = spi_block_erase_c7,
			}
		},
970
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
971
		.unlock		= spi_disable_blockprotect,
972
		.write		= spi_chip_write_256,
973
		.read		= spi_chip_read,
974
		.voltage	= {2700, 3600},
975 976 977
	},

	{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
978 979
		.vendor		= "AMIC",
		.name		= "A25L16PU",
980
		.bustype	= BUS_SPI,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
981 982 983
		.manufacture_id	= AMIC_ID,
		.model_id	= AMIC_A25L16PU,
		.total_size	= 2048,
984
		.page_size	= 256,
985
		.feature_bits	= FEATURE_WRSR_WREN,
986
		.tested		= TEST_OK_PR,
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
987
		.probe		= probe_spi_rdid4,
988
		.probe_timing	= TIMING_ZERO,
989 990 991
		.block_erasers	=
		{
			{
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
992 993 994 995 996 997 998
				.eraseblocks = {
					{4 * 1024, 2},
					{8 * 1024, 1},
					{16 * 1024, 1},
					{32 * 1024, 1},
					{64 * 1024, 31},
				},
999 1000
				.block_erase = spi_block_erase_d8,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
1001
				.eraseblocks = { {2048 * 1024, 1} },
1002 1003
				.block_erase = spi_block_erase_60,
			}, {
Carl-Daniel Hailfinger's avatar
Carl-Daniel Hailfinger committed
1004
				.eraseblocks = { {2048 * 1024, 1} },
1005 1006 1007
				.block_erase = spi_block_erase_c7,
			}
		},
1008
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
1009
		.unlock		= spi_disable_blockprotect,
1010
		.write		= spi_chip_write_256,
1011
		.read		= spi_chip_read,
1012
		.voltage	= {2700, 3600},
1013 1014
	},

1015 1016 1017
	{
		.vendor		= "AMIC",
		.name		= "A25L512",
1018
		.bustype	= BUS_SPI,
1019 1020 1021 1022
		.manufacture_id	= AMIC_ID_NOPREFIX,
		.model_id	= AMIC_A25L512,
		.total_size	= 64,
		.page_size	= 256,
1023
		.feature_bits	= FEATURE_WRSR_WREN,
1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037
		.tested		= TEST_UNTESTED,
		.probe		= probe_spi_rdid,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = { { 4 * 1024, 16 } },
				.block_erase = spi_block_erase_20,
			}, {
				.eraseblocks = { { 64 * 1024, 1 } },
				.block_erase = spi_block_erase_d8,
			}, {
				.eraseblocks = { { 64 * 1024, 1 } },
				.block_erase = spi_block_erase_c7,
1038
			}
1039
		},
1040
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
1041 1042 1043
		.unlock		= spi_disable_blockprotect,
		.write		= spi_chip_write_256,
		.read		= spi_chip_read,
1044
		.voltage	= {2700, 3600},
1045 1046 1047 1048 1049
	},

	{
		.vendor		= "AMIC",
		.name		= "A25L010",
1050
		.bustype	= BUS_SPI,
1051 1052 1053 1054
		.manufacture_id	= AMIC_ID_NOPREFIX,
		.model_id	= AMIC_A25L010,
		.total_size	= 128,
		.page_size	= 256,
1055
		.feature_bits	= FEATURE_WRSR_WREN,
1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069
		.tested		= TEST_UNTESTED,
		.probe		= probe_spi_rdid,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = { { 4 * 1024, 32 } },
				.block_erase = spi_block_erase_20,
			}, {
				.eraseblocks = { { 64 * 1024, 2 } },
				.block_erase = spi_block_erase_d8,
			}, {
				.eraseblocks = { { 128 * 1024, 1 } },
				.block_erase = spi_block_erase_c7,
1070
			}
1071
		},
1072
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
1073 1074 1075
		.unlock		= spi_disable_blockprotect,
		.write		= spi_chip_write_256,
		.read		= spi_chip_read,
1076
		.voltage	= {2700, 3600},
1077 1078 1079 1080 1081
	},

	{
		.vendor		= "AMIC",
		.name		= "A25L020",
1082
		.bustype	= BUS_SPI,
1083 1084 1085 1086
		.manufacture_id	= AMIC_ID_NOPREFIX,
		.model_id	= AMIC_A25L020,
		.total_size	= 256,
		.page_size	= 256,
1087
		.feature_bits	= FEATURE_WRSR_WREN,
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101
		.tested		= TEST_UNTESTED,
		.probe		= probe_spi_rdid,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = { { 4 * 1024, 64 } },
				.block_erase = spi_block_erase_20,
			}, {
				.eraseblocks = { { 64 * 1024, 4 } },
				.block_erase = spi_block_erase_d8,
			}, {
				.eraseblocks = { { 256 * 1024, 1 } },
				.block_erase = spi_block_erase_c7,
1102
			}
1103
		},
1104
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
1105 1106 1107
		.unlock		= spi_disable_blockprotect,
		.write		= spi_chip_write_256,
		.read		= spi_chip_read,
1108
		.voltage	= {2700, 3600},
1109 1110 1111 1112 1113
	},

	{
		.vendor		= "AMIC",
		.name		= "A25L040",
1114
		.bustype	= BUS_SPI,
1115 1116 1117 1118
		.manufacture_id	= AMIC_ID_NOPREFIX,
		.model_id	= AMIC_A25L040,
		.total_size	= 512,
		.page_size	= 256,
1119
		.feature_bits	= FEATURE_WRSR_WREN,
1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133
		.tested		= TEST_UNTESTED,
		.probe		= probe_spi_rdid,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = { { 4 * 1024, 128 } },
				.block_erase = spi_block_erase_20,
			}, {
				.eraseblocks = { { 64 * 1024, 8 } },
				.block_erase = spi_block_erase_d8,
			}, {
				.eraseblocks = { { 512 * 1024, 1 } },
				.block_erase = spi_block_erase_c7,
1134
			}
1135
		},
1136
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
1137 1138 1139
		.unlock		= spi_disable_blockprotect,
		.write		= spi_chip_write_256,
		.read		= spi_chip_read,
1140
		.voltage	= {2700, 3600},
1141 1142 1143 1144 1145
	},

	{
		.vendor		= "AMIC",
		.name		= "A25L080",
1146
		.bustype	= BUS_SPI,
1147 1148 1149 1150
		.manufacture_id	= AMIC_ID_NOPREFIX,
		.model_id	= AMIC_A25L080,
		.total_size	= 1024,
		.page_size	= 256,
1151
		.feature_bits	= FEATURE_WRSR_WREN,
1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165
		.tested		= TEST_UNTESTED,
		.probe		= probe_spi_rdid,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = { { 4 * 1024, 256 } },
				.block_erase = spi_block_erase_20,
			}, {
				.eraseblocks = { { 64 * 1024, 16 } },
				.block_erase = spi_block_erase_d8,
			}, {
				.eraseblocks = { { 1024 * 1024, 1 } },
				.block_erase = spi_block_erase_c7,
1166
			}
1167
		},
1168
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
1169 1170 1171
		.unlock		= spi_disable_blockprotect,
		.write		= spi_chip_write_256,
		.read		= spi_chip_read,
1172
		.voltage	= {2700, 3600},
1173 1174 1175 1176 1177
	},

	{
		.vendor		= "AMIC",
		.name		= "A25L016",
1178
		.bustype	= BUS_SPI,
1179 1180 1181 1182
		.manufacture_id	= AMIC_ID_NOPREFIX,
		.model_id	= AMIC_A25L016,
		.total_size	= 2048,
		.page_size	= 256,
1183
		.feature_bits	= FEATURE_WRSR_WREN,
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197
		.tested		= TEST_UNTESTED,
		.probe		= probe_spi_rdid,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = { { 4 * 1024, 512 } },
				.block_erase = spi_block_erase_20,
			}, {
				.eraseblocks = { { 64 * 1024, 32 } },
				.block_erase = spi_block_erase_d8,
			}, {
				.eraseblocks = { { 2048 * 1024, 1 } },
				.block_erase = spi_block_erase_c7,
1198
			}
1199
		},
1200
		.printlock	= spi_prettyprint_status_register_bp2_srwd,
1201 1202 1203
		.unlock		= spi_disable_blockprotect,
		.write		= spi_chip_write_256,
		.read		= spi_chip_read,
1204
		.voltage	= {2700, 3600},
1205 1206 1207 1208 1209
	},

	{
		.vendor		= "AMIC",
		.name		= "A25L032",
1210
		.bustype	= BUS_SPI,
1211 1212 1213 1214
		.manufacture_id	= AMIC_ID_NOPREFIX,
		.model_id	= AMIC_A25L032,
		.total_size	= 4096,
		.page_size	= 256,
1215 1216
		/* OTP: 64B total; read 0x4B, 0x48; write 0x42 */
		.feature_bits	= FEATURE_WRSR_WREN | FEATURE_OTP,
1217
		.tested		= TEST_OK_PREW,
1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236
		.probe		= probe_spi_rdid,
		.probe_timing	= TIMING_ZERO,
		.block_erasers	=
		{
			{
				.eraseblocks = { { 4 * 1024, 1024 } },
				.block_erase = spi_block_erase_20,
			}, {
				.eraseblocks = { { 64 * 1024, 64 } },
				.block_erase = spi_block_erase_52,
			}, {
				.eraseblocks = { { 64 * 1024, 64 } },
				.block_erase = spi_block_erase_d8,
			}, {
				.eraseblocks = { { 4096 * 1024, 1 } },
				.block_erase = spi_block_erase_60,
			}, {
				.eraseblocks = { { 4096 * 1024, 1 } },
				.block_erase = spi_block_erase_c7,
1237
			}
1238
		},
1239 1240
		.printlock	= spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
		.unlock		= spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
1241 1242
		.write		= spi_chip_write_256,
		.read		= spi_chip_read,
1243
		.voltage	= {2700, 3600},
1244 1245 1246 1247
	},

	{
		.vendor		= "AMIC",
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262