blob: 8275ea60ecd7ff5d8479f4ee4dc4286ccd3afbd2 [file] [log] [blame]
Ollie Lho184a4042005-11-26 21:55:36 +00001/*
Uwe Hermannd1107642007-08-29 17:52:32 +00002 * This file is part of the flashrom project.
Ollie Lho184a4042005-11-26 21:55:36 +00003 *
Uwe Hermannd22a1d42007-09-09 20:21:05 +00004 * Copyright (C) 2000 Silicon Integrated System Corporation
5 * Copyright (C) 2004 Tyan Corp
Stefan Reinauer4c390c82008-07-02 13:33:09 +00006 * Copyright (C) 2005-2008 coresystems GmbH <stepan@openbios.org>
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00007 * Copyright (C) 2006-2009 Carl-Daniel Hailfinger
Sean Nelsonc57a9202010-01-04 17:15:23 +00008 * Copyright (C) 2009 Sean Nelson <audiohacked@gmail.com>
Uwe Hermannd1107642007-08-29 17:52:32 +00009 *
Stefan Reinauerce532972007-05-23 17:20:56 +000010 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
Ollie Lho184a4042005-11-26 21:55:36 +000014 *
Stefan Reinauerce532972007-05-23 17:20:56 +000015 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
Ollie Lho184a4042005-11-26 21:55:36 +000019 */
20
21#include "flash.h"
Carl-Daniel Hailfinger08454642009-06-15 14:14:48 +000022#include "flashchips.h"
Sean Nelson14ba6682010-02-26 05:48:29 +000023#include "chipdrivers.h"
Nico Huberaabb3e02023-01-13 00:22:30 +010024#include "writeprotect.h"
Ollie Lho184a4042005-11-26 21:55:36 +000025
Uwe Hermannfc425e82008-03-16 02:06:25 +000026/**
Uwe Hermanna9720402009-05-21 15:55:46 +000027 * List of supported flash chips.
Uwe Hermannfc425e82008-03-16 02:06:25 +000028 *
Alan Green1f9cc7d2019-07-01 11:10:45 +100029 * Temporarily, this file is sorted alphabetically by vendor and name to
Nico Huberc3b02dc2023-08-12 01:13:45 +020030 * assist with merging the Chromium fork of flashprog.
Alan Green1f9cc7d2019-07-01 11:10:45 +100031 *
32 * The usual intention is that that this list is sorted by vendor, then chip
Nico Huberc3b02dc2023-08-12 01:13:45 +020033 * family and chip density, which is useful for the output of 'flashprog -L'.
Uwe Hermannfc425e82008-03-16 02:06:25 +000034 */
Carl-Daniel Hailfinger4c823182011-05-04 00:39:50 +000035const struct flashchip flashchips[] = {
Uwe Hermannfc425e82008-03-16 02:06:25 +000036
Carl-Daniel Hailfinger21eedec2009-07-23 12:42:01 +000037 /*
38 * .vendor = Vendor name
39 * .name = Chip name
40 * .bustype = Supported flash bus types (Parallel, LPC...)
41 * .manufacture_id = Manufacturer chip ID
42 * .model_id = Model chip ID
43 * .total_size = Total size in (binary) kbytes
44 * .page_size = Page or eraseblock(?) size in bytes
45 * .tested = Test status
46 * .probe = Probe function
47 * .probe_timing = Probe function delay
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000048 * .block_erasers[] = Array of erase layouts and erase functions
49 * {
50 * .eraseblocks[] = Array of { blocksize, blockcount }
51 * .block_erase = Block erase function
52 * }
Sean Nelson6e0b9122010-02-19 00:52:10 +000053 * .printlock = Chip lock status function
54 * .unlock = Chip unlock function
Carl-Daniel Hailfinger21eedec2009-07-23 12:42:01 +000055 * .write = Chip write function
56 * .read = Chip read function
Steven Zakuleccbe370e2011-06-03 07:26:31 +000057 * .voltage = Voltage range in millivolt
FENG yu ningff692fb2008-12-08 18:15:10 +000058 */
59
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000060 {
61 .vendor = "AMD",
62 .name = "Am29F002(N)BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000063 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000064 .manufacture_id = AMD_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000065 .model_id = AMD_AM29F002BB,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000066 .total_size = 256,
67 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000068 .feature_bits = FEATURE_SHORT_RESET | FEATURE_ADDR_2AA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000069 .tested = TEST_UNTESTED,
70 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000071 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +000072 .block_erasers =
73 {
74 {
75 .eraseblocks = {
76 {16 * 1024, 1},
77 {8 * 1024, 2},
78 {32 * 1024, 1},
79 {64 * 1024, 3},
80 },
81 .block_erase = erase_sector_jedec,
82 }, {
83 .eraseblocks = { {256 * 1024, 1} },
84 .block_erase = erase_chip_block_jedec,
85 },
86 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000087 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000088 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000089 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010090 .prepare_access = prepare_memory_access,
91 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000092 },
93
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000094 {
95 .vendor = "AMD",
96 .name = "Am29F002(N)BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000097 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000098 .manufacture_id = AMD_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000099 .model_id = AMD_AM29F002BT,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000100 .total_size = 256,
101 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +0000102 .feature_bits = FEATURE_EITHER_RESET | FEATURE_ADDR_2AA,
103 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000104 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +0000105 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000106 .block_erasers =
107 {
108 {
109 .eraseblocks = {
110 {64 * 1024, 3},
111 {32 * 1024, 1},
112 {8 * 1024, 2},
113 {16 * 1024, 1},
114 },
115 .block_erase = erase_sector_jedec,
116 }, {
117 .eraseblocks = { {256 * 1024, 1} },
118 .block_erase = erase_chip_block_jedec,
119 },
120 },
Michael Karcher1c296ca2009-11-27 17:49:42 +0000121 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000122 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000123 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +0100124 .prepare_access = prepare_memory_access,
125 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +0000126 },
127
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000128 {
129 .vendor = "AMD",
Alan Green1f9cc7d2019-07-01 11:10:45 +1000130 .name = "Am29F010",
131 .bustype = BUS_PARALLEL,
132 .manufacture_id = AMD_ID,
133 .model_id = AMD_AM29F010,
134 .total_size = 128,
135 .page_size = 16 * 1024,
136 .feature_bits = FEATURE_SHORT_RESET,
137 .tested = TEST_UNTESTED,
138 .probe = probe_jedec,
139 .probe_timing = TIMING_ZERO,
140 .block_erasers =
141 {
142 {
143 .eraseblocks = { {16 * 1024, 8} },
144 .block_erase = erase_sector_jedec,
145 }, {
146 .eraseblocks = { {128 * 1024, 1} },
147 .block_erase = erase_chip_block_jedec,
148 },
149 },
150 .write = write_jedec_1,
151 .read = read_memmapped,
152 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100153 .prepare_access = prepare_memory_access,
154 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000155 },
156
157 {
158 .vendor = "AMD",
159 .name = "Am29F010A/B",
160 .bustype = BUS_PARALLEL,
161 .manufacture_id = AMD_ID,
162 .model_id = AMD_AM29F010,
163 .total_size = 128,
164 .page_size = 16 * 1024,
165 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Alan Greena4e579f2019-07-24 14:18:39 +1000166 .tested = TEST_OK_PRE,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000167 .probe = probe_jedec,
168 .probe_timing = TIMING_ZERO,
169 .block_erasers =
170 {
171 {
172 .eraseblocks = { {16 * 1024, 8} },
173 .block_erase = erase_sector_jedec,
174 }, {
175 .eraseblocks = { {128 * 1024, 1} },
176 .block_erase = erase_chip_block_jedec,
177 },
178 },
179 .write = write_jedec_1,
180 .read = read_memmapped,
181 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100182 .prepare_access = prepare_memory_access,
183 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +1000184 },
185
186 {
187 .vendor = "AMD",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000188 .name = "Am29F016D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000189 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000190 .manufacture_id = AMD_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +0000191 .model_id = AMD_AM29F016D,
Sean Nelson72a9a022009-12-22 22:15:33 +0000192 .total_size = 2 * 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000193 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +0000194 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000195 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +0000196 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +0000197 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000198 .block_erasers =
199 {
200 {
201 .eraseblocks = { {64 * 1024, 32} },
Sean Nelson35727f72010-01-28 23:55:12 +0000202 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000203 }, {
204 .eraseblocks = { {2048 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +0000205 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000206 },
207 },
Sean Nelson35727f72010-01-28 23:55:12 +0000208 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000209 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000210 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100211 .prepare_access = prepare_memory_access,
212 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +0000213 },
214
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000215 {
216 .vendor = "AMD",
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000217 .name = "Am29F040",
218 .bustype = BUS_PARALLEL,
219 .manufacture_id = AMD_ID,
220 .model_id = AMD_AM29F040,
221 .total_size = 512,
222 .page_size = 64 * 1024,
223 .feature_bits = FEATURE_EITHER_RESET,
224 .tested = TEST_UNTESTED,
225 .probe = probe_jedec,
226 .probe_timing = TIMING_ZERO,
227 .block_erasers =
228 {
229 {
230 .eraseblocks = { {64 * 1024, 8} },
231 .block_erase = erase_sector_jedec,
232 }, {
233 .eraseblocks = { {512 * 1024, 1} },
234 .block_erase = erase_chip_block_jedec,
235 },
236 },
237 .write = write_jedec_1,
238 .read = read_memmapped,
239 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100240 .prepare_access = prepare_memory_access,
241 .finish_access = finish_memory_access,
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000242 },
243
244 {
245 .vendor = "AMD",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000246 .name = "Am29F040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000247 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000248 .manufacture_id = AMD_ID,
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000249 .model_id = AMD_AM29F040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000250 .total_size = 512,
251 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +0000252 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
253 .tested = TEST_UNTESTED,
254 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +0000255 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000256 .block_erasers =
257 {
258 {
259 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +0000260 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000261 }, {
262 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +0000263 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000264 },
265 },
Sean Nelson35727f72010-01-28 23:55:12 +0000266 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000267 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000268 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100269 .prepare_access = prepare_memory_access,
270 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +0000271 },
272
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000273 {
274 .vendor = "AMD",
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000275 .name = "Am29F080",
276 .bustype = BUS_PARALLEL,
277 .manufacture_id = AMD_ID,
278 .model_id = AMD_AM29F080,
279 .total_size = 1024,
280 .page_size = 64 * 1024,
281 .feature_bits = FEATURE_EITHER_RESET,
282 .tested = TEST_UNTESTED,
283 .probe = probe_jedec,
284 .probe_timing = TIMING_ZERO,
285 .block_erasers =
286 {
287 {
288 .eraseblocks = { {64 * 1024, 16} },
289 .block_erase = erase_sector_jedec,
290 }, {
291 .eraseblocks = { {1024 * 1024, 1} },
292 .block_erase = erase_chip_block_jedec,
293 },
294 },
295 .write = write_jedec_1,
296 .read = read_memmapped,
297 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100298 .prepare_access = prepare_memory_access,
299 .finish_access = finish_memory_access,
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000300 },
301
302 {
303 .vendor = "AMD",
Peter Stuge8440cc02009-01-25 23:55:12 +0000304 .name = "Am29F080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000305 .bustype = BUS_PARALLEL,
Mateusz Murawski5bae4382009-06-02 00:38:14 +0000306 .manufacture_id = AMD_ID,
Stefan Taunerd1ca1e82016-01-31 23:17:35 +0000307 .model_id = AMD_AM29F080,
Peter Stuge8440cc02009-01-25 23:55:12 +0000308 .total_size = 1024,
309 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +0000310 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Peter Stuge8440cc02009-01-25 23:55:12 +0000311 .tested = TEST_UNTESTED,
312 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +0000313 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000314 .block_erasers =
315 {
316 {
317 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson35727f72010-01-28 23:55:12 +0000318 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000319 }, {
320 .eraseblocks = { {1024 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +0000321 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000322 },
323 },
Sean Nelson35727f72010-01-28 23:55:12 +0000324 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000325 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000326 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +0100327 .prepare_access = prepare_memory_access,
328 .finish_access = finish_memory_access,
Peter Stuge8440cc02009-01-25 23:55:12 +0000329 },
330
331 {
332 .vendor = "AMD",
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000333 .name = "Am29LV001BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000334 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000335 .manufacture_id = AMD_ID,
336 .model_id = AMD_AM29LV001BB,
337 .total_size = 128,
338 .page_size = 64 * 1024, /* unused */
339 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
340 .tested = TEST_OK_PREW,
341 .probe = probe_jedec,
342 .probe_timing = TIMING_ZERO,
343 .block_erasers =
344 {
345 {
346 .eraseblocks = {
347 {8 * 1024, 1},
348 {4 * 1024, 2},
349 {16 * 1024, 7},
350 },
351 .block_erase = erase_sector_jedec,
352 }, {
353 .eraseblocks = { {128 * 1024, 1} },
354 .block_erase = erase_chip_block_jedec,
355 },
356 },
357 .write = write_jedec_1,
358 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000359 .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100360 .prepare_access = prepare_memory_access,
361 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000362 },
363
364 {
365 .vendor = "AMD",
366 .name = "Am29LV001BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000367 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000368 .manufacture_id = AMD_ID,
369 .model_id = AMD_AM29LV001BT,
370 .total_size = 128,
371 .page_size = 64 * 1024, /* unused */
372 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
373 .tested = TEST_UNTESTED,
374 .probe = probe_jedec,
375 .probe_timing = TIMING_ZERO,
376 .block_erasers =
377 {
378 {
379 .eraseblocks = {
380 {16 * 1024, 7},
381 {4 * 1024, 2},
382 {8 * 1024, 1},
383 },
384 .block_erase = erase_sector_jedec,
385 }, {
386 .eraseblocks = { {128 * 1024, 1} },
387 .block_erase = erase_chip_block_jedec,
388 },
389 },
390 .write = write_jedec_1,
391 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000392 .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100393 .prepare_access = prepare_memory_access,
394 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000395 },
396
397 {
398 .vendor = "AMD",
399 .name = "Am29LV002BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000400 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000401 .manufacture_id = AMD_ID,
402 .model_id = AMD_AM29LV002BB,
403 .total_size = 256,
404 .page_size = 64 * 1024, /* unused */
405 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
406 .tested = TEST_UNTESTED,
407 .probe = probe_jedec,
408 .probe_timing = TIMING_ZERO,
409 .block_erasers =
410 {
411 {
412 .eraseblocks = {
413 {16 * 1024, 1},
414 {8 * 1024, 2},
415 {32 * 1024, 1},
416 {64 * 1024, 3},
417 },
418 .block_erase = erase_sector_jedec,
419 }, {
420 .eraseblocks = { {256 * 1024, 1} },
421 .block_erase = erase_chip_block_jedec,
422 },
423 },
424 .write = write_jedec_1,
425 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000426 .voltage = {3000, 3600}, /* 3.0-3.6V for type -55, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100427 .prepare_access = prepare_memory_access,
428 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000429 },
430
431 {
432 .vendor = "AMD",
433 .name = "Am29LV002BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000434 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000435 .manufacture_id = AMD_ID,
436 .model_id = AMD_AM29LV002BT,
437 .total_size = 256,
438 .page_size = 64 * 1024, /* unused */
439 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
440 .tested = TEST_UNTESTED,
441 .probe = probe_jedec,
442 .probe_timing = TIMING_ZERO,
443 .block_erasers =
444 {
445 {
446 .eraseblocks = {
447 {64 * 1024, 3},
448 {32 * 1024, 1},
449 {8 * 1024, 2},
450 {16 * 1024, 1},
451 },
452 .block_erase = erase_sector_jedec,
453 }, {
454 .eraseblocks = { {256 * 1024, 1} },
455 .block_erase = erase_chip_block_jedec,
456 },
457 },
458 .write = write_jedec_1,
459 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000460 .voltage = {3000, 3600}, /* 3.0-3.6V for type -55, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100461 .prepare_access = prepare_memory_access,
462 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000463 },
464
465 {
466 .vendor = "AMD",
467 .name = "Am29LV004BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000468 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000469 .manufacture_id = AMD_ID,
470 .model_id = AMD_AM29LV004BB,
471 .total_size = 512,
472 .page_size = 64 * 1024, /* unused */
473 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
474 .tested = TEST_UNTESTED,
475 .probe = probe_jedec,
476 .probe_timing = TIMING_ZERO,
477 .block_erasers =
478 {
479 {
480 .eraseblocks = {
481 {16 * 1024, 1},
482 {8 * 1024, 2},
483 {32 * 1024, 1},
484 {64 * 1024, 7},
485 },
486 .block_erase = erase_sector_jedec,
487 }, {
488 .eraseblocks = { {512 * 1024, 1} },
489 .block_erase = erase_chip_block_jedec,
490 },
491 },
492 .write = write_jedec_1,
493 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000494 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +0100495 .prepare_access = prepare_memory_access,
496 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000497 },
498
499 {
500 .vendor = "AMD",
501 .name = "Am29LV004BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000502 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000503 .manufacture_id = AMD_ID,
504 .model_id = AMD_AM29LV004BT,
505 .total_size = 512,
506 .page_size = 64 * 1024, /* unused */
507 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
508 .tested = TEST_UNTESTED,
509 .probe = probe_jedec,
510 .probe_timing = TIMING_ZERO,
511 .block_erasers =
512 {
513 {
514 .eraseblocks = {
515 {64 * 1024, 7},
516 {32 * 1024, 1},
517 {8 * 1024, 2},
518 {16 * 1024, 1},
519 },
520 .block_erase = erase_sector_jedec,
521 }, {
522 .eraseblocks = { {512 * 1024, 1} },
523 .block_erase = erase_chip_block_jedec,
524 },
525 },
526 .write = write_jedec_1,
527 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000528 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +0100529 .prepare_access = prepare_memory_access,
530 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000531 },
532
533 {
534 .vendor = "AMD",
535 .name = "Am29LV008BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000536 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000537 .manufacture_id = AMD_ID,
538 .model_id = AMD_AM29LV008BB,
539 .total_size = 1024,
540 .page_size = 64 * 1024, /* unused */
541 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Uwe Hermann09ebd522011-08-25 22:54:23 +0000542 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000543 .probe = probe_jedec,
544 .probe_timing = TIMING_ZERO,
545 .block_erasers =
546 {
547 {
548 .eraseblocks = {
549 {16 * 1024, 1},
550 {8 * 1024, 2},
551 {32 * 1024, 1},
552 {64 * 1024, 15},
553 },
554 .block_erase = erase_sector_jedec,
555 }, {
556 .eraseblocks = { {1024 * 1024, 1} },
557 .block_erase = erase_chip_block_jedec,
558 },
559 },
560 .write = write_jedec_1,
561 .read = read_memmapped,
Alan Greenf5ad6882019-06-27 12:09:13 +1000562 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100563 .prepare_access = prepare_memory_access,
564 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000565 },
566
567 {
568 .vendor = "AMD",
569 .name = "Am29LV008BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000570 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000571 .manufacture_id = AMD_ID,
572 .model_id = AMD_AM29LV008BT,
573 .total_size = 1024,
574 .page_size = 64 * 1024, /* unused */
575 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
576 .tested = TEST_UNTESTED,
577 .probe = probe_jedec,
578 .probe_timing = TIMING_ZERO,
579 .block_erasers =
580 {
581 {
582 .eraseblocks = {
583 {64 * 1024, 15},
584 {32 * 1024, 1},
585 {8 * 1024, 2},
586 {16 * 1024, 1},
587 },
588 .block_erase = erase_sector_jedec,
589 }, {
590 .eraseblocks = { {1024 * 1024, 1} },
591 .block_erase = erase_chip_block_jedec,
592 },
593 },
594 .write = write_jedec_1,
595 .read = read_memmapped,
Alan Greenf5ad6882019-06-27 12:09:13 +1000596 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100597 .prepare_access = prepare_memory_access,
598 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerc753e5b2011-02-05 12:11:17 +0000599 },
600
601 {
602 .vendor = "AMD",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000603 .name = "Am29LV040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000604 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000605 .manufacture_id = AMD_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +0000606 .model_id = AMD_AM29LV040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000607 .total_size = 512,
608 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +0000609 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +0000610 .tested = TEST_OK_PRE,
Sean Nelson35727f72010-01-28 23:55:12 +0000611 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +0000612 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000613 .block_erasers =
614 {
615 {
616 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +0000617 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000618 }, {
619 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +0000620 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000621 },
622 },
Sean Nelson35727f72010-01-28 23:55:12 +0000623 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000624 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000625 .voltage = {3000, 3600}, /* 3.0-3.6V for type -60R, others 2.7-3.6V*/
Nico Huber9eec4072023-01-12 01:17:30 +0100626 .prepare_access = prepare_memory_access,
627 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +0000628 },
629
Stephan Guilloux5c5b5252009-01-08 03:40:17 +0000630 {
Peter Stuge8440cc02009-01-25 23:55:12 +0000631 .vendor = "AMD",
632 .name = "Am29LV081B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000633 .bustype = BUS_PARALLEL,
Mateusz Murawski5bae4382009-06-02 00:38:14 +0000634 .manufacture_id = AMD_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +0000635 .model_id = AMD_AM29LV080B,
Peter Stuge8440cc02009-01-25 23:55:12 +0000636 .total_size = 1024,
637 .page_size = 64 * 1024,
David Borg204f4652010-12-04 03:26:40 +0000638 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET, /* datasheet specifies address as don't care */
Peter Stuge8440cc02009-01-25 23:55:12 +0000639 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +0000640 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +0000641 .probe_timing = TIMING_ZERO,
Sean Nelson72a9a022009-12-22 22:15:33 +0000642 .block_erasers =
643 {
644 {
645 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson35727f72010-01-28 23:55:12 +0000646 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000647 }, {
648 .eraseblocks = { {1024 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +0000649 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +0000650 },
651 },
Sean Nelson35727f72010-01-28 23:55:12 +0000652 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +0000653 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000654 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +0100655 .prepare_access = prepare_memory_access,
656 .finish_access = finish_memory_access,
Peter Stuge8440cc02009-01-25 23:55:12 +0000657 },
658
659 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000660 .vendor = "AMIC",
Alan Green1f9cc7d2019-07-01 11:10:45 +1000661 .name = "A25L010",
662 .bustype = BUS_SPI,
663 .manufacture_id = AMIC_ID_NOPREFIX,
664 .model_id = AMIC_A25L010,
665 .total_size = 128,
666 .page_size = 256,
667 .feature_bits = FEATURE_WRSR_WREN,
668 .tested = TEST_UNTESTED,
669 .probe = probe_spi_rdid,
670 .probe_timing = TIMING_ZERO,
671 .block_erasers =
672 {
673 {
674 .eraseblocks = { { 4 * 1024, 32 } },
675 .block_erase = spi_block_erase_20,
676 }, {
677 .eraseblocks = { { 64 * 1024, 2 } },
678 .block_erase = spi_block_erase_d8,
679 }, {
680 .eraseblocks = { { 128 * 1024, 1 } },
681 .block_erase = spi_block_erase_c7,
682 }
683 },
684 .printlock = spi_prettyprint_status_register_bp2_srwd,
685 .unlock = spi_disable_blockprotect,
686 .write = spi_chip_write_256,
687 .read = spi_chip_read,
688 .voltage = {2700, 3600},
689 },
690
691 {
692 .vendor = "AMIC",
693 .name = "A25L016",
694 .bustype = BUS_SPI,
695 .manufacture_id = AMIC_ID_NOPREFIX,
696 .model_id = AMIC_A25L016,
697 .total_size = 2048,
698 .page_size = 256,
699 .feature_bits = FEATURE_WRSR_WREN,
700 .tested = TEST_UNTESTED,
701 .probe = probe_spi_rdid,
702 .probe_timing = TIMING_ZERO,
703 .block_erasers =
704 {
705 {
706 .eraseblocks = { { 4 * 1024, 512 } },
707 .block_erase = spi_block_erase_20,
708 }, {
709 .eraseblocks = { { 64 * 1024, 32 } },
710 .block_erase = spi_block_erase_d8,
711 }, {
712 .eraseblocks = { { 2048 * 1024, 1 } },
713 .block_erase = spi_block_erase_c7,
714 }
715 },
716 .printlock = spi_prettyprint_status_register_bp2_srwd,
717 .unlock = spi_disable_blockprotect,
718 .write = spi_chip_write_256,
719 .read = spi_chip_read,
720 .voltage = {2700, 3600},
721 },
722
723 {
724 .vendor = "AMIC",
725 .name = "A25L020",
726 .bustype = BUS_SPI,
727 .manufacture_id = AMIC_ID_NOPREFIX,
728 .model_id = AMIC_A25L020,
729 .total_size = 256,
730 .page_size = 256,
731 .feature_bits = FEATURE_WRSR_WREN,
732 .tested = TEST_UNTESTED,
733 .probe = probe_spi_rdid,
734 .probe_timing = TIMING_ZERO,
735 .block_erasers =
736 {
737 {
738 .eraseblocks = { { 4 * 1024, 64 } },
739 .block_erase = spi_block_erase_20,
740 }, {
741 .eraseblocks = { { 64 * 1024, 4 } },
742 .block_erase = spi_block_erase_d8,
743 }, {
744 .eraseblocks = { { 256 * 1024, 1 } },
745 .block_erase = spi_block_erase_c7,
746 }
747 },
748 .printlock = spi_prettyprint_status_register_bp2_srwd,
749 .unlock = spi_disable_blockprotect,
750 .write = spi_chip_write_256,
751 .read = spi_chip_read,
752 .voltage = {2700, 3600},
753 },
754
755 {
756 .vendor = "AMIC",
757 .name = "A25L032",
758 .bustype = BUS_SPI,
759 .manufacture_id = AMIC_ID_NOPREFIX,
760 .model_id = AMIC_A25L032,
761 .total_size = 4096,
762 .page_size = 256,
763 /* OTP: 64B total; read 0x4B, 0x48; write 0x42 */
764 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
765 .tested = TEST_OK_PREW,
766 .probe = probe_spi_rdid,
767 .probe_timing = TIMING_ZERO,
768 .block_erasers =
769 {
770 {
771 .eraseblocks = { { 4 * 1024, 1024 } },
772 .block_erase = spi_block_erase_20,
773 }, {
774 .eraseblocks = { { 64 * 1024, 64 } },
775 .block_erase = spi_block_erase_52,
776 }, {
777 .eraseblocks = { { 64 * 1024, 64 } },
778 .block_erase = spi_block_erase_d8,
779 }, {
780 .eraseblocks = { { 4096 * 1024, 1 } },
781 .block_erase = spi_block_erase_60,
782 }, {
783 .eraseblocks = { { 4096 * 1024, 1 } },
784 .block_erase = spi_block_erase_c7,
785 }
786 },
787 .printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
788 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
789 .write = spi_chip_write_256,
790 .read = spi_chip_read,
791 .voltage = {2700, 3600},
792 },
793
794 {
795 .vendor = "AMIC",
796 .name = "A25L040",
797 .bustype = BUS_SPI,
798 .manufacture_id = AMIC_ID_NOPREFIX,
799 .model_id = AMIC_A25L040,
800 .total_size = 512,
801 .page_size = 256,
802 .feature_bits = FEATURE_WRSR_WREN,
803 .tested = TEST_UNTESTED,
804 .probe = probe_spi_rdid,
805 .probe_timing = TIMING_ZERO,
806 .block_erasers =
807 {
808 {
809 .eraseblocks = { { 4 * 1024, 128 } },
810 .block_erase = spi_block_erase_20,
811 }, {
812 .eraseblocks = { { 64 * 1024, 8 } },
813 .block_erase = spi_block_erase_d8,
814 }, {
815 .eraseblocks = { { 512 * 1024, 1 } },
816 .block_erase = spi_block_erase_c7,
817 }
818 },
819 .printlock = spi_prettyprint_status_register_bp2_srwd,
820 .unlock = spi_disable_blockprotect,
821 .write = spi_chip_write_256,
822 .read = spi_chip_read,
823 .voltage = {2700, 3600},
824 },
825
826 {
827 .vendor = "AMIC",
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000828 .name = "A25L05PT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000829 .bustype = BUS_SPI,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000830 .manufacture_id = AMIC_ID,
831 .model_id = AMIC_A25L05PT,
832 .total_size = 64,
833 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +0000834 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000835 .tested = TEST_UNTESTED,
836 .probe = probe_spi_rdid4,
837 .probe_timing = TIMING_ZERO,
838 .block_erasers =
839 {
840 {
841 .eraseblocks = {
842 {32 * 1024, 1},
843 {16 * 1024, 1},
844 {8 * 1024, 1},
845 {4 * 1024, 2},
846 },
847 .block_erase = spi_block_erase_d8,
848 }, {
849 .eraseblocks = { {64 * 1024, 1} },
850 .block_erase = spi_block_erase_c7,
851 }
852 },
Stefan Tauner12f3d512014-05-27 21:27:27 +0000853 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000854 .unlock = spi_disable_blockprotect,
855 .write = spi_chip_write_256,
856 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000857 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000858 },
859
860 {
861 .vendor = "AMIC",
862 .name = "A25L05PU",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000863 .bustype = BUS_SPI,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000864 .manufacture_id = AMIC_ID,
865 .model_id = AMIC_A25L05PU,
866 .total_size = 64,
867 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +0000868 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000869 .tested = TEST_UNTESTED,
870 .probe = probe_spi_rdid4,
871 .probe_timing = TIMING_ZERO,
872 .block_erasers =
873 {
874 {
875 .eraseblocks = {
876 {4 * 1024, 2},
877 {8 * 1024, 1},
878 {16 * 1024, 1},
879 {32 * 1024, 1},
880 },
881 .block_erase = spi_block_erase_d8,
882 }, {
883 .eraseblocks = { {64 * 1024, 1} },
884 .block_erase = spi_block_erase_c7,
885 }
886 },
Stefan Tauner12f3d512014-05-27 21:27:27 +0000887 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000888 .unlock = spi_disable_blockprotect,
889 .write = spi_chip_write_256,
890 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +0000891 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000892 },
893
894 {
895 .vendor = "AMIC",
Alan Green1f9cc7d2019-07-01 11:10:45 +1000896 .name = "A25L080",
897 .bustype = BUS_SPI,
898 .manufacture_id = AMIC_ID_NOPREFIX,
899 .model_id = AMIC_A25L080,
900 .total_size = 1024,
901 .page_size = 256,
902 .feature_bits = FEATURE_WRSR_WREN,
903 .tested = TEST_UNTESTED,
904 .probe = probe_spi_rdid,
905 .probe_timing = TIMING_ZERO,
906 .block_erasers =
907 {
908 {
909 .eraseblocks = { { 4 * 1024, 256 } },
910 .block_erase = spi_block_erase_20,
911 }, {
912 .eraseblocks = { { 64 * 1024, 16 } },
913 .block_erase = spi_block_erase_d8,
914 }, {
915 .eraseblocks = { { 1024 * 1024, 1 } },
916 .block_erase = spi_block_erase_c7,
917 }
918 },
919 .printlock = spi_prettyprint_status_register_bp2_srwd,
920 .unlock = spi_disable_blockprotect,
921 .write = spi_chip_write_256,
922 .read = spi_chip_read,
923 .voltage = {2700, 3600},
924 },
925
926 {
927 .vendor = "AMIC",
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000928 .name = "A25L10PT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000929 .bustype = BUS_SPI,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000930 .manufacture_id = AMIC_ID,
931 .model_id = AMIC_A25L10PT,
932 .total_size = 128,
933 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +0000934 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000935 .tested = TEST_UNTESTED,
936 .probe = probe_spi_rdid4,
937 .probe_timing = TIMING_ZERO,
938 .block_erasers =
939 {
940 {
941 .eraseblocks = {
942 {64 * 1024, 1},
943 {32 * 1024, 1},
944 {16 * 1024, 1},
945 {8 * 1024, 1},
946 {4 * 1024, 2},
947 },
948 .block_erase = spi_block_erase_d8,
949 }, {
950 .eraseblocks = { {128 * 1024, 1} },
951 .block_erase = spi_block_erase_c7,
952 }
953 },
Stefan Tauner12f3d512014-05-27 21:27:27 +0000954 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000955 .unlock = spi_disable_blockprotect,
956 .write = spi_chip_write_256,
957 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000958 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000959 },
960
961 {
962 .vendor = "AMIC",
963 .name = "A25L10PU",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +0000964 .bustype = BUS_SPI,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000965 .manufacture_id = AMIC_ID,
966 .model_id = AMIC_A25L10PU,
967 .total_size = 128,
968 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +0000969 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000970 .tested = TEST_UNTESTED,
971 .probe = probe_spi_rdid4,
972 .probe_timing = TIMING_ZERO,
973 .block_erasers =
974 {
975 {
976 .eraseblocks = {
977 {4 * 1024, 2},
978 {8 * 1024, 1},
979 {16 * 1024, 1},
980 {32 * 1024, 1},
981 {64 * 1024, 1},
982 },
983 .block_erase = spi_block_erase_d8,
984 }, {
985 .eraseblocks = { {128 * 1024, 1} },
986 .block_erase = spi_block_erase_c7,
987 }
988 },
Stefan Tauner12f3d512014-05-27 21:27:27 +0000989 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000990 .unlock = spi_disable_blockprotect,
991 .write = spi_chip_write_256,
992 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +0000993 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +0000994 },
995
996 {
997 .vendor = "AMIC",
Alan Green1f9cc7d2019-07-01 11:10:45 +1000998 .name = "A25L16PT",
999 .bustype = BUS_SPI,
1000 .manufacture_id = AMIC_ID,
1001 .model_id = AMIC_A25L16PT,
1002 .total_size = 2048,
1003 .page_size = 256,
1004 .feature_bits = FEATURE_WRSR_WREN,
1005 .tested = TEST_UNTESTED,
1006 .probe = probe_spi_rdid4,
1007 .probe_timing = TIMING_ZERO,
1008 .block_erasers =
1009 {
1010 {
1011 .eraseblocks = {
1012 {64 * 1024, 31},
1013 {32 * 1024, 1},
1014 {16 * 1024, 1},
1015 {8 * 1024, 1},
1016 {4 * 1024, 2},
1017 },
1018 .block_erase = spi_block_erase_d8,
1019 }, {
1020 .eraseblocks = { {2048 * 1024, 1} },
1021 .block_erase = spi_block_erase_60,
1022 }, {
1023 .eraseblocks = { {2048 * 1024, 1} },
1024 .block_erase = spi_block_erase_c7,
1025 }
1026 },
1027 .printlock = spi_prettyprint_status_register_bp2_srwd,
1028 .unlock = spi_disable_blockprotect,
1029 .write = spi_chip_write_256,
1030 .read = spi_chip_read,
1031 .voltage = {2700, 3600},
1032 },
1033
1034 {
1035 .vendor = "AMIC",
1036 .name = "A25L16PU",
1037 .bustype = BUS_SPI,
1038 .manufacture_id = AMIC_ID,
1039 .model_id = AMIC_A25L16PU,
1040 .total_size = 2048,
1041 .page_size = 256,
1042 .feature_bits = FEATURE_WRSR_WREN,
1043 .tested = TEST_OK_PR,
1044 .probe = probe_spi_rdid4,
1045 .probe_timing = TIMING_ZERO,
1046 .block_erasers =
1047 {
1048 {
1049 .eraseblocks = {
1050 {4 * 1024, 2},
1051 {8 * 1024, 1},
1052 {16 * 1024, 1},
1053 {32 * 1024, 1},
1054 {64 * 1024, 31},
1055 },
1056 .block_erase = spi_block_erase_d8,
1057 }, {
1058 .eraseblocks = { {2048 * 1024, 1} },
1059 .block_erase = spi_block_erase_60,
1060 }, {
1061 .eraseblocks = { {2048 * 1024, 1} },
1062 .block_erase = spi_block_erase_c7,
1063 }
1064 },
1065 .printlock = spi_prettyprint_status_register_bp2_srwd,
1066 .unlock = spi_disable_blockprotect,
1067 .write = spi_chip_write_256,
1068 .read = spi_chip_read,
1069 .voltage = {2700, 3600},
1070 },
1071
1072 {
1073 .vendor = "AMIC",
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001074 .name = "A25L20PT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001075 .bustype = BUS_SPI,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001076 .manufacture_id = AMIC_ID,
1077 .model_id = AMIC_A25L20PT,
1078 .total_size = 256,
1079 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00001080 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001081 .tested = TEST_UNTESTED,
1082 .probe = probe_spi_rdid4,
1083 .probe_timing = TIMING_ZERO,
1084 .block_erasers =
1085 {
1086 {
1087 .eraseblocks = {
1088 {64 * 1024, 3},
1089 {32 * 1024, 1},
1090 {16 * 1024, 1},
1091 {8 * 1024, 1},
1092 {4 * 1024, 2},
1093 },
1094 .block_erase = spi_block_erase_d8,
1095 }, {
1096 .eraseblocks = { {256 * 1024, 1} },
1097 .block_erase = spi_block_erase_c7,
1098 }
1099 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001100 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001101 .unlock = spi_disable_blockprotect,
1102 .write = spi_chip_write_256,
1103 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001104 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001105 },
1106
1107 {
1108 .vendor = "AMIC",
1109 .name = "A25L20PU",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001110 .bustype = BUS_SPI,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001111 .manufacture_id = AMIC_ID,
1112 .model_id = AMIC_A25L20PU,
1113 .total_size = 256,
1114 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00001115 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001116 .tested = TEST_UNTESTED,
1117 .probe = probe_spi_rdid4,
1118 .probe_timing = TIMING_ZERO,
1119 .block_erasers =
1120 {
1121 {
1122 .eraseblocks = {
1123 {4 * 1024, 2},
1124 {8 * 1024, 1},
1125 {16 * 1024, 1},
1126 {32 * 1024, 1},
1127 {64 * 1024, 3},
1128 },
1129 .block_erase = spi_block_erase_d8,
1130 }, {
1131 .eraseblocks = { {256 * 1024, 1} },
1132 .block_erase = spi_block_erase_c7,
1133 }
1134 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001135 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001136 .unlock = spi_disable_blockprotect,
1137 .write = spi_chip_write_256,
1138 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001139 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001140 },
1141
1142 /* The A25L40P{T,U} chips are distinguished by their
1143 * erase block layouts, but without any distinction in RDID.
1144 * This inexplicable quirk was verified by Rudolf Marek
Nico Huberc3b02dc2023-08-12 01:13:45 +02001145 * and discussed on the flashprog mailing list on 2010-07-12.
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001146 */
1147 {
1148 .vendor = "AMIC",
1149 .name = "A25L40PT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001150 .bustype = BUS_SPI,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001151 .manufacture_id = AMIC_ID,
1152 .model_id = AMIC_A25L40PT,
1153 .total_size = 512,
1154 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00001155 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00001156 .tested = TEST_OK_PR,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001157 .probe = probe_spi_rdid4,
1158 .probe_timing = TIMING_ZERO,
1159 .block_erasers =
1160 {
1161 {
1162 .eraseblocks = {
1163 {64 * 1024, 7},
1164 {32 * 1024, 1},
1165 {16 * 1024, 1},
1166 {8 * 1024, 1},
1167 {4 * 1024, 2},
1168 },
1169 .block_erase = spi_block_erase_d8,
1170 }, {
1171 .eraseblocks = { {512 * 1024, 1} },
1172 .block_erase = spi_block_erase_c7,
1173 }
1174 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001175 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001176 .unlock = spi_disable_blockprotect,
1177 .write = spi_chip_write_256,
1178 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001179 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001180 },
1181
1182 {
1183 .vendor = "AMIC",
1184 .name = "A25L40PU",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001185 .bustype = BUS_SPI,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001186 .manufacture_id = AMIC_ID,
1187 .model_id = AMIC_A25L40PU,
1188 .total_size = 512,
1189 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00001190 .feature_bits = FEATURE_WRSR_WREN,
Angel Pons6f088352018-09-30 19:59:42 +02001191 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001192 .probe = probe_spi_rdid4,
1193 .probe_timing = TIMING_ZERO,
1194 .block_erasers =
1195 {
1196 {
1197 .eraseblocks = {
1198 {4 * 1024, 2},
1199 {8 * 1024, 1},
1200 {16 * 1024, 1},
1201 {32 * 1024, 1},
1202 {64 * 1024, 7},
1203 },
1204 .block_erase = spi_block_erase_d8,
1205 }, {
1206 .eraseblocks = { {512 * 1024, 1} },
1207 .block_erase = spi_block_erase_c7,
1208 }
1209 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001210 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001211 .unlock = spi_disable_blockprotect,
1212 .write = spi_chip_write_256,
1213 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001214 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001215 },
1216
1217 {
1218 .vendor = "AMIC",
Alan Green1f9cc7d2019-07-01 11:10:45 +10001219 .name = "A25L512",
1220 .bustype = BUS_SPI,
1221 .manufacture_id = AMIC_ID_NOPREFIX,
1222 .model_id = AMIC_A25L512,
1223 .total_size = 64,
1224 .page_size = 256,
1225 .feature_bits = FEATURE_WRSR_WREN,
1226 .tested = TEST_UNTESTED,
1227 .probe = probe_spi_rdid,
1228 .probe_timing = TIMING_ZERO,
1229 .block_erasers =
1230 {
1231 {
1232 .eraseblocks = { { 4 * 1024, 16 } },
1233 .block_erase = spi_block_erase_20,
1234 }, {
1235 .eraseblocks = { { 64 * 1024, 1 } },
1236 .block_erase = spi_block_erase_d8,
1237 }, {
1238 .eraseblocks = { { 64 * 1024, 1 } },
1239 .block_erase = spi_block_erase_c7,
1240 }
1241 },
1242 .printlock = spi_prettyprint_status_register_bp2_srwd,
1243 .unlock = spi_disable_blockprotect,
1244 .write = spi_chip_write_256,
1245 .read = spi_chip_read,
1246 .voltage = {2700, 3600},
1247 },
1248
1249 {
1250 .vendor = "AMIC",
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001251 .name = "A25L80P",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001252 .bustype = BUS_SPI,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001253 .manufacture_id = AMIC_ID,
1254 .model_id = AMIC_A25L80P,
1255 .total_size = 1024,
1256 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00001257 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00001258 .tested = TEST_OK_PRE,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001259 .probe = probe_spi_rdid4,
1260 .probe_timing = TIMING_ZERO,
1261 .block_erasers =
1262 {
1263 {
1264 .eraseblocks = {
1265 {4 * 1024, 2},
1266 {8 * 1024, 1},
1267 {16 * 1024, 1},
1268 {32 * 1024, 1},
1269 {64 * 1024, 15},
1270 },
1271 .block_erase = spi_block_erase_d8,
1272 }, {
1273 .eraseblocks = { {1024 * 1024, 1} },
1274 .block_erase = spi_block_erase_c7,
1275 }
1276 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001277 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001278 .unlock = spi_disable_blockprotect,
1279 .write = spi_chip_write_256,
1280 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001281 .voltage = {2700, 3600},
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001282 },
1283
1284 {
1285 .vendor = "AMIC",
Alan Green1f9cc7d2019-07-01 11:10:45 +10001286 .name = "A25LQ032/A25LQ32A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001287 .bustype = BUS_SPI,
Dan Lenski11617122010-07-29 15:00:40 +00001288 .manufacture_id = AMIC_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001289 .model_id = AMIC_A25LQ032,
Dan Lenski11617122010-07-29 15:00:40 +00001290 .total_size = 4096,
1291 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001292 /* A25LQ32A supports SFDP */
Daniel Lenski65922a32012-02-15 23:40:23 +00001293 /* OTP: 64B total; read 0x4B, 0x48; write 0x42 */
1294 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Alan Green1f9cc7d2019-07-01 11:10:45 +10001295 .tested = TEST_UNTESTED,
Dan Lenski11617122010-07-29 15:00:40 +00001296 .probe = probe_spi_rdid,
1297 .probe_timing = TIMING_ZERO,
1298 .block_erasers =
1299 {
1300 {
1301 .eraseblocks = { { 4 * 1024, 1024 } },
1302 .block_erase = spi_block_erase_20,
1303 }, {
1304 .eraseblocks = { { 64 * 1024, 64 } },
1305 .block_erase = spi_block_erase_52,
1306 }, {
1307 .eraseblocks = { { 64 * 1024, 64 } },
1308 .block_erase = spi_block_erase_d8,
1309 }, {
1310 .eraseblocks = { { 4096 * 1024, 1 } },
1311 .block_erase = spi_block_erase_60,
1312 }, {
1313 .eraseblocks = { { 4096 * 1024, 1 } },
1314 .block_erase = spi_block_erase_c7,
Stefan Taunerd7d423b2012-10-20 09:13:16 +00001315 }
Dan Lenski11617122010-07-29 15:00:40 +00001316 },
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001317 .printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
1318 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
Dan Lenski11617122010-07-29 15:00:40 +00001319 .write = spi_chip_write_256,
1320 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001321 .voltage = {2700, 3600},
Dan Lenski11617122010-07-29 15:00:40 +00001322 },
1323
1324 {
1325 .vendor = "AMIC",
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001326 .name = "A25LQ16",
1327 .bustype = BUS_SPI,
1328 .manufacture_id = AMIC_ID_NOPREFIX,
1329 .model_id = AMIC_A25LQ16,
1330 .total_size = 2048,
1331 .page_size = 256,
1332 /* supports SFDP */
1333 /* OTP: 64B total; read 0x4B, 0x48; write 0x42 */
1334 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
1335 .tested = TEST_UNTESTED,
1336 .probe = probe_spi_rdid,
1337 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10001338 .block_erasers =
1339 {
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001340 {
1341 .eraseblocks = { { 4 * 1024, 512 } },
1342 .block_erase = spi_block_erase_20,
1343 }, {
1344 .eraseblocks = { { 64 * 1024, 32 } },
1345 .block_erase = spi_block_erase_52,
1346 }, {
1347 .eraseblocks = { { 64 * 1024, 32 } },
1348 .block_erase = spi_block_erase_d8,
1349 }, {
1350 .eraseblocks = { { 2048 * 1024, 1 } },
1351 .block_erase = spi_block_erase_60,
1352 }, {
1353 .eraseblocks = { { 2048 * 1024, 1 } },
1354 .block_erase = spi_block_erase_c7,
1355 }
1356 },
1357 .printlock = spi_prettyprint_status_register_amic_a25l032, /* bit5: T/B, bit6: prot size */
1358 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: 2nd status reg (read with 0x35) */
1359 .write = spi_chip_write_256,
1360 .read = spi_chip_read,
1361 .voltage = {2700, 3600},
1362 },
1363
1364 {
1365 .vendor = "AMIC",
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001366 .name = "A25LQ64",
1367 .bustype = BUS_SPI,
1368 .manufacture_id = AMIC_ID_NOPREFIX,
Stefan Tauner23e10b82016-01-23 16:16:49 +00001369 .model_id = AMIC_A25LQ64,
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001370 .total_size = 8192,
1371 .page_size = 256,
1372 /* supports SFDP */
1373 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +01001374 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
1375 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT |
1376 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO |
1377 FEATURE_QPI_35_F5,
1378 .dummy_cycles =
1379 {
1380 .qpi_fast_read = 4,
1381 .qpi_fast_read_qio = 6,
1382 },
Nikolay Nikolaevd07fde62013-06-28 21:29:21 +00001383 .tested = TEST_UNTESTED,
1384 .probe = probe_spi_rdid,
1385 .probe_timing = TIMING_ZERO,
1386 .block_erasers =
1387 {
1388 {
1389 .eraseblocks = { { 4 * 1024, 2048 } },
1390 .block_erase = spi_block_erase_20,
1391 }, {
1392 .eraseblocks = { { 32 * 1024, 256 } },
1393 .block_erase = spi_block_erase_52,
1394 }, {
1395 .eraseblocks = { { 64 * 1024, 128 } },
1396 .block_erase = spi_block_erase_d8,
1397 }, {
1398 .eraseblocks = { { 8192 * 1024, 1 } },
1399 .block_erase = spi_block_erase_60,
1400 }, {
1401 .eraseblocks = { { 8192 * 1024, 1 } },
1402 .block_erase = spi_block_erase_c7,
1403 }
1404 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00001405 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enhance (sic!) */
Stefan Tauner5c316f92015-02-08 21:57:52 +00001406 .unlock = spi_disable_blockprotect_bp3_srwd,
Dan Lenski11617122010-07-29 15:00:40 +00001407 .write = spi_chip_write_256,
1408 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001409 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02001410 .prepare_access = spi_prepare_io,
1411 .finish_access = spi_finish_io,
Dan Lenski11617122010-07-29 15:00:40 +00001412 },
1413
1414 {
1415 .vendor = "AMIC",
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001416 .name = "A29002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001417 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001418 .manufacture_id = AMIC_ID_NOPREFIX,
1419 .model_id = AMIC_A29002B,
1420 .total_size = 256,
1421 .page_size = 64 * 1024,
1422 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
1423 .tested = TEST_UNTESTED,
1424 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +00001425 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001426 .block_erasers =
1427 {
1428 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00001429 .eraseblocks = {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001430 {16 * 1024, 1},
1431 {8 * 1024, 2},
1432 {32 * 1024, 1},
1433 {64 * 1024, 3},
1434 },
1435 .block_erase = erase_sector_jedec,
1436 }, {
1437 .eraseblocks = { {256 * 1024, 1} },
1438 .block_erase = erase_chip_block_jedec,
1439 },
1440 },
1441 .write = write_jedec_1,
1442 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001443 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01001444 .prepare_access = prepare_memory_access,
1445 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001446 },
1447
1448 {
1449 .vendor = "AMIC",
1450 .name = "A29002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001451 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001452 .manufacture_id = AMIC_ID_NOPREFIX,
1453 .model_id = AMIC_A29002T,
1454 .total_size = 256,
1455 .page_size = 64 * 1024,
1456 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +00001457 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001458 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +00001459 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001460 .block_erasers =
1461 {
1462 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00001463 .eraseblocks = {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001464 {64 * 1024, 3},
1465 {32 * 1024, 1},
1466 {8 * 1024, 2},
1467 {16 * 1024, 1},
1468 },
1469 .block_erase = erase_sector_jedec,
1470 }, {
1471 .eraseblocks = { {256 * 1024, 1} },
1472 .block_erase = erase_chip_block_jedec,
1473 },
1474 },
1475 .write = write_jedec_1,
1476 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001477 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01001478 .prepare_access = prepare_memory_access,
1479 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001480 },
1481
1482 {
1483 .vendor = "AMIC",
1484 .name = "A29040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001485 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001486 .manufacture_id = AMIC_ID_NOPREFIX,
1487 .model_id = AMIC_A29040B,
1488 .total_size = 512,
1489 .page_size = 64 * 1024,
1490 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Corey Osgoodcbd56652013-09-10 10:42:48 +00001491 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001492 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +00001493 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001494 .block_erasers =
1495 {
1496 {
1497 .eraseblocks = { {64 * 1024, 8} },
1498 .block_erase = erase_sector_jedec,
1499 }, {
1500 .eraseblocks = { {512 * 1024, 1} },
1501 .block_erase = erase_chip_block_jedec,
1502 },
1503 },
1504 .write = write_jedec_1,
1505 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001506 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01001507 .prepare_access = prepare_memory_access,
1508 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001509 },
1510
1511 {
1512 .vendor = "AMIC",
1513 .name = "A49LF040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001514 .bustype = BUS_LPC,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001515 .manufacture_id = AMIC_ID_NOPREFIX,
1516 .model_id = AMIC_A49LF040A,
1517 .total_size = 512,
1518 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +01001519 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +00001520 .tested = TEST_OK_PR,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001521 .probe = probe_jedec,
1522 .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */
1523 .block_erasers =
1524 {
1525 {
1526 .eraseblocks = { {64 * 1024, 8} },
1527 .block_erase = erase_block_jedec,
1528 }, {
1529 .eraseblocks = { {512 * 1024, 1} },
1530 .block_erase = erase_chip_block_jedec,
1531 }
1532 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +00001533 .unlock = unlock_regspace2_uniform_64k,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001534 .write = write_jedec_1,
1535 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001536 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01001537 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01001538 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00001539 },
1540
1541 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001542 .vendor = "Atmel",
1543 .name = "AT25DF021",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001544 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001545 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00001546 .model_id = ATMEL_AT25DF021,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001547 .total_size = 256,
1548 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00001549 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1550 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001551 .tested = TEST_UNTESTED,
1552 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001553 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001554 .block_erasers =
1555 {
1556 {
1557 .eraseblocks = { {4 * 1024, 64} },
1558 .block_erase = spi_block_erase_20,
1559 }, {
1560 .eraseblocks = { {32 * 1024, 8} },
1561 .block_erase = spi_block_erase_52,
1562 }, {
1563 .eraseblocks = { {64 * 1024, 4} },
1564 .block_erase = spi_block_erase_d8,
1565 }, {
1566 .eraseblocks = { {256 * 1024, 1} },
1567 .block_erase = spi_block_erase_60,
1568 }, {
1569 .eraseblocks = { {256 * 1024, 1} },
1570 .block_erase = spi_block_erase_c7,
1571 }
1572 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001573 .printlock = spi_prettyprint_status_register_at25df,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001574 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001575 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001576 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +00001577 .voltage = {2700, 3600}, /* 2.3-3.6V & 2.7-3.6V models available */
FENG yu ningff692fb2008-12-08 18:15:10 +00001578 },
1579
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001580 {
1581 .vendor = "Atmel",
Steffen Mauch0b59b0d2018-06-02 23:46:03 +02001582 .name = "AT25DF021A",
1583 .bustype = BUS_SPI,
1584 .manufacture_id = ATMEL_ID,
1585 .model_id = ATMEL_AT25DF021A,
1586 .total_size = 256,
1587 .page_size = 256,
1588 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1589 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
1590 .tested = TEST_OK_PREW,
1591 .probe = probe_spi_rdid,
1592 .probe_timing = TIMING_ZERO,
1593 .block_erasers =
1594 {
1595 {
1596 .eraseblocks = { {4 * 1024, 64} },
1597 .block_erase = spi_block_erase_20,
1598 }, {
1599 .eraseblocks = { {32 * 1024, 8} },
1600 .block_erase = spi_block_erase_52,
1601 }, {
1602 .eraseblocks = { {64 * 1024, 4} },
1603 .block_erase = spi_block_erase_d8,
1604 }, {
1605 .eraseblocks = { {256 * 1024, 1} },
1606 .block_erase = spi_block_erase_60,
1607 }, {
1608 .eraseblocks = { {256 * 1024, 1} },
1609 .block_erase = spi_block_erase_c7,
1610 }
1611 },
1612 .printlock = spi_prettyprint_status_register_at25df,
1613 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
1614 .write = spi_chip_write_256,
1615 .read = spi_chip_read,
1616 .voltage = {1650, 3600},
1617 },
1618
1619 {
1620 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001621 .name = "AT25DF041A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001622 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001623 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00001624 .model_id = ATMEL_AT25DF041A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001625 .total_size = 512,
1626 .page_size = 256,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001627 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner5c316f92015-02-08 21:57:52 +00001628 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001629 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001630 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001631 .block_erasers =
1632 {
1633 {
1634 .eraseblocks = { {4 * 1024, 128} },
1635 .block_erase = spi_block_erase_20,
1636 }, {
1637 .eraseblocks = { {32 * 1024, 16} },
1638 .block_erase = spi_block_erase_52,
1639 }, {
1640 .eraseblocks = { {64 * 1024, 8} },
1641 .block_erase = spi_block_erase_d8,
1642 }, {
1643 .eraseblocks = { {512 * 1024, 1} },
1644 .block_erase = spi_block_erase_60,
1645 }, {
1646 .eraseblocks = { {512 * 1024, 1} },
1647 .block_erase = spi_block_erase_c7,
1648 }
1649 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001650 .printlock = spi_prettyprint_status_register_at25df,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001651 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001652 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001653 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +00001654 .voltage = {2700, 3600}, /* 2.3-3.6V & 2.7-3.6V models available */
FENG yu ningff692fb2008-12-08 18:15:10 +00001655 },
1656
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001657 {
1658 .vendor = "Atmel",
1659 .name = "AT25DF081",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001660 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001661 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00001662 .model_id = ATMEL_AT25DF081,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001663 .total_size = 1024,
1664 .page_size = 256,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001665 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001666 .tested = TEST_UNTESTED,
1667 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001668 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001669 .block_erasers =
1670 {
1671 {
1672 .eraseblocks = { {4 * 1024, 256} },
1673 .block_erase = spi_block_erase_20,
1674 }, {
1675 .eraseblocks = { {32 * 1024, 32} },
1676 .block_erase = spi_block_erase_52,
1677 }, {
1678 .eraseblocks = { {64 * 1024, 16} },
1679 .block_erase = spi_block_erase_d8,
1680 }, {
1681 .eraseblocks = { {1024 * 1024, 1} },
1682 .block_erase = spi_block_erase_60,
1683 }, {
1684 .eraseblocks = { {1024 * 1024, 1} },
1685 .block_erase = spi_block_erase_c7,
1686 }
1687 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001688 .printlock = spi_prettyprint_status_register_at25df,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001689 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001690 .write = spi_chip_write_256,
1691 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001692 .voltage = {1600, 2000}, /* Datasheet says range is 1.65-1.95 V */
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001693 },
1694
1695 {
1696 .vendor = "Atmel",
1697 .name = "AT25DF081A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001698 .bustype = BUS_SPI,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001699 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00001700 .model_id = ATMEL_AT25DF081A,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001701 .total_size = 1024,
1702 .page_size = 256,
1703 .feature_bits = FEATURE_WRSR_WREN,
1704 .tested = TEST_UNTESTED,
1705 .probe = probe_spi_rdid,
1706 .probe_timing = TIMING_ZERO,
1707 .block_erasers =
1708 {
1709 {
1710 .eraseblocks = { {4 * 1024, 256} },
1711 .block_erase = spi_block_erase_20,
1712 }, {
1713 .eraseblocks = { {32 * 1024, 32} },
1714 .block_erase = spi_block_erase_52,
1715 }, {
1716 .eraseblocks = { {64 * 1024, 16} },
1717 .block_erase = spi_block_erase_d8,
1718 }, {
1719 .eraseblocks = { {1024 * 1024, 1} },
1720 .block_erase = spi_block_erase_60,
1721 }, {
1722 .eraseblocks = { {1024 * 1024, 1} },
1723 .block_erase = spi_block_erase_c7,
1724 }
1725 },
1726 .printlock = spi_prettyprint_status_register_at25df_sec,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001727 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001728 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001729 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +00001730 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00001731 },
1732
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001733 {
1734 .vendor = "Atmel",
1735 .name = "AT25DF161",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001736 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001737 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00001738 .model_id = ATMEL_AT25DF161,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001739 .total_size = 2048,
1740 .page_size = 256,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001741 .feature_bits = FEATURE_WRSR_WREN,
Angel Pons8b5b9622018-09-30 19:13:15 +02001742 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001743 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001744 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001745 .block_erasers =
1746 {
1747 {
1748 .eraseblocks = { {4 * 1024, 512} },
1749 .block_erase = spi_block_erase_20,
1750 }, {
1751 .eraseblocks = { {32 * 1024, 64} },
1752 .block_erase = spi_block_erase_52,
1753 }, {
1754 .eraseblocks = { {64 * 1024, 32} },
1755 .block_erase = spi_block_erase_d8,
1756 }, {
1757 .eraseblocks = { {2 * 1024 * 1024, 1} },
1758 .block_erase = spi_block_erase_60,
1759 }, {
1760 .eraseblocks = { {2 * 1024 * 1024, 1} },
1761 .block_erase = spi_block_erase_c7,
1762 }
1763 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001764 .printlock = spi_prettyprint_status_register_at25df_sec,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001765 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001766 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001767 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001768 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00001769 },
1770
Alan Green86bf6ab2019-06-27 16:58:20 +10001771 /*The AT26DF321 has the same ID as the AT25DF321. */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001772 {
1773 .vendor = "Atmel",
1774 .name = "AT25DF321",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001775 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001776 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00001777 .model_id = ATMEL_AT25DF321,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001778 .total_size = 4096,
1779 .page_size = 256,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001780 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerd06d9412011-06-12 19:47:55 +00001781 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001782 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001783 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001784 .block_erasers =
1785 {
1786 {
1787 .eraseblocks = { {4 * 1024, 1024} },
1788 .block_erase = spi_block_erase_20,
1789 }, {
1790 .eraseblocks = { {32 * 1024, 128} },
1791 .block_erase = spi_block_erase_52,
1792 }, {
1793 .eraseblocks = { {64 * 1024, 64} },
1794 .block_erase = spi_block_erase_d8,
1795 }, {
1796 .eraseblocks = { {4 * 1024 * 1024, 1} },
1797 .block_erase = spi_block_erase_60,
1798 }, {
1799 .eraseblocks = { {4 * 1024 * 1024, 1} },
1800 .block_erase = spi_block_erase_c7,
1801 }
1802 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001803 .printlock = spi_prettyprint_status_register_at25df,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001804 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001805 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001806 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001807 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00001808 },
1809
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001810 {
1811 .vendor = "Atmel",
1812 .name = "AT25DF321A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001813 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001814 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00001815 .model_id = ATMEL_AT25DF321A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001816 .total_size = 4096,
1817 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00001818 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1819 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerd94d25d2012-07-28 03:17:15 +00001820 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001821 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001822 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001823 .block_erasers =
1824 {
1825 {
1826 .eraseblocks = { {4 * 1024, 1024} },
1827 .block_erase = spi_block_erase_20,
1828 }, {
1829 .eraseblocks = { {32 * 1024, 128} },
1830 .block_erase = spi_block_erase_52,
1831 }, {
1832 .eraseblocks = { {64 * 1024, 64} },
1833 .block_erase = spi_block_erase_d8,
1834 }, {
1835 .eraseblocks = { {4 * 1024 * 1024, 1} },
1836 .block_erase = spi_block_erase_60,
1837 }, {
1838 .eraseblocks = { {4 * 1024 * 1024, 1} },
1839 .block_erase = spi_block_erase_c7,
1840 }
1841 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001842 .printlock = spi_prettyprint_status_register_at25df_sec,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001843 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001844 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001845 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001846 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00001847 },
1848
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001849 {
1850 .vendor = "Atmel",
Paul Menzelac427b22012-02-16 21:07:07 +00001851 .name = "AT25DF641(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001852 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001853 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00001854 .model_id = ATMEL_AT25DF641,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001855 .total_size = 8192,
1856 .page_size = 256,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001857 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00001858 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00001859 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00001860 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00001861 .block_erasers =
1862 {
1863 {
1864 .eraseblocks = { {4 * 1024, 2048} },
1865 .block_erase = spi_block_erase_20,
1866 }, {
1867 .eraseblocks = { {32 * 1024, 256} },
1868 .block_erase = spi_block_erase_52,
1869 }, {
1870 .eraseblocks = { {64 * 1024, 128} },
1871 .block_erase = spi_block_erase_d8,
1872 }, {
1873 .eraseblocks = { {8 * 1024 * 1024, 1} },
1874 .block_erase = spi_block_erase_60,
1875 }, {
1876 .eraseblocks = { {8 * 1024 * 1024, 1} },
1877 .block_erase = spi_block_erase_c7,
1878 }
1879 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001880 .printlock = spi_prettyprint_status_register_at25df_sec,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001881 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001882 .write = spi_chip_write_256,
1883 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00001884 .voltage = {2700, 3600},
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001885 },
1886
1887 {
1888 .vendor = "Atmel",
Stefan Taunerc9d8b272014-06-01 13:22:35 +00001889 .name = "AT25DL081",
1890 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +10001891 .manufacture_id = ATMEL_ID,
Stefan Taunerc9d8b272014-06-01 13:22:35 +00001892 .model_id = ATMEL_AT25DF081,
1893 .total_size = 1024,
1894 .page_size = 256,
1895 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1896 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
1897 .tested = TEST_UNTESTED,
1898 .probe = probe_spi_rdid,
1899 .probe_timing = TIMING_ZERO,
1900 .block_erasers =
1901 {
1902 {
1903 .eraseblocks = { {4 * 1024, 256} },
1904 .block_erase = spi_block_erase_20,
1905 }, {
1906 .eraseblocks = { {32 * 1024, 32} },
1907 .block_erase = spi_block_erase_52,
1908 }, {
1909 .eraseblocks = { {64 * 1024, 16} },
1910 .block_erase = spi_block_erase_d8,
1911 }, {
1912 .eraseblocks = { {1 * 1024 * 1024, 1} },
1913 .block_erase = spi_block_erase_60,
1914 }, {
1915 .eraseblocks = { {1 * 1024 * 1024, 1} },
1916 .block_erase = spi_block_erase_c7,
1917 }
1918 },
1919 .printlock = spi_prettyprint_status_register_at25df_sec,
1920 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
1921 .write = spi_chip_write_256, /* Dual I/O (0xA2) supported */
1922 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
1923 .voltage = {1650, 1950},
1924 },
1925
1926 {
1927 .vendor = "Atmel",
1928 .name = "AT25DL161",
1929 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +10001930 .manufacture_id = ATMEL_ID,
Stefan Taunerc9d8b272014-06-01 13:22:35 +00001931 .model_id = ATMEL_AT25DL161,
1932 .total_size = 2048,
1933 .page_size = 256,
1934 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1935 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
1936 .tested = TEST_UNTESTED,
1937 .probe = probe_spi_rdid,
1938 .probe_timing = TIMING_ZERO,
1939 .block_erasers =
1940 {
1941 {
1942 .eraseblocks = { {4 * 1024, 512} },
1943 .block_erase = spi_block_erase_20,
1944 }, {
1945 .eraseblocks = { {32 * 1024, 64} },
1946 .block_erase = spi_block_erase_52,
1947 }, {
1948 .eraseblocks = { {64 * 1024, 32} },
1949 .block_erase = spi_block_erase_d8,
1950 }, {
1951 .eraseblocks = { {2 * 1024 * 1024, 1} },
1952 .block_erase = spi_block_erase_60,
1953 }, {
1954 .eraseblocks = { {2 * 1024 * 1024, 1} },
1955 .block_erase = spi_block_erase_c7,
1956 }
1957 },
1958 .printlock = spi_prettyprint_status_register_at25df_sec,
1959 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
1960 .write = spi_chip_write_256, /* Dual I/O (0xA2) supported */
1961 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
1962 .voltage = {1650, 1950},
1963 },
1964
1965 {
1966 .vendor = "Atmel",
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001967 .name = "AT25DQ161",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00001968 .bustype = BUS_SPI,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001969 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00001970 .model_id = ATMEL_AT25DQ161,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001971 .total_size = 2048,
1972 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00001973 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
1974 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00001975 .tested = TEST_UNTESTED,
1976 .probe = probe_spi_rdid,
1977 .probe_timing = TIMING_ZERO,
1978 .block_erasers =
1979 {
1980 {
1981 .eraseblocks = { {4 * 1024, 512} },
1982 .block_erase = spi_block_erase_20,
1983 }, {
1984 .eraseblocks = { {32 * 1024, 64} },
1985 .block_erase = spi_block_erase_52,
1986 }, {
1987 .eraseblocks = { {64 * 1024, 32} },
1988 .block_erase = spi_block_erase_d8,
1989 }, {
1990 .eraseblocks = { {2 * 1024 * 1024, 1} },
1991 .block_erase = spi_block_erase_60,
1992 }, {
1993 .eraseblocks = { {2 * 1024 * 1024, 1} },
1994 .block_erase = spi_block_erase_c7,
1995 }
1996 },
1997 .printlock = spi_prettyprint_status_register_at25df_sec,
Stefan Taunercecb2c52013-06-20 22:55:41 +00001998 .unlock = spi_disable_blockprotect_at2x_global_unprotect_sec,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00001999 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002000 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002001 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002002 },
2003
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002004 {
2005 .vendor = "Atmel",
Alan Green1f9cc7d2019-07-01 11:10:45 +10002006 /* The A suffix indicates 33MHz instead of 20MHz clock rate.
2007 * All other properties seem to be the same.*/
2008 .name = "AT25F1024(A)",
2009 .bustype = BUS_SPI,
2010 .manufacture_id = ATMEL_ID,
2011 .model_id = ATMEL_AT25F1024,
2012 .total_size = 128,
2013 .page_size = 256,
2014 .feature_bits = FEATURE_WRSR_WREN,
2015 .tested = TEST_OK_PREW,
2016 .probe = probe_spi_at25f,
2017 .probe_timing = TIMING_ZERO,
2018 .block_erasers =
2019 {
2020 {
2021 .eraseblocks = { {32 * 1024, 4} },
2022 .block_erase = spi_block_erase_52,
2023 }, {
2024 .eraseblocks = { {128 * 1024, 1} },
2025 .block_erase = spi_block_erase_62,
2026 }
2027 },
2028 .printlock = spi_prettyprint_status_register_at25f,
2029 .unlock = spi_disable_blockprotect_at25f,
2030 .write = spi_chip_write_256,
2031 .read = spi_chip_read,
2032 .voltage = {2700, 3600},
2033 },
2034
2035 {
2036 .vendor = "Atmel",
2037 .name = "AT25F2048",
2038 .bustype = BUS_SPI,
2039 .manufacture_id = ATMEL_ID,
2040 .model_id = ATMEL_AT25F2048,
2041 .total_size = 256,
2042 .page_size = 256,
2043 .feature_bits = FEATURE_WRSR_WREN,
2044 .tested = TEST_UNTESTED,
2045 .probe = probe_spi_at25f,
2046 .probe_timing = TIMING_ZERO,
2047 .block_erasers =
2048 {
2049 {
2050 .eraseblocks = { {64 * 1024, 4} },
2051 .block_erase = spi_block_erase_52,
2052 }, {
2053 .eraseblocks = { {256 * 1024, 1} },
2054 .block_erase = spi_block_erase_62,
2055 }
2056 },
2057 .printlock = spi_prettyprint_status_register_at25f,
2058 .unlock = spi_disable_blockprotect_at25f,
2059 .write = spi_chip_write_256,
2060 .read = spi_chip_read,
2061 .voltage = {2700, 3600},
2062 },
2063
2064 {
2065 .vendor = "Atmel",
2066 .name = "AT25F4096",
2067 .bustype = BUS_SPI,
2068 .manufacture_id = ATMEL_ID,
2069 .model_id = ATMEL_AT25F4096,
2070 .total_size = 512,
2071 .page_size = 256,
2072 .feature_bits = FEATURE_WRSR_WREN,
2073 .tested = TEST_OK_PREW,
2074 .probe = probe_spi_at25f,
2075 .probe_timing = TIMING_ZERO,
2076 .block_erasers =
2077 {
2078 {
2079 .eraseblocks = { {64 * 1024, 8} },
2080 .block_erase = spi_block_erase_52,
2081 }, {
2082 .eraseblocks = { {512 * 1024, 1} },
2083 .block_erase = spi_block_erase_62,
2084 }
2085 },
2086 .printlock = spi_prettyprint_status_register_at25f4096,
2087 /* "Bits 5-6 are 0s when device is not in an internal write cycle." Better leave them alone: */
2088 .unlock = spi_disable_blockprotect_bp2_srwd,
2089 .write = spi_chip_write_256,
2090 .read = spi_chip_read,
2091 .voltage = {2700, 3600},
2092 },
2093
2094 {
2095 .vendor = "Atmel",
Stefan Tauner57794ac2012-12-29 15:04:20 +00002096 .name = "AT25F512",
2097 .bustype = BUS_SPI,
2098 .manufacture_id = ATMEL_ID,
2099 .model_id = ATMEL_AT25F512,
2100 .total_size = 64,
2101 .page_size = 256,
2102 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00002103 .tested = TEST_OK_PREW,
Stefan Tauner57794ac2012-12-29 15:04:20 +00002104 .probe = probe_spi_at25f,
2105 .probe_timing = TIMING_ZERO,
2106 .block_erasers =
2107 {
2108 {
2109 .eraseblocks = { {32 * 1024, 2} },
2110 .block_erase = spi_block_erase_52,
2111 }, {
2112 .eraseblocks = { {64 * 1024, 1} },
2113 .block_erase = spi_block_erase_62,
2114 }
2115 },
2116 .printlock = spi_prettyprint_status_register_at25f,
2117 .unlock = spi_disable_blockprotect_at25f,
2118 .write = spi_chip_write_256,
2119 .read = spi_chip_read,
2120 .voltage = {2700, 3600},
2121 },
2122
2123 {
2124 .vendor = "Atmel",
2125 .name = "AT25F512A",
2126 .bustype = BUS_SPI,
2127 .manufacture_id = ATMEL_ID,
2128 .model_id = ATMEL_AT25F512A,
2129 .total_size = 64,
2130 .page_size = 128,
2131 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00002132 .tested = TEST_OK_PREW,
Stefan Tauner57794ac2012-12-29 15:04:20 +00002133 .probe = probe_spi_at25f,
2134 .probe_timing = TIMING_ZERO,
2135 .block_erasers =
2136 {
2137 {
2138 .eraseblocks = { {32 * 1024, 2} },
2139 .block_erase = spi_block_erase_52,
2140 }, {
2141 .eraseblocks = { {64 * 1024, 1} },
2142 .block_erase = spi_block_erase_62,
2143 }
2144 },
2145 .printlock = spi_prettyprint_status_register_at25f512a,
2146 /* FIXME: It is not correct to use this one, because the BP1 bit is N/A. */
2147 .unlock = spi_disable_blockprotect_at25f512a,
2148 .write = spi_chip_write_256,
2149 .read = spi_chip_read,
2150 .voltage = {2700, 3600},
2151 },
2152
2153 {
2154 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002155 .name = "AT25F512B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002156 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002157 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002158 .model_id = ATMEL_AT25F512B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002159 .total_size = 64,
2160 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00002161 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2162 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002163 .tested = TEST_UNTESTED,
2164 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002165 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002166 .block_erasers =
2167 {
2168 {
2169 .eraseblocks = { {4 * 1024, 16} },
2170 .block_erase = spi_block_erase_20,
2171 }, {
2172 .eraseblocks = { {32 * 1024, 2} },
2173 .block_erase = spi_block_erase_52,
2174 }, {
2175 .eraseblocks = { {32 * 1024, 2} },
2176 .block_erase = spi_block_erase_d8,
2177 }, {
2178 .eraseblocks = { {64 * 1024, 1} },
2179 .block_erase = spi_block_erase_60,
2180 }, {
2181 .eraseblocks = { {64 * 1024, 1} },
2182 .block_erase = spi_block_erase_c7,
Stefan Tauner3c0fcd02012-09-21 12:46:56 +00002183 }, {
2184 .eraseblocks = { {64 * 1024, 1} },
2185 .block_erase = spi_block_erase_62,
Sean Nelson89187292009-12-23 12:02:55 +00002186 }
2187 },
Stefan Tauner7bf4ed92012-08-26 21:04:27 +00002188 .printlock = spi_prettyprint_status_register_at25f512b,
2189 .unlock = spi_disable_blockprotect_at25f512b,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002190 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002191 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002192 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002193 },
2194
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002195 {
2196 .vendor = "Atmel",
2197 .name = "AT25FS010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002198 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002199 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002200 .model_id = ATMEL_AT25FS010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002201 .total_size = 128,
2202 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002203 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunere34e3e82013-01-01 00:06:51 +00002204 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002205 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002206 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002207 .block_erasers =
2208 {
2209 {
2210 .eraseblocks = { {4 * 1024, 32} },
2211 .block_erase = spi_block_erase_20,
2212 }, {
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00002213 .eraseblocks = { {4 * 1024, 32} },
2214 .block_erase = spi_block_erase_d7,
2215 }, {
Sean Nelson89187292009-12-23 12:02:55 +00002216 .eraseblocks = { {32 * 1024, 4} },
2217 .block_erase = spi_block_erase_52,
2218 }, {
2219 .eraseblocks = { {32 * 1024, 4} },
2220 .block_erase = spi_block_erase_d8,
2221 }, {
2222 .eraseblocks = { {128 * 1024, 1} },
2223 .block_erase = spi_block_erase_60,
2224 }, {
2225 .eraseblocks = { {128 * 1024, 1} },
2226 .block_erase = spi_block_erase_c7,
2227 }
2228 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00002229 .printlock = spi_prettyprint_status_register_at25fs010,
2230 .unlock = spi_disable_blockprotect_at25fs010,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002231 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002232 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002233 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002234 },
2235
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002236 {
2237 .vendor = "Atmel",
2238 .name = "AT25FS040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002239 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002240 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002241 .model_id = ATMEL_AT25FS040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002242 .total_size = 512,
2243 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002244 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002245 .tested = TEST_UNTESTED,
2246 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002247 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002248 .block_erasers =
2249 {
2250 {
2251 .eraseblocks = { {4 * 1024, 128} },
2252 .block_erase = spi_block_erase_20,
2253 }, {
2254 .eraseblocks = { {64 * 1024, 8} },
2255 .block_erase = spi_block_erase_52,
2256 }, {
2257 .eraseblocks = { {64 * 1024, 8} },
2258 .block_erase = spi_block_erase_d8,
2259 }, {
2260 .eraseblocks = { {512 * 1024, 1} },
2261 .block_erase = spi_block_erase_60,
2262 }, {
2263 .eraseblocks = { {512 * 1024, 1} },
2264 .block_erase = spi_block_erase_c7,
2265 }
2266 },
Carl-Daniel Hailfingerfd7075a2010-07-29 13:09:18 +00002267 .printlock = spi_prettyprint_status_register_at25fs040,
2268 .unlock = spi_disable_blockprotect_at25fs040,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002269 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002270 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002271 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002272 },
2273
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002274 {
2275 .vendor = "Atmel",
jvma3ab6c62018-03-08 15:43:20 +01002276 .name = "AT25SF041",
2277 .bustype = BUS_SPI,
2278 .manufacture_id = ATMEL_ID,
2279 .model_id = ATMEL_AT25SF041,
2280 .total_size = 512,
2281 .page_size = 256,
2282 .feature_bits = FEATURE_WRSR_WREN,
2283 .tested = TEST_OK_PREW,
2284 .probe = probe_spi_rdid,
2285 .probe_timing = TIMING_ZERO,
2286 .block_erasers =
2287 {
2288 {
2289 .eraseblocks = { {4 * 1024, 128} },
2290 .block_erase = spi_block_erase_20,
2291 }, {
2292 .eraseblocks = { {32 * 1024, 16} },
2293 .block_erase = spi_block_erase_52,
2294 }, {
2295 .eraseblocks = { {64 * 1024, 8} },
2296 .block_erase = spi_block_erase_d8,
2297 }, {
2298 .eraseblocks = { {512 * 1024, 1} },
2299 .block_erase = spi_block_erase_60,
2300 }, {
2301 .eraseblocks = { {512 * 1024, 1} },
2302 .block_erase = spi_block_erase_c7,
2303 }
2304 },
2305 .printlock = spi_prettyprint_status_register_plain,
2306 .unlock = spi_disable_blockprotect,
2307 .write = spi_chip_write_256,
2308 .read = spi_chip_read,
2309 .voltage = {2500, 3600},
2310 },
2311
2312 {
2313 .vendor = "Atmel",
Evan Jensen291c1012018-05-17 14:30:19 -07002314 .name = "AT25SF081",
2315 .bustype = BUS_SPI,
2316 .manufacture_id = ATMEL_ID,
2317 .model_id = ATMEL_AT25SF081,
2318 .total_size = 1024,
2319 .page_size = 256,
2320 .feature_bits = FEATURE_WRSR_WREN,
2321 .tested = TEST_OK_PREW,
2322 .probe = probe_spi_rdid,
2323 .probe_timing = TIMING_ZERO,
2324 .block_erasers =
2325 {
2326 {
2327 .eraseblocks = { {4 * 1024, 256} },
2328 .block_erase = spi_block_erase_20,
2329 }, {
2330 .eraseblocks = { {32 * 1024, 32} },
2331 .block_erase = spi_block_erase_52,
2332 }, {
2333 .eraseblocks = { {64 * 1024, 16} },
2334 .block_erase = spi_block_erase_d8,
2335 }, {
2336 .eraseblocks = { {1024 * 1024, 1} },
2337 .block_erase = spi_block_erase_60,
2338 }, {
2339 .eraseblocks = { {1024 * 1024, 1} },
2340 .block_erase = spi_block_erase_c7,
2341 }
2342 },
2343 .printlock = spi_prettyprint_status_register_plain,
2344 .unlock = spi_disable_blockprotect,
2345 .write = spi_chip_write_256,
2346 .read = spi_chip_read,
2347 .voltage = {2300, 3600},
2348 },
2349
2350 {
2351 .vendor = "Atmel",
Stanislav Sedovf5775442018-03-07 14:16:51 -08002352 .name = "AT25SF161",
2353 .bustype = BUS_SPI,
2354 .manufacture_id = ATMEL_ID,
2355 .model_id = ATMEL_AT25SF161,
2356 .total_size = 2048,
2357 .page_size = 256,
2358 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
2359 .tested = TEST_OK_PREW,
2360 .probe = probe_spi_rdid,
2361 .probe_timing = TIMING_ZERO,
2362 .block_erasers =
2363 {
2364 {
2365 .eraseblocks = { {4 * 1024, 512} },
2366 .block_erase = spi_block_erase_20,
2367 }, {
2368 .eraseblocks = { {32 * 1024, 64} },
2369 .block_erase = spi_block_erase_52,
2370 }, {
2371 .eraseblocks = { {64 * 1024, 32} },
2372 .block_erase = spi_block_erase_d8,
2373 }, {
2374 .eraseblocks = { {2048 * 1024, 1} },
2375 .block_erase = spi_block_erase_60,
2376 }, {
2377 .eraseblocks = { {2048 * 1024, 1} },
2378 .block_erase = spi_block_erase_c7,
2379 }
2380 },
2381 .printlock = spi_prettyprint_status_register_plain,
2382 .unlock = spi_disable_blockprotect,
2383 .write = spi_chip_write_256,
2384 .read = spi_chip_read,
2385 .voltage = {2500, 3600},
2386 },
2387
2388 {
Alan Green57938f82019-06-27 15:06:43 +10002389 .vendor = "Atmel",
darkarnium41394382019-11-04 20:06:48 +00002390 .name = "AT25SF321",
2391 .bustype = BUS_SPI,
2392 .manufacture_id = ATMEL_ID,
2393 .model_id = ATMEL_AT25SF321,
2394 .total_size = 4096,
2395 .page_size = 256,
2396 .feature_bits = FEATURE_WRSR_WREN,
2397 .tested = TEST_OK_PR,
2398 .probe = probe_spi_rdid,
2399 .probe_timing = TIMING_ZERO,
2400 .block_erasers =
2401 {
2402 {
2403 .eraseblocks = { {4 * 1024, 1024} },
2404 .block_erase = spi_block_erase_20,
2405 }, {
2406 .eraseblocks = { {32 * 1024, 128} },
2407 .block_erase = spi_block_erase_52,
2408 }, {
2409 .eraseblocks = { {64 * 1024, 64} },
2410 .block_erase = spi_block_erase_d8,
2411 }, {
2412 .eraseblocks = { {4096 * 1024, 1} },
2413 .block_erase = spi_block_erase_60,
2414 }, {
2415 .eraseblocks = { {4096 * 1024, 1} },
2416 .block_erase = spi_block_erase_c7,
2417 }
2418 },
2419 .printlock = spi_prettyprint_status_register_plain,
2420 .unlock = spi_disable_blockprotect,
2421 .write = spi_chip_write_256,
2422 .read = spi_chip_read,
2423 .voltage = {2500, 3600},
2424 },
2425
2426 {
2427 .vendor = "Atmel",
Hal Martin49e23d22018-05-27 14:18:43 +02002428 .name = "AT25SL128A",
2429 .bustype = BUS_SPI,
2430 .manufacture_id = ATMEL_ID,
2431 .model_id = ATMEL_AT25SL128A,
2432 .total_size = 16384,
2433 .page_size = 256,
2434 /* supports SFDP */
Nico Huber1412d9f2024-01-06 18:25:49 +01002435 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
2436 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Hal Martin49e23d22018-05-27 14:18:43 +02002437 .tested = TEST_OK_PREW,
2438 .probe = probe_spi_rdid,
2439 .probe_timing = TIMING_ZERO,
2440 .block_erasers =
2441 {
2442 {
2443 .eraseblocks = { {4 * 1024, 4096} },
2444 .block_erase = spi_block_erase_20,
2445 }, {
2446 .eraseblocks = { {32 * 1024, 512} },
2447 .block_erase = spi_block_erase_52,
2448 }, {
2449 .eraseblocks = { {64 * 1024, 256} },
2450 .block_erase = spi_block_erase_d8,
2451 }, {
2452 .eraseblocks = { {16 * 1024 * 1024, 1} },
2453 .block_erase = spi_block_erase_60,
2454 }, {
2455 .eraseblocks = { {16 * 1024 * 1024, 1} },
2456 .block_erase = spi_block_erase_c7,
2457 }
2458 },
2459 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
2460 .unlock = spi_disable_blockprotect,
2461 .write = spi_chip_write_256,
2462 .read = spi_chip_read,
2463 .voltage = {1700, 2000},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11002464 .reg_bits =
2465 {
Nico Huber226bb872024-04-09 23:30:34 +02002466 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11002467 .srp = {STATUS1, 7, RW},
2468 .srl = {STATUS2, 0, RW},
2469 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
2470 .tb = {STATUS1, 5, RW},
2471 .sec = {STATUS1, 6, RW},
2472 .cmp = {STATUS2, 6, RW},
2473 },
Nico Huberaabb3e02023-01-13 00:22:30 +01002474 .wp_write_cfg = spi_wp_write_cfg,
2475 .wp_read_cfg = spi_wp_read_cfg,
2476 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11002477 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02002478 .prepare_access = spi_prepare_io,
2479 .finish_access = spi_finish_io,
Hal Martin49e23d22018-05-27 14:18:43 +02002480 },
2481
2482 {
Stanislav Sedovf5775442018-03-07 14:16:51 -08002483 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002484 .name = "AT26DF041",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002485 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002486 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002487 .model_id = ATMEL_AT26DF041,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002488 .total_size = 512,
2489 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002490 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Stefan Tauner94b39b42012-10-27 00:06:02 +00002491 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002492 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002493 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002494 .block_erasers =
2495 {
2496 {
Stefan Tauner94b39b42012-10-27 00:06:02 +00002497 .eraseblocks = { {256, 2048} },
2498 .block_erase = spi_block_erase_81,
2499 }, {
2500 .eraseblocks = { {2 * 1024, 256} },
2501 .block_erase = spi_block_erase_50,
2502 }, {
Sean Nelson89187292009-12-23 12:02:55 +00002503 .eraseblocks = { {4 * 1024, 128} },
2504 .block_erase = spi_block_erase_20,
2505 }
Stefan Tauner6ee37e22012-12-29 15:03:51 +00002506 },
Stefan Taunercecb2c52013-06-20 22:55:41 +00002507 .printlock = spi_prettyprint_status_register_plain,
Stefan Tauner6ee37e22012-12-29 15:03:51 +00002508 /* Supports also an incompatible page write (of exactly 256 B) and an auto-erasing write. */
Stefan Tauner94b39b42012-10-27 00:06:02 +00002509 .write = spi_chip_write_1,
2510 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +00002511 .voltage = {2700, 3600}, /* 3.0-3.6V for higher speed, 2.7-3.6V normal */
FENG yu ningff692fb2008-12-08 18:15:10 +00002512 },
2513
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002514 {
2515 .vendor = "Atmel",
2516 .name = "AT26DF081A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002517 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002518 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002519 .model_id = ATMEL_AT26DF081A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002520 .total_size = 1024,
2521 .page_size = 256,
Mathias Krause2c3afa32011-01-17 07:45:54 +00002522 .feature_bits = FEATURE_WRSR_WREN,
2523 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002524 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002525 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002526 .block_erasers =
2527 {
2528 {
2529 .eraseblocks = { {4 * 1024, 256} },
2530 .block_erase = spi_block_erase_20,
2531 }, {
2532 .eraseblocks = { {32 * 1024, 32} },
2533 .block_erase = spi_block_erase_52,
2534 }, {
2535 .eraseblocks = { {64 * 1024, 16} },
2536 .block_erase = spi_block_erase_d8,
2537 }, {
2538 .eraseblocks = { {1024 * 1024, 1} },
2539 .block_erase = spi_block_erase_60,
2540 }, {
2541 .eraseblocks = { {1024 * 1024, 1} },
2542 .block_erase = spi_block_erase_c7,
2543 }
2544 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00002545 .printlock = spi_prettyprint_status_register_at26df081a,
Stefan Taunercecb2c52013-06-20 22:55:41 +00002546 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002547 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002548 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002549 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002550 },
2551
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002552 {
2553 .vendor = "Atmel",
2554 .name = "AT26DF161",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002555 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002556 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002557 .model_id = ATMEL_AT26DF161,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002558 .total_size = 2048,
2559 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002560 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner5c316f92015-02-08 21:57:52 +00002561 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002562 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002563 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002564 .block_erasers =
2565 {
2566 {
2567 .eraseblocks = { {4 * 1024, 512} },
2568 .block_erase = spi_block_erase_20,
2569 }, {
2570 .eraseblocks = { {32 * 1024, 64} },
2571 .block_erase = spi_block_erase_52,
2572 }, {
2573 .eraseblocks = { {64 * 1024, 32} },
2574 .block_erase = spi_block_erase_d8,
2575 }, {
2576 .eraseblocks = { {2 * 1024 * 1024, 1} },
2577 .block_erase = spi_block_erase_60,
2578 }, {
2579 .eraseblocks = { {2 * 1024 * 1024, 1} },
2580 .block_erase = spi_block_erase_c7,
2581 }
2582 },
Carl-Daniel Hailfinger7a3bd8f2011-05-19 00:06:06 +00002583 .printlock = spi_prettyprint_status_register_at25df,
Stefan Taunercecb2c52013-06-20 22:55:41 +00002584 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002585 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002586 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002587 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002588 },
2589
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002590 {
2591 .vendor = "Atmel",
2592 .name = "AT26DF161A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002593 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002594 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002595 .model_id = ATMEL_AT26DF161A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002596 .total_size = 2048,
2597 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002598 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunercecb2c52013-06-20 22:55:41 +00002599 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002600 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002601 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002602 .block_erasers =
2603 {
2604 {
2605 .eraseblocks = { {4 * 1024, 512} },
2606 .block_erase = spi_block_erase_20,
2607 }, {
2608 .eraseblocks = { {32 * 1024, 64} },
2609 .block_erase = spi_block_erase_52,
2610 }, {
2611 .eraseblocks = { {64 * 1024, 32} },
2612 .block_erase = spi_block_erase_d8,
2613 }, {
2614 .eraseblocks = { {2 * 1024 * 1024, 1} },
2615 .block_erase = spi_block_erase_60,
2616 }, {
2617 .eraseblocks = { {2 * 1024 * 1024, 1} },
2618 .block_erase = spi_block_erase_c7,
2619 }
2620 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00002621 .printlock = spi_prettyprint_status_register_at26df081a,
Stefan Taunercecb2c52013-06-20 22:55:41 +00002622 .unlock = spi_disable_blockprotect_at2x_global_unprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00002623 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002624 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002625 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002626 },
2627
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002628 {
2629 .vendor = "Atmel",
2630 .name = "AT26F004",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002631 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002632 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002633 .model_id = ATMEL_AT26F004,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002634 .total_size = 512,
2635 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00002636 .feature_bits = FEATURE_WRSR_WREN,
Alan Green908adf42019-07-03 15:34:06 +10002637 .tested = {.probe = NT, .read = NT, .erase = NT, .write = BAD},
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002638 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002639 .probe_timing = TIMING_ZERO,
Sean Nelson89187292009-12-23 12:02:55 +00002640 .block_erasers =
2641 {
2642 {
2643 .eraseblocks = { {4 * 1024, 128} },
2644 .block_erase = spi_block_erase_20,
2645 }, {
2646 .eraseblocks = { {32 * 1024, 16} },
2647 .block_erase = spi_block_erase_52,
2648 }, {
2649 .eraseblocks = { {64 * 1024, 8} },
2650 .block_erase = spi_block_erase_d8,
2651 }, {
2652 .eraseblocks = { {512 * 1024, 1} },
2653 .block_erase = spi_block_erase_60,
2654 }, {
2655 .eraseblocks = { {512 * 1024, 1} },
2656 .block_erase = spi_block_erase_c7,
2657 }
2658 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00002659 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Alan Greencbb85c02019-06-25 13:42:34 +10002660 .write = NULL, /* Incompatible Page write */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002661 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002662 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00002663 },
2664
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002665 {
2666 .vendor = "Atmel",
Uwe Hermann8403ccb2009-05-16 21:39:19 +00002667 .name = "AT29C010A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002668 .bustype = BUS_PARALLEL,
Uwe Hermann8403ccb2009-05-16 21:39:19 +00002669 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002670 .model_id = ATMEL_AT29C010A,
Uwe Hermann8403ccb2009-05-16 21:39:19 +00002671 .total_size = 128,
2672 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +00002673 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00002674 .tested = TEST_OK_PRE,
Uwe Hermann8403ccb2009-05-16 21:39:19 +00002675 .probe = probe_jedec,
Maciej Pijankac6e11112009-06-03 14:46:22 +00002676 .probe_timing = 10000, /* 10mS, Enter=Exec */
Sean Nelson89187292009-12-23 12:02:55 +00002677 .block_erasers =
2678 {
2679 {
2680 .eraseblocks = { {128 * 1024, 1} },
2681 .block_erase = erase_chip_block_jedec,
2682 }
2683 },
Uwe Hermann8403ccb2009-05-16 21:39:19 +00002684 .write = write_jedec, /* FIXME */
2685 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002686 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01002687 .prepare_access = prepare_memory_access,
2688 .finish_access = finish_memory_access,
Uwe Hermann8403ccb2009-05-16 21:39:19 +00002689 },
2690
2691 {
2692 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002693 .name = "AT29C020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002694 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002695 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002696 .model_id = ATMEL_AT29C020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002697 .total_size = 256,
2698 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00002699 .feature_bits = FEATURE_LONG_RESET,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00002700 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002701 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +00002702 .probe_timing = 10000, /* 10ms */
Sean Nelson89187292009-12-23 12:02:55 +00002703 .block_erasers =
2704 {
2705 {
2706 .eraseblocks = { {256 * 1024, 1} },
2707 .block_erase = erase_chip_block_jedec,
2708 }
2709 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002710 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00002711 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002712 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01002713 .prepare_access = prepare_memory_access,
2714 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00002715 },
2716
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002717 {
2718 .vendor = "Atmel",
2719 .name = "AT29C040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002720 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002721 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002722 .model_id = ATMEL_AT29C040A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002723 .total_size = 512,
2724 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00002725 .feature_bits = FEATURE_LONG_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002726 .tested = TEST_UNTESTED,
2727 .probe = probe_jedec,
Mateusz Murawski8b2f46b2009-06-12 21:29:36 +00002728 .probe_timing = 10000, /* 10 ms */
Sean Nelson89187292009-12-23 12:02:55 +00002729 .block_erasers =
2730 {
2731 {
2732 .eraseblocks = { {512 * 1024, 1} },
2733 .block_erase = erase_chip_block_jedec,
2734 }
2735 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002736 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00002737 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002738 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01002739 .prepare_access = prepare_memory_access,
2740 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00002741 },
2742
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002743 {
2744 .vendor = "Atmel",
Alan Green1f9cc7d2019-07-01 11:10:45 +10002745 .name = "AT29C512",
2746 .bustype = BUS_PARALLEL,
2747 .manufacture_id = ATMEL_ID,
2748 .model_id = ATMEL_AT29C512,
2749 .total_size = 64,
2750 .page_size = 128,
2751 .feature_bits = FEATURE_LONG_RESET,
2752 .tested = TEST_OK_PREW,
2753 .probe = probe_jedec,
2754 .probe_timing = 10000, /* 10mS, Enter=Exec */
2755 .block_erasers =
2756 {
2757 {
2758 .eraseblocks = { {64 * 1024, 1} },
2759 .block_erase = erase_chip_block_jedec,
2760 }
2761 },
2762 .write = write_jedec,
2763 .read = read_memmapped,
2764 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01002765 .prepare_access = prepare_memory_access,
2766 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10002767 },
2768
2769 {
2770 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002771 .name = "AT45CS1282",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002772 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002773 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002774 .model_id = ATMEL_AT45CS1282,
Alan Greencbb85c02019-06-25 13:42:34 +10002775 .total_size = 16896, /* No power of two sizes */
2776 .page_size = 1056, /* No power of two sizes */
Steven Zakulec3603a282012-05-02 20:07:57 +00002777 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Stefan Tauner1dd5d3a2013-08-27 18:02:19 +00002778 /* OTP: 128B total, 64B pre-programmed; read 0x77 (4 dummy bytes); write 0x9A (via buffer) */
2779 .feature_bits = FEATURE_OTP,
2780 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002781 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002782 .probe_timing = TIMING_ZERO,
Stefan Tauner1dd5d3a2013-08-27 18:02:19 +00002783 .block_erasers =
2784 {
2785 {
2786 .eraseblocks = {
2787 {8 * 1056, 1}, /* sector 0a: opcode 50h */
2788 {248 * 1056, 1}, /* sector 0b: opcode 7Ch */
2789 {256 * 1056, 63}, /* sectors 1 - 63: opcode 7Ch */
2790 },
2791 .block_erase = spi_erase_at45cs_sector,
2792 }
2793 },
2794 .printlock = spi_prettyprint_status_register_plain,
Stefan Tauner1dd5d3a2013-08-27 18:02:19 +00002795 .write = spi_write_at45db,
2796 .read = spi_read_at45db,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002797 .voltage = {2700, 3600},
Alan Greenc1863ca2019-06-27 15:08:03 +10002798 .gran = write_gran_1056bytes,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002799 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002800
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002801 {
2802 .vendor = "Atmel",
2803 .name = "AT45DB011D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002804 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002805 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002806 .model_id = ATMEL_AT45DB011D,
Alan Greencbb85c02019-06-25 13:42:34 +10002807 .total_size = 128, /* or 132, determined from status register */
2808 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002809 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002810 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2811 .feature_bits = FEATURE_OTP,
Stefan Tauner5c316f92015-02-08 21:57:52 +00002812 .tested = TEST_OK_PREW,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002813 .probe = probe_spi_at45db,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002814 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002815 .block_erasers =
2816 {
2817 {
2818 .eraseblocks = { {256, 512} },
2819 .block_erase = spi_erase_at45db_page,
2820 }, {
2821 .eraseblocks = { {8 * 256, 512/8} },
2822 .block_erase = spi_erase_at45db_block,
2823 }, {
2824 .eraseblocks = {
2825 {8 * 256, 1},
2826 {120 * 256, 1},
2827 {128 * 256, 3},
2828 },
2829 .block_erase = spi_erase_at45db_sector
2830 }, {
2831 .eraseblocks = { {128 * 1024, 1} },
2832 .block_erase = spi_erase_at45db_chip,
2833 }
2834 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002835 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002836 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002837 /* granularity will be set by the probing function. */
2838 .write = spi_write_at45db,
2839 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002840 .voltage = {2700, 3600},
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002841 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002842
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002843 {
2844 .vendor = "Atmel",
2845 .name = "AT45DB021D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002846 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002847 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002848 .model_id = ATMEL_AT45DB021D,
Alan Greencbb85c02019-06-25 13:42:34 +10002849 .total_size = 256, /* or 264, determined from status register */
2850 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002851 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002852 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2853 .feature_bits = FEATURE_OTP,
Stefan Tauner6697f712014-08-06 15:09:15 +00002854 .tested = TEST_OK_PREW,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002855 .probe = probe_spi_at45db,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002856 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002857 .block_erasers =
2858 {
2859 {
2860 .eraseblocks = { {256, 1024} },
2861 .block_erase = spi_erase_at45db_page,
2862 }, {
2863 .eraseblocks = { {8 * 256, 1024/8} },
2864 .block_erase = spi_erase_at45db_block,
2865 }, {
2866 .eraseblocks = {
2867 {8 * 256, 1},
2868 {120 * 256, 1},
2869 {128 * 256, 7},
2870 },
2871 .block_erase = spi_erase_at45db_sector
2872 }, {
2873 .eraseblocks = { {256 * 1024, 1} },
2874 .block_erase = spi_erase_at45db_chip,
2875 }
2876 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002877 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002878 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002879 /* granularity will be set by the probing function. */
2880 .write = spi_write_at45db,
2881 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00002882 .voltage = {2700, 3600},
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002883 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002884
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002885 {
2886 .vendor = "Atmel",
2887 .name = "AT45DB041D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002888 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002889 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002890 .model_id = ATMEL_AT45DB041D,
Alan Greencbb85c02019-06-25 13:42:34 +10002891 .total_size = 512, /* or 528, determined from status register */
2892 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002893 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002894 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2895 .feature_bits = FEATURE_OTP,
2896 .tested = TEST_OK_PREW,
2897 .probe = probe_spi_at45db,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002898 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002899 .block_erasers =
2900 {
2901 {
2902 .eraseblocks = { {256, 2048} },
2903 .block_erase = spi_erase_at45db_page,
2904 }, {
2905 .eraseblocks = { {8 * 256, 2048/8} },
2906 .block_erase = spi_erase_at45db_block,
2907 }, {
2908 .eraseblocks = {
2909 {8 * 256, 1},
2910 {248 * 256, 1},
2911 {256 * 256, 7},
2912 },
2913 .block_erase = spi_erase_at45db_sector
2914 }, {
2915 .eraseblocks = { {512 * 1024, 1} },
2916 .block_erase = spi_erase_at45db_chip,
2917 }
2918 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002919 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002920 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002921 /* granularity will be set by the probing function. */
2922 .write = spi_write_at45db,
2923 .read = spi_read_at45db, /* Fast read (0x0B) supported */
2924 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002925 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002926
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002927 {
2928 .vendor = "Atmel",
2929 .name = "AT45DB081D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002930 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002931 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002932 .model_id = ATMEL_AT45DB081D,
Alan Greencbb85c02019-06-25 13:42:34 +10002933 .total_size = 1024, /* or 1056, determined from status register */
2934 .page_size = 256, /* or 264, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002935 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002936 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2937 .feature_bits = FEATURE_OTP,
Angel Pons250aeba2018-09-30 20:28:22 +02002938 .tested = TEST_OK_PREW,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002939 .probe = probe_spi_at45db,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002940 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002941 .block_erasers =
2942 {
2943 {
2944 .eraseblocks = { {256, 4096} },
2945 .block_erase = spi_erase_at45db_page,
2946 }, {
2947 .eraseblocks = { {8 * 256, 4096/8} },
2948 .block_erase = spi_erase_at45db_block,
2949 }, {
2950 .eraseblocks = {
2951 {8 * 256, 1},
2952 {248 * 256, 1},
2953 {256 * 256, 15},
2954 },
2955 .block_erase = spi_erase_at45db_sector
2956 }, {
2957 .eraseblocks = { {1024 * 1024, 1} },
2958 .block_erase = spi_erase_at45db_chip,
2959 }
2960 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002961 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10002962 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002963 /* granularity will be set by the probing function. */
2964 .write = spi_write_at45db,
2965 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +00002966 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00002967 },
FENG yu ningff692fb2008-12-08 18:15:10 +00002968
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002969 {
2970 .vendor = "Atmel",
2971 .name = "AT45DB161D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00002972 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00002973 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00002974 .model_id = ATMEL_AT45DB161D,
Alan Greencbb85c02019-06-25 13:42:34 +10002975 .total_size = 2048, /* or 2112, determined from status register */
2976 .page_size = 512, /* or 528, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00002977 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002978 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
2979 .feature_bits = FEATURE_OTP,
2980 .tested = TEST_OK_PREW,
2981 .probe = probe_spi_at45db,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00002982 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00002983 .block_erasers =
2984 {
2985 {
2986 .eraseblocks = { {512, 4096} },
2987 .block_erase = spi_erase_at45db_page,
2988 }, {
2989 .eraseblocks = { {8 * 512, 4096/8} },
2990 .block_erase = spi_erase_at45db_block,
2991 }, {
2992 .eraseblocks = {
2993 {8 * 512, 1},
2994 {248 * 512, 1},
2995 {256 * 512, 15},
2996 },
2997 .block_erase = spi_erase_at45db_sector
2998 }, {
2999 .eraseblocks = { {2048 * 1024, 1} },
3000 .block_erase = spi_erase_at45db_chip,
3001 }
3002 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003003 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10003004 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003005 /* granularity will be set by the probing function. */
3006 .write = spi_write_at45db,
3007 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +00003008 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003009 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003010
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003011 {
3012 .vendor = "Atmel",
3013 .name = "AT45DB321C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003014 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003015 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003016 .model_id = ATMEL_AT45DB321C,
Alan Greencbb85c02019-06-25 13:42:34 +10003017 .total_size = 4224, /* No power of two sizes */
3018 .page_size = 528, /* No power of two sizes */
Steven Zakulec3603a282012-05-02 20:07:57 +00003019 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003020 /* OTP: 128B total, 64B pre-programmed; read 0x77 (4 dummy bytes); write 0x9A (via buffer) */
3021 .feature_bits = FEATURE_OTP,
3022 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003023 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00003024 .probe_timing = TIMING_ZERO,
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003025 .block_erasers =
3026 {
3027 {
3028 .eraseblocks = { {528, 8192} },
3029 .block_erase = spi_erase_at45db_page,
3030 }, {
3031 .eraseblocks = { {8 * 528, 8192/8} },
3032 .block_erase = spi_erase_at45db_block,
3033 }, /* Although the datasheets describes sectors (which can be write protected)
3034 * there seems to be no erase functions for them.
Stefan Tauner23e10b82016-01-23 16:16:49 +00003035 {
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003036 .eraseblocks = {
3037 {8 * 528, 1},
3038 {120 * 528, 1},
3039 {128 * 528, 63},
3040 },
3041 .block_erase = spi_erase_at45db_sector
3042 }, */ {
3043 .eraseblocks = { {4224 * 1024, 1} },
3044 .block_erase = spi_erase_at45db_chip,
3045 }
3046 },
3047 .printlock = spi_prettyprint_status_register_at45db, /* Bit 0 is undefined, no lockdown */
Stefan Taunerfdc4f7e2013-08-27 18:02:12 +00003048 .write = spi_write_at45db,
3049 .read = spi_read_at45db_e8, /* 3 address and 4 dummy bytes */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003050 .voltage = {2700, 3600},
Alan Greenc1863ca2019-06-27 15:08:03 +10003051 .gran = write_gran_528bytes,
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003052 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003053
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003054 {
3055 .vendor = "Atmel",
3056 .name = "AT45DB321D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003057 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003058 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003059 .model_id = ATMEL_AT45DB321D,
Alan Greencbb85c02019-06-25 13:42:34 +10003060 .total_size = 4096, /* or 4224, determined from status register */
3061 .page_size = 512, /* or 528, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00003062 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003063 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
Daniel Lenski65922a32012-02-15 23:40:23 +00003064 .feature_bits = FEATURE_OTP,
Stefan Tauner23e10b82016-01-23 16:16:49 +00003065 .tested = TEST_OK_PREW,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003066 .probe = probe_spi_at45db,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00003067 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003068 .block_erasers =
3069 {
3070 {
3071 .eraseblocks = { {512, 8192} },
3072 .block_erase = spi_erase_at45db_page,
3073 }, {
3074 .eraseblocks = { {8 * 512, 8192/8} },
3075 .block_erase = spi_erase_at45db_block,
3076 }, {
3077 .eraseblocks = {
3078 {8 * 512, 1},
3079 {120 * 512, 1},
3080 {128 * 512, 63},
3081 },
3082 .block_erase = spi_erase_at45db_sector
3083 }, {
3084 .eraseblocks = { {4096 * 1024, 1} },
3085 .block_erase = spi_erase_at45db_chip,
3086 }
3087 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003088 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10003089 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003090 /* granularity will be set by the probing function. */
3091 .write = spi_write_at45db,
3092 .read = spi_read_at45db, /* Fast read (0x0B) supported */
3093 .voltage = {2700, 3600}, /* 2.5-3.6V & 2.7-3.6V models available */
3094 },
3095
3096 {
3097 .vendor = "Atmel",
3098 .name = "AT45DB321E",
3099 .bustype = BUS_SPI,
3100 .manufacture_id = ATMEL_ID,
3101 .model_id = ATMEL_AT45DB321C,
Alan Greencbb85c02019-06-25 13:42:34 +10003102 .total_size = 4096, /* or 4224, determined from status register */
3103 .page_size = 512, /* or 528, determined from status register */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003104 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
3105 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
3106 .feature_bits = FEATURE_OTP,
3107 .tested = TEST_UNTESTED,
3108 .probe = probe_spi_at45db,
3109 .probe_timing = TIMING_ZERO,
3110 .block_erasers =
3111 {
3112 {
3113 .eraseblocks = { {512, 8192} },
3114 .block_erase = spi_erase_at45db_page,
3115 }, {
3116 .eraseblocks = { {8 * 512, 8192/8} },
3117 .block_erase = spi_erase_at45db_block,
3118 }, {
3119 .eraseblocks = {
3120 {8 * 512, 1},
3121 {120 * 512, 1},
3122 {128 * 512, 63},
3123 },
3124 .block_erase = spi_erase_at45db_sector
3125 }, {
3126 .eraseblocks = { {4096 * 1024, 1} },
3127 .block_erase = spi_erase_at45db_chip,
3128 }
3129 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003130 .printlock = spi_prettyprint_status_register_at45db, /* has a 2nd status register */
Alan Greenc1863ca2019-06-27 15:08:03 +10003131 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003132 /* granularity will be set by the probing function. */
3133 .write = spi_write_at45db,
3134 .read = spi_read_at45db, /* Fast read (0x0B) supported */
3135 .voltage = {2500, 3600}, /* 2.3-3.6V & 2.5-3.6V models available */
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003136 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003137
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003138 {
3139 .vendor = "Atmel",
3140 .name = "AT45DB642D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003141 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003142 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003143 .model_id = ATMEL_AT45DB642D,
Alan Greencbb85c02019-06-25 13:42:34 +10003144 .total_size = 8192, /* or 8448, determined from status register */
3145 .page_size = 1024, /* or 1056, determined from status register */
Steven Zakulec3603a282012-05-02 20:07:57 +00003146 /* does not support EWSR nor WREN and has no writable status register bits whatsoever */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003147 /* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
3148 .feature_bits = FEATURE_OTP,
Stefan Tauner5c316f92015-02-08 21:57:52 +00003149 .tested = TEST_OK_PREW,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003150 .probe = probe_spi_at45db,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00003151 .probe_timing = TIMING_ZERO,
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003152 .block_erasers =
3153 {
3154 {
3155 .eraseblocks = { {1024, 8192} },
3156 .block_erase = spi_erase_at45db_page,
3157 }, {
3158 .eraseblocks = { {8 * 1024, 8192/8} },
3159 .block_erase = spi_erase_at45db_block,
3160 }, {
3161 .eraseblocks = {
3162 {8 * 1024, 1},
3163 {248 * 1024, 1},
3164 {256 * 1024, 31},
3165 },
3166 .block_erase = spi_erase_at45db_sector
3167 }, {
3168 .eraseblocks = { {8192 * 1024, 1} },
3169 .block_erase = spi_erase_at45db_chip,
3170 }
3171 },
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003172 .printlock = spi_prettyprint_status_register_at45db,
Alan Greenc1863ca2019-06-27 15:08:03 +10003173 .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
Aidan Thorntondb4e87d2013-08-27 18:01:53 +00003174 /* granularity will be set by the probing function. */
3175 .write = spi_write_at45db,
3176 .read = spi_read_at45db, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003177 .voltage = {2700, 3600},
Carl-Daniel Hailfinger66afb362009-03-19 12:18:13 +00003178 },
FENG yu ningff692fb2008-12-08 18:15:10 +00003179
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003180 {
3181 .vendor = "Atmel",
Alan Green1f9cc7d2019-07-01 11:10:45 +10003182 .name = "AT49(H)F010",
3183 .bustype = BUS_PARALLEL,
3184 .manufacture_id = ATMEL_ID,
3185 .model_id = ATMEL_AT49F010,
3186 .total_size = 128,
3187 .page_size = 0, /* unused */
3188 .feature_bits = FEATURE_EITHER_RESET,
3189 .tested = TEST_OK_PREW,
3190 .probe = probe_jedec,
3191 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3192 .block_erasers =
3193 {
3194 {
3195 .eraseblocks = { {128 * 1024, 1} },
3196 .block_erase = erase_chip_block_jedec,
3197 }
3198 },
3199 .printlock = printlock_at49f,
3200 .write = write_jedec_1,
3201 .read = read_memmapped,
3202 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003203 .prepare_access = prepare_memory_access,
3204 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003205 },
3206
3207 {
3208 .vendor = "Atmel",
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003209 .name = "AT49BV512",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003210 .bustype = BUS_PARALLEL,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003211 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003212 .model_id = ATMEL_AT49BV512,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003213 .total_size = 64,
3214 .page_size = 64,
Sean Nelson35727f72010-01-28 23:55:12 +00003215 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner8179be52011-06-04 13:13:34 +00003216 .tested = TEST_OK_PREW,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003217 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00003218 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson89187292009-12-23 12:02:55 +00003219 .block_erasers =
3220 {
3221 {
3222 .eraseblocks = { {64 * 1024, 1} },
3223 .block_erase = erase_chip_block_jedec,
3224 }
3225 },
Sean Nelson35727f72010-01-28 23:55:12 +00003226 .write = write_jedec_1,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003227 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003228 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01003229 .prepare_access = prepare_memory_access,
3230 .finish_access = finish_memory_access,
Uwe Hermannb4dcb712009-05-13 11:36:06 +00003231 },
3232
3233 {
3234 .vendor = "Atmel",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003235 .name = "AT49F002(N)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003236 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003237 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003238 .model_id = ATMEL_AT49F002N,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003239 .total_size = 256,
3240 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00003241 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003242 .tested = TEST_UNTESTED,
3243 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00003244 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson89187292009-12-23 12:02:55 +00003245 .block_erasers =
3246 {
3247 {
3248 .eraseblocks = {
3249 {16 * 1024, 1},
3250 {8 * 1024, 2},
3251 {96 * 1024, 1},
3252 {128 * 1024, 1},
3253 },
3254 .block_erase = erase_sector_jedec,
3255 }, {
3256 .eraseblocks = { {256 * 1024, 1} },
3257 .block_erase = erase_chip_block_jedec,
3258 }
3259 },
Sean Nelson35727f72010-01-28 23:55:12 +00003260 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00003261 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003262 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003263 .prepare_access = prepare_memory_access,
3264 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00003265 },
3266
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003267 {
3268 .vendor = "Atmel",
3269 .name = "AT49F002(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003270 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003271 .manufacture_id = ATMEL_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003272 .model_id = ATMEL_AT49F002NT,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003273 .total_size = 256,
3274 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00003275 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00003276 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003277 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00003278 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson89187292009-12-23 12:02:55 +00003279 .block_erasers =
3280 {
3281 {
3282 .eraseblocks = {
3283 {128 * 1024, 1},
3284 {96 * 1024, 1},
3285 {8 * 1024, 2},
3286 {16 * 1024, 1},
3287 },
3288 .block_erase = erase_sector_jedec,
3289 }, {
3290 .eraseblocks = { {256 * 1024, 1} },
3291 .block_erase = erase_chip_block_jedec,
3292 }
3293 },
Sean Nelson35727f72010-01-28 23:55:12 +00003294 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00003295 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003296 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003297 .prepare_access = prepare_memory_access,
3298 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00003299 },
3300
Daniel Lenskidf90d3a2010-07-22 11:44:38 +00003301 {
Uwe Hermannc74e9772011-09-08 19:55:18 +00003302 .vendor = "Atmel",
David Borgf5a30f62012-04-15 13:16:32 +00003303 .name = "AT49F020",
3304 .bustype = BUS_PARALLEL,
3305 .manufacture_id = ATMEL_ID,
3306 .model_id = ATMEL_AT49F020,
3307 .total_size = 256,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003308 .page_size = 0, /* unused */
David Borgf5a30f62012-04-15 13:16:32 +00003309 .feature_bits = FEATURE_EITHER_RESET,
3310 .tested = TEST_OK_PRE,
3311 .probe = probe_jedec,
3312 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3313 .block_erasers =
3314 {
3315 {
3316 .eraseblocks = { {256 * 1024, 1} },
3317 .block_erase = erase_chip_block_jedec,
3318 }
3319 /* Chip features an optional permanent write protection
3320 * of the first 8 kB. The erase function is the same as
3321 * above, but 00000H to 01FFFH will not be erased.
3322 * FIXME: add another eraser when partial erasers are
3323 * supported.
3324 */
3325 },
3326 .printlock = printlock_at49f,
3327 .write = write_jedec_1,
3328 .read = read_memmapped,
3329 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003330 .prepare_access = prepare_memory_access,
3331 .finish_access = finish_memory_access,
David Borgf5a30f62012-04-15 13:16:32 +00003332 },
3333
3334 {
3335 .vendor = "Atmel",
3336 .name = "AT49F040",
3337 .bustype = BUS_PARALLEL,
3338 .manufacture_id = ATMEL_ID,
3339 .model_id = ATMEL_AT49F040,
3340 .total_size = 512,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003341 .page_size = 0, /* unused */
David Borgf5a30f62012-04-15 13:16:32 +00003342 .feature_bits = FEATURE_EITHER_RESET,
3343 .tested = TEST_UNTESTED,
3344 .probe = probe_jedec,
3345 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3346 .block_erasers =
3347 {
3348 {
3349 .eraseblocks = { {512 * 1024, 1} },
3350 .block_erase = erase_chip_block_jedec,
3351 }
3352 /* Chip features an optional permanent write protection
3353 * of the first 16 kB. The erase function is the same as
3354 * above, but 00000H to 03FFFH will not be erased.
3355 * FIXME: add another eraser when partial erasers are
3356 * supported.
3357 */
3358 },
3359 .printlock = printlock_at49f,
3360 .write = write_jedec_1,
3361 .read = read_memmapped,
3362 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003363 .prepare_access = prepare_memory_access,
3364 .finish_access = finish_memory_access,
David Borgf5a30f62012-04-15 13:16:32 +00003365 },
3366
3367 {
3368 .vendor = "Atmel",
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003369 .name = "AT49F080",
3370 .bustype = BUS_PARALLEL,
3371 .manufacture_id = ATMEL_ID,
3372 .model_id = ATMEL_AT49F080,
3373 .total_size = 1024,
3374 .page_size = 0, /* unused */
3375 .feature_bits = FEATURE_EITHER_RESET,
3376 .tested = TEST_UNTESTED,
3377 .probe = probe_jedec,
3378 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3379 .block_erasers =
3380 {
3381 {
3382 .eraseblocks = { {1024 * 1024, 1} },
3383 .block_erase = erase_chip_block_jedec,
3384 }
3385 /* Chip features an optional permanent write protection
3386 * of the first 16 kB. The erase function is the same as
3387 * above, but 00000H to 03FFFH will not be erased.
3388 * FIXME: add another eraser when partial erasers are
3389 * supported.
3390 */
3391 },
3392 .printlock = printlock_at49f,
3393 .write = write_jedec_1,
3394 .read = read_memmapped,
3395 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003396 .prepare_access = prepare_memory_access,
3397 .finish_access = finish_memory_access,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003398 },
3399
3400 {
3401 /* 'top' version of AT49F080. equal in all aspects but the boot block address */
3402 .vendor = "Atmel",
3403 .name = "AT49F080T",
3404 .bustype = BUS_PARALLEL,
3405 .manufacture_id = ATMEL_ID,
3406 .model_id = ATMEL_AT49F080T,
3407 .total_size = 1024,
3408 .page_size = 0, /* unused */
3409 .feature_bits = FEATURE_EITHER_RESET,
3410 .tested = TEST_UNTESTED,
3411 .probe = probe_jedec,
3412 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3413 .block_erasers =
3414 {
3415 {
3416 .eraseblocks = { {1024 * 1024, 1} },
3417 .block_erase = erase_chip_block_jedec,
3418 }
3419 /* Chip features an optional permanent write protection
3420 * of the first 16 kB. The erase function is the same as
3421 * above, but FC000H to FFFFFH will not be erased.
3422 * FIXME: add another eraser when partial erasers are
3423 * supported.
3424 */
3425 },
3426 .printlock = printlock_at49f,
3427 .write = write_jedec_1,
3428 .read = read_memmapped,
3429 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003430 .prepare_access = prepare_memory_access,
3431 .finish_access = finish_memory_access,
Andrew Morgan8dd97f92012-08-13 23:43:46 +00003432 },
3433
3434 {
3435 .vendor = "Atmel",
Uwe Hermannc74e9772011-09-08 19:55:18 +00003436 .name = "AT49LH002",
3437 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
3438 .manufacture_id = ATMEL_ID,
3439 .model_id = ATMEL_AT49LH002,
3440 .total_size = 256,
3441 .page_size = 0, /* unused */
Uwe Hermannc74e9772011-09-08 19:55:18 +00003442 .tested = TEST_UNTESTED,
Stefan Tauner7de93932014-08-03 13:05:45 +00003443 .probe = probe_82802ab,
3444 .probe_timing = TIMING_ZERO,
Uwe Hermannc74e9772011-09-08 19:55:18 +00003445 .block_erasers =
3446 {
3447 {
3448 .eraseblocks = {
3449 {64 * 1024, 3},
3450 {32 * 1024, 1},
3451 {8 * 1024, 2},
3452 {16 * 1024, 1},
3453 },
Stefan Tauner7de93932014-08-03 13:05:45 +00003454 .block_erase = NULL, /* TODO: Implement. */
Uwe Hermannc74e9772011-09-08 19:55:18 +00003455 }, {
3456 .eraseblocks = {
3457 {64 * 1024, 4},
3458 },
Stefan Tauner7de93932014-08-03 13:05:45 +00003459 .block_erase = erase_block_82802ab,
3460 },
3461 },
3462 .printlock = printlock_regspace2_block_eraser_0,
3463 .unlock = unlock_regspace2_block_eraser_0,
3464 .write = write_82802ab,
3465 .read = read_memmapped,
3466 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01003467 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01003468 .finish_access = finish_memory_access,
Stefan Tauner7de93932014-08-03 13:05:45 +00003469 },
3470
3471 {
3472 .vendor = "Atmel",
Stefan Tauner7de93932014-08-03 13:05:45 +00003473 .name = "AT49LH004",
3474 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
3475 .manufacture_id = ATMEL_ID,
3476 .model_id = ATMEL_AT49LH004,
3477 .total_size = 512,
3478 .page_size = 0, /* unused */
Stefan Tauner7de93932014-08-03 13:05:45 +00003479 .tested = TEST_UNTESTED,
3480 .probe = probe_82802ab,
3481 .probe_timing = TIMING_ZERO,
3482 .block_erasers =
3483 {
3484 {
3485 .eraseblocks = {
3486 {64 * 1024, 7},
3487 {32 * 1024, 1},
3488 {8 * 1024, 2},
3489 {16 * 1024, 1},
3490 },
3491 .block_erase = erase_block_82802ab,
3492 }, {
3493 .eraseblocks = {
3494 {64 * 1024, 8},
3495 },
Uwe Hermannc74e9772011-09-08 19:55:18 +00003496 .block_erase = NULL, /* TODO: Implement. */
3497 },
3498 },
Stefan Tauner7de93932014-08-03 13:05:45 +00003499 .printlock = printlock_regspace2_block_eraser_0,
3500 .unlock = unlock_regspace2_block_eraser_0,
Uwe Hermannc74e9772011-09-08 19:55:18 +00003501 .write = write_82802ab,
3502 .read = read_memmapped,
3503 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01003504 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01003505 .finish_access = finish_memory_access,
Uwe Hermannc74e9772011-09-08 19:55:18 +00003506 },
3507
3508 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003509 .vendor = "Atmel",
3510 .name = "AT49LH00B4",
3511 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
3512 .manufacture_id = ATMEL_ID,
3513 .model_id = ATMEL_AT49LH00B4,
3514 .total_size = 512,
Andrew Morganca081462011-09-13 22:05:44 +00003515 .page_size = 0, /* unused */
Alan Green1f9cc7d2019-07-01 11:10:45 +10003516 .tested = TEST_UNTESTED,
3517 .probe = probe_82802ab,
Andrew Morganca081462011-09-13 22:05:44 +00003518 .probe_timing = TIMING_ZERO,
3519 .block_erasers =
3520 {
3521 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003522 .eraseblocks = {
3523 {8 * 1024, 2},
3524 {16 * 1024, 1},
3525 {32 * 1024, 1},
3526 {64 * 1024, 7},
3527 },
3528 .block_erase = NULL, /* TODO: Implement. */
3529 }, {
3530 .eraseblocks = {
3531 {64 * 1024, 8},
3532 },
3533 .block_erase = erase_block_82802ab,
Andrew Morganca081462011-09-13 22:05:44 +00003534 },
3535 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10003536 .printlock = printlock_regspace2_block_eraser_0,
3537 .unlock = unlock_regspace2_block_eraser_0,
3538 .write = write_82802ab,
Andrew Morganca081462011-09-13 22:05:44 +00003539 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003540 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01003541 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01003542 .finish_access = finish_memory_access,
Andrew Morganca081462011-09-13 22:05:44 +00003543 },
3544
3545 {
Angel Pons1ebda782021-04-20 21:39:11 +02003546 .vendor = "Boya/BoHong Microelectronics",
Christian Kudera475a7ee2021-04-20 22:50:01 +02003547 .name = "B.25D16A",
3548 .bustype = BUS_SPI,
3549 .manufacture_id = BOYA_BOHONG_ID,
3550 .model_id = BOYA_BOHONG_B_25D16A,
3551 .total_size = 2048,
3552 .page_size = 256,
3553 .feature_bits = FEATURE_WRSR_WREN,
3554 .tested = TEST_OK_PR,
3555 .probe = probe_spi_rdid,
3556 .probe_timing = TIMING_ZERO,
3557 .block_erasers =
3558 {
3559 {
3560 .eraseblocks = { {4 * 1024, 512} },
3561 .block_erase = spi_block_erase_20,
3562 }, {
3563 .eraseblocks = { {32 * 1024, 64} },
3564 .block_erase = spi_block_erase_52,
3565 }, {
3566 .eraseblocks = { {64 * 1024, 32} },
3567 .block_erase = spi_block_erase_d8,
3568 }, {
3569 .eraseblocks = { {2 * 1024 * 1024, 1} },
3570 .block_erase = spi_block_erase_60,
3571 }, {
3572 .eraseblocks = { {2 * 1024 * 1024, 1} },
3573 .block_erase = spi_block_erase_c7,
3574 }
3575 },
3576 .printlock = spi_prettyprint_status_register_bp2_srwd,
3577 .unlock = spi_disable_blockprotect_bp2_srwd,
3578 .write = spi_chip_write_256,
3579 .read = spi_chip_read,
3580 .voltage = {2700, 3600},
3581 },
3582
3583 {
3584 .vendor = "Boya/BoHong Microelectronics",
Angel Pons1ebda782021-04-20 21:39:11 +02003585 .name = "B.25Q128AS",
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003586 .bustype = BUS_SPI,
Angel Pons1ebda782021-04-20 21:39:11 +02003587 .manufacture_id = BOYA_BOHONG_ID,
3588 .model_id = BOYA_BOHONG_B_25Q128AS,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003589 .total_size = 16384,
3590 .page_size = 256,
Nico Huber226bb872024-04-09 23:30:34 +02003591 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
3592 FEATURE_OTP | FEATURE_QIO,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003593 .tested = TEST_OK_PREW,
3594 .probe = probe_spi_rdid,
3595 .probe_timing = TIMING_ZERO,
3596 .block_erasers =
3597 {
3598 {
3599 .eraseblocks = { {4 * 1024, 4096} },
3600 .block_erase = spi_block_erase_20,
3601 }, {
3602 .eraseblocks = { {32 * 1024, 512} },
3603 .block_erase = spi_block_erase_52,
3604 }, {
3605 .eraseblocks = { {64 * 1024, 256} },
3606 .block_erase = spi_block_erase_d8,
3607 }, {
3608 .eraseblocks = { {16 * 1024 * 1024, 1} },
3609 .block_erase = spi_block_erase_60,
3610 }, {
3611 .eraseblocks = { {16 * 1024 * 1024, 1} },
3612 .block_erase = spi_block_erase_c7,
3613 }
3614 },
Nico Huber226bb872024-04-09 23:30:34 +02003615 .reg_bits =
3616 {
3617 .qe = {STATUS2, 1, RW},
3618 },
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003619 .printlock = spi_prettyprint_status_register_plain,
3620 .unlock = spi_disable_blockprotect_at25fs040,
3621 .write = spi_chip_write_256,
3622 .read = spi_chip_read,
3623 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02003624 .prepare_access = spi_prepare_io,
3625 .finish_access = spi_finish_io,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003626 },
3627
3628 {
Joshua Roysf1324e02010-09-16 00:51:51 +00003629 .vendor = "Bright",
3630 .name = "BM29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003631 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +00003632 .manufacture_id = BRIGHT_ID,
3633 .model_id = BRIGHT_BM29F040,
3634 .total_size = 512,
3635 .page_size = 64 * 1024,
3636 .feature_bits = FEATURE_EITHER_RESET,
3637 .tested = TEST_OK_PR,
3638 .probe = probe_jedec,
3639 .probe_timing = TIMING_ZERO,
3640 .block_erasers =
3641 {
3642 {
3643 .eraseblocks = { {64 * 1024, 8} },
3644 .block_erase = erase_sector_jedec,
3645 }, {
3646 .eraseblocks = { {512 * 1024, 1} },
3647 .block_erase = erase_chip_block_jedec,
3648 },
3649 },
3650 .write = write_jedec_1,
3651 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00003652 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003653 .prepare_access = prepare_memory_access,
3654 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +00003655 },
3656
3657 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003658 .vendor = "Catalyst",
3659 .name = "CAT28F512",
3660 .bustype = BUS_PARALLEL,
3661 .manufacture_id = CATALYST_ID,
3662 .model_id = CATALYST_CAT28F512,
3663 .total_size = 64,
3664 .page_size = 0, /* unused */
3665 .feature_bits = 0,
Alan Green908adf42019-07-03 15:34:06 +10003666 .tested = {.probe = OK, .read = OK, .erase = BAD, .write = BAD},
Alan Green1f9cc7d2019-07-01 11:10:45 +10003667 .probe = probe_jedec, /* FIXME! */
3668 .probe_timing = TIMING_ZERO,
3669 .block_erasers =
3670 {
3671 {
3672 .eraseblocks = { {64 * 1024, 1} },
3673 .block_erase = NULL, /* TODO */
3674 },
3675 },
3676 .write = NULL, /* TODO */
3677 .read = read_memmapped,
3678 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003679 .prepare_access = prepare_memory_access,
3680 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003681 },
3682
3683 {
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03003684 .vendor = "ENE",
3685 .name = "KB9012 (EDI)",
3686 .bustype = BUS_SPI,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03003687 .total_size = 128,
3688 .page_size = 128,
3689 .feature_bits = FEATURE_ERASED_ZERO,
3690 .tested = TEST_OK_PREW,
Alan Greenc1863ca2019-06-27 15:08:03 +10003691 .spi_cmd_set = SPI_EDI,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03003692 .probe = edi_probe_kb9012,
3693 .probe_timing = TIMING_ZERO,
3694 .block_erasers =
3695 {
3696 {
3697 .eraseblocks = { {128, 1024} },
3698 .block_erase = edi_chip_block_erase,
3699 },
3700 },
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03003701 .write = edi_chip_write,
3702 .read = edi_chip_read,
3703 .voltage = {2700, 3600},
Alan Greenc1863ca2019-06-27 15:08:03 +10003704 .gran = write_gran_128bytes,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03003705 },
3706
3707 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003708 .vendor = "ESI",
3709 .name = "ES25P16",
3710 .bustype = BUS_SPI,
3711 .manufacture_id = EXCEL_ID_NOPREFIX,
3712 .model_id = EXCEL_ES25P16,
3713 .total_size = 2 * 1024,
3714 .page_size = 256,
3715 /* 256-byte parameter page separate from memory array:
3716 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
3717 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003718 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003719 .probe = probe_spi_rdid,
3720 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00003721 .block_erasers =
3722 {
3723 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003724 .eraseblocks = { {64 * 1024, 32} },
3725 .block_erase = spi_block_erase_d8,
Sean Nelson54596372010-01-09 05:30:14 +00003726 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003727 .eraseblocks = { {2 * 1024 * 1024, 1} },
3728 .block_erase = spi_block_erase_c7,
Sean Nelson54596372010-01-09 05:30:14 +00003729 }
3730 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10003731 .printlock = spi_prettyprint_status_register_bp2_srwd,
3732 .unlock = spi_disable_blockprotect_bp2_srwd,
3733 .write = spi_chip_write_256,
3734 .read = spi_chip_read, /* Fast Read (0x0B) supported */
3735 .voltage = {2700, 3600},
3736 },
3737
3738 {
3739 .vendor = "ESI",
3740 .name = "ES25P40",
3741 .bustype = BUS_SPI,
3742 .manufacture_id = EXCEL_ID_NOPREFIX,
3743 .model_id = EXCEL_ES25P40,
3744 .total_size = 512,
3745 .page_size = 256,
3746 /* 256-byte parameter page separate from memory array:
3747 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
3748 .feature_bits = FEATURE_WRSR_WREN,
3749 .tested = TEST_UNTESTED,
3750 .probe = probe_spi_rdid,
3751 .probe_timing = TIMING_ZERO,
3752 .block_erasers =
3753 {
3754 {
3755 .eraseblocks = { {64 * 1024, 8} },
3756 .block_erase = spi_block_erase_d8,
3757 }, {
3758 .eraseblocks = { {512 * 1024, 1} },
3759 .block_erase = spi_block_erase_c7,
3760 }
3761 },
3762 .printlock = spi_prettyprint_status_register_bp2_srwd,
3763 .unlock = spi_disable_blockprotect_bp2_srwd,
3764 .write = spi_chip_write_256,
3765 .read = spi_chip_read, /* Fast Read (0x0B) supported */
3766 .voltage = {2700, 3600},
3767 },
3768
3769 {
3770 .vendor = "ESI",
3771 .name = "ES25P80",
3772 .bustype = BUS_SPI,
3773 .manufacture_id = EXCEL_ID_NOPREFIX,
3774 .model_id = EXCEL_ES25P80,
3775 .total_size = 1024,
3776 .page_size = 256,
3777 /* 256-byte parameter page separate from memory array:
3778 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
3779 .feature_bits = FEATURE_WRSR_WREN,
3780 .tested = TEST_UNTESTED,
3781 .probe = probe_spi_rdid,
3782 .probe_timing = TIMING_ZERO,
3783 .block_erasers =
3784 {
3785 {
3786 .eraseblocks = { {64 * 1024, 16} },
3787 .block_erase = spi_block_erase_d8,
3788 }, {
3789 .eraseblocks = { {1024 * 1024, 1} },
3790 .block_erase = spi_block_erase_c7,
3791 }
3792 },
3793 .printlock = spi_prettyprint_status_register_bp2_srwd,
3794 .unlock = spi_disable_blockprotect_bp2_srwd,
3795 .write = spi_chip_write_256,
3796 .read = spi_chip_read, /* Fast Read (0x0B) supported */
3797 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00003798 },
3799
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003800 {
Stefan Tauner352e50b2013-02-22 15:58:45 +00003801 .vendor = "ESMT",
Michael Karcher80a59ea2010-06-19 22:06:35 +00003802 .name = "F25L008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003803 .bustype = BUS_SPI,
Stefan Tauner352e50b2013-02-22 15:58:45 +00003804 .manufacture_id = ESMT_ID,
3805 .model_id = ESMT_F25L008A,
Michael Karcher80a59ea2010-06-19 22:06:35 +00003806 .total_size = 1024,
3807 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00003808 .feature_bits = FEATURE_WRSR_EITHER,
Stefan Taunereb582572012-09-21 12:52:50 +00003809 .tested = TEST_OK_PREW,
Michael Karcher80a59ea2010-06-19 22:06:35 +00003810 .probe = probe_spi_rdid,
3811 .probe_timing = TIMING_ZERO,
3812 .block_erasers =
3813 {
3814 {
3815 .eraseblocks = { {4 * 1024, 256} },
3816 .block_erase = spi_block_erase_20,
3817 }, {
3818 .eraseblocks = { {64 * 1024, 16} },
3819 .block_erase = spi_block_erase_d8,
3820 }, {
3821 .eraseblocks = { {1024 * 1024, 1} },
3822 .block_erase = spi_block_erase_60,
3823 }, {
3824 .eraseblocks = { {1024 * 1024, 1} },
3825 .block_erase = spi_block_erase_c7,
3826 }
3827 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00003828 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00003829 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger9a795d82010-07-14 16:19:05 +00003830 .write = spi_chip_write_1,
Michael Karcher4497e862010-07-10 19:34:15 +00003831 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003832 .voltage = {2700, 3600},
Michael Karcher80a59ea2010-06-19 22:06:35 +00003833 },
3834
3835 {
Stefan Tauner85f09f72014-05-27 21:27:14 +00003836 .vendor = "ESMT",
3837 .name = "F25L32PA",
3838 .bustype = BUS_SPI,
3839 .manufacture_id = ESMT_ID,
3840 .model_id = ESMT_F25L32PA,
3841 .total_size = 4096,
3842 .page_size = 256,
3843 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP,
3844 .tested = TEST_UNTESTED,
3845 .probe = probe_spi_rdid,
3846 .probe_timing = TIMING_ZERO,
3847 .block_erasers =
3848 {
3849 {
3850 .eraseblocks = { {4 * 1024, 1024} },
3851 .block_erase = spi_block_erase_20,
3852 }, {
3853 .eraseblocks = { {64 * 1024, 64} },
3854 .block_erase = spi_block_erase_d8,
3855 }, {
3856 .eraseblocks = { {4 * 1024 * 1024, 1} },
3857 .block_erase = spi_block_erase_60,
3858 }, {
3859 .eraseblocks = { {4 * 1024 * 1024, 1} },
3860 .block_erase = spi_block_erase_c7,
3861 }
3862 },
3863 .printlock = spi_prettyprint_status_register_bp2_bpl,
3864 .unlock = spi_disable_blockprotect,
3865 .write = spi_chip_write_256,
3866 .read = spi_chip_read,
3867 .voltage = {2700, 3600},
3868 },
3869
3870 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003871 .vendor = "ESMT",
3872 .name = "F49B002UA",
3873 .bustype = BUS_PARALLEL,
3874 .manufacture_id = ESMT_ID,
3875 .model_id = ESMT_F49B002UA,
3876 .total_size = 256,
3877 .page_size = 4096,
3878 .feature_bits = FEATURE_EITHER_RESET,
3879 .tested = TEST_UNTESTED,
3880 .probe = probe_jedec,
3881 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
3882 .block_erasers =
3883 {
3884 {
3885 .eraseblocks = {
3886 {128 * 1024, 1},
3887 {96 * 1024, 1},
3888 {8 * 1024, 2},
3889 {16 * 1024, 1},
3890 },
3891 .block_erase = erase_sector_jedec,
3892 }, {
3893 .eraseblocks = { {256 * 1024, 1} },
3894 .block_erase = erase_chip_block_jedec,
3895 }
3896 },
3897 .write = write_jedec_1,
3898 .read = read_memmapped,
3899 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003900 .prepare_access = prepare_memory_access,
3901 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003902 },
3903
3904 {
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00003905 .vendor = "Eon",
3906 .name = "EN25B05",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003907 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00003908 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003909 .model_id = EON_EN25B05,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00003910 .total_size = 64,
3911 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00003912 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00003913 .tested = TEST_UNTESTED,
3914 .probe = probe_spi_rdid,
3915 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00003916 .block_erasers =
3917 {
3918 {
3919 .eraseblocks = {
3920 {4 * 1024, 2},
3921 {8 * 1024, 1},
3922 {16 * 1024, 1},
3923 {32 * 1024, 1},
3924 },
3925 .block_erase = spi_block_erase_d8,
3926 }, {
3927 .eraseblocks = { {64 * 1024, 1} },
3928 .block_erase = spi_block_erase_c7,
3929 }
3930 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00003931 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00003932 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00003933 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00003934 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00003935 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00003936 },
3937
3938 {
3939 .vendor = "Eon",
3940 .name = "EN25B05T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003941 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00003942 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003943 .model_id = EON_EN25B05,
Sean Nelson54596372010-01-09 05:30:14 +00003944 .total_size = 64,
3945 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00003946 .feature_bits = FEATURE_WRSR_WREN,
Sean Nelson54596372010-01-09 05:30:14 +00003947 .tested = TEST_UNTESTED,
3948 .probe = probe_spi_rdid,
3949 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00003950 .block_erasers =
3951 {
3952 {
3953 .eraseblocks = {
3954 {32 * 1024, 1},
3955 {16 * 1024, 1},
3956 {8 * 1024, 1},
3957 {4 * 1024, 2},
3958 },
3959 .block_erase = spi_block_erase_d8,
3960 }, {
3961 .eraseblocks = { {64 * 1024, 1} },
3962 .block_erase = spi_block_erase_c7,
3963 }
3964 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00003965 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00003966 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00003967 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00003968 .read = spi_chip_read, /* Fast read (0x0B) supported */
3969 .voltage = {2700, 3600},
3970 },
3971
3972 {
3973 .vendor = "Eon",
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00003974 .name = "EN25B10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003975 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00003976 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00003977 .model_id = EON_EN25B10,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00003978 .total_size = 128,
3979 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00003980 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00003981 .tested = TEST_UNTESTED,
3982 .probe = probe_spi_rdid,
3983 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00003984 .block_erasers =
3985 {
3986 {
3987 .eraseblocks = {
3988 {4 * 1024, 2},
3989 {8 * 1024, 1},
3990 {16 * 1024, 1},
3991 {32 * 1024, 3},
3992 },
3993 .block_erase = spi_block_erase_d8,
3994 }, {
3995 .eraseblocks = { {128 * 1024, 1} },
3996 .block_erase = spi_block_erase_c7,
3997 }
3998 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00003999 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004000 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004001 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004002 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004003 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004004 },
4005
4006 {
4007 .vendor = "Eon",
4008 .name = "EN25B10T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004009 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004010 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004011 .model_id = EON_EN25B10,
Sean Nelson54596372010-01-09 05:30:14 +00004012 .total_size = 128,
4013 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004014 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00004015 .tested = TEST_OK_PREW,
Sean Nelson54596372010-01-09 05:30:14 +00004016 .probe = probe_spi_rdid,
4017 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004018 .block_erasers =
4019 {
4020 {
4021 .eraseblocks = {
4022 {32 * 1024, 3},
4023 {16 * 1024, 1},
4024 {8 * 1024, 1},
4025 {4 * 1024, 2},
4026 },
4027 .block_erase = spi_block_erase_d8,
4028 }, {
4029 .eraseblocks = { {128 * 1024, 1} },
4030 .block_erase = spi_block_erase_c7,
4031 }
4032 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004033 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004034 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004035 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004036 .read = spi_chip_read, /* Fast read (0x0B) supported */
4037 .voltage = {2700, 3600},
4038 },
4039
4040 {
4041 .vendor = "Eon",
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004042 .name = "EN25B16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004043 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004044 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004045 .model_id = EON_EN25B16,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004046 .total_size = 2048,
4047 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004048 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004049 .tested = TEST_UNTESTED,
4050 .probe = probe_spi_rdid,
4051 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004052 .block_erasers =
4053 {
4054 {
4055 .eraseblocks = {
4056 {4 * 1024, 2},
4057 {8 * 1024, 1},
4058 {16 * 1024, 1},
4059 {32 * 1024, 1},
4060 {64 * 1024, 31},
4061 },
4062 .block_erase = spi_block_erase_d8,
4063 }, {
4064 .eraseblocks = { {2 * 1024 * 1024, 1} },
4065 .block_erase = spi_block_erase_c7,
4066 }
4067 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004068 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004069 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004070 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004071 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004072 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004073 },
4074
4075 {
4076 .vendor = "Eon",
4077 .name = "EN25B16T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004078 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004079 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004080 .model_id = EON_EN25B16,
Sean Nelson54596372010-01-09 05:30:14 +00004081 .total_size = 2048,
4082 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004083 .feature_bits = FEATURE_WRSR_WREN,
Sean Nelson54596372010-01-09 05:30:14 +00004084 .tested = TEST_UNTESTED,
4085 .probe = probe_spi_rdid,
4086 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004087 .block_erasers =
4088 {
4089 {
4090 .eraseblocks = {
4091 {64 * 1024, 31},
4092 {32 * 1024, 1},
4093 {16 * 1024, 1},
4094 {8 * 1024, 1},
4095 {4 * 1024, 2},
4096 },
4097 .block_erase = spi_block_erase_d8,
4098 }, {
4099 .eraseblocks = { {2 * 1024 * 1024, 1} },
4100 .block_erase = spi_block_erase_c7,
4101 }
4102 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004103 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004104 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004105 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004106 .read = spi_chip_read, /* Fast read (0x0B) supported */
4107 .voltage = {2700, 3600},
4108 },
4109
4110 {
4111 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004112 .name = "EN25B20",
Stefan Taunerb175af52015-01-24 15:06:27 +00004113 .bustype = BUS_SPI,
4114 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004115 .model_id = EON_EN25B20,
4116 .total_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004117 .page_size = 256,
4118 .feature_bits = FEATURE_WRSR_WREN,
4119 .tested = TEST_UNTESTED,
4120 .probe = probe_spi_rdid,
4121 .probe_timing = TIMING_ZERO,
4122 .block_erasers =
4123 {
4124 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004125 .eraseblocks = {
4126 {4 * 1024, 2},
4127 {8 * 1024, 1},
4128 {16 * 1024, 1},
4129 {32 * 1024, 1},
4130 {64 * 1024, 3}
4131 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004132 .block_erase = spi_block_erase_d8,
4133 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004134 .eraseblocks = { {256 * 1024, 1} },
4135 .block_erase = spi_block_erase_c7,
4136 }
4137 },
4138 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4139 .unlock = spi_disable_blockprotect,
4140 .write = spi_chip_write_256,
4141 .read = spi_chip_read, /* Fast read (0x0B) supported */
4142 .voltage = {2700, 3600},
4143 },
4144
4145 {
4146 .vendor = "Eon",
4147 .name = "EN25B20T",
4148 .bustype = BUS_SPI,
4149 .manufacture_id = EON_ID_NOPREFIX,
4150 .model_id = EON_EN25B20,
4151 .total_size = 256,
4152 .page_size = 256,
4153 .feature_bits = FEATURE_WRSR_WREN,
4154 .tested = TEST_UNTESTED,
4155 .probe = probe_spi_rdid,
4156 .probe_timing = TIMING_ZERO,
4157 .block_erasers =
4158 {
4159 {
4160 .eraseblocks = {
4161 {64 * 1024, 3},
4162 {32 * 1024, 1},
4163 {16 * 1024, 1},
4164 {8 * 1024, 1},
4165 {4 * 1024, 2},
4166 },
4167 .block_erase = spi_block_erase_d8,
4168 }, {
4169 .eraseblocks = { {256 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004170 .block_erase = spi_block_erase_c7,
4171 }
4172 },
4173 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4174 .unlock = spi_disable_blockprotect,
4175 .write = spi_chip_write_256,
4176 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004177 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004178 },
4179
4180 {
4181 .vendor = "Eon",
4182 .name = "EN25B32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004183 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004184 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004185 .model_id = EON_EN25B32,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004186 .total_size = 4096,
4187 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004188 /* OTP: 512B total; enter 0x3A */
4189 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004190 .tested = TEST_UNTESTED,
4191 .probe = probe_spi_rdid,
4192 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004193 .block_erasers =
4194 {
4195 {
4196 .eraseblocks = {
4197 {4 * 1024, 2},
4198 {8 * 1024, 1},
4199 {16 * 1024, 1},
4200 {32 * 1024, 1},
4201 {64 * 1024, 63},
4202 },
4203 .block_erase = spi_block_erase_d8,
4204 }, {
4205 .eraseblocks = { {4 * 1024 * 1024, 1} },
4206 .block_erase = spi_block_erase_c7,
4207 }
4208 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004209 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004210 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004211 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004212 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004213 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004214 },
4215
4216 {
4217 .vendor = "Eon",
4218 .name = "EN25B32T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004219 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004220 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004221 .model_id = EON_EN25B32,
Sean Nelson54596372010-01-09 05:30:14 +00004222 .total_size = 4096,
4223 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004224 /* OTP: 512B total; enter 0x3A */
4225 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Sean Nelson54596372010-01-09 05:30:14 +00004226 .tested = TEST_UNTESTED,
4227 .probe = probe_spi_rdid,
4228 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004229 .block_erasers =
4230 {
4231 {
4232 .eraseblocks = {
4233 {64 * 1024, 63},
4234 {32 * 1024, 1},
4235 {16 * 1024, 1},
4236 {8 * 1024, 1},
4237 {4 * 1024, 2},
4238 },
4239 .block_erase = spi_block_erase_d8,
4240 }, {
4241 .eraseblocks = { {4 * 1024 * 1024, 1} },
4242 .block_erase = spi_block_erase_c7,
4243 }
4244 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004245 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004246 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004247 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004248 .read = spi_chip_read, /* Fast read (0x0B) supported */
4249 .voltage = {2700, 3600},
4250 },
4251
4252 {
4253 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004254 .name = "EN25B40",
Stefan Taunerb175af52015-01-24 15:06:27 +00004255 .bustype = BUS_SPI,
4256 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004257 .model_id = EON_EN25B40,
4258 .total_size = 512,
Stefan Taunerb175af52015-01-24 15:06:27 +00004259 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004260 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerb175af52015-01-24 15:06:27 +00004261 .tested = TEST_UNTESTED,
4262 .probe = probe_spi_rdid,
4263 .probe_timing = TIMING_ZERO,
4264 .block_erasers =
4265 {
4266 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004267 .eraseblocks = {
4268 {4 * 1024, 2},
4269 {8 * 1024, 1},
4270 {16 * 1024, 1},
4271 {32 * 1024, 1},
4272 {64 * 1024, 7}
4273 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004274 .block_erase = spi_block_erase_d8,
4275 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004276 .eraseblocks = { {512 * 1024, 1} },
4277 .block_erase = spi_block_erase_c7,
4278 }
4279 },
4280 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4281 .unlock = spi_disable_blockprotect,
4282 .write = spi_chip_write_256,
4283 .read = spi_chip_read, /* Fast read (0x0B) supported */
4284 .voltage = {2700, 3600},
4285 },
4286
4287 {
4288 .vendor = "Eon",
4289 .name = "EN25B40T",
4290 .bustype = BUS_SPI,
4291 .manufacture_id = EON_ID_NOPREFIX,
4292 .model_id = EON_EN25B40,
4293 .total_size = 512,
4294 .page_size = 256,
4295 .feature_bits = FEATURE_WRSR_WREN,
4296 .tested = TEST_UNTESTED,
4297 .probe = probe_spi_rdid,
4298 .probe_timing = TIMING_ZERO,
4299 .block_erasers =
4300 {
4301 {
4302 .eraseblocks = {
4303 {64 * 1024, 7},
4304 {32 * 1024, 1},
4305 {16 * 1024, 1},
4306 {8 * 1024, 1},
4307 {4 * 1024, 2},
4308 },
4309 .block_erase = spi_block_erase_d8,
4310 }, {
4311 .eraseblocks = { {512 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004312 .block_erase = spi_block_erase_c7,
4313 }
4314 },
4315 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4316 .unlock = spi_disable_blockprotect,
4317 .write = spi_chip_write_256,
4318 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004319 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004320 },
4321
4322 {
4323 .vendor = "Eon",
4324 .name = "EN25B64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004325 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004326 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004327 .model_id = EON_EN25B64,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004328 .total_size = 8192,
4329 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004330 /* OTP: 512B total; enter 0x3A */
4331 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004332 .tested = TEST_UNTESTED,
4333 .probe = probe_spi_rdid,
4334 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004335 .block_erasers =
4336 {
4337 {
4338 .eraseblocks = {
4339 {4 * 1024, 2},
4340 {8 * 1024, 1},
4341 {16 * 1024, 1},
4342 {32 * 1024, 1},
4343 {64 * 1024, 127},
4344 },
4345 .block_erase = spi_block_erase_d8,
4346 }, {
4347 .eraseblocks = { {8 * 1024 * 1024, 1} },
4348 .block_erase = spi_block_erase_c7,
4349 }
4350 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004351 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004352 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004353 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004354 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004355 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004356 },
4357
4358 {
4359 .vendor = "Eon",
4360 .name = "EN25B64T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004361 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004362 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004363 .model_id = EON_EN25B64,
Sean Nelson54596372010-01-09 05:30:14 +00004364 .total_size = 8192,
4365 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004366 /* OTP: 512B total; enter 0x3A */
4367 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Sean Nelson54596372010-01-09 05:30:14 +00004368 .tested = TEST_UNTESTED,
4369 .probe = probe_spi_rdid,
4370 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004371 .block_erasers =
4372 {
4373 {
4374 .eraseblocks = {
4375 {64 * 1024, 127},
4376 {32 * 1024, 1},
4377 {16 * 1024, 1},
4378 {8 * 1024, 1},
4379 {4 * 1024, 2},
4380 },
4381 .block_erase = spi_block_erase_d8,
4382 }, {
4383 .eraseblocks = { {8 * 1024 * 1024, 1} },
4384 .block_erase = spi_block_erase_c7,
4385 }
4386 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004387 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004388 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004389 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004390 .read = spi_chip_read, /* Fast read (0x0B) supported */
4391 .voltage = {2700, 3600},
4392 },
4393
4394 {
4395 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004396 .name = "EN25B80",
Stefan Taunerb175af52015-01-24 15:06:27 +00004397 .bustype = BUS_SPI,
4398 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004399 .model_id = EON_EN25B80,
4400 .total_size = 1024,
Stefan Taunerb175af52015-01-24 15:06:27 +00004401 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004402 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerb175af52015-01-24 15:06:27 +00004403 .tested = TEST_UNTESTED,
4404 .probe = probe_spi_rdid,
4405 .probe_timing = TIMING_ZERO,
4406 .block_erasers =
4407 {
4408 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004409 .eraseblocks = {
4410 {4 * 1024, 2},
4411 {8 * 1024, 1},
4412 {16 * 1024, 1},
4413 {32 * 1024, 1},
4414 {64 * 1024, 15}
4415 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004416 .block_erase = spi_block_erase_d8,
4417 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004418 .eraseblocks = { {1024 * 1024, 1} },
4419 .block_erase = spi_block_erase_c7,
4420 }
4421 },
4422 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4423 .unlock = spi_disable_blockprotect,
4424 .write = spi_chip_write_256,
4425 .read = spi_chip_read, /* Fast read (0x0B) supported */
4426 .voltage = {2700, 3600},
4427 },
4428
4429 {
4430 .vendor = "Eon",
4431 .name = "EN25B80T",
4432 .bustype = BUS_SPI,
4433 .manufacture_id = EON_ID_NOPREFIX,
4434 .model_id = EON_EN25B80,
4435 .total_size = 1024,
4436 .page_size = 256,
4437 .feature_bits = FEATURE_WRSR_WREN,
4438 .tested = TEST_UNTESTED,
4439 .probe = probe_spi_rdid,
4440 .probe_timing = TIMING_ZERO,
4441 .block_erasers =
4442 {
4443 {
4444 .eraseblocks = {
4445 {64 * 1024, 15},
4446 {32 * 1024, 1},
4447 {16 * 1024, 1},
4448 {8 * 1024, 1},
4449 {4 * 1024, 2},
4450 },
4451 .block_erase = spi_block_erase_d8,
4452 }, {
4453 .eraseblocks = { {1024 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004454 .block_erase = spi_block_erase_c7,
4455 }
4456 },
4457 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4458 .unlock = spi_disable_blockprotect,
4459 .write = spi_chip_write_256,
4460 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004461 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004462 },
4463
4464 {
4465 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004466 .name = "EN25F05",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004467 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004468 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004469 .model_id = EON_EN25F05,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004470 .total_size = 64,
4471 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004472 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00004473 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004474 .probe = probe_spi_rdid,
4475 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004476 .block_erasers =
4477 {
4478 {
4479 .eraseblocks = { {4 * 1024, 16} },
4480 .block_erase = spi_block_erase_20,
4481 }, {
4482 .eraseblocks = { {32 * 1024, 2} },
4483 .block_erase = spi_block_erase_d8,
4484 }, {
4485 .eraseblocks = { {32 * 1024, 2} },
4486 .block_erase = spi_block_erase_52,
4487 }, {
4488 .eraseblocks = { {64 * 1024, 1} },
4489 .block_erase = spi_block_erase_60,
4490 }, {
4491 .eraseblocks = { {64 * 1024, 1} },
4492 .block_erase = spi_block_erase_c7,
4493 }
4494 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004495 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004496 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004497 .write = spi_chip_write_256,
4498 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004499 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004500 },
4501
4502 {
4503 .vendor = "Eon",
4504 .name = "EN25F10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004505 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004506 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004507 .model_id = EON_EN25F10,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004508 .total_size = 128,
4509 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004510 .feature_bits = FEATURE_WRSR_WREN,
Simon Buhrowd173ed42021-09-29 09:28:07 +02004511 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004512 .probe = probe_spi_rdid,
4513 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004514 .block_erasers =
4515 {
4516 {
4517 .eraseblocks = { {4 * 1024, 32} },
4518 .block_erase = spi_block_erase_20,
4519 }, {
4520 .eraseblocks = { {32 * 1024, 4} },
4521 .block_erase = spi_block_erase_d8,
4522 }, {
4523 .eraseblocks = { {32 * 1024, 4} },
4524 .block_erase = spi_block_erase_52,
4525 }, {
4526 .eraseblocks = { {128 * 1024, 1} },
4527 .block_erase = spi_block_erase_60,
4528 }, {
4529 .eraseblocks = { {128 * 1024, 1} },
4530 .block_erase = spi_block_erase_c7,
4531 }
4532 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004533 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004534 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004535 .write = spi_chip_write_256,
4536 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004537 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004538 },
4539
4540 {
4541 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004542 .name = "EN25F16",
4543 .bustype = BUS_SPI,
4544 .manufacture_id = EON_ID_NOPREFIX,
4545 .model_id = EON_EN25F16,
4546 .total_size = 2048,
4547 .page_size = 256,
4548 .feature_bits = FEATURE_WRSR_WREN,
4549 .tested = TEST_OK_PREW,
4550 .probe = probe_spi_rdid,
4551 .probe_timing = TIMING_ZERO,
4552 .block_erasers =
4553 {
4554 {
4555 .eraseblocks = { {4 * 1024, 512} },
4556 .block_erase = spi_block_erase_20,
4557 }, {
4558 .eraseblocks = { {64 * 1024, 32} },
4559 .block_erase = spi_block_erase_d8,
4560 }, {
4561 .eraseblocks = { {2 * 1024 * 1024, 1} },
4562 .block_erase = spi_block_erase_60,
4563 }, {
4564 .eraseblocks = { {2 * 1024 * 1024, 1} },
4565 .block_erase = spi_block_erase_c7,
4566 }
4567 },
4568 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4569 .unlock = spi_disable_blockprotect,
4570 .write = spi_chip_write_256,
4571 .read = spi_chip_read,
4572 .voltage = {2700, 3600},
4573 },
4574
4575 {
4576 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004577 .name = "EN25F20",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004578 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004579 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004580 .model_id = EON_EN25F20,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004581 .total_size = 256,
4582 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004583 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004584 .tested = TEST_UNTESTED,
4585 .probe = probe_spi_rdid,
4586 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004587 .block_erasers =
4588 {
4589 {
4590 .eraseblocks = { {4 * 1024, 64} },
4591 .block_erase = spi_block_erase_20,
4592 }, {
4593 .eraseblocks = { {64 * 1024, 4} },
4594 .block_erase = spi_block_erase_d8,
4595 }, {
4596 .eraseblocks = { {64 * 1024, 4} },
4597 .block_erase = spi_block_erase_52,
4598 }, {
4599 .eraseblocks = { {256 * 1024, 1} },
4600 .block_erase = spi_block_erase_60,
4601 }, {
4602 .eraseblocks = { {256 * 1024, 1} },
4603 .block_erase = spi_block_erase_c7,
4604 }
4605 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004606 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004607 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004608 .write = spi_chip_write_256,
4609 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004610 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004611 },
4612
4613 {
4614 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004615 .name = "EN25F32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004616 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004617 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004618 .model_id = EON_EN25F32,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004619 .total_size = 4096,
4620 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004621 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner5c316f92015-02-08 21:57:52 +00004622 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004623 .probe = probe_spi_rdid,
4624 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004625 .block_erasers =
4626 {
4627 {
4628 .eraseblocks = { {4 * 1024, 1024} },
4629 .block_erase = spi_block_erase_20,
4630 }, {
4631 .eraseblocks = { {64 * 1024, 64} },
4632 .block_erase = spi_block_erase_d8,
4633 }, {
4634 .eraseblocks = { {4 * 1024 * 1024, 1} },
4635 .block_erase = spi_block_erase_60,
4636 }, {
4637 .eraseblocks = { {4 * 1024 * 1024, 1} },
4638 .block_erase = spi_block_erase_c7,
4639 }
4640 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004641 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004642 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004643 .write = spi_chip_write_256,
4644 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004645 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004646 },
4647
4648 {
Russ Dill3cd5a122010-03-05 08:44:11 +00004649 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004650 .name = "EN25F40",
4651 .bustype = BUS_SPI,
4652 .manufacture_id = EON_ID_NOPREFIX,
4653 .model_id = EON_EN25F40,
4654 .total_size = 512,
4655 .page_size = 256,
4656 .feature_bits = FEATURE_WRSR_WREN,
4657 .tested = TEST_OK_PREW,
4658 .probe = probe_spi_rdid,
4659 .probe_timing = TIMING_ZERO,
4660 .block_erasers =
4661 {
4662 {
4663 .eraseblocks = { {4 * 1024, 128} },
4664 .block_erase = spi_block_erase_20,
4665 }, {
4666 .eraseblocks = { {64 * 1024, 8} },
4667 .block_erase = spi_block_erase_d8,
4668 }, {
4669 .eraseblocks = { {512 * 1024, 1} },
4670 .block_erase = spi_block_erase_60,
4671 }, {
4672 .eraseblocks = { {512 * 1024, 1} },
4673 .block_erase = spi_block_erase_c7,
4674 },
4675 },
4676 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4677 .unlock = spi_disable_blockprotect,
4678 .write = spi_chip_write_256,
4679 .read = spi_chip_read,
4680 .voltage = {2700, 3600},
4681 },
4682
4683 {
4684 .vendor = "Eon",
Stefan Taunerd932fd02012-09-06 17:37:16 +00004685 .name = "EN25F64",
4686 .bustype = BUS_SPI,
4687 .manufacture_id = EON_ID_NOPREFIX,
Stefan Taunerd7d423b2012-10-20 09:13:16 +00004688 .model_id = EON_EN25F64,
Stefan Taunerd932fd02012-09-06 17:37:16 +00004689 .total_size = 8192,
4690 .page_size = 256,
4691 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunere34e3e82013-01-01 00:06:51 +00004692 .tested = TEST_OK_PREW,
Stefan Taunerd932fd02012-09-06 17:37:16 +00004693 .probe = probe_spi_rdid,
4694 .probe_timing = TIMING_ZERO,
4695 .block_erasers =
4696 {
4697 {
4698 .eraseblocks = { {4 * 1024, 2048} },
4699 .block_erase = spi_block_erase_20,
4700 }, {
4701 .eraseblocks = { {64 * 1024, 128} },
4702 .block_erase = spi_block_erase_d8,
4703 }, {
4704 .eraseblocks = { {8 * 1024 * 1024, 1} },
4705 .block_erase = spi_block_erase_60,
4706 }, {
4707 .eraseblocks = { {8 * 1024 * 1024, 1} },
4708 .block_erase = spi_block_erase_c7,
4709 }
4710 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004711 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Stefan Taunerd932fd02012-09-06 17:37:16 +00004712 .unlock = spi_disable_blockprotect,
4713 .write = spi_chip_write_256,
4714 .read = spi_chip_read,
4715 .voltage = {2700, 3600},
4716 },
4717
4718 {
4719 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004720 .name = "EN25F80",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004721 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00004722 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004723 .model_id = EON_EN25F80,
David Hendricks6d715302011-07-24 22:21:57 +00004724 .total_size = 1024,
4725 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004726 .feature_bits = FEATURE_WRSR_WREN,
4727 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00004728 .probe = probe_spi_rdid,
4729 .probe_timing = TIMING_ZERO,
4730 .block_erasers =
4731 {
4732 {
4733 .eraseblocks = { {4 * 1024, 256} },
4734 .block_erase = spi_block_erase_20,
4735 }, {
4736 .eraseblocks = { {64 * 1024, 16} },
4737 .block_erase = spi_block_erase_d8,
4738 }, {
4739 .eraseblocks = { {1024 * 1024, 1} },
4740 .block_erase = spi_block_erase_60,
4741 }, {
4742 .eraseblocks = { {1024 * 1024, 1} },
4743 .block_erase = spi_block_erase_c7,
4744 }
4745 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004746 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00004747 .unlock = spi_disable_blockprotect,
4748 .write = spi_chip_write_256,
4749 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00004750 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00004751 },
4752
4753 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004754 .vendor = "Eon",
4755 .name = "EN25P05",
4756 .bustype = BUS_SPI,
4757 .manufacture_id = EON_ID_NOPREFIX,
4758 .model_id = EON_EN25B05,
4759 .total_size = 64,
4760 .page_size = 256,
4761 .feature_bits = FEATURE_WRSR_WREN,
4762 .tested = TEST_UNTESTED,
4763 .probe = probe_spi_rdid,
4764 .probe_timing = TIMING_ZERO,
4765 .block_erasers =
4766 {
4767 {
4768 .eraseblocks = {
4769 {32 * 1024, 2} },
4770 .block_erase = spi_block_erase_d8,
4771 }, {
4772 .eraseblocks = { {64 * 1024, 1} },
4773 .block_erase = spi_block_erase_c7,
4774 }
4775 },
4776 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4777 .unlock = spi_disable_blockprotect,
4778 .write = spi_chip_write_256,
4779 .read = spi_chip_read, /* Fast read (0x0B) supported */
4780 .voltage = {2700, 3600},
4781 },
4782
4783 {
4784 .vendor = "Eon",
4785 .name = "EN25P10",
4786 .bustype = BUS_SPI,
4787 .manufacture_id = EON_ID_NOPREFIX,
4788 .model_id = EON_EN25B10,
4789 .total_size = 128,
4790 .page_size = 256,
4791 .feature_bits = FEATURE_WRSR_WREN,
4792 .tested = TEST_UNTESTED,
4793 .probe = probe_spi_rdid,
4794 .probe_timing = TIMING_ZERO,
4795 .block_erasers =
4796 {
4797 {
4798 .eraseblocks = { {32 * 1024, 4} },
4799 .block_erase = spi_block_erase_d8,
4800 }, {
4801 .eraseblocks = { {128 * 1024, 1} },
4802 .block_erase = spi_block_erase_c7,
4803 }
4804 },
4805 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4806 .unlock = spi_disable_blockprotect,
4807 .write = spi_chip_write_256,
4808 .read = spi_chip_read, /* Fast read (0x0B) supported */
4809 .voltage = {2700, 3600},
4810 },
4811
4812 {
4813 .vendor = "Eon",
4814 .name = "EN25P16",
4815 .bustype = BUS_SPI,
4816 .manufacture_id = EON_ID_NOPREFIX,
4817 .model_id = EON_EN25B16,
4818 .total_size = 2048,
4819 .page_size = 256,
4820 .feature_bits = FEATURE_WRSR_WREN,
4821 .tested = TEST_UNTESTED,
4822 .probe = probe_spi_rdid,
4823 .probe_timing = TIMING_ZERO,
4824 .block_erasers =
4825 {
4826 {
4827 .eraseblocks = { {64 * 1024, 32} },
4828 .block_erase = spi_block_erase_d8,
4829 }, {
4830 .eraseblocks = { {2 * 1024 * 1024, 1} },
4831 .block_erase = spi_block_erase_c7,
4832 }
4833 },
4834 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4835 .unlock = spi_disable_blockprotect,
4836 .write = spi_chip_write_256,
4837 .read = spi_chip_read, /* Fast read (0x0B) supported */
4838 .voltage = {2700, 3600},
4839 },
4840
4841 {
4842 .vendor = "Eon",
4843 .name = "EN25P20",
4844 .bustype = BUS_SPI,
4845 .manufacture_id = EON_ID_NOPREFIX,
4846 .model_id = EON_EN25B20,
4847 .total_size = 256,
4848 .page_size = 256,
4849 .feature_bits = FEATURE_WRSR_WREN,
4850 .tested = TEST_UNTESTED,
4851 .probe = probe_spi_rdid,
4852 .probe_timing = TIMING_ZERO,
4853 .block_erasers =
4854 {
4855 {
4856 .eraseblocks = { {64 * 1024, 4} },
4857 .block_erase = spi_block_erase_d8,
4858 }, {
4859 .eraseblocks = { {256 * 1024, 1} },
4860 .block_erase = spi_block_erase_c7,
4861 }
4862 },
4863 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4864 .unlock = spi_disable_blockprotect,
4865 .write = spi_chip_write_256,
4866 .read = spi_chip_read, /* Fast read (0x0B) supported */
4867 .voltage = {2700, 3600},
4868 },
4869
4870 {
4871 .vendor = "Eon",
4872 .name = "EN25P32", /* Uniform version of EN25B32 */
4873 .bustype = BUS_SPI,
4874 .manufacture_id = EON_ID_NOPREFIX,
4875 .model_id = EON_EN25B32,
4876 .total_size = 4096,
4877 .page_size = 256,
4878 /* OTP: 512B total; enter 0x3A */
4879 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
4880 .tested = TEST_UNTESTED,
4881 .probe = probe_spi_rdid,
4882 .probe_timing = TIMING_ZERO,
4883 .block_erasers =
4884 {
4885 {
4886 .eraseblocks = { {64 * 1024, 64} },
4887 .block_erase = spi_block_erase_d8,
4888 }, {
4889 .eraseblocks = { {4 * 1024 * 1024, 1} },
4890 .block_erase = spi_block_erase_c7,
4891 }
4892 },
4893 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4894 .unlock = spi_disable_blockprotect,
4895 .write = spi_chip_write_256,
4896 .read = spi_chip_read, /* Fast read (0x0B) supported */
4897 .voltage = {2700, 3600},
4898 },
4899
4900 {
4901 .vendor = "Eon",
4902 .name = "EN25P40",
4903 .bustype = BUS_SPI,
4904 .manufacture_id = EON_ID_NOPREFIX,
4905 .model_id = EON_EN25B40,
4906 .total_size = 512,
4907 .page_size = 256,
4908 .feature_bits = FEATURE_WRSR_WREN,
4909 .tested = TEST_UNTESTED,
4910 .probe = probe_spi_rdid,
4911 .probe_timing = TIMING_ZERO,
4912 .block_erasers =
4913 {
4914 {
4915 .eraseblocks = { {64 * 1024, 8} },
4916 .block_erase = spi_block_erase_d8,
4917 }, {
4918 .eraseblocks = { {512 * 1024, 1} },
4919 .block_erase = spi_block_erase_c7,
4920 }
4921 },
4922 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4923 .unlock = spi_disable_blockprotect,
4924 .write = spi_chip_write_256,
4925 .read = spi_chip_read, /* Fast read (0x0B) supported */
4926 .voltage = {2700, 3600},
4927 },
4928
4929 {
4930 .vendor = "Eon",
4931 .name = "EN25P64",
4932 .bustype = BUS_SPI,
4933 .manufacture_id = EON_ID_NOPREFIX,
4934 .model_id = EON_EN25B64,
4935 .total_size = 8192,
4936 .page_size = 256,
4937 /* OTP: 512B total; enter 0x3A */
4938 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
4939 .tested = TEST_UNTESTED,
4940 .probe = probe_spi_rdid,
4941 .probe_timing = TIMING_ZERO,
4942 .block_erasers =
4943 {
4944 {
4945 .eraseblocks = { {64 * 1024, 128} },
4946 .block_erase = spi_block_erase_d8,
4947 }, {
4948 .eraseblocks = { {8 * 1024 * 1024, 1} },
4949 .block_erase = spi_block_erase_c7,
4950 }
4951 },
4952 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4953 .unlock = spi_disable_blockprotect,
4954 .write = spi_chip_write_256,
4955 .read = spi_chip_read, /* Fast read (0x0B) supported */
4956 .voltage = {2700, 3600},
4957 },
4958
4959 {
4960 .vendor = "Eon",
4961 .name = "EN25P80",
4962 .bustype = BUS_SPI,
4963 .manufacture_id = EON_ID_NOPREFIX,
4964 .model_id = EON_EN25B80,
4965 .total_size = 1024,
4966 .page_size = 256,
4967 .feature_bits = FEATURE_WRSR_WREN,
4968 .tested = TEST_UNTESTED,
4969 .probe = probe_spi_rdid,
4970 .probe_timing = TIMING_ZERO,
4971 .block_erasers =
4972 {
4973 {
4974 .eraseblocks = { {64 * 1024, 16} },
4975 .block_erase = spi_block_erase_d8,
4976 }, {
4977 .eraseblocks = { {1024 * 1024, 1} },
4978 .block_erase = spi_block_erase_c7,
4979 }
4980 },
4981 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4982 .unlock = spi_disable_blockprotect,
4983 .write = spi_chip_write_256,
4984 .read = spi_chip_read, /* Fast read (0x0B) supported */
4985 .voltage = {2700, 3600},
4986 },
4987
4988 {
4989 .vendor = "Eon",
4990 .name = "EN25Q128",
4991 .bustype = BUS_SPI,
4992 .manufacture_id = EON_ID_NOPREFIX,
4993 .model_id = EON_EN25Q128,
4994 .total_size = 16384,
4995 .page_size = 256,
4996 /* OTP: 512B total; enter 0x3A */
4997 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
4998 .tested = TEST_OK_PREW,
4999 .probe = probe_spi_rdid,
5000 .probe_timing = TIMING_ZERO,
5001 .block_erasers =
5002 {
5003 {
5004 .eraseblocks = { {4 * 1024, 4096} },
5005 .block_erase = spi_block_erase_20,
5006 }, {
5007 .eraseblocks = { {64 * 1024, 256} },
5008 .block_erase = spi_block_erase_d8,
5009 }, {
5010 .eraseblocks = { {16 * 1024 * 1024, 1} },
5011 .block_erase = spi_block_erase_60,
5012 }, {
5013 .eraseblocks = { {16 * 1024 * 1024, 1} },
5014 .block_erase = spi_block_erase_c7,
5015 }
5016 },
5017 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5018 .unlock = spi_disable_blockprotect,
5019 .write = spi_chip_write_256,
5020 .read = spi_chip_read,
5021 },
5022
5023 {
David Hendricks6d715302011-07-24 22:21:57 +00005024 /* Note: EN25D16 is an evil twin which shares the model ID
5025 but has different write protection capabilities */
5026 .vendor = "Eon",
5027 .name = "EN25Q16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005028 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005029 .manufacture_id = EON_ID_NOPREFIX,
5030 .model_id = EON_EN25Q16,
5031 .total_size = 2048,
5032 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005033 /* OTP: D16 512B/Q16 128B total; enter 0x3A */
5034 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks6d715302011-07-24 22:21:57 +00005035 .tested = TEST_UNTESTED,
5036 .probe = probe_spi_rdid,
5037 .probe_timing = TIMING_ZERO,
5038 .block_erasers =
5039 {
5040 {
5041 .eraseblocks = { {4 * 1024, 512} },
5042 .block_erase = spi_block_erase_20,
5043 }, {
5044 .eraseblocks = { {64 * 1024, 32} },
5045 .block_erase = spi_block_erase_d8,
5046 }, {
5047 /* not supported by Q16 version */
5048 .eraseblocks = { {64 * 1024, 32} },
5049 .block_erase = spi_block_erase_52,
5050 }, {
5051 .eraseblocks = { {2 * 1024 * 1024, 1} },
5052 .block_erase = spi_block_erase_60,
5053 }, {
5054 .eraseblocks = { {2 * 1024 * 1024, 1} },
5055 .block_erase = spi_block_erase_c7,
5056 }
5057 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005058 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005059 .unlock = spi_disable_blockprotect,
5060 .write = spi_chip_write_256,
5061 .read = spi_chip_read,
5062 .voltage = {2700, 3600},
5063 },
5064
5065 {
5066 .vendor = "Eon",
5067 .name = "EN25Q32(A/B)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005068 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005069 .manufacture_id = EON_ID_NOPREFIX,
5070 .model_id = EON_EN25Q32,
5071 .total_size = 4096,
5072 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005073 /* OTP: 512B total; enter 0x3A */
5074 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner352e50b2013-02-22 15:58:45 +00005075 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005076 .probe = probe_spi_rdid,
5077 .probe_timing = TIMING_ZERO,
5078 .block_erasers =
5079 {
5080 {
5081 .eraseblocks = { {4 * 1024, 1024} },
5082 .block_erase = spi_block_erase_20,
5083 }, {
5084 .eraseblocks = { {64 * 1024, 64} },
5085 .block_erase = spi_block_erase_d8,
5086 }, {
5087 .eraseblocks = { {4 * 1024 * 1024, 1} },
5088 .block_erase = spi_block_erase_60,
5089 }, {
5090 .eraseblocks = { {4 * 1024 * 1024, 1} },
5091 .block_erase = spi_block_erase_c7,
5092 }
5093 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005094 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005095 .unlock = spi_disable_blockprotect,
5096 .write = spi_chip_write_256,
5097 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005098 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005099 },
5100
5101 {
5102 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005103 .name = "EN25Q40",
5104 .bustype = BUS_SPI,
5105 .manufacture_id = EON_ID_NOPREFIX,
5106 .model_id = EON_EN25Q40,
5107 .total_size = 512,
5108 .page_size = 256,
5109 /* OTP: 256B total; enter 0x3A */
5110 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5111 .tested = TEST_UNTESTED,
5112 .probe = probe_spi_rdid,
5113 .probe_timing = TIMING_ZERO,
5114 .block_erasers =
5115 {
5116 {
5117 .eraseblocks = { {4 * 1024, 128} },
5118 .block_erase = spi_block_erase_20,
5119 }, {
5120 .eraseblocks = { {64 * 1024, 8} },
5121 .block_erase = spi_block_erase_d8,
5122 }, {
5123 .eraseblocks = { {512 * 1024, 1} },
5124 .block_erase = spi_block_erase_60,
5125 }, {
5126 .eraseblocks = { {512 * 1024, 1} },
5127 .block_erase = spi_block_erase_c7,
5128 }
5129 },
5130 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5131 .unlock = spi_disable_blockprotect,
5132 .write = spi_chip_write_256,
5133 .read = spi_chip_read,
5134 .voltage = {2700, 3600},
5135 },
5136
5137 {
5138 .vendor = "Eon",
David Hendricks6d715302011-07-24 22:21:57 +00005139 .name = "EN25Q64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005140 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005141 .manufacture_id = EON_ID_NOPREFIX,
5142 .model_id = EON_EN25Q64,
5143 .total_size = 8192,
5144 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005145 /* OTP: 512B total; enter 0x3A */
5146 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner352e50b2013-02-22 15:58:45 +00005147 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005148 .probe = probe_spi_rdid,
5149 .probe_timing = TIMING_ZERO,
5150 .block_erasers =
5151 {
5152 {
5153 .eraseblocks = { {4 * 1024, 2048} },
5154 .block_erase = spi_block_erase_20,
5155 }, {
5156 .eraseblocks = { {64 * 1024, 128} },
5157 .block_erase = spi_block_erase_d8,
5158 }, {
5159 .eraseblocks = { {8 * 1024 * 1024, 1} },
5160 .block_erase = spi_block_erase_60,
5161 }, {
5162 .eraseblocks = { {8 * 1024 * 1024, 1} },
5163 .block_erase = spi_block_erase_c7,
5164 }
5165 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005166 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005167 .unlock = spi_disable_blockprotect,
5168 .write = spi_chip_write_256,
5169 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005170 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005171 },
5172
5173 {
5174 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005175 .name = "EN25Q80(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005176 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005177 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005178 .model_id = EON_EN25Q80,
5179 .total_size = 1024,
5180 .page_size = 256,
5181 /* OTP: 256B total; enter 0x3A */
5182 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5183 .tested = TEST_UNTESTED,
5184 .probe = probe_spi_rdid,
5185 .probe_timing = TIMING_ZERO,
5186 .block_erasers =
5187 {
5188 {
5189 .eraseblocks = { {4 * 1024, 256} },
5190 .block_erase = spi_block_erase_20,
5191 }, {
5192 .eraseblocks = { {64 * 1024, 16} },
5193 .block_erase = spi_block_erase_d8,
5194 }, {
5195 .eraseblocks = { {1024 * 1024, 1} },
5196 .block_erase = spi_block_erase_60,
5197 }, {
5198 .eraseblocks = { {1024 * 1024, 1} },
5199 .block_erase = spi_block_erase_c7,
5200 }
5201 },
5202 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5203 .unlock = spi_disable_blockprotect,
5204 .write = spi_chip_write_256,
5205 .read = spi_chip_read,
5206 .voltage = {2700, 3600},
5207 },
5208
5209 {
5210 .vendor = "Eon",
5211 .name = "EN25QH128",
5212 .bustype = BUS_SPI,
5213 .manufacture_id = EON_ID_NOPREFIX,
5214 .model_id = EON_EN25QH128,
David Hendricks6d715302011-07-24 22:21:57 +00005215 .total_size = 16384,
5216 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005217 /* supports SFDP */
Daniel Lenski65922a32012-02-15 23:40:23 +00005218 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005219 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5220 .dummy_cycles =
5221 {
5222 .qpi_fast_read = 6,
5223 .qpi_fast_read_qio = 6,
5224 },
Tim Chenbfe149a2020-07-06 14:59:21 +08005225 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005226 .probe = probe_spi_rdid,
5227 .probe_timing = TIMING_ZERO,
5228 .block_erasers =
5229 {
5230 {
5231 .eraseblocks = { {4 * 1024, 4096} },
5232 .block_erase = spi_block_erase_20,
5233 }, {
5234 .eraseblocks = { {64 * 1024, 256} },
5235 .block_erase = spi_block_erase_d8,
5236 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005237 .eraseblocks = { { 16384 * 1024, 1} },
David Hendricks6d715302011-07-24 22:21:57 +00005238 .block_erase = spi_block_erase_60,
5239 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005240 .eraseblocks = { { 16384 * 1024, 1} },
David Hendricks6d715302011-07-24 22:21:57 +00005241 .block_erase = spi_block_erase_c7,
5242 }
5243 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10005244 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5245 .unlock = spi_disable_blockprotect_bp3_srwd,
David Hendricks6d715302011-07-24 22:21:57 +00005246 .write = spi_chip_write_256,
5247 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005248 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11005249 .reg_bits =
5250 {
5251 .srp = {STATUS1, 7, RW},
5252 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5253 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5254 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005255 .wp_write_cfg = spi_wp_write_cfg,
5256 .wp_read_cfg = spi_wp_read_cfg,
5257 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11005258 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02005259 .prepare_access = spi_prepare_io,
5260 .finish_access = spi_finish_io,
David Hendricks6d715302011-07-24 22:21:57 +00005261 },
5262
5263 {
5264 .vendor = "Eon",
5265 .name = "EN25QH16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005266 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005267 .manufacture_id = EON_ID_NOPREFIX,
5268 .model_id = EON_EN25QH16,
5269 .total_size = 2048,
5270 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005271 /* supports SFDP */
5272 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005273 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5274 .dummy_cycles =
5275 {
5276 .qpi_fast_read = 6,
5277 .qpi_fast_read_qio = 6,
5278 },
Stefan Tauner5c316f92015-02-08 21:57:52 +00005279 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005280 .probe = probe_spi_rdid,
5281 .probe_timing = TIMING_ZERO,
5282 .block_erasers =
5283 {
5284 {
5285 .eraseblocks = { {4 * 1024, 512} },
5286 .block_erase = spi_block_erase_20,
5287 }, {
5288 .eraseblocks = { {64 * 1024, 32} },
5289 .block_erase = spi_block_erase_d8,
5290 }, {
5291 .eraseblocks = { {1024 * 2048, 1} },
5292 .block_erase = spi_block_erase_60,
5293 }, {
5294 .eraseblocks = { {1024 * 2048, 1} },
5295 .block_erase = spi_block_erase_c7,
5296 }
5297 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005298 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005299 .unlock = spi_disable_blockprotect_bp3_srwd,
David Hendricks6d715302011-07-24 22:21:57 +00005300 .write = spi_chip_write_256,
5301 .read = spi_chip_read,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005302 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005303 .prepare_access = spi_prepare_io,
5304 .finish_access = spi_finish_io,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005305 },
5306
5307 {
5308 .vendor = "Eon",
5309 .name = "EN25QH32",
5310 .bustype = BUS_SPI,
5311 .manufacture_id = EON_ID_NOPREFIX,
5312 .model_id = EON_EN25QH32,
5313 .total_size = 4096,
5314 .page_size = 256,
5315 /* supports SFDP */
5316 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005317 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5318 .dummy_cycles =
5319 {
5320 .qpi_fast_read = 6,
5321 .qpi_fast_read_qio = 6,
5322 },
Stefan Tauner23e10b82016-01-23 16:16:49 +00005323 .tested = TEST_OK_PREW,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005324 .probe = probe_spi_rdid,
5325 .probe_timing = TIMING_ZERO,
5326 .block_erasers =
5327 {
5328 {
5329 .eraseblocks = { {4 * 1024, 1024} },
5330 .block_erase = spi_block_erase_20,
5331 }, {
5332 .eraseblocks = { {64 * 1024, 64} },
5333 .block_erase = spi_block_erase_d8,
5334 }, {
5335 .eraseblocks = { {1024 * 4096, 1} },
5336 .block_erase = spi_block_erase_60,
5337 }, {
5338 .eraseblocks = { {1024 * 4096, 1} },
5339 .block_erase = spi_block_erase_c7,
5340 }
5341 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005342 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005343 .unlock = spi_disable_blockprotect_bp3_srwd,
5344 .write = spi_chip_write_256,
5345 .read = spi_chip_read,
5346 .voltage = {2700, 3600},
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005347 .reg_bits =
5348 {
5349 .srp = {STATUS1, 7, RW},
5350 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5351 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5352 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005353 .wp_write_cfg = spi_wp_write_cfg,
5354 .wp_read_cfg = spi_wp_read_cfg,
5355 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005356 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02005357 .prepare_access = spi_prepare_io,
5358 .finish_access = spi_finish_io,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005359 },
5360
5361 {
5362 .vendor = "Eon",
5363 .name = "EN25QH32B",
5364 .bustype = BUS_SPI,
5365 .manufacture_id = EON_ID_NOPREFIX,
5366 .model_id = EON_EN25QH32,
5367 .total_size = 4096,
5368 .page_size = 256,
5369 /* supports SFDP */
5370 /* OTP: 1536B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005371 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_38,
5372 .dummy_cycles =
5373 {
5374 .qpi_fast_read = 6,
5375 .qpi_fast_read_qio = 6,
5376 },
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005377 .tested = TEST_OK_PREW,
5378 .probe = probe_spi_rdid,
5379 .probe_timing = TIMING_ZERO,
5380 .block_erasers =
5381 {
5382 {
5383 .eraseblocks = { {4 * 1024, 1024} },
5384 .block_erase = spi_block_erase_20,
5385 }, {
5386 .eraseblocks = { {32 * 1024, 128} },
5387 .block_erase = spi_block_erase_52,
5388 }, {
5389 .eraseblocks = { {64 * 1024, 64} },
5390 .block_erase = spi_block_erase_d8,
5391 }, {
5392 .eraseblocks = { {1024 * 4096, 1} },
5393 .block_erase = spi_block_erase_60,
5394 }, {
5395 .eraseblocks = { {1024 * 4096, 1} },
5396 .block_erase = spi_block_erase_c7,
5397 }
5398 },
5399 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5400 .unlock = spi_disable_blockprotect_bp3_srwd,
5401 .write = spi_chip_write_256,
5402 .read = spi_chip_read,
5403 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005404 .prepare_access = spi_prepare_io,
5405 .finish_access = spi_finish_io,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005406 },
5407
5408 {
5409 .vendor = "Eon",
5410 .name = "EN25QH64",
5411 .bustype = BUS_SPI,
5412 .manufacture_id = EON_ID_NOPREFIX,
5413 .model_id = EON_EN25QH64,
5414 .total_size = 8192,
5415 .page_size = 256,
5416 /* supports SFDP */
5417 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005418 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5419 .dummy_cycles =
5420 {
5421 .qpi_fast_read = 6,
5422 .qpi_fast_read_qio = 6,
5423 },
Stefan Tauner23e10b82016-01-23 16:16:49 +00005424 .tested = TEST_OK_PREW,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005425 .probe = probe_spi_rdid,
5426 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005427 .block_erasers =
5428 {
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005429 {
5430 .eraseblocks = { {4 * 1024, 2048} },
5431 .block_erase = spi_block_erase_20,
5432 }, {
5433 .eraseblocks = { {64 * 1024, 128} },
5434 .block_erase = spi_block_erase_d8,
5435 }, {
5436 .eraseblocks = { { 8192 * 1024, 1} },
5437 .block_erase = spi_block_erase_60,
5438 }, {
5439 .eraseblocks = { { 8192 * 1024, 1} },
5440 .block_erase = spi_block_erase_c7,
5441 }
5442 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005443 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005444 .unlock = spi_disable_blockprotect_bp3_srwd,
5445 .write = spi_chip_write_256,
5446 .read = spi_chip_read,
5447 .voltage = {2700, 3600},
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005448 .reg_bits =
5449 {
5450 .srp = {STATUS1, 7, RW},
5451 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5452 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5453 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005454 .wp_write_cfg = spi_wp_write_cfg,
5455 .wp_read_cfg = spi_wp_read_cfg,
5456 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005457 .decode_range = decode_range_spi25_64k_block,
Nico Huber930d4212024-05-04 18:59:15 +02005458 .prepare_access = spi_prepare_io,
5459 .finish_access = spi_finish_io,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005460 },
5461
5462 {
5463 .vendor = "Eon",
5464 .name = "EN25QH64A",
5465 .bustype = BUS_SPI,
5466 .manufacture_id = EON_ID_NOPREFIX,
5467 .model_id = EON_EN25QH64,
5468 .total_size = 8192,
5469 .page_size = 256,
5470 /* supports SFDP */
5471 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005472 /* Has a special, volatile status register 3 that is written with
5473 0xc0 like Set Read Parameters. Hence treating as QPI_SRP. */
5474 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP,
5475 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005476 .tested = TEST_OK_PREW,
5477 .probe = probe_spi_rdid,
5478 .probe_timing = TIMING_ZERO,
5479 .block_erasers =
5480 {
5481 {
5482 .eraseblocks = { {4 * 1024, 2048} },
5483 .block_erase = spi_block_erase_20,
5484 }, {
5485 .eraseblocks = { {32 * 1024, 256} },
5486 .block_erase = spi_block_erase_52,
5487 }, {
5488 .eraseblocks = { {64 * 1024, 128} },
5489 .block_erase = spi_block_erase_d8,
5490 }, {
5491 .eraseblocks = { { 8192 * 1024, 1} },
5492 .block_erase = spi_block_erase_60,
5493 }, {
5494 .eraseblocks = { { 8192 * 1024, 1} },
5495 .block_erase = spi_block_erase_c7,
5496 }
5497 },
5498 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5499 .unlock = spi_disable_blockprotect_bp3_srwd,
5500 .write = spi_chip_write_256,
5501 .read = spi_chip_read,
5502 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005503 .prepare_access = spi_prepare_io,
5504 .finish_access = spi_finish_io,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005505 },
5506
5507 {
5508 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005509 .name = "EN25S10",
5510 .bustype = BUS_SPI,
5511 .manufacture_id = EON_ID_NOPREFIX,
5512 .model_id = EON_EN25S10,
5513 .total_size = 128,
5514 .page_size = 256,
5515 /* OTP: 256B total; enter 0x3A */
5516 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5517 .tested = TEST_UNTESTED,
5518 .probe = probe_spi_rdid,
5519 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005520 .block_erasers =
5521 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005522 {
5523 .eraseblocks = { {4 * 1024, 32} },
5524 .block_erase = spi_block_erase_20,
5525 }, {
5526 .eraseblocks = { {32 * 1024, 4} },
5527 .block_erase = spi_block_erase_52,
5528 }, {
5529 .eraseblocks = { {128 * 1024, 1} },
5530 .block_erase = spi_block_erase_60,
5531 }, {
5532 .eraseblocks = { {128 * 1024, 1} },
5533 .block_erase = spi_block_erase_c7,
5534 }
5535 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005536 .printlock = spi_prettyprint_status_register_bp2_srwd,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005537 .unlock = spi_disable_blockprotect,
5538 .write = spi_chip_write_256,
5539 .read = spi_chip_read,
5540 .voltage = {1650, 1950},
5541 },
5542
5543 {
5544 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005545 .name = "EN25S16",
5546 .bustype = BUS_SPI,
5547 .manufacture_id = EON_ID_NOPREFIX,
5548 .model_id = EON_EN25S16,
5549 .total_size = 2048,
5550 .page_size = 256,
5551 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005552 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5553 .dummy_cycles =
5554 {
5555 .qpi_fast_read = 6,
5556 .qpi_fast_read_qio = 6,
5557 },
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005558 .tested = TEST_UNTESTED,
5559 .probe = probe_spi_rdid,
5560 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005561 .block_erasers =
5562 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005563 {
5564 .eraseblocks = { {4 * 1024, 512} },
5565 .block_erase = spi_block_erase_20,
5566 }, {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005567 .eraseblocks = { {32 * 1024, 64} },
5568 .block_erase = spi_block_erase_d8,
5569 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05305570 .eraseblocks = { {64 * 1024, 32} },
5571 .block_erase = spi_block_erase_52,
5572 }, {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005573 .eraseblocks = { {2048 * 1024, 1} },
5574 .block_erase = spi_block_erase_60,
5575 }, {
5576 .eraseblocks = { {2048 * 1024, 1} },
5577 .block_erase = spi_block_erase_c7,
5578 }
5579 },
5580 .printlock = spi_prettyprint_status_register_en25s_wp,
5581 .unlock = spi_disable_blockprotect_bp3_srwd,
5582 .write = spi_chip_write_256,
5583 .read = spi_chip_read,
5584 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02005585 .prepare_access = spi_prepare_io,
5586 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005587 },
5588
5589 {
5590 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005591 .name = "EN25S20",
5592 .bustype = BUS_SPI,
5593 .manufacture_id = EON_ID_NOPREFIX,
5594 .model_id = EON_EN25S20,
5595 .total_size = 256,
5596 .page_size = 256,
5597 /* OTP: 256B total; enter 0x3A */
5598 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5599 .tested = TEST_UNTESTED,
5600 .probe = probe_spi_rdid,
5601 .probe_timing = TIMING_ZERO,
5602 .block_erasers =
5603 {
5604 {
5605 .eraseblocks = { {4 * 1024, 64} },
5606 .block_erase = spi_block_erase_20,
5607 }, {
5608 .eraseblocks = { {64 * 1024, 4} },
5609 .block_erase = spi_block_erase_d8,
5610 }, {
5611 .eraseblocks = { {256 * 1024, 1} },
5612 .block_erase = spi_block_erase_60,
5613 }, {
5614 .eraseblocks = { {256 * 1024, 1} },
5615 .block_erase = spi_block_erase_c7,
5616 }
5617 },
5618 .printlock = spi_prettyprint_status_register_bp2_srwd,
5619 .unlock = spi_disable_blockprotect,
5620 .write = spi_chip_write_256,
5621 .read = spi_chip_read,
5622 .voltage = {1650, 1950},
5623 },
5624
5625 {
5626 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005627 .name = "EN25S32",
5628 .bustype = BUS_SPI,
5629 .manufacture_id = EON_ID_NOPREFIX,
5630 .model_id = EON_EN25S32,
5631 .total_size = 4096,
5632 .page_size = 256,
5633 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005634 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5635 .dummy_cycles =
5636 {
5637 .qpi_fast_read = 6,
5638 .qpi_fast_read_qio = 6,
5639 },
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005640 .tested = TEST_UNTESTED,
5641 .probe = probe_spi_rdid,
5642 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005643 .block_erasers =
5644 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005645 {
5646 .eraseblocks = { {4 * 1024, 1024} },
5647 .block_erase = spi_block_erase_20,
5648 }, {
5649 .eraseblocks = { {32 * 1024, 128} },
5650 .block_erase = spi_block_erase_52,
5651 }, {
5652 .eraseblocks = { {64 * 1024, 64} },
5653 .block_erase = spi_block_erase_d8,
5654 }, {
5655 .eraseblocks = { {4096 * 1024, 1} },
5656 .block_erase = spi_block_erase_60,
5657 }, {
5658 .eraseblocks = { {4096 * 1024, 1} },
5659 .block_erase = spi_block_erase_c7,
5660 }
5661 },
5662 .printlock = spi_prettyprint_status_register_en25s_wp,
5663 .unlock = spi_disable_blockprotect_bp3_srwd,
5664 .write = spi_chip_write_256,
5665 .read = spi_chip_read,
5666 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02005667 .prepare_access = spi_prepare_io,
5668 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005669 },
5670
5671 {
5672 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005673 .name = "EN25S40",
5674 .bustype = BUS_SPI,
5675 .manufacture_id = EON_ID_NOPREFIX,
5676 .model_id = EON_EN25S40,
5677 .total_size = 512,
5678 .page_size = 256,
5679 /* OTP: 256B total; enter 0x3A */
5680 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5681 .tested = TEST_OK_PREW,
5682 .probe = probe_spi_rdid,
5683 .probe_timing = TIMING_ZERO,
5684 .block_erasers =
5685 {
5686 {
5687 .eraseblocks = { {4 * 1024, 128} },
5688 .block_erase = spi_block_erase_20,
5689 }, {
5690 .eraseblocks = { {64 * 1024, 8} },
5691 .block_erase = spi_block_erase_d8,
5692 }, {
5693 .eraseblocks = { {512 * 1024, 1} },
5694 .block_erase = spi_block_erase_60,
5695 }, {
5696 .eraseblocks = { {512 * 1024, 1} },
5697 .block_erase = spi_block_erase_c7,
5698 }
5699 },
5700 .printlock = spi_prettyprint_status_register_bp2_srwd,
5701 .unlock = spi_disable_blockprotect,
5702 .write = spi_chip_write_256,
5703 .read = spi_chip_read,
5704 .voltage = {1650, 1950},
5705 },
5706
5707 {
5708 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005709 .name = "EN25S64",
5710 .bustype = BUS_SPI,
5711 .manufacture_id = EON_ID_NOPREFIX,
5712 .model_id = EON_EN25S64,
5713 .total_size = 8192,
5714 .page_size = 256,
5715 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005716 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5717 .dummy_cycles =
5718 {
5719 .qpi_fast_read = 6,
5720 .qpi_fast_read_qio = 6,
5721 },
Nikolai Artemievdf889fa2021-03-23 17:10:45 +11005722 .tested = TEST_OK_PREW,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005723 .probe = probe_spi_rdid,
5724 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005725 .block_erasers =
5726 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005727 {
5728 .eraseblocks = { {4 * 1024, 2048} },
5729 .block_erase = spi_block_erase_20,
5730 }, {
5731 .eraseblocks = { {64 * 1024, 128} },
5732 .block_erase = spi_block_erase_d8,
5733 }, {
5734 .eraseblocks = { {8192 * 1024, 1} },
5735 .block_erase = spi_block_erase_60,
5736 }, {
5737 .eraseblocks = { {8192 * 1024, 1} },
5738 .block_erase = spi_block_erase_c7,
5739 }
5740 },
5741 .printlock = spi_prettyprint_status_register_en25s_wp,
5742 .unlock = spi_disable_blockprotect_bp3_srwd,
5743 .write = spi_chip_write_256,
5744 .read = spi_chip_read,
5745 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02005746 .prepare_access = spi_prepare_io,
5747 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005748 },
5749
5750 {
5751 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005752 .name = "EN25S80",
5753 .bustype = BUS_SPI,
5754 .manufacture_id = EON_ID_NOPREFIX,
5755 .model_id = EON_EN25S80,
5756 .total_size = 1024,
5757 .page_size = 256,
5758 /* OTP: 256B total; enter 0x3A */
5759 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5760 .tested = TEST_UNTESTED,
5761 .probe = probe_spi_rdid,
5762 .probe_timing = TIMING_ZERO,
Russ Dill3cd5a122010-03-05 08:44:11 +00005763 .block_erasers =
5764 {
5765 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005766 .eraseblocks = { {4 * 1024, 256} },
5767 .block_erase = spi_block_erase_20,
5768 }, {
5769 .eraseblocks = { {64 * 1024, 16} },
5770 .block_erase = spi_block_erase_d8,
5771 }, {
5772 .eraseblocks = { {1024 * 1024, 1} },
5773 .block_erase = spi_block_erase_60,
5774 }, {
5775 .eraseblocks = { {1024 * 1024, 1} },
5776 .block_erase = spi_block_erase_c7,
5777 }
Russ Dill3cd5a122010-03-05 08:44:11 +00005778 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10005779 .printlock = spi_prettyprint_status_register_bp2_srwd,
5780 .unlock = spi_disable_blockprotect,
5781 .write = spi_chip_write_256,
5782 .read = spi_chip_read,
5783 .voltage = {1650, 1950},
Russ Dill3cd5a122010-03-05 08:44:11 +00005784 },
5785
5786 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00005787 .vendor = "Eon",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005788 .name = "EN29F002(A)(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005789 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005790 .manufacture_id = EON_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00005791 .model_id = EON_EN29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005792 .total_size = 256,
5793 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00005794 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Alan Green4362e622019-08-26 15:02:12 +10005795 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005796 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00005797 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00005798 .block_erasers =
5799 {
5800 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00005801 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00005802 {16 * 1024, 1},
Michael Karchere3cb0a12010-03-13 23:47:09 +00005803 {8 * 1024, 2},
5804 {32 * 1024, 1},
5805 {64 * 1024, 3},
Sean Nelson6b11ad22009-12-23 17:05:59 +00005806 },
5807 .block_erase = erase_sector_jedec,
5808 }, {
5809 .eraseblocks = { {256 * 1024, 1} },
5810 .block_erase = erase_chip_block_jedec,
5811 },
5812 },
Michael Karcher1c296ca2009-11-27 17:49:42 +00005813 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00005814 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00005815 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01005816 .prepare_access = prepare_memory_access,
5817 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00005818 },
5819
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005820 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00005821 .vendor = "Eon",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005822 .name = "EN29F002(A)(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005823 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005824 .manufacture_id = EON_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00005825 .model_id = EON_EN29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005826 .total_size = 256,
5827 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00005828 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +00005829 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005830 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00005831 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00005832 .block_erasers =
5833 {
5834 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00005835 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00005836 {64 * 1024, 3},
Michael Karchere3cb0a12010-03-13 23:47:09 +00005837 {32 * 1024, 1},
5838 {8 * 1024, 2},
5839 {16 * 1024, 1},
Sean Nelson6b11ad22009-12-23 17:05:59 +00005840 },
5841 .block_erase = erase_sector_jedec,
5842 }, {
5843 .eraseblocks = { {256 * 1024, 1} },
5844 .block_erase = erase_chip_block_jedec,
5845 },
5846 },
Michael Karcher1c296ca2009-11-27 17:49:42 +00005847 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00005848 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00005849 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01005850 .prepare_access = prepare_memory_access,
5851 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00005852 },
5853
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005854 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00005855 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005856 .name = "EN29F010",
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00005857 .bustype = BUS_PARALLEL,
5858 .manufacture_id = EON_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005859 .model_id = EON_EN29F010,
5860 .total_size = 128,
5861 .page_size = 128,
5862 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
5863 .tested = TEST_OK_PRE,
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00005864 .probe = probe_jedec,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005865 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00005866 .block_erasers =
5867 {
5868 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005869 .eraseblocks = { {16 * 1024, 8} },
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00005870 .block_erase = erase_sector_jedec,
5871 },
5872 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005873 .eraseblocks = { {128 * 1024, 1} },
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00005874 .block_erase = erase_chip_block_jedec,
5875 },
5876 },
5877 .write = write_jedec_1,
5878 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005879 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01005880 .prepare_access = prepare_memory_access,
5881 .finish_access = finish_memory_access,
Rudolf Marek47eff6b2012-04-14 22:51:40 +00005882 },
5883
5884 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00005885 .vendor = "Eon",
5886 .name = "EN29GL064(A)B",
5887 .bustype = BUS_PARALLEL,
5888 .manufacture_id = EON_ID,
5889 .model_id = EON_EN29GL064B,
5890 .total_size = 8192,
5891 .page_size = 128 * 1024, /* actual page size is 16 */
5892 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
5893 .tested = TEST_UNTESTED,
5894 .probe = probe_jedec_29gl,
5895 .probe_timing = TIMING_ZERO,
5896 .block_erasers =
5897 {
5898 {
5899 .eraseblocks = {
5900 {8 * 1024, 8},
5901 {64 * 1024, 127},
5902 },
5903 .block_erase = erase_sector_jedec,
5904 }, {
5905 .eraseblocks = { {8 * 1024 * 1024, 1} },
5906 .block_erase = erase_chip_block_jedec,
5907 },
5908 },
5909 .write = write_jedec_1,
5910 .read = read_memmapped,
5911 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01005912 .prepare_access = prepare_memory_access,
5913 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00005914 },
5915
5916 {
5917 .vendor = "Eon",
5918 .name = "EN29GL064(A)T",
5919 .bustype = BUS_PARALLEL,
5920 .manufacture_id = EON_ID,
5921 .model_id = EON_EN29GL064T,
5922 .total_size = 8192,
5923 .page_size = 128 * 1024, /* actual page size is 16 */
5924 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
5925 .tested = TEST_UNTESTED,
5926 .probe = probe_jedec_29gl,
5927 .probe_timing = TIMING_ZERO,
5928 .block_erasers =
5929 {
5930 {
5931 .eraseblocks = {
5932 {64 * 1024, 127},
5933 {8 * 1024, 8},
5934 },
5935 .block_erase = erase_sector_jedec,
5936 }, {
5937 .eraseblocks = { {8 * 1024 * 1024, 1} },
5938 .block_erase = erase_chip_block_jedec,
5939 },
5940 },
5941 .write = write_jedec_1,
5942 .read = read_memmapped,
5943 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01005944 .prepare_access = prepare_memory_access,
5945 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00005946 },
5947
5948 {
5949 .vendor = "Eon",
5950 .name = "EN29GL064H/L",
5951 .bustype = BUS_PARALLEL,
5952 .manufacture_id = EON_ID,
5953 .model_id = EON_EN29GL064HL,
5954 .total_size = 8192,
5955 .page_size = 128 * 1024, /* actual page size is 16 */
5956 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
5957 .tested = TEST_UNTESTED,
5958 .probe = probe_jedec_29gl,
5959 .probe_timing = TIMING_ZERO,
5960 .block_erasers =
5961 {
5962 {
5963 .eraseblocks = { {64 * 1024, 128} },
5964 .block_erase = erase_sector_jedec,
5965 }, {
5966 .eraseblocks = { {8 * 1024 * 1024, 1} },
5967 .block_erase = erase_chip_block_jedec,
5968 },
5969 },
5970 .write = write_jedec_1,
5971 .read = read_memmapped,
5972 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01005973 .prepare_access = prepare_memory_access,
5974 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00005975 },
5976
5977 {
5978 .vendor = "Eon",
5979 .name = "EN29GL128",
5980 .bustype = BUS_PARALLEL,
5981 .manufacture_id = EON_ID,
5982 .model_id = EON_EN29GL128HL,
5983 .total_size = 16384,
5984 .page_size = 128 * 1024, /* actual page size is 16 */
5985 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
5986 .tested = TEST_UNTESTED,
5987 .probe = probe_jedec_29gl,
5988 .probe_timing = TIMING_ZERO,
5989 .block_erasers =
5990 {
5991 {
5992 .eraseblocks = { {128 * 1024, 128} },
5993 .block_erase = erase_sector_jedec,
5994 }, {
5995 .eraseblocks = { {16 * 1024 * 1024, 1} },
5996 .block_erase = erase_chip_block_jedec,
5997 },
5998 },
5999 .write = write_jedec_1,
6000 .read = read_memmapped,
6001 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006002 .prepare_access = prepare_memory_access,
6003 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006004 },
6005
6006 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006007 .vendor = "Eon",
6008 .name = "EN29LV040(A)",
6009 .bustype = BUS_PARALLEL,
6010 .manufacture_id = EON_ID,
6011 .model_id = EON_EN29LV040,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006012 .total_size = 512,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006013 .page_size = 4 * 1024,
6014 .tested = TEST_OK_PREW,
6015 .probe = probe_jedec,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006016 .probe_timing = TIMING_ZERO,
6017 .block_erasers =
6018 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006019 {
6020 .eraseblocks = { {64 * 1024, 8} },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006021 .block_erase = erase_sector_jedec,
6022 },
6023 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006024 .eraseblocks = { {512 * 1024, 1} },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006025 .block_erase = erase_chip_block_jedec,
6026 },
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006027 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006028 .write = write_jedec_1,
6029 .read = read_memmapped,
6030 .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R and 55R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01006031 .prepare_access = prepare_memory_access,
6032 .finish_access = finish_memory_access,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006033 },
6034
6035 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006036 .vendor = "Eon",
6037 .name = "EN29LV640B",
6038 .bustype = BUS_PARALLEL,
6039 .manufacture_id = EON_ID,
6040 .model_id = EON_EN29LV640B,
6041 .total_size = 8192,
6042 .page_size = 8192,
6043 .feature_bits = FEATURE_ADDR_SHIFTED,
6044 .tested = TEST_OK_PREW,
6045 .probe = probe_en29lv640b,
6046 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006047 .block_erasers =
6048 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006049 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006050 .eraseblocks = {
6051 {8 * 1024, 8},
6052 {64 * 1024, 127},
6053 },
6054 .block_erase = erase_block_jedec,
Stefan Tauner0be072c2016-03-13 15:16:30 +00006055 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006056 .eraseblocks = { {8 * 1024 * 1024, 1} },
6057 .block_erase = erase_chip_block_jedec,
6058 },
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006059 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006060 .write = write_en29lv640b,
6061 .read = read_memmapped,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006062 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006063 .prepare_access = prepare_memory_access,
6064 .finish_access = finish_memory_access,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006065 },
6066
6067 {
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006068 .vendor = "Fudan",
6069 .name = "FM25F005",
6070 .bustype = BUS_SPI,
6071 .manufacture_id = FUDAN_ID_NOPREFIX,
6072 .model_id = FUDAN_FM25F005,
6073 .total_size = 64,
6074 .page_size = 256,
6075 /* OTP: 256B total; enter 0x3A */
6076 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6077 .tested = TEST_UNTESTED,
6078 .probe = probe_spi_rdid,
6079 .probe_timing = TIMING_ZERO,
6080 .block_erasers = {
6081 {
6082 .eraseblocks = { {4 * 1024, 16} },
6083 .block_erase = spi_block_erase_20,
6084 }, {
6085 .eraseblocks = { {32 * 1024, 2} },
6086 .block_erase = spi_block_erase_52,
6087 }, {
6088 .eraseblocks = { {64 * 1024, 1} },
6089 .block_erase = spi_block_erase_d8,
6090 }, {
6091 .eraseblocks = { {64 * 1024, 1} },
6092 .block_erase = spi_block_erase_60,
6093 }, {
6094 .eraseblocks = { {64 * 1024, 1} },
6095 .block_erase = spi_block_erase_c7,
6096 }
6097 },
6098 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6099 .unlock = spi_disable_blockprotect_bp2_srwd,
6100 .write = spi_chip_write_256,
6101 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6102 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6103 },
6104
6105 {
6106 .vendor = "Fudan",
6107 .name = "FM25F01",
6108 .bustype = BUS_SPI,
6109 .manufacture_id = FUDAN_ID_NOPREFIX,
6110 .model_id = FUDAN_FM25F01,
6111 .total_size = 128,
6112 .page_size = 256,
6113 /* OTP: 256B total; enter 0x3A */
6114 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6115 .tested = TEST_UNTESTED,
6116 .probe = probe_spi_rdid,
6117 .probe_timing = TIMING_ZERO,
6118 .block_erasers = {
6119 {
6120 .eraseblocks = { {4 * 1024, 32} },
6121 .block_erase = spi_block_erase_20,
6122 }, {
6123 .eraseblocks = { {32 * 1024, 4} },
6124 .block_erase = spi_block_erase_52,
6125 }, {
6126 .eraseblocks = { {64 * 1024, 2} },
6127 .block_erase = spi_block_erase_d8,
6128 }, {
6129 .eraseblocks = { {128 * 1024, 1} },
6130 .block_erase = spi_block_erase_60,
6131 }, {
6132 .eraseblocks = { {128 * 1024, 1} },
6133 .block_erase = spi_block_erase_c7,
6134 }
6135 },
6136 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6137 .unlock = spi_disable_blockprotect_bp2_srwd,
6138 .write = spi_chip_write_256,
6139 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6140 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6141 },
6142
6143 {
6144 .vendor = "Fudan",
6145 .name = "FM25F02(A)",
6146 .bustype = BUS_SPI,
6147 .manufacture_id = FUDAN_ID_NOPREFIX,
6148 .model_id = FUDAN_FM25F02,
6149 .total_size = 256,
6150 .page_size = 256,
6151 /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */
6152 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6153 .tested = TEST_UNTESTED,
6154 .probe = probe_spi_rdid,
6155 .probe_timing = TIMING_ZERO,
6156 .block_erasers = {
6157 {
6158 .eraseblocks = { {4 * 1024, 64} },
6159 .block_erase = spi_block_erase_20,
6160 }, {
6161 .eraseblocks = { {32 * 1024, 8} },
6162 .block_erase = spi_block_erase_52,
6163 }, {
6164 .eraseblocks = { {64 * 1024, 4} },
6165 .block_erase = spi_block_erase_d8,
6166 }, {
6167 .eraseblocks = { {1024 * 256, 1} },
6168 .block_erase = spi_block_erase_60,
6169 }, {
6170 .eraseblocks = { {1024 * 256, 1} },
6171 .block_erase = spi_block_erase_c7,
6172 },
6173 },
6174 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6175 .unlock = spi_disable_blockprotect_bp2_srwd,
6176 .write = spi_chip_write_256,
6177 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6178 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6179 },
6180
6181 {
6182 .vendor = "Fudan",
6183 .name = "FM25F04(A)",
6184 .bustype = BUS_SPI,
6185 .manufacture_id = FUDAN_ID_NOPREFIX,
6186 .model_id = FUDAN_FM25F04,
6187 .total_size = 512,
6188 .page_size = 256,
6189 /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */
6190 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6191 .tested = TEST_UNTESTED,
6192 .probe = probe_spi_rdid,
6193 .probe_timing = TIMING_ZERO,
6194 .block_erasers = {
6195 {
6196 .eraseblocks = { {4 * 1024, 128} },
6197 .block_erase = spi_block_erase_20,
6198 }, {
6199 .eraseblocks = { {32 * 1024, 16} },
6200 .block_erase = spi_block_erase_52,
6201 }, {
6202 .eraseblocks = { {64 * 1024, 8} },
6203 .block_erase = spi_block_erase_d8,
6204 }, {
6205 .eraseblocks = { {1024 * 512, 1} },
6206 .block_erase = spi_block_erase_60,
6207 }, {
6208 .eraseblocks = { {1024 * 512, 1} },
6209 .block_erase = spi_block_erase_c7,
6210 },
6211 },
6212 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6213 .unlock = spi_disable_blockprotect_bp2_srwd,
6214 .write = spi_chip_write_256,
6215 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6216 .voltage = {2700, 3600},
6217 },
6218
6219 {
6220 .vendor = "Fudan",
6221 .name = "FM25Q08",
6222 .bustype = BUS_SPI,
6223 .manufacture_id = FUDAN_ID_NOPREFIX,
6224 .model_id = FUDAN_FM25Q08,
6225 .total_size = 1024,
6226 .page_size = 256,
6227 /* supports SFDP */
6228 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber226bb872024-04-09 23:30:34 +02006229 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 |
6230 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006231 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006232 .tested = TEST_UNTESTED,
6233 .probe = probe_spi_rdid,
6234 .probe_timing = TIMING_ZERO,
6235 .block_erasers = {
6236 {
6237 .eraseblocks = { {4 * 1024, 256} },
6238 .block_erase = spi_block_erase_20,
6239 }, {
6240 .eraseblocks = { {32 * 1024, 32} },
6241 .block_erase = spi_block_erase_52,
6242 }, {
6243 .eraseblocks = { {64 * 1024, 16} },
6244 .block_erase = spi_block_erase_d8,
6245 }, {
6246 .eraseblocks = { {1024 * 1024, 1} },
6247 .block_erase = spi_block_erase_60,
6248 }, {
6249 .eraseblocks = { {1024 * 1024, 1} },
6250 .block_erase = spi_block_erase_c7,
6251 },
6252 },
Nico Huber226bb872024-04-09 23:30:34 +02006253 .reg_bits =
6254 {
6255 .qe = {STATUS2, 1, RW},
6256 },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006257 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6258 .unlock = spi_disable_blockprotect_bp2_srwd,
6259 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006260 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006261 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006262 .prepare_access = spi_prepare_io,
6263 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006264 },
6265
6266 {
6267 .vendor = "Fudan",
6268 .name = "FM25Q16",
6269 .bustype = BUS_SPI,
6270 .manufacture_id = FUDAN_ID_NOPREFIX,
6271 .model_id = FUDAN_FM25Q16,
6272 .total_size = 2048,
6273 .page_size = 256,
6274 /* supports SFDP */
6275 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber226bb872024-04-09 23:30:34 +02006276 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 |
6277 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006278 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006279 .tested = TEST_UNTESTED,
6280 .probe = probe_spi_rdid,
6281 .probe_timing = TIMING_ZERO,
6282 .block_erasers = {
6283 {
6284 .eraseblocks = { {4 * 1024, 512} },
6285 .block_erase = spi_block_erase_20,
6286 }, {
6287 .eraseblocks = { {32 * 1024, 64} },
6288 .block_erase = spi_block_erase_52,
6289 }, {
6290 .eraseblocks = { {64 * 1024, 32} },
6291 .block_erase = spi_block_erase_d8,
6292 }, {
6293 .eraseblocks = { {2 * 1024 * 1024, 1} },
6294 .block_erase = spi_block_erase_60,
6295 }, {
6296 .eraseblocks = { {2 * 1024 * 1024, 1} },
6297 .block_erase = spi_block_erase_c7,
6298 }
6299 },
Nico Huber226bb872024-04-09 23:30:34 +02006300 .reg_bits =
6301 {
6302 .qe = {STATUS2, 1, RW},
6303 },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006304 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6305 .unlock = spi_disable_blockprotect_bp2_srwd,
6306 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006307 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006308 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006309 .prepare_access = spi_prepare_io,
6310 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006311 },
6312
6313 {
6314 .vendor = "Fudan",
6315 .name = "FM25Q32",
6316 .bustype = BUS_SPI,
6317 .manufacture_id = FUDAN_ID_NOPREFIX,
6318 .model_id = FUDAN_FM25Q32,
6319 .total_size = 4096,
6320 .page_size = 256,
6321 /* supports SFDP */
6322 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber226bb872024-04-09 23:30:34 +02006323 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 |
6324 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006325 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006326 .tested = TEST_UNTESTED,
6327 .probe = probe_spi_rdid,
6328 .probe_timing = TIMING_ZERO,
6329 .block_erasers = {
6330 {
6331 .eraseblocks = { {4 * 1024, 1024} },
6332 .block_erase = spi_block_erase_20,
6333 }, {
6334 .eraseblocks = { {32 * 1024, 128} },
6335 .block_erase = spi_block_erase_52,
6336 }, {
6337 .eraseblocks = { {64 * 1024, 64} },
6338 .block_erase = spi_block_erase_d8,
6339 }, {
6340 .eraseblocks = { {4 * 1024 * 1024, 1} },
6341 .block_erase = spi_block_erase_60,
6342 }, {
6343 .eraseblocks = { {4 * 1024 * 1024, 1} },
6344 .block_erase = spi_block_erase_c7,
6345 },
6346 },
Nico Huber226bb872024-04-09 23:30:34 +02006347 .reg_bits =
6348 {
6349 .qe = {STATUS2, 1, RW},
6350 },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006351 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6352 .unlock = spi_disable_blockprotect_bp2_srwd,
6353 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006354 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006355 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006356 .prepare_access = spi_prepare_io,
6357 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006358 },
6359
6360 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006361 .vendor = "Fujitsu",
6362 .name = "MBM29F004BC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006363 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006364 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006365 .model_id = FUJITSU_MBM29F004BC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006366 .total_size = 512,
6367 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +00006368 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006369 .tested = TEST_UNTESTED,
6370 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00006371 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006372 .block_erasers =
6373 {
6374 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00006375 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006376 {16 * 1024, 1},
6377 {8 * 1024, 2},
6378 {32 * 1024, 1},
6379 {64 * 1024, 7},
6380 },
Sean Nelson35727f72010-01-28 23:55:12 +00006381 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006382 }, {
6383 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +00006384 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006385 },
6386 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006387 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006388 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006389 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006390 .prepare_access = prepare_memory_access,
6391 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006392 },
6393
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006394 {
6395 .vendor = "Fujitsu",
6396 .name = "MBM29F004TC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006397 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006398 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006399 .model_id = FUJITSU_MBM29F004TC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006400 .total_size = 512,
6401 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +00006402 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006403 .tested = TEST_UNTESTED,
6404 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00006405 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006406 .block_erasers =
6407 {
6408 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00006409 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006410 {64 * 1024, 7},
6411 {32 * 1024, 1},
6412 {8 * 1024, 2},
6413 {16 * 1024, 1},
6414 },
Sean Nelson35727f72010-01-28 23:55:12 +00006415 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006416 }, {
6417 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +00006418 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006419 },
6420 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006421 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006422 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006423 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006424 .prepare_access = prepare_memory_access,
6425 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006426 },
6427
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006428 {
Sean Nelson35727f72010-01-28 23:55:12 +00006429 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006430 .vendor = "Fujitsu",
6431 .name = "MBM29F400BC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006432 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006433 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006434 .model_id = FUJITSU_MBM29F400BC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006435 .total_size = 512,
6436 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006437 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +00006438 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006439 .probe = probe_jedec,
6440 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson6b11ad22009-12-23 17:05:59 +00006441 .block_erasers =
6442 {
6443 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00006444 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006445 {16 * 1024, 1},
6446 {8 * 1024, 2},
6447 {32 * 1024, 1},
6448 {64 * 1024, 7},
6449 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006450 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006451 }, {
6452 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006453 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006454 },
6455 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006456 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006457 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00006458 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01006459 .prepare_access = prepare_memory_access,
6460 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006461 },
6462
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006463 {
6464 .vendor = "Fujitsu",
6465 .name = "MBM29F400TC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006466 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006467 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006468 .model_id = FUJITSU_MBM29F400TC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006469 .total_size = 512,
6470 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006471 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006472 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006473 .probe = probe_jedec,
6474 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson6b11ad22009-12-23 17:05:59 +00006475 .block_erasers =
6476 {
6477 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00006478 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006479 {64 * 1024, 7},
6480 {32 * 1024, 1},
6481 {8 * 1024, 2},
6482 {16 * 1024, 1},
6483 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006484 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006485 }, {
6486 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006487 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006488 },
6489 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006490 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006491 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00006492 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01006493 .prepare_access = prepare_memory_access,
6494 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006495 },
6496
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006497 {
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006498 .vendor = "Fujitsu",
6499 .name = "MBM29LV160BE",
6500 .bustype = BUS_PARALLEL,
6501 .manufacture_id = FUJITSU_ID,
6502 .model_id = FUJITSU_MBM29LV160BE,
6503 .total_size = 2 * 1024,
6504 .page_size = 0,
6505 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_SHORT_RESET,
6506 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006507 .probe = probe_jedec,
6508 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006509 .block_erasers =
6510 {
6511 {
6512 .eraseblocks = {
6513 {16 * 1024, 1},
6514 {8 * 1024, 2},
6515 {32 * 1024, 1},
6516 {64 * 1024, 31},
6517 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006518 .block_erase = erase_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006519 }, {
6520 .eraseblocks = { {2048 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006521 .block_erase = erase_chip_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006522 },
6523 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006524 .write = write_jedec_1, /* Supports a fast mode too */
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006525 .read = read_memmapped,
6526 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01006527 .prepare_access = prepare_memory_access,
6528 .finish_access = finish_memory_access,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006529 },
6530
6531 {
6532 .vendor = "Fujitsu",
6533 .name = "MBM29LV160TE",
6534 .bustype = BUS_PARALLEL,
6535 .manufacture_id = FUJITSU_ID,
6536 .model_id = FUJITSU_MBM29LV160TE,
6537 .total_size = 2 * 1024,
6538 .page_size = 0,
6539 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_SHORT_RESET,
6540 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006541 .probe = probe_jedec,
6542 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006543 .block_erasers =
6544 {
6545 {
6546 .eraseblocks = {
6547 {64 * 1024, 31},
6548 {32 * 1024, 1},
6549 {8 * 1024, 2},
6550 {16 * 1024, 1},
6551 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006552 .block_erase = erase_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006553 }, {
6554 .eraseblocks = { {2048 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006555 .block_erase = erase_chip_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006556 },
6557 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006558 .write = write_jedec_1, /* Supports a fast mode too */
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006559 .read = read_memmapped,
6560 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01006561 .prepare_access = prepare_memory_access,
6562 .finish_access = finish_memory_access,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006563 },
6564
6565 {
Justin Chevrier1525b2a2012-04-14 21:59:23 +00006566 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006567 .name = "GD25B128B/GD25Q128B",
Roman Titov95edc892015-04-03 21:29:04 +00006568 .bustype = BUS_SPI,
6569 .manufacture_id = GIGADEVICE_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006570 .model_id = GIGADEVICE_GD25Q128,
6571 .total_size = 16384,
Roman Titov95edc892015-04-03 21:29:04 +00006572 .page_size = 256,
6573 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006574 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006575 .tested = TEST_OK_PREW,
Roman Titov95edc892015-04-03 21:29:04 +00006576 .probe = probe_spi_rdid,
6577 .probe_timing = TIMING_ZERO,
6578 .block_erasers =
6579 {
6580 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006581 .eraseblocks = { {4 * 1024, 4096} },
Roman Titov95edc892015-04-03 21:29:04 +00006582 .block_erase = spi_block_erase_20,
6583 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006584 .eraseblocks = { {32 * 1024, 512} },
Roman Titov95edc892015-04-03 21:29:04 +00006585 .block_erase = spi_block_erase_52,
6586 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006587 .eraseblocks = { {64 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00006588 .block_erase = spi_block_erase_d8,
6589 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006590 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00006591 .block_erase = spi_block_erase_60,
6592 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006593 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00006594 .block_erase = spi_block_erase_c7,
6595 }
6596 },
Nico Huber4da971f2024-03-27 01:18:12 +01006597 .reg_bits =
6598 {
6599 .qe = {STATUS2, 1, RW}, /* RO 1 in GD25B128B case */
6600 },
Roman Titov95edc892015-04-03 21:29:04 +00006601 .printlock = spi_prettyprint_status_register_bp4_srwd,
6602 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6603 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006604 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006605 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006606 .prepare_access = spi_prepare_io,
6607 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00006608 },
6609
6610 {
6611 .vendor = "GigaDevice",
Edward O'Callaghan981a3442021-06-22 11:16:55 +10006612 .name = "GD25LQ128C/GD25LQ128D/GD25LQ128E",
Roman Titov95edc892015-04-03 21:29:04 +00006613 .bustype = BUS_SPI,
6614 .manufacture_id = GIGADEVICE_ID,
Alan Green188127e2019-08-06 16:10:34 +10006615 .model_id = GIGADEVICE_GD25LQ128CD,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006616 .total_size = 16384,
Roman Titov95edc892015-04-03 21:29:04 +00006617 .page_size = 256,
6618 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006619 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
6620 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03006621 .tested = TEST_OK_PREWB,
Roman Titov95edc892015-04-03 21:29:04 +00006622 .probe = probe_spi_rdid,
6623 .probe_timing = TIMING_ZERO,
6624 .block_erasers =
6625 {
6626 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006627 .eraseblocks = { {4 * 1024, 4096} },
Roman Titov95edc892015-04-03 21:29:04 +00006628 .block_erase = spi_block_erase_20,
6629 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006630 .eraseblocks = { {32 * 1024, 512} },
Roman Titov95edc892015-04-03 21:29:04 +00006631 .block_erase = spi_block_erase_52,
6632 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006633 .eraseblocks = { {64 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00006634 .block_erase = spi_block_erase_d8,
6635 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006636 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00006637 .block_erase = spi_block_erase_60,
6638 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006639 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00006640 .block_erase = spi_block_erase_c7,
6641 }
6642 },
6643 .printlock = spi_prettyprint_status_register_bp4_srwd,
6644 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6645 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006646 .read = spi_chip_read,
Roman Titov95edc892015-04-03 21:29:04 +00006647 .voltage = {1695, 1950},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11006648 .reg_bits =
6649 {
Nico Huber4da971f2024-03-27 01:18:12 +01006650 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11006651 .srp = {STATUS1, 7, RW},
6652 .srl = {STATUS2, 0, RW},
6653 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6654 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
6655 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
6656 .cmp = {STATUS2, 6, RW},
6657 },
Nico Huberaabb3e02023-01-13 00:22:30 +01006658 .wp_write_cfg = spi_wp_write_cfg,
6659 .wp_read_cfg = spi_wp_read_cfg,
6660 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11006661 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02006662 .prepare_access = spi_prepare_io,
6663 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00006664 },
6665
6666 {
6667 .vendor = "GigaDevice",
6668 .name = "GD25LQ16",
6669 .bustype = BUS_SPI,
6670 .manufacture_id = GIGADEVICE_ID,
6671 .model_id = GIGADEVICE_GD25LQ16,
6672 .total_size = 2048,
6673 .page_size = 256,
6674 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006675 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ16C */
6676 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Roman Titov95edc892015-04-03 21:29:04 +00006677 .tested = TEST_UNTESTED,
6678 .probe = probe_spi_rdid,
6679 .probe_timing = TIMING_ZERO,
6680 .block_erasers =
6681 {
6682 {
6683 .eraseblocks = { {4 * 1024, 512} },
6684 .block_erase = spi_block_erase_20,
6685 }, {
6686 .eraseblocks = { {32 * 1024, 64} },
6687 .block_erase = spi_block_erase_52,
6688 }, {
6689 .eraseblocks = { {64 * 1024, 32} },
6690 .block_erase = spi_block_erase_d8,
6691 }, {
6692 .eraseblocks = { {2 * 1024 * 1024, 1} },
6693 .block_erase = spi_block_erase_60,
6694 }, {
6695 .eraseblocks = { {2 * 1024 * 1024, 1} },
6696 .block_erase = spi_block_erase_c7,
6697 }
6698 },
Nico Huber4da971f2024-03-27 01:18:12 +01006699 .reg_bits =
6700 {
6701 .qe = {STATUS2, 1, RW},
6702 },
Roman Titov95edc892015-04-03 21:29:04 +00006703 .printlock = spi_prettyprint_status_register_bp4_srwd,
6704 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6705 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006706 .read = spi_chip_read,
Roman Titov95edc892015-04-03 21:29:04 +00006707 .voltage = {1695, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006708 .prepare_access = spi_prepare_io,
6709 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00006710 },
6711
6712 {
6713 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006714 .name = "GD25LQ32",
6715 .bustype = BUS_SPI,
6716 .manufacture_id = GIGADEVICE_ID,
6717 .model_id = GIGADEVICE_GD25LQ32,
6718 .total_size = 4096,
6719 .page_size = 256,
6720 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006721 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
6722 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006723 .tested = TEST_OK_PREW,
6724 .probe = probe_spi_rdid,
6725 .probe_timing = TIMING_ZERO,
6726 .block_erasers =
6727 {
6728 {
6729 .eraseblocks = { {4 * 1024, 1024} },
6730 .block_erase = spi_block_erase_20,
6731 }, {
6732 .eraseblocks = { {32 * 1024, 128} },
6733 .block_erase = spi_block_erase_52,
6734 }, {
6735 .eraseblocks = { {64 * 1024, 64} },
6736 .block_erase = spi_block_erase_d8,
6737 }, {
6738 .eraseblocks = { {4 * 1024 * 1024, 1} },
6739 .block_erase = spi_block_erase_60,
6740 }, {
6741 .eraseblocks = { {4 * 1024 * 1024, 1} },
6742 .block_erase = spi_block_erase_c7,
6743 }
6744 },
Nico Huber4da971f2024-03-27 01:18:12 +01006745 .reg_bits =
6746 {
6747 .qe = {STATUS2, 1, RW},
6748 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00006749 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006750 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6751 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006752 .read = spi_chip_read,
Roman Titov95edc892015-04-03 21:29:04 +00006753 .voltage = {1695, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006754 .prepare_access = spi_prepare_io,
6755 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00006756 },
6757
6758 {
6759 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006760 .name = "GD25LQ40",
6761 .bustype = BUS_SPI,
6762 .manufacture_id = GIGADEVICE_ID,
6763 .model_id = GIGADEVICE_GD25LQ40,
6764 .total_size = 512,
6765 .page_size = 256,
6766 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006767 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ40B, LQ40C */
6768 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006769 .tested = TEST_UNTESTED,
6770 .probe = probe_spi_rdid,
6771 .probe_timing = TIMING_ZERO,
6772 .block_erasers =
6773 {
6774 {
6775 .eraseblocks = { {4 * 1024, 128} },
6776 .block_erase = spi_block_erase_20,
6777 }, {
6778 .eraseblocks = { {32 * 1024, 16} },
6779 .block_erase = spi_block_erase_52,
6780 }, {
6781 .eraseblocks = { {64 * 1024, 8} },
6782 .block_erase = spi_block_erase_d8,
6783 }, {
6784 .eraseblocks = { {512 * 1024, 1} },
6785 .block_erase = spi_block_erase_60,
6786 }, {
6787 .eraseblocks = { {512 * 1024, 1} },
6788 .block_erase = spi_block_erase_c7,
6789 }
6790 },
Nico Huber4da971f2024-03-27 01:18:12 +01006791 .reg_bits =
6792 {
6793 .qe = {STATUS2, 1, RW},
6794 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006795 .printlock = spi_prettyprint_status_register_bp4_srwd,
6796 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6797 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006798 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006799 .voltage = {1695, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006800 .prepare_access = spi_prepare_io,
6801 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006802 },
6803
6804 {
6805 .vendor = "GigaDevice",
Roman Titov95edc892015-04-03 21:29:04 +00006806 .name = "GD25LQ64(B)",
6807 .bustype = BUS_SPI,
6808 .manufacture_id = GIGADEVICE_ID,
6809 .model_id = GIGADEVICE_GD25LQ64,
6810 .total_size = 8192,
6811 .page_size = 256,
6812 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006813 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
6814 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03006815 .tested = TEST_OK_PREWB,
Roman Titov95edc892015-04-03 21:29:04 +00006816 .probe = probe_spi_rdid,
6817 .probe_timing = TIMING_ZERO,
6818 .block_erasers =
6819 {
6820 {
6821 .eraseblocks = { {4 * 1024, 2048} },
6822 .block_erase = spi_block_erase_20,
6823 }, {
6824 .eraseblocks = { {32 * 1024, 256} },
6825 .block_erase = spi_block_erase_52,
6826 }, {
6827 .eraseblocks = { {64 * 1024, 128} },
6828 .block_erase = spi_block_erase_d8,
6829 }, {
6830 .eraseblocks = { {8 * 1024 * 1024, 1} },
6831 .block_erase = spi_block_erase_60,
6832 }, {
6833 .eraseblocks = { {8 * 1024 * 1024, 1} },
6834 .block_erase = spi_block_erase_c7,
6835 }
6836 },
6837 .printlock = spi_prettyprint_status_register_bp4_srwd,
6838 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6839 .write = spi_chip_write_256,
6840 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
6841 .voltage = {1695, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11006842 .reg_bits =
6843 {
Nico Huber4da971f2024-03-27 01:18:12 +01006844 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11006845 .srp = {STATUS1, 7, RW},
6846 .srl = {STATUS2, 0, RW},
6847 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6848 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
6849 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
6850 .cmp = {STATUS2, 6, RW},
6851 },
Nico Huberaabb3e02023-01-13 00:22:30 +01006852 .wp_write_cfg = spi_wp_write_cfg,
6853 .wp_read_cfg = spi_wp_read_cfg,
6854 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11006855 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02006856 .prepare_access = spi_prepare_io,
6857 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00006858 },
6859
6860 {
6861 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006862 .name = "GD25LQ80",
Roman Titov95edc892015-04-03 21:29:04 +00006863 .bustype = BUS_SPI,
6864 .manufacture_id = GIGADEVICE_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006865 .model_id = GIGADEVICE_GD25LQ80,
6866 .total_size = 1024,
Roman Titov95edc892015-04-03 21:29:04 +00006867 .page_size = 256,
6868 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006869 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ80B, LQ80C */
6870 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Roman Titov95edc892015-04-03 21:29:04 +00006871 .tested = TEST_UNTESTED,
6872 .probe = probe_spi_rdid,
6873 .probe_timing = TIMING_ZERO,
6874 .block_erasers =
6875 {
6876 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006877 .eraseblocks = { {4 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00006878 .block_erase = spi_block_erase_20,
6879 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006880 .eraseblocks = { {32 * 1024, 32} },
Roman Titov95edc892015-04-03 21:29:04 +00006881 .block_erase = spi_block_erase_52,
6882 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006883 .eraseblocks = { {64 * 1024, 16} },
Roman Titov95edc892015-04-03 21:29:04 +00006884 .block_erase = spi_block_erase_d8,
6885 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006886 .eraseblocks = { {1 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00006887 .block_erase = spi_block_erase_60,
6888 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006889 .eraseblocks = { {1 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00006890 .block_erase = spi_block_erase_c7,
6891 }
6892 },
Nico Huber4da971f2024-03-27 01:18:12 +01006893 .reg_bits =
6894 {
6895 .qe = {STATUS2, 1, RW},
6896 },
Roman Titov95edc892015-04-03 21:29:04 +00006897 .printlock = spi_prettyprint_status_register_bp4_srwd,
6898 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6899 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006900 .read = spi_chip_read,
Roman Titov95edc892015-04-03 21:29:04 +00006901 .voltage = {1695, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006902 .prepare_access = spi_prepare_io,
6903 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006904 },
6905
6906 {
6907 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006908 .name = "GD25Q10",
6909 .bustype = BUS_SPI,
6910 .manufacture_id = GIGADEVICE_ID,
6911 .model_id = GIGADEVICE_GD25Q10,
6912 .total_size = 128,
6913 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01006914 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006915 .tested = TEST_UNTESTED,
6916 .probe = probe_spi_rdid,
6917 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10006918 .block_erasers =
6919 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006920 {
6921 .eraseblocks = { {4 * 1024, 32} },
6922 .block_erase = spi_block_erase_20,
6923 }, {
6924 .eraseblocks = { {32 * 1024, 4} },
6925 .block_erase = spi_block_erase_52,
6926 }, {
6927 .eraseblocks = { {64 * 1024, 2} },
6928 .block_erase = spi_block_erase_d8,
6929 }, {
6930 .eraseblocks = { {128 * 1024, 1} },
6931 .block_erase = spi_block_erase_60,
6932 }, {
6933 .eraseblocks = { {128 * 1024, 1} },
6934 .block_erase = spi_block_erase_c7,
6935 }
6936 },
Nico Huber4da971f2024-03-27 01:18:12 +01006937 .reg_bits =
6938 {
6939 .qe = {STATUS2, 1, RW},
6940 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00006941 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006942 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6943 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006944 .read = spi_chip_read,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006945 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006946 .prepare_access = spi_prepare_io,
6947 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006948 },
6949
6950 {
6951 .vendor = "GigaDevice",
Nico Huber68573af2024-01-06 18:28:22 +01006952 .name = "GD25Q127C",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00006953 .bustype = BUS_SPI,
6954 .manufacture_id = GIGADEVICE_ID,
6955 .model_id = GIGADEVICE_GD25Q128,
6956 .total_size = 16384,
6957 .page_size = 256,
6958 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
Nico Huber1412d9f2024-01-06 18:25:49 +01006959 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03006960 .tested = TEST_OK_PREWB,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00006961 .probe = probe_spi_rdid,
6962 .probe_timing = TIMING_ZERO,
6963 .block_erasers =
6964 {
6965 {
6966 .eraseblocks = { {4 * 1024, 4096} },
6967 .block_erase = spi_block_erase_20,
6968 }, {
6969 .eraseblocks = { {32 * 1024, 512} },
6970 .block_erase = spi_block_erase_52,
6971 }, {
6972 .eraseblocks = { {64 * 1024, 256} },
6973 .block_erase = spi_block_erase_d8,
6974 }, {
6975 .eraseblocks = { {16 * 1024 * 1024, 1} },
6976 .block_erase = spi_block_erase_60,
6977 }, {
6978 .eraseblocks = { {16 * 1024 * 1024, 1} },
6979 .block_erase = spi_block_erase_c7,
6980 }
6981 },
6982 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
6983 .printlock = spi_prettyprint_status_register_bp4_srwd,
6984 .unlock = spi_disable_blockprotect_bp4_srwd,
6985 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006986 .read = spi_chip_read,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00006987 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11006988 .reg_bits =
6989 {
Nico Huber4da971f2024-03-27 01:18:12 +01006990 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11006991 .srp = {STATUS1, 7, RW},
6992 .srl = {STATUS2, 0, RW},
6993 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6994 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
6995 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
6996 .cmp = {STATUS2, 6, RW},
6997 },
Nico Huberaabb3e02023-01-13 00:22:30 +01006998 .wp_write_cfg = spi_wp_write_cfg,
6999 .wp_read_cfg = spi_wp_read_cfg,
7000 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007001 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007002 .prepare_access = spi_prepare_io,
7003 .finish_access = spi_finish_io,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007004 },
7005
7006 {
7007 .vendor = "GigaDevice",
Nico Huber68573af2024-01-06 18:28:22 +01007008 .name = "GD25Q128C",
7009 .bustype = BUS_SPI,
7010 .manufacture_id = GIGADEVICE_ID,
7011 .model_id = GIGADEVICE_GD25Q128,
7012 .total_size = 16384,
7013 .page_size = 256,
7014 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
7015 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
7016 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
7017 .tested = TEST_OK_PREWB,
7018 .probe = probe_spi_rdid,
7019 .probe_timing = TIMING_ZERO,
7020 .block_erasers =
7021 {
7022 {
7023 .eraseblocks = { {4 * 1024, 4096} },
7024 .block_erase = spi_block_erase_20,
7025 }, {
7026 .eraseblocks = { {32 * 1024, 512} },
7027 .block_erase = spi_block_erase_52,
7028 }, {
7029 .eraseblocks = { {64 * 1024, 256} },
7030 .block_erase = spi_block_erase_d8,
7031 }, {
7032 .eraseblocks = { {16 * 1024 * 1024, 1} },
7033 .block_erase = spi_block_erase_60,
7034 }, {
7035 .eraseblocks = { {16 * 1024 * 1024, 1} },
7036 .block_erase = spi_block_erase_c7,
7037 }
7038 },
7039 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
7040 .printlock = spi_prettyprint_status_register_bp4_srwd,
7041 .unlock = spi_disable_blockprotect_bp4_srwd,
7042 .write = spi_chip_write_256,
7043 .read = spi_chip_read,
7044 .voltage = {2700, 3600},
7045 .reg_bits =
7046 {
7047 .qe = {STATUS2, 1, RW},
7048 .srp = {STATUS1, 7, RW},
7049 .srl = {STATUS2, 0, RW},
7050 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7051 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7052 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7053 .cmp = {STATUS2, 6, RW},
7054 },
7055 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007056 .prepare_access = spi_prepare_io,
7057 .finish_access = spi_finish_io,
Nico Huber68573af2024-01-06 18:28:22 +01007058 },
7059
7060 {
7061 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007062 .name = "GD25Q16(B)",
7063 .bustype = BUS_SPI,
7064 .manufacture_id = GIGADEVICE_ID,
7065 .model_id = GIGADEVICE_GD25Q16,
7066 .total_size = 2048,
7067 .page_size = 256,
7068 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01007069 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007070 .tested = TEST_OK_PREW,
7071 .probe = probe_spi_rdid,
7072 .probe_timing = TIMING_ZERO,
7073 .block_erasers =
7074 {
7075 {
7076 .eraseblocks = { {4 * 1024, 512} },
7077 .block_erase = spi_block_erase_20,
7078 }, {
7079 .eraseblocks = { {32 * 1024, 64} },
7080 .block_erase = spi_block_erase_52,
7081 }, {
7082 .eraseblocks = { {64 * 1024, 32} },
7083 .block_erase = spi_block_erase_d8,
7084 }, {
7085 .eraseblocks = { {2 * 1024 * 1024, 1} },
7086 .block_erase = spi_block_erase_60,
7087 }, {
7088 .eraseblocks = { {2 * 1024 * 1024, 1} },
7089 .block_erase = spi_block_erase_c7,
7090 }
7091 },
Nico Huber4da971f2024-03-27 01:18:12 +01007092 .reg_bits =
7093 {
7094 .qe = {STATUS2, 1, RW},
7095 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007096 .printlock = spi_prettyprint_status_register_bp4_srwd,
7097 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7098 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007099 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007100 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007101 .prepare_access = spi_prepare_io,
7102 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007103 },
7104
7105 {
7106 .vendor = "GigaDevice",
7107 .name = "GD25Q20(B)",
7108 .bustype = BUS_SPI,
7109 .manufacture_id = GIGADEVICE_ID,
7110 .model_id = GIGADEVICE_GD25Q20,
7111 .total_size = 256,
7112 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007113 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007114 .tested = TEST_OK_PREW,
7115 .probe = probe_spi_rdid,
7116 .probe_timing = TIMING_ZERO,
7117 .block_erasers =
7118 {
7119 {
7120 .eraseblocks = { {4 * 1024, 64} },
7121 .block_erase = spi_block_erase_20,
7122 }, {
7123 .eraseblocks = { {32 * 1024, 8} },
7124 .block_erase = spi_block_erase_52,
7125 }, {
7126 .eraseblocks = { {64 * 1024, 4} },
7127 .block_erase = spi_block_erase_d8,
7128 }, {
7129 .eraseblocks = { {256 * 1024, 1} },
7130 .block_erase = spi_block_erase_60,
7131 }, {
7132 .eraseblocks = { {256 * 1024, 1} },
7133 .block_erase = spi_block_erase_c7,
7134 }
7135 },
Nico Huber4da971f2024-03-27 01:18:12 +01007136 .reg_bits = {
7137 .qe = {STATUS2, 1, RW},
7138 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007139 .printlock = spi_prettyprint_status_register_bp4_srwd,
7140 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7141 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007142 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007143 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007144 .prepare_access = spi_prepare_io,
7145 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007146 },
7147
7148 {
7149 .vendor = "GigaDevice",
Nikolai Artemiev3ca0af02022-06-17 15:10:18 +10007150 .name = "GD25Q256D/GD25Q256E",
Alan Green86fc9cf2019-08-26 15:02:12 +10007151 .bustype = BUS_SPI,
7152 .manufacture_id = GIGADEVICE_ID,
7153 .model_id = GIGADEVICE_GD25Q256D,
7154 .total_size = 32768,
7155 .page_size = 256,
Nikolai Artemievb931e7a2022-12-05 13:06:14 +11007156 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA |
Nico Huber4da971f2024-03-27 01:18:12 +01007157 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
7158 FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007159 .tested = TEST_OK_PREWB,
Alan Green86fc9cf2019-08-26 15:02:12 +10007160 .probe = probe_spi_rdid,
7161 .probe_timing = TIMING_ZERO,
7162 .block_erasers =
7163 {
7164 {
7165 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber5374dc32019-10-04 16:16:15 +02007166 .block_erase = spi_block_erase_21,
7167 }, {
7168 .eraseblocks = { {4 * 1024, 8192} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007169 .block_erase = spi_block_erase_20,
7170 }, {
7171 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber5374dc32019-10-04 16:16:15 +02007172 .block_erase = spi_block_erase_5c,
7173 }, {
7174 .eraseblocks = { {32 * 1024, 1024} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007175 .block_erase = spi_block_erase_52,
7176 }, {
7177 .eraseblocks = { {64 * 1024, 512} },
Nico Huber5374dc32019-10-04 16:16:15 +02007178 .block_erase = spi_block_erase_dc,
7179 }, {
7180 .eraseblocks = { {64 * 1024, 512} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007181 .block_erase = spi_block_erase_d8,
7182 }, {
7183 .eraseblocks = { {32 * 1024 * 1024, 1} },
7184 .block_erase = spi_block_erase_60,
7185 }, {
7186 .eraseblocks = { {32 * 1024 * 1024, 1} },
7187 .block_erase = spi_block_erase_c7,
7188 }
7189 },
7190 .printlock = spi_prettyprint_status_register_bp3_srwd,
7191 .unlock = spi_disable_blockprotect,
7192 .write = spi_chip_write_256,
7193 .read = spi_chip_read,
7194 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007195 .reg_bits =
7196 {
Nico Huber4da971f2024-03-27 01:18:12 +01007197 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007198 .srp = {STATUS1, 7, RW},
7199 .srl = {STATUS2, 6, RW},
7200 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
7201 .tb = {STATUS1, 6, RW},
7202 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007203 .wp_write_cfg = spi_wp_write_cfg,
7204 .wp_read_cfg = spi_wp_read_cfg,
7205 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007206 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007207 .prepare_access = spi_prepare_io,
7208 .finish_access = spi_finish_io,
Alan Green86fc9cf2019-08-26 15:02:12 +10007209 },
7210
7211 {
7212 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007213 .name = "GD25Q32(B)",
7214 .bustype = BUS_SPI,
7215 .manufacture_id = GIGADEVICE_ID,
7216 .model_id = GIGADEVICE_GD25Q32,
7217 .total_size = 4096,
7218 .page_size = 256,
7219 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007220 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007221 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007222 .probe = probe_spi_rdid,
7223 .probe_timing = TIMING_ZERO,
7224 .block_erasers =
7225 {
7226 {
7227 .eraseblocks = { {4 * 1024, 1024} },
7228 .block_erase = spi_block_erase_20,
7229 }, {
7230 .eraseblocks = { {32 * 1024, 128} },
7231 .block_erase = spi_block_erase_52,
7232 }, {
7233 .eraseblocks = { {64 * 1024, 64} },
7234 .block_erase = spi_block_erase_d8,
7235 }, {
7236 .eraseblocks = { {4 * 1024 * 1024, 1} },
7237 .block_erase = spi_block_erase_60,
7238 }, {
7239 .eraseblocks = { {4 * 1024 * 1024, 1} },
7240 .block_erase = spi_block_erase_c7,
7241 }
7242 },
7243 .printlock = spi_prettyprint_status_register_bp4_srwd,
7244 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7245 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007246 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007247 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007248 .reg_bits =
7249 {
Nico Huber4da971f2024-03-27 01:18:12 +01007250 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007251 .srp = {STATUS1, 7, RW},
7252 .srl = {STATUS2, 0, RW},
7253 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7254 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7255 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7256 .cmp = {STATUS2, 6, RW},
7257 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007258 .wp_write_cfg = spi_wp_write_cfg,
7259 .wp_read_cfg = spi_wp_read_cfg,
7260 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007261 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007262 .prepare_access = spi_prepare_io,
7263 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007264 },
7265
7266 {
7267 .vendor = "GigaDevice",
7268 .name = "GD25Q40(B)",
7269 .bustype = BUS_SPI,
7270 .manufacture_id = GIGADEVICE_ID,
7271 .model_id = GIGADEVICE_GD25Q40,
7272 .total_size = 512,
7273 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007274 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Simon Buhrow551664c2022-03-09 16:09:08 +01007275 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007276 .probe = probe_spi_rdid,
7277 .probe_timing = TIMING_ZERO,
7278 .block_erasers =
7279 {
7280 {
7281 .eraseblocks = { {4 * 1024, 128} },
7282 .block_erase = spi_block_erase_20,
7283 }, {
7284 .eraseblocks = { {32 * 1024, 16} },
7285 .block_erase = spi_block_erase_52,
7286 }, {
7287 .eraseblocks = { {64 * 1024, 8} },
7288 .block_erase = spi_block_erase_d8,
7289 }, {
7290 .eraseblocks = { {512 * 1024, 1} },
7291 .block_erase = spi_block_erase_60,
7292 }, {
7293 .eraseblocks = { {512 * 1024, 1} },
7294 .block_erase = spi_block_erase_c7,
7295 }
7296 },
Nico Huber4da971f2024-03-27 01:18:12 +01007297 .reg_bits =
7298 {
7299 .qe = {STATUS2, 1, RW},
7300 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007301 .printlock = spi_prettyprint_status_register_bp4_srwd,
7302 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7303 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007304 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007305 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007306 .prepare_access = spi_prepare_io,
7307 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007308 },
7309
7310 {
7311 .vendor = "GigaDevice",
7312 .name = "GD25Q512",
7313 .bustype = BUS_SPI,
7314 .manufacture_id = GIGADEVICE_ID,
7315 .model_id = GIGADEVICE_GD25Q512,
7316 .total_size = 64,
7317 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007318 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007319 .tested = TEST_OK_PREW,
7320 .probe = probe_spi_rdid,
7321 .probe_timing = TIMING_ZERO,
7322 .block_erasers =
7323 {
7324 {
7325 .eraseblocks = { {4 * 1024, 16} },
7326 .block_erase = spi_block_erase_20,
7327 }, {
7328 .eraseblocks = { {32 * 1024, 2} },
7329 .block_erase = spi_block_erase_52,
7330 }, {
7331 .eraseblocks = { {64 * 1024, 1} },
7332 .block_erase = spi_block_erase_60,
7333 }, {
7334 .eraseblocks = { {64 * 1024, 1} },
7335 .block_erase = spi_block_erase_c7,
7336 }
7337 },
Nico Huber4da971f2024-03-27 01:18:12 +01007338 .reg_bits =
7339 {
7340 .qe = {STATUS2, 1, RW},
7341 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007342 .printlock = spi_prettyprint_status_register_bp4_srwd,
7343 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7344 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007345 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007346 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007347 .prepare_access = spi_prepare_io,
7348 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007349 },
7350
7351 {
7352 .vendor = "GigaDevice",
7353 .name = "GD25Q64(B)",
7354 .bustype = BUS_SPI,
7355 .manufacture_id = GIGADEVICE_ID,
7356 .model_id = GIGADEVICE_GD25Q64,
7357 .total_size = 8192,
7358 .page_size = 256,
7359 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007360 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007361 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007362 .probe = probe_spi_rdid,
7363 .probe_timing = TIMING_ZERO,
7364 .block_erasers =
7365 {
7366 {
7367 .eraseblocks = { {4 * 1024, 2048} },
7368 .block_erase = spi_block_erase_20,
7369 }, {
7370 .eraseblocks = { {32 * 1024, 256} },
7371 .block_erase = spi_block_erase_52,
7372 }, {
7373 .eraseblocks = { {64 * 1024, 128} },
7374 .block_erase = spi_block_erase_d8,
7375 }, {
7376 .eraseblocks = { {8 * 1024 * 1024, 1} },
7377 .block_erase = spi_block_erase_60,
7378 }, {
7379 .eraseblocks = { {8 * 1024 * 1024, 1} },
7380 .block_erase = spi_block_erase_c7,
7381 }
7382 },
7383 .printlock = spi_prettyprint_status_register_bp4_srwd,
7384 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7385 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007386 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007387 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007388 .reg_bits =
7389 {
Nico Huber4da971f2024-03-27 01:18:12 +01007390 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007391 .srp = {STATUS1, 7, RW},
7392 .srl = {STATUS2, 0, RW},
7393 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7394 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7395 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7396 .cmp = {STATUS2, 6, RW},
7397 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007398 .wp_write_cfg = spi_wp_write_cfg,
7399 .wp_read_cfg = spi_wp_read_cfg,
7400 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007401 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007402 .prepare_access = spi_prepare_io,
7403 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007404 },
7405
7406 {
7407 .vendor = "GigaDevice",
7408 .name = "GD25Q80(B)",
7409 .bustype = BUS_SPI,
7410 .manufacture_id = GIGADEVICE_ID,
7411 .model_id = GIGADEVICE_GD25Q80,
7412 .total_size = 1024,
7413 .page_size = 256,
7414 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01007415 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007416 .tested = TEST_OK_PREW,
7417 .probe = probe_spi_rdid,
7418 .probe_timing = TIMING_ZERO,
7419 .block_erasers =
7420 {
7421 {
7422 .eraseblocks = { {4 * 1024, 256} },
7423 .block_erase = spi_block_erase_20,
7424 }, {
7425 .eraseblocks = { {32 * 1024, 32} },
7426 .block_erase = spi_block_erase_52,
7427 }, {
7428 .eraseblocks = { {64 * 1024, 16} },
7429 .block_erase = spi_block_erase_d8,
7430 }, {
7431 .eraseblocks = { {1024 * 1024, 1} },
7432 .block_erase = spi_block_erase_60,
7433 }, {
7434 .eraseblocks = { {1024 * 1024, 1} },
7435 .block_erase = spi_block_erase_c7,
7436 }
7437 },
Nico Huber4da971f2024-03-27 01:18:12 +01007438 .reg_bits =
7439 {
7440 .qe = {STATUS2, 1, RW},
7441 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007442 .printlock = spi_prettyprint_status_register_bp4_srwd,
7443 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7444 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007445 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007446 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007447 .prepare_access = spi_prepare_io,
7448 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007449 },
7450
7451 {
7452 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007453 .name = "GD25T80",
7454 .bustype = BUS_SPI,
7455 .manufacture_id = GIGADEVICE_ID,
7456 .model_id = GIGADEVICE_GD25T80,
7457 .total_size = 1024,
7458 .page_size = 256,
7459 /* OTP: 256B total; enter 0x3A */
7460 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
7461 .tested = TEST_UNTESTED,
7462 .probe = probe_spi_rdid,
7463 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10007464 .block_erasers =
7465 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007466 {
7467 .eraseblocks = { {4 * 1024, 256} },
7468 .block_erase = spi_block_erase_20,
7469 }, {
7470 .eraseblocks = { {64 * 1024, 16} },
7471 .block_erase = spi_block_erase_52,
7472 }, {
7473 .eraseblocks = { {64 * 1024, 16} },
7474 .block_erase = spi_block_erase_d8,
7475 }, {
7476 .eraseblocks = { {1024 * 1024, 1} },
7477 .block_erase = spi_block_erase_60,
7478 }, {
7479 .eraseblocks = { {1024 * 1024, 1} },
7480 .block_erase = spi_block_erase_c7,
7481 }
7482 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00007483 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007484 .unlock = spi_disable_blockprotect,
7485 .write = spi_chip_write_256,
7486 .read = spi_chip_read,
Stefan Tauner352e50b2013-02-22 15:58:45 +00007487 .voltage = {2700, 3600},
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007488 },
7489
7490 {
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007491 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007492 .name = "GD25VQ16C",
7493 .bustype = BUS_SPI,
7494 .manufacture_id = GIGADEVICE_ID,
7495 .model_id = GIGADEVICE_GD25VQ16C,
7496 .total_size = 2 * 1024,
7497 .page_size = 256,
7498 /* Supports SFDP */
7499 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007500 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007501 .tested = TEST_UNTESTED,
7502 .probe = probe_spi_rdid,
7503 .probe_timing = TIMING_ZERO,
7504 .block_erasers =
7505 {
7506 {
7507 .eraseblocks = { { 4 * 1024, 512} },
7508 .block_erase = spi_block_erase_20,
7509 }, {
7510 .eraseblocks = { { 32 * 1024, 64} },
7511 .block_erase = spi_block_erase_52,
7512 }, {
7513 .eraseblocks = { { 64 * 1024, 32} },
7514 .block_erase = spi_block_erase_d8,
7515 }, {
7516 .eraseblocks = { {2 * 1024 * 1024, 1} },
7517 .block_erase = spi_block_erase_60,
7518 }, {
7519 .eraseblocks = { {2 * 1024 * 1024, 1} },
7520 .block_erase = spi_block_erase_c7,
7521 }
7522 },
Nico Huber4da971f2024-03-27 01:18:12 +01007523 .reg_bits =
7524 {
7525 .qe = {STATUS2, 1, RW},
7526 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007527 .printlock = spi_prettyprint_status_register_bp4_srwd,
7528 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7529 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007530 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007531 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007532 .prepare_access = spi_prepare_io,
7533 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007534 },
7535
7536 {
7537 .vendor = "GigaDevice",
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007538 .name = "GD25VQ21B",
7539 .bustype = BUS_SPI,
7540 .manufacture_id = GIGADEVICE_ID,
7541 .model_id = GIGADEVICE_GD25VQ21B,
7542 .total_size = 256,
7543 .page_size = 256,
7544 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007545 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
7546 FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007547 .tested = TEST_UNTESTED,
7548 .probe = probe_spi_rdid,
7549 .probe_timing = TIMING_ZERO,
7550 .block_erasers =
7551 {
7552 {
7553 .eraseblocks = { { 4 * 1024, 64} },
7554 .block_erase = spi_block_erase_20,
7555 }, {
7556 .eraseblocks = { { 32 * 1024, 8} },
7557 .block_erase = spi_block_erase_52,
7558 }, {
7559 .eraseblocks = { { 64 * 1024, 4} },
7560 .block_erase = spi_block_erase_d8,
7561 }, {
7562 .eraseblocks = { {256 * 1024, 1} },
7563 .block_erase = spi_block_erase_60,
7564 }, {
7565 .eraseblocks = { {256 * 1024, 1} },
7566 .block_erase = spi_block_erase_c7,
7567 }
7568 },
Nico Huber4da971f2024-03-27 01:18:12 +01007569 .reg_bits =
7570 {
7571 .qe = {STATUS2, 1, RW},
7572 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007573 .printlock = spi_prettyprint_status_register_bp4_srwd,
7574 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7575 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007576 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007577 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007578 .prepare_access = spi_prepare_io,
7579 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007580 },
7581
7582 {
7583 .vendor = "GigaDevice",
7584 .name = "GD25VQ40C",
7585 .bustype = BUS_SPI,
7586 .manufacture_id = GIGADEVICE_ID,
7587 .model_id = GIGADEVICE_GD25VQ41B,
7588 .total_size = 512,
7589 .page_size = 256,
7590 /* Supports SFDP */
7591 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007592 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007593 .tested = TEST_UNTESTED,
7594 .probe = probe_spi_rdid,
7595 .probe_timing = TIMING_ZERO,
7596 .block_erasers =
7597 {
7598 {
7599 .eraseblocks = { { 4 * 1024, 128} },
7600 .block_erase = spi_block_erase_20,
7601 }, {
7602 .eraseblocks = { { 32 * 1024, 16} },
7603 .block_erase = spi_block_erase_52,
7604 }, {
7605 .eraseblocks = { { 64 * 1024, 8} },
7606 .block_erase = spi_block_erase_d8,
7607 }, {
7608 .eraseblocks = { {512 * 1024, 1} },
7609 .block_erase = spi_block_erase_60,
7610 }, {
7611 .eraseblocks = { {512 * 1024, 1} },
7612 .block_erase = spi_block_erase_c7,
7613 }
7614 },
Nico Huber4da971f2024-03-27 01:18:12 +01007615 .reg_bits =
7616 {
7617 .qe = {STATUS2, 1, RW},
7618 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007619 .printlock = spi_prettyprint_status_register_bp4_srwd,
7620 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7621 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007622 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007623 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007624 .prepare_access = spi_prepare_io,
7625 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007626 },
7627
7628 {
7629 .vendor = "GigaDevice",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007630 .name = "GD25VQ41B",
7631 .bustype = BUS_SPI,
7632 .manufacture_id = GIGADEVICE_ID,
7633 .model_id = GIGADEVICE_GD25VQ41B,
7634 .total_size = 512,
7635 .page_size = 256,
7636 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007637 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
7638 FEATURE_OTP | FEATURE_QIO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00007639 .tested = TEST_OK_PREW,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007640 .probe = probe_spi_rdid,
7641 .probe_timing = TIMING_ZERO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00007642 .block_erasers =
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007643 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00007644 {
7645 .eraseblocks = { { 4 * 1024, 128} },
7646 .block_erase = spi_block_erase_20,
7647 }, {
7648 .eraseblocks = { { 32 * 1024, 16} },
7649 .block_erase = spi_block_erase_52,
7650 }, {
7651 .eraseblocks = { { 64 * 1024, 8} },
7652 .block_erase = spi_block_erase_d8,
7653 }, {
7654 .eraseblocks = { {512 * 1024, 1} },
7655 .block_erase = spi_block_erase_60,
7656 }, {
7657 .eraseblocks = { {512 * 1024, 1} },
7658 .block_erase = spi_block_erase_c7,
7659 }
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007660 },
Nico Huber4da971f2024-03-27 01:18:12 +01007661 .reg_bits =
7662 {
7663 .qe = {STATUS2, 1, RW},
7664 },
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007665 .printlock = spi_prettyprint_status_register_bp4_srwd,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007666 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7667 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007668 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007669 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007670 .prepare_access = spi_prepare_io,
7671 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007672 },
7673
7674 {
7675 .vendor = "GigaDevice",
7676 .name = "GD25VQ80C",
7677 .bustype = BUS_SPI,
7678 .manufacture_id = GIGADEVICE_ID,
7679 .model_id = GIGADEVICE_GD25VQ80C,
7680 .total_size = 1024,
7681 .page_size = 256,
7682 /* Supports SFDP */
7683 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007684 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007685 .tested = TEST_UNTESTED,
7686 .probe = probe_spi_rdid,
7687 .probe_timing = TIMING_ZERO,
7688 .block_erasers =
7689 {
7690 {
7691 .eraseblocks = { { 4 * 1024, 256} },
7692 .block_erase = spi_block_erase_20,
7693 }, {
7694 .eraseblocks = { { 32 * 1024, 32} },
7695 .block_erase = spi_block_erase_52,
7696 }, {
7697 .eraseblocks = { { 64 * 1024, 16} },
7698 .block_erase = spi_block_erase_d8,
7699 }, {
7700 .eraseblocks = { {1024 * 1024, 1} },
7701 .block_erase = spi_block_erase_60,
7702 }, {
7703 .eraseblocks = { {1024 * 1024, 1} },
7704 .block_erase = spi_block_erase_c7,
7705 }
7706 },
Nico Huber4da971f2024-03-27 01:18:12 +01007707 .reg_bits =
7708 {
7709 .qe = {STATUS2, 1, RW},
7710 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007711 .printlock = spi_prettyprint_status_register_bp4_srwd,
7712 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7713 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007714 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007715 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007716 .prepare_access = spi_prepare_io,
7717 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007718 },
7719
7720 {
Dino Li3214f582020-03-25 17:39:53 +08007721 .vendor = "GigaDevice",
7722 .name = "GD25WQ80E",
7723 .bustype = BUS_SPI,
7724 .manufacture_id = GIGADEVICE_ID,
7725 .model_id = GIGADEVICE_GD25WQ80E,
7726 .total_size = 1024,
7727 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007728 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Dino Li3214f582020-03-25 17:39:53 +08007729 .tested = TEST_OK_PREW,
7730 .probe = probe_spi_rdid,
7731 .probe_timing = TIMING_ZERO,
7732 .block_erasers =
7733 {
7734 {
7735 .eraseblocks = { {4 * 1024, 256} },
7736 .block_erase = spi_block_erase_20,
7737 }, {
7738 .eraseblocks = { {32 * 1024, 32} },
7739 .block_erase = spi_block_erase_52,
7740 }, {
7741 .eraseblocks = { {64 * 1024, 16} },
7742 .block_erase = spi_block_erase_d8,
7743 }, {
7744 .eraseblocks = { {1 * 1024 * 1024, 1} },
7745 .block_erase = spi_block_erase_60,
7746 }, {
7747 .eraseblocks = { {1 * 1024 * 1024, 1} },
7748 .block_erase = spi_block_erase_c7,
7749 }
7750 },
Nico Huber4da971f2024-03-27 01:18:12 +01007751 .reg_bits =
7752 {
7753 .qe = {STATUS2, 1, RW},
7754 },
Dino Li3214f582020-03-25 17:39:53 +08007755 .printlock = spi_prettyprint_status_register_bp4_srwd,
7756 .unlock = spi_disable_blockprotect_bp4_srwd,
7757 .write = spi_chip_write_256,
7758 .read = spi_chip_read,
7759 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007760 .prepare_access = spi_prepare_io,
7761 .finish_access = spi_finish_io,
Dino Li3214f582020-03-25 17:39:53 +08007762 },
7763
7764 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007765 .vendor = "Hyundai",
7766 .name = "HY29F002B",
7767 .bustype = BUS_PARALLEL,
7768 .manufacture_id = HYUNDAI_ID,
7769 .model_id = HYUNDAI_HY29F002B,
7770 .total_size = 256,
7771 .page_size = 256 * 1024,
7772 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007773 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007774 .probe = probe_jedec,
7775 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007776 .block_erasers =
7777 {
7778 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007779 .eraseblocks = {
7780 {16 * 1024, 1},
7781 {8 * 1024, 2},
7782 {32 * 1024, 1},
7783 {64 * 1024, 3},
7784 },
7785 .block_erase = erase_sector_jedec,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007786 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007787 .eraseblocks = { {256 * 1024, 1} },
7788 .block_erase = erase_chip_block_jedec,
7789 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007790 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007791 .write = write_jedec_1,
7792 .read = read_memmapped,
7793 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007794 .prepare_access = prepare_memory_access,
7795 .finish_access = finish_memory_access,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007796 },
7797
7798 {
David Borgc96a8bd2010-06-21 16:12:22 +00007799 .vendor = "Hyundai",
7800 .name = "HY29F002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007801 .bustype = BUS_PARALLEL,
David Borgc96a8bd2010-06-21 16:12:22 +00007802 .manufacture_id = HYUNDAI_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007803 .model_id = HYUNDAI_HY29F002T,
David Borgc96a8bd2010-06-21 16:12:22 +00007804 .total_size = 256,
7805 .page_size = 256 * 1024,
7806 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00007807 .tested = TEST_OK_PRE,
David Borgc96a8bd2010-06-21 16:12:22 +00007808 .probe = probe_jedec,
7809 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
7810 .block_erasers =
7811 {
7812 {
7813 .eraseblocks = {
7814 {64 * 1024, 3},
7815 {32 * 1024, 1},
7816 {8 * 1024, 2},
7817 {16 * 1024, 1},
7818 },
7819 .block_erase = erase_sector_jedec,
7820 }, {
7821 .eraseblocks = { {256 * 1024, 1} },
7822 .block_erase = erase_chip_block_jedec,
7823 },
7824 },
7825 .write = write_jedec_1,
7826 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007827 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007828 .prepare_access = prepare_memory_access,
7829 .finish_access = finish_memory_access,
David Borgc96a8bd2010-06-21 16:12:22 +00007830 },
7831
7832 {
7833 .vendor = "Hyundai",
Joshua Roysf1324e02010-09-16 00:51:51 +00007834 .name = "HY29F040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007835 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +00007836 .manufacture_id = HYUNDAI_ID,
7837 .model_id = HYUNDAI_HY29F040A,
7838 .total_size = 512,
7839 .page_size = 64 * 1024,
7840 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
7841 .tested = TEST_UNTESTED,
7842 .probe = probe_jedec,
7843 .probe_timing = TIMING_ZERO,
7844 .block_erasers =
7845 {
7846 {
7847 .eraseblocks = { {64 * 1024, 8} },
7848 .block_erase = erase_sector_jedec,
7849 }, {
7850 .eraseblocks = { {512 * 1024, 1} },
7851 .block_erase = erase_chip_block_jedec,
7852 },
7853 },
7854 .write = write_jedec_1,
7855 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007856 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01007857 .prepare_access = prepare_memory_access,
7858 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +00007859 },
7860
7861 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00007862 .vendor = "ISSI",
Angel Pons2ef47f32018-09-30 16:47:30 +02007863 .name = "IS25LP064",
7864 .bustype = BUS_SPI,
7865 .manufacture_id = ISSI_ID_SPI,
7866 .model_id = ISSI_IS25LP064,
7867 .total_size = 8192,
7868 .page_size = 256,
7869 /* OTP: 1024B total; read 0x48; write 0x42 */
7870 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Simon Buhrow9bf829d2021-10-20 17:09:09 +02007871 .tested = TEST_OK_PREW,
Angel Pons2ef47f32018-09-30 16:47:30 +02007872 .probe = probe_spi_rdid,
7873 .probe_timing = TIMING_ZERO,
7874 .block_erasers =
7875 {
7876 {
7877 .eraseblocks = { {4 * 1024, 2048} },
7878 .block_erase = spi_block_erase_20,
7879 }, {
7880 .eraseblocks = { {4 * 1024, 2048} },
7881 .block_erase = spi_block_erase_d7,
7882 }, {
7883 .eraseblocks = { {32 * 1024, 256} },
7884 .block_erase = spi_block_erase_52,
7885 }, {
7886 .eraseblocks = { {64 * 1024, 128} },
7887 .block_erase = spi_block_erase_d8,
7888 }, {
7889 .eraseblocks = { {8 * 1024 * 1024, 1} },
7890 .block_erase = spi_block_erase_60,
7891 }, {
7892 .eraseblocks = { {8 * 1024 * 1024, 1} },
7893 .block_erase = spi_block_erase_c7,
7894 }
7895 },
7896 .unlock = spi_disable_blockprotect,
7897 .write = spi_chip_write_256,
7898 .read = spi_chip_read,
7899 .voltage = {2300, 3600},
7900 },
7901
7902 {
7903 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -07007904 .name = "IS25LP128",
7905 .bustype = BUS_SPI,
7906 .manufacture_id = ISSI_ID_SPI,
7907 .model_id = ISSI_IS25LP128,
7908 .total_size = 16384,
7909 .page_size = 256,
7910 /* OTP: 1024B total; read 0x48; write 0x42 */
7911 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
7912 .tested = TEST_OK_PREW,
7913 .probe = probe_spi_rdid,
7914 .probe_timing = TIMING_ZERO,
7915 .block_erasers =
7916 {
7917 {
7918 .eraseblocks = { {4 * 1024, 4096} },
7919 .block_erase = spi_block_erase_20,
7920 }, {
7921 .eraseblocks = { {4 * 1024, 4096} },
7922 .block_erase = spi_block_erase_d7,
7923 }, {
7924 .eraseblocks = { {32 * 1024, 512} },
7925 .block_erase = spi_block_erase_52,
7926 }, {
7927 .eraseblocks = { {64 * 1024, 256} },
7928 .block_erase = spi_block_erase_d8,
7929 }, {
7930 .eraseblocks = { {16 * 1024 * 1024, 1} },
7931 .block_erase = spi_block_erase_60,
7932 }, {
7933 .eraseblocks = { {16 * 1024 * 1024, 1} },
7934 .block_erase = spi_block_erase_c7,
7935 }
7936 },
7937 .unlock = spi_disable_blockprotect,
7938 .write = spi_chip_write_256,
7939 .read = spi_chip_read,
7940 .voltage = {2300, 3600},
7941 },
7942
7943 {
7944 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +00007945 .name = "IS25LP256",
7946 .bustype = BUS_SPI,
7947 .manufacture_id = ISSI_ID_SPI,
7948 .model_id = ISSI_IS25LP256,
7949 .total_size = 32768,
7950 .page_size = 256,
7951 /* supports SFDP */
7952 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +02007953 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
7954 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +00007955 .tested = TEST_OK_PREW,
7956 .probe = probe_spi_rdid,
7957 .probe_timing = TIMING_ZERO,
7958 .block_erasers =
7959 {
7960 {
7961 .eraseblocks = { {4 * 1024, 8192} },
7962 .block_erase = spi_block_erase_21,
7963 }, {
7964 .eraseblocks = { {4 * 1024, 8192} },
7965 .block_erase = spi_block_erase_20,
7966 /* could also use spi_block_erase_d7 */
7967 }, {
7968 .eraseblocks = { {32 * 1024, 1024} },
7969 .block_erase = spi_block_erase_5c,
7970 }, {
7971 .eraseblocks = { {32 * 1024, 1024} },
7972 .block_erase = spi_block_erase_52,
7973 }, {
7974 .eraseblocks = { {64 * 1024, 512} },
7975 .block_erase = spi_block_erase_dc,
7976 }, {
7977 .eraseblocks = { {64 * 1024, 512} },
7978 .block_erase = spi_block_erase_d8,
7979 }, {
7980 .eraseblocks = { {32 * 1024 * 1024, 1} },
7981 .block_erase = spi_block_erase_60,
7982 }, {
7983 .eraseblocks = { {32 * 1024 * 1024, 1} },
7984 .block_erase = spi_block_erase_c7,
7985 }
7986 },
7987 .unlock = spi_disable_blockprotect,
7988 .write = spi_chip_write_256,
7989 .read = spi_chip_read,
7990 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007991 .prepare_access = spi_prepare_io,
7992 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +00007993 },
7994
7995 {
7996 .vendor = "ISSI",
Nico Huberb27b8d12018-10-02 20:46:21 +02007997 .name = "IS25WP032",
7998 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +10007999 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +02008000 .model_id = ISSI_IS25WP032,
8001 .total_size = 4096,
8002 .page_size = 256,
8003 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008004 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8005 dummy cycles; non-volatile read parameters, so disable for now */
8006 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +02008007 .tested = TEST_UNTESTED,
8008 .probe = probe_spi_rdid,
8009 .probe_timing = TIMING_ZERO,
8010 .block_erasers =
8011 {
8012 {
8013 .eraseblocks = { {4 * 1024, 1024} },
8014 .block_erase = spi_block_erase_20,
8015 }, {
8016 .eraseblocks = { {4 * 1024, 1024} },
8017 .block_erase = spi_block_erase_d7,
8018 }, {
8019 .eraseblocks = { {32 * 1024, 128} },
8020 .block_erase = spi_block_erase_52,
8021 }, {
8022 .eraseblocks = { {64 * 1024, 64} },
8023 .block_erase = spi_block_erase_d8,
8024 }, {
8025 .eraseblocks = { {4 * 1024 * 1024, 1} },
8026 .block_erase = spi_block_erase_60,
8027 }, {
8028 .eraseblocks = { {4 * 1024 * 1024, 1} },
8029 .block_erase = spi_block_erase_c7,
8030 }
8031 },
8032 .unlock = spi_disable_blockprotect,
8033 .write = spi_chip_write_256,
8034 .read = spi_chip_read,
8035 .voltage = {1650, 1950},
8036 },
8037
8038 {
8039 .vendor = "ISSI",
8040 .name = "IS25WP064",
8041 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +10008042 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +02008043 .model_id = ISSI_IS25WP064,
8044 .total_size = 8192,
8045 .page_size = 256,
8046 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008047 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8048 dummy cycles; non-volatile read parameters, so disable for now */
8049 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +02008050 .tested = TEST_OK_PREW,
8051 .probe = probe_spi_rdid,
8052 .probe_timing = TIMING_ZERO,
8053 .block_erasers =
8054 {
8055 {
8056 .eraseblocks = { {4 * 1024, 2048} },
8057 .block_erase = spi_block_erase_20,
8058 }, {
8059 .eraseblocks = { {4 * 1024, 2048} },
8060 .block_erase = spi_block_erase_d7,
8061 }, {
8062 .eraseblocks = { {32 * 1024, 256} },
8063 .block_erase = spi_block_erase_52,
8064 }, {
8065 .eraseblocks = { {64 * 1024, 128} },
8066 .block_erase = spi_block_erase_d8,
8067 }, {
8068 .eraseblocks = { {8 * 1024 * 1024, 1} },
8069 .block_erase = spi_block_erase_60,
8070 }, {
8071 .eraseblocks = { {8 * 1024 * 1024, 1} },
8072 .block_erase = spi_block_erase_c7,
8073 }
8074 },
8075 .unlock = spi_disable_blockprotect,
8076 .write = spi_chip_write_256,
8077 .read = spi_chip_read,
8078 .voltage = {1650, 1950},
8079 },
8080
8081 {
8082 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -07008083 .name = "IS25WP128",
8084 .bustype = BUS_SPI,
8085 .manufacture_id = ISSI_ID_SPI,
8086 .model_id = ISSI_IS25WP128,
8087 .total_size = 16384,
8088 .page_size = 256,
8089 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008090 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8091 dummy cycles; non-volatile read parameters, so disable for now */
8092 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks3083ed92017-05-02 13:25:56 -07008093 .tested = TEST_OK_PREW,
8094 .probe = probe_spi_rdid,
8095 .probe_timing = TIMING_ZERO,
8096 .block_erasers =
8097 {
8098 {
8099 .eraseblocks = { {4 * 1024, 4096} },
8100 .block_erase = spi_block_erase_20,
8101 }, {
8102 .eraseblocks = { {4 * 1024, 4096} },
8103 .block_erase = spi_block_erase_d7,
8104 }, {
8105 .eraseblocks = { {32 * 1024, 512} },
8106 .block_erase = spi_block_erase_52,
8107 }, {
8108 .eraseblocks = { {64 * 1024, 256} },
8109 .block_erase = spi_block_erase_d8,
8110 }, {
8111 .eraseblocks = { {16 * 1024 * 1024, 1} },
8112 .block_erase = spi_block_erase_60,
8113 }, {
8114 .eraseblocks = { {16 * 1024 * 1024, 1} },
8115 .block_erase = spi_block_erase_c7,
8116 }
8117 },
8118 .unlock = spi_disable_blockprotect,
8119 .write = spi_chip_write_256,
8120 .read = spi_chip_read,
8121 .voltage = {1650, 1950},
8122 },
8123
8124 {
8125 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +00008126 .name = "IS25WP256",
8127 .bustype = BUS_SPI,
8128 .manufacture_id = ISSI_ID_SPI,
8129 .model_id = ISSI_IS25WP256,
8130 .total_size = 32768,
8131 .page_size = 256,
8132 /* supports SFDP */
8133 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +02008134 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
8135 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +00008136 .tested = TEST_OK_PREW,
8137 .probe = probe_spi_rdid,
8138 .probe_timing = TIMING_ZERO,
8139 .block_erasers =
8140 {
8141 {
8142 .eraseblocks = { {4 * 1024, 8192} },
8143 .block_erase = spi_block_erase_21,
8144 }, {
8145 .eraseblocks = { {4 * 1024, 8192} },
8146 .block_erase = spi_block_erase_20,
8147 /* could also use spi_block_erase_d7 */
8148 }, {
8149 .eraseblocks = { {32 * 1024, 1024} },
8150 .block_erase = spi_block_erase_5c,
8151 }, {
8152 .eraseblocks = { {32 * 1024, 1024} },
8153 .block_erase = spi_block_erase_52,
8154 }, {
8155 .eraseblocks = { {64 * 1024, 512} },
8156 .block_erase = spi_block_erase_dc,
8157 }, {
8158 .eraseblocks = { {64 * 1024, 512} },
8159 .block_erase = spi_block_erase_d8,
8160 }, {
8161 .eraseblocks = { {32 * 1024 * 1024, 1} },
8162 .block_erase = spi_block_erase_60,
8163 }, {
8164 .eraseblocks = { {32 * 1024 * 1024, 1} },
8165 .block_erase = spi_block_erase_c7,
8166 }
8167 },
8168 .unlock = spi_disable_blockprotect,
8169 .write = spi_chip_write_256,
8170 .read = spi_chip_read,
8171 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02008172 .prepare_access = spi_prepare_io,
8173 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +00008174 },
8175
8176 {
8177 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008178 .name = "IS29GL064B",
8179 .bustype = BUS_PARALLEL,
8180 .manufacture_id = ISSI_ID,
8181 .model_id = ISSI_PMC_IS29GL064B,
8182 .total_size = 8192,
8183 .page_size = 128 * 1024, /* actual page size is 16 */
8184 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8185 .tested = TEST_UNTESTED,
8186 .probe = probe_jedec_29gl,
8187 .probe_timing = TIMING_ZERO,
8188 .block_erasers =
8189 {
8190 {
8191 .eraseblocks = {
8192 {8 * 1024, 8},
8193 {64 * 1024, 127},
8194 },
8195 .block_erase = erase_sector_jedec,
8196 }, {
8197 .eraseblocks = { {8 * 1024 * 1024, 1} },
8198 .block_erase = erase_chip_block_jedec,
8199 },
8200 },
8201 .write = write_jedec_1,
8202 .read = read_memmapped,
8203 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008204 .prepare_access = prepare_memory_access,
8205 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008206 },
8207
8208 {
8209 .vendor = "ISSI",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008210 .name = "IS29GL064H/L",
8211 .bustype = BUS_PARALLEL,
8212 .manufacture_id = ISSI_ID,
8213 .model_id = ISSI_PMC_IS29GL064HL,
8214 .total_size = 8192,
8215 .page_size = 128 * 1024, /* actual page size is 16 */
8216 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8217 .tested = TEST_UNTESTED,
8218 .probe = probe_jedec_29gl,
8219 .probe_timing = TIMING_ZERO,
8220 .block_erasers =
8221 {
8222 {
8223 .eraseblocks = { {64 * 1024, 128} },
8224 .block_erase = erase_sector_jedec,
8225 }, {
8226 .eraseblocks = { {8 * 1024 * 1024, 1} },
8227 .block_erase = erase_chip_block_jedec,
8228 },
8229 },
8230 .write = write_jedec_1,
8231 .read = read_memmapped,
8232 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008233 .prepare_access = prepare_memory_access,
8234 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008235 },
8236
8237 {
8238 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008239 .name = "IS29GL064T",
8240 .bustype = BUS_PARALLEL,
8241 .manufacture_id = ISSI_ID,
8242 .model_id = ISSI_PMC_IS29GL064T,
8243 .total_size = 8192,
8244 .page_size = 128 * 1024, /* actual page size is 16 */
8245 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8246 .tested = TEST_UNTESTED,
8247 .probe = probe_jedec_29gl,
8248 .probe_timing = TIMING_ZERO,
8249 .block_erasers =
8250 {
8251 {
8252 .eraseblocks = {
8253 {64 * 1024, 127},
8254 {8 * 1024, 8},
8255 },
8256 .block_erase = erase_sector_jedec,
8257 }, {
8258 .eraseblocks = { {8 * 1024 * 1024, 1} },
8259 .block_erase = erase_chip_block_jedec,
8260 },
8261 },
8262 .write = write_jedec_1,
8263 .read = read_memmapped,
8264 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008265 .prepare_access = prepare_memory_access,
8266 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008267 },
8268
8269 {
8270 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008271 .name = "IS29GL128H/L",
8272 .bustype = BUS_PARALLEL,
8273 .manufacture_id = ISSI_ID,
8274 .model_id = ISSI_PMC_IS29GL128HL,
8275 .total_size = 16384,
8276 .page_size = 128 * 1024, /* actual page size is 16 */
8277 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8278 .tested = TEST_UNTESTED,
8279 .probe = probe_jedec_29gl,
8280 .probe_timing = TIMING_ZERO,
8281 .block_erasers =
8282 {
8283 {
8284 .eraseblocks = { {128 * 1024, 128} },
8285 .block_erase = erase_sector_jedec,
8286 }, {
8287 .eraseblocks = { {16 * 1024 * 1024, 1} },
8288 .block_erase = erase_chip_block_jedec,
8289 },
8290 },
8291 .write = write_jedec_1,
8292 .read = read_memmapped,
8293 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008294 .prepare_access = prepare_memory_access,
8295 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008296 },
8297
8298 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008299 .vendor = "Intel",
8300 .name = "25F160S33B8",
8301 .bustype = BUS_SPI,
8302 .manufacture_id = INTEL_ID,
8303 .model_id = INTEL_25F160S33B8,
8304 .total_size = 2048,
8305 .page_size = 256,
8306 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8307 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8308 .tested = TEST_UNTESTED,
8309 .probe = probe_spi_rdid,
8310 .probe_timing = TIMING_ZERO,
8311 .block_erasers =
8312 {
8313 {
8314 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8315 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8316 * have no effect on the memory contents, but sets a flag in the SR.
8317 .eraseblocks = {
8318 {8 * 1024, 8},
8319 {64 * 1024, 31} // inaccessible
8320 },
8321 .block_erase = spi_block_erase_40,
8322 }, { */
8323 .eraseblocks = { {64 * 1024, 32} },
8324 .block_erase = spi_block_erase_d8,
8325 }, {
8326 .eraseblocks = { {2 * 1024 * 1024, 1} },
8327 .block_erase = spi_block_erase_c7,
8328 }
8329 },
8330 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8331 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8332 .write = spi_chip_write_256,
8333 .read = spi_chip_read, /* also fast read 0x0B */
8334 .voltage = {2700, 3600},
8335 },
8336
8337 {
8338 .vendor = "Intel",
8339 .name = "25F160S33T8",
8340 .bustype = BUS_SPI,
8341 .manufacture_id = INTEL_ID,
8342 .model_id = INTEL_25F160S33T8,
8343 .total_size = 2048,
8344 .page_size = 256,
8345 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8346 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8347 .tested = TEST_UNTESTED,
8348 .probe = probe_spi_rdid,
8349 .probe_timing = TIMING_ZERO,
8350 .block_erasers =
8351 {
8352 {
8353 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8354 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8355 * have no effect on the memory contents, but sets a flag in the SR.
8356 .eraseblocks = {
8357 {64 * 1024, 31}, // inaccessible
8358 {8 * 1024, 8}
8359 },
8360 .block_erase = spi_block_erase_40,
8361 }, { */
8362 .eraseblocks = { {64 * 1024, 32} },
8363 .block_erase = spi_block_erase_d8,
8364 }, {
8365 .eraseblocks = { {2 * 1024 * 1024, 1} },
8366 .block_erase = spi_block_erase_c7,
8367 }
8368 },
8369 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8370 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8371 .write = spi_chip_write_256,
8372 .read = spi_chip_read, /* also fast read 0x0B */
8373 .voltage = {2700, 3600},
8374 },
8375
8376 {
8377 .vendor = "Intel",
8378 .name = "25F320S33B8",
8379 .bustype = BUS_SPI,
8380 .manufacture_id = INTEL_ID,
8381 .model_id = INTEL_25F320S33B8,
8382 .total_size = 4096,
8383 .page_size = 256,
8384 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8385 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8386 .tested = TEST_UNTESTED,
8387 .probe = probe_spi_rdid,
8388 .probe_timing = TIMING_ZERO,
8389 .block_erasers =
8390 {
8391 {
8392 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8393 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8394 * have no effect on the memory contents, but sets a flag in the SR.
8395 .eraseblocks = {
8396 {8 * 1024, 8},
8397 {64 * 1024, 63} // inaccessible
8398 },
8399 .block_erase = spi_block_erase_40,
8400 }, { */
8401 .eraseblocks = { {64 * 1024, 64} },
8402 .block_erase = spi_block_erase_d8,
8403 }, {
8404 .eraseblocks = { {4 * 1024 * 1024, 1} },
8405 .block_erase = spi_block_erase_c7,
8406 }
8407 },
8408 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8409 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8410 .write = spi_chip_write_256,
8411 .read = spi_chip_read, /* also fast read 0x0B */
8412 .voltage = {2700, 3600},
8413 },
8414
8415 {
8416 .vendor = "Intel",
8417 .name = "25F320S33T8",
8418 .bustype = BUS_SPI,
8419 .manufacture_id = INTEL_ID,
8420 .model_id = INTEL_25F320S33T8,
8421 .total_size = 4096,
8422 .page_size = 256,
8423 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8424 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8425 .tested = TEST_UNTESTED,
8426 .probe = probe_spi_rdid,
8427 .probe_timing = TIMING_ZERO,
8428 .block_erasers =
8429 {
8430 {
8431 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8432 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8433 * have no effect on the memory contents, but sets a flag in the SR.
8434 .eraseblocks = {
8435 {64 * 1024, 63}, // inaccessible
8436 {8 * 1024, 8}
8437 },
8438 .block_erase = spi_block_erase_40,
8439 }, { */
8440 .eraseblocks = { {64 * 1024, 64} },
8441 .block_erase = spi_block_erase_d8,
8442 }, {
8443 .eraseblocks = { {4 * 1024 * 1024, 1} },
8444 .block_erase = spi_block_erase_c7,
8445 }
8446 },
8447 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8448 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8449 .write = spi_chip_write_256,
8450 .read = spi_chip_read, /* also fast read 0x0B */
8451 .voltage = {2700, 3600},
8452 },
8453
8454 {
8455 .vendor = "Intel",
8456 .name = "25F640S33B8",
8457 .bustype = BUS_SPI,
8458 .manufacture_id = INTEL_ID,
8459 .model_id = INTEL_25F640S33B8,
8460 .total_size = 8192,
8461 .page_size = 256,
8462 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8463 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Zoltan HERPAIe0e8b2b2020-08-08 16:04:34 +02008464 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008465 .probe = probe_spi_rdid,
8466 .probe_timing = TIMING_ZERO,
8467 .block_erasers =
8468 {
8469 {
8470 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8471 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8472 * have no effect on the memory contents, but sets a flag in the SR.
8473 .eraseblocks = {
8474 {8 * 1024, 8},
8475 {64 * 1024, 127} // inaccessible
8476 },
8477 .block_erase = spi_block_erase_40,
8478 }, { */
8479 .eraseblocks = { {64 * 1024, 128} },
8480 .block_erase = spi_block_erase_d8,
8481 }, {
8482 .eraseblocks = { {8 * 1024 * 1024, 1} },
8483 .block_erase = spi_block_erase_c7,
8484 }
8485 },
8486 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8487 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8488 .write = spi_chip_write_256,
8489 .read = spi_chip_read, /* also fast read 0x0B */
8490 .voltage = {2700, 3600},
8491 },
8492
8493 {
8494 .vendor = "Intel",
8495 .name = "25F640S33T8",
8496 .bustype = BUS_SPI,
8497 .manufacture_id = INTEL_ID,
8498 .model_id = INTEL_25F640S33T8,
8499 .total_size = 8192,
8500 .page_size = 256,
8501 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8502 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8503 .tested = TEST_UNTESTED,
8504 .probe = probe_spi_rdid,
8505 .probe_timing = TIMING_ZERO,
8506 .block_erasers =
8507 {
8508 {
8509 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8510 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8511 * have no effect on the memory contents, but sets a flag in the SR.
8512 .eraseblocks = {
8513 {64 * 1024, 127}, // inaccessible
8514 {8 * 1024, 8}
8515 },
8516 .block_erase = spi_block_erase_40,
8517 }, { */
8518 .eraseblocks = { {64 * 1024, 128} },
8519 .block_erase = spi_block_erase_d8,
8520 }, {
8521 .eraseblocks = { {8 * 1024 * 1024, 1} },
8522 .block_erase = spi_block_erase_c7,
8523 }
8524 },
8525 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8526 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8527 .write = spi_chip_write_256,
8528 .read = spi_chip_read, /* also fast read 0x0B */
8529 .voltage = {2700, 3600},
8530 },
8531
8532 {
8533 .vendor = "Intel",
8534 .name = "28F001BN/BX-B",
8535 .bustype = BUS_PARALLEL,
8536 .manufacture_id = INTEL_ID,
8537 .model_id = INTEL_28F001B,
8538 .total_size = 128,
8539 .page_size = 128 * 1024, /* 8k + 2x4k + 112k */
8540 .tested = TEST_UNTESTED,
8541 .probe = probe_jedec,
8542 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8543 .block_erasers =
8544 {
8545 {
8546 .eraseblocks = {
8547 {8 * 1024, 1},
8548 {4 * 1024, 2},
8549 {112 * 1024, 1},
8550 },
8551 .block_erase = erase_block_82802ab,
8552 },
8553 },
8554 .write = write_82802ab,
8555 .read = read_memmapped,
8556 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01008557 .prepare_access = prepare_memory_access,
8558 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008559 },
8560
8561 {
8562 .vendor = "Intel",
8563 .name = "28F001BN/BX-T",
8564 .bustype = BUS_PARALLEL,
8565 .manufacture_id = INTEL_ID,
8566 .model_id = INTEL_28F001T,
8567 .total_size = 128,
8568 .page_size = 128 * 1024, /* 112k + 2x4k + 8k */
8569 .tested = TEST_OK_PREW,
8570 .probe = probe_jedec,
8571 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8572 .block_erasers =
8573 {
8574 {
8575 .eraseblocks = {
8576 {112 * 1024, 1},
8577 {4 * 1024, 2},
8578 {8 * 1024, 1},
8579 },
8580 .block_erase = erase_block_82802ab,
8581 },
8582 },
8583 .write = write_82802ab,
8584 .read = read_memmapped,
8585 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01008586 .prepare_access = prepare_memory_access,
8587 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008588 },
8589
8590 {
8591 .vendor = "Intel",
8592 .name = "28F002BC/BL/BV/BX-T",
8593 .bustype = BUS_PARALLEL,
8594 .manufacture_id = INTEL_ID,
8595 .model_id = INTEL_28F002T,
8596 .total_size = 256,
8597 .page_size = 256 * 1024,
8598 .tested = TEST_OK_PRE,
8599 .probe = probe_82802ab,
8600 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8601 .block_erasers =
8602 {
8603 {
8604 .eraseblocks = {
8605 {128 * 1024, 1},
8606 {96 * 1024, 1},
8607 {8 * 1024, 2},
8608 {16 * 1024, 1},
8609 },
8610 .block_erase = erase_block_82802ab,
8611 },
8612 },
8613 .write = write_82802ab,
8614 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008615 .prepare_access = prepare_memory_access,
8616 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008617 },
8618
8619 {
8620 .vendor = "Intel",
8621 .name = "28F004B5/BE/BV/BX-B",
8622 .bustype = BUS_PARALLEL,
8623 .manufacture_id = INTEL_ID,
8624 .model_id = INTEL_28F004B,
8625 .total_size = 512,
8626 .page_size = 128 * 1024, /* maximal block size */
8627 .tested = TEST_UNTESTED,
8628 .probe = probe_82802ab,
8629 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8630 .block_erasers =
8631 {
8632 {
8633 .eraseblocks = {
8634 {16 * 1024, 1},
8635 {8 * 1024, 2},
8636 {96 * 1024, 1},
8637 {128 * 1024, 3},
8638 },
8639 .block_erase = erase_block_82802ab,
8640 },
8641 },
8642 .write = write_82802ab,
8643 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008644 .prepare_access = prepare_memory_access,
8645 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008646 },
8647
8648 {
8649 .vendor = "Intel",
8650 .name = "28F004B5/BE/BV/BX-T",
8651 .bustype = BUS_PARALLEL,
8652 .manufacture_id = INTEL_ID,
8653 .model_id = INTEL_28F004T,
8654 .total_size = 512,
8655 .page_size = 128 * 1024, /* maximal block size */
8656 .tested = TEST_UNTESTED,
8657 .probe = probe_82802ab,
8658 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8659 .block_erasers =
8660 {
8661 {
8662 .eraseblocks = {
8663 {128 * 1024, 3},
8664 {96 * 1024, 1},
8665 {8 * 1024, 2},
8666 {16 * 1024, 1},
8667 },
8668 .block_erase = erase_block_82802ab,
8669 },
8670 },
8671 .write = write_82802ab,
8672 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008673 .prepare_access = prepare_memory_access,
8674 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008675 },
8676
8677 {
8678 .vendor = "Intel",
8679 .name = "28F008S3/S5/SC",
8680 .bustype = BUS_PARALLEL,
8681 .manufacture_id = INTEL_ID,
8682 .model_id = INTEL_28F004S3,
8683 .total_size = 512,
8684 .page_size = 256,
8685 .tested = TEST_UNTESTED,
8686 .probe = probe_82802ab,
8687 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8688 .block_erasers =
8689 {
8690 {
8691 .eraseblocks = { {64 * 1024, 8} },
8692 .block_erase = erase_block_82802ab,
8693 },
8694 },
8695 .unlock = unlock_28f004s5,
8696 .write = write_82802ab,
8697 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008698 .prepare_access = prepare_memory_access,
8699 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008700 },
8701
8702 {
8703 .vendor = "Intel",
8704 .name = "28F400BV/BX/CE/CV-B",
8705 .bustype = BUS_PARALLEL,
8706 .manufacture_id = INTEL_ID,
8707 .model_id = INTEL_28F400B,
8708 .total_size = 512,
8709 .page_size = 128 * 1024, /* maximal block size */
8710 .feature_bits = FEATURE_ADDR_SHIFTED,
8711 .tested = TEST_UNTESTED,
8712 .probe = probe_82802ab,
8713 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8714 .block_erasers =
8715 {
8716 {
8717 .eraseblocks = {
8718 {16 * 1024, 1},
8719 {8 * 1024, 2},
8720 {96 * 1024, 1},
8721 {128 * 1024, 3},
8722 },
8723 .block_erase = erase_block_82802ab,
8724 },
8725 },
8726 .write = write_82802ab,
8727 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008728 .prepare_access = prepare_memory_access,
8729 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008730 },
8731
8732 {
8733 .vendor = "Intel",
8734 .name = "28F400BV/BX/CE/CV-T",
8735 .bustype = BUS_PARALLEL,
8736 .manufacture_id = INTEL_ID,
8737 .model_id = INTEL_28F400T,
8738 .total_size = 512,
8739 .page_size = 128 * 1024, /* maximal block size */
8740 .feature_bits = FEATURE_ADDR_SHIFTED,
8741 .tested = TEST_UNTESTED,
8742 .probe = probe_82802ab,
8743 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8744 .block_erasers =
8745 {
8746 {
8747 .eraseblocks = {
8748 {128 * 1024, 3},
8749 {96 * 1024, 1},
8750 {8 * 1024, 2},
8751 {16 * 1024, 1},
8752 },
8753 .block_erase = erase_block_82802ab,
8754 },
8755 },
8756 .write = write_82802ab,
8757 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008758 .prepare_access = prepare_memory_access,
8759 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008760 },
8761
8762 {
8763 .vendor = "Intel",
8764 .name = "82802AB",
8765 .bustype = BUS_FWH,
8766 .manufacture_id = INTEL_ID,
8767 .model_id = INTEL_82802AB,
8768 .total_size = 512,
8769 .page_size = 64 * 1024,
Alan Green88552572019-07-24 13:56:06 +10008770 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008771 .probe = probe_82802ab,
8772 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
8773 .block_erasers =
8774 {
8775 {
8776 .eraseblocks = { {64 * 1024, 8} },
8777 .block_erase = erase_block_82802ab,
8778 },
8779 },
8780 .unlock = unlock_regspace2_uniform_64k,
8781 .write = write_82802ab,
8782 .read = read_memmapped,
8783 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01008784 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01008785 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008786 },
8787
8788 {
8789 .vendor = "Intel",
8790 .name = "82802AC",
8791 .bustype = BUS_FWH,
8792 .manufacture_id = INTEL_ID,
8793 .model_id = INTEL_82802AC,
8794 .total_size = 1024,
8795 .page_size = 64 * 1024,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008796 .tested = TEST_OK_PR,
8797 .probe = probe_82802ab,
8798 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
8799 .block_erasers =
8800 {
8801 {
8802 .eraseblocks = { {64 * 1024, 16} },
8803 .block_erase = erase_block_82802ab,
8804 },
8805 },
8806 .unlock = unlock_regspace2_uniform_64k,
8807 .write = write_82802ab,
8808 .read = read_memmapped,
8809 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01008810 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01008811 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008812 },
8813
8814 {
8815 .vendor = "Macronix",
8816 .name = "MX23L12854",
8817 .bustype = BUS_SPI,
8818 .manufacture_id = MACRONIX_ID,
8819 .model_id = MACRONIX_MX23L12854,
8820 .total_size = 16384,
8821 .page_size = 256,
8822 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
8823 .probe = probe_spi_rdid,
8824 .probe_timing = TIMING_ZERO,
8825 .write = NULL, /* MX23L12854 is a mask ROM, so it is read-only */
8826 .read = spi_chip_read, /* Fast read (0x0B) supported */
8827 .voltage = {3000, 3600},
8828 },
8829
8830 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008831 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +00008832 .name = "MX23L1654",
8833 .bustype = BUS_SPI,
8834 .manufacture_id = MACRONIX_ID,
8835 .model_id = MACRONIX_MX23L1654,
8836 .total_size = 2048,
8837 .page_size = 256,
8838 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
8839 .probe = probe_spi_rdid,
8840 .probe_timing = TIMING_ZERO,
8841 .write = NULL, /* MX23L1654 is a mask ROM, so it is read-only */
8842 .read = spi_chip_read, /* Fast read (0x0B) supported */
8843 .voltage = {3000, 3600},
8844 },
8845
8846 {
8847 .vendor = "Macronix",
Michael Coppola4e7f36e2014-05-03 23:01:18 +00008848 .name = "MX23L3254",
8849 .bustype = BUS_SPI,
8850 .manufacture_id = MACRONIX_ID,
8851 .model_id = MACRONIX_MX23L3254,
8852 .total_size = 4096,
8853 .page_size = 256,
Stefan Tauner6455dff2014-05-26 00:36:24 +00008854 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola4e7f36e2014-05-03 23:01:18 +00008855 .probe = probe_spi_rdid,
8856 .probe_timing = TIMING_ZERO,
8857 .write = NULL, /* MX23L3254 is a mask ROM, so it is read-only */
8858 .read = spi_chip_read, /* Fast read (0x0B) supported */
8859 .voltage = {3000, 3600},
8860 },
8861
8862 {
8863 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +00008864 .name = "MX23L6454",
8865 .bustype = BUS_SPI,
8866 .manufacture_id = MACRONIX_ID,
8867 .model_id = MACRONIX_MX23L6454,
8868 .total_size = 8192,
8869 .page_size = 256,
Stefan Tauner23e10b82016-01-23 16:16:49 +00008870 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola583ea322014-08-20 18:56:35 +00008871 .probe = probe_spi_rdid,
8872 .probe_timing = TIMING_ZERO,
8873 .write = NULL, /* MX23L6454 is a mask ROM, so it is read-only */
8874 .read = spi_chip_read, /* Fast read (0x0B) supported */
8875 .voltage = {3000, 3600},
8876 },
8877
8878 {
8879 .vendor = "Macronix",
Stefan Taunerf656e802013-02-02 15:35:44 +00008880 .name = "MX25L1005(C)/MX25L1006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00008881 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00008882 .manufacture_id = MACRONIX_ID,
8883 .model_id = MACRONIX_MX25L1005,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008884 .total_size = 128,
8885 .page_size = 256,
Stefan Taunerf656e802013-02-02 15:35:44 +00008886 /* MX25L1006E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +01008887 /* FEATURE_FAST_READ_DOUT: MX25L1006E */
8888 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Stefan Taunerd7d423b2012-10-20 09:13:16 +00008889 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008890 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00008891 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008892 .block_erasers =
8893 {
8894 {
8895 .eraseblocks = { {4 * 1024, 32} },
8896 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008897 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008898 .eraseblocks = { {64 * 1024, 2} },
8899 .block_erase = spi_block_erase_d8,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008900 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008901 .eraseblocks = { {128 * 1024, 1} },
8902 .block_erase = spi_block_erase_60,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008903 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008904 .eraseblocks = { {128 * 1024, 1} },
8905 .block_erase = spi_block_erase_c7,
8906 },
8907 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00008908 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00008909 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00008910 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01008911 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00008912 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008913 .prepare_access = spi_prepare_io,
8914 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00008915 },
8916
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008917 {
8918 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008919 .name = "MX25L12805D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00008920 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00008921 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008922 .model_id = MACRONIX_MX25L12805D,
8923 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008924 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008925 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01008926 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00008927 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008928 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00008929 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008930 .block_erasers =
8931 {
8932 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008933 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008934 .block_erase = spi_block_erase_20,
8935 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008936 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008937 .block_erase = spi_block_erase_d8,
8938 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008939 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008940 .block_erase = spi_block_erase_60,
8941 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008942 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008943 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008944 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008945 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10008946 .printlock = spi_prettyprint_status_register_bp3_srwd,
8947 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00008948 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01008949 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00008950 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00008951 },
8952
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008953 {
8954 .vendor = "Macronix",
Tao Xia571f6ad2021-07-21 16:41:53 +08008955 .name = "MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00008956 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00008957 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008958 .model_id = MACRONIX_MX25L12805D,
8959 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008960 .page_size = 256,
Tao Xia571f6ad2021-07-21 16:41:53 +08008961 /* OTP: MX25L12833F has 1KB total, others have 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01008962 /* *F versions: FEATURE_QPI_35 + DC bits (6, 4, 8, 10) in configuration register */
8963 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
8964 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stefan Tauner8179be52011-06-04 13:13:34 +00008965 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008966 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00008967 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008968 .block_erasers =
8969 {
8970 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008971 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008972 .block_erase = spi_block_erase_20,
8973 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008974 .eraseblocks = { {32 * 1024, 512} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008975 .block_erase = spi_block_erase_52,
8976 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008977 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008978 .block_erase = spi_block_erase_d8,
8979 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008980 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008981 .block_erase = spi_block_erase_60,
8982 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008983 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008984 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008985 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008986 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10008987 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +01008988 .reg_bits =
8989 {
8990 .qe = {STATUS1, 6, RW},
8991 },
8992 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008993 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00008994 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01008995 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00008996 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008997 .prepare_access = spi_prepare_io,
8998 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00008999 },
9000
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009001 {
9002 .vendor = "Macronix",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009003 .name = "MX25L1605",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009004 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009005 .manufacture_id = MACRONIX_ID,
9006 .model_id = MACRONIX_MX25L1605,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009007 .total_size = 2048,
9008 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009009 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Sven Schnelle4bd8a402011-03-07 10:59:06 +00009010 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009011 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009012 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009013 .block_erasers =
9014 {
9015 {
Stefan Tauner226037d2013-03-16 01:22:12 +00009016 .eraseblocks = { {64 * 1024, 32} },
9017 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009018 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +00009019 .eraseblocks = { {64 * 1024, 32} },
9020 .block_erase = spi_block_erase_d8,
9021 }, {
9022 .eraseblocks = { {2 * 1024 * 1024, 1} },
9023 .block_erase = spi_block_erase_60,
9024 }, {
9025 .eraseblocks = { {2 * 1024 * 1024, 1} },
9026 .block_erase = spi_block_erase_c7,
9027 },
9028 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009029 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Stefan Tauner226037d2013-03-16 01:22:12 +00009030 .unlock = spi_disable_blockprotect,
9031 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009032 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009033 .voltage = {2700, 3600},
9034 },
9035
9036 {
9037 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009038 .name = "MX25L1605A/MX25L1606E/MX25L1608E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009039 .bustype = BUS_SPI,
9040 .manufacture_id = MACRONIX_ID,
9041 .model_id = MACRONIX_MX25L1605,
9042 .total_size = 2048,
9043 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009044 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L1606E and MX25L1608E only) */
Nico Huber46552c82024-03-27 01:18:12 +01009045 /* FEATURE_FAST_READ_DOUT: MX25L1606E & MX25L1608E */
9046 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +00009047 .tested = TEST_OK_PREW,
9048 .probe = probe_spi_rdid,
9049 .probe_timing = TIMING_ZERO,
9050 .block_erasers =
9051 {
9052 {
9053 .eraseblocks = { {4 * 1024, 512} },
9054 .block_erase = spi_block_erase_20,
9055 }, {
9056 .eraseblocks = { {64 * 1024, 32} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009057 .block_erase = spi_block_erase_52,
9058 }, {
9059 .eraseblocks = { {64 * 1024, 32} },
9060 .block_erase = spi_block_erase_d8,
9061 }, {
9062 .eraseblocks = { {2 * 1024 * 1024, 1} },
9063 .block_erase = spi_block_erase_60,
9064 }, {
9065 .eraseblocks = { {2 * 1024 * 1024, 1} },
9066 .block_erase = spi_block_erase_c7,
9067 },
9068 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009069 .printlock = spi_prettyprint_status_register_bp3_srwd, /* MX25L1605A bp2 only */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009070 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009071 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009072 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009073 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009074 .prepare_access = spi_prepare_io,
9075 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009076 },
9077
9078 {
9079 .vendor = "Macronix",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009080 .name = "MX25L1605D/MX25L1608D/MX25L1673E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009081 .bustype = BUS_SPI,
9082 .manufacture_id = MACRONIX_ID,
9083 .model_id = MACRONIX_MX25L1605,
9084 .total_size = 2048,
9085 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009086 /* FEATURE_QIO: MX25L1673E */
9087 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009088 .tested = TEST_OK_PREW,
9089 .probe = probe_spi_rdid,
9090 .probe_timing = TIMING_ZERO,
9091 .block_erasers =
9092 {
9093 {
9094 .eraseblocks = { {4 * 1024, 512} },
9095 .block_erase = spi_block_erase_20,
9096 }, {
9097 .eraseblocks = { {64 * 1024, 32} },
9098 .block_erase = spi_block_erase_d8,
9099 }, {
9100 .eraseblocks = { {2 * 1024 * 1024, 1} },
9101 .block_erase = spi_block_erase_60,
9102 }, {
9103 .eraseblocks = { {2 * 1024 * 1024, 1} },
9104 .block_erase = spi_block_erase_c7,
9105 },
9106 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009107 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: Continuously Program (CP) mode, for 73E is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009108 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009109 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009110 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009111 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009112 .prepare_access = spi_prepare_io,
9113 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009114 },
9115
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009116 {
9117 .vendor = "Macronix",
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009118 .name = "MX25L1635D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009119 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009120 .manufacture_id = MACRONIX_ID,
9121 .model_id = MACRONIX_MX25L1635D,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009122 .total_size = 2048,
9123 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +00009124 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009125 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9126 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Angel Ponsc2054872021-01-15 18:57:32 +01009127 .tested = TEST_OK_PREW,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009128 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009129 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009130 .block_erasers =
9131 {
9132 {
9133 .eraseblocks = { {4 * 1024, 512} },
9134 .block_erase = spi_block_erase_20,
9135 }, {
9136 .eraseblocks = { {64 * 1024, 32} },
9137 .block_erase = spi_block_erase_d8,
9138 }, {
9139 .eraseblocks = { {2 * 1024 * 1024, 1} },
9140 .block_erase = spi_block_erase_60,
9141 }, {
9142 .eraseblocks = { {2 * 1024 * 1024, 1} },
9143 .block_erase = spi_block_erase_c7,
9144 }
9145 },
Nico Huber46552c82024-03-27 01:18:12 +01009146 .reg_bits =
9147 {
9148 .qe = {STATUS1, 6, RW},
9149 },
9150 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009151 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009152 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009153 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009154 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009155 .prepare_access = spi_prepare_io,
9156 .finish_access = spi_finish_io,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009157 },
Stephan Guillouxfd315502009-04-20 22:54:13 +00009158
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009159 {
9160 .vendor = "Macronix",
Stephan Guilloux3611b802010-09-13 19:59:28 +00009161 .name = "MX25L1635E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009162 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009163 .manufacture_id = MACRONIX_ID,
9164 .model_id = MACRONIX_MX25L1635E,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009165 .total_size = 2048,
9166 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +00009167 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009168 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9169 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009170 .tested = TEST_UNTESTED,
9171 .probe = probe_spi_rdid,
9172 .probe_timing = TIMING_ZERO,
9173 .block_erasers =
9174 {
9175 {
9176 .eraseblocks = { {4 * 1024, 512} },
9177 .block_erase = spi_block_erase_20,
9178 }, {
9179 .eraseblocks = { {64 * 1024, 32} },
9180 .block_erase = spi_block_erase_d8,
9181 }, {
9182 .eraseblocks = { {2 * 1024 * 1024, 1} },
9183 .block_erase = spi_block_erase_60,
9184 }, {
9185 .eraseblocks = { {2 * 1024 * 1024, 1} },
9186 .block_erase = spi_block_erase_c7,
9187 }
9188 },
Nico Huber46552c82024-03-27 01:18:12 +01009189 .reg_bits =
9190 {
9191 .qe = {STATUS1, 6, RW},
9192 },
9193 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009194 .unlock = spi_disable_blockprotect_bp3_srwd,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009195 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009196 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +00009197 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009198 .prepare_access = spi_prepare_io,
9199 .finish_access = spi_finish_io,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009200 },
9201
9202 {
9203 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009204 .name = "MX25L2005(C)/MX25L2006E",
9205 .bustype = BUS_SPI,
9206 .manufacture_id = MACRONIX_ID,
9207 .model_id = MACRONIX_MX25L2005,
9208 .total_size = 256,
9209 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009210 /* FEATURE_FAST_READ_DOUT: MX25L2006E */
9211 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009212 .tested = TEST_OK_PREW,
9213 .probe = probe_spi_rdid,
9214 .probe_timing = TIMING_ZERO,
9215 .block_erasers =
9216 {
9217 {
9218 .eraseblocks = { {4 * 1024, 64} },
9219 .block_erase = spi_block_erase_20,
9220 }, {
9221 .eraseblocks = { {64 * 1024, 4} },
9222 .block_erase = spi_block_erase_52,
9223 }, {
9224 .eraseblocks = { {64 * 1024, 4} },
9225 .block_erase = spi_block_erase_d8,
9226 }, {
9227 .eraseblocks = { {256 * 1024, 1} },
9228 .block_erase = spi_block_erase_60,
9229 }, {
9230 .eraseblocks = { {256 * 1024, 1} },
9231 .block_erase = spi_block_erase_c7,
9232 },
9233 },
9234 .printlock = spi_prettyprint_status_register_bp1_srwd,
9235 .unlock = spi_disable_blockprotect,
9236 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009237 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009238 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009239 .prepare_access = spi_prepare_io,
9240 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009241 },
9242
9243 {
9244 .vendor = "Macronix",
Alan Green03707302019-08-26 12:50:43 +10009245 .name = "MX25L25635F/MX25L25645G",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009246 .bustype = BUS_SPI,
9247 .manufacture_id = MACRONIX_ID,
9248 .model_id = MACRONIX_MX25L25635F,
9249 .total_size = 32768,
9250 .page_size = 256,
9251 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009252 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
9253 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
9254 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009255 .tested = TEST_OK_PREW,
9256 .probe = probe_spi_rdid,
9257 .probe_timing = TIMING_ZERO,
9258 .block_erasers =
9259 {
9260 {
9261 .eraseblocks = { {4 * 1024, 8192} },
9262 .block_erase = spi_block_erase_21,
9263 }, {
9264 .eraseblocks = { {4 * 1024, 8192} },
9265 .block_erase = spi_block_erase_20,
9266 }, {
9267 .eraseblocks = { {32 * 1024, 1024} },
9268 .block_erase = spi_block_erase_5c,
9269 }, {
9270 .eraseblocks = { {32 * 1024, 1024} },
9271 .block_erase = spi_block_erase_52,
9272 }, {
9273 .eraseblocks = { {64 * 1024, 512} },
9274 .block_erase = spi_block_erase_dc,
9275 }, {
9276 .eraseblocks = { {64 * 1024, 512} },
9277 .block_erase = spi_block_erase_d8,
9278 }, {
9279 .eraseblocks = { {32 * 1024 * 1024, 1} },
9280 .block_erase = spi_block_erase_60,
9281 }, {
9282 .eraseblocks = { {32 * 1024 * 1024, 1} },
9283 .block_erase = spi_block_erase_c7,
9284 }
9285 },
9286 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +01009287 .reg_bits = {
9288 .qe = {STATUS1, 6, RW},
9289 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
9290 },
9291 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009292 .unlock = spi_disable_blockprotect_bp3_srwd,
9293 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009294 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009295 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009296 .prepare_access = spi_prepare_io,
9297 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009298 },
9299
9300 {
9301 .vendor = "Macronix",
Stefan Tauner226037d2013-03-16 01:22:12 +00009302 .name = "MX25L3205(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009303 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009304 .manufacture_id = MACRONIX_ID,
9305 .model_id = MACRONIX_MX25L3205,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009306 .total_size = 4096,
9307 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009308 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
David Hendricks22e05322010-12-13 23:54:59 +00009309 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009310 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009311 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +00009312 .block_erasers =
9313 {
9314 {
Stefan Tauner226037d2013-03-16 01:22:12 +00009315 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +00009316 .block_erase = spi_block_erase_20,
9317 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +00009318 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +00009319 .block_erase = spi_block_erase_d8,
9320 }, {
9321 .eraseblocks = { {4 * 1024 * 1024, 1} },
9322 .block_erase = spi_block_erase_60,
9323 }, {
9324 .eraseblocks = { {4 * 1024 * 1024, 1} },
9325 .block_erase = spi_block_erase_c7,
9326 },
9327 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009328 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00009329 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009330 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009331 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009332 .voltage = {2700, 3600},
9333 },
9334
9335 {
9336 .vendor = "Macronix",
9337 .name = "MX25L3205D/MX25L3208D",
9338 .bustype = BUS_SPI,
9339 .manufacture_id = MACRONIX_ID,
9340 .model_id = MACRONIX_MX25L3205,
9341 .total_size = 4096,
9342 .page_size = 256,
9343 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009344 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009345 .tested = TEST_OK_PREW,
9346 .probe = probe_spi_rdid,
9347 .probe_timing = TIMING_ZERO,
9348 .block_erasers =
9349 {
9350 {
9351 .eraseblocks = { {4 * 1024, 1024} },
9352 .block_erase = spi_block_erase_20,
9353 }, {
9354 .eraseblocks = { {64 * 1024, 64} },
9355 .block_erase = spi_block_erase_d8,
9356 }, {
9357 .eraseblocks = { {4 * 1024 * 1024, 1} },
9358 .block_erase = spi_block_erase_60,
9359 }, {
9360 .eraseblocks = { {4 * 1024 * 1024, 1} },
9361 .block_erase = spi_block_erase_c7,
9362 },
9363 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009364 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009365 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009366 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009367 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009368 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009369 .prepare_access = spi_prepare_io,
9370 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009371 },
9372
9373 {
9374 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009375 .name = "MX25L3206E/MX25L3208E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009376 .bustype = BUS_SPI,
9377 .manufacture_id = MACRONIX_ID,
9378 .model_id = MACRONIX_MX25L3205,
9379 .total_size = 4096,
9380 .page_size = 256,
9381 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009382 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner226037d2013-03-16 01:22:12 +00009383 .tested = TEST_OK_PREW,
9384 .probe = probe_spi_rdid,
9385 .probe_timing = TIMING_ZERO,
9386 .block_erasers =
9387 {
9388 {
9389 .eraseblocks = { {4 * 1024, 1024} },
9390 .block_erase = spi_block_erase_20,
9391 }, {
9392 .eraseblocks = { {64 * 1024, 64} },
9393 .block_erase = spi_block_erase_d8,
9394 }, {
9395 .eraseblocks = { {64 * 1024, 64} },
9396 .block_erase = spi_block_erase_52,
9397 }, {
9398 .eraseblocks = { {4 * 1024 * 1024, 1} },
9399 .block_erase = spi_block_erase_60,
9400 }, {
9401 .eraseblocks = { {4 * 1024 * 1024, 1} },
9402 .block_erase = spi_block_erase_c7,
9403 },
9404 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009405 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009406 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009407 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009408 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009409 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009410 .prepare_access = spi_prepare_io,
9411 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009412 },
9413
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009414 {
9415 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009416 .name = "MX25L3235D",
9417 .bustype = BUS_SPI,
9418 .manufacture_id = MACRONIX_ID,
9419 .model_id = MACRONIX_MX25L3235D,
9420 .total_size = 4096,
9421 .page_size = 256,
9422 /* OTP: 256B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009423 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9424 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009425 .tested = TEST_UNTESTED,
9426 .probe = probe_spi_rdid,
9427 .probe_timing = TIMING_ZERO,
9428 .block_erasers =
9429 {
9430 {
9431 .eraseblocks = { {4 * 1024, 1024} },
9432 .block_erase = spi_block_erase_20,
9433 }, {
9434 .eraseblocks = { {64 * 1024, 64} },
9435 .block_erase = spi_block_erase_d8,
9436 }, {
9437 .eraseblocks = { {4 * 1024 * 1024, 1} },
9438 .block_erase = spi_block_erase_60,
9439 }, {
9440 .eraseblocks = { {4 * 1024 * 1024, 1} },
9441 .block_erase = spi_block_erase_c7,
9442 }
9443 },
Nico Huber46552c82024-03-27 01:18:12 +01009444 .reg_bits =
9445 {
9446 .qe = {STATUS1, 6, RW},
9447 },
9448 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009449 .unlock = spi_disable_blockprotect_bp3_srwd,
9450 .write = spi_chip_write_256,
9451 .read = spi_chip_read,
9452 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009453 .prepare_access = spi_prepare_io,
9454 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009455 },
9456
9457 {
9458 .vendor = "Macronix",
Nico Huberb6683e02021-04-21 13:04:29 +02009459 .name = "MX25L3233F/MX25L3273E",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009460 .bustype = BUS_SPI,
9461 .manufacture_id = MACRONIX_ID,
9462 .model_id = MACRONIX_MX25L3205,
9463 .total_size = 4096,
9464 .page_size = 256,
Nico Huber6e69e2b2021-04-21 13:03:13 +02009465 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009466 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Stefan Tauner23e10b82016-01-23 16:16:49 +00009467 .tested = TEST_OK_PREW,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009468 .probe = probe_spi_rdid,
9469 .probe_timing = TIMING_ZERO,
9470 .block_erasers =
9471 {
9472 {
9473 .eraseblocks = { {4 * 1024, 1024} },
9474 .block_erase = spi_block_erase_20,
9475 }, {
9476 .eraseblocks = { {32 * 1024, 128} },
9477 .block_erase = spi_block_erase_52,
9478 }, {
9479 .eraseblocks = { {64 * 1024, 64} },
9480 .block_erase = spi_block_erase_d8,
9481 }, {
9482 .eraseblocks = { {4 * 1024 * 1024, 1} },
9483 .block_erase = spi_block_erase_60,
9484 }, {
9485 .eraseblocks = { {4 * 1024 * 1024, 1} },
9486 .block_erase = spi_block_erase_c7,
9487 },
9488 },
Nico Huber46552c82024-03-27 01:18:12 +01009489 .reg_bits =
9490 {
9491 .qe = {STATUS1, 6, RW},
9492 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009493 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009494 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009495 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009496 .read = spi_chip_read,
Nico Huberb6683e02021-04-21 13:04:29 +02009497 .voltage = {2700, 3600}, /* 33F 2.65V..3.6V */
Nico Huber930d4212024-05-04 18:59:15 +02009498 .prepare_access = spi_prepare_io,
9499 .finish_access = spi_finish_io,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009500 },
9501
9502 {
9503 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009504 .name = "MX25L4005(A/C)/MX25L4006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009505 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009506 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009507 .model_id = MACRONIX_MX25L4005,
9508 .total_size = 512,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009509 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009510 /* FEATURE_FAST_READ_DOUT: MX25L4006E */
9511 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009512 .tested = TEST_OK_PREW,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009513 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009514 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009515 .block_erasers =
9516 {
9517 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009518 .eraseblocks = { {4 * 1024, 128} },
Sean Nelson54596372010-01-09 05:30:14 +00009519 .block_erase = spi_block_erase_20,
9520 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009521 .eraseblocks = { {64 * 1024, 8} },
9522 .block_erase = spi_block_erase_52,
9523 }, {
9524 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson54596372010-01-09 05:30:14 +00009525 .block_erase = spi_block_erase_d8,
9526 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009527 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009528 .block_erase = spi_block_erase_60,
9529 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009530 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009531 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009532 },
Sean Nelson54596372010-01-09 05:30:14 +00009533 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009534 .printlock = spi_prettyprint_status_register_bp2_srwd,
9535 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009536 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009537 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009538 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009539 .prepare_access = spi_prepare_io,
9540 .finish_access = spi_finish_io,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009541 },
9542
9543 {
9544 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009545 .name = "MX25L512(E)/MX25V512(C)",
9546 .bustype = BUS_SPI,
9547 .manufacture_id = MACRONIX_ID,
9548 .model_id = MACRONIX_MX25L512,
9549 .total_size = 64,
9550 .page_size = 256,
9551 /* MX25L512E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +01009552 /* FEATURE_FAST_READ_DOUT: MX25L512E */
9553 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009554 .tested = TEST_OK_PREW,
9555 .probe = probe_spi_rdid,
9556 .probe_timing = TIMING_ZERO,
9557 .block_erasers =
9558 {
9559 {
9560 .eraseblocks = { {4 * 1024, 16} },
9561 .block_erase = spi_block_erase_20,
9562 }, {
9563 .eraseblocks = { {64 * 1024, 1} },
9564 .block_erase = spi_block_erase_52,
9565 }, {
9566 .eraseblocks = { {64 * 1024, 1} },
9567 .block_erase = spi_block_erase_d8,
9568 }, {
9569 .eraseblocks = { {64 * 1024, 1} },
9570 .block_erase = spi_block_erase_60,
9571 }, {
9572 .eraseblocks = { {64 * 1024, 1} },
9573 .block_erase = spi_block_erase_c7,
9574 },
9575 },
9576 .printlock = spi_prettyprint_status_register_bp1_srwd,
9577 .unlock = spi_disable_blockprotect,
9578 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009579 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009580 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V512(C) */
9581 },
9582
9583 {
9584 .vendor = "Macronix",
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009585 .name = "MX25L5121E",
9586 .bustype = BUS_SPI,
9587 .manufacture_id = MACRONIX_ID,
9588 .model_id = MACRONIX_MX25L5121E,
9589 .total_size = 64,
9590 .page_size = 32,
Nico Huber46552c82024-03-27 01:18:12 +01009591 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009592 .tested = TEST_OK_PREW,
9593 .probe = probe_spi_rdid,
9594 .probe_timing = TIMING_ZERO,
9595 .block_erasers =
9596 {
9597 {
9598 .eraseblocks = { {4 * 1024, 16} },
9599 .block_erase = spi_block_erase_20,
9600 }, {
9601 .eraseblocks = { {64 * 1024, 1} },
9602 .block_erase = spi_block_erase_52,
9603 }, {
9604 .eraseblocks = { {64 * 1024, 1} },
9605 .block_erase = spi_block_erase_d8,
9606 }, {
9607 .eraseblocks = { {64 * 1024, 1} },
9608 .block_erase = spi_block_erase_60,
9609 }, {
9610 .eraseblocks = { {64 * 1024, 1} },
9611 .block_erase = spi_block_erase_c7,
9612 },
9613 },
9614 .printlock = spi_prettyprint_status_register_bp1_srwd,
9615 .unlock = spi_disable_blockprotect,
9616 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009617 .read = spi_chip_read,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009618 .voltage = {2700, 3600},
9619 },
9620
9621 {
9622 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009623 .name = "MX25L6405",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009624 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009625 .manufacture_id = MACRONIX_ID,
9626 .model_id = MACRONIX_MX25L6405,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009627 .total_size = 8192,
9628 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009629 /* Has an additional 512B EEPROM sector */
9630 .feature_bits = FEATURE_WRSR_WREN,
Paul Menzelac427b22012-02-16 21:07:07 +00009631 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009632 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009633 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009634 .block_erasers =
9635 {
9636 {
9637 .eraseblocks = { {64 * 1024, 128} },
9638 .block_erase = spi_block_erase_20,
9639 }, {
9640 .eraseblocks = { {64 * 1024, 128} },
9641 .block_erase = spi_block_erase_d8,
9642 }, {
9643 .eraseblocks = { {8 * 1024 * 1024, 1} },
9644 .block_erase = spi_block_erase_60,
9645 }, {
9646 .eraseblocks = { {8 * 1024 * 1024, 1} },
9647 .block_erase = spi_block_erase_c7,
9648 }
9649 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009650 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: error flag */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009651 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009652 .write = spi_chip_write_256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009653 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009654 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00009655 },
9656
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009657 {
9658 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009659 .name = "MX25L6405D",
Stefan Tauner226037d2013-03-16 01:22:12 +00009660 .bustype = BUS_SPI,
9661 .manufacture_id = MACRONIX_ID,
9662 .model_id = MACRONIX_MX25L6405,
9663 .total_size = 8192,
9664 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009665 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009666 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009667 .tested = TEST_OK_PREW,
9668 .probe = probe_spi_rdid,
9669 .probe_timing = TIMING_ZERO,
9670 .block_erasers =
9671 {
9672 {
9673 .eraseblocks = { {4 * 1024, 2048} },
9674 .block_erase = spi_block_erase_20,
9675 }, {
9676 .eraseblocks = { {64 * 1024, 128} },
9677 .block_erase = spi_block_erase_d8,
9678 }, {
9679 .eraseblocks = { {8 * 1024 * 1024, 1} },
9680 .block_erase = spi_block_erase_60,
9681 }, {
9682 .eraseblocks = { {8 * 1024 * 1024, 1} },
9683 .block_erase = spi_block_erase_c7,
9684 }
9685 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009686 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009687 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009688 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009689 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009690 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009691 .prepare_access = spi_prepare_io,
9692 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009693 },
9694
9695 {
9696 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009697 .name = "MX25L6406E/MX25L6408E",
9698 .bustype = BUS_SPI,
9699 .manufacture_id = MACRONIX_ID,
9700 .model_id = MACRONIX_MX25L6405,
9701 .total_size = 8192,
9702 .page_size = 256,
9703 /* MX25L6406E supports SFDP */
9704 /* OTP: 06E 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009705 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009706 .tested = TEST_OK_PREW,
9707 .probe = probe_spi_rdid,
9708 .probe_timing = TIMING_ZERO,
9709 .block_erasers =
9710 {
9711 {
9712 .eraseblocks = { {4 * 1024, 2048} },
9713 .block_erase = spi_block_erase_20,
9714 }, {
9715 .eraseblocks = { {64 * 1024, 128} },
9716 .block_erase = spi_block_erase_52,
9717 }, {
9718 .eraseblocks = { {64 * 1024, 128} },
9719 .block_erase = spi_block_erase_d8,
9720 }, {
9721 .eraseblocks = { {8 * 1024 * 1024, 1} },
9722 .block_erase = spi_block_erase_60,
9723 }, {
9724 .eraseblocks = { {8 * 1024 * 1024, 1} },
9725 .block_erase = spi_block_erase_c7,
9726 }
9727 },
9728 .printlock = spi_prettyprint_status_register_bp3_srwd,
9729 .unlock = spi_disable_blockprotect_bp3_srwd,
9730 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009731 .read = spi_chip_read,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009732 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009733 .prepare_access = spi_prepare_io,
9734 .finish_access = spi_finish_io,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009735 },
9736
9737 {
9738 .vendor = "Macronix",
Nico Huberb0072782017-12-06 21:02:57 +01009739 .name = "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F",
Stefan Tauner226037d2013-03-16 01:22:12 +00009740 .bustype = BUS_SPI,
9741 .manufacture_id = MACRONIX_ID,
9742 .model_id = MACRONIX_MX25L6405,
9743 .total_size = 8192,
9744 .page_size = 256,
9745 /* supports SFDP */
9746 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009747 /* FEATURE_QIO: MX25L6473E, MX25L6473F */
9748 /* FEATURE_FAST_READ_DOUT, _QOUT: MX25L6436E */
9749 /* FEATURE_FAST_READ_DIO, _QIO: MX25L6445E, MX25L6465E */
9750 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +00009751 .tested = TEST_OK_PREW,
9752 .probe = probe_spi_rdid,
9753 .probe_timing = TIMING_ZERO,
9754 .block_erasers =
9755 {
9756 {
9757 .eraseblocks = { {4 * 1024, 2048} },
9758 .block_erase = spi_block_erase_20,
9759 }, {
9760 .eraseblocks = { {32 * 1024, 256} },
9761 .block_erase = spi_block_erase_52,
9762 }, {
9763 .eraseblocks = { {64 * 1024, 128} },
9764 .block_erase = spi_block_erase_d8,
9765 }, {
9766 .eraseblocks = { {8 * 1024 * 1024, 1} },
9767 .block_erase = spi_block_erase_60,
9768 }, {
9769 .eraseblocks = { {8 * 1024 * 1024, 1} },
9770 .block_erase = spi_block_erase_c7,
9771 }
9772 },
Nico Huber46552c82024-03-27 01:18:12 +01009773 .reg_bits =
9774 {
9775 .qe = {STATUS1, 6, RW},
9776 },
9777 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009778 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009779 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009780 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009781 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009782 .prepare_access = spi_prepare_io,
9783 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009784 },
9785
9786 {
9787 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009788 .name = "MX25L6495F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009789 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009790 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009791 .model_id = MACRONIX_MX25L6495F,
9792 .total_size = 8192,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +00009793 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009794 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Stefan Tauner226037d2013-03-16 01:22:12 +00009795 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner0554ca52013-07-25 22:54:25 +00009796 .tested = TEST_OK_PREW,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +00009797 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009798 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009799 .block_erasers =
9800 {
9801 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009802 .eraseblocks = { {4 * 1024, 2048} },
Sean Nelson54596372010-01-09 05:30:14 +00009803 .block_erase = spi_block_erase_20,
9804 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009805 .eraseblocks = { {32 * 1024, 256} },
9806 .block_erase = spi_block_erase_52,
9807 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05309808 .eraseblocks = { {64 * 1024, 128} },
9809 .block_erase = spi_block_erase_d8,
9810 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009811 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009812 .block_erase = spi_block_erase_60,
9813 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009814 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009815 .block_erase = spi_block_erase_c7,
9816 }
9817 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009818 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009819 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009820 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009821 .voltage = {2700, 3600},
9822 },
9823
9824 {
9825 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009826 .name = "MX25L8005/MX25L8006E/MX25L8008E/MX25V8005",
Stefan Tauner5c316f92015-02-08 21:57:52 +00009827 .bustype = BUS_SPI,
9828 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009829 .model_id = MACRONIX_MX25L8005,
9830 .total_size = 1024,
9831 .page_size = 256,
9832 /* MX25L8006E, MX25L8008E support SFDP */
9833 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L8006E, MX25L8008E only) */
Nico Huber46552c82024-03-27 01:18:12 +01009834 /* FEATURE_FAST_READ_DOUT: MX25L8006E, MX25L8008E */
9835 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009836 .tested = TEST_OK_PREW,
9837 .probe = probe_spi_rdid,
9838 .probe_timing = TIMING_ZERO,
9839 .block_erasers =
9840 {
9841 {
9842 .eraseblocks = { {4 * 1024, 256} },
9843 .block_erase = spi_block_erase_20,
9844 }, {
9845 .eraseblocks = { {64 * 1024, 16} },
9846 .block_erase = spi_block_erase_52,
9847 }, {
9848 .eraseblocks = { {64 * 1024, 16} },
9849 .block_erase = spi_block_erase_d8,
9850 }, {
9851 .eraseblocks = { {1024 * 1024, 1} },
9852 .block_erase = spi_block_erase_60,
9853 }, {
9854 .eraseblocks = { {1024 * 1024, 1} },
9855 .block_erase = spi_block_erase_c7,
9856 },
9857 },
9858 .printlock = spi_prettyprint_status_register_bp2_srwd,
9859 .unlock = spi_disable_blockprotect,
9860 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009861 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009862 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V8005 */
9863 },
9864
9865 {
9866 .vendor = "Macronix",
sibradzicf62623c2020-03-14 17:21:34 +09009867 .name = "MX25R3235F",
9868 .bustype = BUS_SPI,
9869 .manufacture_id = MACRONIX_ID,
9870 .model_id = MACRONIX_MX25R3235F,
9871 .total_size = 4096,
9872 .page_size = 256,
9873 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +01009874 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
sibradzicf62623c2020-03-14 17:21:34 +09009875 .tested = TEST_OK_PREW,
9876 .probe = probe_spi_rdid,
9877 .probe_timing = TIMING_ZERO,
9878 .block_erasers =
9879 {
9880 {
9881 .eraseblocks = { {4 * 1024, 1024} },
9882 .block_erase = spi_block_erase_20,
9883 }, {
sibradzicf62623c2020-03-14 17:21:34 +09009884 .eraseblocks = { {32 * 1024, 128} },
9885 .block_erase = spi_block_erase_52,
9886 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05309887 .eraseblocks = { {64 * 1024, 64} },
9888 .block_erase = spi_block_erase_d8,
9889 }, {
sibradzicf62623c2020-03-14 17:21:34 +09009890 .eraseblocks = { {4 * 1024 * 1024, 1} },
9891 .block_erase = spi_block_erase_60,
9892 }, {
9893 .eraseblocks = { {4 * 1024 * 1024, 1} },
9894 .block_erase = spi_block_erase_c7,
9895 }
9896 },
Nico Huber5f509992024-03-27 01:18:12 +01009897 .reg_bits =
9898 {
9899 .qe = {STATUS1, 6, RW},
9900 },
9901 .printlock = spi_prettyprint_status_register_bp3_srwd,
sibradzicf62623c2020-03-14 17:21:34 +09009902 .unlock = spi_disable_blockprotect_bp3_srwd,
9903 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +01009904 .read = spi_chip_read,
sibradzicf62623c2020-03-14 17:21:34 +09009905 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009906 .prepare_access = spi_prepare_io,
9907 .finish_access = spi_finish_io,
sibradzicf62623c2020-03-14 17:21:34 +09009908 },
9909
9910 {
9911 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009912 .name = "MX25R6435F",
9913 .bustype = BUS_SPI,
9914 .manufacture_id = MACRONIX_ID,
9915 .model_id = MACRONIX_MX25R6435F,
9916 .total_size = 8192,
9917 .page_size = 256,
9918 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +01009919 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009920 .tested = TEST_OK_PREW,
9921 .probe = probe_spi_rdid,
9922 .probe_timing = TIMING_ZERO,
9923 .block_erasers =
9924 {
9925 {
9926 .eraseblocks = { {4 * 1024, 2048} },
9927 .block_erase = spi_block_erase_20,
9928 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009929 .eraseblocks = { {32 * 1024, 256} },
9930 .block_erase = spi_block_erase_52,
9931 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05309932 .eraseblocks = { {64 * 1024, 128} },
9933 .block_erase = spi_block_erase_d8,
9934 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009935 .eraseblocks = { {8 * 1024 * 1024, 1} },
9936 .block_erase = spi_block_erase_60,
9937 }, {
9938 .eraseblocks = { {8 * 1024 * 1024, 1} },
9939 .block_erase = spi_block_erase_c7,
9940 }
9941 },
Nico Huber5f509992024-03-27 01:18:12 +01009942 .reg_bits =
9943 {
9944 .qe = {STATUS1, 6, RW},
9945 },
9946 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009947 .unlock = spi_disable_blockprotect_bp3_srwd,
9948 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +01009949 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009950 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009951 .prepare_access = spi_prepare_io,
9952 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009953 },
9954
9955 {
9956 .vendor = "Macronix",
9957 .name = "MX25U12835F",
9958 .bustype = BUS_SPI,
9959 .manufacture_id = MACRONIX_ID,
9960 .model_id = MACRONIX_MX25U12835E,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009961 .total_size = 16384,
9962 .page_size = 256,
9963 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +01009964 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_35,
9965 .dummy_cycles =
9966 {
9967 /* 133MHz version has configuration register
9968 bit to toggle 8 dummy cycles for QIO, defaults: */
9969 .qpi_fast_read = 4,
9970 .qpi_fast_read_qio = 6,
9971 },
Stefan Tauner5c316f92015-02-08 21:57:52 +00009972 .tested = TEST_OK_PREW,
9973 .probe = probe_spi_rdid,
9974 .probe_timing = TIMING_ZERO,
9975 .block_erasers =
9976 {
9977 {
9978 .eraseblocks = { {4 * 1024, 4096} },
9979 .block_erase = spi_block_erase_20,
9980 }, {
9981 .eraseblocks = { {32 * 1024, 512} },
9982 .block_erase = spi_block_erase_52,
9983 }, {
9984 .eraseblocks = { {64 * 1024, 256} },
9985 .block_erase = spi_block_erase_d8,
9986 }, {
9987 .eraseblocks = { {16 * 1024 * 1024, 1} },
9988 .block_erase = spi_block_erase_60,
9989 }, {
9990 .eraseblocks = { {16 * 1024 * 1024, 1} },
9991 .block_erase = spi_block_erase_c7,
9992 }
9993 },
Angel Ponsf112e242018-09-30 20:14:17 +02009994 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +01009995 .reg_bits =
9996 {
9997 .qe = {STATUS1, 6, RW},
9998 },
9999 .printlock = spi_prettyprint_status_register_bp3_srwd,
Angel Ponsf112e242018-09-30 20:14:17 +020010000 .unlock = spi_disable_blockprotect_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010001 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010002 .read = spi_chip_read,
Angel Ponsf112e242018-09-30 20:14:17 +020010003 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010004 .prepare_access = spi_prepare_io,
10005 .finish_access = spi_finish_io,
Angel Ponsf112e242018-09-30 20:14:17 +020010006 },
10007
10008 {
10009 .vendor = "Macronix",
Vincent Palatinf800f552013-03-15 02:03:16 +000010010 .name = "MX25U1635E",
10011 .bustype = BUS_SPI,
10012 .manufacture_id = MACRONIX_ID,
10013 .model_id = MACRONIX_MX25U1635E,
10014 .total_size = 2048,
10015 .page_size = 256,
10016 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010017 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10018 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10019 .dummy_cycles =
10020 {
10021 .qpi_fast_read = 4,
10022 .qpi_fast_read_qio = 6,
10023 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000010024 .tested = TEST_OK_PR,
Vincent Palatinf800f552013-03-15 02:03:16 +000010025 .probe = probe_spi_rdid,
10026 .probe_timing = TIMING_ZERO,
10027 .block_erasers =
10028 {
10029 {
10030 .eraseblocks = { {4 * 1024, 512} },
10031 .block_erase = spi_block_erase_20,
10032 }, {
10033 .eraseblocks = { {32 * 1024, 64} },
10034 .block_erase = spi_block_erase_52,
10035 }, {
10036 .eraseblocks = { {64 * 1024, 32} },
10037 .block_erase = spi_block_erase_d8,
10038 }, {
10039 .eraseblocks = { {2 * 1024 * 1024, 1} },
10040 .block_erase = spi_block_erase_60,
10041 }, {
10042 .eraseblocks = { {2 * 1024 * 1024, 1} },
10043 .block_erase = spi_block_erase_c7,
10044 }
10045 },
10046 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010047 .reg_bits =
10048 {
10049 .qe = {STATUS1, 6, RW},
10050 },
10051 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000010052 .unlock = spi_disable_blockprotect_bp3_srwd,
Vincent Palatinf800f552013-03-15 02:03:16 +000010053 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010054 .read = spi_chip_read,
Vincent Palatinf800f552013-03-15 02:03:16 +000010055 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010056 .prepare_access = spi_prepare_io,
10057 .finish_access = spi_finish_io,
Vincent Palatinf800f552013-03-15 02:03:16 +000010058 },
10059
10060 {
10061 .vendor = "Macronix",
David Tomaschikf75d8c52019-06-20 09:49:01 -070010062 .name = "MX25U25635F",
10063 .bustype = BUS_SPI,
10064 .manufacture_id = MACRONIX_ID,
10065 .model_id = MACRONIX_MX25U25635F,
10066 .total_size = 32768,
10067 .page_size = 256,
10068 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010069 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
10070 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
10071 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Nikolai Artemiev148254b2021-03-23 17:21:10 +110010072 .tested = TEST_OK_PREW,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010073 .probe = probe_spi_rdid,
10074 .probe_timing = TIMING_ZERO,
10075 .block_erasers =
10076 {
10077 {
10078 .eraseblocks = { {4 * 1024, 8192} },
10079 .block_erase = spi_block_erase_21,
10080 }, {
10081 .eraseblocks = { {4 * 1024, 8192} },
10082 .block_erase = spi_block_erase_20,
10083 }, {
10084 .eraseblocks = { {32 * 1024, 1024} },
10085 .block_erase = spi_block_erase_5c,
10086 }, {
10087 .eraseblocks = { {32 * 1024, 1024} },
10088 .block_erase = spi_block_erase_52,
10089 }, {
10090 .eraseblocks = { {64 * 1024, 512} },
10091 .block_erase = spi_block_erase_dc,
10092 }, {
10093 .eraseblocks = { {64 * 1024, 512} },
10094 .block_erase = spi_block_erase_d8,
10095 }, {
10096 .eraseblocks = { {32 * 1024 * 1024, 1} },
10097 .block_erase = spi_block_erase_60,
10098 }, {
10099 .eraseblocks = { {32 * 1024 * 1024, 1} },
10100 .block_erase = spi_block_erase_c7,
10101 }
10102 },
10103 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010010104 .reg_bits =
10105 {
Nico Huber4fa39c52024-03-27 01:18:12 +010010106 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010010107 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
10108 },
Nico Huber4fa39c52024-03-27 01:18:12 +010010109 .printlock = spi_prettyprint_status_register_bp3_srwd,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010110 .unlock = spi_disable_blockprotect_bp3_srwd,
10111 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010112 .read = spi_chip_read,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010113 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010114 .prepare_access = spi_prepare_io,
10115 .finish_access = spi_finish_io,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010116 },
10117
10118 {
10119 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010120 .name = "MX25U3235E/F",
10121 .bustype = BUS_SPI,
10122 .manufacture_id = MACRONIX_ID,
10123 .model_id = MACRONIX_MX25U3235E,
10124 .total_size = 4096,
10125 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010126 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100010127 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010128 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10129 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10130 .dummy_cycles =
10131 {
10132 .qpi_fast_read = 4,
10133 .qpi_fast_read_qio = 6,
10134 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010135 .tested = TEST_OK_PREW,
10136 .probe = probe_spi_rdid,
10137 .probe_timing = TIMING_ZERO,
10138 .block_erasers =
10139 {
10140 {
10141 .eraseblocks = { {4 * 1024, 1024} },
10142 .block_erase = spi_block_erase_20,
10143 }, {
10144 .eraseblocks = { {32 * 1024, 128} },
10145 .block_erase = spi_block_erase_52,
10146 }, {
10147 .eraseblocks = { {64 * 1024, 64} },
10148 .block_erase = spi_block_erase_d8,
10149 }, {
10150 .eraseblocks = { {4 * 1024 * 1024, 1} },
10151 .block_erase = spi_block_erase_60,
10152 }, {
10153 .eraseblocks = { {4 * 1024 * 1024, 1} },
10154 .block_erase = spi_block_erase_c7,
10155 }
10156 },
10157 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010158 .reg_bits =
10159 {
10160 .qe = {STATUS1, 6, RW},
10161 },
10162 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010163 .unlock = spi_disable_blockprotect_bp3_srwd,
10164 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010165 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010166 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010167 .prepare_access = spi_prepare_io,
10168 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010169 },
10170
10171 {
10172 .vendor = "Macronix",
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010173 .name = "MX25U51245G",
10174 .bustype = BUS_SPI,
10175 .manufacture_id = MACRONIX_ID,
10176 .model_id = MACRONIX_MX25U51245G,
10177 .total_size = 65536,
10178 .page_size = 256,
10179 /* OTP: 512B factory programmed and 512B customer programmed; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010180 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
10181 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
10182 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010183 .tested = TEST_OK_PREW,
10184 .probe = probe_spi_rdid,
10185 .probe_timing = TIMING_ZERO,
10186 .block_erasers =
10187 {
10188 {
10189 .eraseblocks = { {4 * 1024, 16384} },
10190 .block_erase = spi_block_erase_21,
10191 }, {
10192 .eraseblocks = { {4 * 1024, 16384} },
10193 .block_erase = spi_block_erase_20,
10194 }, {
10195 .eraseblocks = { {32 * 1024, 2048} },
10196 .block_erase = spi_block_erase_5c,
10197 }, {
10198 .eraseblocks = { {32 * 1024, 2048} },
10199 .block_erase = spi_block_erase_52,
10200 }, {
10201 .eraseblocks = { {64 * 1024, 1024} },
10202 .block_erase = spi_block_erase_dc,
10203 }, {
10204 .eraseblocks = { {64 * 1024, 1024} },
10205 .block_erase = spi_block_erase_d8,
10206 }, {
10207 .eraseblocks = { {64 * 1024 * 1024, 1} },
10208 .block_erase = spi_block_erase_60,
10209 }, {
10210 .eraseblocks = { {64 * 1024 * 1024, 1} },
10211 .block_erase = spi_block_erase_c7,
10212 }
10213 },
10214 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010010215 .reg_bits =
10216 {
Nico Huber4fa39c52024-03-27 01:18:12 +010010217 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010010218 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
10219 },
Nico Huber4fa39c52024-03-27 01:18:12 +010010220 .printlock = spi_prettyprint_status_register_bp3_srwd,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010221 .unlock = spi_disable_blockprotect_bp3_srwd,
10222 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010223 .read = spi_chip_read,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010224 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010225 .prepare_access = spi_prepare_io,
10226 .finish_access = spi_finish_io,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010227 },
10228
10229 {
10230 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010231 .name = "MX25U6435E/F",
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010232 .bustype = BUS_SPI,
10233 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010234 .model_id = MACRONIX_MX25U6435E,
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010235 .total_size = 8192,
10236 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010237 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100010238 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010239 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10240 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10241 .dummy_cycles =
10242 {
10243 .qpi_fast_read = 4,
10244 .qpi_fast_read_qio = 6,
10245 },
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010246 .tested = TEST_OK_PREW,
10247 .probe = probe_spi_rdid,
10248 .probe_timing = TIMING_ZERO,
10249 .block_erasers =
10250 {
10251 {
10252 .eraseblocks = { {4 * 1024, 2048} },
10253 .block_erase = spi_block_erase_20,
10254 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010255 .eraseblocks = { {32 * 1024, 256} },
10256 .block_erase = spi_block_erase_52,
10257 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010258 .eraseblocks = { {64 * 1024, 128} },
10259 .block_erase = spi_block_erase_d8,
10260 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010261 .eraseblocks = { {8 * 1024 * 1024, 1} },
10262 .block_erase = spi_block_erase_60,
10263 }, {
10264 .eraseblocks = { {8 * 1024 * 1024, 1} },
10265 .block_erase = spi_block_erase_c7,
10266 }
10267 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010268 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010269 .reg_bits =
10270 {
10271 .qe = {STATUS1, 6, RW},
10272 },
10273 .printlock = spi_prettyprint_status_register_bp3_srwd,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010010274 .unlock = spi_disable_blockprotect_bp3_srwd,
10275 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010276 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010277 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010278 .prepare_access = spi_prepare_io,
10279 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010280 },
10281
10282 {
10283 .vendor = "Macronix",
10284 .name = "MX25U8032E",
10285 .bustype = BUS_SPI,
10286 .manufacture_id = MACRONIX_ID,
10287 .model_id = MACRONIX_MX25U8032E,
10288 .total_size = 1024,
10289 .page_size = 256,
10290 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber4fa39c52024-03-27 01:18:12 +010010291 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
10292 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010293 .tested = TEST_OK_PREW,
10294 .probe = probe_spi_rdid,
10295 .probe_timing = TIMING_ZERO,
10296 .block_erasers =
10297 {
10298 {
10299 .eraseblocks = { {4 * 1024, 256} },
10300 .block_erase = spi_block_erase_20,
10301 }, {
10302 .eraseblocks = { {32 * 1024, 32} },
10303 .block_erase = spi_block_erase_52,
10304 }, {
10305 .eraseblocks = { {64 * 1024, 16} },
10306 .block_erase = spi_block_erase_d8,
10307 }, {
10308 .eraseblocks = { {1024 * 1024, 1} },
10309 .block_erase = spi_block_erase_60,
10310 }, {
10311 .eraseblocks = { {1024 * 1024, 1} },
10312 .block_erase = spi_block_erase_c7,
10313 }
10314 },
10315 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010316 .reg_bits =
10317 {
10318 .qe = {STATUS1, 6, RW},
10319 },
10320 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010321 .unlock = spi_disable_blockprotect_bp3_srwd,
10322 .write = spi_chip_write_256,
Nico Huber4fa39c52024-03-27 01:18:12 +010010323 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010324 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010325 .prepare_access = spi_prepare_io,
10326 .finish_access = spi_finish_io,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010010327 },
10328
10329 {
10330 .vendor = "Macronix",
Mark Panajotovic502a9132009-08-24 01:42:24 +000010331 .name = "MX29F001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010332 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010333 .manufacture_id = MACRONIX_ID,
10334 .model_id = MACRONIX_MX29F001B,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010335 .total_size = 128,
10336 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010337 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10338 .tested = TEST_UNTESTED,
10339 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010340 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010341 .block_erasers =
10342 {
10343 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000010344 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000010345 {8 * 1024, 1},
10346 {4 * 1024, 2},
10347 {8 * 1024, 2},
10348 {32 * 1024, 1},
10349 {64 * 1024, 1},
10350 },
Sean Nelson35727f72010-01-28 23:55:12 +000010351 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010352 }, {
10353 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010354 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010355 }
10356 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010357 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010358 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010359 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010360 .prepare_access = prepare_memory_access,
10361 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010362 },
10363
10364 {
10365 .vendor = "Macronix",
10366 .name = "MX29F001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010367 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010368 .manufacture_id = MACRONIX_ID,
10369 .model_id = MACRONIX_MX29F001T,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010370 .total_size = 128,
10371 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010372 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stefan Tauner74c6ec62011-05-18 01:31:46 +000010373 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000010374 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010375 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010376 .block_erasers =
10377 {
10378 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000010379 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000010380 {64 * 1024, 1},
10381 {32 * 1024, 1},
10382 {8 * 1024, 2},
10383 {4 * 1024, 2},
10384 {8 * 1024, 1},
10385 },
Sean Nelson35727f72010-01-28 23:55:12 +000010386 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010387 }, {
10388 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010389 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010390 }
10391 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010392 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010393 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010394 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010395 .prepare_access = prepare_memory_access,
10396 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010397 },
10398
10399 {
10400 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000010401 .name = "MX29F002(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010402 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010403 .manufacture_id = MACRONIX_ID,
10404 .model_id = MACRONIX_MX29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010405 .total_size = 256,
10406 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010407 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010408 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000010409 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010410 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010411 .block_erasers =
10412 {
10413 {
10414 .eraseblocks = {
10415 {16 * 1024, 1},
10416 {8 * 1024, 2},
10417 {32 * 1024, 1},
10418 {64 * 1024, 3},
10419 },
Sean Nelson35727f72010-01-28 23:55:12 +000010420 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010421 }, {
10422 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010423 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010424 },
10425 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010426 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010427 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010428 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010429 .prepare_access = prepare_memory_access,
10430 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000010431 },
10432
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010433 {
10434 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000010435 .name = "MX29F002(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010436 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010437 .manufacture_id = MACRONIX_ID,
10438 .model_id = MACRONIX_MX29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010439 .total_size = 256,
10440 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010441 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000010442 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000010443 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010444 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010445 .block_erasers =
10446 {
10447 {
10448 .eraseblocks = {
10449 {64 * 1024, 3},
10450 {32 * 1024, 1},
10451 {8 * 1024, 2},
10452 {16 * 1024, 1},
10453 },
Sean Nelson35727f72010-01-28 23:55:12 +000010454 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010455 }, {
10456 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010457 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010458 },
10459 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010460 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010461 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010462 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010463 .prepare_access = prepare_memory_access,
10464 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000010465 },
10466
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010467 {
10468 .vendor = "Macronix",
Daniele Forsi6a18a932014-07-13 14:53:45 +000010469 .name = "MX29F022(N)B",
10470 .bustype = BUS_PARALLEL,
10471 .manufacture_id = MACRONIX_ID,
10472 .model_id = MACRONIX_MX29F022B,
10473 .total_size = 256,
10474 .page_size = 0, /* unused */
10475 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10476 .tested = TEST_UNTESTED,
10477 .probe = probe_jedec,
10478 .probe_timing = TIMING_ZERO,
10479 .block_erasers =
10480 {
10481 {
10482 .eraseblocks = {
10483 {16 * 1024, 1},
10484 {8 * 1024, 2},
10485 {32 * 1024, 1},
10486 {64 * 1024, 3},
10487 },
10488 .block_erase = erase_sector_jedec,
10489 }, {
10490 .eraseblocks = { {256 * 1024, 1} },
10491 .block_erase = erase_chip_block_jedec,
10492 }
10493 },
10494 .write = write_jedec_1,
10495 .read = read_memmapped,
10496 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010497 .prepare_access = prepare_memory_access,
10498 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000010499 },
10500
10501 {
10502 .vendor = "Macronix",
10503 .name = "MX29F022(N)T",
10504 .bustype = BUS_PARALLEL,
10505 .manufacture_id = MACRONIX_ID,
10506 .model_id = MACRONIX_MX29F022T,
10507 .total_size = 256,
10508 .page_size = 0, /* unused */
10509 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10510 .tested = TEST_OK_PREW,
10511 .probe = probe_jedec,
10512 .probe_timing = TIMING_ZERO,
10513 .block_erasers =
10514 {
10515 {
10516 .eraseblocks = {
10517 {64 * 1024, 3},
10518 {32 * 1024, 1},
10519 {8 * 1024, 2},
10520 {16 * 1024, 1},
10521 },
10522 .block_erase = erase_sector_jedec,
10523 }, {
10524 .eraseblocks = { {256 * 1024, 1} },
10525 .block_erase = erase_chip_block_jedec,
10526 }
10527 },
10528 .write = write_jedec_1,
10529 .read = read_memmapped,
10530 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010531 .prepare_access = prepare_memory_access,
10532 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000010533 },
10534
10535 {
10536 .vendor = "Macronix",
Joshua Roysf1324e02010-09-16 00:51:51 +000010537 .name = "MX29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010538 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +000010539 .manufacture_id = MACRONIX_ID,
10540 .model_id = MACRONIX_MX29F040,
10541 .total_size = 512,
10542 .page_size = 64 * 1024,
10543 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10544 .tested = TEST_UNTESTED,
10545 .probe = probe_jedec,
10546 .probe_timing = TIMING_ZERO,
10547 .block_erasers =
10548 {
10549 {
10550 .eraseblocks = { {64 * 1024, 8} },
10551 .block_erase = erase_sector_jedec,
10552 }, {
10553 .eraseblocks = { {512 * 1024, 1} },
10554 .block_erase = erase_chip_block_jedec,
10555 },
10556 },
10557 .write = write_jedec_1,
10558 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000010559 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010560 .prepare_access = prepare_memory_access,
10561 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +000010562 },
10563
10564 {
10565 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010566 .name = "MX29GL128F",
10567 .bustype = BUS_PARALLEL,
10568 .manufacture_id = MACRONIX_ID,
10569 .model_id = MACRONIX_MX29GL128F,
10570 .total_size = 16384,
10571 .page_size = 128 * 1024, /* actual page size is 16 */
10572 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10573 .tested = TEST_UNTESTED,
10574 .probe = probe_jedec_29gl,
10575 .probe_timing = TIMING_ZERO,
10576 .block_erasers =
10577 {
10578 {
10579 .eraseblocks = { {128 * 1024, 128} },
10580 .block_erase = erase_sector_jedec,
10581 }, {
10582 .eraseblocks = { {16 * 1024 * 1024, 1} },
10583 .block_erase = erase_chip_block_jedec,
10584 },
10585 },
10586 .write = write_jedec_1,
10587 .read = read_memmapped,
10588 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010589 .prepare_access = prepare_memory_access,
10590 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010591 },
10592
10593 {
10594 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010595 .name = "MX29GL320EB",
10596 .bustype = BUS_PARALLEL,
10597 .manufacture_id = MACRONIX_ID,
10598 .model_id = MACRONIX_MX29GL320EB,
10599 .total_size = 4096,
10600 .page_size = 128 * 1024, /* actual page size is 16 */
10601 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10602 .tested = TEST_UNTESTED,
10603 .probe = probe_jedec_29gl,
10604 .probe_timing = TIMING_ZERO,
10605 .block_erasers =
10606 {
10607 {
10608 .eraseblocks = {
10609 {8 * 1024, 8},
10610 {64 * 1024, 63},
10611 },
10612 .block_erase = erase_sector_jedec,
10613 }, {
10614 .eraseblocks = { {4 * 1024 * 1024, 1} },
10615 .block_erase = erase_chip_block_jedec,
10616 },
10617 },
10618 .write = write_jedec_1,
10619 .read = read_memmapped,
10620 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010621 .prepare_access = prepare_memory_access,
10622 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010623 },
10624
10625 {
10626 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010627 .name = "MX29GL320EH/L",
10628 .bustype = BUS_PARALLEL,
10629 .manufacture_id = MACRONIX_ID,
10630 .model_id = MACRONIX_MX29GL320EHL,
10631 .total_size = 4096,
10632 .page_size = 128 * 1024, /* actual page size is 16 */
10633 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10634 .tested = TEST_UNTESTED,
10635 .probe = probe_jedec_29gl,
10636 .probe_timing = TIMING_ZERO,
10637 .block_erasers =
10638 {
10639 {
10640 .eraseblocks = { {64 * 1024, 64} },
10641 .block_erase = erase_sector_jedec,
10642 }, {
10643 .eraseblocks = { {4 * 1024 * 1024, 1} },
10644 .block_erase = erase_chip_block_jedec,
10645 },
10646 },
10647 .write = write_jedec_1,
10648 .read = read_memmapped,
10649 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010650 .prepare_access = prepare_memory_access,
10651 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010652 },
10653
10654 {
10655 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010656 .name = "MX29GL320ET",
10657 .bustype = BUS_PARALLEL,
10658 .manufacture_id = MACRONIX_ID,
10659 .model_id = MACRONIX_MX29GL320ET,
10660 .total_size = 4096,
10661 .page_size = 128 * 1024, /* actual page size is 16 */
10662 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10663 .tested = TEST_UNTESTED,
10664 .probe = probe_jedec_29gl,
10665 .probe_timing = TIMING_ZERO,
10666 .block_erasers =
10667 {
10668 {
10669 .eraseblocks = {
10670 {64 * 1024, 63},
10671 {8 * 1024, 8},
10672 },
10673 .block_erase = erase_sector_jedec,
10674 }, {
10675 .eraseblocks = { {4 * 1024 * 1024, 1} },
10676 .block_erase = erase_chip_block_jedec,
10677 },
10678 },
10679 .write = write_jedec_1,
10680 .read = read_memmapped,
10681 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010682 .prepare_access = prepare_memory_access,
10683 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010684 },
10685
10686 {
10687 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010688 .name = "MX29GL640EB",
10689 .bustype = BUS_PARALLEL,
10690 .manufacture_id = MACRONIX_ID,
10691 .model_id = MACRONIX_MX29GL640EB,
10692 .total_size = 8192,
10693 .page_size = 128 * 1024, /* actual page size is 16 */
10694 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10695 .tested = TEST_UNTESTED,
10696 .probe = probe_jedec_29gl,
10697 .probe_timing = TIMING_ZERO,
10698 .block_erasers =
10699 {
10700 {
10701 .eraseblocks = {
10702 {8 * 1024, 8},
10703 {64 * 1024, 127},
10704 },
10705 .block_erase = erase_sector_jedec,
10706 }, {
10707 .eraseblocks = { {8 * 1024 * 1024, 1} },
10708 .block_erase = erase_chip_block_jedec,
10709 },
10710 },
10711 .write = write_jedec_1,
10712 .read = read_memmapped,
10713 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010714 .prepare_access = prepare_memory_access,
10715 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010716 },
10717
10718 {
10719 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010720 .name = "MX29GL640EH/L",
10721 .bustype = BUS_PARALLEL,
10722 .manufacture_id = MACRONIX_ID,
10723 .model_id = MACRONIX_MX29GL640EHL,
10724 .total_size = 8192,
10725 .page_size = 128 * 1024, /* actual page size is 16 */
10726 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10727 .tested = TEST_UNTESTED,
10728 .probe = probe_jedec_29gl,
10729 .probe_timing = TIMING_ZERO,
10730 .block_erasers =
10731 {
10732 {
10733 .eraseblocks = { {64 * 1024, 128} },
10734 .block_erase = erase_sector_jedec,
10735 }, {
10736 .eraseblocks = { {8 * 1024 * 1024, 1} },
10737 .block_erase = erase_chip_block_jedec,
10738 },
10739 },
10740 .write = write_jedec_1,
10741 .read = read_memmapped,
10742 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010743 .prepare_access = prepare_memory_access,
10744 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010745 },
10746
10747 {
10748 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010749 .name = "MX29GL640ET",
10750 .bustype = BUS_PARALLEL,
10751 .manufacture_id = MACRONIX_ID,
10752 .model_id = MACRONIX_MX29GL640ET,
10753 .total_size = 8192,
10754 .page_size = 128 * 1024, /* actual page size is 16 */
10755 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10756 .tested = TEST_UNTESTED,
10757 .probe = probe_jedec_29gl,
10758 .probe_timing = TIMING_ZERO,
10759 .block_erasers =
10760 {
10761 {
10762 .eraseblocks = {
10763 {64 * 1024, 127},
10764 {8 * 1024, 8},
10765 },
10766 .block_erase = erase_sector_jedec,
10767 }, {
10768 .eraseblocks = { {8 * 1024 * 1024, 1} },
10769 .block_erase = erase_chip_block_jedec,
10770 },
10771 },
10772 .write = write_jedec_1,
10773 .read = read_memmapped,
10774 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010775 .prepare_access = prepare_memory_access,
10776 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010777 },
10778
10779 {
10780 .vendor = "Macronix",
Carl-Daniel Hailfinger350a0c32009-07-24 13:59:27 +000010781 .name = "MX29LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010782 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010783 .manufacture_id = MACRONIX_ID,
10784 .model_id = MACRONIX_MX29LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010785 .total_size = 512,
10786 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010787 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10788 .tested = TEST_UNTESTED,
10789 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010790 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010791 .block_erasers =
10792 {
10793 {
Stefan Tauner6697f712014-08-06 15:09:15 +000010794 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000010795 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010796 }, {
10797 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010798 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010799 },
10800 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010801 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010802 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010803 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010804 .prepare_access = prepare_memory_access,
10805 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger7de86392008-12-10 10:32:05 +000010806 },
10807
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010808 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010809 .vendor = "Macronix",
Hemanth Guruva Reddya136d422019-07-11 11:08:27 +020010810 .name = "MX66L51235F/MX25L51245G",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010811 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010812 .manufacture_id = MACRONIX_ID,
10813 .model_id = MACRONIX_MX66L51235F,
10814 .total_size = 65536,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010815 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010816 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
10817 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010818 .tested = TEST_OK_PREW,
10819 .probe = probe_spi_rdid,
10820 .probe_timing = TIMING_ZERO,
10821 .block_erasers =
10822 {
10823 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010824 .eraseblocks = { {4 * 1024, 16384} },
10825 .block_erase = spi_block_erase_21,
10826 }, {
10827 .eraseblocks = { {4 * 1024, 16384} },
10828 .block_erase = spi_block_erase_20,
10829 }, {
10830 .eraseblocks = { {32 * 1024, 2048} },
10831 .block_erase = spi_block_erase_5c,
10832 }, {
10833 .eraseblocks = { {32 * 1024, 2048} },
10834 .block_erase = spi_block_erase_52,
10835 }, {
10836 .eraseblocks = { {64 * 1024, 1024} },
10837 .block_erase = spi_block_erase_dc,
10838 }, {
10839 .eraseblocks = { {64 * 1024, 1024} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010840 .block_erase = spi_block_erase_d8,
10841 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010842 .eraseblocks = { {64 * 1024 * 1024, 1} },
10843 .block_erase = spi_block_erase_60,
10844 }, {
10845 .eraseblocks = { {64 * 1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010846 .block_erase = spi_block_erase_c7,
10847 }
10848 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010849 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
10850 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +000010851 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010852 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010853 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010854 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010855 .prepare_access = spi_prepare_io,
10856 .finish_access = spi_finish_io,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010857 },
10858
Patrick Rudolph3ba83152021-06-08 10:52:19 +020010859 {
10860 .vendor = "Macronix",
10861 .name = "MX66L1G45G",
10862 .bustype = BUS_SPI,
10863 .manufacture_id = MACRONIX_ID,
10864 .model_id = MACRONIX_MX66L1G45G,
10865 .total_size = 131072,
10866 .page_size = 256,
10867 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
10868 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
10869 .tested = TEST_OK_PREW,
10870 .probe = probe_spi_rdid,
10871 .probe_timing = TIMING_ZERO,
10872 .block_erasers =
10873 {
10874 {
10875 .eraseblocks = { {4 * 1024, 32768} },
10876 .block_erase = spi_block_erase_21,
10877 }, {
10878 .eraseblocks = { {4 * 1024, 32768} },
10879 .block_erase = spi_block_erase_20,
10880 }, {
10881 .eraseblocks = { {32 * 1024, 4096} },
10882 .block_erase = spi_block_erase_5c,
10883 }, {
10884 .eraseblocks = { {32 * 1024, 4096} },
10885 .block_erase = spi_block_erase_52,
10886 }, {
10887 .eraseblocks = { {64 * 1024, 2048} },
10888 .block_erase = spi_block_erase_dc,
10889 }, {
10890 .eraseblocks = { {64 * 1024, 2048} },
10891 .block_erase = spi_block_erase_d8,
10892 }, {
10893 .eraseblocks = { {128 * 1024 * 1024, 1} },
10894 .block_erase = spi_block_erase_60,
10895 }, {
10896 .eraseblocks = { {128 * 1024 * 1024, 1} },
10897 .block_erase = spi_block_erase_c7,
10898 }
10899 },
10900 /* TODO: security register and SBLK/SBULK, configuration register */
10901 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
10902 .unlock = spi_disable_blockprotect_bp3_srwd,
10903 .write = spi_chip_write_256,
10904 .read = spi_chip_read, /* Fast read (0x0B) supported */
10905 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010906 .prepare_access = spi_prepare_io,
10907 .finish_access = spi_finish_io,
Patrick Rudolph3ba83152021-06-08 10:52:19 +020010908 },
10909
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010910 /* The ST M25P05 is a bit of a problem. It has the same ID as the
10911 * ST M25P05-A in RES mode, but supports only 128 byte writes instead
10912 * of 256 byte writes. We rely heavily on the fact that probe_spi_res1
10913 * only is successful if RDID does not work.
10914 */
10915 {
10916 .vendor = "Micron/Numonyx/ST",
10917 .name = "M25P05",
10918 .bustype = BUS_SPI,
10919 .manufacture_id = 0, /* Not used. */
10920 .model_id = ST_M25P05_RES,
10921 .total_size = 64,
10922 .page_size = 256,
10923 .feature_bits = FEATURE_WRSR_WREN,
10924 .tested = TEST_UNTESTED,
10925 .probe = probe_spi_res1,
10926 .probe_timing = TIMING_ZERO,
10927 .block_erasers =
10928 {
10929 {
10930 .eraseblocks = { {32 * 1024, 2} },
10931 .block_erase = spi_block_erase_d8,
10932 }, {
10933 .eraseblocks = { {64 * 1024, 1} },
10934 .block_erase = spi_block_erase_c7,
10935 }
10936 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000010937 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000010938 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010939 .write = spi_chip_write_1, /* 128 */
10940 .read = spi_chip_read,
10941 .voltage = {2700, 3600},
10942 },
10943
10944 {
10945 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010946 .name = "M25P05-A",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010947 .bustype = BUS_SPI,
10948 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010949 .model_id = ST_M25P05A,
10950 .total_size = 64,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010951 .page_size = 256,
10952 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000010953 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010954 .probe = probe_spi_rdid,
10955 .probe_timing = TIMING_ZERO,
10956 .block_erasers =
10957 {
10958 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010959 .eraseblocks = { {32 * 1024, 2} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010960 .block_erase = spi_block_erase_d8,
10961 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010962 .eraseblocks = { {64 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010963 .block_erase = spi_block_erase_c7,
10964 }
10965 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000010966 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000010967 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010968 .write = spi_chip_write_256,
10969 .read = spi_chip_read,
10970 .voltage = {2700, 3600},
10971 },
10972
10973 /* The ST M25P10 has the same problem as the M25P05. */
10974 {
10975 .vendor = "Micron/Numonyx/ST",
10976 .name = "M25P10",
10977 .bustype = BUS_SPI,
10978 .manufacture_id = 0, /* Not used. */
10979 .model_id = ST_M25P10_RES,
10980 .total_size = 128,
10981 .page_size = 256,
10982 .feature_bits = FEATURE_WRSR_WREN,
10983 .tested = TEST_UNTESTED,
10984 .probe = probe_spi_res1,
10985 .probe_timing = TIMING_ZERO,
10986 .block_erasers =
10987 {
10988 {
10989 .eraseblocks = { {32 * 1024, 4} },
10990 .block_erase = spi_block_erase_d8,
10991 }, {
10992 .eraseblocks = { {128 * 1024, 1} },
10993 .block_erase = spi_block_erase_c7,
10994 }
10995 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000010996 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000010997 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010998 .write = spi_chip_write_1, /* 128 */
10999 .read = spi_chip_read,
11000 .voltage = {2700, 3600},
11001 },
11002
11003 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011004 .vendor = "Micron/Numonyx/ST",
11005 .name = "M25P10-A",
11006 .bustype = BUS_SPI,
11007 .manufacture_id = ST_ID,
11008 .model_id = ST_M25P10A,
11009 .total_size = 128,
11010 .page_size = 256,
11011 .feature_bits = FEATURE_WRSR_WREN,
11012 .tested = TEST_OK_PREW,
11013 .probe = probe_spi_rdid,
11014 .probe_timing = TIMING_ZERO,
11015 .block_erasers =
11016 {
11017 {
11018 .eraseblocks = { {32 * 1024, 4} },
11019 .block_erase = spi_block_erase_d8,
11020 }, {
11021 .eraseblocks = { {128 * 1024, 1} },
11022 .block_erase = spi_block_erase_c7,
11023 }
11024 },
11025 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11026 .unlock = spi_disable_blockprotect_bp3_srwd,
11027 .write = spi_chip_write_256,
11028 .read = spi_chip_read,
11029 .voltage = {2700, 3600},
11030 },
11031
11032 {
11033 .vendor = "Micron/Numonyx/ST",
11034 .name = "M25P128",
11035 .bustype = BUS_SPI,
11036 .manufacture_id = ST_ID,
11037 .model_id = ST_M25P128,
11038 .total_size = 16384,
11039 .page_size = 256,
11040 .feature_bits = FEATURE_WRSR_WREN,
11041 .tested = TEST_OK_PREW,
11042 .probe = probe_spi_rdid,
11043 .probe_timing = TIMING_ZERO,
11044 .block_erasers =
11045 {
11046 {
11047 .eraseblocks = { {256 * 1024, 64} },
11048 .block_erase = spi_block_erase_d8,
11049 }, {
11050 .eraseblocks = { {16 * 1024 * 1024, 1} },
11051 .block_erase = spi_block_erase_c7,
11052 }
11053 },
11054 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11055 .unlock = spi_disable_blockprotect_bp3_srwd,
11056 .write = spi_chip_write_256,
11057 .read = spi_chip_read,
11058 .voltage = {2700, 3600},
11059 },
11060
11061 {
11062 .vendor = "Micron/Numonyx/ST",
11063 .name = "M25P16",
11064 .bustype = BUS_SPI,
11065 .manufacture_id = ST_ID,
11066 .model_id = ST_M25P16,
11067 .total_size = 2048,
11068 .page_size = 256,
11069 .feature_bits = FEATURE_WRSR_WREN,
11070 .tested = TEST_OK_PREW,
11071 .probe = probe_spi_rdid,
11072 .probe_timing = TIMING_ZERO,
11073 .block_erasers =
11074 {
11075 {
11076 .eraseblocks = { {64 * 1024, 32} },
11077 .block_erase = spi_block_erase_d8,
11078 }, {
11079 .eraseblocks = { {2 * 1024 * 1024, 1} },
11080 .block_erase = spi_block_erase_c7,
11081 }
11082 },
11083 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11084 .unlock = spi_disable_blockprotect_bp3_srwd,
11085 .write = spi_chip_write_256,
11086 .read = spi_chip_read,
11087 .voltage = {2700, 3600},
11088 },
11089
11090 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011091 .vendor = "Micron/Numonyx/ST", /* Numonyx */
11092 .name = "M25P20",
11093 .bustype = BUS_SPI,
11094 .manufacture_id = ST_ID,
11095 .model_id = ST_M25P20,
11096 .total_size = 256,
11097 .page_size = 256,
11098 .feature_bits = FEATURE_WRSR_WREN,
11099 .tested = TEST_UNTESTED,
11100 .probe = probe_spi_rdid,
11101 .probe_timing = TIMING_ZERO,
11102 .block_erasers =
11103 {
11104 {
11105 .eraseblocks = { {64 * 1024, 4} },
11106 .block_erase = spi_block_erase_d8,
11107 }, {
11108 .eraseblocks = { {256 * 1024, 1} },
11109 .block_erase = spi_block_erase_c7,
11110 }
11111 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011112 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011113 .unlock = spi_disable_blockprotect,
11114 .write = spi_chip_write_256,
11115 .read = spi_chip_read, /* Fast read (0x0B) supported */
11116 .voltage = {2700, 3600},
11117 },
11118
11119 {
11120 .vendor = "Micron/Numonyx/ST",
11121 .name = "M25P20-old",
11122 .bustype = BUS_SPI,
11123 .manufacture_id = 0, /* Not used. */
11124 .model_id = ST_M25P20_RES,
11125 .total_size = 256,
11126 .page_size = 256,
11127 .feature_bits = FEATURE_WRSR_WREN,
11128 .tested = TEST_OK_PREW,
11129 .probe = probe_spi_res1,
11130 .probe_timing = TIMING_ZERO,
11131 .block_erasers =
11132 {
11133 {
11134 .eraseblocks = { {64 * 1024, 4} },
11135 .block_erase = spi_block_erase_d8,
11136 }, {
11137 .eraseblocks = { {256 * 1024, 1} },
11138 .block_erase = spi_block_erase_c7,
11139 }
11140 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011141 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011142 .unlock = spi_disable_blockprotect,
11143 .write = spi_chip_write_256,
11144 .read = spi_chip_read, /* Fast read (0x0B) supported */
11145 .voltage = {2700, 3600},
11146 },
11147
11148 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011149 .vendor = "Micron/Numonyx/ST",
11150 .name = "M25P32",
11151 .bustype = BUS_SPI,
11152 .manufacture_id = ST_ID,
11153 .model_id = ST_M25P32,
11154 .total_size = 4096,
11155 .page_size = 256,
11156 .feature_bits = FEATURE_WRSR_WREN,
11157 .tested = TEST_OK_PREW,
11158 .probe = probe_spi_rdid,
11159 .probe_timing = TIMING_ZERO,
11160 .block_erasers =
11161 {
11162 {
11163 .eraseblocks = { {64 * 1024, 64} },
11164 .block_erase = spi_block_erase_d8,
11165 }, {
11166 .eraseblocks = { {4 * 1024 * 1024, 1} },
11167 .block_erase = spi_block_erase_c7,
11168 }
11169 },
11170 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11171 .unlock = spi_disable_blockprotect_bp3_srwd,
11172 .write = spi_chip_write_256,
11173 .read = spi_chip_read,
11174 .voltage = {2700, 3600},
11175 },
11176
11177 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011178 .vendor = "Micron/Numonyx/ST", /* Numonyx */
11179 .name = "M25P40",
11180 .bustype = BUS_SPI,
11181 .manufacture_id = ST_ID,
11182 .model_id = ST_M25P40,
11183 .total_size = 512,
11184 .page_size = 256,
11185 .feature_bits = FEATURE_WRSR_WREN,
11186 .tested = TEST_OK_PREW,
11187 .probe = probe_spi_rdid,
11188 .probe_timing = TIMING_ZERO,
11189 .block_erasers =
11190 {
11191 {
11192 .eraseblocks = { {64 * 1024, 8} },
11193 .block_erase = spi_block_erase_d8,
11194 }, {
11195 .eraseblocks = { {512 * 1024, 1} },
11196 .block_erase = spi_block_erase_c7,
11197 }
11198 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011199 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011200 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011201 .write = spi_chip_write_256,
11202 .read = spi_chip_read,
11203 .voltage = {2700, 3600},
11204 },
11205
11206 {
11207 .vendor = "Micron/Numonyx/ST",
11208 .name = "M25P40-old",
11209 .bustype = BUS_SPI,
11210 .manufacture_id = 0, /* Not used. */
11211 .model_id = ST_M25P40_RES,
11212 .total_size = 512,
11213 .page_size = 256,
11214 .feature_bits = FEATURE_WRSR_WREN,
11215 .tested = TEST_UNTESTED,
11216 .probe = probe_spi_res1,
11217 .probe_timing = TIMING_ZERO,
11218 .block_erasers =
11219 {
11220 {
11221 .eraseblocks = { {64 * 1024, 8} },
11222 .block_erase = spi_block_erase_d8,
11223 }, {
11224 .eraseblocks = { {512 * 1024, 1} },
11225 .block_erase = spi_block_erase_c7,
11226 }
11227 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011228 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011229 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011230 .write = spi_chip_write_256,
11231 .read = spi_chip_read,
11232 },
11233
11234 {
11235 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011236 .name = "M25P64",
11237 .bustype = BUS_SPI,
11238 .manufacture_id = ST_ID,
11239 .model_id = ST_M25P64,
11240 .total_size = 8192,
11241 .page_size = 256,
11242 .feature_bits = FEATURE_WRSR_WREN,
11243 .tested = TEST_OK_PREW,
11244 .probe = probe_spi_rdid,
11245 .probe_timing = TIMING_ZERO,
11246 .block_erasers =
11247 {
11248 {
11249 .eraseblocks = { {64 * 1024, 128} },
11250 .block_erase = spi_block_erase_d8,
11251 }, {
11252 .eraseblocks = { {8 * 1024 * 1024, 1} },
11253 .block_erase = spi_block_erase_c7,
11254 }
11255 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011256 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011257 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011258 .write = spi_chip_write_256,
11259 .read = spi_chip_read,
11260 .voltage = {2700, 3600},
11261 },
11262
11263 {
11264 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011265 .name = "M25P80",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011266 .bustype = BUS_SPI,
11267 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011268 .model_id = ST_M25P80,
11269 .total_size = 1024,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011270 .page_size = 256,
11271 .feature_bits = FEATURE_WRSR_WREN,
11272 .tested = TEST_OK_PREW,
11273 .probe = probe_spi_rdid,
11274 .probe_timing = TIMING_ZERO,
11275 .block_erasers =
11276 {
11277 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011278 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011279 .block_erase = spi_block_erase_d8,
11280 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011281 .eraseblocks = { {1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011282 .block_erase = spi_block_erase_c7,
11283 }
11284 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011285 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011286 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011287 .write = spi_chip_write_256,
11288 .read = spi_chip_read,
11289 .voltage = {2700, 3600},
11290 },
11291
11292 {
11293 .vendor = "Micron/Numonyx/ST",
11294 .name = "M25PE10",
11295 .bustype = BUS_SPI,
11296 .manufacture_id = ST_ID,
11297 .model_id = ST_M25PE10,
11298 .total_size = 128,
11299 .page_size = 256,
11300 .feature_bits = FEATURE_WRSR_WREN,
11301 .tested = TEST_UNTESTED,
11302 .probe = probe_spi_rdid,
11303 .probe_timing = TIMING_ZERO,
11304 .block_erasers =
11305 {
11306 {
11307 .eraseblocks = { {4 * 1024, 32} },
11308 .block_erase = spi_block_erase_20,
11309 }, {
11310 .eraseblocks = { {64 * 1024, 2} },
11311 .block_erase = spi_block_erase_d8,
11312 }, {
11313 .eraseblocks = { {128 * 1024, 1} },
11314 .block_erase = spi_block_erase_c7,
11315 }
11316 },
11317 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11318 .unlock = spi_disable_blockprotect,
11319 .write = spi_chip_write_256,
11320 .read = spi_chip_read,
11321 .voltage = {2700, 3600},
11322 },
11323
11324 {
11325 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011326 .name = "M25PE16",
11327 .bustype = BUS_SPI,
11328 .manufacture_id = ST_ID,
11329 .model_id = ST_M25PE16,
11330 .total_size = 2048,
11331 .page_size = 256,
11332 .feature_bits = FEATURE_WRSR_WREN,
11333 .tested = TEST_UNTESTED,
11334 .probe = probe_spi_rdid,
11335 .probe_timing = TIMING_ZERO,
11336 .block_erasers =
11337 {
11338 {
11339 .eraseblocks = { {4 * 1024, 512} },
11340 .block_erase = spi_block_erase_20,
11341 }, {
11342 .eraseblocks = { {64 * 1024, 32} },
11343 .block_erase = spi_block_erase_d8,
11344 }, {
11345 .eraseblocks = { {2 * 1024 * 1024, 1} },
11346 .block_erase = spi_block_erase_c7,
11347 }
11348 },
11349 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11350 .unlock = spi_disable_blockprotect,
11351 .write = spi_chip_write_256,
11352 .read = spi_chip_read,
11353 .voltage = {2700, 3600},
11354 },
11355
11356 {
11357 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011358 .name = "M25PE20",
11359 .bustype = BUS_SPI,
11360 .manufacture_id = ST_ID,
11361 .model_id = ST_M25PE20,
11362 .total_size = 256,
11363 .page_size = 256,
11364 .feature_bits = FEATURE_WRSR_WREN,
11365 .tested = TEST_UNTESTED,
11366 .probe = probe_spi_rdid,
11367 .probe_timing = TIMING_ZERO,
11368 .block_erasers =
11369 {
11370 {
11371 .eraseblocks = { {4 * 1024, 64} },
11372 .block_erase = spi_block_erase_20,
11373 }, {
11374 .eraseblocks = { {64 * 1024, 4} },
11375 .block_erase = spi_block_erase_d8,
11376 }, {
11377 .eraseblocks = { {256 * 1024, 1} },
11378 .block_erase = spi_block_erase_c7,
11379 }
11380 },
11381 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11382 .unlock = spi_disable_blockprotect,
11383 .write = spi_chip_write_256,
11384 .read = spi_chip_read,
11385 .voltage = {2700, 3600},
11386 },
11387
11388 {
11389 .vendor = "Micron/Numonyx/ST",
11390 .name = "M25PE40",
11391 .bustype = BUS_SPI,
11392 .manufacture_id = ST_ID,
11393 .model_id = ST_M25PE40,
11394 .total_size = 512,
11395 .page_size = 256,
11396 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011397 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011398 .probe = probe_spi_rdid,
11399 .probe_timing = TIMING_ZERO,
11400 .block_erasers =
11401 {
11402 {
11403 .eraseblocks = { {4 * 1024, 128} },
11404 .block_erase = spi_block_erase_20,
11405 }, {
11406 .eraseblocks = { {64 * 1024, 8} },
11407 .block_erase = spi_block_erase_d8,
11408 }, {
11409 .eraseblocks = { {512 * 1024, 1} },
11410 .block_erase = spi_block_erase_c7,
11411 }
11412 },
11413 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11414 .unlock = spi_disable_blockprotect,
11415 .write = spi_chip_write_256,
11416 .read = spi_chip_read,
11417 .voltage = {2700, 3600},
11418 },
11419
11420 {
11421 .vendor = "Micron/Numonyx/ST",
11422 .name = "M25PE80",
11423 .bustype = BUS_SPI,
11424 .manufacture_id = ST_ID,
11425 .model_id = ST_M25PE80,
11426 .total_size = 1024,
11427 .page_size = 256,
11428 .feature_bits = FEATURE_WRSR_WREN,
11429 .tested = TEST_OK_PREW,
11430 .probe = probe_spi_rdid,
11431 .probe_timing = TIMING_ZERO,
11432 .block_erasers =
11433 {
11434 {
11435 .eraseblocks = { {4 * 1024, 256} },
11436 .block_erase = spi_block_erase_20,
11437 }, {
11438 .eraseblocks = { {64 * 1024, 16} },
11439 .block_erase = spi_block_erase_d8,
11440 }, {
11441 .eraseblocks = { {1024 * 1024, 1} },
11442 .block_erase = spi_block_erase_c7,
11443 }
11444 },
11445 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11446 .unlock = spi_disable_blockprotect,
11447 .write = spi_chip_write_256,
11448 .read = spi_chip_read,
11449 .voltage = {2700, 3600},
11450 },
11451
11452 {
11453 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011454 .name = "M25PX16",
11455 .bustype = BUS_SPI,
11456 .manufacture_id = ST_ID,
11457 .model_id = ST_M25PX16,
11458 .total_size = 2048,
11459 .page_size = 256,
11460 /* OTP: 64B total; read 0x4B; write 0x42 */
11461 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11462 .tested = TEST_OK_PREW,
11463 .probe = probe_spi_rdid,
11464 .probe_timing = TIMING_ZERO,
11465 .block_erasers =
11466 {
11467 {
11468 .eraseblocks = { { 4 * 1024, 512 } },
11469 .block_erase = spi_block_erase_20,
11470 }, {
11471 .eraseblocks = { {64 * 1024, 32} },
11472 .block_erase = spi_block_erase_d8,
11473 }, {
11474 .eraseblocks = { {2 * 1024 * 1024, 1} },
11475 .block_erase = spi_block_erase_c7,
11476 }
11477 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011478 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011479 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11480 .write = spi_chip_write_256,
11481 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011482 .voltage = {2300, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011483 },
11484
11485 {
11486 .vendor = "Micron/Numonyx/ST",
11487 .name = "M25PX32",
11488 .bustype = BUS_SPI,
11489 .manufacture_id = ST_ID,
11490 .model_id = ST_M25PX32,
11491 .total_size = 4096,
11492 .page_size = 256,
11493 /* OTP: 64B total; read 0x4B; write 0x42 */
11494 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11495 .tested = TEST_OK_PRE,
11496 .probe = probe_spi_rdid,
11497 .probe_timing = TIMING_ZERO,
11498 .block_erasers =
11499 {
11500 {
11501 .eraseblocks = { { 4 * 1024, 1024 } },
11502 .block_erase = spi_block_erase_20,
11503 }, {
11504 .eraseblocks = { {64 * 1024, 64} },
11505 .block_erase = spi_block_erase_d8,
11506 }, {
11507 .eraseblocks = { {4 * 1024 * 1024, 1} },
11508 .block_erase = spi_block_erase_c7,
11509 }
11510 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011511 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011512 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11513 .write = spi_chip_write_256,
11514 .read = spi_chip_read,
11515 .voltage = {2700, 3600},
11516 },
11517
11518 {
11519 .vendor = "Micron/Numonyx/ST",
11520 .name = "M25PX64",
11521 .bustype = BUS_SPI,
11522 .manufacture_id = ST_ID,
11523 .model_id = ST_M25PX64,
11524 .total_size = 8192,
11525 .page_size = 256,
11526 /* OTP: 64B total; read 0x4B; write 0x42 */
11527 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011528 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011529 .probe = probe_spi_rdid,
11530 .probe_timing = TIMING_ZERO,
11531 .block_erasers =
11532 {
11533 {
11534 .eraseblocks = { { 4 * 1024, 2048 } },
11535 .block_erase = spi_block_erase_20,
11536 }, {
11537 .eraseblocks = { {64 * 1024, 128} },
11538 .block_erase = spi_block_erase_d8,
11539 }, {
11540 .eraseblocks = { {8 * 1024 * 1024, 1} },
11541 .block_erase = spi_block_erase_c7,
11542 }
11543 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011544 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011545 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11546 .write = spi_chip_write_256,
11547 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011548 .voltage = {2700, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011549 },
11550
11551 {
11552 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011553 .name = "M25PX80",
11554 .bustype = BUS_SPI,
11555 .manufacture_id = ST_ID,
11556 .model_id = ST_M25PX80,
11557 .total_size = 1024,
11558 .page_size = 256,
11559 /* OTP: 64B total; read 0x4B, write 0x42 */
11560 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11561 .tested = TEST_OK_PREW,
11562 .probe = probe_spi_rdid,
11563 .probe_timing = TIMING_ZERO,
11564 .block_erasers =
11565 {
11566 {
11567 .eraseblocks = { { 4 * 1024, 256 } },
11568 .block_erase = spi_block_erase_20,
11569 }, {
11570 .eraseblocks = { {64 * 1024, 16} },
11571 .block_erase = spi_block_erase_d8,
11572 }, {
11573 .eraseblocks = { {1024 * 1024, 1} },
11574 .block_erase = spi_block_erase_c7,
11575 }
11576 },
11577 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
11578 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11579 .write = spi_chip_write_256,
11580 .read = spi_chip_read,
11581 .voltage = {2700, 3600},
11582 },
11583
11584 {
11585 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011586 .name = "M45PE10",
11587 .bustype = BUS_SPI,
11588 .manufacture_id = ST_ID,
11589 .model_id = ST_M45PE10,
11590 .total_size = 128,
11591 .page_size = 256,
11592 .tested = TEST_UNTESTED,
11593 .probe = probe_spi_rdid,
11594 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011595 .block_erasers =
11596 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011597 {
11598 .eraseblocks = { {256, 512} },
11599 .block_erase = spi_block_erase_db,
11600 }, {
11601 .eraseblocks = { {64 * 1024, 2} },
11602 .block_erase = spi_block_erase_d8,
11603 }
11604 },
11605 .printlock = spi_prettyprint_status_register_default_welwip,
11606 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11607 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11608 .read = spi_chip_read, /* Fast read (0x0B) supported */
11609 .voltage = {2700, 3600},
11610 },
11611
11612 {
11613 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011614 .name = "M45PE16",
11615 .bustype = BUS_SPI,
11616 .manufacture_id = ST_ID,
11617 .model_id = ST_M45PE16,
11618 .total_size = 2048,
11619 .page_size = 256,
11620 .tested = TEST_UNTESTED,
11621 .probe = probe_spi_rdid,
11622 .probe_timing = TIMING_ZERO,
11623 .block_erasers =
11624 {
11625 {
11626 .eraseblocks = { {256, 8192} },
11627 .block_erase = spi_block_erase_db,
11628 }, {
11629 .eraseblocks = { {64 * 1024, 32} },
11630 .block_erase = spi_block_erase_d8,
11631 }
11632 },
11633 .printlock = spi_prettyprint_status_register_default_welwip,
11634 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11635 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11636 .read = spi_chip_read, /* Fast read (0x0B) supported */
11637 .voltage = {2700, 3600},
11638 },
11639
11640 {
11641 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011642 .name = "M45PE20",
11643 .bustype = BUS_SPI,
11644 .manufacture_id = ST_ID,
11645 .model_id = ST_M45PE20,
11646 .total_size = 256,
11647 .page_size = 256,
11648 .tested = TEST_UNTESTED,
11649 .probe = probe_spi_rdid,
11650 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011651 .block_erasers =
11652 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011653 {
11654 .eraseblocks = { {256, 1024} },
11655 .block_erase = spi_block_erase_db,
11656 }, {
11657 .eraseblocks = { {64 * 1024, 4} },
11658 .block_erase = spi_block_erase_d8,
11659 }
11660 },
11661 .printlock = spi_prettyprint_status_register_default_welwip,
11662 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11663 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11664 .read = spi_chip_read, /* Fast read (0x0B) supported */
11665 .voltage = {2700, 3600},
11666 },
11667
11668 {
11669 .vendor = "Micron/Numonyx/ST",
11670 .name = "M45PE40",
11671 .bustype = BUS_SPI,
11672 .manufacture_id = ST_ID,
11673 .model_id = ST_M45PE40,
11674 .total_size = 512,
11675 .page_size = 256,
11676 .tested = TEST_UNTESTED,
11677 .probe = probe_spi_rdid,
11678 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011679 .block_erasers =
11680 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011681 {
11682 .eraseblocks = { {256, 2048} },
11683 .block_erase = spi_block_erase_db,
11684 }, {
11685 .eraseblocks = { {64 * 1024, 8} },
11686 .block_erase = spi_block_erase_d8,
11687 }
11688 },
11689 .printlock = spi_prettyprint_status_register_default_welwip,
11690 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
Stefan Tauner23e10b82016-01-23 16:16:49 +000011691 .write = spi_chip_write_256, /* Page write supported (similar to PP but allows 0->1 changes) */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011692 .read = spi_chip_read, /* Fast read (0x0B) supported */
11693 .voltage = {2700, 3600},
11694 },
11695
11696 {
11697 .vendor = "Micron/Numonyx/ST",
11698 .name = "M45PE80",
11699 .bustype = BUS_SPI,
11700 .manufacture_id = ST_ID,
11701 .model_id = ST_M45PE80,
11702 .total_size = 1024,
11703 .page_size = 256,
11704 .tested = TEST_UNTESTED,
11705 .probe = probe_spi_rdid,
11706 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011707 .block_erasers =
11708 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011709 {
11710 .eraseblocks = { {256, 4096} },
11711 .block_erase = spi_block_erase_db,
11712 }, {
11713 .eraseblocks = { {64 * 1024, 16} },
11714 .block_erase = spi_block_erase_d8,
11715 }
11716 },
11717 .printlock = spi_prettyprint_status_register_default_welwip,
11718 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11719 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11720 .read = spi_chip_read, /* Fast read (0x0B) supported */
11721 .voltage = {2700, 3600},
11722 },
11723
11724 {
11725 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070011726 .name = "N25Q00A..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
11727 .bustype = BUS_SPI,
11728 .manufacture_id = ST_ID,
11729 .model_id = ST_N25Q00A__1G,
11730 .total_size = 131072,
11731 .page_size = 256,
11732 /* supports SFDP */
11733 /* OTP: 64B total; read 0x4B, write 0x42 */
11734 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
11735 .tested = TEST_UNTESTED,
11736 .probe = probe_spi_rdid,
11737 .probe_timing = TIMING_ZERO,
11738 .block_erasers =
11739 {
11740 {
11741 .eraseblocks = { {4 * 1024, 32768} },
11742 .block_erase = spi_block_erase_21,
11743 }, {
11744 .eraseblocks = { {4 * 1024, 32768} },
11745 .block_erase = spi_block_erase_20,
11746 }, {
11747 .eraseblocks = { {64 * 1024, 2048} },
11748 .block_erase = spi_block_erase_dc,
11749 }, {
11750 .eraseblocks = { {64 * 1024, 2048} },
11751 .block_erase = spi_block_erase_d8,
11752 }, {
11753 .eraseblocks = { {32768 * 1024, 4} },
11754 .block_erase = spi_block_erase_c4,
11755 }
11756 },
11757 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11758 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11759 .write = spi_chip_write_256, /* Multi I/O supported */
11760 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11761 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020011762 .prepare_access = spi_prepare_io,
11763 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070011764 },
11765
11766 {
11767 .vendor = "Micron/Numonyx/ST",
11768 .name = "N25Q00A..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
11769 .bustype = BUS_SPI,
11770 .manufacture_id = ST_ID,
11771 .model_id = ST_N25Q00A__3G,
11772 .total_size = 131072,
11773 .page_size = 256,
11774 /* supports SFDP */
11775 /* OTP: 64B total; read 0x4B, write 0x42 */
11776 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
11777 .tested = TEST_UNTESTED,
11778 .probe = probe_spi_rdid,
11779 .probe_timing = TIMING_ZERO,
11780 .block_erasers =
11781 {
11782 {
11783 .eraseblocks = { {4 * 1024, 32768} },
11784 .block_erase = spi_block_erase_21,
11785 }, {
11786 .eraseblocks = { {4 * 1024, 32768} },
11787 .block_erase = spi_block_erase_20,
11788 }, {
11789 .eraseblocks = { {64 * 1024, 2048} },
11790 .block_erase = spi_block_erase_dc,
11791 }, {
11792 .eraseblocks = { {64 * 1024, 2048} },
11793 .block_erase = spi_block_erase_d8,
11794 }, {
11795 .eraseblocks = { {32768 * 1024, 4} },
11796 .block_erase = spi_block_erase_c4,
11797 }
11798 },
11799 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11800 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11801 .write = spi_chip_write_256, /* Multi I/O supported */
11802 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11803 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011804 .prepare_access = spi_prepare_io,
11805 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070011806 },
11807
11808 {
11809 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011810 .name = "N25Q016",
11811 .bustype = BUS_SPI,
11812 .manufacture_id = ST_ID,
11813 .model_id = ST_N25Q016__1E,
11814 .total_size = 2048,
11815 .page_size = 256,
11816 /* supports SFDP */
11817 /* OTP: 64B total; read 0x4B, write 0x42 */
11818 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11819 .tested = TEST_UNTESTED,
11820 .probe = probe_spi_rdid,
11821 .probe_timing = TIMING_ZERO,
11822 .block_erasers =
11823 {
11824 {
11825 .eraseblocks = { {4 * 1024, 512} },
11826 .block_erase = spi_block_erase_20,
11827 }, {
11828 .eraseblocks = { {32 * 1024, 64} },
11829 .block_erase = spi_block_erase_52,
11830 }, {
11831 .eraseblocks = { {64 * 1024, 32} },
11832 .block_erase = spi_block_erase_d8,
11833 }, {
11834 .eraseblocks = { {2 * 1024 * 1024, 1} },
11835 .block_erase = spi_block_erase_c7,
11836 }
11837 },
11838 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11839 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11840 .write = spi_chip_write_256, /* Multi I/O supported */
11841 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11842 .voltage = {1700, 2000},
11843 },
11844
11845 {
11846 .vendor = "Micron/Numonyx/ST",
11847 .name = "N25Q032..1E",
11848 .bustype = BUS_SPI,
11849 .manufacture_id = ST_ID,
11850 .model_id = ST_N25Q032__1E,
11851 .total_size = 4096,
11852 .page_size = 256,
11853 /* supports SFDP */
11854 /* OTP: 64B total; read 0x4B, write 0x42 */
11855 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11856 .tested = TEST_UNTESTED,
11857 .probe = probe_spi_rdid,
11858 .probe_timing = TIMING_ZERO,
11859 .block_erasers =
11860 {
11861 {
11862 .eraseblocks = { {4 * 1024, 1024} },
11863 .block_erase = spi_block_erase_20,
11864 }, {
11865 .eraseblocks = { {64 * 1024, 64} },
11866 .block_erase = spi_block_erase_d8,
11867 }, {
11868 .eraseblocks = { {4 * 1024 * 1024, 1} },
11869 .block_erase = spi_block_erase_c7,
11870 }
11871 },
11872 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11873 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11874 .write = spi_chip_write_256, /* Multi I/O supported */
11875 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11876 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011877 .reg_bits =
11878 {
11879 /*
11880 * There is also a volatile lock register per 64KiB sector, which is not
11881 * mutually exclusive with BP-based protection.
11882 */
11883 .srp = {STATUS1, 7, RW},
11884 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
11885 .tb = {STATUS1, 5, RW},
11886 },
Nico Huberaabb3e02023-01-13 00:22:30 +010011887 .wp_write_cfg = spi_wp_write_cfg,
11888 .wp_read_cfg = spi_wp_read_cfg,
11889 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011890 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011891 },
11892
11893 {
11894 .vendor = "Micron/Numonyx/ST",
11895 .name = "N25Q032..3E",
11896 .bustype = BUS_SPI,
11897 .manufacture_id = ST_ID,
11898 .model_id = ST_N25Q032__3E,
11899 .total_size = 4096,
11900 .page_size = 256,
11901 /* supports SFDP */
11902 /* OTP: 64B total; read 0x4B, write 0x42 */
11903 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11904 .tested = TEST_OK_PREW,
11905 .probe = probe_spi_rdid,
11906 .probe_timing = TIMING_ZERO,
11907 .block_erasers =
11908 {
11909 {
11910 .eraseblocks = { {4 * 1024, 1024} },
11911 .block_erase = spi_block_erase_20,
11912 }, {
11913 .eraseblocks = { {64 * 1024, 64} },
11914 .block_erase = spi_block_erase_d8,
11915 }, {
11916 .eraseblocks = { {4 * 1024 * 1024, 1} },
11917 .block_erase = spi_block_erase_c7,
11918 }
11919 },
11920 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11921 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11922 .write = spi_chip_write_256, /* Multi I/O supported */
11923 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11924 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011925 .reg_bits =
11926 {
11927 /*
11928 * There is also a volatile lock register per 64KiB sector, which is not
11929 * mutually exclusive with BP-based protection.
11930 */
11931 .srp = {STATUS1, 7, RW},
11932 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
11933 .tb = {STATUS1, 5, RW},
11934 },
Nico Huberaabb3e02023-01-13 00:22:30 +010011935 .wp_write_cfg = spi_wp_write_cfg,
11936 .wp_read_cfg = spi_wp_read_cfg,
11937 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011938 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011939 },
11940
11941 {
11942 .vendor = "Micron/Numonyx/ST",
11943 .name = "N25Q064..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
11944 .bustype = BUS_SPI,
11945 .manufacture_id = ST_ID,
11946 .model_id = ST_N25Q064__1E,
11947 .total_size = 8192,
11948 .page_size = 256,
11949 /* supports SFDP */
11950 /* OTP: 64B total; read 0x4B, write 0x42 */
11951 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011952 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011953 .probe = probe_spi_rdid,
11954 .probe_timing = TIMING_ZERO,
11955 .block_erasers =
11956 {
11957 {
11958 .eraseblocks = { {4 * 1024, 2048 } },
11959 .block_erase = spi_block_erase_20,
11960 }, {
11961 .eraseblocks = { {64 * 1024, 128} },
11962 .block_erase = spi_block_erase_d8,
11963 }, {
11964 .eraseblocks = { {8 * 1024 * 1024, 1} },
11965 .block_erase = spi_block_erase_c7,
11966 }
11967 },
11968 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11969 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11970 .write = spi_chip_write_256, /* Multi I/O supported */
11971 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11972 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011973 .reg_bits =
11974 {
11975 /*
11976 * There is also a volatile lock register per 64KiB sector, which is not
11977 * mutually exclusive with BP-based protection.
11978 */
11979 .srp = {STATUS1, 7, RW},
11980 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
11981 .tb = {STATUS1, 5, RW},
11982 },
Nico Huberaabb3e02023-01-13 00:22:30 +010011983 .wp_write_cfg = spi_wp_write_cfg,
11984 .wp_read_cfg = spi_wp_read_cfg,
11985 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011986 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011987 },
11988
11989 {
11990 .vendor = "Micron/Numonyx/ST",
11991 .name = "N25Q064..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
11992 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100011993 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011994 .model_id = ST_N25Q064__3E,
11995 .total_size = 8192,
11996 .page_size = 256,
11997 /* supports SFDP */
11998 /* OTP: 64B total; read 0x4B, write 0x42 */
11999 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12000 .tested = TEST_OK_PREW,
12001 .probe = probe_spi_rdid,
12002 .probe_timing = TIMING_ZERO,
12003 .block_erasers =
12004 {
12005 {
12006 .eraseblocks = { {4 * 1024, 2048 } },
12007 .block_erase = spi_block_erase_20,
12008 }, {
12009 .eraseblocks = { {64 * 1024, 128} },
12010 .block_erase = spi_block_erase_d8,
12011 }, {
12012 .eraseblocks = { {8 * 1024 * 1024, 1} },
12013 .block_erase = spi_block_erase_c7,
12014 }
12015 },
12016 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12017 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12018 .write = spi_chip_write_256, /* Multi I/O supported */
12019 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12020 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012021 .reg_bits =
12022 {
12023 /*
12024 * There is also a volatile lock register per 64KiB sector, which is not
12025 * mutually exclusive with BP-based protection.
12026 */
12027 .srp = {STATUS1, 7, RW},
12028 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12029 .tb = {STATUS1, 5, RW},
12030 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012031 .wp_write_cfg = spi_wp_write_cfg,
12032 .wp_read_cfg = spi_wp_read_cfg,
12033 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012034 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012035 },
12036
12037 {
12038 .vendor = "Micron/Numonyx/ST",
12039 .name = "N25Q128..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
12040 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012041 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012042 .model_id = ST_N25Q128__1E,
12043 .total_size = 16384,
12044 .page_size = 256,
12045 /* supports SFDP */
12046 /* OTP: 64B total; read 0x4B, write 0x42 */
12047 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner23e10b82016-01-23 16:16:49 +000012048 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012049 .probe = probe_spi_rdid,
12050 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012051 .block_erasers =
12052 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012053 {
12054 .eraseblocks = { {4 * 1024, 4096 } },
12055 .block_erase = spi_block_erase_20,
12056 }, {
12057 .eraseblocks = { {64 * 1024, 256} },
12058 .block_erase = spi_block_erase_d8,
12059 }, {
12060 .eraseblocks = { {16384 * 1024, 1} },
12061 .block_erase = spi_block_erase_c7,
12062 }
12063 },
12064 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12065 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12066 .write = spi_chip_write_256, /* Multi I/O supported */
12067 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12068 .voltage = {1700, 2000},
12069 },
12070
12071 {
12072 .vendor = "Micron/Numonyx/ST",
12073 .name = "N25Q128..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12074 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012075 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012076 .model_id = ST_N25Q128__3E,
12077 .total_size = 16384,
12078 .page_size = 256,
12079 /* supports SFDP */
12080 /* OTP: 64B total; read 0x4B, write 0x42 */
12081 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12082 .tested = TEST_OK_PREW,
12083 .probe = probe_spi_rdid,
12084 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012085 .block_erasers =
12086 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012087 {
12088 .eraseblocks = { {4 * 1024, 4096 } },
12089 .block_erase = spi_block_erase_20,
12090 }, {
12091 .eraseblocks = { {64 * 1024, 256} },
12092 .block_erase = spi_block_erase_d8,
12093 }, {
12094 .eraseblocks = { {16384 * 1024, 1} },
12095 .block_erase = spi_block_erase_c7,
12096 }
12097 },
12098 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12099 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12100 .write = spi_chip_write_256, /* Multi I/O supported */
12101 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12102 .voltage = {2700, 3600},
12103 },
12104
12105 {
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012106 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012107 .name = "N25Q256..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
12108 .bustype = BUS_SPI,
12109 .manufacture_id = ST_ID,
12110 .model_id = ST_N25Q256__1E,
12111 .total_size = 32768,
12112 .page_size = 256,
12113 /* supports SFDP */
12114 /* OTP: 64B total; read 0x4B, write 0x42 */
12115 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12116 .tested = TEST_UNTESTED,
12117 .probe = probe_spi_rdid,
12118 .probe_timing = TIMING_ZERO,
12119 .block_erasers =
12120 {
12121 {
12122 .eraseblocks = { {4 * 1024, 8192} },
12123 .block_erase = spi_block_erase_21,
12124 }, {
12125 .eraseblocks = { {4 * 1024, 8192} },
12126 .block_erase = spi_block_erase_20,
12127 }, {
12128 .eraseblocks = { {64 * 1024, 512} },
12129 .block_erase = spi_block_erase_dc,
12130 }, {
12131 .eraseblocks = { {64 * 1024, 512} },
12132 .block_erase = spi_block_erase_d8,
12133 }, {
12134 .eraseblocks = { {32768 * 1024, 1} },
12135 .block_erase = spi_block_erase_c7,
12136 }
12137 },
12138 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12139 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12140 .write = spi_chip_write_256, /* Multi I/O supported */
12141 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12142 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012143 .prepare_access = spi_prepare_io,
12144 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012145 },
12146
12147 {
12148 .vendor = "Micron/Numonyx/ST",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012149 .name = "N25Q256..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12150 .bustype = BUS_SPI,
12151 .manufacture_id = ST_ID,
12152 .model_id = ST_N25Q256__3E,
12153 .total_size = 32768,
12154 .page_size = 256,
12155 /* supports SFDP */
12156 /* OTP: 64B total; read 0x4B, write 0x42 */
12157 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12158 .tested = TEST_UNTESTED,
12159 .probe = probe_spi_rdid,
12160 .probe_timing = TIMING_ZERO,
12161 .block_erasers =
12162 {
12163 {
12164 .eraseblocks = { {4 * 1024, 8192} },
12165 .block_erase = spi_block_erase_21,
12166 }, {
12167 .eraseblocks = { {4 * 1024, 8192} },
12168 .block_erase = spi_block_erase_20,
12169 }, {
12170 .eraseblocks = { {64 * 1024, 512} },
12171 .block_erase = spi_block_erase_dc,
12172 }, {
12173 .eraseblocks = { {64 * 1024, 512} },
12174 .block_erase = spi_block_erase_d8,
12175 }, {
12176 .eraseblocks = { {32768 * 1024, 1} },
12177 .block_erase = spi_block_erase_c7,
12178 }
12179 },
12180 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12181 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12182 .write = spi_chip_write_256, /* Multi I/O supported */
12183 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12184 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012185 .prepare_access = spi_prepare_io,
12186 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012187 },
12188
12189 {
12190 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012191 .name = "N25Q512..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012192 .bustype = BUS_SPI,
12193 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012194 .model_id = ST_N25Q512__1G,
12195 .total_size = 65536,
12196 .page_size = 256,
12197 /* supports SFDP */
12198 /* OTP: 64B total; read 0x4B, write 0x42 */
12199 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12200 .tested = TEST_UNTESTED,
12201 .probe = probe_spi_rdid,
12202 .probe_timing = TIMING_ZERO,
12203 .block_erasers =
12204 {
12205 {
12206 .eraseblocks = { {4 * 1024, 16384} },
12207 .block_erase = spi_block_erase_21,
12208 }, {
12209 .eraseblocks = { {4 * 1024, 16384} },
12210 .block_erase = spi_block_erase_20,
12211 }, {
12212 .eraseblocks = { {64 * 1024, 1024} },
12213 .block_erase = spi_block_erase_dc,
12214 }, {
12215 .eraseblocks = { {64 * 1024, 1024} },
12216 .block_erase = spi_block_erase_d8,
12217 }, {
12218 .eraseblocks = { {32768 * 1024, 2} },
12219 .block_erase = spi_block_erase_c4,
12220 }
12221 },
12222 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12223 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12224 .write = spi_chip_write_256, /* Multi I/O supported */
12225 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12226 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012227 .prepare_access = spi_prepare_io,
12228 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012229 },
12230
12231 {
12232 .vendor = "Micron/Numonyx/ST",
12233 .name = "N25Q512..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
12234 .bustype = BUS_SPI,
12235 .manufacture_id = ST_ID,
12236 .model_id = ST_N25Q512__3G,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012237 .total_size = 65536,
12238 .page_size = 256,
12239 /* supports SFDP */
12240 /* OTP: 64B total; read 0x4B, write 0x42 */
12241 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12242 .tested = TEST_OK_PREW,
12243 .probe = probe_spi_rdid,
12244 .probe_timing = TIMING_ZERO,
12245 .block_erasers =
12246 {
12247 {
12248 .eraseblocks = { {4 * 1024, 16384} },
12249 .block_erase = spi_block_erase_21,
12250 }, {
12251 .eraseblocks = { {4 * 1024, 16384} },
12252 .block_erase = spi_block_erase_20,
12253 }, {
12254 .eraseblocks = { {64 * 1024, 1024} },
12255 .block_erase = spi_block_erase_dc,
12256 }, {
12257 .eraseblocks = { {64 * 1024, 1024} },
12258 .block_erase = spi_block_erase_d8,
12259 }, {
Jacob Creedone8e7b0e2019-07-22 12:21:22 -070012260 .eraseblocks = { {32768 * 1024, 2} },
12261 .block_erase = spi_block_erase_c4,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012262 }
12263 },
12264 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12265 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12266 .write = spi_chip_write_256, /* Multi I/O supported */
12267 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12268 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012269 .prepare_access = spi_prepare_io,
12270 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012271 },
12272
12273 {
Ed Swierk199ab392017-07-03 13:33:44 -070012274 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012275 .name = "MT25QL01G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12276 .bustype = BUS_SPI,
12277 .manufacture_id = ST_ID,
12278 .model_id = ST_N25Q00A__3G,
12279 .total_size = 131072,
12280 .page_size = 256,
12281 /* supports SFDP */
12282 /* OTP: 64B total; read 0x4B, write 0x42 */
12283 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12284 .tested = TEST_OK_PREW,
12285 .probe = probe_spi_rdid,
12286 .probe_timing = TIMING_ZERO,
12287 .block_erasers =
12288 {
12289 {
12290 .eraseblocks = { {4 * 1024, 32768} },
12291 .block_erase = spi_block_erase_21,
12292 }, {
12293 .eraseblocks = { {4 * 1024, 32768} },
12294 .block_erase = spi_block_erase_20,
12295 }, {
12296 .eraseblocks = { {32 * 1024, 4096} },
12297 .block_erase = spi_block_erase_5c,
12298 }, {
12299 .eraseblocks = { {32 * 1024, 4096} },
12300 .block_erase = spi_block_erase_52,
12301 }, {
12302 .eraseblocks = { {64 * 1024, 2048} },
12303 .block_erase = spi_block_erase_dc,
12304 }, {
12305 .eraseblocks = { {64 * 1024, 2048} },
12306 .block_erase = spi_block_erase_d8,
12307 }, {
12308 .eraseblocks = { {65536 * 1024, 2} },
12309 .block_erase = spi_block_erase_c4,
12310 }
12311 },
12312 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12313 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12314 .write = spi_chip_write_256, /* Multi I/O supported */
12315 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12316 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012317 .prepare_access = spi_prepare_io,
12318 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012319 },
12320
12321 {
12322 .vendor = "Micron",
12323 .name = "MT25QU01G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12324 .bustype = BUS_SPI,
12325 .manufacture_id = ST_ID,
12326 .model_id = ST_N25Q00A__1G,
12327 .total_size = 131072,
12328 .page_size = 256,
12329 /* supports SFDP */
12330 /* OTP: 64B total; read 0x4B, write 0x42 */
12331 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12332 .tested = TEST_UNTESTED,
12333 .probe = probe_spi_rdid,
12334 .probe_timing = TIMING_ZERO,
12335 .block_erasers =
12336 {
12337 {
12338 .eraseblocks = { {4 * 1024, 32768} },
12339 .block_erase = spi_block_erase_21,
12340 }, {
12341 .eraseblocks = { {4 * 1024, 32768} },
12342 .block_erase = spi_block_erase_20,
12343 }, {
12344 .eraseblocks = { {32 * 1024, 4096} },
12345 .block_erase = spi_block_erase_5c,
12346 }, {
12347 .eraseblocks = { {32 * 1024, 4096} },
12348 .block_erase = spi_block_erase_52,
12349 }, {
12350 .eraseblocks = { {64 * 1024, 2048} },
12351 .block_erase = spi_block_erase_dc,
12352 }, {
12353 .eraseblocks = { {64 * 1024, 2048} },
12354 .block_erase = spi_block_erase_d8,
12355 }, {
12356 .eraseblocks = { {65536 * 1024, 2} },
12357 .block_erase = spi_block_erase_c4,
12358 }
12359 },
12360 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12361 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12362 .write = spi_chip_write_256, /* Multi I/O supported */
12363 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12364 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012365 .prepare_access = spi_prepare_io,
12366 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012367 },
12368
12369 {
12370 .vendor = "Micron",
12371 .name = "MT25QL02G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12372 .bustype = BUS_SPI,
12373 .manufacture_id = ST_ID,
12374 .model_id = ST_MT25QL02G,
12375 .total_size = 262144,
12376 .page_size = 256,
12377 /* supports SFDP */
12378 /* OTP: 64B total; read 0x4B, write 0x42 */
12379 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12380 .tested = TEST_UNTESTED,
12381 .probe = probe_spi_rdid,
12382 .probe_timing = TIMING_ZERO,
12383 .block_erasers =
12384 {
12385 {
12386 .eraseblocks = { {4 * 1024, 65536} },
12387 .block_erase = spi_block_erase_21,
12388 }, {
12389 .eraseblocks = { {4 * 1024, 65536} },
12390 .block_erase = spi_block_erase_20,
12391 }, {
12392 .eraseblocks = { {32 * 1024, 8192} },
12393 .block_erase = spi_block_erase_5c,
12394 }, {
12395 .eraseblocks = { {32 * 1024, 8192} },
12396 .block_erase = spi_block_erase_52,
12397 }, {
12398 .eraseblocks = { {64 * 1024, 4096} },
12399 .block_erase = spi_block_erase_dc,
12400 }, {
12401 .eraseblocks = { {64 * 1024, 4096} },
12402 .block_erase = spi_block_erase_d8,
12403 }, {
12404 .eraseblocks = { {65536 * 1024, 4} },
12405 .block_erase = spi_block_erase_c4,
12406 }
12407 },
12408 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12409 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12410 .write = spi_chip_write_256, /* Multi I/O supported */
12411 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12412 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012413 .prepare_access = spi_prepare_io,
12414 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012415 },
12416
12417 {
12418 .vendor = "Micron",
12419 .name = "MT25QU02G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12420 .bustype = BUS_SPI,
12421 .manufacture_id = ST_ID,
12422 .model_id = ST_MT25QU02G,
12423 .total_size = 262144,
12424 .page_size = 256,
12425 /* supports SFDP */
12426 /* OTP: 64B total; read 0x4B, write 0x42 */
12427 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12428 .tested = TEST_UNTESTED,
12429 .probe = probe_spi_rdid,
12430 .probe_timing = TIMING_ZERO,
12431 .block_erasers =
12432 {
12433 {
12434 .eraseblocks = { {4 * 1024, 65536} },
12435 .block_erase = spi_block_erase_21,
12436 }, {
12437 .eraseblocks = { {4 * 1024, 65536} },
12438 .block_erase = spi_block_erase_20,
12439 }, {
12440 .eraseblocks = { {32 * 1024, 8192} },
12441 .block_erase = spi_block_erase_5c,
12442 }, {
12443 .eraseblocks = { {32 * 1024, 8192} },
12444 .block_erase = spi_block_erase_52,
12445 }, {
12446 .eraseblocks = { {64 * 1024, 4096} },
12447 .block_erase = spi_block_erase_dc,
12448 }, {
12449 .eraseblocks = { {64 * 1024, 4096} },
12450 .block_erase = spi_block_erase_d8,
12451 }, {
12452 .eraseblocks = { {65536 * 1024, 4} },
12453 .block_erase = spi_block_erase_c4,
12454 }
12455 },
12456 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12457 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12458 .write = spi_chip_write_256, /* Multi I/O supported */
12459 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12460 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012461 .prepare_access = spi_prepare_io,
12462 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012463 },
12464
12465 {
12466 .vendor = "Micron",
12467 .name = "MT25QU128", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12468 .bustype = BUS_SPI,
12469 .manufacture_id = ST_ID,
12470 .model_id = ST_N25Q128__1E,
12471 .total_size = 16384,
12472 .page_size = 256,
12473 /* supports SFDP */
12474 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huber48dc0902023-03-05 17:20:55 +010012475 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012476 .tested = TEST_UNTESTED,
12477 .probe = probe_spi_rdid,
12478 .probe_timing = TIMING_ZERO,
12479 .block_erasers =
12480 {
12481 {
12482 .eraseblocks = { {4 * 1024, 4096} },
12483 .block_erase = spi_block_erase_20,
12484 }, {
12485 .eraseblocks = { {32 * 1024, 512} },
12486 .block_erase = spi_block_erase_52,
12487 }, {
12488 .eraseblocks = { {64 * 1024, 256} },
12489 .block_erase = spi_block_erase_d8,
12490 }, {
12491 .eraseblocks = { {16384 * 1024, 1} },
12492 .block_erase = spi_block_erase_c7,
12493 }, {
12494 .eraseblocks = { {16384 * 1024, 1} },
12495 .block_erase = spi_block_erase_60,
12496 }
12497 },
12498 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12499 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12500 .write = spi_chip_write_256, /* Multi I/O supported */
12501 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12502 .voltage = {1700, 2000},
12503 },
12504
12505 {
12506 .vendor = "Micron",
12507 .name = "MT25QL128", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12508 .bustype = BUS_SPI,
12509 .manufacture_id = ST_ID,
12510 .model_id = ST_N25Q128__3E,
12511 .total_size = 16384,
12512 .page_size = 256,
12513 /* supports SFDP */
12514 /* OTP: 64B total; read 0x4B, write 0x42 */
Rick Altherr1e563602022-12-22 10:25:34 -080012515 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12516 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012517 .probe = probe_spi_rdid,
12518 .probe_timing = TIMING_ZERO,
12519 .block_erasers =
12520 {
12521 {
12522 .eraseblocks = { {4 * 1024, 4096} },
12523 .block_erase = spi_block_erase_20,
12524 }, {
12525 .eraseblocks = { {32 * 1024, 512} },
12526 .block_erase = spi_block_erase_52,
12527 }, {
12528 .eraseblocks = { {64 * 1024, 256} },
12529 .block_erase = spi_block_erase_d8,
12530 }, {
12531 .eraseblocks = { {16384 * 1024, 1} },
12532 .block_erase = spi_block_erase_c7,
12533 }, {
12534 .eraseblocks = { {16384 * 1024, 1} },
12535 .block_erase = spi_block_erase_60,
12536 }
12537 },
12538 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12539 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12540 .write = spi_chip_write_256, /* Multi I/O supported */
12541 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12542 .voltage = {2700, 3600},
12543 },
12544
12545 {
12546 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012547 .name = "MT25QL256", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070012548 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012549 .manufacture_id = ST_ID,
Ed Swierk199ab392017-07-03 13:33:44 -070012550 .model_id = ST_N25Q256__3E,
12551 .total_size = 32768,
12552 .page_size = 256,
12553 /* supports SFDP */
12554 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010012555 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Simon Buhrowb7014f92021-02-15 13:16:57 +010012556 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070012557 .probe = probe_spi_rdid,
12558 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012559 .block_erasers =
12560 {
Ed Swierk199ab392017-07-03 13:33:44 -070012561 {
12562 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012563 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070012564 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012565 .eraseblocks = { {4 * 1024, 8192} },
12566 .block_erase = spi_block_erase_20,
12567 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070012568 .eraseblocks = { {32 * 1024, 1024} },
12569 .block_erase = spi_block_erase_5c,
12570 }, {
12571 .eraseblocks = { {32 * 1024, 1024} },
12572 .block_erase = spi_block_erase_52,
12573 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012574 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012575 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070012576 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012577 .eraseblocks = { {64 * 1024, 512} },
12578 .block_erase = spi_block_erase_d8,
12579 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012580 .eraseblocks = { {32768 * 1024, 1} },
12581 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070012582 }, {
12583 .eraseblocks = { {32768 * 1024, 1} },
12584 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070012585 }
12586 },
12587 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12588 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12589 .write = spi_chip_write_256, /* Multi I/O supported */
12590 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12591 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012592 .prepare_access = spi_prepare_io,
12593 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070012594 },
12595
12596 {
12597 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012598 .name = "MT25QU256", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12599 .bustype = BUS_SPI,
12600 .manufacture_id = ST_ID,
12601 .model_id = ST_N25Q256__1E,
12602 .total_size = 32768,
12603 .page_size = 256,
12604 /* supports SFDP */
12605 /* OTP: 64B total; read 0x4B, write 0x42 */
12606 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons59052582022-03-08 15:23:58 +010012607 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012608 .probe = probe_spi_rdid,
12609 .probe_timing = TIMING_ZERO,
12610 .block_erasers =
12611 {
12612 {
12613 .eraseblocks = { {4 * 1024, 8192} },
12614 .block_erase = spi_block_erase_21,
12615 }, {
12616 .eraseblocks = { {4 * 1024, 8192} },
12617 .block_erase = spi_block_erase_20,
12618 }, {
12619 .eraseblocks = { {32 * 1024, 1024} },
12620 .block_erase = spi_block_erase_5c,
12621 }, {
12622 .eraseblocks = { {32 * 1024, 1024} },
12623 .block_erase = spi_block_erase_52,
12624 }, {
12625 .eraseblocks = { {64 * 1024, 512} },
12626 .block_erase = spi_block_erase_dc,
12627 }, {
12628 .eraseblocks = { {64 * 1024, 512} },
12629 .block_erase = spi_block_erase_d8,
12630 }, {
12631 .eraseblocks = { {32768 * 1024, 1} },
12632 .block_erase = spi_block_erase_c7,
12633 }, {
12634 .eraseblocks = { {32768 * 1024, 1} },
12635 .block_erase = spi_block_erase_60,
12636 }
12637 },
12638 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12639 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12640 .write = spi_chip_write_256, /* Multi I/O supported */
12641 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12642 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012643 .prepare_access = spi_prepare_io,
12644 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012645 },
12646
12647 {
12648 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012649 .name = "MT25QL512", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070012650 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012651 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012652 .model_id = ST_N25Q512__3G,
Ed Swierk199ab392017-07-03 13:33:44 -070012653 .total_size = 65536,
12654 .page_size = 256,
12655 /* supports SFDP */
12656 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010012657 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons3ed5a352018-09-30 16:31:09 +020012658 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070012659 .probe = probe_spi_rdid,
12660 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012661 .block_erasers =
12662 {
Ed Swierk199ab392017-07-03 13:33:44 -070012663 {
12664 .eraseblocks = { {4 * 1024, 16384} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012665 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070012666 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012667 .eraseblocks = { {4 * 1024, 16384} },
12668 .block_erase = spi_block_erase_20,
12669 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070012670 .eraseblocks = { {32 * 1024, 2048} },
12671 .block_erase = spi_block_erase_5c,
12672 }, {
12673 .eraseblocks = { {32 * 1024, 2048} },
12674 .block_erase = spi_block_erase_52,
12675 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012676 .eraseblocks = { {64 * 1024, 1024} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012677 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070012678 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012679 .eraseblocks = { {64 * 1024, 1024} },
12680 .block_erase = spi_block_erase_d8,
12681 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012682 .eraseblocks = { {65536 * 1024, 1} },
12683 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070012684 }, {
12685 .eraseblocks = { {65536 * 1024, 1} },
12686 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070012687 }
12688 },
12689 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12690 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12691 .write = spi_chip_write_256, /* Multi I/O supported */
12692 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12693 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012694 .reg_bits =
12695 {
12696 .srp = {STATUS1, 7, RW},
12697 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12698 .tb = {STATUS1, 5, RW},
12699 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012700 .wp_write_cfg = spi_wp_write_cfg,
12701 .wp_read_cfg = spi_wp_read_cfg,
12702 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012703 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020012704 .prepare_access = spi_prepare_io,
12705 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070012706 },
12707
12708 {
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012709 .vendor = "Micron",
12710 .name = "MT25QU512", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12711 .bustype = BUS_SPI,
12712 .manufacture_id = ST_ID,
12713 .model_id = ST_N25Q512__1G,
12714 .total_size = 65536,
12715 .page_size = 256,
12716 /* supports SFDP */
12717 /* OTP: 64B total; read 0x4B, write 0x42 */
12718 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12719 .tested = TEST_OK_PREW,
12720 .probe = probe_spi_rdid,
12721 .probe_timing = TIMING_ZERO,
12722 .block_erasers =
12723 {
12724 {
12725 .eraseblocks = { {4 * 1024, 16384} },
12726 .block_erase = spi_block_erase_21,
12727 }, {
12728 .eraseblocks = { {4 * 1024, 16384} },
12729 .block_erase = spi_block_erase_20,
12730 }, {
12731 .eraseblocks = { {32 * 1024, 2048} },
12732 .block_erase = spi_block_erase_5c,
12733 }, {
12734 .eraseblocks = { {32 * 1024, 2048} },
12735 .block_erase = spi_block_erase_52,
12736 }, {
12737 .eraseblocks = { {64 * 1024, 1024} },
12738 .block_erase = spi_block_erase_dc,
12739 }, {
12740 .eraseblocks = { {64 * 1024, 1024} },
12741 .block_erase = spi_block_erase_d8,
12742 }, {
12743 .eraseblocks = { {65536 * 1024, 1} },
12744 .block_erase = spi_block_erase_c7,
12745 }, {
12746 .eraseblocks = { {65536 * 1024, 1} },
12747 .block_erase = spi_block_erase_60,
12748 }
12749 },
12750 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12751 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12752 .write = spi_chip_write_256, /* Multi I/O supported */
12753 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12754 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012755 .prepare_access = spi_prepare_io,
12756 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012757 },
12758
12759 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000012760 .vendor = "MoselVitelic",
12761 .name = "V29C51000B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012762 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012763 .manufacture_id = SYNCMOS_MVC_ID,
12764 .model_id = MVC_V29C51000B,
12765 .total_size = 64,
12766 .page_size = 512,
12767 .feature_bits = FEATURE_EITHER_RESET,
12768 .tested = TEST_UNTESTED,
12769 .probe = probe_jedec,
12770 .probe_timing = TIMING_ZERO,
12771 .block_erasers =
12772 {
12773 {
12774 .eraseblocks = { {512, 128} },
12775 .block_erase = erase_sector_jedec,
12776 }, {
12777 .eraseblocks = { {64 * 1024, 1} },
12778 .block_erase = erase_chip_block_jedec,
12779 },
12780 },
12781 .write = write_jedec_1,
12782 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012783 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012784 .prepare_access = prepare_memory_access,
12785 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012786 },
12787
12788 {
12789 .vendor = "MoselVitelic",
12790 .name = "V29C51000T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012791 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012792 .manufacture_id = SYNCMOS_MVC_ID,
12793 .model_id = MVC_V29C51000T,
12794 .total_size = 64,
12795 .page_size = 512,
12796 .feature_bits = FEATURE_EITHER_RESET,
12797 .tested = TEST_UNTESTED,
12798 .probe = probe_jedec,
12799 .probe_timing = TIMING_ZERO,
12800 .block_erasers =
12801 {
12802 {
12803 .eraseblocks = { {512, 128} },
12804 .block_erase = erase_sector_jedec,
12805 }, {
12806 .eraseblocks = { {64 * 1024, 1} },
12807 .block_erase = erase_chip_block_jedec,
12808 },
12809 },
12810 .write = write_jedec_1,
12811 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012812 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012813 .prepare_access = prepare_memory_access,
12814 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012815 },
12816
12817 {
12818 .vendor = "MoselVitelic",
12819 .name = "V29C51400B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012820 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012821 .manufacture_id = SYNCMOS_MVC_ID,
12822 .model_id = MVC_V29C51400B,
12823 .total_size = 512,
12824 .page_size = 1024,
12825 .feature_bits = FEATURE_EITHER_RESET,
12826 .tested = TEST_UNTESTED,
12827 .probe = probe_jedec,
12828 .probe_timing = TIMING_ZERO,
12829 .block_erasers =
12830 {
12831 {
12832 .eraseblocks = { {1024, 512} },
12833 .block_erase = erase_sector_jedec,
12834 }, {
12835 .eraseblocks = { {512 * 1024, 1} },
12836 .block_erase = erase_chip_block_jedec,
12837 },
12838 },
12839 .write = write_jedec_1,
12840 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012841 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012842 .prepare_access = prepare_memory_access,
12843 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012844 },
12845
12846 {
12847 .vendor = "MoselVitelic",
12848 .name = "V29C51400T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012849 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012850 .manufacture_id = SYNCMOS_MVC_ID,
12851 .model_id = MVC_V29C51400T,
12852 .total_size = 512,
12853 .page_size = 1024,
12854 .feature_bits = FEATURE_EITHER_RESET,
12855 .tested = TEST_UNTESTED,
12856 .probe = probe_jedec,
12857 .probe_timing = TIMING_ZERO,
12858 .block_erasers =
12859 {
12860 {
12861 .eraseblocks = { {1024, 512} },
12862 .block_erase = erase_sector_jedec,
12863 }, {
12864 .eraseblocks = { {512 * 1024, 1} },
12865 .block_erase = erase_chip_block_jedec,
12866 },
12867 },
12868 .write = write_jedec_1,
12869 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012870 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012871 .prepare_access = prepare_memory_access,
12872 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012873 },
12874
12875 {
12876 .vendor = "MoselVitelic",
12877 .name = "V29LC51000",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012878 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012879 .manufacture_id = SYNCMOS_MVC_ID,
12880 .model_id = MVC_V29LC51000,
12881 .total_size = 64,
12882 .page_size = 512,
12883 .feature_bits = FEATURE_EITHER_RESET,
12884 .tested = TEST_UNTESTED,
12885 .probe = probe_jedec,
12886 .probe_timing = TIMING_ZERO,
12887 .block_erasers =
12888 {
12889 {
12890 .eraseblocks = { {512, 128} },
12891 .block_erase = erase_sector_jedec,
12892 }, {
12893 .eraseblocks = { {64 * 1024, 1} },
12894 .block_erase = erase_chip_block_jedec,
12895 },
12896 },
12897 .write = write_jedec_1,
12898 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012899 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012900 .prepare_access = prepare_memory_access,
12901 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012902 },
12903
12904 {
12905 .vendor = "MoselVitelic",
12906 .name = "V29LC51001",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012907 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012908 .manufacture_id = SYNCMOS_MVC_ID,
12909 .model_id = MVC_V29LC51001,
12910 .total_size = 128,
12911 .page_size = 512,
12912 .feature_bits = FEATURE_EITHER_RESET,
12913 .tested = TEST_UNTESTED,
12914 .probe = probe_jedec,
12915 .probe_timing = TIMING_ZERO,
12916 .block_erasers =
12917 {
12918 {
12919 .eraseblocks = { {512, 256} },
12920 .block_erase = erase_sector_jedec,
12921 }, {
12922 .eraseblocks = { {128 * 1024, 1} },
12923 .block_erase = erase_chip_block_jedec,
12924 },
12925 },
12926 .write = write_jedec_1,
12927 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012928 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012929 .prepare_access = prepare_memory_access,
12930 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012931 },
12932
12933 {
12934 .vendor = "MoselVitelic",
12935 .name = "V29LC51002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012936 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012937 .manufacture_id = SYNCMOS_MVC_ID,
12938 .model_id = MVC_V29LC51002,
12939 .total_size = 256,
12940 .page_size = 512,
12941 .feature_bits = FEATURE_EITHER_RESET,
12942 .tested = TEST_UNTESTED,
12943 .probe = probe_jedec,
12944 .probe_timing = TIMING_ZERO,
12945 .block_erasers =
12946 {
12947 {
12948 .eraseblocks = { {512, 512} },
12949 .block_erase = erase_sector_jedec,
12950 }, {
12951 .eraseblocks = { {256 * 1024, 1} },
12952 .block_erase = erase_chip_block_jedec,
12953 },
12954 },
12955 .write = write_jedec_1,
12956 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012957 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012958 .prepare_access = prepare_memory_access,
12959 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012960 },
12961
12962 {
Stefan Taunerb6b00e92013-06-28 21:28:43 +000012963 .vendor = "Nantronics",
12964 .name = "N25S10",
12965 .bustype = BUS_SPI,
12966 .manufacture_id = NANTRONICS_ID_NOPREFIX,
12967 .model_id = NANTRONICS_N25S10,
12968 .total_size = 128,
12969 .page_size = 256,
12970 .feature_bits = FEATURE_WRSR_WREN,
12971 .tested = TEST_UNTESTED,
12972 .probe = probe_spi_rdid,
12973 .probe_timing = TIMING_ZERO,
12974 .block_erasers =
12975 {
12976 {
12977 .eraseblocks = { {4 * 1024, 32} },
12978 .block_erase = spi_block_erase_20,
12979 }, {
12980 .eraseblocks = { {4 * 1024, 32} },
12981 .block_erase = spi_block_erase_d7,
12982 }, {
12983 .eraseblocks = { {32 * 1024, 4} },
12984 .block_erase = spi_block_erase_52,
12985 }, {
12986 .eraseblocks = { {64 * 1024, 2} },
12987 .block_erase = spi_block_erase_d8,
12988 }, {
12989 .eraseblocks = { {128 * 1024, 1} },
12990 .block_erase = spi_block_erase_60,
12991 }, {
12992 .eraseblocks = { {128 * 1024, 1} },
12993 .block_erase = spi_block_erase_c7,
12994 }
12995 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000012996 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000012997 .unlock = spi_disable_blockprotect_bp3_srwd,
12998 .write = spi_chip_write_256,
12999 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13000 .voltage = {2700, 3600},
13001 },
13002
13003 {
13004 .vendor = "Nantronics",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013005 .name = "N25S16",
13006 .bustype = BUS_SPI,
13007 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13008 .model_id = NANTRONICS_N25S16,
13009 .total_size = 2048,
13010 .page_size = 256,
13011 .feature_bits = FEATURE_WRSR_WREN,
13012 .tested = TEST_UNTESTED,
13013 .probe = probe_spi_rdid,
13014 .probe_timing = TIMING_ZERO,
13015 .block_erasers =
13016 {
13017 {
13018 .eraseblocks = { {4 * 1024, 512} },
13019 .block_erase = spi_block_erase_20,
13020 }, {
13021 .eraseblocks = { {64 * 1024, 32} },
13022 .block_erase = spi_block_erase_d8,
13023 }, {
13024 .eraseblocks = { {2048 * 1024, 1} },
13025 .block_erase = spi_block_erase_60,
13026 }, {
13027 .eraseblocks = { {2048 * 1024, 1} },
13028 .block_erase = spi_block_erase_c7,
13029 }
13030 },
13031 .printlock = spi_prettyprint_status_register_bp3_srwd,
13032 .unlock = spi_disable_blockprotect_bp3_srwd,
13033 .write = spi_chip_write_256,
13034 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13035 .voltage = {2700, 3600},
13036 },
13037
13038 {
13039 .vendor = "Nantronics",
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013040 .name = "N25S20",
13041 .bustype = BUS_SPI,
13042 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13043 .model_id = NANTRONICS_N25S20,
13044 .total_size = 256,
13045 .page_size = 256,
13046 .feature_bits = FEATURE_WRSR_WREN,
13047 .tested = TEST_UNTESTED,
13048 .probe = probe_spi_rdid,
13049 .probe_timing = TIMING_ZERO,
13050 .block_erasers =
13051 {
13052 {
13053 .eraseblocks = { {4 * 1024, 64} },
13054 .block_erase = spi_block_erase_20,
13055 }, {
13056 .eraseblocks = { {4 * 1024, 64} },
13057 .block_erase = spi_block_erase_d7,
13058 }, {
13059 .eraseblocks = { {32 * 1024, 8} },
13060 .block_erase = spi_block_erase_52,
13061 }, {
13062 .eraseblocks = { {64 * 1024, 4} },
13063 .block_erase = spi_block_erase_d8,
13064 }, {
13065 .eraseblocks = { {256 * 1024, 1} },
13066 .block_erase = spi_block_erase_60,
13067 }, {
13068 .eraseblocks = { {256 * 1024, 1} },
13069 .block_erase = spi_block_erase_c7,
13070 }
13071 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013072 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013073 .unlock = spi_disable_blockprotect_bp3_srwd,
13074 .write = spi_chip_write_256,
13075 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13076 .voltage = {2700, 3600},
13077 },
13078
13079 {
13080 .vendor = "Nantronics",
13081 .name = "N25S40",
13082 .bustype = BUS_SPI,
13083 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13084 .model_id = NANTRONICS_N25S40,
13085 .total_size = 512,
13086 .page_size = 256,
13087 .feature_bits = FEATURE_WRSR_WREN,
13088 .tested = TEST_UNTESTED,
13089 .probe = probe_spi_rdid,
13090 .probe_timing = TIMING_ZERO,
13091 .block_erasers =
13092 {
13093 {
13094 .eraseblocks = { {4 * 1024, 128} },
13095 .block_erase = spi_block_erase_20,
13096 }, {
13097 .eraseblocks = { {4 * 1024, 128} },
13098 .block_erase = spi_block_erase_d7,
13099 }, {
13100 .eraseblocks = { {32 * 1024, 16} },
13101 .block_erase = spi_block_erase_52,
13102 }, {
13103 .eraseblocks = { {64 * 1024, 8} },
13104 .block_erase = spi_block_erase_d8,
13105 }, {
13106 .eraseblocks = { {512 * 1024, 1} },
13107 .block_erase = spi_block_erase_60,
13108 }, {
13109 .eraseblocks = { {512 * 1024, 1} },
13110 .block_erase = spi_block_erase_c7,
13111 }
13112 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013113 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013114 .unlock = spi_disable_blockprotect_bp3_srwd,
13115 .write = spi_chip_write_256,
13116 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13117 .voltage = {2700, 3600},
13118 },
13119
13120 {
13121 .vendor = "Nantronics",
13122 .name = "N25S80",
13123 .bustype = BUS_SPI,
13124 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13125 .model_id = NANTRONICS_N25S80,
13126 .total_size = 1024,
13127 .page_size = 256,
13128 .feature_bits = FEATURE_WRSR_WREN,
13129 .tested = TEST_UNTESTED,
13130 .probe = probe_spi_rdid,
13131 .probe_timing = TIMING_ZERO,
13132 .block_erasers =
13133 {
13134 {
13135 .eraseblocks = { {4 * 1024, 256} },
13136 .block_erase = spi_block_erase_20,
13137 }, {
13138 .eraseblocks = { {32 * 1024, 32} },
13139 .block_erase = spi_block_erase_52,
13140 }, {
13141 .eraseblocks = { {64 * 1024, 16} },
13142 .block_erase = spi_block_erase_d8,
13143 }, {
13144 .eraseblocks = { {1024 * 1024, 1} },
13145 .block_erase = spi_block_erase_60,
13146 }, {
13147 .eraseblocks = { {1024 * 1024, 1} },
13148 .block_erase = spi_block_erase_c7,
13149 }
13150 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013151 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013152 .unlock = spi_disable_blockprotect_bp3_srwd,
13153 .write = spi_chip_write_256,
13154 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13155 .voltage = {2700, 3600},
13156 },
13157
13158 {
Stefan Taunerf4451612013-04-19 01:59:15 +000013159 .vendor = "PMC",
13160 .name = "Pm25LD010(C)",
13161 .bustype = BUS_SPI,
13162 .manufacture_id = PMC_ID,
13163 .model_id = PMC_PM25LD010,
13164 .total_size = 128,
13165 .page_size = 256,
13166 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000013167 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013168 .probe = probe_spi_rdid,
13169 .probe_timing = TIMING_ZERO,
13170 .block_erasers =
13171 {
13172 {
13173 .eraseblocks = { {4 * 1024, 32} },
13174 .block_erase = spi_block_erase_20,
13175 }, {
13176 .eraseblocks = { {4 * 1024, 32} },
13177 .block_erase = spi_block_erase_d7,
13178 }, {
13179 .eraseblocks = { {32 * 1024, 4} },
13180 .block_erase = spi_block_erase_d8,
13181 }, {
13182 .eraseblocks = { {128 * 1024, 1} },
13183 .block_erase = spi_block_erase_60,
13184 }, {
13185 .eraseblocks = { {128 * 1024, 1} },
13186 .block_erase = spi_block_erase_c7,
13187 }
13188 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013189 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013190 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13191 .write = spi_chip_write_256,
13192 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13193 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD010 */
13194 },
13195
13196 {
13197 .vendor = "PMC",
13198 .name = "Pm25LD020(C)",
13199 .bustype = BUS_SPI,
13200 .manufacture_id = PMC_ID,
13201 .model_id = PMC_PM25LD020,
13202 .total_size = 256,
13203 .page_size = 256,
13204 .feature_bits = FEATURE_WRSR_WREN,
Angel Ponsf5822a82018-09-30 20:09:58 +020013205 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013206 .probe = probe_spi_rdid,
13207 .probe_timing = TIMING_ZERO,
13208 .block_erasers =
13209 {
13210 {
13211 .eraseblocks = { {4 * 1024, 64} },
13212 .block_erase = spi_block_erase_20,
13213 }, {
13214 .eraseblocks = { {4 * 1024, 64} },
13215 .block_erase = spi_block_erase_d7,
13216 }, {
13217 .eraseblocks = { {64 * 1024, 4} },
13218 .block_erase = spi_block_erase_d8,
13219 }, {
13220 .eraseblocks = { {256 * 1024, 1} },
13221 .block_erase = spi_block_erase_60,
13222 }, {
13223 .eraseblocks = { {256 * 1024, 1} },
13224 .block_erase = spi_block_erase_c7,
13225 }
13226 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013227 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013228 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13229 .write = spi_chip_write_256,
13230 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13231 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD020 */
13232 },
13233
13234 {
13235 .vendor = "PMC",
13236 .name = "Pm25LD040(C)",
13237 .bustype = BUS_SPI,
13238 .manufacture_id = PMC_ID,
13239 .model_id = PMC_PM25LV040,
13240 .total_size = 512,
13241 .page_size = 256,
13242 .feature_bits = FEATURE_WRSR_WREN,
Angel Pons05127bf2018-09-30 20:23:24 +020013243 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013244 .probe = probe_spi_rdid,
13245 .probe_timing = TIMING_ZERO,
13246 .block_erasers =
13247 {
13248 {
13249 .eraseblocks = { {4 * 1024, 128} },
13250 .block_erase = spi_block_erase_20,
13251 }, {
13252 .eraseblocks = { {4 * 1024, 128} },
13253 .block_erase = spi_block_erase_d7,
13254 }, {
13255 .eraseblocks = { {64 * 1024, 8} },
13256 .block_erase = spi_block_erase_d8,
13257 }, {
13258 .eraseblocks = { {512 * 1024, 1} },
13259 .block_erase = spi_block_erase_60,
13260 }, {
13261 .eraseblocks = { {512 * 1024, 1} },
13262 .block_erase = spi_block_erase_c7,
13263 }
13264 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013265 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013266 .unlock = spi_disable_blockprotect,
13267 .write = spi_chip_write_256,
13268 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13269 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD040 */
13270 },
13271
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013272 {
13273 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013274 .name = "Pm25LD256C",
13275 .bustype = BUS_SPI,
13276 .manufacture_id = PMC_ID,
13277 .model_id = PMC_PM25LD256C,
13278 .total_size = 32,
13279 .page_size = 256,
13280 .feature_bits = FEATURE_WRSR_WREN,
13281 .tested = TEST_UNTESTED,
13282 .probe = probe_spi_rdid,
13283 .probe_timing = TIMING_ZERO,
13284 .block_erasers =
13285 {
13286 {
13287 .eraseblocks = { {4 * 1024, 8} },
13288 .block_erase = spi_block_erase_20,
13289 }, {
13290 .eraseblocks = { {4 * 1024, 8} },
13291 .block_erase = spi_block_erase_d7,
13292 }, {
13293 .eraseblocks = { {32 * 1024, 1} },
13294 .block_erase = spi_block_erase_d8,
13295 }, {
13296 .eraseblocks = { {32 * 1024, 1} },
13297 .block_erase = spi_block_erase_60,
13298 }, {
13299 .eraseblocks = { {32 * 1024, 1} },
13300 .block_erase = spi_block_erase_c7,
13301 }
13302 },
13303 .printlock = spi_prettyprint_status_register_bp2_srwd,
13304 .unlock = spi_disable_blockprotect,
13305 .write = spi_chip_write_256,
13306 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13307 .voltage = {2700, 3600},
13308 },
13309
13310 {
13311 .vendor = "PMC",
13312 .name = "Pm25LD512(C)",
13313 .bustype = BUS_SPI,
13314 .manufacture_id = PMC_ID,
13315 .model_id = PMC_PM25LD512,
13316 .total_size = 64,
13317 .page_size = 256,
13318 .feature_bits = FEATURE_WRSR_WREN,
13319 .tested = TEST_OK_PREW,
13320 .probe = probe_spi_rdid,
13321 .probe_timing = TIMING_ZERO,
13322 .block_erasers =
13323 {
13324 {
13325 .eraseblocks = { {4 * 1024, 16} },
13326 .block_erase = spi_block_erase_20,
13327 }, {
13328 .eraseblocks = { {4 * 1024, 16} },
13329 .block_erase = spi_block_erase_d7,
13330 }, {
13331 .eraseblocks = { {32 * 1024, 2} },
13332 .block_erase = spi_block_erase_d8,
13333 }, {
13334 .eraseblocks = { {64 * 1024, 1} },
13335 .block_erase = spi_block_erase_60,
13336 }, {
13337 .eraseblocks = { {64 * 1024, 1} },
13338 .block_erase = spi_block_erase_c7,
13339 }
13340 },
13341 .printlock = spi_prettyprint_status_register_bp2_srwd,
13342 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13343 .write = spi_chip_write_256,
13344 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13345 .voltage = {2300, 3600},
13346 },
13347
13348 {
13349 .vendor = "PMC",
13350 .name = "Pm25LQ016",
13351 .bustype = BUS_SPI,
13352 .manufacture_id = PMC_ID,
13353 .model_id = PMC_PM25LQ016,
13354 .total_size = 2048,
13355 .page_size = 256,
13356 /* OTP: 256B total; read 0x4B, write 0xB1 */
13357 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13358 .tested = TEST_UNTESTED,
13359 .probe = probe_spi_rdid,
13360 .probe_timing = TIMING_ZERO,
13361 .block_erasers =
13362 {
13363 {
13364 .eraseblocks = { {4 * 1024, 512} },
13365 .block_erase = spi_block_erase_20,
13366 }, {
13367 .eraseblocks = { {4 * 1024, 512} },
13368 .block_erase = spi_block_erase_d7,
13369 }, {
13370 .eraseblocks = { {64 * 1024, 32} },
13371 .block_erase = spi_block_erase_d8,
13372 }, {
13373 .eraseblocks = { {2048 * 1024, 1} },
13374 .block_erase = spi_block_erase_60,
13375 }, {
13376 .eraseblocks = { {2048 * 1024, 1} },
13377 .block_erase = spi_block_erase_c7,
13378 }
13379 },
13380 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13381 .unlock = spi_disable_blockprotect_bp3_srwd,
13382 .write = spi_chip_write_256,
13383 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13384 .voltage = {2300, 3600},
13385 },
13386
13387 {
13388 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013389 .name = "Pm25LQ020",
13390 .bustype = BUS_SPI,
13391 .manufacture_id = PMC_ID,
13392 .model_id = PMC_PM25LQ020,
13393 .total_size = 256,
13394 .page_size = 256,
13395 /* OTP: 256B total; read 0x4B, write 0xB1 */
13396 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13397 .tested = TEST_UNTESTED,
13398 .probe = probe_spi_rdid,
13399 .probe_timing = TIMING_ZERO,
13400 .block_erasers =
13401 {
13402 {
13403 .eraseblocks = { {4 * 1024, 64} },
13404 .block_erase = spi_block_erase_20,
13405 }, {
13406 .eraseblocks = { {4 * 1024, 64} },
13407 .block_erase = spi_block_erase_d7,
13408 }, {
13409 .eraseblocks = { {64 * 1024, 4} },
13410 .block_erase = spi_block_erase_d8,
13411 }, {
13412 .eraseblocks = { {256 * 1024, 1} },
13413 .block_erase = spi_block_erase_60,
13414 }, {
13415 .eraseblocks = { {256 * 1024, 1} },
13416 .block_erase = spi_block_erase_c7,
13417 }
13418 },
13419 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13420 .unlock = spi_disable_blockprotect_bp3_srwd,
13421 .write = spi_chip_write_256,
13422 .read = spi_chip_read,
13423 .voltage = {2300, 3600},
13424 },
13425
13426 {
13427 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013428 .name = "Pm25LQ032C",
13429 .bustype = BUS_SPI,
13430 .manufacture_id = PMC_ID,
13431 .model_id = PMC_PM25LQ032C,
13432 .total_size = 4096,
13433 .page_size = 256,
13434 /* OTP: 64B total; read 0x4B, write 0xB1 */
13435 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13436 .tested = TEST_OK_PREW,
13437 .probe = probe_spi_rdid,
13438 .probe_timing = TIMING_ZERO,
13439 .block_erasers =
13440 {
13441 {
13442 .eraseblocks = { {4 * 1024, 1024} },
13443 .block_erase = spi_block_erase_20,
13444 }, {
13445 .eraseblocks = { {4 * 1024, 1024} },
13446 .block_erase = spi_block_erase_d7,
13447 }, {
13448 .eraseblocks = { {64 * 1024, 64} },
13449 .block_erase = spi_block_erase_d8,
13450 }, {
13451 .eraseblocks = { {4096 * 1024, 1} },
13452 .block_erase = spi_block_erase_60,
13453 }, {
13454 .eraseblocks = { {4096 * 1024, 1} },
13455 .block_erase = spi_block_erase_c7,
13456 }
13457 },
13458 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13459 .unlock = spi_disable_blockprotect_bp3_srwd,
13460 .write = spi_chip_write_256,
13461 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13462 .voltage = {2700, 3600},
13463 },
13464
13465 {
13466 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013467 .name = "Pm25LQ040",
13468 .bustype = BUS_SPI,
13469 .manufacture_id = PMC_ID,
13470 .model_id = PMC_PM25LQ040,
13471 .total_size = 512,
13472 .page_size = 256,
13473 /* OTP: 256B total; read 0x4B, write 0xB1 */
13474 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13475 .tested = TEST_UNTESTED,
13476 .probe = probe_spi_rdid,
13477 .probe_timing = TIMING_ZERO,
13478 .block_erasers =
13479 {
13480 {
13481 .eraseblocks = { {4 * 1024, 128} },
13482 .block_erase = spi_block_erase_20,
13483 }, {
13484 .eraseblocks = { {4 * 1024, 128} },
13485 .block_erase = spi_block_erase_d7,
13486 }, {
13487 .eraseblocks = { {64 * 1024, 8} },
13488 .block_erase = spi_block_erase_d8,
13489 }, {
13490 .eraseblocks = { {512 * 1024, 1} },
13491 .block_erase = spi_block_erase_60,
13492 }, {
13493 .eraseblocks = { {512 * 1024, 1} },
13494 .block_erase = spi_block_erase_c7,
13495 }
13496 },
13497 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13498 .unlock = spi_disable_blockprotect_bp3_srwd,
13499 .write = spi_chip_write_256,
13500 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13501 .voltage = {2300, 3600},
13502 },
13503
13504 {
13505 .vendor = "PMC",
13506 .name = "Pm25LQ080",
13507 .bustype = BUS_SPI,
13508 .manufacture_id = PMC_ID,
13509 .model_id = PMC_PM25LQ080,
13510 .total_size = 1024,
13511 .page_size = 256,
13512 /* OTP: 64B total; read 0x4B, write 0xB1 */
13513 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13514 .tested = TEST_UNTESTED,
13515 .probe = probe_spi_rdid,
13516 .probe_timing = TIMING_ZERO,
13517 .block_erasers =
13518 {
13519 {
13520 .eraseblocks = { {4 * 1024, 256} },
13521 .block_erase = spi_block_erase_20,
13522 }, {
13523 .eraseblocks = { {4 * 1024, 256} },
13524 .block_erase = spi_block_erase_d7,
13525 }, {
13526 .eraseblocks = { {64 * 1024, 16} },
13527 .block_erase = spi_block_erase_d8,
13528 }, {
13529 .eraseblocks = { {1024 * 1024, 1} },
13530 .block_erase = spi_block_erase_60,
13531 }, {
13532 .eraseblocks = { {1024 * 1024, 1} },
13533 .block_erase = spi_block_erase_c7,
13534 }
13535 },
13536 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13537 .unlock = spi_disable_blockprotect_bp3_srwd,
13538 .write = spi_chip_write_256,
13539 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13540 .voltage = {2300, 3600},
13541 },
13542
13543 {
13544 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013545 .name = "Pm25LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013546 .bustype = BUS_SPI,
Stefan Taunerbecda742014-05-30 19:34:00 +000013547 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013548 .model_id = PMC_PM25LV010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013549 .total_size = 128,
13550 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013551 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerbecda742014-05-30 19:34:00 +000013552 .tested = TEST_OK_PREW,
13553 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013554 .probe_timing = TIMING_ZERO,
13555 .block_erasers =
13556 {
13557 {
13558 .eraseblocks = { {4 * 1024, 32} },
13559 .block_erase = spi_block_erase_d7,
13560 }, {
13561 .eraseblocks = { {32 * 1024, 4} },
13562 .block_erase = spi_block_erase_d8,
13563 }, {
13564 .eraseblocks = { {128 * 1024, 1} },
13565 .block_erase = spi_block_erase_c7,
13566 }
13567 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013568 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013569 .unlock = spi_disable_blockprotect,
13570 .write = spi_chip_write_256,
13571 .read = spi_chip_read, /* Fast read (0x0B) supported */
13572 .voltage = {2700, 3600},
13573 },
13574
13575 {
13576 .vendor = "PMC",
13577 .name = "Pm25LV010A",
13578 .bustype = BUS_SPI,
13579 .manufacture_id = PMC_ID,
13580 .model_id = PMC_PM25LV010,
13581 .total_size = 128,
13582 .page_size = 256,
13583 .feature_bits = FEATURE_WRSR_WREN,
13584 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013585 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013586 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013587 .block_erasers =
13588 {
13589 {
13590 .eraseblocks = { {4 * 1024, 32} },
13591 .block_erase = spi_block_erase_d7,
13592 }, {
13593 .eraseblocks = { {32 * 1024, 4} },
13594 .block_erase = spi_block_erase_d8,
13595 }, {
13596 .eraseblocks = { {128 * 1024, 1} },
13597 .block_erase = spi_block_erase_c7,
13598 }
13599 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013600 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013601 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013602 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013603 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000013604 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013605 },
13606
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013607 {
13608 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013609 .name = "Pm25LV016B",
13610 .bustype = BUS_SPI,
13611 .manufacture_id = PMC_ID,
13612 .model_id = PMC_PM25LV016B,
13613 .total_size = 2048,
13614 .page_size = 256,
13615 .feature_bits = FEATURE_WRSR_WREN,
13616 .tested = TEST_UNTESTED,
13617 .probe = probe_spi_rdid,
13618 .probe_timing = TIMING_ZERO,
13619 .block_erasers =
13620 {
13621 {
13622 .eraseblocks = { {4 * 1024, 512} },
13623 .block_erase = spi_block_erase_d7,
13624 }, {
13625 .eraseblocks = { {4 * 1024, 512} },
13626 .block_erase = spi_block_erase_20,
13627 }, {
13628 .eraseblocks = { {64 * 1024, 32} },
13629 .block_erase = spi_block_erase_d8,
13630 }, {
13631 .eraseblocks = { {2 * 1024 * 1024, 1} },
13632 .block_erase = spi_block_erase_60,
13633 }, {
13634 .eraseblocks = { {2 * 1024 * 1024, 1} },
13635 .block_erase = spi_block_erase_c7,
13636 }
13637 },
13638 .printlock = spi_prettyprint_status_register_bp2_srwd,
13639 .unlock = spi_disable_blockprotect,
13640 .write = spi_chip_write_256,
13641 .read = spi_chip_read, /* Fast read (0x0B) supported */
13642 .voltage = {2700, 3600},
13643 },
13644
13645 {
13646 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013647 .name = "Pm25LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013648 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013649 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013650 .model_id = PMC_PM25LV020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013651 .total_size = 256,
13652 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013653 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013654 .tested = TEST_UNTESTED,
13655 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013656 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013657 .block_erasers =
13658 {
13659 {
13660 .eraseblocks = { {4 * 1024, 64} },
13661 .block_erase = spi_block_erase_d7,
13662 }, {
13663 .eraseblocks = { {64 * 1024, 4} },
13664 .block_erase = spi_block_erase_d8,
13665 }, {
13666 .eraseblocks = { {256 * 1024, 1} },
13667 .block_erase = spi_block_erase_c7,
13668 }
13669 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013670 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013671 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013672 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013673 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013674 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013675 },
13676
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013677 {
13678 .vendor = "PMC",
13679 .name = "Pm25LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013680 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013681 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013682 .model_id = PMC_PM25LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013683 .total_size = 512,
13684 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013685 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner716e0982011-07-25 20:38:52 +000013686 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013687 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013688 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013689 .block_erasers =
13690 {
13691 {
13692 .eraseblocks = { {4 * 1024, 128} },
13693 .block_erase = spi_block_erase_d7,
13694 }, {
13695 .eraseblocks = { {64 * 1024, 8} },
13696 .block_erase = spi_block_erase_d8,
13697 }, {
13698 .eraseblocks = { {512 * 1024, 1} },
13699 .block_erase = spi_block_erase_c7,
13700 }
13701 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013702 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013703 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013704 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013705 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013706 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013707 },
13708
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013709 {
13710 .vendor = "PMC",
13711 .name = "Pm25LV080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013712 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013713 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013714 .model_id = PMC_PM25LV080B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013715 .total_size = 1024,
13716 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013717 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013718 .tested = TEST_UNTESTED,
13719 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013720 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013721 .block_erasers =
13722 {
13723 {
13724 .eraseblocks = { {4 * 1024, 256} },
13725 .block_erase = spi_block_erase_d7,
13726 }, {
13727 .eraseblocks = { {4 * 1024, 256} },
13728 .block_erase = spi_block_erase_20,
13729 }, {
13730 .eraseblocks = { {64 * 1024, 16} },
13731 .block_erase = spi_block_erase_d8,
13732 }, {
13733 .eraseblocks = { {1024 * 1024, 1} },
13734 .block_erase = spi_block_erase_60,
13735 }, {
13736 .eraseblocks = { {1024 * 1024, 1} },
13737 .block_erase = spi_block_erase_c7,
13738 }
13739 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013740 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013741 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013742 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013743 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013744 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013745 },
13746
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013747 {
13748 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013749 .name = "Pm25LV512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013750 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013751 .manufacture_id = PMC_ID_NOPREFIX,
13752 .model_id = PMC_PM25LV512,
13753 .total_size = 64,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013754 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013755 .feature_bits = FEATURE_WRSR_WREN,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013756 .tested = TEST_OK_PREW,
13757 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013758 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013759 .block_erasers =
13760 {
13761 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013762 .eraseblocks = { {4 * 1024, 16} },
Sean Nelson5643c072010-01-19 03:23:07 +000013763 .block_erase = spi_block_erase_d7,
13764 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013765 .eraseblocks = { {32 * 1024, 2} },
Sean Nelson5643c072010-01-19 03:23:07 +000013766 .block_erase = spi_block_erase_d8,
13767 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013768 .eraseblocks = { {64 * 1024, 1} },
Sean Nelson5643c072010-01-19 03:23:07 +000013769 .block_erase = spi_block_erase_c7,
13770 }
13771 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100013772 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013773 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013774 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013775 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000013776 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013777 },
13778
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013779 {
13780 .vendor = "PMC",
Sean Nelson72a9a022009-12-22 22:15:33 +000013781 .name = "Pm29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013782 .bustype = BUS_PARALLEL,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013783 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013784 .model_id = PMC_PM29F002B,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013785 .total_size = 256,
Sean Nelson72a9a022009-12-22 22:15:33 +000013786 .page_size = 8 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000013787 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013788 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000013789 .probe = probe_jedec,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013790 .probe_timing = TIMING_FIXME,
Sean Nelson72a9a022009-12-22 22:15:33 +000013791 .block_erasers =
13792 {
13793 {
13794 .eraseblocks = {
13795 {16 * 1024, 1},
13796 {8 * 1024, 2},
13797 {96 * 1024, 1},
13798 {128 * 1024, 1},
13799 },
Sean Nelson35727f72010-01-28 23:55:12 +000013800 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000013801 }, {
13802 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000013803 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000013804 },
13805 },
Sean Nelson35727f72010-01-28 23:55:12 +000013806 .write = write_jedec_1,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013807 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013808 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013809 .prepare_access = prepare_memory_access,
13810 .finish_access = finish_memory_access,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013811 },
13812
13813 {
13814 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013815 .name = "Pm29F002T",
13816 .bustype = BUS_PARALLEL,
13817 .manufacture_id = PMC_ID_NOPREFIX,
13818 .model_id = PMC_PM29F002T,
13819 .total_size = 256,
13820 .page_size = 8 * 1024,
13821 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
13822 .tested = TEST_OK_PREW,
13823 .probe = probe_jedec,
13824 .probe_timing = TIMING_FIXME,
13825 .block_erasers =
13826 {
13827 {
13828 .eraseblocks = {
13829 {128 * 1024, 1},
13830 {96 * 1024, 1},
13831 {8 * 1024, 2},
13832 {16 * 1024, 1},
13833 },
13834 .block_erase = erase_sector_jedec,
13835 }, {
13836 .eraseblocks = { {256 * 1024, 1} },
13837 .block_erase = erase_chip_block_jedec,
13838 },
13839 },
13840 .write = write_jedec_1,
13841 .read = read_memmapped,
13842 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013843 .prepare_access = prepare_memory_access,
13844 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013845 },
13846
13847 {
13848 .vendor = "PMC",
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013849 .name = "Pm39LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013850 .bustype = BUS_PARALLEL,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013851 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013852 .model_id = PMC_PM39F010, /* Pm39LV010 and Pm39F010 have identical IDs but different voltage */
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013853 .total_size = 128,
13854 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000013855 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000013856 .tested = TEST_OK_PREW,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013857 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000013858 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson5643c072010-01-19 03:23:07 +000013859 .block_erasers =
13860 {
13861 {
13862 .eraseblocks = { {4 * 1024, 32} },
13863 .block_erase = erase_sector_jedec,
13864 }, {
13865 .eraseblocks = { {64 * 1024, 2} },
13866 .block_erase = erase_block_jedec,
13867 }, {
13868 .eraseblocks = { {128 * 1024, 1} },
13869 .block_erase = erase_chip_block_jedec,
13870 }
13871 },
Sean Nelson35727f72010-01-28 23:55:12 +000013872 .write = write_jedec_1,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013873 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013874 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013875 .prepare_access = prepare_memory_access,
13876 .finish_access = finish_memory_access,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013877 },
13878
13879 {
13880 .vendor = "PMC",
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013881 .name = "Pm39LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013882 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013883 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013884 .model_id = PMC_PM39LV020,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013885 .total_size = 256,
13886 .page_size = 4096,
13887 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
13888 .tested = TEST_UNTESTED,
13889 .probe = probe_jedec,
13890 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100013891 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013892 {
13893 {
13894 .eraseblocks = { {4 * 1024, 64} },
13895 .block_erase = erase_sector_jedec,
13896 }, {
13897 .eraseblocks = { {64 * 1024, 4} },
13898 .block_erase = erase_block_jedec,
13899 }, {
13900 .eraseblocks = { {256 * 1024, 1} },
13901 .block_erase = erase_chip_block_jedec,
13902 }
13903 },
13904 .write = write_jedec_1,
13905 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013906 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013907 .prepare_access = prepare_memory_access,
13908 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013909 },
13910
13911 {
13912 .vendor = "PMC",
13913 .name = "Pm39LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013914 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013915 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013916 .model_id = PMC_PM39LV040,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013917 .total_size = 512,
13918 .page_size = 4096,
13919 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000013920 .tested = TEST_OK_PR,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013921 .probe = probe_jedec,
13922 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100013923 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013924 {
13925 {
13926 .eraseblocks = { {4 * 1024, 128} },
13927 .block_erase = erase_sector_jedec,
13928 }, {
13929 .eraseblocks = { {64 * 1024, 8} },
13930 .block_erase = erase_block_jedec,
13931 }, {
13932 .eraseblocks = { {512 * 1024, 1} },
13933 .block_erase = erase_chip_block_jedec,
13934 }
13935 },
13936 .write = write_jedec_1,
13937 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013938 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013939 .prepare_access = prepare_memory_access,
13940 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013941 },
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000013942
13943 {
13944 .vendor = "PMC",
13945 .name = "Pm39LV512",
13946 .bustype = BUS_PARALLEL,
13947 .manufacture_id = PMC_ID_NOPREFIX,
13948 .model_id = PMC_PM39LV512,
13949 .total_size = 64,
13950 .page_size = 4096,
13951 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
13952 .tested = TEST_OK_PREW,
13953 .probe = probe_jedec,
13954 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
13955 .block_erasers =
13956 {
13957 {
13958 .eraseblocks = { {4 * 1024, 16} },
13959 .block_erase = erase_sector_jedec,
13960 }, {
13961 .eraseblocks = { {64 * 1024, 1} },
13962 .block_erase = erase_block_jedec,
13963 }, {
13964 .eraseblocks = { {64 * 1024, 1} },
13965 .block_erase = erase_chip_block_jedec,
13966 }
13967 },
13968 .write = write_jedec_1,
13969 .read = read_memmapped,
13970 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013971 .prepare_access = prepare_memory_access,
13972 .finish_access = finish_memory_access,
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000013973 },
13974
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013975 {
13976 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013977 .name = "Pm49FL002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013978 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013979 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013980 .model_id = PMC_PM49FL002,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013981 .total_size = 256,
13982 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010013983 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000013984 .tested = TEST_OK_PR,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000013985 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000013986 .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */
Sean Nelson5643c072010-01-19 03:23:07 +000013987 .block_erasers =
13988 {
13989 {
13990 .eraseblocks = { {4 * 1024, 64} },
13991 .block_erase = erase_sector_jedec,
13992 }, {
13993 .eraseblocks = { {16 * 1024, 16} },
13994 .block_erase = erase_block_jedec,
13995 }, {
13996 .eraseblocks = { {256 * 1024, 1} },
13997 .block_erase = erase_chip_block_jedec,
13998 }
13999 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014000 .unlock = unlock_regspace2_uniform_32k,
Sean Nelson36172342010-02-27 18:01:15 +000014001 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000014002 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014003 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010014004 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010014005 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000014006 },
14007
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014008 {
14009 .vendor = "PMC",
14010 .name = "Pm49FL004",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014011 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014012 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014013 .model_id = PMC_PM49FL004,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014014 .total_size = 512,
14015 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010014016 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000014017 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000014018 .probe = probe_jedec,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000014019 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000014020 .block_erasers =
14021 {
14022 {
14023 .eraseblocks = { {4 * 1024, 128} },
14024 .block_erase = erase_sector_jedec,
14025 }, {
14026 .eraseblocks = { {64 * 1024, 8} },
14027 .block_erase = erase_block_jedec,
14028 }, {
14029 .eraseblocks = { {512 * 1024, 1} },
14030 .block_erase = erase_chip_block_jedec,
14031 }
14032 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014033 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson36172342010-02-27 18:01:15 +000014034 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000014035 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014036 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010014037 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010014038 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000014039 },
14040
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014041 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014042 .vendor = "SST",
Idwer Volleringf3607d12014-05-07 15:25:04 +000014043 .name = "SST25LF020A",
14044 .bustype = BUS_SPI,
14045 .manufacture_id = SST_ID,
14046 .model_id = SST_SST25VF020_REMS,
14047 .total_size = 256,
14048 .page_size = 256,
14049 .feature_bits = FEATURE_WRSR_EWSR,
14050 .tested = TEST_OK_PREW,
14051 .probe = probe_spi_rems,
14052 .probe_timing = TIMING_ZERO,
14053 .block_erasers =
14054 {
14055 {
14056 .eraseblocks = { {4 * 1024, 64} },
14057 .block_erase = spi_block_erase_20,
14058 }, {
14059 .eraseblocks = { {32 * 1024, 8} },
14060 .block_erase = spi_block_erase_52,
14061 }, {
14062 .eraseblocks = { {256 * 1024, 1} },
14063 .block_erase = spi_block_erase_60,
14064 },
14065 },
14066 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14067 .unlock = spi_disable_blockprotect,
14068 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14069 .read = spi_chip_read, /* Fast read (0x0B) supported */
14070 .voltage = {2700, 3600},
14071 },
14072
14073 {
14074 .vendor = "SST",
Zeus Castro33670ba2011-08-17 09:50:11 +000014075 .name = "SST25LF040A",
14076 .bustype = BUS_SPI,
14077 .manufacture_id = SST_ID,
14078 .model_id = SST_SST25VF040_REMS,
14079 .total_size = 512,
14080 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000014081 .feature_bits = FEATURE_WRSR_EWSR,
Uwe Hermann4335ec82011-09-07 20:20:25 +000014082 .tested = TEST_OK_PREW,
Zeus Castro33670ba2011-08-17 09:50:11 +000014083 .probe = probe_spi_res2,
14084 .probe_timing = TIMING_ZERO,
14085 .block_erasers =
14086 {
14087 {
14088 .eraseblocks = { {4 * 1024, 128} },
14089 .block_erase = spi_block_erase_20,
14090 }, {
14091 .eraseblocks = { {32 * 1024, 16} },
14092 .block_erase = spi_block_erase_52,
14093 }, {
14094 .eraseblocks = { {512 * 1024, 1} },
14095 .block_erase = spi_block_erase_60,
14096 },
14097 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014098 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000014099 .unlock = spi_disable_blockprotect,
14100 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14101 .read = spi_chip_read,
14102 .voltage = {3000, 3600},
14103 },
14104
14105 {
14106 .vendor = "SST",
Stefan Taunere34e3e82013-01-01 00:06:51 +000014107 .name = "SST25LF080(A)",
Zeus Castro33670ba2011-08-17 09:50:11 +000014108 .bustype = BUS_SPI,
14109 .manufacture_id = SST_ID,
14110 .model_id = SST_SST25VF080_REMS,
14111 .total_size = 1024,
14112 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000014113 .feature_bits = FEATURE_WRSR_EITHER,
Zeus Castro33670ba2011-08-17 09:50:11 +000014114 .tested = TEST_UNTESTED,
14115 .probe = probe_spi_res2,
14116 .probe_timing = TIMING_ZERO,
14117 .block_erasers =
14118 {
14119 {
14120 .eraseblocks = { {4 * 1024, 256} },
14121 .block_erase = spi_block_erase_20,
14122 }, {
14123 .eraseblocks = { {32 * 1024, 32} },
14124 .block_erase = spi_block_erase_52,
14125 }, {
14126 .eraseblocks = { {1024 * 1024, 1} },
14127 .block_erase = spi_block_erase_60,
14128 },
14129 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014130 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000014131 .unlock = spi_disable_blockprotect,
14132 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14133 .read = spi_chip_read,
14134 .voltage = {3000, 3600},
14135 },
14136
14137 {
14138 .vendor = "SST",
Stefan Tauner6697f712014-08-06 15:09:15 +000014139 .name = "SST25VF010(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014140 .bustype = BUS_SPI,
Mark Marshall90021f22010-12-03 14:48:11 +000014141 .manufacture_id = SST_ID,
14142 .model_id = SST_SST25VF010_REMS,
14143 .total_size = 128,
14144 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000014145 .feature_bits = FEATURE_WRSR_EWSR,
Mark Marshall90021f22010-12-03 14:48:11 +000014146 .tested = TEST_OK_PREW,
14147 .probe = probe_spi_rems,
14148 .probe_timing = TIMING_ZERO,
14149 .block_erasers =
14150 {
14151 {
14152 .eraseblocks = { {4 * 1024, 32} },
14153 .block_erase = spi_block_erase_20,
14154 }, {
14155 .eraseblocks = { {32 * 1024, 4} },
14156 .block_erase = spi_block_erase_52,
14157 }, {
Cory Henderson370f5822013-10-19 23:09:16 +000014158 .eraseblocks = { {32 * 1024, 4} },
Stefan Tauner6697f712014-08-06 15:09:15 +000014159 .block_erase = spi_block_erase_d8, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014160 }, {
Mark Marshall90021f22010-12-03 14:48:11 +000014161 .eraseblocks = { {128 * 1024, 1} },
14162 .block_erase = spi_block_erase_60,
Cory Henderson370f5822013-10-19 23:09:16 +000014163 }, {
14164 .eraseblocks = { {128 * 1024, 1} },
Stefan Tauner6697f712014-08-06 15:09:15 +000014165 .block_erase = spi_block_erase_c7, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014166 },
14167 },
14168 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14169 .unlock = spi_disable_blockprotect,
14170 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
Stefan Tauner6697f712014-08-06 15:09:15 +000014171 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014172 .voltage = {2700, 3600},
14173 },
14174
14175 {
14176 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014177 .name = "SST25VF016B",
14178 .bustype = BUS_SPI,
14179 .manufacture_id = SST_ID,
14180 .model_id = SST_SST25VF016B,
14181 .total_size = 2048,
14182 .page_size = 256,
14183 .feature_bits = FEATURE_WRSR_EITHER,
14184 .tested = TEST_OK_PREW,
14185 .probe = probe_spi_rdid,
14186 .probe_timing = TIMING_ZERO,
14187 .block_erasers =
14188 {
14189 {
14190 .eraseblocks = { {4 * 1024, 512} },
14191 .block_erase = spi_block_erase_20,
14192 }, {
14193 .eraseblocks = { {32 * 1024, 64} },
14194 .block_erase = spi_block_erase_52,
14195 }, {
14196 .eraseblocks = { {64 * 1024, 32} },
14197 .block_erase = spi_block_erase_d8,
14198 }, {
14199 .eraseblocks = { {2 * 1024 * 1024, 1} },
14200 .block_erase = spi_block_erase_60,
14201 }, {
14202 .eraseblocks = { {2 * 1024 * 1024, 1} },
14203 .block_erase = spi_block_erase_c7,
14204 },
14205 },
14206 .printlock = spi_prettyprint_status_register_sst25vf016,
14207 .unlock = spi_disable_blockprotect,
14208 .write = spi_aai_write,
14209 .read = spi_chip_read,
14210 .voltage = {2700, 3600},
14211 },
14212
14213 {
14214 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014215 .name = "SST25VF020",
14216 .bustype = BUS_SPI,
14217 .manufacture_id = SST_ID,
14218 .model_id = SST_SST25VF020_REMS,
14219 .total_size = 256,
14220 .page_size = 256,
14221 .feature_bits = FEATURE_WRSR_EWSR,
14222 .tested = TEST_UNTESTED,
14223 .probe = probe_spi_rems,
14224 .probe_timing = TIMING_ZERO,
14225 .block_erasers =
14226 {
14227 {
14228 .eraseblocks = { {4 * 1024, 64} },
14229 .block_erase = spi_block_erase_20,
14230 }, {
14231 .eraseblocks = { {32 * 1024, 8} },
14232 .block_erase = spi_block_erase_52,
14233 }, {
14234 .eraseblocks = { {256 * 1024, 1} },
14235 .block_erase = spi_block_erase_60,
14236 },
14237 },
14238 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14239 .unlock = spi_disable_blockprotect,
14240 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14241 .read = spi_chip_read, /* only */
14242 .voltage = {2700, 3600},
14243 },
14244
14245 {
14246 .vendor = "SST",
14247 .name = "SST25VF020B",
14248 .bustype = BUS_SPI,
14249 .manufacture_id = SST_ID,
14250 .model_id = SST_SST25VF020B,
14251 .total_size = 256,
14252 .page_size = 256,
14253 .feature_bits = FEATURE_WRSR_EWSR,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000014254 .tested = TEST_OK_PREW,
Cory Henderson370f5822013-10-19 23:09:16 +000014255 .probe = probe_spi_rdid,
14256 .probe_timing = TIMING_ZERO,
14257 .block_erasers =
14258 {
14259 {
14260 .eraseblocks = { {4 * 1024, 64} },
14261 .block_erase = spi_block_erase_20,
14262 }, {
14263 .eraseblocks = { {32 * 1024, 8} },
14264 .block_erase = spi_block_erase_52,
14265 }, {
14266 .eraseblocks = { {64 * 1024, 4} },
14267 .block_erase = spi_block_erase_d8,
14268 }, {
14269 .eraseblocks = { {256 * 1024, 1} },
14270 .block_erase = spi_block_erase_60,
14271 }, {
14272 .eraseblocks = { {256 * 1024, 1} },
14273 .block_erase = spi_block_erase_c7,
14274 },
14275 },
14276 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 and 2nd SR */
14277 .unlock = spi_disable_blockprotect, /* FIXME: 2nd SR */
14278 .write = spi_aai_write, /* AAI supported (0xAD) */
14279 .read = spi_chip_read, /* Fast read (0x0B) supported */
14280 .voltage = {2700, 3600},
14281 },
14282
14283 {
14284 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014285 .name = "SST25VF032B",
14286 .bustype = BUS_SPI,
14287 .manufacture_id = SST_ID,
14288 .model_id = SST_SST25VF032B,
14289 .total_size = 4096,
14290 .page_size = 256,
14291 .feature_bits = FEATURE_WRSR_EWSR,
14292 .tested = TEST_OK_PREW,
14293 .probe = probe_spi_rdid,
14294 .probe_timing = TIMING_ZERO,
14295 .block_erasers =
14296 {
14297 {
14298 .eraseblocks = { {4 * 1024, 1024} },
14299 .block_erase = spi_block_erase_20,
14300 }, {
14301 .eraseblocks = { {32 * 1024, 128} },
14302 .block_erase = spi_block_erase_52,
14303 }, {
14304 .eraseblocks = { {64 * 1024, 64} },
14305 .block_erase = spi_block_erase_d8,
14306 }, {
14307 .eraseblocks = { {4 * 1024 * 1024, 1} },
14308 .block_erase = spi_block_erase_60,
14309 }, {
14310 .eraseblocks = { {4 * 1024 * 1024, 1} },
14311 .block_erase = spi_block_erase_c7,
14312 },
14313 },
14314 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14315 .unlock = spi_disable_blockprotect,
14316 .write = spi_aai_write,
14317 .read = spi_chip_read,
14318 .voltage = {2700, 3600},
14319 },
14320
14321 {
14322 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014323 .name = "SST25VF040",
14324 .bustype = BUS_SPI,
14325 .manufacture_id = SST_ID,
14326 .model_id = SST_SST25VF040_REMS,
14327 .total_size = 512,
14328 .page_size = 256,
14329 .feature_bits = FEATURE_WRSR_EWSR,
14330 .tested = TEST_OK_PR,
14331 .probe = probe_spi_rems,
14332 .probe_timing = TIMING_ZERO,
14333 .block_erasers =
14334 {
14335 {
14336 .eraseblocks = { {4 * 1024, 128} },
14337 .block_erase = spi_block_erase_20,
14338 }, {
14339 .eraseblocks = { {32 * 1024, 16} },
14340 .block_erase = spi_block_erase_52,
14341 }, {
14342 .eraseblocks = { {512 * 1024, 1} },
14343 .block_erase = spi_block_erase_60,
Mark Marshall90021f22010-12-03 14:48:11 +000014344 },
14345 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014346 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Mark Marshall90021f22010-12-03 14:48:11 +000014347 .unlock = spi_disable_blockprotect,
Cory Henderson370f5822013-10-19 23:09:16 +000014348 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14349 .read = spi_chip_read,
14350 .voltage = {2700, 3600},
14351 },
14352
14353 {
14354 .vendor = "SST",
14355 .name = "SST25VF040B",
14356 .bustype = BUS_SPI,
14357 .manufacture_id = SST_ID,
14358 .model_id = SST_SST25VF040B,
14359 .total_size = 512,
14360 .page_size = 256,
14361 .feature_bits = FEATURE_WRSR_EWSR,
14362 .tested = TEST_OK_PREW,
14363 .probe = probe_spi_rdid,
14364 .probe_timing = TIMING_ZERO,
14365 .block_erasers =
14366 {
14367 {
14368 .eraseblocks = { {4 * 1024, 128} },
14369 .block_erase = spi_block_erase_20,
14370 }, {
14371 .eraseblocks = { {32 * 1024, 16} },
14372 .block_erase = spi_block_erase_52,
14373 }, {
14374 .eraseblocks = { {64 * 1024, 8} },
14375 .block_erase = spi_block_erase_d8,
14376 }, {
14377 .eraseblocks = { {512 * 1024, 1} },
14378 .block_erase = spi_block_erase_60,
14379 }, {
14380 .eraseblocks = { {512 * 1024, 1} },
14381 .block_erase = spi_block_erase_c7,
14382 },
14383 },
14384 .printlock = spi_prettyprint_status_register_sst25vf040b,
14385 .unlock = spi_disable_blockprotect,
14386 .write = spi_aai_write, /* AAI supported (0xAD) */
14387 .read = spi_chip_read, /* Fast read (0x0B) supported */
14388 .voltage = {2700, 3600},
14389 },
14390
14391 {
14392 .vendor = "SST",
14393 .name = "SST25VF040B.REMS",
14394 .bustype = BUS_SPI,
14395 .manufacture_id = SST_ID,
14396 .model_id = SST_SST25VF040B_REMS,
14397 .total_size = 512,
14398 .page_size = 256,
14399 .feature_bits = FEATURE_WRSR_EWSR,
14400 .tested = TEST_OK_PREW,
14401 .probe = probe_spi_rems,
14402 .probe_timing = TIMING_ZERO,
14403 .block_erasers =
14404 {
14405 {
14406 .eraseblocks = { {4 * 1024, 128} },
14407 .block_erase = spi_block_erase_20,
14408 }, {
14409 .eraseblocks = { {32 * 1024, 16} },
14410 .block_erase = spi_block_erase_52,
14411 }, {
14412 .eraseblocks = { {64 * 1024, 8} },
14413 .block_erase = spi_block_erase_d8,
14414 }, {
14415 .eraseblocks = { {512 * 1024, 1} },
14416 .block_erase = spi_block_erase_60,
14417 }, {
14418 .eraseblocks = { {512 * 1024, 1} },
14419 .block_erase = spi_block_erase_c7,
14420 },
14421 },
14422 .printlock = spi_prettyprint_status_register_sst25vf040b,
14423 .unlock = spi_disable_blockprotect,
14424 .write = spi_aai_write,
14425 .read = spi_chip_read,
14426 .voltage = {2700, 3600},
14427 },
14428
14429 {
14430 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014431 .name = "SST25VF064C",
Ben Gardnerbcf61092015-11-22 02:23:31 +000014432 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014433 .manufacture_id = SST_ID,
14434 .model_id = SST_SST25VF064C,
14435 .total_size = 8192,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014436 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014437 .feature_bits = FEATURE_WRSR_EWSR,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014438 .tested = TEST_OK_PREW,
14439 .probe = probe_spi_rdid,
14440 .probe_timing = TIMING_ZERO,
14441 .block_erasers =
14442 {
14443 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014444 .eraseblocks = { {4 * 1024, 2048} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014445 .block_erase = spi_block_erase_20,
14446 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014447 .eraseblocks = { {32 * 1024, 256} },
14448 .block_erase = spi_block_erase_52,
14449 }, {
14450 .eraseblocks = { {64 * 1024, 128} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014451 .block_erase = spi_block_erase_d8,
14452 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014453 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014454 .block_erase = spi_block_erase_60,
14455 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014456 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014457 .block_erase = spi_block_erase_c7,
14458 },
14459 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014460 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14461 .unlock = spi_disable_blockprotect,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014462 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014463 .read = spi_chip_read,
14464 .voltage = {2700, 3600},
Ben Gardnerbcf61092015-11-22 02:23:31 +000014465 },
14466
14467 {
14468 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014469 .name = "SST25VF080B",
14470 .bustype = BUS_SPI,
14471 .manufacture_id = SST_ID,
14472 .model_id = SST_SST25VF080B,
14473 .total_size = 1024,
14474 .page_size = 256,
14475 .feature_bits = FEATURE_WRSR_EWSR,
14476 .tested = TEST_OK_PREW,
14477 .probe = probe_spi_rdid,
14478 .probe_timing = TIMING_ZERO,
14479 .block_erasers =
14480 {
14481 {
14482 .eraseblocks = { {4 * 1024, 256} },
14483 .block_erase = spi_block_erase_20,
14484 }, {
14485 .eraseblocks = { {32 * 1024, 32} },
14486 .block_erase = spi_block_erase_52,
14487 }, {
14488 .eraseblocks = { {64 * 1024, 16} },
14489 .block_erase = spi_block_erase_d8,
14490 }, {
14491 .eraseblocks = { {1024 * 1024, 1} },
14492 .block_erase = spi_block_erase_60,
14493 }, {
14494 .eraseblocks = { {1024 * 1024, 1} },
14495 .block_erase = spi_block_erase_c7,
14496 },
14497 },
14498 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14499 .unlock = spi_disable_blockprotect,
14500 .write = spi_aai_write,
Mark Marshall90021f22010-12-03 14:48:11 +000014501 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +000014502 .voltage = {2700, 3600},
Mark Marshall90021f22010-12-03 14:48:11 +000014503 },
14504
14505 {
14506 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014507 .name = "SST25VF512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014508 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014509 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014510 .model_id = SST_SST25VF512_REMS,
14511 .total_size = 64,
14512 .page_size = 256,
14513 .feature_bits = FEATURE_WRSR_EWSR,
14514 .tested = TEST_OK_PREW,
14515 .probe = probe_spi_rems,
14516 .probe_timing = TIMING_ZERO,
14517 .block_erasers =
14518 {
14519 {
14520 .eraseblocks = { {4 * 1024, 16} },
14521 .block_erase = spi_block_erase_20,
14522 }, {
14523 .eraseblocks = { {32 * 1024, 2} },
14524 .block_erase = spi_block_erase_52,
14525 }, {
14526 .eraseblocks = { {32 * 1024, 2} },
14527 .block_erase = spi_block_erase_d8, /* Supported by SST25VF512A only */
14528 }, {
14529 .eraseblocks = { {64 * 1024, 1} },
14530 .block_erase = spi_block_erase_60,
14531 }, {
14532 .eraseblocks = { {64 * 1024, 1} },
14533 .block_erase = spi_block_erase_c7, /* Supported by SST25VF512A only */
14534 },
14535 },
14536 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14537 .unlock = spi_disable_blockprotect,
14538 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14539 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF512A only */
14540 .voltage = {2700, 3600},
14541 },
14542
14543 {
14544 .vendor = "SST",
14545 .name = "SST25WF010",
14546 .bustype = BUS_SPI,
14547 .manufacture_id = SST_ID,
14548 .model_id = SST_SST25WF010,
14549 .total_size = 128,
14550 .page_size = 256,
14551 .feature_bits = FEATURE_WRSR_EITHER,
14552 .tested = TEST_UNTESTED,
14553 .probe = probe_spi_rdid,
14554 .probe_timing = TIMING_ZERO,
14555 .block_erasers =
14556 {
14557 {
14558 .eraseblocks = { {4 * 1024, 32} },
14559 .block_erase = spi_block_erase_20,
14560 }, {
14561 .eraseblocks = { {32 * 1024, 4} },
14562 .block_erase = spi_block_erase_52,
14563 }, {
14564 .eraseblocks = { {1024 * 128, 1} },
14565 .block_erase = spi_block_erase_60,
14566 }, {
14567 .eraseblocks = { {1024 * 128, 1} },
14568 .block_erase = spi_block_erase_c7,
14569 },
14570 },
14571 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14572 .unlock = spi_disable_blockprotect_bp2_srwd,
14573 .write = spi_aai_write,
14574 .read = spi_chip_read, /* Fast read (0x0B) supported */
14575 .voltage = {1650, 1950},
14576 },
14577
14578 {
14579 .vendor = "SST",
14580 .name = "SST25WF020",
14581 .bustype = BUS_SPI,
14582 .manufacture_id = SST_ID,
14583 .model_id = SST_SST25WF020,
14584 .total_size = 256,
14585 .page_size = 256,
14586 .feature_bits = FEATURE_WRSR_EITHER,
14587 .tested = TEST_UNTESTED,
14588 .probe = probe_spi_rdid,
14589 .probe_timing = TIMING_ZERO,
14590 .block_erasers =
14591 {
14592 {
14593 .eraseblocks = { {4 * 1024, 64} },
14594 .block_erase = spi_block_erase_20,
14595 }, {
14596 .eraseblocks = { {32 * 1024, 8} },
14597 .block_erase = spi_block_erase_52,
14598 }, {
14599 .eraseblocks = { {64 * 1024, 4} },
14600 .block_erase = spi_block_erase_d8,
14601 }, {
14602 .eraseblocks = { {1024 * 256, 1} },
14603 .block_erase = spi_block_erase_60,
14604 }, {
14605 .eraseblocks = { {1024 * 256, 1} },
14606 .block_erase = spi_block_erase_c7,
14607 },
14608 },
14609 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14610 .unlock = spi_disable_blockprotect_bp2_srwd,
14611 .write = spi_aai_write,
14612 .read = spi_chip_read, /* Fast read (0x0B) supported */
14613 .voltage = {1650, 1950},
14614 },
14615
14616 {
14617 .vendor = "SST",
14618 .name = "SST25WF020A",
14619 .bustype = BUS_SPI,
14620 .manufacture_id = SANYO_ID, /* See flashchips.h */
14621 .model_id = SST_SST25WF020A,
14622 .total_size = 256,
14623 .page_size = 256,
14624 .feature_bits = FEATURE_WRSR_WREN,
14625 .tested = TEST_UNTESTED,
14626 .probe = probe_spi_rdid,
14627 .probe_timing = TIMING_ZERO,
14628 .block_erasers =
14629 {
14630 {
14631 .eraseblocks = { {4 * 1024, 64} },
14632 .block_erase = spi_block_erase_20,
14633 }, {
14634 .eraseblocks = { {64 * 1024, 4} },
14635 .block_erase = spi_block_erase_d8,
14636 }, {
14637 .eraseblocks = { {256 * 1024, 1} },
14638 .block_erase = spi_block_erase_60,
14639 }, {
14640 .eraseblocks = { {256 * 1024, 1} },
14641 .block_erase = spi_block_erase_c7,
14642 },
14643 },
14644 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14645 .unlock = spi_disable_blockprotect_bp2_srwd,
14646 .write = spi_chip_write_256,
14647 .read = spi_chip_read, /* Fast read (0x0B) supported */
14648 .voltage = {1650, 1950},
14649 },
14650
14651 {
14652 .vendor = "SST",
14653 .name = "SST25WF040",
14654 .bustype = BUS_SPI,
14655 .manufacture_id = SST_ID,
14656 .model_id = SST_SST25WF040,
14657 .total_size = 512,
14658 .page_size = 256,
14659 .feature_bits = FEATURE_WRSR_EITHER,
14660 .tested = TEST_UNTESTED,
14661 .probe = probe_spi_rdid,
14662 .probe_timing = TIMING_ZERO,
14663 .block_erasers =
14664 {
14665 {
14666 .eraseblocks = { {4 * 1024, 128} },
14667 .block_erase = spi_block_erase_20,
14668 }, {
14669 .eraseblocks = { {32 * 1024, 16} },
14670 .block_erase = spi_block_erase_52,
14671 }, {
14672 .eraseblocks = { {64 * 1024, 8} },
14673 .block_erase = spi_block_erase_d8,
14674 }, {
14675 .eraseblocks = { {1024 * 512, 1} },
14676 .block_erase = spi_block_erase_60,
14677 }, {
14678 .eraseblocks = { {1024 * 512, 1} },
14679 .block_erase = spi_block_erase_c7,
14680 },
14681 },
14682 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14683 .unlock = spi_disable_blockprotect_bp2_srwd,
14684 .write = spi_aai_write,
14685 .read = spi_chip_read, /* Fast read (0x0B) supported */
14686 .voltage = {1650, 1950},
14687 },
14688
14689 {
14690 .vendor = "SST",
14691 .name = "SST25WF040B",
14692 .bustype = BUS_SPI,
14693 .manufacture_id = SANYO_ID, /* See flashchips.h */
14694 .model_id = SST_SST25WF040B,
14695 .total_size = 512,
14696 .page_size = 256,
14697 .feature_bits = FEATURE_WRSR_WREN,
14698 .tested = TEST_UNTESTED,
14699 .probe = probe_spi_rdid,
14700 .probe_timing = TIMING_ZERO,
14701 .block_erasers =
14702 {
14703 {
14704 .eraseblocks = { {4 * 1024, 128} },
14705 .block_erase = spi_block_erase_20,
14706 }, {
14707 .eraseblocks = { {64 * 1024, 8} },
14708 .block_erase = spi_block_erase_d8,
14709 }, {
14710 .eraseblocks = { {512 * 1024, 1} },
14711 .block_erase = spi_block_erase_60,
14712 }, {
14713 .eraseblocks = { {512 * 1024, 1} },
14714 .block_erase = spi_block_erase_c7,
14715 },
14716 },
14717 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14718 .unlock = spi_disable_blockprotect_bp2_srwd,
14719 .write = spi_chip_write_256,
14720 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
14721 .voltage = {1650, 1950},
14722 },
14723
14724 {
14725 .vendor = "SST",
14726 .name = "SST25WF080",
14727 .bustype = BUS_SPI,
14728 .manufacture_id = SST_ID,
14729 .model_id = SST_SST25WF080,
14730 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014731 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000014732 .feature_bits = FEATURE_WRSR_EITHER,
Mark Marshall90021f22010-12-03 14:48:11 +000014733 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014734 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000014735 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014736 .block_erasers =
14737 {
14738 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014739 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014740 .block_erase = spi_block_erase_20,
14741 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014742 .eraseblocks = { {32 * 1024, 32} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014743 .block_erase = spi_block_erase_52,
14744 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014745 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014746 .block_erase = spi_block_erase_d8,
14747 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014748 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014749 .block_erase = spi_block_erase_60,
14750 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014751 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014752 .block_erase = spi_block_erase_c7,
14753 },
14754 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014755 .printlock = spi_prettyprint_status_register_sst25, /* *does* have a BP3 but it is useless */
14756 .unlock = spi_disable_blockprotect_bp3_srwd,
Joshua Roys87955bf2011-08-01 18:39:28 +000014757 .write = spi_aai_write,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014758 .read = spi_chip_read, /* Fast read (0x0B) supported */
14759 .voltage = {1650, 1950},
FENG yu ningff692fb2008-12-08 18:15:10 +000014760 },
14761
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014762 {
14763 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014764 .name = "SST25WF080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014765 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014766 .manufacture_id = SANYO_ID, /* See flashchips.h */
14767 .model_id = SST_SST25WF080B,
14768 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014769 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014770 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerfcf6a8c2011-05-18 01:32:00 +000014771 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014772 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000014773 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014774 .block_erasers =
14775 {
14776 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014777 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014778 .block_erase = spi_block_erase_20,
14779 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014780 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014781 .block_erase = spi_block_erase_d8,
14782 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014783 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014784 .block_erase = spi_block_erase_60,
14785 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014786 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014787 .block_erase = spi_block_erase_c7,
14788 },
14789 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014790 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14791 .unlock = spi_disable_blockprotect_bp2_srwd,
Helge Wagner1db7a442010-10-05 22:29:08 +000014792 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014793 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
14794 .voltage = {1650, 1950},
14795 },
14796
14797 {
14798 .vendor = "SST",
14799 .name = "SST25WF512",
14800 .bustype = BUS_SPI,
14801 .manufacture_id = SST_ID,
14802 .model_id = SST_SST25WF512,
14803 .total_size = 64,
14804 .page_size = 256,
14805 .feature_bits = FEATURE_WRSR_EITHER,
14806 .tested = TEST_UNTESTED,
14807 .probe = probe_spi_rdid,
14808 .probe_timing = TIMING_ZERO,
14809 .block_erasers =
14810 {
14811 {
14812 .eraseblocks = { {4 * 1024, 16} },
14813 .block_erase = spi_block_erase_20,
14814 }, {
14815 .eraseblocks = { {32 * 1024, 2} },
14816 .block_erase = spi_block_erase_52,
14817 }, {
14818 .eraseblocks = { {1024 * 64, 1} },
14819 .block_erase = spi_block_erase_60,
14820 }, {
14821 .eraseblocks = { {1024 * 64, 1} },
14822 .block_erase = spi_block_erase_c7,
14823 },
14824 },
14825 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14826 .unlock = spi_disable_blockprotect_bp2_srwd,
14827 .write = spi_aai_write,
14828 .read = spi_chip_read, /* Fast read (0x0B) supported */
14829 .voltage = {1650, 1950},
Ed Swierk86f4e6d2010-07-21 15:02:22 +000014830 },
14831
14832 {
14833 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010014834 .name = "SST26VF016",
14835 .bustype = BUS_SPI,
14836 .manufacture_id = SST_ID,
14837 .model_id = SST_SST26VF016,
14838 .total_size = 2048,
14839 .page_size = 256,
14840 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14841 .tested = TEST_UNTESTED,
14842 .probe = probe_spi_rdid,
14843 .probe_timing = TIMING_ZERO,
14844 .block_erasers =
14845 {
14846 {
14847 .eraseblocks = { {4 * 1024, 512} },
14848 .block_erase = spi_block_erase_20,
14849 }, {
14850 .eraseblocks = {
14851 {8 * 1024, 4},
14852 {32 * 1024, 1},
14853 {64 * 1024, 30},
14854 {32 * 1024, 1},
14855 {8 * 1024, 4},
14856 },
14857 .block_erase = spi_block_erase_d8,
14858 }, {
14859 .eraseblocks = { {2 * 1024 * 1024, 1} },
14860 .block_erase = spi_block_erase_c7,
14861 },
14862 },
14863 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
14864 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
14865 .write = spi_chip_write_256, /* Multi I/O supported */
14866 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14867 .voltage = {2700, 3600},
14868 },
14869
14870 {
14871 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070014872 .name = "SST26VF016B(A)",
14873 .bustype = BUS_SPI,
14874 .manufacture_id = SST_ID,
14875 .model_id = SST_SST26VF016B,
14876 .total_size = 2048,
14877 .page_size = 256,
14878 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14879 .tested = TEST_OK_PREW,
14880 .probe = probe_spi_rdid,
14881 .probe_timing = TIMING_ZERO,
14882 .block_erasers =
14883 {
14884 {
14885 .eraseblocks = { {4 * 1024, 512} },
14886 .block_erase = spi_block_erase_20,
14887 }, {
14888 .eraseblocks = {
14889 {8 * 1024, 4},
14890 {32 * 1024, 1},
14891 {64 * 1024, 30},
14892 {32 * 1024, 1},
14893 {8 * 1024, 4},
14894 },
14895 .block_erase = spi_block_erase_d8,
14896 }, {
14897 .eraseblocks = { {2 * 1024 * 1024, 1} },
14898 .block_erase = spi_block_erase_c7,
14899 },
14900 },
14901 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
14902 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
14903 .write = spi_chip_write_256, /* Multi I/O supported */
14904 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14905 .voltage = {2700, 3600},
14906 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100014907
Wei Hu25584de2018-04-30 14:02:08 -070014908 {
14909 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010014910 .name = "SST26VF032",
14911 .bustype = BUS_SPI,
14912 .manufacture_id = SST_ID,
14913 .model_id = SST_SST26VF032,
14914 .total_size = 4096,
14915 .page_size = 256,
14916 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14917 .tested = TEST_UNTESTED,
14918 .probe = probe_spi_rdid,
14919 .probe_timing = TIMING_ZERO,
14920 .block_erasers =
14921 {
14922 {
14923 .eraseblocks = { {4 * 1024, 1024} },
14924 .block_erase = spi_block_erase_20,
14925 }, {
14926 .eraseblocks = {
14927 {8 * 1024, 4},
14928 {32 * 1024, 1},
14929 {64 * 1024, 62},
14930 {32 * 1024, 1},
14931 {8 * 1024, 4},
14932 },
14933 .block_erase = spi_block_erase_d8,
14934 }, {
14935 .eraseblocks = { {4 * 1024 * 1024, 1} },
14936 .block_erase = spi_block_erase_c7,
14937 },
14938 },
14939 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
14940 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
14941 .write = spi_chip_write_256, /* Multi I/O supported */
14942 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14943 .voltage = {2700, 3600},
14944 },
14945
14946 {
14947 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070014948 .name = "SST26VF032B(A)",
14949 .bustype = BUS_SPI,
14950 .manufacture_id = SST_ID,
14951 .model_id = SST_SST26VF032B,
14952 .total_size = 4096,
14953 .page_size = 256,
14954 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14955 .tested = TEST_UNTESTED,
14956 .probe = probe_spi_rdid,
14957 .probe_timing = TIMING_ZERO,
14958 .block_erasers =
14959 {
14960 {
14961 .eraseblocks = { {4 * 1024, 1024} },
14962 .block_erase = spi_block_erase_20,
14963 }, {
14964 .eraseblocks = {
14965 {8 * 1024, 4},
14966 {32 * 1024, 1},
14967 {64 * 1024, 62},
14968 {32 * 1024, 1},
14969 {8 * 1024, 4},
14970 },
14971 .block_erase = spi_block_erase_d8,
14972 }, {
14973 .eraseblocks = { {4 * 1024 * 1024, 1} },
14974 .block_erase = spi_block_erase_c7,
14975 },
14976 },
14977 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
14978 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
14979 .write = spi_chip_write_256, /* Multi I/O supported */
14980 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14981 .voltage = {2700, 3600},
14982 },
14983
Wei Hu25584de2018-04-30 14:02:08 -070014984 {
14985 .vendor = "SST",
14986 .name = "SST26VF064B(A)",
14987 .bustype = BUS_SPI,
14988 .manufacture_id = SST_ID,
14989 .model_id = SST_SST26VF064B,
14990 .total_size = 8192,
14991 .page_size = 256,
14992 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14993 .tested = TEST_OK_PREW,
14994 .probe = probe_spi_rdid,
14995 .probe_timing = TIMING_ZERO,
14996 .block_erasers =
14997 {
14998 {
14999 .eraseblocks = { {4 * 1024, 2048} },
15000 .block_erase = spi_block_erase_20,
15001 }, {
15002 .eraseblocks = {
15003 {8 * 1024, 4},
15004 {32 * 1024, 1},
15005 {64 * 1024, 126},
15006 {32 * 1024, 1},
15007 {8 * 1024, 4},
15008 },
15009 .block_erase = spi_block_erase_d8,
15010 }, {
15011 .eraseblocks = { {8 * 1024 * 1024, 1} },
15012 .block_erase = spi_block_erase_c7,
15013 },
15014 },
15015 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
15016 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15017 .write = spi_chip_write_256, /* Multi I/O supported */
15018 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15019 .voltage = {2700, 3600},
15020 },
15021
15022 {
15023 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015024 .name = "SST28SF040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015025 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015026 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015027 .model_id = SST_SST28SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015028 .total_size = 512,
15029 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000015030 .feature_bits = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015031 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015032 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015033 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst28sf040.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015034 .block_erasers =
15035 {
15036 {
15037 .eraseblocks = { {128, 4096} },
15038 .block_erase = erase_sector_28sf040,
15039 }, {
15040 .eraseblocks = { {512 * 1024, 1} },
15041 .block_erase = erase_chip_28sf040,
15042 }
15043 },
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015044 .unlock = unprotect_28sf040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015045 .write = write_28sf040,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015046 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015047 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015048 .prepare_access = prepare_memory_access,
15049 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015050 },
15051
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015052 {
15053 .vendor = "SST",
15054 .name = "SST29EE010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015055 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015056 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015057 .model_id = SST_SST29EE010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015058 .total_size = 128,
15059 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015060 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015061 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015062 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015063 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015064 .block_erasers =
15065 {
15066 {
15067 .eraseblocks = { {128 * 1024, 1} },
15068 .block_erase = erase_chip_block_jedec,
15069 }
15070 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015071 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015072 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015073 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015074 .prepare_access = prepare_memory_access,
15075 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015076 },
15077
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015078 {
15079 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015080 .name = "SST29EE020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015081 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015082 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015083 .model_id = SST_SST29EE020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015084 .total_size = 256,
15085 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015086 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015087 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015088 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000015089 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015090 .block_erasers =
15091 {
15092 {
15093 .eraseblocks = { {256 * 1024, 1} },
15094 .block_erase = erase_chip_block_jedec,
15095 }
15096 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015097 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015098 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015099 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015100 .prepare_access = prepare_memory_access,
15101 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015102 },
15103
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015104 {
15105 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015106 .name = "SST29LE010",
15107 .bustype = BUS_PARALLEL,
15108 .manufacture_id = SST_ID,
15109 .model_id = SST_SST29LE010,
15110 .total_size = 128,
15111 .page_size = 128,
15112 .feature_bits = FEATURE_LONG_RESET,
15113 .tested = TEST_UNTESTED,
15114 .probe = probe_jedec,
15115 .probe_timing = 10,
15116 .block_erasers =
15117 {
15118 {
15119 .eraseblocks = { {128 * 1024, 1} },
15120 .block_erase = erase_chip_block_jedec,
15121 }
15122 },
15123 .write = write_jedec,
15124 .read = read_memmapped,
15125 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015126 .prepare_access = prepare_memory_access,
15127 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015128 },
15129
15130 {
15131 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015132 .name = "SST29LE020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015133 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015134 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015135 .model_id = SST_SST29LE020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015136 .total_size = 256,
15137 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015138 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015139 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015140 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015141 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015142 .block_erasers =
15143 {
15144 {
15145 .eraseblocks = { {256 * 1024, 1} },
15146 .block_erase = erase_chip_block_jedec,
15147 }
15148 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015149 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015150 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015151 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015152 .prepare_access = prepare_memory_access,
15153 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015154 },
15155
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015156 {
15157 .vendor = "SST",
15158 .name = "SST39SF010A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015159 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015160 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015161 .model_id = SST_SST39SF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015162 .total_size = 128,
15163 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015164 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000015165 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015166 .probe = probe_jedec,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000015167 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015168 .block_erasers =
15169 {
15170 {
15171 .eraseblocks = { {4 * 1024, 32} },
15172 .block_erase = erase_sector_jedec,
15173 }, {
15174 .eraseblocks = { {128 * 1024, 1} },
15175 .block_erase = erase_chip_block_jedec,
15176 }
15177 },
Sean Nelson35727f72010-01-28 23:55:12 +000015178 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015179 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015180 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015181 .prepare_access = prepare_memory_access,
15182 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015183 },
15184
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015185 {
15186 .vendor = "SST",
15187 .name = "SST39SF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015188 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015189 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015190 .model_id = SST_SST39SF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015191 .total_size = 256,
15192 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015193 .feature_bits = FEATURE_EITHER_RESET,
Uwe Hermann19f46f22011-06-18 22:56:14 +000015194 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015195 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015196 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015197 .block_erasers =
15198 {
15199 {
15200 .eraseblocks = { {4 * 1024, 64} },
15201 .block_erase = erase_sector_jedec,
15202 }, {
15203 .eraseblocks = { {256 * 1024, 1} },
15204 .block_erase = erase_chip_block_jedec,
15205 }
15206 },
Sean Nelson35727f72010-01-28 23:55:12 +000015207 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015208 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015209 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015210 .prepare_access = prepare_memory_access,
15211 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015212 },
15213
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015214 {
15215 .vendor = "SST",
15216 .name = "SST39SF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015217 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015218 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015219 .model_id = SST_SST39SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015220 .total_size = 512,
15221 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015222 .feature_bits = FEATURE_EITHER_RESET,
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000015223 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015224 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015225 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015226 .block_erasers =
15227 {
15228 {
15229 .eraseblocks = { {4 * 1024, 128} },
15230 .block_erase = erase_sector_jedec,
15231 }, {
15232 .eraseblocks = { {512 * 1024, 1} },
15233 .block_erase = erase_chip_block_jedec,
15234 }
15235 },
Sean Nelson35727f72010-01-28 23:55:12 +000015236 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015237 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015238 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015239 .prepare_access = prepare_memory_access,
15240 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015241 },
15242
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015243 {
15244 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015245 .name = "SST39SF512",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015246 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015247 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015248 .model_id = SST_SST39SF512,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015249 .total_size = 64,
15250 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015251 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd7d423b2012-10-20 09:13:16 +000015252 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015253 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015254 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015255 .block_erasers =
15256 {
15257 {
15258 .eraseblocks = { {4 * 1024, 16} },
15259 .block_erase = erase_sector_jedec,
15260 }, {
15261 .eraseblocks = { {64 * 1024, 1} },
15262 .block_erase = erase_chip_block_jedec,
15263 }
15264 },
Sean Nelson35727f72010-01-28 23:55:12 +000015265 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015266 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015267 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015268 .prepare_access = prepare_memory_access,
15269 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015270 },
15271
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015272 {
15273 .vendor = "SST",
15274 .name = "SST39VF010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015275 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015276 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015277 .model_id = SST_SST39VF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015278 .total_size = 128,
15279 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015280 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd94d25d2012-07-28 03:17:15 +000015281 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015282 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015283 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015284 .block_erasers =
15285 {
15286 {
15287 .eraseblocks = { {4 * 1024, 32} },
15288 .block_erase = erase_sector_jedec,
15289 }, {
15290 .eraseblocks = { {128 * 1024, 1} },
15291 .block_erase = erase_chip_block_jedec,
15292 }
15293 },
Sean Nelson35727f72010-01-28 23:55:12 +000015294 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015295 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015296 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015297 .prepare_access = prepare_memory_access,
15298 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015299 },
15300
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015301 {
15302 .vendor = "SST",
15303 .name = "SST39VF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015304 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015305 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015306 .model_id = SST_SST39VF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015307 .total_size = 256,
15308 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015309 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner5c316f92015-02-08 21:57:52 +000015310 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015311 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015312 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015313 .block_erasers =
15314 {
15315 {
15316 .eraseblocks = { {4 * 1024, 64} },
15317 .block_erase = erase_sector_jedec,
15318 }, {
15319 .eraseblocks = { {256 * 1024, 1} },
15320 .block_erase = erase_chip_block_jedec,
15321 }
15322 },
Sean Nelson35727f72010-01-28 23:55:12 +000015323 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015324 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015325 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015326 .prepare_access = prepare_memory_access,
15327 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015328 },
15329
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015330 {
15331 .vendor = "SST",
15332 .name = "SST39VF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015333 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015334 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015335 .model_id = SST_SST39VF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015336 .total_size = 512,
15337 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015338 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015339 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015340 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015341 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015342 .block_erasers =
15343 {
15344 {
15345 .eraseblocks = { {4 * 1024, 128} },
15346 .block_erase = erase_sector_jedec,
15347 }, {
15348 .eraseblocks = { {512 * 1024, 1} },
15349 .block_erase = erase_chip_block_jedec,
15350 }
15351 },
Sean Nelson35727f72010-01-28 23:55:12 +000015352 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015353 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015354 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015355 .prepare_access = prepare_memory_access,
15356 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger90eff152008-12-08 23:51:45 +000015357 },
FENG yu ningff692fb2008-12-08 18:15:10 +000015358
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015359 {
15360 .vendor = "SST",
Peter Stuge8440cc02009-01-25 23:55:12 +000015361 .name = "SST39VF080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015362 .bustype = BUS_PARALLEL,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000015363 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015364 .model_id = SST_SST39VF080,
Peter Stuge8440cc02009-01-25 23:55:12 +000015365 .total_size = 1024,
15366 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015367 .feature_bits = FEATURE_EITHER_RESET,
Peter Stuge8440cc02009-01-25 23:55:12 +000015368 .tested = TEST_UNTESTED,
15369 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015370 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015371 .block_erasers =
15372 {
15373 {
15374 .eraseblocks = { {4 * 1024, 256} },
15375 .block_erase = erase_sector_jedec,
15376 }, {
15377 .eraseblocks = { {64 * 1024, 16} },
15378 .block_erase = erase_block_jedec,
15379 }, {
15380 .eraseblocks = { {1024 * 1024, 1} },
15381 .block_erase = erase_chip_block_jedec,
15382 }
15383 },
Sean Nelson35727f72010-01-28 23:55:12 +000015384 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015385 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015386 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015387 .prepare_access = prepare_memory_access,
15388 .finish_access = finish_memory_access,
Peter Stuge8440cc02009-01-25 23:55:12 +000015389 },
15390
15391 {
15392 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015393 .name = "SST39VF512",
15394 .bustype = BUS_PARALLEL,
15395 .manufacture_id = SST_ID,
15396 .model_id = SST_SST39VF512,
15397 .total_size = 64,
15398 .page_size = 4096,
15399 .feature_bits = FEATURE_EITHER_RESET,
15400 .tested = TEST_OK_PREW,
15401 .probe = probe_jedec,
15402 .probe_timing = 1, /* 150 ns */
15403 .block_erasers =
15404 {
15405 {
15406 .eraseblocks = { {4 * 1024, 16} },
15407 .block_erase = erase_sector_jedec,
15408 }, {
15409 .eraseblocks = { {64 * 1024, 1} },
15410 .block_erase = erase_chip_block_jedec,
15411 }
15412 },
15413 .write = write_jedec_1,
15414 .read = read_memmapped,
15415 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015416 .prepare_access = prepare_memory_access,
15417 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015418 },
15419
15420 {
15421 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015422 .name = "SST49LF002A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015423 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015424 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015425 .model_id = SST_SST49LF002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015426 .total_size = 256,
15427 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015428 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000015429 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015430 .probe = probe_jedec,
15431 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015432 .block_erasers =
15433 {
15434 {
15435 .eraseblocks = { {4 * 1024, 64} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015436 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015437 }, {
15438 .eraseblocks = { {16 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015439 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015440 }, {
15441 .eraseblocks = { {256 * 1024, 1} },
15442 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15443 }
15444 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015445 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015446 .unlock = unlock_sst_fwhub,
15447 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015448 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015449 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015450 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015451 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015452 },
15453
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015454 {
15455 .vendor = "SST",
15456 .name = "SST49LF003A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015457 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015458 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015459 .model_id = SST_SST49LF003A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015460 .total_size = 384,
15461 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015462 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000015463 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015464 .probe = probe_jedec,
15465 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015466 .block_erasers =
15467 {
15468 {
15469 .eraseblocks = { {4 * 1024, 96} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015470 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015471 }, {
15472 .eraseblocks = { {64 * 1024, 6} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015473 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015474 }, {
15475 .eraseblocks = { {384 * 1024, 1} },
15476 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15477 }
15478 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015479 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015480 .unlock = unlock_sst_fwhub,
15481 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015482 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015483 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015484 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015485 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015486 },
15487
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015488 {
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015489 /* Contrary to the data sheet, TBL# on the SST49LF004B affects the top 128kB (instead of 64kB)
15490 * and is only honored for 64k block erase, but not 4k sector erase.
15491 */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015492 .vendor = "SST",
15493 .name = "SST49LF004A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015494 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015495 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015496 .model_id = SST_SST49LF004A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015497 .total_size = 512,
15498 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015499 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000015500 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015501 .probe = probe_jedec,
15502 .probe_timing = 1, /* 150 ns */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015503 .block_erasers =
15504 {
15505 {
15506 .eraseblocks = { {4 * 1024, 128} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015507 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015508 }, {
15509 .eraseblocks = { {64 * 1024, 8} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015510 .block_erase = erase_block_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015511 }, {
15512 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson51c83fb2010-01-20 20:55:53 +000015513 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015514 },
15515 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015516 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015517 .unlock = unlock_sst_fwhub,
15518 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015519 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015520 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015521 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015522 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015523 },
15524
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015525 {
15526 .vendor = "SST",
15527 .name = "SST49LF004C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015528 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015529 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015530 .model_id = SST_SST49LF004C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015531 .total_size = 512,
15532 .page_size = 4 * 1024,
15533 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015534 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015535 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015536 .block_erasers =
15537 {
15538 {
15539 .eraseblocks = { {4 * 1024, 128} },
15540 .block_erase = erase_sector_49lfxxxc,
15541 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015542 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015543 {64 * 1024, 7},
15544 {32 * 1024, 1},
15545 {8 * 1024, 2},
15546 {16 * 1024, 1},
15547 },
Sean Nelson69e58112010-03-23 17:10:28 +000015548 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015549 }
15550 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015551 .printlock = printlock_regspace2_block_eraser_1,
15552 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015553 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015554 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015555 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015556 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015557 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015558 },
15559
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015560 {
15561 .vendor = "SST",
15562 .name = "SST49LF008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015563 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015564 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015565 .model_id = SST_SST49LF008A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015566 .total_size = 1024,
15567 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015568 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000015569 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015570 .probe = probe_jedec,
15571 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015572 .block_erasers =
15573 {
15574 {
15575 .eraseblocks = { {4 * 1024, 256} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015576 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015577 }, {
15578 .eraseblocks = { {64 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015579 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015580 }, {
15581 .eraseblocks = { {1024 * 1024, 1} },
15582 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15583 }
15584 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015585 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015586 .unlock = unlock_sst_fwhub,
15587 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015588 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015589 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015590 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015591 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015592 },
15593
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015594 {
15595 .vendor = "SST",
15596 .name = "SST49LF008C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015597 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015598 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015599 .model_id = SST_SST49LF008C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015600 .total_size = 1024,
15601 .page_size = 4 * 1024,
15602 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015603 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015604 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015605 .block_erasers =
15606 {
15607 {
15608 .eraseblocks = { {4 * 1024, 256} },
15609 .block_erase = erase_sector_49lfxxxc,
15610 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015611 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015612 {64 * 1024, 15},
15613 {32 * 1024, 1},
15614 {8 * 1024, 2},
15615 {16 * 1024, 1},
15616 },
Sean Nelson69e58112010-03-23 17:10:28 +000015617 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015618 }
15619 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015620 .printlock = printlock_regspace2_block_eraser_1,
15621 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015622 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015623 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015624 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015625 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015626 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015627 },
15628
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015629 {
15630 .vendor = "SST",
15631 .name = "SST49LF016C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015632 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015633 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015634 .model_id = SST_SST49LF016C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015635 .total_size = 2048,
15636 .page_size = 4 * 1024,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015637 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015638 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015639 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015640 .block_erasers =
15641 {
15642 {
15643 .eraseblocks = { {4 * 1024, 512} },
15644 .block_erase = erase_sector_49lfxxxc,
15645 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015646 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015647 {64 * 1024, 31},
15648 {32 * 1024, 1},
15649 {8 * 1024, 2},
15650 {16 * 1024, 1},
15651 },
Sean Nelson69e58112010-03-23 17:10:28 +000015652 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015653 }
15654 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015655 .printlock = printlock_regspace2_block_eraser_1,
15656 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015657 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015658 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015659 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015660 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015661 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015662 },
15663
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015664 {
15665 .vendor = "SST",
15666 .name = "SST49LF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015667 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015668 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015669 .model_id = SST_SST49LF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015670 .total_size = 256,
15671 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015672 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner8179be52011-06-04 13:13:34 +000015673 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015674 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015675 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015676 .block_erasers =
15677 {
15678 {
15679 .eraseblocks = { {4 * 1024, 64} },
15680 .block_erase = erase_sector_jedec,
15681 }, {
15682 .eraseblocks = { {16 * 1024, 16} },
15683 .block_erase = erase_block_jedec,
15684 }, {
15685 .eraseblocks = { {256 * 1024, 1} },
15686 .block_erase = NULL,
15687 }
15688 },
Sean Nelson35727f72010-01-28 23:55:12 +000015689 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015690 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015691 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015692 .prepare_access = prepare_memory_access,
15693 .finish_access = finish_memory_access,
Sven Schnellec208dfb2009-01-07 12:35:09 +000015694 },
15695
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015696 {
15697 .vendor = "SST",
15698 .name = "SST49LF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015699 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015700 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015701 .model_id = SST_SST49LF020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015702 .total_size = 256,
Carl-Daniel Hailfingerda654322009-07-23 01:44:38 +000015703 .page_size = 4 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015704 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015705 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015706 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015707 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015708 .block_erasers =
15709 {
15710 {
15711 .eraseblocks = { {4 * 1024, 64} },
15712 .block_erase = erase_sector_jedec,
15713 }, {
15714 .eraseblocks = { {16 * 1024, 16} },
15715 .block_erase = erase_block_jedec,
15716 }, {
15717 .eraseblocks = { {256 * 1024, 1} },
15718 .block_erase = NULL,
15719 }
15720 },
Sean Nelson35727f72010-01-28 23:55:12 +000015721 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015722 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015723 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015724 .prepare_access = prepare_memory_access,
15725 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015726 },
15727
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015728 {
15729 .vendor = "SST",
15730 .name = "SST49LF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015731 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015732 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015733 .model_id = SST_SST49LF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015734 .total_size = 512,
15735 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015736 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000015737 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015738 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015739 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015740 .block_erasers =
15741 {
15742 {
15743 .eraseblocks = { {4 * 1024, 128} },
15744 .block_erase = erase_sector_jedec,
15745 }, {
15746 .eraseblocks = { {64 * 1024, 8} },
15747 .block_erase = erase_block_jedec,
15748 }, {
15749 .eraseblocks = { {512 * 1024, 1} },
15750 .block_erase = NULL,
15751 }
15752 },
Sean Nelson35727f72010-01-28 23:55:12 +000015753 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015754 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015755 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015756 .prepare_access = prepare_memory_access,
15757 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015758 },
15759
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015760 {
15761 .vendor = "SST",
15762 .name = "SST49LF040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015763 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015764 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015765 .model_id = SST_SST49LF040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015766 .total_size = 512,
15767 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015768 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015769 .tested = TEST_OK_PREW,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015770 .probe = probe_jedec,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015771 .probe_timing = 1, /* 150ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015772 .block_erasers =
15773 {
15774 {
15775 .eraseblocks = { {4 * 1024, 128} },
15776 .block_erase = erase_sector_jedec,
15777 }, {
15778 .eraseblocks = { {64 * 1024, 8} },
15779 .block_erase = erase_block_jedec,
15780 }, {
15781 .eraseblocks = { {512 * 1024, 1} },
15782 .block_erase = NULL,
15783 }
15784 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015785 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000015786 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015787 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015788 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015789 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015790 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015791 },
15792
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015793 {
15794 .vendor = "SST",
15795 .name = "SST49LF080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015796 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015797 .manufacture_id = SST_ID,
Elyes HAOUAS124ef382018-03-27 12:15:09 +020015798 .model_id = SST_SST49LF080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015799 .total_size = 1024,
15800 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015801 .feature_bits = FEATURE_EITHER_RESET,
Brandon Dowdyf07bf322011-03-06 18:31:11 +000015802 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015803 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015804 .probe_timing = TIMING_FIXME,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015805 .block_erasers =
15806 {
15807 {
15808 .eraseblocks = { {4 * 1024, 256} },
15809 .block_erase = erase_sector_jedec,
15810 }, {
15811 .eraseblocks = { {64 * 1024, 16} },
15812 .block_erase = erase_block_jedec,
15813 }, {
15814 .eraseblocks = { {1024 * 1024, 1} },
15815 .block_erase = NULL,
15816 }
15817 },
Sean Nelson35727f72010-01-28 23:55:12 +000015818 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015819 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015820 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015821 .prepare_access = prepare_memory_access,
15822 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015823 },
15824
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015825 {
15826 .vendor = "SST",
15827 .name = "SST49LF160C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015828 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015829 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015830 .model_id = SST_SST49LF160C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015831 .total_size = 2048,
15832 .page_size = 4 * 1024,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015833 .tested = TEST_OK_PR,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015834 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015835 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015836 .block_erasers =
15837 {
15838 {
15839 .eraseblocks = { {4 * 1024, 512} },
15840 .block_erase = erase_sector_49lfxxxc,
15841 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015842 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015843 {64 * 1024, 31},
15844 {32 * 1024, 1},
15845 {8 * 1024, 2},
15846 {16 * 1024, 1},
15847 },
Sean Nelson69e58112010-03-23 17:10:28 +000015848 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015849 }
15850 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015851 .printlock = printlock_regspace2_block_eraser_1,
15852 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015853 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015854 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015855 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015856 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015857 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015858 },
15859
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015860 {
15861 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015862 .name = "M29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015863 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015864 .manufacture_id = ST_ID,
15865 .model_id = ST_M29F002B,
15866 .total_size = 256,
15867 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015868 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015869 .tested = TEST_UNTESTED,
15870 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000015871 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000015872 .block_erasers =
15873 {
15874 {
15875 .eraseblocks = {
15876 {16 * 1024, 1},
15877 {8 * 1024, 2},
15878 {32 * 1024, 1},
15879 {64 * 1024, 3},
15880 },
15881 .block_erase = erase_sector_jedec,
15882 }, {
15883 .eraseblocks = { {256 * 1024, 1} },
15884 .block_erase = erase_chip_block_jedec,
15885 }
15886 },
Sean Nelson35727f72010-01-28 23:55:12 +000015887 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015888 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000015889 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010015890 .prepare_access = prepare_memory_access,
15891 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015892 },
15893
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015894 {
15895 .vendor = "ST",
15896 .name = "M29F002T/NT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015897 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015898 .manufacture_id = ST_ID,
15899 .model_id = ST_M29F002T,
15900 .total_size = 256,
15901 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015902 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stefan Taunere34e3e82013-01-01 00:06:51 +000015903 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015904 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000015905 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000015906 .block_erasers =
15907 {
15908 {
15909 .eraseblocks = {
15910 {64 * 1024, 3},
15911 {32 * 1024, 1},
15912 {8 * 1024, 2},
15913 {16 * 1024, 1},
15914 },
15915 .block_erase = erase_sector_jedec,
15916 }, {
15917 .eraseblocks = { {256 * 1024, 1} },
15918 .block_erase = erase_chip_block_jedec,
15919 }
15920 },
Sean Nelson35727f72010-01-28 23:55:12 +000015921 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015922 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000015923 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010015924 .prepare_access = prepare_memory_access,
15925 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015926 },
15927
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015928 {
15929 .vendor = "ST",
15930 .name = "M29F040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015931 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015932 .manufacture_id = ST_ID,
15933 .model_id = ST_M29F040B,
15934 .total_size = 512,
15935 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015936 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
15937 .tested = TEST_UNTESTED,
15938 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000015939 .probe_timing = TIMING_ZERO, /* datasheet specifies no timing */
Sean Nelson56358aa2010-01-19 16:08:51 +000015940 .block_erasers =
15941 {
15942 {
Stefan Tauner6697f712014-08-06 15:09:15 +000015943 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000015944 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000015945 }, {
15946 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000015947 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000015948 }
15949 },
Sean Nelson35727f72010-01-28 23:55:12 +000015950 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015951 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015952 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015953 .prepare_access = prepare_memory_access,
15954 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015955 },
15956
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015957 {
Sean Nelson35727f72010-01-28 23:55:12 +000015958 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015959 .vendor = "ST",
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000015960 .name = "M29F400BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015961 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000015962 .manufacture_id = ST_ID,
15963 .model_id = ST_M29F400BB,
15964 .total_size = 512,
15965 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000015966 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015967 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000015968 .probe = probe_jedec,
15969 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000015970 .block_erasers =
15971 {
15972 {
15973 .eraseblocks = {
15974 {16 * 1024, 1},
15975 {8 * 1024, 2},
15976 {32 * 1024, 1},
15977 {64 * 1024, 7},
15978 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000015979 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000015980 }, {
15981 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000015982 .block_erase = erase_chip_block_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000015983 }
15984 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000015985 .write = write_jedec_1,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000015986 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015987 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015988 .prepare_access = prepare_memory_access,
15989 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000015990 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100015991
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000015992 {
15993 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
15994 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015995 .name = "M29F400BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015996 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015997 .manufacture_id = ST_ID,
15998 .model_id = ST_M29F400BT,
15999 .total_size = 512,
16000 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016001 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016002 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016003 .probe = probe_jedec,
16004 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson56358aa2010-01-19 16:08:51 +000016005 .block_erasers =
16006 {
16007 {
16008 .eraseblocks = {
16009 {64 * 1024, 7},
16010 {32 * 1024, 1},
16011 {8 * 1024, 2},
16012 {16 * 1024, 1},
16013 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016014 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016015 }, {
16016 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016017 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016018 }
16019 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016020 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016021 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016022 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016023 .prepare_access = prepare_memory_access,
16024 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016025 },
16026
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016027 {
16028 .vendor = "ST",
16029 .name = "M29W010B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016030 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016031 .manufacture_id = ST_ID,
16032 .model_id = ST_M29W010B,
16033 .total_size = 128,
16034 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016035 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016036 .tested = TEST_UNTESTED,
16037 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016038 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016039 .block_erasers =
16040 {
16041 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016042 .eraseblocks = { {16 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000016043 .block_erase = erase_sector_jedec,
16044 }, {
16045 .eraseblocks = { {128 * 1024, 1} },
16046 .block_erase = erase_chip_block_jedec,
16047 }
16048 },
Sean Nelson35727f72010-01-28 23:55:12 +000016049 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016050 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016051 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016052 .prepare_access = prepare_memory_access,
16053 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016054 },
16055
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016056 {
16057 .vendor = "ST",
16058 .name = "M29W040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016059 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016060 .manufacture_id = ST_ID,
16061 .model_id = ST_M29W040B,
16062 .total_size = 512,
16063 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016064 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016065 .tested = TEST_UNTESTED,
16066 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016067 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016068 .block_erasers =
16069 {
16070 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016071 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000016072 .block_erase = erase_sector_jedec,
16073 }, {
16074 .eraseblocks = { {512 * 1024, 1} },
16075 .block_erase = erase_chip_block_jedec,
16076 }
16077 },
Sean Nelson35727f72010-01-28 23:55:12 +000016078 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016079 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016080 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016081 .prepare_access = prepare_memory_access,
16082 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016083 },
16084
Stefan Taunereb582572012-09-21 12:52:50 +000016085 {
16086 .vendor = "ST",
16087 .name = "M29W512B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016088 .bustype = BUS_PARALLEL,
Alan Greenfa3fcd32019-06-27 15:41:50 +100016089 .manufacture_id = ST_ID,
Stefan Taunereb582572012-09-21 12:52:50 +000016090 .model_id = ST_M29W512B,
16091 .total_size = 64,
16092 .page_size = 64 * 1024,
16093 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stefan Tauner0554ca52013-07-25 22:54:25 +000016094 .tested = TEST_OK_PREW,
Stefan Taunereb582572012-09-21 12:52:50 +000016095 .probe = probe_jedec,
16096 .probe_timing = TIMING_ZERO,
16097 .block_erasers =
16098 {
16099 {
16100 .eraseblocks = { {64 * 1024, 1} },
16101 .block_erase = erase_chip_block_jedec,
16102 }
16103 },
16104 .write = write_jedec_1,
16105 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016106 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016107 .prepare_access = prepare_memory_access,
16108 .finish_access = finish_memory_access,
Stefan Taunereb582572012-09-21 12:52:50 +000016109 },
Jeffrey A. Kentba7c9222010-02-01 05:49:46 +000016110
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016111 {
16112 .vendor = "ST",
16113 .name = "M50FLW040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016114 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016115 .manufacture_id = ST_ID,
16116 .model_id = ST_M50FLW040A,
16117 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016118 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016119 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016120 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016121 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016122 .block_erasers =
16123 {
16124 {
Sean Nelson329bde72010-01-19 16:39:19 +000016125 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016126 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016127 {64 * 1024, 5}, /* block */
16128 {4 * 1024, 16}, /* sector */
16129 {4 * 1024, 16}, /* sector */
16130 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016131 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016132 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016133 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016134 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016135 }
16136 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016137 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100016138 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016139 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016140 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016141 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016142 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016143 },
16144
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016145 {
16146 .vendor = "ST",
16147 .name = "M50FLW040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016148 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016149 .manufacture_id = ST_ID,
16150 .model_id = ST_M50FLW040B,
16151 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016152 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016153 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016154 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016155 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016156 .block_erasers =
16157 {
16158 {
Sean Nelson329bde72010-01-19 16:39:19 +000016159 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016160 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016161 {4 * 1024, 16}, /* sector */
16162 {64 * 1024, 5}, /* block */
16163 {4 * 1024, 16}, /* sector */
16164 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016165 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016166 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016167 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016168 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016169 }
16170 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016171 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100016172 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016173 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016174 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016175 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016176 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016177 },
16178
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016179 {
16180 .vendor = "ST",
16181 .name = "M50FLW080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016182 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016183 .manufacture_id = ST_ID,
16184 .model_id = ST_M50FLW080A,
16185 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016186 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016187 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000016188 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016189 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016190 .block_erasers =
16191 {
16192 {
Sean Nelson329bde72010-01-19 16:39:19 +000016193 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016194 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016195 {64 * 1024, 13}, /* block */
16196 {4 * 1024, 16}, /* sector */
16197 {4 * 1024, 16}, /* sector */
16198 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016199 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016200 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016201 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016202 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016203 }
16204 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016205 .printlock = printlock_regspace2_block_eraser_0,
16206 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016207 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016208 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016209 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016210 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016211 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016212 },
16213
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016214 {
16215 .vendor = "ST",
16216 .name = "M50FLW080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016217 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016218 .manufacture_id = ST_ID,
16219 .model_id = ST_M50FLW080B,
16220 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016221 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016222 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016223 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016224 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016225 .block_erasers =
16226 {
16227 {
Sean Nelson329bde72010-01-19 16:39:19 +000016228 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016229 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016230 {4 * 1024, 16}, /* sector */
16231 {64 * 1024, 13}, /* block */
16232 {4 * 1024, 16}, /* sector */
16233 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016234 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016235 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016236 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016237 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016238 }
16239 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016240 .printlock = printlock_regspace2_block_eraser_0,
16241 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016242 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016243 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016244 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016245 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016246 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016247 },
16248
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016249 {
16250 .vendor = "ST",
16251 .name = "M50FW002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016252 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016253 .manufacture_id = ST_ID,
16254 .model_id = ST_M50FW002,
16255 .total_size = 256,
Stefan Tauner4404f732013-09-12 08:28:56 +000016256 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016257 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000016258 .probe = probe_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016259 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016260 .block_erasers =
16261 {
16262 {
16263 .eraseblocks = {
16264 {64 * 1024, 3},
16265 {32 * 1024, 1},
16266 {8 * 1024, 2},
16267 {16 * 1024, 1},
16268 },
Sean Nelson28accc22010-03-19 18:47:06 +000016269 .block_erase = erase_block_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016270 }, {
Stefan Tauner5c316f92015-02-08 21:57:52 +000016271 .eraseblocks = { {256 * 1024, 1} },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016272 .block_erase = NULL, /* Only in A/A mux mode */
Sean Nelson56358aa2010-01-19 16:08:51 +000016273 }
16274 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016275 .printlock = printlock_regspace2_block_eraser_0,
16276 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016277 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016278 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016279 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016280 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016281 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016282 },
16283
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016284 {
16285 .vendor = "ST",
16286 .name = "M50FW016",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016287 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016288 .manufacture_id = ST_ID,
16289 .model_id = ST_M50FW016,
16290 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000016291 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016292 .tested = TEST_UNTESTED,
16293 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016294 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016295 .block_erasers =
16296 {
16297 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016298 .eraseblocks = { {64 * 1024, 32} },
Sean Nelson28accc22010-03-19 18:47:06 +000016299 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016300 }
16301 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016302 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016303 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016304 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016305 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016306 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016307 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016308 },
16309
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016310 {
16311 .vendor = "ST",
16312 .name = "M50FW040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016313 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016314 .manufacture_id = ST_ID,
16315 .model_id = ST_M50FW040,
16316 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016317 .page_size = 0,
Sean Nelson28accc22010-03-19 18:47:06 +000016318 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016319 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016320 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016321 .block_erasers =
16322 {
16323 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016324 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016325 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016326 }
16327 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016328 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016329 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016330 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016331 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016332 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016333 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016334 },
16335
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016336 {
16337 .vendor = "ST",
16338 .name = "M50FW080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016339 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016340 .manufacture_id = ST_ID,
16341 .model_id = ST_M50FW080,
16342 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016343 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016344 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016345 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016346 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016347 .block_erasers =
16348 {
16349 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016350 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016351 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016352 }
16353 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016354 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016355 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016356 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016357 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016358 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016359 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016360 },
16361
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016362 {
16363 .vendor = "ST",
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016364 .name = "M50LPW080",
16365 .bustype = BUS_LPC, /* A/A Mux */
16366 .manufacture_id = ST_ID,
16367 .model_id = ST_M50LPW080,
16368 .total_size = 1024,
16369 .page_size = 0,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016370 .tested = TEST_UNTESTED,
16371 .probe = probe_82802ab,
16372 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
16373 .block_erasers =
16374 {
16375 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016376 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016377 .block_erase = erase_block_82802ab,
16378 }
16379 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016380 .unlock = unlock_regspace2_uniform_64k,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016381 .write = write_82802ab,
16382 .read = read_memmapped,
16383 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016384 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016385 .finish_access = finish_memory_access,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016386 },
16387
16388 {
16389 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016390 .name = "M50LPW116",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016391 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016392 .manufacture_id = ST_ID,
16393 .model_id = ST_M50LPW116,
16394 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000016395 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016396 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016397 .probe = probe_82802ab,
Udu Ogahc04ee222009-09-05 01:31:32 +000016398 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016399 .block_erasers =
16400 {
16401 {
16402 .eraseblocks = {
16403 {4 * 1024, 16},
16404 {64 * 1024, 30},
16405 {32 * 1024, 1},
16406 {8 * 1024, 2},
16407 {16 * 1024, 1},
16408 },
Sean Nelson28accc22010-03-19 18:47:06 +000016409 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016410 }
16411 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016412 .printlock = printlock_regspace2_block_eraser_0,
16413 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016414 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016415 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016416 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016417 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016418 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016419 },
16420
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016421 {
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030016422 .vendor = "ST",
16423 .name = "M95M02",
16424 .bustype = BUS_SPI,
16425 .manufacture_id = ST_ID,
16426 .model_id = ST_M95M02,
16427 .total_size = 256,
16428 .page_size = 256,
16429 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
16430 .tested = TEST_OK_PREW,
Nico Huber54557862023-05-15 12:01:04 +020016431 .spi_cmd_set = SPI95,
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030016432 .probe = probe_spi_st95,
16433 .probe_timing = TIMING_ZERO,
16434 .block_erasers =
16435 {
16436 {
16437 .eraseblocks = { {256 * 1024, 1} },
16438 .block_erase = spi_block_erase_emulation,
16439 }
16440 },
16441
16442 .printlock = spi_prettyprint_status_register_bp1_srwd,
16443 .unlock = spi_disable_blockprotect_bp1_srwd,
16444 .write = spi_chip_write_256,
16445 .read = spi_chip_read,
16446 .voltage = {2500, 5500},
16447 },
16448
16449 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100016450 .vendor = "Sanyo",
16451 .name = "LE25FU106B",
16452 .bustype = BUS_SPI,
16453 .manufacture_id = SANYO_ID,
16454 .model_id = SANYO_LE25FU106B,
16455 .total_size = 128,
16456 .page_size = 256,
16457 .feature_bits = FEATURE_WRSR_WREN,
16458 .tested = TEST_UNTESTED,
16459 .probe = probe_spi_res2,
16460 .probe_timing = TIMING_ZERO,
16461 .block_erasers =
16462 {
16463 /* FIXME: Is this correct?
16464 {
16465 .eraseblocks = { {2 * 1024, 64} },
16466 .block_erase = spi_block_erase_d7,
16467 },*/
16468 {
16469 .eraseblocks = { {32 * 1024, 4} },
16470 .block_erase = spi_block_erase_d8,
16471 }, {
16472 .eraseblocks = { {128 * 1024, 1} },
16473 .block_erase = spi_block_erase_c7,
16474 }
16475 },
16476 .printlock = spi_prettyprint_status_register_bp1_srwd,
16477 .unlock = spi_disable_blockprotect_bp1_srwd,
16478 .write = spi_chip_write_256,
16479 .read = spi_chip_read,
16480 .voltage = {2300, 3600},
16481 },
16482
16483 {
16484 .vendor = "Sanyo",
16485 .name = "LE25FU206",
16486 .bustype = BUS_SPI,
16487 .manufacture_id = SANYO_ID,
16488 .model_id = SANYO_LE25FU206,
16489 .total_size = 256,
16490 .page_size = 256,
16491 .feature_bits = FEATURE_WRSR_WREN,
16492 .tested = TEST_UNTESTED,
16493 .probe = probe_spi_res2,
16494 .probe_timing = TIMING_ZERO,
16495 .block_erasers =
16496 {
16497 {
16498 .eraseblocks = { {4 * 1024, 64} },
16499 .block_erase = spi_block_erase_d7,
16500 }, {
16501 .eraseblocks = { {64 * 1024, 4} },
16502 .block_erase = spi_block_erase_d8,
16503 }, {
16504 .eraseblocks = { {256 * 1024, 1} },
16505 .block_erase = spi_block_erase_c7,
16506 }
16507 },
16508 .printlock = spi_prettyprint_status_register_bp1_srwd,
16509 .unlock = spi_disable_blockprotect_bp1_srwd,
16510 .write = spi_chip_write_256,
16511 .read = spi_chip_read,
16512 .voltage = {2300, 3600},
16513 },
16514
16515 {
16516 .vendor = "Sanyo",
16517 .name = "LE25FU206A",
16518 .bustype = BUS_SPI,
16519 .manufacture_id = SANYO_ID,
16520 .model_id = SANYO_LE25FU206A,
16521 .total_size = 256,
16522 .page_size = 256,
16523 .tested = TEST_UNTESTED,
16524 .probe = probe_spi_rdid,
16525 .probe_timing = TIMING_ZERO,
16526 .block_erasers =
16527 {
16528 {
16529 .eraseblocks = { {4 * 1024, 64} },
16530 .block_erase = spi_block_erase_20,
16531 }, {
16532 .eraseblocks = { {4 * 1024, 64} },
16533 .block_erase = spi_block_erase_d7,
16534 }, {
16535 .eraseblocks = { {64 * 1024, 4} },
16536 .block_erase = spi_block_erase_d8,
16537 }, {
16538 .eraseblocks = { {256 * 1024, 1} },
16539 .block_erase = spi_block_erase_60,
16540 }, {
16541 .eraseblocks = { {256 * 1024, 1} },
16542 .block_erase = spi_block_erase_c7,
16543 }
16544 },
16545 .printlock = spi_prettyprint_status_register_bp2_srwd,
16546 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16547 .write = spi_chip_write_256,
16548 .read = spi_chip_read,
16549 .voltage = {2300, 3600},
16550 },
16551
16552 {
16553 .vendor = "Sanyo",
16554 .name = "LE25FU406B",
16555 .bustype = BUS_SPI,
16556 .manufacture_id = SANYO_ID,
16557 .model_id = SANYO_LE25FU406B,
16558 .total_size = 512,
16559 .page_size = 256,
16560 .feature_bits = FEATURE_WRSR_WREN,
16561 .tested = TEST_OK_PREW,
16562 .probe = probe_spi_res2,
16563 .probe_timing = TIMING_ZERO,
16564 .block_erasers =
16565 {
16566 {
16567 .eraseblocks = { {4 * 1024, 128} },
16568 .block_erase = spi_block_erase_d7,
16569 }, {
16570 .eraseblocks = { {64 * 1024, 8} },
16571 .block_erase = spi_block_erase_d8,
16572 }, {
16573 .eraseblocks = { {512 * 1024, 1} },
16574 .block_erase = spi_block_erase_c7,
16575 }
16576 },
16577 .printlock = spi_prettyprint_status_register_bp2_srwd,
16578 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16579 .write = spi_chip_write_256,
16580 .read = spi_chip_read,
16581 .voltage = {2300, 3600},
16582 },
16583
16584 {
16585 .vendor = "Sanyo",
16586 .name = "LE25FU406C/LE25U40CMC",
16587 .bustype = BUS_SPI,
16588 .manufacture_id = SANYO_ID,
16589 .model_id = SANYO_LE25FU406C,
16590 .total_size = 512,
16591 .page_size = 256,
16592 .feature_bits = FEATURE_WRSR_WREN,
16593 .tested = TEST_OK_PREW,
16594 .probe = probe_spi_rdid,
16595 .probe_timing = TIMING_ZERO,
16596 .block_erasers =
16597 {
16598 {
16599 .eraseblocks = { {4 * 1024, 128} },
16600 .block_erase = spi_block_erase_20,
16601 }, {
16602 .eraseblocks = { {4 * 1024, 128} },
16603 .block_erase = spi_block_erase_d7,
16604 }, {
16605 .eraseblocks = { {64 * 1024, 8} },
16606 .block_erase = spi_block_erase_d8,
16607 }, {
16608 .eraseblocks = { {512 * 1024, 1} },
16609 .block_erase = spi_block_erase_60,
16610 }, {
16611 .eraseblocks = { {512 * 1024, 1} },
16612 .block_erase = spi_block_erase_c7,
16613 }
16614 },
16615 .printlock = spi_prettyprint_status_register_bp2_srwd,
16616 .unlock = spi_disable_blockprotect_bp2_srwd,
16617 .write = spi_chip_write_256,
16618 .read = spi_chip_read, /* Fast read (0x0B), dual read (0x3B) and dual I/O (0xBB) supported */
16619 .voltage = {2300, 3600},
16620 },
16621
16622 {
16623 .vendor = "Sanyo",
16624 .name = "LE25FW106",
16625 .bustype = BUS_SPI,
16626 .manufacture_id = SANYO_ID,
16627 .model_id = SANYO_LE25FW106,
16628 .total_size = 128,
16629 .page_size = 256,
16630 .feature_bits = FEATURE_WRSR_WREN,
16631 .tested = TEST_OK_PREW,
16632 .probe = probe_spi_res2,
16633 .probe_timing = TIMING_ZERO,
16634 .block_erasers =
16635 {
16636 {
16637 .eraseblocks = { {2 * 1024, 64} },
16638 .block_erase = spi_block_erase_d7,
16639 }, {
16640 .eraseblocks = { {32 * 1024, 4} },
16641 .block_erase = spi_block_erase_d8,
16642 }, {
16643 .eraseblocks = { {128 * 1024, 1} },
16644 .block_erase = spi_block_erase_c7,
16645 }
16646 },
16647 .printlock = spi_prettyprint_status_register_bp1_srwd, /* FIXME: Add ERSER error flag. */
16648 .unlock = spi_disable_blockprotect_bp1_srwd,
16649 .write = spi_chip_write_256,
16650 .read = spi_chip_read,
16651 .voltage = {2700, 3600},
16652 },
16653
16654 {
16655 .vendor = "Sanyo",
16656 .name = "LE25FW203A",
16657 .bustype = BUS_SPI,
16658 .manufacture_id = SANYO_ID,
16659 .model_id = SANYO_LE25FW203A,
16660 .total_size = 256,
16661 .page_size = 256,
16662 .tested = TEST_UNTESTED,
16663 .probe = probe_spi_rdid,
16664 .probe_timing = TIMING_ZERO,
16665 .block_erasers =
16666 {
16667 {
16668 .eraseblocks = { {256, 1024} },
16669 .block_erase = spi_block_erase_db,
16670 }, {
16671 .eraseblocks = { {64 * 1024, 4} },
16672 .block_erase = spi_block_erase_d8,
16673 }, {
16674 .eraseblocks = { {256 * 1024, 1} },
16675 .block_erase = spi_block_erase_c7,
16676 }
16677 },
16678 .printlock = spi_prettyprint_status_register_default_welwip,
16679 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
16680 .write = spi_chip_write_256,
16681 .read = spi_chip_read,
16682 .voltage = {2700, 3600},
16683 },
16684
16685 {
16686 .vendor = "Sanyo",
16687 .name = "LE25FW403A",
16688 .bustype = BUS_SPI,
16689 .manufacture_id = SANYO_ID,
16690 .model_id = SANYO_LE25FW403A,
16691 .total_size = 512,
16692 .page_size = 256,
16693 .tested = TEST_UNTESTED,
16694 .probe = probe_spi_rdid,
16695 .probe_timing = TIMING_ZERO,
16696 .block_erasers =
16697 {
16698 {
16699 .eraseblocks = { {256, 2 * 1024} },
16700 .block_erase = spi_block_erase_db,
16701 }, {
16702 .eraseblocks = { {64 * 1024, 8} },
16703 .block_erase = spi_block_erase_d8,
16704 }, {
16705 .eraseblocks = { {512 * 1024, 1} },
16706 .block_erase = spi_block_erase_c7,
16707 }
16708 },
16709 .printlock = spi_prettyprint_status_register_default_welwip,
16710 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
16711 .write = spi_chip_write_256,
16712 .read = spi_chip_read,
16713 .voltage = {2700, 3600},
16714 },
16715
16716 {
16717 .vendor = "Sanyo",
16718 .name = "LE25FW406A",
16719 .bustype = BUS_SPI,
16720 .manufacture_id = SANYO_ID,
16721 .model_id = SANYO_LE25FW406A,
16722 .total_size = 512,
16723 .page_size = 256,
16724 .feature_bits = FEATURE_WRSR_WREN,
16725 .tested = TEST_OK_PREW,
16726 .probe = probe_spi_res2,
16727 .probe_timing = TIMING_ZERO,
16728 .block_erasers =
16729 {
16730 {
16731 .eraseblocks = { {4 * 1024, 128} },
16732 .block_erase = spi_block_erase_d7,
16733 }, {
16734 .eraseblocks = { {64 * 1024, 8} },
16735 .block_erase = spi_block_erase_d8,
16736 }, {
16737 .eraseblocks = { {512 * 1024, 1} },
16738 .block_erase = spi_block_erase_c7,
16739 }
16740 },
16741 .printlock = spi_prettyprint_status_register_plain,
16742 .unlock = spi_disable_blockprotect,
16743 .write = spi_chip_write_256,
16744 .read = spi_chip_read,
16745 .voltage = {2700, 3600},
16746 },
16747
16748 {
16749 .vendor = "Sanyo",
16750 .name = "LE25FW418A",
16751 .bustype = BUS_SPI,
16752 .manufacture_id = SANYO_ID,
16753 .model_id = SANYO_LE25FW418A,
16754 .total_size = 512,
16755 .page_size = 256,
16756 .feature_bits = FEATURE_WRSR_WREN,
16757 .tested = TEST_UNTESTED,
16758 .probe = probe_spi_res2,
16759 .probe_timing = TIMING_ZERO,
16760 .block_erasers =
16761 {
16762 {
16763 .eraseblocks = { {4 * 1024, 128} },
16764 .block_erase = spi_block_erase_d7,
16765 }, {
16766 .eraseblocks = { {64 * 1024, 8} },
16767 .block_erase = spi_block_erase_d8,
16768 }, {
16769 .eraseblocks = { {512 * 1024, 1} },
16770 .block_erase = spi_block_erase_c7,
16771 }
16772 },
16773 .printlock = spi_prettyprint_status_register_bp2_srwd,
16774 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16775 .write = spi_chip_write_256,
16776 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
16777 .voltage = {2700, 3600},
16778 },
16779
16780 {
16781 .vendor = "Sanyo",
16782 .name = "LE25FW806",
16783 .bustype = BUS_SPI,
16784 .manufacture_id = SANYO_ID,
16785 .model_id = SANYO_LE25FW806,
16786 .total_size = 1024,
16787 .page_size = 256,
16788 .feature_bits = FEATURE_WRSR_WREN,
16789 .tested = TEST_UNTESTED,
16790 .probe = probe_spi_res2,
16791 .probe_timing = TIMING_ZERO,
16792 .block_erasers =
16793 {
16794 {
16795 .eraseblocks = { {4 * 1024, 256} },
16796 .block_erase = spi_block_erase_20,
16797 }, {
16798 .eraseblocks = { {4 * 1024, 256} },
16799 .block_erase = spi_block_erase_d7,
16800 }, {
16801 .eraseblocks = { {64 * 1024, 16} },
16802 .block_erase = spi_block_erase_d8,
16803 }, {
16804 .eraseblocks = { {1024 * 1024, 1} },
16805 .block_erase = spi_block_erase_c7,
16806 }
16807 },
16808 .printlock = spi_prettyprint_status_register_bp2_srwd,
16809 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16810 .write = spi_chip_write_256,
16811 .read = spi_chip_read,
16812 .voltage = {2700, 3600},
16813 },
16814
16815 {
16816 .vendor = "Sanyo",
16817 .name = "LE25FW808",
16818 .bustype = BUS_SPI,
16819 .manufacture_id = SANYO_ID,
16820 .model_id = SANYO_LE25FW808,
16821 .total_size = 1024,
16822 .page_size = 256,
16823 .feature_bits = FEATURE_WRSR_WREN,
16824 .tested = TEST_UNTESTED,
16825 .probe = probe_spi_res2,
16826 .probe_timing = TIMING_ZERO,
16827 .block_erasers =
16828 {
16829 {
16830 .eraseblocks = { {8 * 1024, 128} },
16831 .block_erase = spi_block_erase_d7,
16832 }, {
16833 .eraseblocks = { {64 * 1024, 16} },
16834 .block_erase = spi_block_erase_d8,
16835 }, {
16836 .eraseblocks = { {1024 * 1024, 1} },
16837 .block_erase = spi_block_erase_c7,
16838 }
16839 },
16840 .printlock = spi_prettyprint_status_register_bp2_srwd,
16841 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16842 .write = spi_chip_write_256,
16843 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
16844 .voltage = {2700, 3600},
16845 },
16846
16847 {
16848 .vendor = "Sharp",
16849 .name = "LH28F008BJT-BTLZ1",
16850 .bustype = BUS_PARALLEL,
16851 .manufacture_id = SHARP_ID,
16852 .model_id = SHARP_LH28F008BJ__PB,
16853 .total_size = 1024,
16854 .page_size = 64 * 1024,
16855 .tested = TEST_OK_PREW,
16856 .probe = probe_82802ab,
16857 .probe_timing = TIMING_ZERO,
16858 .block_erasers =
16859 {
16860 {
16861 .eraseblocks = {
16862 {8 * 1024, 8},
16863 {64 * 1024, 15}
16864 },
16865 .block_erase = erase_block_82802ab,
16866 }, {
16867 .eraseblocks = { {1024 * 1024, 1} },
16868 .block_erase = erase_sector_49lfxxxc,
16869 }
16870 },
16871 .unlock = unlock_lh28f008bjt,
16872 .write = write_82802ab,
16873 .read = read_memmapped,
16874 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016875 .prepare_access = prepare_memory_access,
16876 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016877 },
16878
16879 {
16880 .vendor = "Sharp",
16881 .name = "LHF00L04",
16882 .bustype = BUS_FWH, /* A/A Mux */
16883 .manufacture_id = SHARP_ID,
16884 .model_id = SHARP_LHF00L04,
16885 .total_size = 1024,
16886 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010016887 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016888 .tested = TEST_UNTESTED,
16889 .probe = probe_82802ab,
16890 .probe_timing = TIMING_ZERO,
16891 .block_erasers =
16892 {
16893 {
16894 .eraseblocks = {
16895 {64 * 1024, 15},
16896 {8 * 1024, 8}
16897 },
16898 .block_erase = erase_block_82802ab,
16899 }, {
16900 .eraseblocks = {
16901 {1024 * 1024, 1}
16902 },
16903 .block_erase = NULL, /* 30 D0, only in A/A mux mode */
16904 },
16905 },
16906 .unlock = unlock_regspace2_uniform_64k,
16907 .write = write_82802ab,
16908 .read = read_memmapped,
16909 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010016910 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016911 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016912 },
16913
16914 {
16915 .vendor = "Spansion",
16916 .name = "S25FL004A",
16917 .bustype = BUS_SPI,
16918 .manufacture_id = SPANSION_ID,
16919 .model_id = SPANSION_S25FL004A,
16920 .total_size = 512,
16921 .page_size = 256,
16922 .feature_bits = FEATURE_WRSR_WREN,
16923 .tested = TEST_UNTESTED,
16924 .probe = probe_spi_rdid,
16925 .probe_timing = TIMING_ZERO,
16926 .block_erasers =
16927 {
16928 {
16929 .eraseblocks = { {64 * 1024, 8} },
16930 .block_erase = spi_block_erase_d8,
16931 }, {
16932 .eraseblocks = { {512 * 1024, 1} },
16933 .block_erase = spi_block_erase_c7,
16934 }
16935 },
16936 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
16937 .unlock = spi_disable_blockprotect,
16938 .write = spi_chip_write_256,
16939 .read = spi_chip_read,
16940 .voltage = {2700, 3600},
16941 },
16942
16943 {
16944 .vendor = "Spansion",
16945 .name = "S25FL008A",
16946 .bustype = BUS_SPI,
16947 .manufacture_id = SPANSION_ID,
16948 .model_id = SPANSION_S25FL008A,
16949 .total_size = 1024,
16950 .page_size = 256,
16951 .feature_bits = FEATURE_WRSR_WREN,
16952 .tested = TEST_OK_PRE,
16953 .probe = probe_spi_rdid,
16954 .probe_timing = TIMING_ZERO,
16955 .block_erasers =
16956 {
16957 {
16958 .eraseblocks = { {64 * 1024, 16} },
16959 .block_erase = spi_block_erase_d8,
16960 }, {
16961 .eraseblocks = { {1024 * 1024, 1} },
16962 .block_erase = spi_block_erase_c7,
16963 }
16964 },
16965 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
16966 .unlock = spi_disable_blockprotect,
16967 .write = spi_chip_write_256,
16968 .read = spi_chip_read,
16969 .voltage = {2700, 3600},
16970 },
16971
16972 {
16973 .vendor = "Spansion",
16974 .name = "S25FL016A",
16975 .bustype = BUS_SPI,
16976 .manufacture_id = SPANSION_ID,
16977 .model_id = SPANSION_S25FL016A,
16978 .total_size = 2048,
16979 .page_size = 256,
16980 .feature_bits = FEATURE_WRSR_WREN,
16981 .tested = TEST_OK_PREW,
16982 .probe = probe_spi_rdid,
16983 .probe_timing = TIMING_ZERO,
16984 .block_erasers =
16985 {
16986 {
16987 .eraseblocks = { {64 * 1024, 32} },
16988 .block_erase = spi_block_erase_d8,
16989 }, {
16990 .eraseblocks = { {2 * 1024 * 1024, 1} },
16991 .block_erase = spi_block_erase_c7,
16992 }
16993 },
16994 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
16995 .unlock = spi_disable_blockprotect,
16996 .write = spi_chip_write_256,
16997 .read = spi_chip_read,
16998 .voltage = {2700, 3600},
16999 },
17000
17001 {
17002 .vendor = "Spansion",
17003 .name = "S25FL032A/P",
17004 .bustype = BUS_SPI,
17005 .manufacture_id = SPANSION_ID,
17006 .model_id = SPANSION_S25FL032A,
17007 .total_size = 4096,
17008 .page_size = 256,
17009 .feature_bits = FEATURE_WRSR_WREN,
17010 .tested = TEST_OK_PREW,
17011 .probe = probe_spi_rdid,
17012 .probe_timing = TIMING_ZERO,
17013 .block_erasers =
17014 {
17015 {
17016 .eraseblocks = { {64 * 1024, 64} },
17017 .block_erase = spi_block_erase_d8,
17018 }, {
17019 .eraseblocks = { {4 * 1024 * 1024, 1} },
17020 .block_erase = spi_block_erase_c7,
17021 }
17022 },
17023 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17024 .unlock = spi_disable_blockprotect,
17025 .write = spi_chip_write_256,
17026 .read = spi_chip_read,
17027 .voltage = {2700, 3600},
17028 },
17029
17030 {
17031 .vendor = "Spansion",
17032 .name = "S25FL064A/P",
17033 .bustype = BUS_SPI,
17034 .manufacture_id = SPANSION_ID,
17035 .model_id = SPANSION_S25FL064A,
17036 .total_size = 8192,
17037 .page_size = 256,
17038 .feature_bits = FEATURE_WRSR_WREN,
17039 .tested = TEST_OK_PREW,
17040 .probe = probe_spi_rdid,
17041 .probe_timing = TIMING_ZERO,
17042 .block_erasers =
17043 {
17044 {
17045 .eraseblocks = { {64 * 1024, 128} },
17046 .block_erase = spi_block_erase_d8,
17047 }, {
17048 .eraseblocks = { {8 * 1024 * 1024, 1} },
17049 .block_erase = spi_block_erase_c7,
17050 }
17051 },
17052 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17053 .unlock = spi_disable_blockprotect,
17054 .write = spi_chip_write_256,
17055 .read = spi_chip_read,
17056 .voltage = {2700, 3600},
17057 },
17058
17059 {
17060 .vendor = "Spansion",
17061 .name = "S25FL116K/S25FL216K", /* FIXME: separate them */
17062 .bustype = BUS_SPI,
17063 .manufacture_id = SPANSION_ID,
17064 .model_id = SPANSION_S25FL216,
17065 .total_size = 2048,
17066 .page_size = 256,
17067 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (S25FL116K only) */
17068 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17069 .tested = TEST_UNTESTED,
17070 .probe = probe_spi_rdid,
17071 .probe_timing = TIMING_ZERO,
17072 .block_erasers =
17073 {
17074 {
17075 .eraseblocks = { {4 * 1024, 512} },
17076 .block_erase = spi_block_erase_20,
17077 }, {
17078 .eraseblocks = { {64 * 1024, 32} },
17079 .block_erase = spi_block_erase_d8,
17080 }, {
17081 .eraseblocks = { { 2048 * 1024, 1} },
17082 .block_erase = spi_block_erase_60,
17083 }, {
17084 .eraseblocks = { { 2048 * 1024, 1} },
17085 .block_erase = spi_block_erase_c7,
17086 }
17087 },
17088 .printlock = spi_prettyprint_status_register_bp3_srwd,
17089 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17090 .write = spi_chip_write_256,
17091 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17092 .voltage = {2700, 3600},
17093 },
17094
17095 {
17096 .vendor = "Spansion",
17097 .name = "S25FL127S-256kB", /* uniform 256kB sectors */
17098 .bustype = BUS_SPI,
17099 .manufacture_id = SPANSION_ID,
17100 .model_id = SPANSION_S25FL128,
17101 .total_size = 16384,
17102 .page_size = 512,
17103 /* supports 4B addressing */
17104 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17105 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17106 .tested = TEST_UNTESTED,
17107 .probe = probe_spi_rdid,
17108 .probe_timing = TIMING_ZERO,
17109 .block_erasers =
17110 {
17111 {
17112 .eraseblocks = { {256 * 1024, 64} },
17113 .block_erase = spi_block_erase_d8,
17114 }, {
17115 .eraseblocks = { { 16384 * 1024, 1} },
17116 .block_erase = spi_block_erase_60,
17117 }, {
17118 .eraseblocks = { { 16384 * 1024, 1} },
17119 .block_erase = spi_block_erase_c7,
17120 }
17121 },
17122 .printlock = spi_prettyprint_status_register_bp2_srwd,
17123 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17124 .write = spi_chip_write_256, /* Multi I/O supported */
17125 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17126 .voltage = {2700, 3600},
17127 },
17128
17129 {
17130 .vendor = "Spansion",
17131 .name = "S25FL127S-64kB", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17132 .bustype = BUS_SPI,
17133 .manufacture_id = SPANSION_ID,
17134 .model_id = SPANSION_S25FL128,
17135 .total_size = 16384,
17136 .page_size = 256,
17137 /* supports 4B addressing */
17138 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17139 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17140 .tested = TEST_OK_PREW,
17141 /* FIXME: we should distinguish the configuration on probing time like we do for AT45DB chips */
17142 .probe = probe_spi_rdid,
17143 .probe_timing = TIMING_ZERO,
17144 .block_erasers =
17145 {
17146 {
17147 /* This chip supports erasing of 32 so-called "parameter sectors" with
17148 * opcode 0x20 which may be configured to be on top or bottom of the address
17149 * space. Trying to access an address outside these 4kB blocks does have no
17150 * effect on the memory contents, e.g.
17151 .eraseblocks = {
17152 {4 * 1024, 32},
17153 {64 * 1024, 254} // inaccessible
17154 },
17155 .block_erase = spi_block_erase_20,
17156 }, { */
17157 .eraseblocks = { { 64 * 1024, 256} },
17158 .block_erase = spi_block_erase_d8,
17159 }, {
17160 .eraseblocks = { { 16384 * 1024, 1} },
17161 .block_erase = spi_block_erase_60,
17162 }, {
17163 .eraseblocks = { { 16384 * 1024, 1} },
17164 .block_erase = spi_block_erase_c7,
17165 }
17166 },
17167 .printlock = spi_prettyprint_status_register_bp2_srwd,
17168 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17169 .write = spi_chip_write_256, /* Multi I/O supported */
17170 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17171 .voltage = {2700, 3600},
17172 },
17173
17174 {
17175 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020017176 .name = "S25FL128L",
17177 .bustype = BUS_SPI,
17178 .manufacture_id = SPANSION_ID,
17179 .model_id = SPANSION_S25FL128L,
17180 .total_size = 16384,
17181 .page_size = 256,
17182 /* 4 x 256B Security Region (OTP) */
17183 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP,
17184 .tested = TEST_UNTESTED,
17185 .probe = probe_spi_rdid,
17186 .probe_timing = TIMING_ZERO,
17187 .block_erasers =
17188 {
17189 {
17190 .eraseblocks = { {4 * 1024, 4096} },
17191 .block_erase = spi_block_erase_20,
17192 }, {
17193 .eraseblocks = { {32 * 1024, 512} },
17194 .block_erase = spi_block_erase_52,
17195 }, {
17196 .eraseblocks = { {64 * 1024, 256} },
17197 .block_erase = spi_block_erase_d8,
17198 }, {
17199 .eraseblocks = { {16384 * 1024, 1} },
17200 .block_erase = spi_block_erase_60,
17201 }, {
17202 .eraseblocks = { {16384 * 1024, 1} },
17203 .block_erase = spi_block_erase_c7,
17204 }
17205 },
17206 .printlock = spi_prettyprint_status_register_bp2_srwd,
17207 .unlock = spi_disable_blockprotect_bp2_srwd,
17208 .write = spi_chip_write_256,
17209 .read = spi_chip_read, /* Fast read (0x0B) supported */
17210 .voltage = {2700, 3600},
17211 .reg_bits =
17212 {
17213 /*
17214 * Note: This chip has a read-only Status Register 2 that is not
17215 * counted here. Registers are mapped as follows:
17216 * STATUS1 ... Status Register 1
17217 * STATUS2 ... Configuration Register 1
17218 * STATUS3 ... Configuration Register 2
17219 */
17220 .srp = {STATUS1, 7, RW},
17221 .srl = {STATUS2, 0, RW},
17222 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17223 .tb = {STATUS1, 5, RW},
17224 .sec = {STATUS1, 6, RW},
17225 .cmp = {STATUS2, 6, RW},
17226 .wps = {STATUS3, 2, RW},
17227 },
Nico Huberaabb3e02023-01-13 00:22:30 +010017228 .wp_write_cfg = spi_wp_write_cfg,
17229 .wp_read_cfg = spi_wp_read_cfg,
17230 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020017231 .decode_range = decode_range_spi25,
17232 },
17233
17234 {
17235 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100017236 .name = "S25FL128P......0", /* uniform 64 kB sectors */
17237 .bustype = BUS_SPI,
17238 .manufacture_id = SPANSION_ID,
17239 .model_id = SPANSION_S25FL128,
17240 .total_size = 16384,
17241 .page_size = 256,
17242 .feature_bits = FEATURE_WRSR_WREN,
17243 .tested = TEST_OK_PREW,
17244 .probe = probe_spi_rdid,
17245 .probe_timing = TIMING_ZERO,
17246 .block_erasers =
17247 {
17248 {
17249 .eraseblocks = { {64 * 1024, 256} },
17250 .block_erase = spi_block_erase_20,
17251 }, {
17252 .eraseblocks = { {64 * 1024, 256} },
17253 .block_erase = spi_block_erase_d8,
17254 }, {
17255 .eraseblocks = { { 16384 * 1024, 1} },
17256 .block_erase = spi_block_erase_60,
17257 }, {
17258 .eraseblocks = { { 16384 * 1024, 1} },
17259 .block_erase = spi_block_erase_c7,
17260 }
17261 },
17262 .printlock = spi_prettyprint_status_register_bp3_srwd,
17263 .unlock = spi_disable_blockprotect_bp3_srwd,
17264 .write = spi_chip_write_256,
17265 .read = spi_chip_read, /* Fast read (0x0B) supported */
17266 .voltage = {2700, 3600},
17267 },
17268
17269 {
17270 .vendor = "Spansion",
17271 .name = "S25FL128P......1", /* uniform 256kB sectors */
17272 .bustype = BUS_SPI,
17273 .manufacture_id = SPANSION_ID,
17274 .model_id = SPANSION_S25FL128,
17275 .total_size = 16384,
17276 .page_size = 256,
17277 .feature_bits = FEATURE_WRSR_WREN,
17278 .tested = TEST_UNTESTED,
17279 .probe = probe_spi_rdid,
17280 .probe_timing = TIMING_ZERO,
17281 .block_erasers =
17282 {
17283 {
17284 .eraseblocks = { {256 * 1024, 64} },
17285 .block_erase = spi_block_erase_d8,
17286 }, {
17287 .eraseblocks = { { 16384 * 1024, 1} },
17288 .block_erase = spi_block_erase_c7,
17289 }
17290 },
17291 .printlock = spi_prettyprint_status_register_bp2_srwd,
17292 .unlock = spi_disable_blockprotect_bp2_srwd,
17293 .write = spi_chip_write_256,
17294 .read = spi_chip_read, /* Fast read (0x0B) supported */
17295 .voltage = {2700, 3600},
17296 },
17297
17298 {
17299 .vendor = "Spansion",
17300 .name = "S25FL128S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17301 .bustype = BUS_SPI,
17302 .manufacture_id = SPANSION_ID,
17303 .model_id = SPANSION_S25FL128,
17304 .total_size = 16384,
17305 .page_size = 256,
17306 /* supports 4B addressing */
17307 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17308 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17309 .tested = TEST_OK_PREW,
17310 .probe = probe_spi_rdid,
17311 .probe_timing = TIMING_ZERO,
17312 .block_erasers =
17313 {
17314 {
17315 /* This chip supports erasing of the 32 so-called "parameter sectors" with
17316 * opcode 0x20. Trying to access an address outside these 4kB blocks does
17317 * have no effect on the memory contents, but sets a flag in the SR.
17318 .eraseblocks = {
17319 {4 * 1024, 32},
17320 {64 * 1024, 254} // inaccessible
17321 },
17322 .block_erase = spi_block_erase_20,
17323 }, { */
17324 .eraseblocks = { { 64 * 1024, 256} },
17325 .block_erase = spi_block_erase_d8,
17326 }, {
17327 .eraseblocks = { { 16384 * 1024, 1} },
17328 .block_erase = spi_block_erase_60,
17329 }, {
17330 .eraseblocks = { { 16384 * 1024, 1} },
17331 .block_erase = spi_block_erase_c7,
17332 }
17333 },
17334 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17335 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17336 .write = spi_chip_write_256, /* Multi I/O supported */
17337 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17338 .voltage = {2700, 3600},
17339 },
17340
17341 {
17342 .vendor = "Spansion",
17343 .name = "S25FL128S......1", /* uniform 256 kB sectors */
17344 .bustype = BUS_SPI,
17345 .manufacture_id = SPANSION_ID,
17346 .model_id = SPANSION_S25FL128,
17347 .total_size = 16384,
17348 .page_size = 512,
17349 /* supports 4B addressing */
17350 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17351 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17352 .tested = TEST_UNTESTED,
17353 .probe = probe_spi_rdid,
17354 .probe_timing = TIMING_ZERO,
17355 .block_erasers =
17356 {
17357 {
17358 .eraseblocks = { {256 * 1024, 64} },
17359 .block_erase = spi_block_erase_d8,
17360 }, {
17361 .eraseblocks = { { 16384 * 1024, 1} },
17362 .block_erase = spi_block_erase_60,
17363 }, {
17364 .eraseblocks = { { 16384 * 1024, 1} },
17365 .block_erase = spi_block_erase_c7,
17366 }
17367 },
17368 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17369 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17370 .write = spi_chip_write_256, /* Multi I/O supported */
17371 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17372 .voltage = {2700, 3600},
17373 },
17374
17375 {
17376 .vendor = "Spansion",
17377 .name = "S25FL129P......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17378 .bustype = BUS_SPI,
17379 .manufacture_id = SPANSION_ID,
17380 .model_id = SPANSION_S25FL128,
17381 .total_size = 16384,
17382 .page_size = 256,
17383 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
17384 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17385 .tested = TEST_OK_PREW,
17386 .probe = probe_spi_rdid,
17387 .probe_timing = TIMING_ZERO,
17388 .block_erasers =
17389 {
17390 {
17391 /* FIXME: This chip supports erasing of the 32 so-called "parameter sectors" with
17392 * opcode 0x20. Trying to access an address outside these 4kB blocks does have no
17393 * effect on the memory contents, but sets a flag in the SR.
17394 .eraseblocks = {
17395 {4 * 1024, 32},
17396 {64 * 1024, 254} // inaccessible
17397 },
17398 .block_erase = spi_block_erase_20,
17399 }, { */
17400 /* FIXME: Additionally it also supports erase opcode 40h for the respective 2*4 kB pairs
17401 .eraseblocks = {
17402 {8 * 1024, 16},
17403 {64 * 1024, 254} // inaccessible
17404 },
17405 .block_erase = spi_block_erase_40,
17406 }, { */
17407 .eraseblocks = { { 64 * 1024, 256} },
17408 .block_erase = spi_block_erase_d8,
17409 }, {
17410 .eraseblocks = { { 16384 * 1024, 1} },
17411 .block_erase = spi_block_erase_60,
17412 }, {
17413 .eraseblocks = { { 16384 * 1024, 1} },
17414 .block_erase = spi_block_erase_c7,
17415 }
17416 },
17417 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
17418 .unlock = spi_disable_blockprotect_bp2_srwd,
17419 .write = spi_chip_write_256, /* Multi I/O supported */
17420 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17421 .voltage = {2700, 3600},
17422 },
17423
17424 {
17425 .vendor = "Spansion",
17426 .name = "S25FL129P......1", /* uniform 256 kB sectors */
17427 .bustype = BUS_SPI,
17428 .manufacture_id = SPANSION_ID,
17429 .model_id = SPANSION_S25FL128,
17430 .total_size = 16384,
17431 .page_size = 256,
17432 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
17433 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17434 .tested = TEST_UNTESTED,
17435 .probe = probe_spi_rdid,
17436 .probe_timing = TIMING_ZERO,
17437 .block_erasers =
17438 {
17439 {
17440 .eraseblocks = { {256 * 1024, 64} },
17441 .block_erase = spi_block_erase_d8,
17442 }, {
17443 .eraseblocks = { { 16384 * 1024, 1} },
17444 .block_erase = spi_block_erase_60,
17445 }, {
17446 .eraseblocks = { { 16384 * 1024, 1} },
17447 .block_erase = spi_block_erase_c7,
17448 }
17449 },
17450 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
17451 .unlock = spi_disable_blockprotect_bp2_srwd,
17452 .write = spi_chip_write_256, /* Multi I/O supported */
17453 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17454 .voltage = {2700, 3600},
17455 },
17456
17457 {
17458 .vendor = "Spansion",
17459 .name = "S25FL132K",
17460 .bustype = BUS_SPI,
17461 .manufacture_id = SPANSION_ID,
17462 .model_id = SPANSION_S25FL132K,
17463 .total_size = 4096,
17464 .page_size = 256,
17465 /* OTP: 768B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
17466 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17467 .tested = TEST_UNTESTED,
17468 .probe = probe_spi_rdid,
17469 .probe_timing = TIMING_ZERO,
17470 .block_erasers =
17471 {
17472 {
17473 .eraseblocks = { {4 * 1024, 1024} },
17474 .block_erase = spi_block_erase_20,
17475 }, {
17476 .eraseblocks = { {64 * 1024, 64} },
17477 .block_erase = spi_block_erase_d8,
17478 }, {
17479 .eraseblocks = { { 4096 * 1024, 1} },
17480 .block_erase = spi_block_erase_60,
17481 }, {
17482 .eraseblocks = { { 4096 * 1024, 1} },
17483 .block_erase = spi_block_erase_c7,
17484 }
17485 },
17486 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
17487 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17488 .write = spi_chip_write_256,
17489 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17490 .voltage = {2700, 3600},
17491 },
17492
17493 {
17494 .vendor = "Spansion",
17495 .name = "S25FL164K",
17496 .bustype = BUS_SPI,
17497 .manufacture_id = SPANSION_ID,
17498 .model_id = SPANSION_S25FL164K,
17499 .total_size = 8192,
17500 .page_size = 256,
17501 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
17502 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17503 .tested = TEST_OK_PREW,
17504 .probe = probe_spi_rdid,
17505 .probe_timing = TIMING_ZERO,
17506 .block_erasers =
17507 {
17508 {
17509 .eraseblocks = { {4 * 1024, 2048} },
17510 .block_erase = spi_block_erase_20,
17511 }, {
17512 .eraseblocks = { {64 * 1024, 128} },
17513 .block_erase = spi_block_erase_d8,
17514 }, {
17515 .eraseblocks = { { 8192 * 1024, 1} },
17516 .block_erase = spi_block_erase_60,
17517 }, {
17518 .eraseblocks = { { 8192 * 1024, 1} },
17519 .block_erase = spi_block_erase_c7,
17520 }
17521 },
17522 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
17523 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17524 .write = spi_chip_write_256,
17525 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17526 .voltage = {2700, 3600},
17527 },
17528
17529 {
17530 .vendor = "Spansion",
17531 .name = "S25FL204K",
17532 .bustype = BUS_SPI,
17533 .manufacture_id = SPANSION_ID,
17534 .model_id = SPANSION_S25FL204,
17535 .total_size = 512,
17536 .page_size = 256,
17537 .feature_bits = FEATURE_WRSR_WREN,
17538 .tested = TEST_OK_PR,
17539 .probe = probe_spi_rdid,
17540 .probe_timing = TIMING_ZERO,
17541 .block_erasers =
17542 {
17543 {
17544 .eraseblocks = { {4 * 1024, 128} },
17545 .block_erase = spi_block_erase_20,
17546 }, {
17547 .eraseblocks = { {64 * 1024, 8} },
17548 .block_erase = spi_block_erase_d8,
17549 }, {
17550 .eraseblocks = { { 512 * 1024, 1} },
17551 .block_erase = spi_block_erase_60,
17552 }, {
17553 .eraseblocks = { { 512 * 1024, 1} },
17554 .block_erase = spi_block_erase_c7,
17555 }
17556 },
17557 .printlock = spi_prettyprint_status_register_bp3_srwd,
17558 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17559 .write = spi_chip_write_256,
17560 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17561 .voltage = {2700, 3600},
17562 },
17563
17564 {
17565 .vendor = "Spansion",
17566 .name = "S25FL208K",
17567 .bustype = BUS_SPI,
17568 .manufacture_id = SPANSION_ID,
17569 .model_id = SPANSION_S25FL208,
17570 .total_size = 1024,
17571 .page_size = 256,
17572 .feature_bits = FEATURE_WRSR_WREN,
17573 .tested = TEST_OK_PREW,
17574 .probe = probe_spi_rdid,
17575 .probe_timing = TIMING_ZERO,
17576 .block_erasers =
17577 {
17578 {
17579 .eraseblocks = { {4 * 1024, 256} },
17580 .block_erase = spi_block_erase_20,
17581 }, {
17582 .eraseblocks = { {64 * 1024, 16} },
17583 .block_erase = spi_block_erase_d8,
17584 }, {
17585 .eraseblocks = { { 1024 * 1024, 1} },
17586 .block_erase = spi_block_erase_60,
17587 }, {
17588 .eraseblocks = { { 1024 * 1024, 1} },
17589 .block_erase = spi_block_erase_c7,
17590 }
17591 },
17592 .printlock = spi_prettyprint_status_register_bp3_srwd,
17593 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17594 .write = spi_chip_write_256,
17595 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17596 .voltage = {2700, 3600},
17597 },
17598
17599 {
17600 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020017601 .name = "S25FL256L",
17602 .bustype = BUS_SPI,
17603 .manufacture_id = SPANSION_ID,
17604 .model_id = SPANSION_S25FL256L,
17605 .total_size = 32768,
17606 .page_size = 256,
17607 /* 4 x 256B Security Region (OTP) */
17608 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP |
17609 FEATURE_4BA_ENTER | FEATURE_4BA_NATIVE,
17610 .tested = TEST_UNTESTED,
17611 .probe = probe_spi_rdid,
17612 .probe_timing = TIMING_ZERO,
17613 .block_erasers =
17614 {
17615 {
17616 .eraseblocks = { {4 * 1024, 8192} },
17617 .block_erase = spi_block_erase_21,
17618 }, {
17619 .eraseblocks = { {4 * 1024, 8192} },
17620 .block_erase = spi_block_erase_20,
17621 }, {
17622 .eraseblocks = { {32 * 1024, 1024} },
17623 .block_erase = spi_block_erase_53,
17624 }, {
17625 .eraseblocks = { {32 * 1024, 1024} },
17626 .block_erase = spi_block_erase_52,
17627 }, {
17628 .eraseblocks = { {64 * 1024, 512} },
17629 .block_erase = spi_block_erase_dc,
17630 }, {
17631 .eraseblocks = { {64 * 1024, 512} },
17632 .block_erase = spi_block_erase_d8,
17633 }, {
17634 .eraseblocks = { {32768 * 1024, 1} },
17635 .block_erase = spi_block_erase_60,
17636 }, {
17637 .eraseblocks = { {32768 * 1024, 1} },
17638 .block_erase = spi_block_erase_c7,
17639 }
17640 },
17641 .printlock = spi_prettyprint_status_register_bp3_srwd,
17642 .unlock = spi_disable_blockprotect_bp3_srwd,
17643 .write = spi_chip_write_256,
17644 .read = spi_chip_read, /* Fast read (0x0B) supported */
17645 .voltage = {2700, 3600},
17646 .reg_bits =
17647 {
17648 /*
17649 * Note: This chip has a read-only Status Register 2 that is not
17650 * counted here. Registers are mapped as follows:
17651 * STATUS1 ... Status Register 1
17652 * STATUS2 ... Configuration Register 1
17653 * STATUS3 ... Configuration Register 2
17654 */
17655 .srp = {STATUS1, 7, RW},
17656 .srl = {STATUS2, 0, RW},
17657 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
17658 .tb = {STATUS1, 6, RW},
17659 .cmp = {STATUS2, 6, RW},
17660 .wps = {STATUS3, 2, RW},
17661 },
Nico Huberaabb3e02023-01-13 00:22:30 +010017662 .wp_write_cfg = spi_wp_write_cfg,
17663 .wp_read_cfg = spi_wp_read_cfg,
17664 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020017665 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020017666 .prepare_access = spi_prepare_io,
17667 .finish_access = spi_finish_io,
Nico Huberfffc48d2022-05-28 14:26:06 +020017668 },
17669
17670 {
17671 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100017672 .name = "S25FL256S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17673 .bustype = BUS_SPI,
17674 .manufacture_id = SPANSION_ID,
17675 .model_id = SPANSION_S25FL256,
17676 .total_size = 32768,
17677 .page_size = 256,
17678 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber9bb8a322022-05-24 15:07:34 +020017679 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
17680 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017681 .tested = TEST_OK_PREW,
17682 .probe = probe_spi_rdid,
17683 .probe_timing = TIMING_ZERO,
17684 .block_erasers =
17685 {
17686 {
17687 /* This chip supports erasing of the 32 so-called "parameter sectors" with
17688 * opcode 0x20. Trying to access an address outside these 4kB blocks does
17689 * have no effect on the memory contents, but sets a flag in the SR.
17690 .eraseblocks = {
17691 {4 * 1024, 32},
17692 {64 * 1024, 254} // inaccessible
17693 },
17694 .block_erase = spi_block_erase_20,
17695 }, { */
17696 .eraseblocks = { { 64 * 1024, 512} },
17697 .block_erase = spi_block_erase_dc,
17698 }, {
17699 .eraseblocks = { { 64 * 1024, 512} },
17700 .block_erase = spi_block_erase_d8,
17701 }, {
17702 .eraseblocks = { { 32768 * 1024, 1} },
17703 .block_erase = spi_block_erase_60,
17704 }, {
17705 .eraseblocks = { { 32768 * 1024, 1} },
17706 .block_erase = spi_block_erase_c7,
17707 }
17708 },
17709 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17710 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17711 .write = spi_chip_write_256, /* Multi I/O supported */
17712 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17713 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020017714 .prepare_access = spi_prepare_io,
17715 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017716 },
17717
17718 {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017719 .vendor = "Spansion",
17720 .name = "S25FL512S",
17721 .bustype = BUS_SPI,
17722 .manufacture_id = SPANSION_ID,
17723 .model_id = SPANSION_S25FL512,
17724 .total_size = 65536, /* 512 Mb (=> 64 MB)) */
17725 .page_size = 256,
17726 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber26237922022-06-20 19:37:37 +020017727 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
17728 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
17729 .tested = TEST_UNTESTED,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017730 .probe = probe_spi_rdid,
17731 .probe_timing = TIMING_ZERO,
17732 .block_erasers =
17733 {
17734 {
17735 .eraseblocks = { { 256 * 1024, 256} },
17736 .block_erase = spi_block_erase_dc,
17737 }, {
Nico Huberbb608ff2022-05-24 15:33:26 +020017738 .eraseblocks = { { 256 * 1024, 256} },
17739 .block_erase = spi_block_erase_d8,
17740 }, {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017741 .eraseblocks = { { 65536 * 1024, 1} },
17742 .block_erase = spi_block_erase_60,
17743 }, {
17744 .eraseblocks = { { 65536 * 1024, 1} },
17745 .block_erase = spi_block_erase_c7,
17746 }
17747 },
17748 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17749 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17750 .write = spi_chip_write_256, /* Multi I/O supported, IGNORE for now */
17751 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17752 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020017753 .prepare_access = spi_prepare_io,
17754 .finish_access = spi_finish_io,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017755 },
17756
17757 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017758 .vendor = "SyncMOS/MoselVitelic",
17759 .name = "{F,S,V}29C51001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017760 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017761 .manufacture_id = SYNCMOS_MVC_ID,
17762 .model_id = SM_MVC_29C51001B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017763 .total_size = 128,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017764 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000017765 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017766 .tested = TEST_UNTESTED,
17767 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000017768 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000017769 .block_erasers =
17770 {
17771 {
17772 .eraseblocks = { {512, 256} },
17773 .block_erase = erase_sector_jedec,
17774 }, {
17775 .eraseblocks = { {128 * 1024, 1} },
17776 .block_erase = erase_chip_block_jedec,
17777 },
17778 },
Sean Nelson35727f72010-01-28 23:55:12 +000017779 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000017780 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017781 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017782 .prepare_access = prepare_memory_access,
17783 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000017784 },
17785
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017786 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017787 .vendor = "SyncMOS/MoselVitelic",
17788 .name = "{F,S,V}29C51001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017789 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017790 .manufacture_id = SYNCMOS_MVC_ID,
17791 .model_id = SM_MVC_29C51001T,
17792 .total_size = 128,
17793 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000017794 .feature_bits = FEATURE_EITHER_RESET,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017795 .tested = TEST_UNTESTED,
17796 .probe = probe_jedec,
17797 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
17798 .block_erasers =
17799 {
17800 {
17801 .eraseblocks = { {512, 256} },
17802 .block_erase = erase_sector_jedec,
17803 }, {
17804 .eraseblocks = { {128 * 1024, 1} },
17805 .block_erase = erase_chip_block_jedec,
17806 },
17807 },
17808 .write = write_jedec_1,
17809 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017810 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017811 .prepare_access = prepare_memory_access,
17812 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017813 },
17814
17815 {
17816 .vendor = "SyncMOS/MoselVitelic",
17817 .name = "{F,S,V}29C51002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017818 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017819 .manufacture_id = SYNCMOS_MVC_ID,
17820 .model_id = SM_MVC_29C51002B,
17821 .total_size = 256,
17822 .page_size = 512,
17823 .feature_bits = FEATURE_EITHER_RESET,
17824 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017825 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000017826 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000017827 .block_erasers =
17828 {
17829 {
17830 .eraseblocks = { {512, 512} },
17831 .block_erase = erase_sector_jedec,
17832 }, {
17833 .eraseblocks = { {256 * 1024, 1} },
17834 .block_erase = erase_chip_block_jedec,
17835 },
17836 },
Sean Nelson35727f72010-01-28 23:55:12 +000017837 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000017838 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010017839 .prepare_access = prepare_memory_access,
17840 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000017841 },
17842
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017843 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017844 .vendor = "SyncMOS/MoselVitelic",
17845 .name = "{F,S,V}29C51002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017846 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017847 .manufacture_id = SYNCMOS_MVC_ID,
17848 .model_id = SM_MVC_29C51002T,
17849 .total_size = 256,
17850 .page_size = 512,
17851 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000017852 .tested = TEST_OK_PREW,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017853 .probe = probe_jedec,
17854 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
17855 .block_erasers =
17856 {
17857 {
17858 .eraseblocks = { {512, 512} },
17859 .block_erase = erase_sector_jedec,
17860 }, {
17861 .eraseblocks = { {256 * 1024, 1} },
17862 .block_erase = erase_chip_block_jedec,
17863 },
17864 },
17865 .write = write_jedec_1,
17866 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010017867 .prepare_access = prepare_memory_access,
17868 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017869 },
17870
17871 {
17872 .vendor = "SyncMOS/MoselVitelic",
17873 .name = "{F,S,V}29C51004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017874 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017875 .manufacture_id = SYNCMOS_MVC_ID,
17876 .model_id = SM_MVC_29C51004B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017877 .total_size = 512,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017878 .page_size = 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000017879 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017880 .tested = TEST_UNTESTED,
17881 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000017882 .probe_timing = TIMING_ZERO,
Sean Nelson56358aa2010-01-19 16:08:51 +000017883 .block_erasers =
17884 {
17885 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017886 .eraseblocks = { {1024, 512} },
17887 .block_erase = erase_sector_jedec,
17888 }, {
17889 .eraseblocks = { {512 * 1024, 1} },
17890 .block_erase = erase_chip_block_jedec,
17891 },
17892 },
17893 .write = write_jedec_1,
17894 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017895 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017896 .prepare_access = prepare_memory_access,
17897 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017898 },
17899
17900 {
17901 .vendor = "SyncMOS/MoselVitelic",
17902 .name = "{F,S,V}29C51004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017903 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017904 .manufacture_id = SYNCMOS_MVC_ID,
17905 .model_id = SM_MVC_29C51004T,
17906 .total_size = 512,
17907 .page_size = 1024,
17908 .feature_bits = FEATURE_EITHER_RESET,
17909 .tested = TEST_UNTESTED,
17910 .probe = probe_jedec,
17911 .probe_timing = TIMING_ZERO,
17912 .block_erasers =
17913 {
17914 {
17915 .eraseblocks = { {1024, 512} },
17916 .block_erase = erase_sector_jedec,
17917 }, {
17918 .eraseblocks = { {512 * 1024, 1} },
17919 .block_erase = erase_chip_block_jedec,
17920 },
17921 },
17922 .write = write_jedec_1,
17923 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017924 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017925 .prepare_access = prepare_memory_access,
17926 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017927 },
17928
17929 {
17930 .vendor = "SyncMOS/MoselVitelic",
17931 .name = "{S,V}29C31004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017932 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017933 .manufacture_id = SYNCMOS_MVC_ID,
17934 .model_id = SM_MVC_29C31004B,
17935 .total_size = 512,
17936 .page_size = 1024,
17937 .feature_bits = FEATURE_EITHER_RESET,
17938 .tested = TEST_UNTESTED,
17939 .probe = probe_jedec,
17940 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
17941 .block_erasers =
17942 {
17943 {
17944 .eraseblocks = { {1024, 512} },
17945 .block_erase = erase_sector_jedec,
17946 }, {
17947 .eraseblocks = { {512 * 1024, 1} },
17948 .block_erase = erase_chip_block_jedec,
17949 },
17950 },
17951 .write = write_jedec_1,
17952 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017953 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010017954 .prepare_access = prepare_memory_access,
17955 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017956 },
17957
17958 {
17959 .vendor = "SyncMOS/MoselVitelic",
17960 .name = "{S,V}29C31004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017961 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017962 .manufacture_id = SYNCMOS_MVC_ID,
17963 .model_id = SM_MVC_29C31004T,
17964 .total_size = 512,
17965 .page_size = 1024,
17966 .feature_bits = FEATURE_EITHER_RESET,
17967 .tested = TEST_UNTESTED,
17968 .probe = probe_jedec,
17969 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
17970 .block_erasers =
17971 {
17972 {
17973 .eraseblocks = { {1024, 512} },
Sean Nelson56358aa2010-01-19 16:08:51 +000017974 .block_erase = erase_sector_jedec,
17975 }, {
17976 .eraseblocks = { {512 * 1024, 1} },
17977 .block_erase = erase_chip_block_jedec,
17978 },
17979 },
Sean Nelson35727f72010-01-28 23:55:12 +000017980 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000017981 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017982 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010017983 .prepare_access = prepare_memory_access,
17984 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000017985 },
17986
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017987 {
Uwe Hermanna106d152009-05-27 23:17:40 +000017988 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000017989 .name = "TMS29F002RB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017990 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000017991 .manufacture_id = TI_OLD_ID,
17992 .model_id = TI_TMS29F002RB,
17993 .total_size = 256,
17994 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000017995 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000017996 .tested = TEST_UNTESTED,
17997 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000017998 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000017999 .block_erasers =
18000 {
18001 {
18002 .eraseblocks = {
18003 {16 * 1024, 1},
18004 {8 * 1024, 2},
18005 {32 * 1024, 1},
18006 {64 * 1024, 3},
18007 },
18008 .block_erase = erase_sector_jedec,
18009 }, {
18010 .eraseblocks = { {256 * 1024, 1} },
18011 .block_erase = erase_chip_block_jedec,
18012 },
18013 },
Sean Nelson35727f72010-01-28 23:55:12 +000018014 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018015 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018016 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018017 .prepare_access = prepare_memory_access,
18018 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018019 },
18020
18021 {
Uwe Hermanna106d152009-05-27 23:17:40 +000018022 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018023 .name = "TMS29F002RT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018024 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018025 .manufacture_id = TI_OLD_ID,
18026 .model_id = TI_TMS29F002RT,
18027 .total_size = 256,
18028 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000018029 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018030 .tested = TEST_UNTESTED,
18031 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000018032 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000018033 .block_erasers =
18034 {
18035 {
18036 .eraseblocks = {
18037 {64 * 1024, 3},
18038 {32 * 1024, 1},
18039 {8 * 1024, 2},
18040 {16 * 1024, 1},
18041 },
18042 .block_erase = erase_sector_jedec,
18043 }, {
18044 .eraseblocks = { {256 * 1024, 1} },
18045 .block_erase = erase_chip_block_jedec,
18046 },
18047 },
Sean Nelson35727f72010-01-28 23:55:12 +000018048 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018049 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018050 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018051 .prepare_access = prepare_memory_access,
18052 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018053 },
18054
18055 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018056 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018057 .name = "W25P16",
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018058 .bustype = BUS_SPI,
18059 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018060 .model_id = WINBOND_NEX_W25P16,
18061 .total_size = 2048,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018062 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018063 .feature_bits = FEATURE_WRSR_WREN,
18064 .tested = TEST_UNTESTED,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018065 .probe = probe_spi_rdid,
18066 .probe_timing = TIMING_ZERO,
18067 .block_erasers =
18068 {
18069 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018070 .eraseblocks = { {64 * 1024, 32} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018071 .block_erase = spi_block_erase_d8,
18072 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018073 .eraseblocks = { {2048 * 1024, 1} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018074 .block_erase = spi_block_erase_c7,
18075 }
18076 },
18077 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18078 .unlock = spi_disable_blockprotect,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018079 .write = spi_chip_write_256,
18080 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018081 .voltage = {2700, 3600},
18082 },
18083
18084 {
18085 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018086 .name = "W25P32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018087 .bustype = BUS_SPI,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018088 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018089 .model_id = WINBOND_NEX_W25P32,
18090 .total_size = 4096,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018091 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018092 .feature_bits = FEATURE_WRSR_WREN,
18093 .tested = TEST_UNTESTED,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018094 .probe = probe_spi_rdid,
18095 .probe_timing = TIMING_ZERO,
18096 .block_erasers =
18097 {
18098 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018099 .eraseblocks = { {64 * 1024, 64} },
18100 .block_erase = spi_block_erase_d8,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018101 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018102 .eraseblocks = { {4096 * 1024, 1} },
18103 .block_erase = spi_block_erase_c7,
18104 }
18105 },
18106 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18107 .unlock = spi_disable_blockprotect,
18108 .write = spi_chip_write_256,
18109 .read = spi_chip_read, /* Fast read (0x0B) supported */
18110 .voltage = {2700, 3600},
18111 },
18112
18113 {
18114 .vendor = "Winbond",
18115 .name = "W25P80",
18116 .bustype = BUS_SPI,
18117 .manufacture_id = WINBOND_NEX_ID,
18118 .model_id = WINBOND_NEX_W25P80,
18119 .total_size = 1024,
18120 .page_size = 256,
18121 .feature_bits = FEATURE_WRSR_WREN,
18122 .tested = TEST_UNTESTED,
18123 .probe = probe_spi_rdid,
18124 .probe_timing = TIMING_ZERO,
18125 .block_erasers =
18126 {
18127 {
Rudolf Marekce1c7982010-04-20 19:34:31 +000018128 .eraseblocks = { {64 * 1024, 16} },
18129 .block_erase = spi_block_erase_d8,
18130 }, {
18131 .eraseblocks = { {1024 * 1024, 1} },
Rudolf Marekce1c7982010-04-20 19:34:31 +000018132 .block_erase = spi_block_erase_c7,
18133 }
18134 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018135 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000018136 .unlock = spi_disable_blockprotect,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018137 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018138 .read = spi_chip_read, /* Fast read (0x0B) supported */
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018139 .voltage = {2700, 3600},
David Hendricksc4acec92010-06-24 11:39:57 +000018140 },
18141
18142 {
18143 .vendor = "Winbond",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018144 .name = "W25Q128.V",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018145 .bustype = BUS_SPI,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018146 .manufacture_id = WINBOND_NEX_ID,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018147 .model_id = WINBOND_NEX_W25Q128_V,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018148 .total_size = 16384,
18149 .page_size = 256,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018150 /* supports SFDP */
18151 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018152 /* QPI: only FV & JV..M versions */
18153 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020018154 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Edward O'Callaghana97e3532022-12-16 15:41:05 +110018155 .tested = TEST_OK_PREWB,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018156 .probe = probe_spi_rdid,
18157 .probe_timing = TIMING_ZERO,
18158 .block_erasers =
18159 {
18160 {
18161 .eraseblocks = { {4 * 1024, 4096} },
18162 .block_erase = spi_block_erase_20,
18163 }, {
18164 .eraseblocks = { {32 * 1024, 512} },
18165 .block_erase = spi_block_erase_52,
18166 }, {
18167 .eraseblocks = { {64 * 1024, 256} },
18168 .block_erase = spi_block_erase_d8,
18169 }, {
18170 .eraseblocks = { {16 * 1024 * 1024, 1} },
18171 .block_erase = spi_block_erase_60,
18172 }, {
18173 .eraseblocks = { {16 * 1024 * 1024, 1} },
18174 .block_erase = spi_block_erase_c7,
18175 }
18176 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018177 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Antony Rheneus0fbba982011-05-26 14:28:51 +000018178 .unlock = spi_disable_blockprotect,
18179 .write = spi_chip_write_256,
18180 .read = spi_chip_read,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018181 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018182 /* FIXME: Older versions (e.g. 25Q128BV) use WRSR_EXT and have no WPS. */
18183 .reg_bits =
18184 {
Nico Huber2133f592024-01-06 18:30:01 +010018185 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018186 .srp = {STATUS1, 7, RW},
18187 .srl = {STATUS2, 0, RW},
18188 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18189 .tb = {STATUS1, 5, RW},
18190 .sec = {STATUS1, 6, RW},
18191 .cmp = {STATUS2, 6, RW},
18192 .wps = {STATUS3, 2, RW},
18193 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018194 .wp_write_cfg = spi_wp_write_cfg,
18195 .wp_read_cfg = spi_wp_read_cfg,
18196 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018197 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018198 .prepare_access = spi_prepare_io,
18199 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018200 },
18201
18202 {
18203 .vendor = "Winbond",
Patrick Rudolph34323492018-10-04 14:59:40 +020018204 .name = "W25Q128.V..M",
18205 .bustype = BUS_SPI,
18206 .manufacture_id = WINBOND_NEX_ID,
18207 .model_id = WINBOND_NEX_W25Q128_V_M,
18208 .total_size = 16384,
18209 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010018210 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
18211 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030018212 .tested = TEST_OK_PREWB,
Patrick Rudolph34323492018-10-04 14:59:40 +020018213 .probe = probe_spi_rdid,
18214 .probe_timing = TIMING_ZERO,
18215 .block_erasers =
18216 {
18217 {
18218 .eraseblocks = { {4 * 1024, 4096} },
18219 .block_erase = spi_block_erase_20,
18220 }, {
18221 .eraseblocks = { {32 * 1024, 512} },
18222 .block_erase = spi_block_erase_52,
18223 }, {
18224 .eraseblocks = { {64 * 1024, 256} },
18225 .block_erase = spi_block_erase_d8,
18226 }, {
18227 .eraseblocks = { {16 * 1024 * 1024, 1} },
18228 .block_erase = spi_block_erase_60,
18229 }, {
18230 .eraseblocks = { {16 * 1024 * 1024, 1} },
18231 .block_erase = spi_block_erase_c7,
18232 }
18233 },
Alan Greena1fc01d2019-09-23 17:12:44 +100018234 .printlock = spi_prettyprint_status_register_plain,
Patrick Rudolph34323492018-10-04 14:59:40 +020018235 .unlock = spi_disable_blockprotect,
18236 .write = spi_chip_write_256,
18237 .read = spi_chip_read,
18238 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018239 .reg_bits =
18240 {
Nico Huber2133f592024-01-06 18:30:01 +010018241 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018242 .srp = {STATUS1, 7, RW},
18243 .srl = {STATUS2, 0, RW},
18244 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18245 .tb = {STATUS1, 5, RW},
18246 .sec = {STATUS1, 6, RW},
18247 .cmp = {STATUS2, 6, RW},
18248 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018249 .wp_write_cfg = spi_wp_write_cfg,
18250 .wp_read_cfg = spi_wp_read_cfg,
18251 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018252 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018253 .prepare_access = spi_prepare_io,
18254 .finish_access = spi_finish_io,
Patrick Rudolph34323492018-10-04 14:59:40 +020018255 },
18256
18257 {
18258 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018259 .name = "W25Q128.W",
18260 .bustype = BUS_SPI,
18261 .manufacture_id = WINBOND_NEX_ID,
18262 .model_id = WINBOND_NEX_W25Q128_W,
18263 .total_size = 16384,
18264 .page_size = 256,
18265 /* supports SFDP */
18266 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018267 /* QPI: only FW & JW..M versions */
18268 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018269 .tested = TEST_OK_PREW,
18270 .probe = probe_spi_rdid,
18271 .probe_timing = TIMING_ZERO,
18272 .block_erasers =
18273 {
18274 {
18275 .eraseblocks = { {4 * 1024, 4096} },
18276 .block_erase = spi_block_erase_20,
18277 }, {
18278 .eraseblocks = { {32 * 1024, 512} },
18279 .block_erase = spi_block_erase_52,
18280 }, {
18281 .eraseblocks = { {64 * 1024, 256} },
18282 .block_erase = spi_block_erase_d8,
18283 }, {
18284 .eraseblocks = { {16 * 1024 * 1024, 1} },
18285 .block_erase = spi_block_erase_60,
18286 }, {
18287 .eraseblocks = { {16 * 1024 * 1024, 1} },
18288 .block_erase = spi_block_erase_c7,
18289 }
18290 },
18291 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18292 .unlock = spi_disable_blockprotect,
18293 .write = spi_chip_write_256,
18294 .read = spi_chip_read,
18295 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018296 .reg_bits =
18297 {
Nico Huber2133f592024-01-06 18:30:01 +010018298 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018299 .srp = {STATUS1, 7, RW},
18300 .srl = {STATUS2, 0, RW},
18301 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18302 .tb = {STATUS1, 5, RW},
18303 .sec = {STATUS1, 6, RW},
18304 .cmp = {STATUS2, 6, RW},
18305 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018306 .wp_write_cfg = spi_wp_write_cfg,
18307 .wp_read_cfg = spi_wp_read_cfg,
18308 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018309 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018310 .prepare_access = spi_prepare_io,
18311 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018312 },
18313
18314 {
18315 .vendor = "Winbond",
Peichao Wang1a119492019-11-11 15:26:41 +080018316 .name = "W25Q128.JW.DTR",
18317 .bustype = BUS_SPI,
18318 .manufacture_id = WINBOND_NEX_ID,
18319 .model_id = WINBOND_NEX_W25Q128_DTR,
18320 .total_size = 16384,
18321 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010018322 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
18323 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Peichao Wang1a119492019-11-11 15:26:41 +080018324 .tested = TEST_OK_PREW,
18325 .probe = probe_spi_rdid,
18326 .probe_timing = TIMING_ZERO,
18327 .block_erasers =
18328 {
18329 {
18330 .eraseblocks = { {4 * 1024, 4096} },
18331 .block_erase = spi_block_erase_20,
18332 }, {
18333 .eraseblocks = { {32 * 1024, 512} },
18334 .block_erase = spi_block_erase_52,
18335 }, {
18336 .eraseblocks = { {64 * 1024, 256} },
18337 .block_erase = spi_block_erase_d8,
18338 }, {
18339 .eraseblocks = { {16 * 1024 * 1024, 1} },
18340 .block_erase = spi_block_erase_60,
18341 }, {
18342 .eraseblocks = { {16 * 1024 * 1024, 1} },
18343 .block_erase = spi_block_erase_c7,
18344 }
18345 },
18346 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18347 .unlock = spi_disable_blockprotect,
18348 .write = spi_chip_write_256,
18349 .read = spi_chip_read,
18350 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018351 .reg_bits =
18352 {
Nico Huber2133f592024-01-06 18:30:01 +010018353 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018354 .srp = {STATUS1, 7, RW},
18355 .srl = {STATUS2, 0, RW},
18356 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18357 .tb = {STATUS1, 5, RW},
18358 .sec = {STATUS1, 6, RW},
18359 .cmp = {STATUS2, 6, RW},
18360 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018361 .wp_write_cfg = spi_wp_write_cfg,
18362 .wp_read_cfg = spi_wp_read_cfg,
18363 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018364 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018365 .prepare_access = spi_prepare_io,
18366 .finish_access = spi_finish_io,
Peichao Wang1a119492019-11-11 15:26:41 +080018367 },
18368
18369 {
18370 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018371 .name = "W25Q16.V",
18372 .bustype = BUS_SPI,
18373 .manufacture_id = WINBOND_NEX_ID,
18374 .model_id = WINBOND_NEX_W25Q16_V,
18375 .total_size = 2048,
18376 .page_size = 256,
18377 /* supports SFDP */
18378 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018379 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018380 .tested = TEST_OK_PREW,
18381 .probe = probe_spi_rdid,
18382 .probe_timing = TIMING_ZERO,
18383 .block_erasers =
18384 {
18385 {
18386 .eraseblocks = { {4 * 1024, 512} },
18387 .block_erase = spi_block_erase_20,
18388 }, {
18389 .eraseblocks = { {32 * 1024, 64} },
18390 .block_erase = spi_block_erase_52,
18391 }, {
18392 .eraseblocks = { {64 * 1024, 32} },
18393 .block_erase = spi_block_erase_d8,
18394 }, {
18395 .eraseblocks = { {2 * 1024 * 1024, 1} },
18396 .block_erase = spi_block_erase_60,
18397 }, {
18398 .eraseblocks = { {2 * 1024 * 1024, 1} },
18399 .block_erase = spi_block_erase_c7,
18400 }
18401 },
Nico Huber2133f592024-01-06 18:30:01 +010018402 .reg_bits =
18403 {
18404 .qe = {STATUS2, 1, RW},
18405 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018406 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18407 .unlock = spi_disable_blockprotect,
18408 .write = spi_chip_write_256,
18409 .read = spi_chip_read,
18410 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020018411 .prepare_access = spi_prepare_io,
18412 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018413 },
18414
18415 {
18416 .vendor = "Winbond",
18417 .name = "W25Q16.W",
18418 .bustype = BUS_SPI,
18419 .manufacture_id = WINBOND_NEX_ID,
18420 .model_id = WINBOND_NEX_W25Q16_W,
18421 .total_size = 2048,
18422 .page_size = 256,
18423 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018424 /* QPI: only FW & JW..M versions .qpi_read_params = { 2, 4, 6, 8 } */
18425 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018426 .tested = TEST_UNTESTED,
18427 .probe = probe_spi_rdid,
18428 .probe_timing = TIMING_ZERO,
18429 .block_erasers =
18430 {
18431 {
18432 .eraseblocks = { {4 * 1024, 512} },
18433 .block_erase = spi_block_erase_20,
18434 }, {
18435 .eraseblocks = { {32 * 1024, 64} },
18436 .block_erase = spi_block_erase_52,
18437 }, {
18438 .eraseblocks = { {64 * 1024, 32} },
18439 .block_erase = spi_block_erase_d8,
18440 }, {
18441 .eraseblocks = { {2 * 1024 * 1024, 1} },
18442 .block_erase = spi_block_erase_60,
18443 }, {
18444 .eraseblocks = { {2 * 1024 * 1024, 1} },
18445 .block_erase = spi_block_erase_c7,
18446 }
18447 },
Nico Huber2133f592024-01-06 18:30:01 +010018448 .reg_bits =
18449 {
18450 .qe = {STATUS2, 1, RW},
18451 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018452 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18453 .unlock = spi_disable_blockprotect,
18454 .write = spi_chip_write_256,
18455 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010018456 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018457 .prepare_access = spi_prepare_io,
18458 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018459 },
18460
18461 {
18462 .vendor = "Winbond",
18463 .name = "W25Q20.W",
18464 .bustype = BUS_SPI,
18465 .manufacture_id = WINBOND_NEX_ID,
18466 .model_id = WINBOND_NEX_W25Q20_W,
18467 .total_size = 256,
18468 .page_size = 256,
18469 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018470 /* W25Q20EW: FEATURE_WRSR2 */
18471 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018472 .tested = TEST_UNTESTED,
18473 .probe = probe_spi_rdid,
18474 .probe_timing = TIMING_ZERO,
18475 .block_erasers =
18476 {
18477 {
18478 .eraseblocks = { {4 * 1024, 64} },
18479 .block_erase = spi_block_erase_20,
18480 }, {
18481 .eraseblocks = { {32 * 1024, 8} },
18482 .block_erase = spi_block_erase_52,
18483 }, {
18484 .eraseblocks = { {64 * 1024, 4} },
18485 .block_erase = spi_block_erase_d8,
18486 }, {
18487 .eraseblocks = { {256 * 1024, 1} },
18488 .block_erase = spi_block_erase_60,
18489 }, {
18490 .eraseblocks = { {256 * 1024, 1} },
18491 .block_erase = spi_block_erase_c7,
18492 }
18493 },
Nico Huber2133f592024-01-06 18:30:01 +010018494 .reg_bits =
18495 {
18496 .qe = {STATUS2, 1, RW},
18497 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018498 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18499 .unlock = spi_disable_blockprotect,
18500 .write = spi_chip_write_256,
18501 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010018502 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018503 .prepare_access = spi_prepare_io,
18504 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018505 },
18506
18507 {
18508 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020018509 .name = "W25Q256FV",
Boris Baykovaa6c3742016-06-11 18:29:01 +020018510 .bustype = BUS_SPI,
18511 .manufacture_id = WINBOND_NEX_ID,
18512 .model_id = WINBOND_NEX_W25Q256_V,
18513 .total_size = 32768,
18514 .page_size = 256,
18515 /* supports SFDP */
18516 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018517 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
18518 FEATURE_4BA_ENTER_WREN | FEATURE_4BA_EAR_C5C8 |
18519 FEATURE_4BA_READ | FEATURE_4BA_FAST_READ |
18520 FEATURE_QPI_SRP,
18521 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons3130cbd2018-09-30 19:32:30 +020018522 .tested = TEST_OK_PREW,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018523 .probe = probe_spi_rdid,
18524 .probe_timing = TIMING_ZERO,
18525 .block_erasers =
18526 {
18527 {
18528 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7a077222017-10-14 18:18:30 +020018529 .block_erase = spi_block_erase_20,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018530 }, {
18531 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber7a077222017-10-14 18:18:30 +020018532 .block_erase = spi_block_erase_52,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018533 }, {
18534 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7a077222017-10-14 18:18:30 +020018535 .block_erase = spi_block_erase_d8,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018536 }, {
18537 .eraseblocks = { {32 * 1024 * 1024, 1} },
18538 .block_erase = spi_block_erase_60,
18539 }, {
18540 .eraseblocks = { {32 * 1024 * 1024, 1} },
18541 .block_erase = spi_block_erase_c7,
18542 }
18543 },
18544 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18545 .unlock = spi_disable_blockprotect,
18546 .write = spi_chip_write_256,
18547 .read = spi_chip_read,
18548 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018549 .reg_bits =
18550 {
Nico Huber2133f592024-01-06 18:30:01 +010018551 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018552 .srp = {STATUS1, 7, RW},
18553 .srl = {STATUS2, 0, RW},
18554 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18555 .tb = {STATUS1, 6, RW},
18556 .cmp = {STATUS2, 6, RW},
18557 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018558 .wp_write_cfg = spi_wp_write_cfg,
18559 .wp_read_cfg = spi_wp_read_cfg,
18560 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018561 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018562 .prepare_access = spi_prepare_io,
18563 .finish_access = spi_finish_io,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018564 },
18565
18566 {
18567 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020018568 .name = "W25Q256JV_Q",
18569 .bustype = BUS_SPI,
18570 .manufacture_id = WINBOND_NEX_ID,
18571 .model_id = WINBOND_NEX_W25Q256_V,
18572 .total_size = 32768,
18573 .page_size = 256,
18574 /* supports SFDP */
18575 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018576 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Nico Huberddfbbe82023-12-21 16:31:27 +010018577 .tested = TEST_OK_PREW,
Nico Huber5215eab2022-05-23 15:13:07 +020018578 .probe = probe_spi_rdid,
18579 .probe_timing = TIMING_ZERO,
18580 .block_erasers =
18581 {
18582 {
18583 .eraseblocks = { {4 * 1024, 8192} },
18584 .block_erase = spi_block_erase_21,
18585 }, {
18586 .eraseblocks = { {4 * 1024, 8192} },
18587 .block_erase = spi_block_erase_20,
18588 }, {
18589 .eraseblocks = { {32 * 1024, 1024} },
18590 .block_erase = spi_block_erase_52,
18591 }, {
18592 .eraseblocks = { {64 * 1024, 512} },
18593 .block_erase = spi_block_erase_dc,
18594 }, {
18595 .eraseblocks = { {64 * 1024, 512} },
18596 .block_erase = spi_block_erase_d8,
18597 }, {
18598 .eraseblocks = { {32 * 1024 * 1024, 1} },
18599 .block_erase = spi_block_erase_60,
18600 }, {
18601 .eraseblocks = { {32 * 1024 * 1024, 1} },
18602 .block_erase = spi_block_erase_c7,
18603 }
18604 },
18605 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18606 .unlock = spi_disable_blockprotect,
18607 .write = spi_chip_write_256,
18608 .read = spi_chip_read,
18609 .voltage = {2700, 3600},
18610 .reg_bits =
18611 {
Nico Huber2133f592024-01-06 18:30:01 +010018612 .qe = {STATUS2, 1, RW},
Nico Huber5215eab2022-05-23 15:13:07 +020018613 .srp = {STATUS1, 7, RW},
18614 .srl = {STATUS2, 0, RW},
18615 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18616 .tb = {STATUS1, 6, RW},
18617 .cmp = {STATUS2, 6, RW},
18618 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018619 .wp_write_cfg = spi_wp_write_cfg,
18620 .wp_read_cfg = spi_wp_read_cfg,
18621 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber5215eab2022-05-23 15:13:07 +020018622 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018623 .prepare_access = spi_prepare_io,
18624 .finish_access = spi_finish_io,
Nico Huber5215eab2022-05-23 15:13:07 +020018625 },
18626
18627 {
18628 .vendor = "Winbond",
David Hendricks49876792018-10-27 20:19:42 +000018629 .name = "W25Q256JV_M",
18630 .bustype = BUS_SPI,
18631 .manufacture_id = WINBOND_NEX_ID,
18632 .model_id = WINBOND_NEX_W25Q256JV_M,
18633 .total_size = 32768,
18634 .page_size = 256,
18635 /* supports SFDP */
18636 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018637 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
18638 FEATURE_4BA | FEATURE_QPI_SRP,
18639 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
David Hendricks49876792018-10-27 20:19:42 +000018640 .tested = TEST_OK_PREW,
18641 .probe = probe_spi_rdid,
18642 .probe_timing = TIMING_ZERO,
18643 .block_erasers =
18644 {
18645 {
18646 .eraseblocks = { {4 * 1024, 8192} },
18647 .block_erase = spi_block_erase_21,
18648 }, {
18649 .eraseblocks = { {4 * 1024, 8192} },
18650 .block_erase = spi_block_erase_20,
18651 }, {
18652 .eraseblocks = { {32 * 1024, 1024} },
18653 .block_erase = spi_block_erase_52,
18654 }, {
18655 .eraseblocks = { {64 * 1024, 512} },
18656 .block_erase = spi_block_erase_dc,
18657 }, {
18658 .eraseblocks = { {64 * 1024, 512} },
18659 .block_erase = spi_block_erase_d8,
18660 }, {
18661 .eraseblocks = { {32 * 1024 * 1024, 1} },
18662 .block_erase = spi_block_erase_60,
18663 }, {
18664 .eraseblocks = { {32 * 1024 * 1024, 1} },
18665 .block_erase = spi_block_erase_c7,
18666 }
18667 },
18668 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18669 .unlock = spi_disable_blockprotect,
18670 .write = spi_chip_write_256,
18671 .read = spi_chip_read,
18672 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018673 .reg_bits =
18674 {
Nico Huber2133f592024-01-06 18:30:01 +010018675 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018676 .srp = {STATUS1, 7, RW},
18677 .srl = {STATUS2, 0, RW},
18678 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18679 .tb = {STATUS1, 6, RW},
18680 .cmp = {STATUS2, 6, RW},
18681 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018682 .wp_write_cfg = spi_wp_write_cfg,
18683 .wp_read_cfg = spi_wp_read_cfg,
18684 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018685 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018686 .prepare_access = spi_prepare_io,
18687 .finish_access = spi_finish_io,
David Hendricks49876792018-10-27 20:19:42 +000018688 },
18689
18690 {
18691 .vendor = "Winbond",
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020018692 .name = "W25Q256JW",
el-coderon01209852020-04-29 12:12:53 +020018693 .bustype = BUS_SPI,
18694 .manufacture_id = WINBOND_NEX_ID,
18695 .model_id = WINBOND_NEX_W25Q256_W,
18696 .total_size = 32768,
18697 .page_size = 256,
18698 /* supports SFDP */
18699 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018700 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
18701 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
el-coderon01209852020-04-29 12:12:53 +020018702 .tested = TEST_OK_PREW,
18703 .probe = probe_spi_rdid,
18704 .probe_timing = TIMING_ZERO,
18705 .block_erasers =
18706 {
18707 {
18708 .eraseblocks = { {4 * 1024, 8192} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020018709 .block_erase = spi_block_erase_21,
18710 }, {
18711 .eraseblocks = { {4 * 1024, 8192} },
el-coderon01209852020-04-29 12:12:53 +020018712 .block_erase = spi_block_erase_20,
18713 }, {
18714 .eraseblocks = { {32 * 1024, 1024} },
18715 .block_erase = spi_block_erase_52,
18716 }, {
18717 .eraseblocks = { {64 * 1024, 512} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020018718 .block_erase = spi_block_erase_dc,
18719 }, {
18720 .eraseblocks = { {64 * 1024, 512} },
el-coderon01209852020-04-29 12:12:53 +020018721 .block_erase = spi_block_erase_d8,
18722 }, {
18723 .eraseblocks = { {32 * 1024 * 1024, 1} },
18724 .block_erase = spi_block_erase_60,
18725 }, {
18726 .eraseblocks = { {32 * 1024 * 1024, 1} },
18727 .block_erase = spi_block_erase_c7,
18728 }
18729 },
Nico Huber2133f592024-01-06 18:30:01 +010018730 .reg_bits =
18731 {
18732 .qe = {STATUS2, 1, RW},
18733 },
el-coderon01209852020-04-29 12:12:53 +020018734 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18735 .unlock = spi_disable_blockprotect,
18736 .write = spi_chip_write_256,
18737 .read = spi_chip_read,
18738 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018739 .prepare_access = spi_prepare_io,
18740 .finish_access = spi_finish_io,
el-coderon01209852020-04-29 12:12:53 +020018741 },
18742
18743 {
18744 .vendor = "Winbond",
David Hendricks31532602020-08-16 17:14:56 -070018745 .name = "W25Q256JW_DTR",
18746 .bustype = BUS_SPI,
18747 .manufacture_id = WINBOND_NEX_ID,
18748 .model_id = WINBOND_NEX_W25Q256_DTR,
18749 .total_size = 32768,
18750 .page_size = 256,
18751 /* supports SFDP */
18752 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018753 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
18754 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
18755 .dummy_cycles =
18756 {
18757 .qpi_read_params = {
18758 2, /* Datasheet Rev.K says 4 is the default, though.
18759 Will assume that the text is wrong, if not,
18760 we'll know why it doesn't work. */
18761 4, 6, 8
18762 },
18763 },
Kapil Porwal111c3802022-12-09 19:41:27 +053018764 .tested = TEST_OK_PREWB,
David Hendricks31532602020-08-16 17:14:56 -070018765 .probe = probe_spi_rdid,
18766 .probe_timing = TIMING_ZERO,
18767 .block_erasers =
18768 {
18769 {
18770 .eraseblocks = { {4 * 1024, 8192} },
18771 .block_erase = spi_block_erase_21,
18772 }, {
18773 .eraseblocks = { {4 * 1024, 8192} },
18774 .block_erase = spi_block_erase_20,
18775 }, {
18776 .eraseblocks = { {32 * 1024, 1024} },
18777 .block_erase = spi_block_erase_52,
18778 }, {
18779 .eraseblocks = { {64 * 1024, 512} },
18780 .block_erase = spi_block_erase_dc,
18781 }, {
18782 .eraseblocks = { {64 * 1024, 512} },
18783 .block_erase = spi_block_erase_d8,
18784 }, {
18785 .eraseblocks = { {32 * 1024 * 1024, 1} },
18786 .block_erase = spi_block_erase_60,
18787 }, {
18788 .eraseblocks = { {32 * 1024 * 1024, 1} },
18789 .block_erase = spi_block_erase_c7,
18790 }
18791 },
18792 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18793 .unlock = spi_disable_blockprotect,
18794 .write = spi_chip_write_256,
18795 .read = spi_chip_read,
18796 .voltage = {1700, 1950},
Kapil Porwal111c3802022-12-09 19:41:27 +053018797 .reg_bits =
18798 {
Nico Huber2133f592024-01-06 18:30:01 +010018799 .qe = {STATUS2, 1, RW},
Kapil Porwal111c3802022-12-09 19:41:27 +053018800 .srp = {STATUS1, 7, RW},
18801 .srl = {STATUS2, 0, RW},
18802 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18803 .tb = {STATUS1, 6, RW},
18804 .cmp = {STATUS2, 6, RW},
18805 .wps = {STATUS3, 2, RW},
18806 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018807 .wp_write_cfg = spi_wp_write_cfg,
18808 .wp_read_cfg = spi_wp_read_cfg,
18809 .wp_get_ranges = spi_wp_get_available_ranges,
Kapil Porwal111c3802022-12-09 19:41:27 +053018810 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018811 .prepare_access = spi_prepare_io,
18812 .finish_access = spi_finish_io,
David Hendricks31532602020-08-16 17:14:56 -070018813 },
18814
18815 {
18816 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018817 .name = "W25Q32BV/W25Q32CV/W25Q32DV",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018818 .bustype = BUS_SPI,
18819 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018820 .model_id = WINBOND_NEX_W25Q32_V,
18821 .total_size = 4096,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018822 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018823 /* supports SFDP */
18824 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018825 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018826 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018827 .probe = probe_spi_rdid,
18828 .probe_timing = TIMING_ZERO,
18829 .block_erasers =
18830 {
18831 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018832 .eraseblocks = { {4 * 1024, 1024} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018833 .block_erase = spi_block_erase_20,
18834 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018835 .eraseblocks = { {32 * 1024, 128} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018836 .block_erase = spi_block_erase_52,
18837 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018838 .eraseblocks = { {64 * 1024, 64} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018839 .block_erase = spi_block_erase_d8,
18840 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018841 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018842 .block_erase = spi_block_erase_60,
18843 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018844 .eraseblocks = { {4 * 1024 * 1024, 1} },
18845 .block_erase = spi_block_erase_c7,
18846 }
18847 },
18848 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18849 .unlock = spi_disable_blockprotect,
18850 .write = spi_chip_write_256,
18851 .read = spi_chip_read,
18852 .voltage = {2700, 3600},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018853 .reg_bits =
18854 {
Nico Huber2133f592024-01-06 18:30:01 +010018855 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018856 .srp = {STATUS1, 7, RW},
18857 .srl = {STATUS2, 0, RW},
18858 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18859 .tb = {STATUS1, 5, RW},
18860 .sec = {STATUS1, 6, RW},
18861 .cmp = {STATUS2, 6, RW},
18862 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018863 .wp_write_cfg = spi_wp_write_cfg,
18864 .wp_read_cfg = spi_wp_read_cfg,
18865 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018866 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018867 .prepare_access = spi_prepare_io,
18868 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018869 },
18870
18871 {
18872 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018873 .name = "W25Q32FV",
18874 .bustype = BUS_SPI,
18875 .manufacture_id = WINBOND_NEX_ID,
18876 .model_id = WINBOND_NEX_W25Q32_V,
18877 .total_size = 4096,
18878 .page_size = 256,
18879 /* supports SFDP */
18880 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018881 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018882 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010018883 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018884 .tested = TEST_OK_PREW,
18885 .probe = probe_spi_rdid,
18886 .probe_timing = TIMING_ZERO,
18887 .block_erasers =
18888 {
18889 {
18890 .eraseblocks = { {4 * 1024, 1024} },
18891 .block_erase = spi_block_erase_20,
18892 }, {
18893 .eraseblocks = { {32 * 1024, 128} },
18894 .block_erase = spi_block_erase_52,
18895 }, {
18896 .eraseblocks = { {64 * 1024, 64} },
18897 .block_erase = spi_block_erase_d8,
18898 }, {
18899 .eraseblocks = { {4 * 1024 * 1024, 1} },
18900 .block_erase = spi_block_erase_60,
18901 }, {
18902 .eraseblocks = { {4 * 1024 * 1024, 1} },
18903 .block_erase = spi_block_erase_c7,
18904 }
18905 },
18906 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18907 .unlock = spi_disable_blockprotect,
18908 .write = spi_chip_write_256,
18909 .read = spi_chip_read,
18910 .voltage = {2700, 3600},
18911 .reg_bits =
18912 {
Nico Huber2133f592024-01-06 18:30:01 +010018913 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018914 .srp = {STATUS1, 7, RW},
18915 .srl = {STATUS2, 0, RW},
18916 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18917 .tb = {STATUS1, 5, RW},
18918 .sec = {STATUS1, 6, RW},
18919 .cmp = {STATUS2, 6, RW},
18920 .wps = {STATUS3, 2, RW},
18921 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018922 .wp_write_cfg = spi_wp_write_cfg,
18923 .wp_read_cfg = spi_wp_read_cfg,
18924 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018925 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018926 .prepare_access = spi_prepare_io,
18927 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018928 },
18929
18930 {
18931 .vendor = "Winbond",
18932 .name = "W25Q32JV",
18933 .bustype = BUS_SPI,
18934 .manufacture_id = WINBOND_NEX_ID,
18935 .model_id = WINBOND_NEX_W25Q32_V,
18936 .total_size = 4096,
18937 .page_size = 256,
18938 /* supports SFDP */
18939 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018940 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018941 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
18942 .tested = TEST_OK_PREW,
18943 .probe = probe_spi_rdid,
18944 .probe_timing = TIMING_ZERO,
18945 .block_erasers =
18946 {
18947 {
18948 .eraseblocks = { {4 * 1024, 1024} },
18949 .block_erase = spi_block_erase_20,
18950 }, {
18951 .eraseblocks = { {32 * 1024, 128} },
18952 .block_erase = spi_block_erase_52,
18953 }, {
18954 .eraseblocks = { {64 * 1024, 64} },
18955 .block_erase = spi_block_erase_d8,
18956 }, {
18957 .eraseblocks = { {4 * 1024 * 1024, 1} },
18958 .block_erase = spi_block_erase_60,
18959 }, {
18960 .eraseblocks = { {4 * 1024 * 1024, 1} },
18961 .block_erase = spi_block_erase_c7,
18962 }
18963 },
18964 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18965 .unlock = spi_disable_blockprotect,
18966 .write = spi_chip_write_256,
18967 .read = spi_chip_read,
18968 .voltage = {2700, 3600},
18969 .reg_bits =
18970 {
Nico Huber2133f592024-01-06 18:30:01 +010018971 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018972 .srp = {STATUS1, 7, RW},
18973 .srl = {STATUS2, 0, RW},
18974 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18975 .tb = {STATUS1, 5, RW},
18976 .sec = {STATUS1, 6, RW},
18977 .cmp = {STATUS2, 6, RW},
18978 .wps = {STATUS3, 2, RW},
18979 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018980 .wp_write_cfg = spi_wp_write_cfg,
18981 .wp_read_cfg = spi_wp_read_cfg,
18982 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018983 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018984 .prepare_access = spi_prepare_io,
18985 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018986 },
18987
18988 {
18989 .vendor = "Winbond",
Angel Pons0d4354e2024-05-26 16:33:51 +020018990 .name = "W25Q32JV-.M",
18991 .bustype = BUS_SPI,
18992 .manufacture_id = WINBOND_NEX_ID,
18993 .model_id = WINBOND_NEX_W25Q32JV,
18994 .total_size = 4096,
18995 .page_size = 256,
18996 /* supports SFDP */
Nico Huber1412d9f2024-01-06 18:25:49 +010018997 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Angel Pons0d4354e2024-05-26 16:33:51 +020018998 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010018999 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons0d4354e2024-05-26 16:33:51 +020019000 .tested = TEST_OK_PREW,
19001 .probe = probe_spi_rdid,
19002 .probe_timing = TIMING_ZERO,
19003 .block_erasers =
19004 {
19005 {
19006 .eraseblocks = { {4 * 1024, 1024} },
19007 .block_erase = spi_block_erase_20,
19008 }, {
19009 .eraseblocks = { {32 * 1024, 128} },
19010 .block_erase = spi_block_erase_52,
19011 }, {
19012 .eraseblocks = { {64 * 1024, 64} },
19013 .block_erase = spi_block_erase_d8,
19014 }, {
19015 .eraseblocks = { {4 * 1024 * 1024, 1} },
19016 .block_erase = spi_block_erase_60,
19017 }, {
19018 .eraseblocks = { {4 * 1024 * 1024, 1} },
19019 .block_erase = spi_block_erase_c7,
19020 }
19021 },
19022 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19023 .unlock = spi_disable_blockprotect_bp2_srwd,
19024 .write = spi_chip_write_256,
19025 .read = spi_chip_read,
19026 .voltage = {2700, 3600},
19027 .reg_bits =
19028 {
Nico Huber2133f592024-01-06 18:30:01 +010019029 .qe = {STATUS2, 1, RW},
Angel Pons0d4354e2024-05-26 16:33:51 +020019030 .srp = {STATUS1, 7, RW},
19031 .srl = {STATUS2, 0, RW},
19032 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19033 .tb = {STATUS1, 5, RW},
19034 .sec = {STATUS1, 6, RW},
19035 .cmp = {STATUS2, 6, RW},
19036 .wps = {STATUS3, 2, RW},
19037 },
19038 .wp_write_cfg = spi_wp_write_cfg,
19039 .wp_read_cfg = spi_wp_read_cfg,
19040 .wp_get_ranges = spi_wp_get_available_ranges,
19041 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019042 .prepare_access = spi_prepare_io,
19043 .finish_access = spi_finish_io,
Angel Pons0d4354e2024-05-26 16:33:51 +020019044 },
19045
19046 {
19047 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019048 .name = "W25Q32BW/W25Q32CW/W25Q32DW",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019049 .bustype = BUS_SPI,
19050 .manufacture_id = WINBOND_NEX_ID,
19051 .model_id = WINBOND_NEX_W25Q32_W,
19052 .total_size = 4096,
19053 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019054 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019055 /* QPI: only DW version */
19056 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019057 .tested = TEST_OK_PREW,
19058 .probe = probe_spi_rdid,
19059 .probe_timing = TIMING_ZERO,
19060 .block_erasers =
19061 {
19062 {
19063 .eraseblocks = { {4 * 1024, 1024} },
19064 .block_erase = spi_block_erase_20,
19065 }, {
19066 .eraseblocks = { {32 * 1024, 128} },
19067 .block_erase = spi_block_erase_52,
19068 }, {
19069 .eraseblocks = { {64 * 1024, 64} },
19070 .block_erase = spi_block_erase_d8,
19071 }, {
19072 .eraseblocks = { {4 * 1024 * 1024, 1} },
19073 .block_erase = spi_block_erase_60,
19074 }, {
19075 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019076 .block_erase = spi_block_erase_c7,
19077 }
19078 },
19079 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19080 .unlock = spi_disable_blockprotect,
19081 .write = spi_chip_write_256,
19082 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019083 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019084 .reg_bits =
19085 {
Nico Huber2133f592024-01-06 18:30:01 +010019086 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019087 .srp = {STATUS1, 7, RW},
19088 .srl = {STATUS2, 0, RW},
19089 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19090 .tb = {STATUS1, 5, RW},
19091 .sec = {STATUS1, 6, RW},
19092 .cmp = {STATUS2, 6, RW},
19093 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019094 .wp_write_cfg = spi_wp_write_cfg,
19095 .wp_read_cfg = spi_wp_read_cfg,
19096 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019097 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019098 .prepare_access = spi_prepare_io,
19099 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019100 },
19101
19102 {
19103 .vendor = "Winbond",
19104 .name = "W25Q32FW",
19105 .bustype = BUS_SPI,
19106 .manufacture_id = WINBOND_NEX_ID,
19107 .model_id = WINBOND_NEX_W25Q32_W,
19108 .total_size = 4096,
19109 .page_size = 256,
19110 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019111 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019112 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010019113 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019114 .tested = TEST_OK_PREW,
19115 .probe = probe_spi_rdid,
19116 .probe_timing = TIMING_ZERO,
19117 .block_erasers =
19118 {
19119 {
19120 .eraseblocks = { {4 * 1024, 1024} },
19121 .block_erase = spi_block_erase_20,
19122 }, {
19123 .eraseblocks = { {32 * 1024, 128} },
19124 .block_erase = spi_block_erase_52,
19125 }, {
19126 .eraseblocks = { {64 * 1024, 64} },
19127 .block_erase = spi_block_erase_d8,
19128 }, {
19129 .eraseblocks = { {4 * 1024 * 1024, 1} },
19130 .block_erase = spi_block_erase_60,
19131 }, {
19132 .eraseblocks = { {4 * 1024 * 1024, 1} },
19133 .block_erase = spi_block_erase_c7,
19134 }
19135 },
19136 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19137 .unlock = spi_disable_blockprotect,
19138 .write = spi_chip_write_256,
19139 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019140 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019141 .reg_bits =
19142 {
Nico Huber2133f592024-01-06 18:30:01 +010019143 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019144 .srp = {STATUS1, 7, RW},
19145 .srl = {STATUS2, 0, RW},
19146 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19147 .tb = {STATUS1, 5, RW},
19148 .sec = {STATUS1, 6, RW},
19149 .cmp = {STATUS2, 6, RW},
19150 .wps = {STATUS3, 2, RW},
19151 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019152 .wp_write_cfg = spi_wp_write_cfg,
19153 .wp_read_cfg = spi_wp_read_cfg,
19154 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019155 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019156 .prepare_access = spi_prepare_io,
19157 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019158 },
19159
19160 {
19161 .vendor = "Winbond",
19162 .name = "W25Q32JW...Q",
19163 .bustype = BUS_SPI,
19164 .manufacture_id = WINBOND_NEX_ID,
19165 .model_id = WINBOND_NEX_W25Q32_W,
19166 .total_size = 4096,
19167 .page_size = 256,
19168 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19169 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010019170 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019171 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
19172 .tested = TEST_OK_PREW,
19173 .probe = probe_spi_rdid,
19174 .probe_timing = TIMING_ZERO,
19175 .block_erasers =
19176 {
19177 {
19178 .eraseblocks = { {4 * 1024, 1024} },
19179 .block_erase = spi_block_erase_20,
19180 }, {
19181 .eraseblocks = { {32 * 1024, 128} },
19182 .block_erase = spi_block_erase_52,
19183 }, {
19184 .eraseblocks = { {64 * 1024, 64} },
19185 .block_erase = spi_block_erase_d8,
19186 }, {
19187 .eraseblocks = { {4 * 1024 * 1024, 1} },
19188 .block_erase = spi_block_erase_60,
19189 }, {
19190 .eraseblocks = { {4 * 1024 * 1024, 1} },
19191 .block_erase = spi_block_erase_c7,
19192 }
19193 },
19194 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19195 .unlock = spi_disable_blockprotect,
19196 .write = spi_chip_write_256,
19197 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019198 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019199 .reg_bits =
19200 {
19201 .srp = {STATUS1, 7, RW},
19202 .srl = {STATUS2, 0, RW},
19203 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19204 .tb = {STATUS1, 5, RW},
19205 .sec = {STATUS1, 6, RW},
19206 .cmp = {STATUS2, 6, RW},
19207 .wps = {STATUS3, 2, RW},
19208 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019209 .wp_write_cfg = spi_wp_write_cfg,
19210 .wp_read_cfg = spi_wp_read_cfg,
19211 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019212 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019213 .prepare_access = spi_prepare_io,
19214 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019215 },
19216
19217 {
19218 .vendor = "Winbond",
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019219 .name = "W25Q32JW...M",
19220 .bustype = BUS_SPI,
19221 .manufacture_id = WINBOND_NEX_ID,
19222 .model_id = WINBOND_NEX_W25Q32JW_M,
19223 .total_size = 4096,
19224 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019225 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19226 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010019227 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019228 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_WRSR_EXT2,
Nico Huber2133f592024-01-06 18:30:01 +010019229 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019230 .tested = TEST_OK_PREW,
19231 .probe = probe_spi_rdid,
19232 .probe_timing = TIMING_ZERO,
19233 .block_erasers =
19234 {
19235 {
19236 .eraseblocks = { {4 * 1024, 1024} },
19237 .block_erase = spi_block_erase_20,
19238 }, {
19239 .eraseblocks = { {32 * 1024, 128} },
19240 .block_erase = spi_block_erase_52,
19241 }, {
19242 .eraseblocks = { {64 * 1024, 64} },
19243 .block_erase = spi_block_erase_d8,
19244 }, {
19245 .eraseblocks = { {4 * 1024 * 1024, 1} },
19246 .block_erase = spi_block_erase_60,
19247 }, {
19248 .eraseblocks = { {4 * 1024 * 1024, 1} },
19249 .block_erase = spi_block_erase_c7,
19250 }
19251 },
19252 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19253 .unlock = spi_disable_blockprotect_bp2_srwd,
19254 .write = spi_chip_write_256,
19255 .read = spi_chip_read,
19256 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019257 .reg_bits =
19258 {
Nico Huber2133f592024-01-06 18:30:01 +010019259 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019260 .srp = {STATUS1, 7, RW},
19261 .srl = {STATUS2, 0, RW},
19262 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19263 .tb = {STATUS1, 5, RW},
19264 .sec = {STATUS1, 6, RW},
19265 .cmp = {STATUS2, 6, RW},
19266 .wps = {STATUS3, 2, RW},
19267 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019268 .wp_write_cfg = spi_wp_write_cfg,
19269 .wp_read_cfg = spi_wp_read_cfg,
19270 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019271 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019272 .prepare_access = spi_prepare_io,
19273 .finish_access = spi_finish_io,
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019274 },
19275
19276 {
19277 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019278 .name = "W25Q40.V",
19279 .bustype = BUS_SPI,
19280 .manufacture_id = WINBOND_NEX_ID,
19281 .model_id = WINBOND_NEX_W25Q40_V,
19282 .total_size = 512,
19283 .page_size = 256,
19284 /* supports SFDP */
19285 /* OTP: 756B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019286 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019287 .tested = TEST_OK_PREW,
19288 .probe = probe_spi_rdid,
19289 .probe_timing = TIMING_ZERO,
19290 .block_erasers =
19291 {
19292 {
19293 .eraseblocks = { {4 * 1024, 128} },
19294 .block_erase = spi_block_erase_20,
19295 }, {
19296 .eraseblocks = { {32 * 1024, 16} },
19297 .block_erase = spi_block_erase_52,
19298 }, {
19299 .eraseblocks = { {64 * 1024, 8} },
19300 .block_erase = spi_block_erase_d8,
19301 }, {
19302 .eraseblocks = { {512 * 1024, 1} },
19303 .block_erase = spi_block_erase_60,
19304 }, {
19305 .eraseblocks = { {512 * 1024, 1} },
19306 .block_erase = spi_block_erase_c7,
19307 }
19308 },
Nico Huber2133f592024-01-06 18:30:01 +010019309 .reg_bits =
19310 {
19311 .qe = {STATUS2, 1, RW},
19312 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019313 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19314 .unlock = spi_disable_blockprotect,
19315 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber2133f592024-01-06 18:30:01 +010019316 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019317 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019318 .prepare_access = spi_prepare_io,
19319 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019320 },
19321
19322 {
19323 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020019324 .name = "W25Q40BW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019325 .bustype = BUS_SPI,
19326 .manufacture_id = WINBOND_NEX_ID,
Nico Huber25683572018-03-30 13:50:13 +020019327 .model_id = WINBOND_NEX_W25Q40BW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019328 .total_size = 512,
19329 .page_size = 256,
19330 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019331 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Angel Pons3164a0c2018-09-30 20:26:06 +020019332 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019333 .probe = probe_spi_rdid,
19334 .probe_timing = TIMING_ZERO,
19335 .block_erasers =
19336 {
19337 {
19338 .eraseblocks = { {4 * 1024, 128} },
19339 .block_erase = spi_block_erase_20,
19340 }, {
19341 .eraseblocks = { {32 * 1024, 16} },
19342 .block_erase = spi_block_erase_52,
19343 }, {
19344 .eraseblocks = { {64 * 1024, 8} },
19345 .block_erase = spi_block_erase_d8,
19346 }, {
19347 .eraseblocks = { {512 * 1024, 1} },
19348 .block_erase = spi_block_erase_60,
19349 }, {
19350 .eraseblocks = { {512 * 1024, 1} },
19351 .block_erase = spi_block_erase_c7,
19352 }
19353 },
Nico Huber2133f592024-01-06 18:30:01 +010019354 .reg_bits =
19355 {
19356 .qe = {STATUS2, 1, RW},
19357 },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019358 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19359 .unlock = spi_disable_blockprotect,
19360 .write = spi_chip_write_256,
19361 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019362 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019363 .prepare_access = spi_prepare_io,
19364 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019365 },
19366
19367 {
19368 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020019369 .name = "W25Q40EW",
19370 .bustype = BUS_SPI,
19371 .manufacture_id = WINBOND_NEX_ID,
19372 .model_id = WINBOND_NEX_W25Q40EW,
19373 .total_size = 512,
19374 .page_size = 256,
19375 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019376 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
19377 FEATURE_OTP | FEATURE_QPI_SRP,
19378 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green07b8a172019-09-23 16:47:05 +100019379 .tested = TEST_OK_PREW,
Nico Huber25683572018-03-30 13:50:13 +020019380 .probe = probe_spi_rdid,
19381 .probe_timing = TIMING_ZERO,
19382 .block_erasers =
19383 {
19384 {
19385 .eraseblocks = { {4 * 1024, 128} },
19386 .block_erase = spi_block_erase_20,
19387 }, {
19388 .eraseblocks = { {32 * 1024, 16} },
19389 .block_erase = spi_block_erase_52,
19390 }, {
19391 .eraseblocks = { {64 * 1024, 8} },
19392 .block_erase = spi_block_erase_d8,
19393 }, {
19394 .eraseblocks = { {512 * 1024, 1} },
19395 .block_erase = spi_block_erase_60,
19396 }, {
19397 .eraseblocks = { {512 * 1024, 1} },
19398 .block_erase = spi_block_erase_c7,
19399 }
19400 },
Nico Huber2133f592024-01-06 18:30:01 +010019401 .reg_bits =
19402 {
19403 .qe = {STATUS2, 1, RW},
19404 },
Nico Huber25683572018-03-30 13:50:13 +020019405 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19406 .unlock = spi_disable_blockprotect,
19407 .write = spi_chip_write_256,
19408 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019409 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019410 .prepare_access = spi_prepare_io,
19411 .finish_access = spi_finish_io,
Nico Huber25683572018-03-30 13:50:13 +020019412 },
19413
Stanislav Sedovf5775442018-03-07 14:16:51 -080019414 {
19415 .vendor = "Winbond",
Joel Stanley55439612019-07-27 19:25:35 +093019416 .name = "W25Q512JV",
19417 .bustype = BUS_SPI,
19418 .manufacture_id = WINBOND_NEX_ID,
19419 .model_id = WINBOND_NEX_W25Q512JV,
19420 .total_size = 64 * 1024,
19421 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010019422 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
19423 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Joel Stanley55439612019-07-27 19:25:35 +093019424 .tested = TEST_OK_PREW,
19425 .probe = probe_spi_rdid,
19426 .probe_timing = TIMING_ZERO,
19427 .block_erasers =
19428 {
19429 {
19430 .eraseblocks = { {4 * 1024, 16384} },
19431 .block_erase = spi_block_erase_21,
19432 }, {
19433 .eraseblocks = { {4 * 1024, 16384} },
19434 .block_erase = spi_block_erase_20,
19435 }, {
19436 .eraseblocks = { {32 * 1024, 2048} },
19437 .block_erase = spi_block_erase_52,
19438 }, {
19439 .eraseblocks = { {64 * 1024, 1024} },
19440 .block_erase = spi_block_erase_dc,
19441 }, {
19442 .eraseblocks = { {64 * 1024, 1024} },
19443 .block_erase = spi_block_erase_d8,
19444 }, {
19445 .eraseblocks = { {64 * 1024 * 1024, 1} },
19446 .block_erase = spi_block_erase_60,
19447 }, {
19448 .eraseblocks = { {64 * 1024 * 1024, 1} },
19449 .block_erase = spi_block_erase_c7,
19450 }
19451 },
Nico Huber2133f592024-01-06 18:30:01 +010019452 .reg_bits =
19453 {
19454 .qe = {STATUS2, 1, RW},
19455 },
Joel Stanley55439612019-07-27 19:25:35 +093019456 .printlock = spi_prettyprint_status_register_plain,
19457 .unlock = spi_disable_blockprotect,
19458 .write = spi_chip_write_256,
19459 .read = spi_chip_read,
19460 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019461 .prepare_access = spi_prepare_io,
19462 .finish_access = spi_finish_io,
Joel Stanley55439612019-07-27 19:25:35 +093019463 },
19464
19465 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010019466 .vendor = "Winbond",
19467 .name = "W25Q512NW-IM",
19468 .bustype = BUS_SPI,
19469 .manufacture_id = WINBOND_NEX_ID,
19470 .model_id = WINBOND_NEX_W25Q512NW_IM,
19471 .total_size = 64 * 1024,
19472 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010019473 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
19474 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
19475 .dummy_cycles =
19476 {
19477 /* Actually has 3 parameter bits, but higher values only help with DTR. */
19478 .qpi_read_params = { 2, 4, 6, 8 },
19479 },
Subrata Banikf5bffd92022-12-14 12:30:43 +053019480 .tested = TEST_OK_PREWB,
Felix Singer3c9bdb92022-12-15 23:30:16 +010019481 .probe = probe_spi_rdid,
19482 .probe_timing = TIMING_ZERO,
19483 .block_erasers =
Atul Dhudase2502dbd2021-09-21 10:02:20 +053019484 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010019485 {
19486 .eraseblocks = { {4 * 1024, 16384} },
19487 .block_erase = spi_block_erase_21,
19488 }, {
19489 .eraseblocks = { {4 * 1024, 16384} },
19490 .block_erase = spi_block_erase_20,
19491 }, {
19492 .eraseblocks = { {32 * 1024, 2048} },
19493 .block_erase = spi_block_erase_52,
19494 }, {
19495 .eraseblocks = { {64 * 1024, 1024} },
19496 .block_erase = spi_block_erase_dc,
19497 }, {
19498 .eraseblocks = { {64 * 1024, 1024} },
19499 .block_erase = spi_block_erase_d8,
19500 }, {
19501 .eraseblocks = { {64 * 1024 * 1024, 1} },
19502 .block_erase = spi_block_erase_60,
19503 }, {
19504 .eraseblocks = { {64 * 1024 * 1024, 1} },
19505 .block_erase = spi_block_erase_c7,
19506 }
19507 },
19508 .unlock = spi_disable_blockprotect,
19509 .write = spi_chip_write_256,
19510 .read = spi_chip_read,
19511 .voltage = {1650, 1950},
Subrata Banikf5bffd92022-12-14 12:30:43 +053019512 .reg_bits =
19513 {
Nico Huber2133f592024-01-06 18:30:01 +010019514 .qe = {STATUS2, 1, RW},
Subrata Banikf5bffd92022-12-14 12:30:43 +053019515 .srp = {STATUS1, 7, RW},
19516 .srl = {STATUS2, 0, RW},
19517 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
19518 .tb = {STATUS1, 6, RW},
19519 .cmp = {STATUS2, 6, RW},
19520 .wps = {STATUS3, 2, RW},
19521 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019522 .wp_write_cfg = spi_wp_write_cfg,
19523 .wp_read_cfg = spi_wp_read_cfg,
19524 .wp_get_ranges = spi_wp_get_available_ranges,
Subrata Banikf5bffd92022-12-14 12:30:43 +053019525 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019526 .prepare_access = spi_prepare_io,
19527 .finish_access = spi_finish_io,
Atul Dhudase2502dbd2021-09-21 10:02:20 +053019528 },
19529
19530 {
Joel Stanley55439612019-07-27 19:25:35 +093019531 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019532 .name = "W25Q64BV/W25Q64CV/W25Q64FV",
Stanislav Sedovf5775442018-03-07 14:16:51 -080019533 .bustype = BUS_SPI,
19534 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019535 .model_id = WINBOND_NEX_W25Q64_V,
19536 .total_size = 8192,
Stanislav Sedovf5775442018-03-07 14:16:51 -080019537 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019538 /* supports SFDP */
19539 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019540 /* QPI: only FV version */
19541 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030019542 .tested = TEST_OK_PREWB,
Stanislav Sedovf5775442018-03-07 14:16:51 -080019543 .probe = probe_spi_rdid,
19544 .probe_timing = TIMING_ZERO,
19545 .block_erasers =
19546 {
19547 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019548 .eraseblocks = { {4 * 1024, 2048} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019549 .block_erase = spi_block_erase_20,
19550 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019551 .eraseblocks = { {32 * 1024, 256} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019552 .block_erase = spi_block_erase_52,
19553 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019554 .eraseblocks = { {64 * 1024, 128} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019555 .block_erase = spi_block_erase_d8,
19556 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019557 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019558 .block_erase = spi_block_erase_60,
19559 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019560 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019561 .block_erase = spi_block_erase_c7,
19562 }
19563 },
19564 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19565 .unlock = spi_disable_blockprotect,
19566 .write = spi_chip_write_256,
19567 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019568 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019569 .reg_bits =
19570 {
Nico Huber2133f592024-01-06 18:30:01 +010019571 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019572 .srp = {STATUS1, 7, RW},
19573 .srl = {STATUS2, 0, RW},
19574 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19575 .tb = {STATUS1, 5, RW},
19576 .sec = {STATUS1, 6, RW},
19577 .cmp = {STATUS2, 6, RW},
19578 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019579 .wp_write_cfg = spi_wp_write_cfg,
19580 .wp_read_cfg = spi_wp_read_cfg,
19581 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019582 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019583 .prepare_access = spi_prepare_io,
19584 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019585 },
19586
19587 {
19588 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019589 .name = "W25Q64JV-.Q",
19590 .bustype = BUS_SPI,
19591 .manufacture_id = WINBOND_NEX_ID,
19592 .model_id = WINBOND_NEX_W25Q64_V,
19593 .total_size = 8192,
19594 .page_size = 256,
19595 /* supports SFDP */
19596 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019597 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020019598 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019599 .tested = TEST_OK_PREW,
19600 .probe = probe_spi_rdid,
19601 .probe_timing = TIMING_ZERO,
19602 .block_erasers =
19603 {
19604 {
19605 .eraseblocks = { {4 * 1024, 2048} },
19606 .block_erase = spi_block_erase_20,
19607 }, {
19608 .eraseblocks = { {32 * 1024, 256} },
19609 .block_erase = spi_block_erase_52,
19610 }, {
19611 .eraseblocks = { {64 * 1024, 128} },
19612 .block_erase = spi_block_erase_d8,
19613 }, {
19614 .eraseblocks = { {8 * 1024 * 1024, 1} },
19615 .block_erase = spi_block_erase_60,
19616 }, {
19617 .eraseblocks = { {8 * 1024 * 1024, 1} },
19618 .block_erase = spi_block_erase_c7,
19619 }
19620 },
19621 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19622 .unlock = spi_disable_blockprotect,
19623 .write = spi_chip_write_256,
19624 .read = spi_chip_read,
19625 .voltage = {2700, 3600},
19626 .reg_bits =
19627 {
Nico Huber2133f592024-01-06 18:30:01 +010019628 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019629 .srp = {STATUS1, 7, RW},
19630 .srl = {STATUS2, 0, RW},
19631 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19632 .tb = {STATUS1, 5, RW},
19633 .sec = {STATUS1, 6, RW},
19634 .cmp = {STATUS2, 6, RW},
19635 .wps = {STATUS3, 2, RW},
19636 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019637 .wp_write_cfg = spi_wp_write_cfg,
19638 .wp_read_cfg = spi_wp_read_cfg,
19639 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019640 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019641 .prepare_access = spi_prepare_io,
19642 .finish_access = spi_finish_io,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019643 },
19644
19645 {
19646 .vendor = "Winbond",
19647 .name = "W25Q64JV-.M",
Simon Buhrow236a38c2021-11-05 11:48:30 +010019648 .bustype = BUS_SPI,
19649 .manufacture_id = WINBOND_NEX_ID,
19650 .model_id = WINBOND_NEX_W25Q64JV,
19651 .total_size = 8192,
19652 .page_size = 256,
19653 /* supports SFDP */
Nico Huber2133f592024-01-06 18:30:01 +010019654 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
19655 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010019656 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Simon Buhrow236a38c2021-11-05 11:48:30 +010019657 .tested = TEST_OK_PREW,
19658 .probe = probe_spi_rdid,
19659 .probe_timing = TIMING_ZERO,
19660 .block_erasers =
19661 {
19662 {
19663 .eraseblocks = { {4 * 1024, 2048} },
19664 .block_erase = spi_block_erase_20,
19665 }, {
19666 .eraseblocks = { {32 * 1024, 256} },
19667 .block_erase = spi_block_erase_52,
19668 }, {
19669 .eraseblocks = { {64 * 1024, 128} },
19670 .block_erase = spi_block_erase_d8,
19671 }, {
19672 .eraseblocks = { {8 * 1024 * 1024, 1} },
19673 .block_erase = spi_block_erase_60,
19674 }, {
19675 .eraseblocks = { {8 * 1024 * 1024, 1} },
19676 .block_erase = spi_block_erase_c7,
19677 }
19678 },
Nico Huber2133f592024-01-06 18:30:01 +010019679 .reg_bits =
19680 {
19681 .qe = {STATUS2, 1, RW},
19682 },
Simon Buhrow236a38c2021-11-05 11:48:30 +010019683 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19684 .unlock = spi_disable_blockprotect_bp2_srwd,
19685 .write = spi_chip_write_256,
19686 .read = spi_chip_read,
19687 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019688 .prepare_access = spi_prepare_io,
19689 .finish_access = spi_finish_io,
Simon Buhrow236a38c2021-11-05 11:48:30 +010019690 },
19691
19692 {
19693 .vendor = "Winbond",
Nico Hubera358b142024-04-14 18:29:06 +020019694 .name = "W25Q64DW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019695 .bustype = BUS_SPI,
19696 .manufacture_id = WINBOND_NEX_ID,
19697 .model_id = WINBOND_NEX_W25Q64_W,
19698 .total_size = 8192,
19699 .page_size = 256,
19700 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019701 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
19702 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nico Hubera358b142024-04-14 18:29:06 +020019703 .tested = TEST_OK_PREW,
19704 .probe = probe_spi_rdid,
19705 .probe_timing = TIMING_ZERO,
19706 .block_erasers =
19707 {
19708 {
19709 .eraseblocks = { {4 * 1024, 2048} },
19710 .block_erase = spi_block_erase_20,
19711 }, {
19712 .eraseblocks = { {32 * 1024, 256} },
19713 .block_erase = spi_block_erase_52,
19714 }, {
19715 .eraseblocks = { {64 * 1024, 128} },
19716 .block_erase = spi_block_erase_d8,
19717 }, {
19718 .eraseblocks = { {8 * 1024 * 1024, 1} },
19719 .block_erase = spi_block_erase_60,
19720 }, {
19721 .eraseblocks = { {8 * 1024 * 1024, 1} },
19722 .block_erase = spi_block_erase_c7,
19723 }
19724 },
19725 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19726 .unlock = spi_disable_blockprotect,
19727 .write = spi_chip_write_256,
19728 .read = spi_chip_read,
19729 .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
19730 .reg_bits =
19731 {
19732 .srp = {STATUS1, 7, RW},
19733 .srl = {STATUS2, 0, RW},
19734 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19735 .tb = {STATUS1, 5, RW},
19736 .sec = {STATUS1, 6, RW},
19737 .cmp = {STATUS2, 6, RW},
19738 },
19739 .wp_write_cfg = spi_wp_write_cfg,
19740 .wp_read_cfg = spi_wp_read_cfg,
19741 .wp_get_ranges = spi_wp_get_available_ranges,
19742 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019743 .prepare_access = spi_prepare_io,
19744 .finish_access = spi_finish_io,
Nico Hubera358b142024-04-14 18:29:06 +020019745 },
19746
19747 {
19748 .vendor = "Winbond",
19749 .name = "W25Q64FW/W25Q64JW...Q",
19750 .bustype = BUS_SPI,
19751 .manufacture_id = WINBOND_NEX_ID,
19752 .model_id = WINBOND_NEX_W25Q64_W,
19753 .total_size = 8192,
19754 .page_size = 256,
19755 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019756 /* FEATURE_QPI_SRP (2, 4, 6, 8): only FW version */
Nico Hubera358b142024-04-14 18:29:06 +020019757 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
Nico Huber1412d9f2024-01-06 18:25:49 +010019758 FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030019759 .tested = TEST_OK_PREWB,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019760 .probe = probe_spi_rdid,
19761 .probe_timing = TIMING_ZERO,
19762 .block_erasers =
19763 {
19764 {
19765 .eraseblocks = { {4 * 1024, 2048} },
19766 .block_erase = spi_block_erase_20,
19767 }, {
19768 .eraseblocks = { {32 * 1024, 256} },
19769 .block_erase = spi_block_erase_52,
19770 }, {
19771 .eraseblocks = { {64 * 1024, 128} },
19772 .block_erase = spi_block_erase_d8,
19773 }, {
19774 .eraseblocks = { {8 * 1024 * 1024, 1} },
19775 .block_erase = spi_block_erase_60,
19776 }, {
19777 .eraseblocks = { {8 * 1024 * 1024, 1} },
19778 .block_erase = spi_block_erase_c7,
19779 }
19780 },
19781 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19782 .unlock = spi_disable_blockprotect,
19783 .write = spi_chip_write_256,
19784 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019785 .voltage = {1700, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110019786 .reg_bits =
19787 {
Nico Huber2133f592024-01-06 18:30:01 +010019788 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110019789 .srp = {STATUS1, 7, RW},
19790 .srl = {STATUS2, 0, RW},
19791 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19792 .tb = {STATUS1, 5, RW},
19793 .sec = {STATUS1, 6, RW},
19794 .cmp = {STATUS2, 6, RW},
19795 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019796 .wp_write_cfg = spi_wp_write_cfg,
19797 .wp_read_cfg = spi_wp_read_cfg,
19798 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110019799 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019800 .prepare_access = spi_prepare_io,
19801 .finish_access = spi_finish_io,
Antony Rheneus0fbba982011-05-26 14:28:51 +000019802 },
19803
19804 {
19805 .vendor = "Winbond",
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100019806 .name = "W25Q64JW...M",
Scott Chao1bbc5012020-04-08 22:10:50 +080019807 .bustype = BUS_SPI,
19808 .manufacture_id = WINBOND_NEX_ID,
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100019809 .model_id = WINBOND_NEX_W25Q64JW_M,
Scott Chao1bbc5012020-04-08 22:10:50 +080019810 .total_size = 8192,
19811 .page_size = 256,
19812 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19813 /* QPI enable 0x38, disable 0xFF */
Nico Huber1412d9f2024-01-06 18:25:49 +010019814 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
19815 FEATURE_OTP | FEATURE_QPI_SRP,
19816 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Scott Chao1bbc5012020-04-08 22:10:50 +080019817 .tested = TEST_OK_PREW,
19818 .probe = probe_spi_rdid,
19819 .probe_timing = TIMING_ZERO,
19820 .block_erasers =
19821 {
19822 {
19823 .eraseblocks = { {4 * 1024, 2048} },
19824 .block_erase = spi_block_erase_20,
19825 }, {
19826 .eraseblocks = { {32 * 1024, 256} },
19827 .block_erase = spi_block_erase_52,
19828 }, {
19829 .eraseblocks = { {64 * 1024, 128} },
19830 .block_erase = spi_block_erase_d8,
19831 }, {
19832 .eraseblocks = { {8 * 1024 * 1024, 1} },
19833 .block_erase = spi_block_erase_60,
19834 }, {
19835 .eraseblocks = { {8 * 1024 * 1024, 1} },
19836 .block_erase = spi_block_erase_c7,
19837 }
19838 },
19839 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19840 .unlock = spi_disable_blockprotect,
19841 .write = spi_chip_write_256,
19842 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019843 .voltage = {1700, 1950},
Evan Benn29c8b5d2022-09-13 16:01:10 +100019844 .reg_bits =
19845 {
Nico Huber2133f592024-01-06 18:30:01 +010019846 .qe = {STATUS2, 1, RW},
Evan Benn29c8b5d2022-09-13 16:01:10 +100019847 .srp = {STATUS1, 7, RW},
19848 .srl = {STATUS2, 0, RW},
19849 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19850 .tb = {STATUS1, 5, RW},
19851 .sec = {STATUS1, 6, RW},
19852 .cmp = {STATUS2, 6, RW},
19853 .wps = {STATUS3, 2, RW},
19854 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019855 .wp_write_cfg = spi_wp_write_cfg,
19856 .wp_read_cfg = spi_wp_read_cfg,
19857 .wp_get_ranges = spi_wp_get_available_ranges,
Evan Benn29c8b5d2022-09-13 16:01:10 +100019858 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019859 .prepare_access = spi_prepare_io,
19860 .finish_access = spi_finish_io,
Scott Chao1bbc5012020-04-08 22:10:50 +080019861 },
19862
19863 {
19864 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019865 .name = "W25Q80.V",
Nico Huber70eed9f2017-04-24 22:19:27 +020019866 .bustype = BUS_SPI,
19867 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019868 .model_id = WINBOND_NEX_W25Q80_V,
19869 .total_size = 1024,
Nico Huber70eed9f2017-04-24 22:19:27 +020019870 .page_size = 256,
19871 /* supports SFDP */
19872 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019873 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
David Hendricks48729d32017-12-08 14:44:07 -080019874 .tested = TEST_OK_PREW,
Nico Huber70eed9f2017-04-24 22:19:27 +020019875 .probe = probe_spi_rdid,
19876 .probe_timing = TIMING_ZERO,
19877 .block_erasers =
19878 {
19879 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019880 .eraseblocks = { {4 * 1024, 256} },
Nico Huber70eed9f2017-04-24 22:19:27 +020019881 .block_erase = spi_block_erase_20,
19882 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019883 .eraseblocks = { {32 * 1024, 32} },
Nico Huber70eed9f2017-04-24 22:19:27 +020019884 .block_erase = spi_block_erase_52,
19885 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019886 .eraseblocks = { {64 * 1024, 16} },
Nico Huber70eed9f2017-04-24 22:19:27 +020019887 .block_erase = spi_block_erase_d8,
19888 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019889 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020019890 .block_erase = spi_block_erase_60,
19891 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019892 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020019893 .block_erase = spi_block_erase_c7,
19894 }
19895 },
Nico Huber2133f592024-01-06 18:30:01 +010019896 .reg_bits =
19897 {
19898 .qe = {STATUS2, 1, RW},
19899 },
Nico Huber70eed9f2017-04-24 22:19:27 +020019900 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19901 .unlock = spi_disable_blockprotect,
19902 .write = spi_chip_write_256,
19903 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019904 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019905 .prepare_access = spi_prepare_io,
19906 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019907 },
19908
19909 {
19910 .vendor = "Winbond",
19911 .name = "W25Q80BW",
19912 .bustype = BUS_SPI,
19913 .manufacture_id = WINBOND_NEX_ID,
19914 .model_id = WINBOND_NEX_W25Q80BW,
19915 .total_size = 1024,
19916 .page_size = 256,
19917 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019918 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019919 .tested = TEST_OK_PREW,
19920 .probe = probe_spi_rdid,
19921 .probe_timing = TIMING_ZERO,
19922 .block_erasers =
19923 {
19924 {
19925 .eraseblocks = { {4 * 1024, 256} },
19926 .block_erase = spi_block_erase_20,
19927 }, {
19928 .eraseblocks = { {32 * 1024, 32} },
19929 .block_erase = spi_block_erase_52,
19930 }, {
19931 .eraseblocks = { {64 * 1024, 16} },
19932 .block_erase = spi_block_erase_d8,
19933 }, {
19934 .eraseblocks = { {1 * 1024 * 1024, 1} },
19935 .block_erase = spi_block_erase_60,
19936 }, {
19937 .eraseblocks = { {1 * 1024 * 1024, 1} },
19938 .block_erase = spi_block_erase_c7,
19939 }
19940 },
Nico Huber2133f592024-01-06 18:30:01 +010019941 .reg_bits =
19942 {
19943 .qe = {STATUS2, 1, RW},
19944 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019945 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19946 .unlock = spi_disable_blockprotect,
19947 .write = spi_chip_write_256,
19948 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019949 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019950 .prepare_access = spi_prepare_io,
19951 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019952 },
19953
19954 {
19955 .vendor = "Winbond",
19956 .name = "W25Q80EW",
19957 .bustype = BUS_SPI,
19958 .manufacture_id = WINBOND_NEX_ID,
19959 .model_id = WINBOND_NEX_W25Q80EW,
19960 .total_size = 1024,
19961 .page_size = 256,
19962 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019963 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
19964 FEATURE_OTP | FEATURE_QPI_SRP,
19965 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019966 .tested = TEST_OK_PREW,
19967 .probe = probe_spi_rdid,
19968 .probe_timing = TIMING_ZERO,
19969 .block_erasers =
19970 {
19971 {
19972 .eraseblocks = { {4 * 1024, 256} },
19973 .block_erase = spi_block_erase_20,
19974 }, {
19975 .eraseblocks = { {32 * 1024, 32} },
19976 .block_erase = spi_block_erase_52,
19977 }, {
19978 .eraseblocks = { {64 * 1024, 16} },
19979 .block_erase = spi_block_erase_d8,
19980 }, {
19981 .eraseblocks = { {1 * 1024 * 1024, 1} },
19982 .block_erase = spi_block_erase_60,
19983 }, {
19984 .eraseblocks = { {1 * 1024 * 1024, 1} },
19985 .block_erase = spi_block_erase_c7,
19986 }
19987 },
Nico Huber2133f592024-01-06 18:30:01 +010019988 .reg_bits =
19989 {
19990 .qe = {STATUS2, 1, RW},
19991 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019992 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19993 .unlock = spi_disable_blockprotect,
19994 .write = spi_chip_write_256,
19995 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019996 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019997 .prepare_access = spi_prepare_io,
19998 .finish_access = spi_finish_io,
Nico Huber70eed9f2017-04-24 22:19:27 +020019999 },
20000
20001 {
20002 .vendor = "Winbond",
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020003 .name = "W25X05",
20004 .bustype = BUS_SPI,
20005 .manufacture_id = WINBOND_NEX_ID,
20006 .model_id = WINBOND_NEX_W25X05,
20007 .total_size = 64,
20008 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020009 /* FEATURE_FAST_READ_DIO since W25X05B */
20010 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020011 .tested = TEST_OK_PREW,
20012 .probe = probe_spi_rdid,
20013 .probe_timing = TIMING_ZERO,
20014 .block_erasers =
20015 {
20016 {
20017 .eraseblocks = { {4 * 1024, 16} },
20018 .block_erase = spi_block_erase_20,
20019 }, {
20020 .eraseblocks = { {32 * 1024, 2} },
20021 .block_erase = spi_block_erase_52,
20022 }, {
20023 .eraseblocks = { {64 * 1024, 1} },
20024 .block_erase = spi_block_erase_d8,
20025 }
20026 },
20027 .printlock = spi_prettyprint_status_register_plain,
20028 .unlock = spi_disable_blockprotect,
20029 .write = spi_chip_write_256,
20030 .read = spi_chip_read,
20031 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020032 .prepare_access = spi_prepare_io,
20033 .finish_access = spi_finish_io,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020034 },
20035
20036 {
20037 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020038 .name = "W25X10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020039 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020040 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020041 .model_id = WINBOND_NEX_W25X10,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020042 .total_size = 128,
20043 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020044 /* FEATURE_FAST_READ_DIO since W25X10B */
20045 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunere34e3e82013-01-01 00:06:51 +000020046 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020047 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000020048 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020049 .block_erasers =
20050 {
20051 {
20052 .eraseblocks = { {4 * 1024, 32} },
20053 .block_erase = spi_block_erase_20,
20054 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020055 .eraseblocks = { {64 * 1024, 2} },
20056 .block_erase = spi_block_erase_d8,
20057 }, {
20058 .eraseblocks = { {128 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020059 .block_erase = spi_block_erase_c7,
20060 }
20061 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020062 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020063 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000020064 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020065 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020066 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020067 .prepare_access = spi_prepare_io,
20068 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000020069 },
20070
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020071 {
20072 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020073 .name = "W25X16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020074 .bustype = BUS_SPI,
Hector Martina721ae22009-07-11 19:39:11 +000020075 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020076 .model_id = WINBOND_NEX_W25X16,
Hector Martina721ae22009-07-11 19:39:11 +000020077 .total_size = 2048,
20078 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020079 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner8179be52011-06-04 13:13:34 +000020080 .tested = TEST_OK_PREW,
Hector Martina721ae22009-07-11 19:39:11 +000020081 .probe = probe_spi_rdid,
20082 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020083 .block_erasers =
20084 {
20085 {
20086 .eraseblocks = { {4 * 1024, 512} },
20087 .block_erase = spi_block_erase_20,
20088 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020089 .eraseblocks = { {64 * 1024, 32} },
20090 .block_erase = spi_block_erase_d8,
20091 }, {
20092 .eraseblocks = { {2 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020093 .block_erase = spi_block_erase_c7,
20094 }
20095 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020096 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020097 .unlock = spi_disable_blockprotect,
Hector Martina721ae22009-07-11 19:39:11 +000020098 .write = spi_chip_write_256,
20099 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020100 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020101 .prepare_access = spi_prepare_io,
20102 .finish_access = spi_finish_io,
Hector Martina721ae22009-07-11 19:39:11 +000020103 },
20104
20105 {
20106 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020107 .name = "W25X20",
20108 .bustype = BUS_SPI,
20109 .manufacture_id = WINBOND_NEX_ID,
20110 .model_id = WINBOND_NEX_W25X20,
20111 .total_size = 256,
20112 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020113 /* FEATURE_FAST_READ_DIO since W25X20B */
20114 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020115 .tested = TEST_OK_PREW,
20116 .probe = probe_spi_rdid,
20117 .probe_timing = TIMING_ZERO,
20118 .block_erasers =
20119 {
20120 {
20121 .eraseblocks = { {4 * 1024, 64} },
20122 .block_erase = spi_block_erase_20,
20123 }, {
20124 .eraseblocks = { {64 * 1024, 4} },
20125 .block_erase = spi_block_erase_d8,
20126 }, {
20127 .eraseblocks = { {256 * 1024, 1} },
20128 .block_erase = spi_block_erase_c7,
20129 }
20130 },
20131 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20132 .unlock = spi_disable_blockprotect,
20133 .write = spi_chip_write_256,
20134 .read = spi_chip_read,
20135 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020136 .prepare_access = spi_prepare_io,
20137 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020138 },
20139
20140 {
20141 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020142 .name = "W25X32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020143 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000020144 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020145 .model_id = WINBOND_NEX_W25X32,
Zheng Bao1db2b752009-11-26 11:05:01 +000020146 .total_size = 4096,
20147 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020148 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000020149 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000020150 .probe = probe_spi_rdid,
20151 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020152 .block_erasers =
20153 {
20154 {
20155 .eraseblocks = { {4 * 1024, 1024} },
20156 .block_erase = spi_block_erase_20,
20157 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020158 .eraseblocks = { {64 * 1024, 64} },
20159 .block_erase = spi_block_erase_d8,
20160 }, {
20161 .eraseblocks = { {4 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020162 .block_erase = spi_block_erase_c7,
20163 }
20164 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020165 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020166 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000020167 .write = spi_chip_write_256,
20168 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020169 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020170 .prepare_access = spi_prepare_io,
20171 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000020172 },
20173
20174 {
20175 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020176 .name = "W25X40",
20177 .bustype = BUS_SPI,
20178 .manufacture_id = WINBOND_NEX_ID,
20179 .model_id = WINBOND_NEX_W25X40,
20180 .total_size = 512,
20181 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020182 /* FEATURE_FAST_READ_DIO since W25X40B */
20183 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020184 .tested = TEST_OK_PREW,
20185 .probe = probe_spi_rdid,
20186 .probe_timing = TIMING_ZERO,
20187 .block_erasers =
20188 {
20189 {
20190 .eraseblocks = { {4 * 1024, 128} },
20191 .block_erase = spi_block_erase_20,
20192 }, {
20193 .eraseblocks = { {64 * 1024, 8} },
20194 .block_erase = spi_block_erase_d8,
20195 }, {
20196 .eraseblocks = { {512 * 1024, 1} },
20197 .block_erase = spi_block_erase_c7,
20198 }
20199 },
20200 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20201 .unlock = spi_disable_blockprotect,
20202 .write = spi_chip_write_256,
20203 .read = spi_chip_read,
20204 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020205 .prepare_access = spi_prepare_io,
20206 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020207 },
20208
20209 {
20210 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020211 .name = "W25X64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020212 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000020213 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020214 .model_id = WINBOND_NEX_W25X64,
Zheng Bao1db2b752009-11-26 11:05:01 +000020215 .total_size = 8192,
20216 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020217 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner23e10b82016-01-23 16:16:49 +000020218 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000020219 .probe = probe_spi_rdid,
20220 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020221 .block_erasers =
20222 {
20223 {
20224 .eraseblocks = { {4 * 1024, 2048} },
20225 .block_erase = spi_block_erase_20,
20226 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020227 .eraseblocks = { {64 * 1024, 128} },
20228 .block_erase = spi_block_erase_d8,
20229 }, {
20230 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020231 .block_erase = spi_block_erase_c7,
20232 }
20233 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020234 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020235 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000020236 .write = spi_chip_write_256,
20237 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020238 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020239 .prepare_access = spi_prepare_io,
20240 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000020241 },
20242
20243 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100020244 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020245 .name = "W25X80",
Alan Greenfa3fcd32019-06-27 15:41:50 +100020246 .bustype = BUS_SPI,
20247 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020248 .model_id = WINBOND_NEX_W25X80,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020249 .total_size = 1024,
20250 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020251 /* FEATURE_FAST_READ_DIO since W25X80B */
20252 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020253 .tested = TEST_OK_PREW,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020254 .probe = probe_spi_rdid,
20255 .probe_timing = TIMING_ZERO,
20256 .block_erasers =
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020257 {
20258 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020259 .eraseblocks = { {4 * 1024, 256} },
20260 .block_erase = spi_block_erase_20,
20261 }, {
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020262 .eraseblocks = { {64 * 1024, 16} },
20263 .block_erase = spi_block_erase_d8,
20264 }, {
20265 .eraseblocks = { {1024 * 1024, 1} },
20266 .block_erase = spi_block_erase_c7,
20267 }
20268 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100020269 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20270 .unlock = spi_disable_blockprotect,
20271 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020272 .read = spi_chip_read,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020273 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020274 .prepare_access = spi_prepare_io,
20275 .finish_access = spi_finish_io,
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020276 },
20277
Alan Greenf29ea362019-06-27 17:14:02 +100020278 /* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
20279 {
Carl-Daniel Hailfinger2e88a9f2011-07-26 14:18:52 +000020280 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020281 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020282 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020283 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020284 .model_id = WINBOND_W29C010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020285 .total_size = 128,
20286 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000020287 .feature_bits = FEATURE_LONG_RESET,
David Hendricks567b7b82011-05-18 01:31:03 +000020288 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020289 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020290 .probe_timing = 10, /* used datasheet for the W29C011A */
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020291 .block_erasers =
20292 {
20293 {
20294 .eraseblocks = { {128 * 1024, 1} },
20295 .block_erase = erase_chip_block_jedec,
20296 }
20297 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020298 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020299 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010020300 .prepare_access = prepare_memory_access,
20301 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020302 },
20303
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020304 {
20305 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020306 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012-old",
20307 .bustype = BUS_PARALLEL,
20308 .manufacture_id = WINBOND_ID,
20309 .model_id = WINBOND_W29C010,
20310 .total_size = 128,
20311 .page_size = 128,
20312 .feature_bits = FEATURE_LONG_RESET,
20313 .tested = TEST_OK_PREW,
20314 .probe = probe_w29ee011,
20315 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (w29ee011.c) */
20316 .block_erasers =
20317 {
20318 {
20319 .eraseblocks = { {128 * 1024, 1} },
20320 .block_erase = erase_chip_block_jedec,
20321 }
20322 },
20323 .write = write_jedec,
20324 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010020325 .prepare_access = prepare_memory_access,
20326 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020327 },
20328
20329 {
20330 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020331 .name = "W29C020(C)/W29C022",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020332 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020333 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020334 .model_id = WINBOND_W29C020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020335 .total_size = 256,
20336 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000020337 .feature_bits = FEATURE_LONG_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020338 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020339 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020340 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020341 .block_erasers =
20342 {
20343 {
20344 .eraseblocks = { {256 * 1024, 1} },
20345 .block_erase = erase_chip_block_jedec,
20346 }
20347 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020348 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020349 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020350 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020351 .prepare_access = prepare_memory_access,
20352 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020353 },
20354
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020355 {
20356 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020357 .name = "W29C040/P",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020358 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020359 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020360 .model_id = WINBOND_W29C040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020361 .total_size = 512,
20362 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000020363 .feature_bits = FEATURE_LONG_RESET,
20364 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020365 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000020366 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020367 .block_erasers =
20368 {
20369 {
20370 .eraseblocks = { {512 * 1024, 1} },
20371 .block_erase = erase_chip_block_jedec,
20372 }
20373 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020374 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020375 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020376 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020377 .prepare_access = prepare_memory_access,
20378 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020379 },
20380
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020381 {
20382 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020383 .name = "W29C512A/W29EE512",
20384 .bustype = BUS_PARALLEL,
20385 .manufacture_id = WINBOND_ID,
20386 .model_id = WINBOND_W29C512A,
20387 .total_size = 64,
20388 .page_size = 128,
20389 .feature_bits = FEATURE_LONG_RESET,
20390 .tested = TEST_OK_PREW,
20391 .probe = probe_jedec,
20392 .probe_timing = 10,
20393 .block_erasers =
20394 {
20395 {
20396 .eraseblocks = { {64 * 1024, 1} },
20397 .block_erase = erase_chip_block_jedec,
20398 }
20399 },
20400 .write = write_jedec,
20401 .read = read_memmapped,
20402 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020403 .prepare_access = prepare_memory_access,
20404 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020405 },
20406
20407 {
20408 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020409 .name = "W29GL032CB",
20410 .bustype = BUS_PARALLEL,
20411 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20412 .model_id = WINBOND_W29GL032CB,
20413 .total_size = 4096,
20414 .page_size = 128 * 1024, /* actual page size is 16 */
20415 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20416 .tested = TEST_UNTESTED,
20417 .probe = probe_jedec_29gl,
20418 .probe_timing = TIMING_ZERO,
20419 .block_erasers =
20420 {
20421 {
20422 .eraseblocks = {
20423 {8 * 1024, 8},
20424 {64 * 1024, 63},
20425 },
20426 .block_erase = erase_sector_jedec,
20427 }, {
20428 .eraseblocks = { {4 * 1024 * 1024, 1} },
20429 .block_erase = erase_chip_block_jedec,
20430 },
20431 },
20432 .write = write_jedec_1,
20433 .read = read_memmapped,
20434 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020435 .prepare_access = prepare_memory_access,
20436 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020437 },
20438
20439 {
20440 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020441 .name = "W29GL032CH/L",
20442 .bustype = BUS_PARALLEL,
20443 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20444 .model_id = WINBOND_W29GL032CHL,
20445 .total_size = 4096,
20446 .page_size = 128 * 1024, /* actual page size is 16 */
20447 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20448 .tested = TEST_UNTESTED,
20449 .probe = probe_jedec_29gl,
20450 .probe_timing = TIMING_ZERO,
20451 .block_erasers =
20452 {
20453 {
20454 .eraseblocks = { {64 * 1024, 64} },
20455 .block_erase = erase_sector_jedec,
20456 }, {
20457 .eraseblocks = { {4 * 1024 * 1024, 1} },
20458 .block_erase = erase_chip_block_jedec,
20459 },
20460 },
20461 .write = write_jedec_1,
20462 .read = read_memmapped,
20463 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020464 .prepare_access = prepare_memory_access,
20465 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020466 },
20467
20468 {
20469 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020470 .name = "W29GL032CT",
20471 .bustype = BUS_PARALLEL,
20472 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20473 .model_id = WINBOND_W29GL032CT,
20474 .total_size = 4096,
20475 .page_size = 128 * 1024, /* actual page size is 16 */
20476 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20477 .tested = TEST_UNTESTED,
20478 .probe = probe_jedec_29gl,
20479 .probe_timing = TIMING_ZERO,
20480 .block_erasers =
20481 {
20482 {
20483 .eraseblocks = {
20484 {64 * 1024, 63},
20485 {8 * 1024, 8},
20486 },
20487 .block_erase = erase_sector_jedec,
20488 }, {
20489 .eraseblocks = { {4 * 1024 * 1024, 1} },
20490 .block_erase = erase_chip_block_jedec,
20491 },
20492 },
20493 .write = write_jedec_1,
20494 .read = read_memmapped,
20495 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020496 .prepare_access = prepare_memory_access,
20497 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020498 },
20499
20500 {
20501 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020502 .name = "W29GL064CB",
20503 .bustype = BUS_PARALLEL,
20504 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20505 .model_id = WINBOND_W29GL064CB,
20506 .total_size = 8192,
20507 .page_size = 128 * 1024, /* actual page size is 16 */
20508 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20509 .tested = TEST_UNTESTED,
20510 .probe = probe_jedec_29gl,
20511 .probe_timing = TIMING_ZERO,
20512 .block_erasers =
20513 {
20514 {
20515 .eraseblocks = {
20516 {8 * 1024, 8},
20517 {64 * 1024, 127},
20518 },
20519 .block_erase = erase_sector_jedec,
20520 }, {
20521 .eraseblocks = { {8 * 1024 * 1024, 1} },
20522 .block_erase = erase_chip_block_jedec,
20523 },
20524 },
20525 .write = write_jedec_1,
20526 .read = read_memmapped,
20527 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020528 .prepare_access = prepare_memory_access,
20529 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020530 },
20531
20532 {
20533 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020534 .name = "W29GL064CH/L",
20535 .bustype = BUS_PARALLEL,
20536 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20537 .model_id = WINBOND_W29GL064CHL,
20538 .total_size = 8192,
20539 .page_size = 128 * 1024, /* actual page size is 16 */
20540 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20541 .tested = TEST_UNTESTED,
20542 .probe = probe_jedec_29gl,
20543 .probe_timing = TIMING_ZERO,
20544 .block_erasers =
20545 {
20546 {
20547 .eraseblocks = { {64 * 1024, 128} },
20548 .block_erase = erase_sector_jedec,
20549 }, {
20550 .eraseblocks = { {8 * 1024 * 1024, 1} },
20551 .block_erase = erase_chip_block_jedec,
20552 },
20553 },
20554 .write = write_jedec_1,
20555 .read = read_memmapped,
20556 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020557 .prepare_access = prepare_memory_access,
20558 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020559 },
20560
20561 {
20562 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020563 .name = "W29GL064CT",
20564 .bustype = BUS_PARALLEL,
20565 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20566 .model_id = WINBOND_W29GL064CT,
20567 .total_size = 8192,
20568 .page_size = 128 * 1024, /* actual page size is 16 */
20569 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20570 .tested = TEST_UNTESTED,
20571 .probe = probe_jedec_29gl,
20572 .probe_timing = TIMING_ZERO,
20573 .block_erasers =
20574 {
20575 {
20576 .eraseblocks = {
20577 {64 * 1024, 127},
20578 {8 * 1024, 8},
20579 },
20580 .block_erase = erase_sector_jedec,
20581 }, {
20582 .eraseblocks = { {8 * 1024 * 1024, 1} },
20583 .block_erase = erase_chip_block_jedec,
20584 },
20585 },
20586 .write = write_jedec_1,
20587 .read = read_memmapped,
20588 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020589 .prepare_access = prepare_memory_access,
20590 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020591 },
20592
20593 {
20594 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020595 .name = "W29GL128C",
20596 .bustype = BUS_PARALLEL,
20597 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20598 .model_id = WINBOND_W29GL128CHL,
20599 .total_size = 16384,
20600 .page_size = 128 * 1024, /* actual page size is 16 */
20601 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20602 .tested = TEST_UNTESTED,
20603 .probe = probe_jedec_29gl,
20604 .probe_timing = TIMING_ZERO,
20605 .block_erasers =
20606 {
20607 {
20608 .eraseblocks = { {128 * 1024, 128} },
20609 .block_erase = erase_sector_jedec,
20610 }, {
20611 .eraseblocks = { {16 * 1024 * 1024, 1} },
20612 .block_erase = erase_chip_block_jedec,
20613 },
20614 },
20615 .write = write_jedec_1,
20616 .read = read_memmapped,
20617 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020618 .prepare_access = prepare_memory_access,
20619 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020620 },
20621
20622 {
20623 .vendor = "Winbond",
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020624 .name = "W39F010",
20625 .bustype = BUS_PARALLEL,
20626 .manufacture_id = WINBOND_ID,
20627 .model_id = WINBOND_W39F010,
20628 .total_size = 128,
20629 .page_size = 4 * 1024,
20630 .feature_bits = FEATURE_EITHER_RESET,
20631 .tested = TEST_OK_PREW,
20632 .probe = probe_jedec,
20633 .probe_timing = 10,
20634 .block_erasers =
20635 {
20636 {
20637 .eraseblocks = { {4 * 1024, 32} },
20638 .block_erase = erase_block_jedec,
20639 }, {
20640 .eraseblocks = { {128 * 1024, 1} },
20641 .block_erase = erase_chip_block_jedec,
20642 }
20643 },
20644 .printlock = printlock_w39f010,
20645 .write = write_jedec_1,
20646 .read = read_memmapped,
20647 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020648 .prepare_access = prepare_memory_access,
20649 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020650 },
20651
20652 {
20653 .vendor = "Winbond",
20654 .name = "W39L010",
20655 .bustype = BUS_PARALLEL,
20656 .manufacture_id = WINBOND_ID,
20657 .model_id = WINBOND_W39L010,
20658 .total_size = 128,
20659 .page_size = 4 * 1024,
20660 .feature_bits = FEATURE_EITHER_RESET,
20661 .tested = TEST_UNTESTED,
20662 .probe = probe_jedec,
20663 .probe_timing = 10,
20664 .block_erasers =
20665 {
20666 {
20667 .eraseblocks = { {4 * 1024, 32} },
20668 .block_erase = erase_block_jedec,
20669 }, {
20670 .eraseblocks = { {128 * 1024, 1} },
20671 .block_erase = erase_chip_block_jedec,
20672 }
20673 },
20674 .printlock = printlock_w39l010,
20675 .write = write_jedec_1,
20676 .read = read_memmapped,
20677 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020678 .prepare_access = prepare_memory_access,
20679 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020680 },
20681
20682 {
20683 .vendor = "Winbond",
20684 .name = "W39L020",
20685 .bustype = BUS_PARALLEL,
20686 .manufacture_id = WINBOND_ID,
20687 .model_id = WINBOND_W39L020,
20688 .total_size = 256,
20689 .page_size = 4 * 1024,
20690 .feature_bits = FEATURE_EITHER_RESET,
20691 .tested = TEST_UNTESTED,
20692 .probe = probe_jedec,
20693 .probe_timing = 10,
20694 .block_erasers =
20695 {
20696 {
20697 .eraseblocks = { {4 * 1024, 64} },
20698 .block_erase = erase_block_jedec,
20699 }, {
20700 .eraseblocks = { {64 * 1024, 4} },
20701 .block_erase = erase_sector_jedec,
20702 }, {
20703 .eraseblocks = { {256 * 1024, 1} },
20704 .block_erase = erase_chip_block_jedec,
20705 }
20706 },
20707 .printlock = printlock_w39l020,
20708 .write = write_jedec_1,
20709 .read = read_memmapped,
20710 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020711 .prepare_access = prepare_memory_access,
20712 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020713 },
20714
20715 {
20716 .vendor = "Winbond",
Michael Karcher19e0aac2011-03-06 17:58:05 +000020717 .name = "W39L040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020718 .bustype = BUS_PARALLEL,
Michael Karcher19e0aac2011-03-06 17:58:05 +000020719 .manufacture_id = WINBOND_ID,
20720 .model_id = WINBOND_W39L040,
20721 .total_size = 512,
20722 .page_size = 64 * 1024,
20723 .feature_bits = FEATURE_EITHER_RESET,
20724 .tested = TEST_OK_PR,
20725 .probe = probe_jedec,
20726 .probe_timing = 10,
20727 .block_erasers =
20728 {
20729 {
20730 .eraseblocks = { {4 * 1024, 128} },
20731 .block_erase = erase_block_jedec,
20732 }, {
20733 .eraseblocks = { {64 * 1024, 8} },
20734 .block_erase = erase_sector_jedec,
20735 }, {
20736 .eraseblocks = { {512 * 1024, 1} },
20737 .block_erase = erase_chip_block_jedec,
20738 }
20739 },
20740 .printlock = printlock_w39l040,
20741 .write = write_jedec_1,
20742 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020743 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020744 .prepare_access = prepare_memory_access,
20745 .finish_access = finish_memory_access,
Michael Karcher19e0aac2011-03-06 17:58:05 +000020746 },
20747
20748 {
20749 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020750 .name = "W39V040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020751 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020752 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020753 .model_id = WINBOND_W39V040A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020754 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020755 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020756 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000020757 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020758 .probe = probe_jedec,
Stefan Tauner716e0982011-07-25 20:38:52 +000020759 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020760 .block_erasers =
20761 {
20762 {
20763 .eraseblocks = { {64 * 1024, 8} },
20764 .block_erase = erase_sector_jedec,
20765 }, {
20766 .eraseblocks = { {512 * 1024, 1} },
20767 .block_erase = erase_chip_block_jedec,
20768 }
20769 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020770 .printlock = printlock_w39v040a,
Sean Nelson35727f72010-01-28 23:55:12 +000020771 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020772 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020773 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020774 .prepare_access = prepare_memory_access,
20775 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020776 },
20777
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020778 {
20779 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020780 .name = "W39V040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020781 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020782 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020783 .model_id = WINBOND_W39V040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020784 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020785 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020786 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000020787 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020788 .probe = probe_jedec,
Paul Menzel018d4822011-10-21 12:33:07 +000020789 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020790 .block_erasers =
20791 {
20792 {
20793 .eraseblocks = { {64 * 1024, 8} },
20794 .block_erase = erase_sector_jedec,
20795 }, {
20796 .eraseblocks = { {512 * 1024, 1} },
20797 .block_erase = erase_chip_block_jedec,
20798 }
20799 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020800 .printlock = printlock_w39v040b,
Sean Nelson35727f72010-01-28 23:55:12 +000020801 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020802 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020803 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020804 .prepare_access = prepare_memory_access,
20805 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020806 },
20807
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020808 {
20809 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020810 .name = "W39V040C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020811 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020812 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020813 .model_id = WINBOND_W39V040C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020814 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020815 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020816 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000020817 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000020818 .probe = probe_jedec,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020819 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020820 .block_erasers =
20821 {
20822 {
20823 .eraseblocks = { {64 * 1024, 8} },
20824 .block_erase = erase_sector_jedec,
20825 }, {
20826 .eraseblocks = { {512 * 1024, 1} },
20827 .block_erase = erase_chip_block_jedec,
20828 }
20829 },
Sean Nelson6e0b9122010-02-19 00:52:10 +000020830 .printlock = printlock_w39v040c,
Sean Nelson35727f72010-01-28 23:55:12 +000020831 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020832 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020833 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020834 .prepare_access = prepare_memory_access,
20835 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020836 },
20837
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020838 {
20839 .vendor = "Winbond",
20840 .name = "W39V040FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020841 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020842 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020843 .model_id = WINBOND_W39V040FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020844 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020845 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010020846 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000020847 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020848 .probe = probe_jedec,
Antony Rheneus0fbba982011-05-26 14:28:51 +000020849 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020850 .block_erasers =
20851 {
20852 {
20853 .eraseblocks = { {4 * 1024, 128} },
20854 .block_erase = erase_block_jedec,
20855 }, {
20856 .eraseblocks = { {64 * 1024, 8} },
20857 .block_erase = erase_sector_jedec,
20858 }, {
20859 .eraseblocks = { {512 * 1024, 1} },
20860 .block_erase = erase_chip_block_jedec,
20861 }
20862 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020863 .printlock = printlock_w39v040fa,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020864 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000020865 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020866 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020867 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010020868 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020869 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020870 },
20871
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020872 {
20873 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020874 .name = "W39V040FB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020875 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020876 .manufacture_id = WINBOND_ID,
20877 .model_id = WINBOND_W39V040B,
20878 .total_size = 512,
20879 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010020880 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner0be072c2016-03-13 15:16:30 +000020881 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020882 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000020883 .probe_timing = 10,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020884 .block_erasers =
20885 {
20886 {
20887 .eraseblocks = { {64 * 1024, 8} },
20888 .block_erase = erase_sector_jedec,
20889 }, {
20890 .eraseblocks = { {512 * 1024, 1} },
20891 .block_erase = erase_chip_block_jedec,
20892 }
20893 },
20894 .printlock = printlock_w39v040fb,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020895 .unlock = unlock_regspace2_uniform_64k,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020896 .write = write_jedec_1,
20897 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020898 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010020899 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020900 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020901 },
20902
20903 {
20904 .vendor = "Winbond",
20905 .name = "W39V040FC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020906 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020907 .manufacture_id = WINBOND_ID,
20908 .model_id = WINBOND_W39V040C,
20909 .total_size = 512,
20910 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010020911 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauneraf2db612011-12-02 21:48:17 +000020912 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020913 .probe = probe_jedec,
20914 .probe_timing = 10,
20915 .block_erasers =
20916 {
20917 {
20918 .eraseblocks = { {64 * 1024, 8} },
20919 .block_erase = erase_sector_jedec,
20920 }, {
20921 .eraseblocks = { {512 * 1024, 1} },
20922 .block_erase = erase_chip_block_jedec,
20923 }
20924 },
20925 .printlock = printlock_w39v040fc,
20926 .write = write_jedec_1,
20927 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020928 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010020929 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020930 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020931 },
20932
20933 {
20934 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020935 .name = "W39V080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020936 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020937 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020938 .model_id = WINBOND_W39V080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020939 .total_size = 1024,
Sean Nelson72a9a022009-12-22 22:15:33 +000020940 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020941 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzelac427b22012-02-16 21:07:07 +000020942 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020943 .probe = probe_jedec,
Paul Menzelac427b22012-02-16 21:07:07 +000020944 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020945 .block_erasers =
20946 {
20947 {
20948 .eraseblocks = { {64 * 1024, 16} },
20949 .block_erase = erase_sector_jedec,
20950 }, {
20951 .eraseblocks = { {1024 * 1024, 1} },
20952 .block_erase = erase_chip_block_jedec,
20953 }
20954 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020955 .printlock = printlock_w39v080a,
Sean Nelson35727f72010-01-28 23:55:12 +000020956 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020957 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020958 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020959 .prepare_access = prepare_memory_access,
20960 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020961 },
20962
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020963 {
20964 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020965 .name = "W39V080FA",
20966 .bustype = BUS_FWH,
20967 .manufacture_id = WINBOND_ID,
20968 .model_id = WINBOND_W39V080FA,
20969 .total_size = 1024,
20970 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010020971 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020972 .tested = TEST_OK_PREW,
20973 .probe = probe_jedec,
20974 .probe_timing = 10,
20975 .block_erasers =
20976 {
20977 {
20978 .eraseblocks = { {64 * 1024, 16} },
20979 .block_erase = erase_sector_jedec,
20980 }, {
20981 .eraseblocks = { {1024 * 1024, 1} },
20982 .block_erase = erase_chip_block_jedec,
20983 }
20984 },
20985 .printlock = printlock_w39v080fa,
20986 .unlock = unlock_regspace2_uniform_64k,
20987 .write = write_jedec_1,
20988 .read = read_memmapped,
20989 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010020990 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020991 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020992 },
20993
20994 {
20995 .vendor = "Winbond",
20996 .name = "W39V080FA (dual mode)",
20997 .bustype = BUS_FWH,
20998 .manufacture_id = WINBOND_ID,
20999 .model_id = WINBOND_W39V080FA_DM,
21000 .total_size = 512,
21001 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021002 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021003 .tested = TEST_UNTESTED,
21004 .probe = probe_jedec,
21005 .probe_timing = 10,
21006 .block_erasers =
21007 {
21008 {
21009 .eraseblocks = { {64 * 1024, 8} },
21010 .block_erase = erase_sector_jedec,
21011 }, {
21012 .eraseblocks = { {512 * 1024, 1} },
21013 .block_erase = erase_chip_block_jedec,
21014 }
21015 },
21016 .printlock = printlock_w39v080fa_dual,
21017 .write = write_jedec_1,
21018 .read = read_memmapped,
21019 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021020 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021021 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021022 },
21023
21024 {
21025 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000021026 .name = "W49F002U/N",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021027 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021028 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021029 .model_id = WINBOND_W49F002U,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021030 .total_size = 256,
21031 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021032 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000021033 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021034 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000021035 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021036 .block_erasers =
21037 {
21038 {
21039 .eraseblocks = {
21040 {128 * 1024, 1},
21041 {96 * 1024, 1},
21042 {8 * 1024, 2},
21043 {16 * 1024, 1},
21044 },
21045 .block_erase = erase_sector_jedec,
21046 }, {
21047 .eraseblocks = { {256 * 1024, 1} },
21048 .block_erase = erase_chip_block_jedec,
21049 }
21050 },
Sean Nelson35727f72010-01-28 23:55:12 +000021051 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021052 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021053 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010021054 .prepare_access = prepare_memory_access,
21055 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021056 },
21057
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021058 {
21059 .vendor = "Winbond",
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021060 .name = "W49F020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021061 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021062 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021063 .model_id = WINBOND_W49F020,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021064 .total_size = 256,
21065 .page_size = 128,
21066 .feature_bits = FEATURE_EITHER_RESET,
21067 .tested = TEST_OK_PROBE,
21068 .probe = probe_jedec,
21069 .probe_timing = 10,
21070 .block_erasers =
21071 {
21072 {
21073 .eraseblocks = { {256 * 1024, 1} },
21074 .block_erase = erase_chip_block_jedec,
21075 }
21076 },
21077 .write = write_jedec_1,
21078 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021079 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010021080 .prepare_access = prepare_memory_access,
21081 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021082 },
21083
21084 {
21085 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021086 .name = "W49V002A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021087 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021088 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021089 .model_id = WINBOND_W49V002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021090 .total_size = 256,
21091 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021092 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000021093 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021094 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000021095 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021096 .block_erasers =
21097 {
21098 {
21099 .eraseblocks = {
21100 {64 * 1024, 3},
21101 {32 * 1024, 1},
21102 {8 * 1024, 2},
21103 {16 * 1024, 1},
21104 },
21105 .block_erase = erase_sector_jedec,
21106 }, {
21107 .eraseblocks = { {256 * 1024, 1} },
21108 .block_erase = erase_chip_block_jedec,
21109 }
21110 },
Sean Nelson35727f72010-01-28 23:55:12 +000021111 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021112 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021113 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021114 .prepare_access = prepare_memory_access,
21115 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021116 },
21117
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021118 {
21119 .vendor = "Winbond",
21120 .name = "W49V002FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021121 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021122 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021123 .model_id = WINBOND_W49V002FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021124 .total_size = 256,
21125 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021126 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000021127 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021128 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000021129 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021130 .block_erasers =
21131 {
21132 {
21133 .eraseblocks = {
21134 {64 * 1024, 3},
21135 {32 * 1024, 1},
21136 {8 * 1024, 2},
21137 {16 * 1024, 1},
21138 },
21139 .block_erase = erase_sector_jedec,
21140 }, {
21141 .eraseblocks = { {256 * 1024, 1} },
21142 .block_erase = erase_chip_block_jedec,
21143 }
21144 },
Sean Nelson35727f72010-01-28 23:55:12 +000021145 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021146 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021147 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021148 .prepare_access = prepare_memory_access,
21149 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021150 },
21151
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021152 {
luke heef884232020-12-28 18:22:21 +080021153 .vendor = "XMC",
21154 .name = "XM25QH128C",
21155 .bustype = BUS_SPI,
21156 .manufacture_id = ST_ID,
21157 .model_id = XMC_XM25QH128C,
21158 .total_size = 16384,
21159 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010021160 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
21161 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021162 .tested = TEST_UNTESTED,
21163 .probe = probe_spi_rdid,
21164 .probe_timing = TIMING_ZERO,
21165 .block_erasers =
21166 {
21167 {
21168 .eraseblocks = { {4 * 1024, 4096} },
21169 .block_erase = spi_block_erase_20,
21170 }, {
21171 .eraseblocks = { {32 * 1024, 512} },
21172 .block_erase = spi_block_erase_52,
21173 }, {
21174 .eraseblocks = { {64 * 1024, 256} },
21175 .block_erase = spi_block_erase_d8,
21176 }, {
21177 .eraseblocks = { {16 * 1024 * 1024, 1} },
21178 .block_erase = spi_block_erase_60,
21179 }, {
21180 .eraseblocks = { {16 * 1024 * 1024, 1} },
21181 .block_erase = spi_block_erase_c7,
21182 }
21183 },
21184 .printlock = spi_prettyprint_status_register_plain,
21185 .unlock = spi_disable_blockprotect,
21186 .write = spi_chip_write_256,
21187 .read = spi_chip_read,
21188 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021189 .reg_bits =
21190 {
Nico Huber96786d02024-01-06 18:30:15 +010021191 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021192 .srp = {STATUS1, 7, RW},
21193 .srl = {STATUS2, 0, RW},
21194 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
21195 .tb = {STATUS1, 5, RW},
21196 .sec = {STATUS1, 6, RW},
21197 .cmp = {STATUS2, 6, RW},
21198 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021199 .wp_write_cfg = spi_wp_write_cfg,
21200 .wp_read_cfg = spi_wp_read_cfg,
21201 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021202 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020021203 .prepare_access = spi_prepare_io,
21204 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021205 },
21206
21207 {
21208 .vendor = "XMC",
21209 .name = "XM25QH256C",
21210 .bustype = BUS_SPI,
21211 .manufacture_id = ST_ID,
21212 .model_id = XMC_XM25QH256C,
21213 .total_size = 32768,
21214 .page_size = 256,
21215 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021216 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
21217 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
21218 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021219 .tested = TEST_UNTESTED,
21220 .probe = probe_spi_rdid,
21221 .probe_timing = TIMING_ZERO,
21222 .block_erasers =
21223 {
21224 {
21225 .eraseblocks = { {4 * 1024, 8192} },
21226 .block_erase = spi_block_erase_21,
21227 }, {
21228 .eraseblocks = { {4 * 1024, 8192} },
21229 .block_erase = spi_block_erase_20,
21230 }, {
21231 .eraseblocks = { {32 * 1024, 1024} },
21232 .block_erase = spi_block_erase_52,
21233 }, {
21234 .eraseblocks = { {64 * 1024, 512} },
21235 .block_erase = spi_block_erase_dc,
21236 }, {
21237 .eraseblocks = { {64 * 1024, 512} },
21238 .block_erase = spi_block_erase_d8,
21239 }, {
21240 .eraseblocks = { {32 * 1024 * 1024, 1} },
21241 .block_erase = spi_block_erase_60,
21242 }, {
21243 .eraseblocks = { {32 * 1024 * 1024, 1} },
21244 .block_erase = spi_block_erase_c7,
21245 }
21246 },
21247 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21248 .unlock = spi_disable_blockprotect,
21249 .write = spi_chip_write_256,
21250 .read = spi_chip_read,
21251 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021252 .reg_bits =
21253 {
Nico Huber96786d02024-01-06 18:30:15 +010021254 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021255 .srp = {STATUS1, 7, RW},
21256 .srl = {STATUS2, 0, RW},
21257 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
21258 .tb = {STATUS1, 6, RW},
21259 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021260 .wp_write_cfg = spi_wp_write_cfg,
21261 .wp_read_cfg = spi_wp_read_cfg,
21262 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021263 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020021264 .prepare_access = spi_prepare_io,
21265 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021266 },
21267
21268 {
21269 .vendor = "XMC",
21270 .name = "XM25QH64C",
21271 .bustype = BUS_SPI,
21272 .manufacture_id = ST_ID,
21273 .model_id = XMC_XM25QH64C,
21274 .total_size = 8192,
21275 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010021276 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021277 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021278 .tested = TEST_UNTESTED,
21279 .probe = probe_spi_rdid,
21280 .probe_timing = TIMING_ZERO,
21281 .block_erasers =
21282 {
21283 {
21284 .eraseblocks = { {4 * 1024, 2048} },
21285 .block_erase = spi_block_erase_20,
21286 }, {
21287 .eraseblocks = { {32 * 1024, 256} },
21288 .block_erase = spi_block_erase_52,
21289 }, {
21290 .eraseblocks = { {64 * 1024, 128} },
21291 .block_erase = spi_block_erase_d8,
21292 }, {
21293 .eraseblocks = { {8 * 1024 * 1024, 1} },
21294 .block_erase = spi_block_erase_60,
21295 }, {
21296 .eraseblocks = { {8 * 1024 * 1024, 1} },
21297 .block_erase = spi_block_erase_c7,
21298 }
21299 },
Nico Huber96786d02024-01-06 18:30:15 +010021300 .reg_bits =
21301 {
21302 .qe = {STATUS2, 1, RW},
21303 },
luke heef884232020-12-28 18:22:21 +080021304 .printlock = spi_prettyprint_status_register_plain,
21305 .unlock = spi_disable_blockprotect,
21306 .write = spi_chip_write_256,
21307 .read = spi_chip_read,
21308 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020021309 .prepare_access = spi_prepare_io,
21310 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021311 },
21312
21313 {
21314 .vendor = "XMC",
21315 .name = "XM25QU128C",
21316 .bustype = BUS_SPI,
21317 .manufacture_id = ST_ID,
21318 .model_id = XMC_XM25QU128C,
21319 .total_size = 16384,
21320 .page_size = 256,
21321 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021322 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021323 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021324 .tested = TEST_UNTESTED,
21325 .probe = probe_spi_rdid,
21326 .probe_timing = TIMING_ZERO,
21327 .block_erasers =
21328 {
21329 {
21330 .eraseblocks = { {4 * 1024, 4096} },
21331 .block_erase = spi_block_erase_20,
21332 }, {
21333 .eraseblocks = { {32 * 1024, 512} },
21334 .block_erase = spi_block_erase_52,
21335 }, {
21336 .eraseblocks = { {64 * 1024, 256} },
21337 .block_erase = spi_block_erase_d8,
21338 }, {
21339 .eraseblocks = { {16 * 1024 * 1024, 1} },
21340 .block_erase = spi_block_erase_60,
21341 }, {
21342 .eraseblocks = { {16 * 1024 * 1024, 1} },
21343 .block_erase = spi_block_erase_c7,
21344 }
21345 },
Nico Huber96786d02024-01-06 18:30:15 +010021346 .reg_bits =
21347 {
21348 .qe = {STATUS2, 1, RW},
21349 },
luke heef884232020-12-28 18:22:21 +080021350 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21351 .unlock = spi_disable_blockprotect,
21352 .write = spi_chip_write_256,
21353 .read = spi_chip_read,
21354 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021355 .prepare_access = spi_prepare_io,
21356 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021357 },
21358
21359 {
21360 .vendor = "XMC",
21361 .name = "XM25QU256C",
21362 .bustype = BUS_SPI,
21363 .manufacture_id = ST_ID,
21364 .model_id = XMC_XM25QU256C,
21365 .total_size = 32768,
21366 .page_size = 256,
21367 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021368 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
21369 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
21370 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021371 .tested = TEST_UNTESTED,
21372 .probe = probe_spi_rdid,
21373 .probe_timing = TIMING_ZERO,
21374 .block_erasers =
21375 {
21376 {
21377 .eraseblocks = { {4 * 1024, 8192} },
21378 .block_erase = spi_block_erase_21,
21379 }, {
21380 .eraseblocks = { {4 * 1024, 8192} },
21381 .block_erase = spi_block_erase_20,
21382 }, {
21383 .eraseblocks = { {32 * 1024, 1024} },
21384 .block_erase = spi_block_erase_52,
21385 }, {
21386 .eraseblocks = { {64 * 1024, 512} },
21387 .block_erase = spi_block_erase_dc,
21388 }, {
21389 .eraseblocks = { {64 * 1024, 512} },
21390 .block_erase = spi_block_erase_d8,
21391 }, {
21392 .eraseblocks = { {32 * 1024 * 1024, 1} },
21393 .block_erase = spi_block_erase_60,
21394 }, {
21395 .eraseblocks = { {32 * 1024 * 1024, 1} },
21396 .block_erase = spi_block_erase_c7,
21397 }
21398 },
Nico Huber96786d02024-01-06 18:30:15 +010021399 .reg_bits =
21400 {
21401 .qe = {STATUS2, 1, RW},
21402 },
luke heef884232020-12-28 18:22:21 +080021403 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21404 .unlock = spi_disable_blockprotect,
21405 .write = spi_chip_write_256,
21406 .read = spi_chip_read,
21407 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021408 .prepare_access = spi_prepare_io,
21409 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021410 },
21411
21412 {
21413 .vendor = "XMC",
21414 .name = "XM25QU64C",
21415 .bustype = BUS_SPI,
21416 .manufacture_id = ST_ID,
21417 .model_id = XMC_XM25QU64C,
21418 .total_size = 8192,
21419 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010021420 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021421 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021422 .tested = TEST_UNTESTED,
21423 .probe = probe_spi_rdid,
21424 .probe_timing = TIMING_ZERO,
21425 .block_erasers =
21426 {
21427 {
21428 .eraseblocks = { {4 * 1024, 2048} },
21429 .block_erase = spi_block_erase_20,
21430 }, {
21431 .eraseblocks = { {32 * 1024, 256} },
21432 .block_erase = spi_block_erase_52,
21433 }, {
21434 .eraseblocks = { {64 * 1024, 128} },
21435 .block_erase = spi_block_erase_d8,
21436 }, {
21437 .eraseblocks = { {8 * 1024 * 1024, 1} },
21438 .block_erase = spi_block_erase_60,
21439 }, {
21440 .eraseblocks = { {8 * 1024 * 1024, 1} },
21441 .block_erase = spi_block_erase_c7,
21442 }
21443 },
Nico Huber96786d02024-01-06 18:30:15 +010021444 .reg_bits =
21445 {
21446 .qe = {STATUS2, 1, RW},
21447 },
luke heef884232020-12-28 18:22:21 +080021448 .printlock = spi_prettyprint_status_register_plain,
21449 .unlock = spi_disable_blockprotect,
21450 .write = spi_chip_write_256,
21451 .read = spi_chip_read,
21452 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021453 .prepare_access = spi_prepare_io,
21454 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021455 },
21456
21457 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100021458 .vendor = "Zetta Device",
21459 .name = "ZD25D20",
21460 .bustype = BUS_SPI,
21461 .manufacture_id = ZETTADEVICE_ID,
21462 .model_id = ZETTADEVICE_ZD25D20,
21463 .total_size = 256,
21464 .page_size = 256,
21465 .feature_bits = FEATURE_WRSR_WREN,
21466 .tested = TEST_UNTESTED,
21467 .probe = probe_spi_rdid,
21468 .probe_timing = TIMING_ZERO,
21469 .block_erasers =
David Hendricksa72d5a92018-02-11 17:58:44 -080021470 {
21471 {
21472 .eraseblocks = { {4 * 1024, 64} },
21473 .block_erase = spi_block_erase_20,
21474 }, {
21475 .eraseblocks = { {32 * 1024, 8} },
21476 .block_erase = spi_block_erase_52,
21477 }, {
21478 .eraseblocks = { {64 * 1024, 4} },
21479 .block_erase = spi_block_erase_d8,
21480 }, {
21481 .eraseblocks = { {256 * 1024, 1} },
21482 .block_erase = spi_block_erase_60,
21483 }, {
21484 .eraseblocks = { {256 * 1024, 1} },
21485 .block_erase = spi_block_erase_c7,
21486 }
21487 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100021488 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21489 .unlock = spi_disable_blockprotect,
21490 .write = spi_chip_write_256,
21491 .read = spi_chip_read,
21492 .voltage = {2700, 3600},
David Hendricksa72d5a92018-02-11 17:58:44 -080021493 },
21494
21495 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100021496 .vendor = "Zetta Device",
21497 .name = "ZD25D40",
21498 .bustype = BUS_SPI,
21499 .manufacture_id = ZETTADEVICE_ID,
21500 .model_id = ZETTADEVICE_ZD25D40,
21501 .total_size = 512,
21502 .page_size = 256,
21503 .feature_bits = FEATURE_WRSR_WREN,
21504 .tested = TEST_UNTESTED,
21505 .probe = probe_spi_rdid,
21506 .probe_timing = TIMING_ZERO,
21507 .block_erasers =
nybashcbb46e22018-02-11 17:53:49 -080021508 {
21509 {
21510 .eraseblocks = { {4 * 1024, 128} },
21511 .block_erase = spi_block_erase_20,
21512 }, {
21513 .eraseblocks = { {32 * 1024, 16} },
21514 .block_erase = spi_block_erase_52,
21515 }, {
21516 .eraseblocks = { {64 * 1024, 8} },
21517 .block_erase = spi_block_erase_d8,
21518 }, {
21519 .eraseblocks = { {512 * 1024, 1} },
21520 .block_erase = spi_block_erase_60,
21521 }, {
21522 .eraseblocks = { {512 * 1024, 1} },
21523 .block_erase = spi_block_erase_c7,
21524 }
21525 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100021526 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21527 .unlock = spi_disable_blockprotect,
21528 .write = spi_chip_write_256,
21529 .read = spi_chip_read,
21530 .voltage = {2700, 3600},
nybashcbb46e22018-02-11 17:53:49 -080021531 },
21532
Stefan Taunerac1b4c82012-02-17 14:51:04 +000021533 {
Alan Greendd592202019-08-23 10:11:37 +100021534 .vendor = "Unknown",
21535 .name = "SFDP-capable chip",
21536 .bustype = BUS_SPI,
21537 .manufacture_id = GENERIC_MANUF_ID,
21538 .model_id = SFDP_DEVICE_ID,
21539 .total_size = 0, /* set by probing function */
21540 .page_size = 0, /* set by probing function */
21541 .feature_bits = 0, /* set by probing function */
21542 /* We present our own "report this" text hence we do not */
21543 /* want the default "This flash part has status UNTESTED..." */
21544 /* text to be printed. */
21545 .tested = TEST_OK_PREW,
21546 .probe = probe_spi_sfdp,
21547 .block_erasers = {}, /* set by probing function */
21548 .unlock = spi_disable_blockprotect, /* is this safe? */
21549 .write = NULL, /* set by probing function */
21550 .read = spi_chip_read,
21551 /* FIXME: some vendor extensions define this */
21552 .voltage = {0},
21553 },
21554
21555 {
Carl-Daniel Hailfinger532c7172011-11-04 21:35:26 +000021556 .vendor = "Programmer",
21557 .name = "Opaque flash chip",
21558 .bustype = BUS_PROG,
21559 .manufacture_id = PROGMANUF_ID,
21560 .model_id = PROGDEV_ID,
21561 .total_size = 0,
21562 .page_size = 256,
21563 /* probe is assumed to work, rest will be filled in by probe */
21564 .tested = TEST_OK_PROBE,
21565 .probe = probe_opaque,
21566 /* eraseblock sizes will be set by the probing function */
21567 .block_erasers =
21568 {
21569 {
21570 .block_erase = erase_opaque,
21571 }
21572 },
21573 .write = write_opaque,
21574 .read = read_opaque,
21575 },
21576
21577 {
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000021578 .vendor = "AMIC",
21579 .name = "unknown AMIC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021580 .bustype = BUS_SPI,
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000021581 .manufacture_id = AMIC_ID,
21582 .model_id = GENERIC_DEVICE_ID,
21583 .total_size = 0,
21584 .page_size = 256,
21585 .tested = TEST_BAD_PREW,
21586 .probe = probe_spi_rdid4,
21587 .probe_timing = TIMING_ZERO,
21588 .write = NULL,
21589 .read = NULL,
21590 },
21591
21592 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021593 .vendor = "Atmel",
21594 .name = "unknown Atmel SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021595 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021596 .manufacture_id = ATMEL_ID,
21597 .model_id = GENERIC_DEVICE_ID,
21598 .total_size = 0,
21599 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021600 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021601 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021602 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021603 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021604 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021605 },
21606
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021607 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +000021608 .vendor = "Eon",
21609 .name = "unknown Eon SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021610 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021611 .manufacture_id = EON_ID_NOPREFIX,
21612 .model_id = GENERIC_DEVICE_ID,
21613 .total_size = 0,
21614 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021615 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021616 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021617 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021618 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021619 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021620 },
21621
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021622 {
21623 .vendor = "Macronix",
21624 .name = "unknown Macronix SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021625 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000021626 .manufacture_id = MACRONIX_ID,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021627 .model_id = GENERIC_DEVICE_ID,
21628 .total_size = 0,
21629 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021630 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021631 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021632 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021633 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021634 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021635 },
21636
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021637 {
21638 .vendor = "PMC",
21639 .name = "unknown PMC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021640 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021641 .manufacture_id = PMC_ID,
21642 .model_id = GENERIC_DEVICE_ID,
21643 .total_size = 0,
21644 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021645 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021646 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021647 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021648 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021649 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021650 },
21651
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021652 {
21653 .vendor = "SST",
21654 .name = "unknown SST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021655 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021656 .manufacture_id = SST_ID,
21657 .model_id = GENERIC_DEVICE_ID,
21658 .total_size = 0,
21659 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021660 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021661 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021662 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021663 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021664 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021665 },
21666
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021667 {
21668 .vendor = "ST",
21669 .name = "unknown ST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021670 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021671 .manufacture_id = ST_ID,
21672 .model_id = GENERIC_DEVICE_ID,
21673 .total_size = 0,
21674 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021675 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021676 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021677 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021678 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021679 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021680 },
Uwe Hermannfc425e82008-03-16 02:06:25 +000021681
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021682 {
Sean Nelson118e1d62009-11-24 02:08:11 +000021683 .vendor = "Sanyo",
21684 .name = "unknown Sanyo SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021685 .bustype = BUS_SPI,
Sean Nelson118e1d62009-11-24 02:08:11 +000021686 .manufacture_id = SANYO_ID,
21687 .model_id = GENERIC_DEVICE_ID,
21688 .total_size = 0,
21689 .page_size = 256,
21690 .tested = TEST_BAD_PREW,
21691 .probe = probe_spi_rdid,
21692 .probe_timing = TIMING_ZERO,
Sean Nelson118e1d62009-11-24 02:08:11 +000021693 .write = NULL,
21694 .read = NULL,
21695 },
21696
21697 {
Stefan Taunereb582572012-09-21 12:52:50 +000021698 .vendor = "Winbond",
21699 .name = "unknown Winbond (ex Nexcom) SPI chip",
21700 .bustype = BUS_SPI,
21701 .manufacture_id = WINBOND_NEX_ID,
21702 .model_id = GENERIC_DEVICE_ID,
21703 .total_size = 0,
21704 .page_size = 256,
21705 .tested = TEST_BAD_PREW,
21706 .probe = probe_spi_rdid,
21707 .probe_timing = TIMING_ZERO,
21708 .write = NULL,
21709 .read = NULL,
21710 },
21711
21712 {
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021713 .vendor = "Generic",
21714 .name = "unknown SPI chip (RDID)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021715 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021716 .manufacture_id = GENERIC_MANUF_ID,
21717 .model_id = GENERIC_DEVICE_ID,
21718 .total_size = 0,
21719 .page_size = 256,
21720 .tested = TEST_BAD_PREW,
21721 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021722 .write = NULL,
21723 },
Stefan Tauneraf2db612011-12-02 21:48:17 +000021724
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021725 {
21726 .vendor = "Generic",
21727 .name = "unknown SPI chip (REMS)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021728 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021729 .manufacture_id = GENERIC_MANUF_ID,
21730 .model_id = GENERIC_DEVICE_ID,
21731 .total_size = 0,
21732 .page_size = 256,
21733 .tested = TEST_BAD_PREW,
21734 .probe = probe_spi_rems,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021735 .write = NULL,
21736 },
21737
Stefan Tauner96658be2014-05-26 22:05:31 +000021738 {0}
Stephan Guilloux72cf5652009-04-21 01:46:07 +000021739};
Stefan Tauner96658be2014-05-26 22:05:31 +000021740
21741const unsigned int flashchips_size = ARRAY_SIZE(flashchips);