blob: 86d27fa85ce60fa26bf3d17f37c49431e94184d4 [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",
Naresh Solanki768cfc42024-10-04 20:17:34 +05306908 .name = "GD25LR512ME",
6909 .bustype = BUS_SPI,
6910 .manufacture_id = GIGADEVICE_ID,
6911 .model_id = GIGADEVICE_GD25LR512ME,
6912 .total_size = 65536,
6913 .page_size = 256,
6914 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
6915 .tested = TEST_OK_PREW,
6916 .probe = probe_spi_rdid,
6917 .probe_timing = TIMING_ZERO,
6918 .block_erasers =
6919 {
6920 {
6921 .eraseblocks = { {4 * 1024, 16384} },
6922 .block_erase = spi_block_erase_21,
6923 }, {
6924 .eraseblocks = { {4 * 1024, 16384} },
6925 .block_erase = spi_block_erase_20,
6926 }, {
6927 .eraseblocks = { {32 * 1024, 2048} },
6928 .block_erase = spi_block_erase_52,
6929 }, {
6930 .eraseblocks = { {32 * 1024, 2048} },
6931 .block_erase = spi_block_erase_5c,
6932 }, {
6933 .eraseblocks = { {64 * 1024, 1024} },
6934 .block_erase = spi_block_erase_dc,
6935 }, {
6936 .eraseblocks = { {64 * 1024, 1024} },
6937 .block_erase = spi_block_erase_d8,
6938 }, {
6939 .eraseblocks = { {64 * 1024 * 1024, 1} },
6940 .block_erase = spi_block_erase_60,
6941 }, {
6942 .eraseblocks = { {64 * 1024 * 1024, 1} },
6943 .block_erase = spi_block_erase_c7,
6944 }
6945 },
6946 .printlock = spi_prettyprint_status_register_bp4_srwd,
6947 .unlock = spi_disable_blockprotect_bp4_srwd,
6948 .write = spi_chip_write_256,
6949 .read = spi_chip_read,
6950 .voltage = {1650, 2000},
6951 .prepare_access = spi_prepare_io,
6952 .finish_access = spi_finish_io,
6953 },
6954
6955 {
6956 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006957 .name = "GD25Q10",
6958 .bustype = BUS_SPI,
6959 .manufacture_id = GIGADEVICE_ID,
6960 .model_id = GIGADEVICE_GD25Q10,
6961 .total_size = 128,
6962 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01006963 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006964 .tested = TEST_UNTESTED,
6965 .probe = probe_spi_rdid,
6966 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10006967 .block_erasers =
6968 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006969 {
6970 .eraseblocks = { {4 * 1024, 32} },
6971 .block_erase = spi_block_erase_20,
6972 }, {
6973 .eraseblocks = { {32 * 1024, 4} },
6974 .block_erase = spi_block_erase_52,
6975 }, {
6976 .eraseblocks = { {64 * 1024, 2} },
6977 .block_erase = spi_block_erase_d8,
6978 }, {
6979 .eraseblocks = { {128 * 1024, 1} },
6980 .block_erase = spi_block_erase_60,
6981 }, {
6982 .eraseblocks = { {128 * 1024, 1} },
6983 .block_erase = spi_block_erase_c7,
6984 }
6985 },
Nico Huber4da971f2024-03-27 01:18:12 +01006986 .reg_bits =
6987 {
6988 .qe = {STATUS2, 1, RW},
6989 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00006990 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006991 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6992 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006993 .read = spi_chip_read,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006994 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006995 .prepare_access = spi_prepare_io,
6996 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006997 },
6998
6999 {
7000 .vendor = "GigaDevice",
Nico Huber68573af2024-01-06 18:28:22 +01007001 .name = "GD25Q127C",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007002 .bustype = BUS_SPI,
7003 .manufacture_id = GIGADEVICE_ID,
7004 .model_id = GIGADEVICE_GD25Q128,
7005 .total_size = 16384,
7006 .page_size = 256,
7007 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
Nico Huber1412d9f2024-01-06 18:25:49 +01007008 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007009 .tested = TEST_OK_PREWB,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007010 .probe = probe_spi_rdid,
7011 .probe_timing = TIMING_ZERO,
7012 .block_erasers =
7013 {
7014 {
7015 .eraseblocks = { {4 * 1024, 4096} },
7016 .block_erase = spi_block_erase_20,
7017 }, {
7018 .eraseblocks = { {32 * 1024, 512} },
7019 .block_erase = spi_block_erase_52,
7020 }, {
7021 .eraseblocks = { {64 * 1024, 256} },
7022 .block_erase = spi_block_erase_d8,
7023 }, {
7024 .eraseblocks = { {16 * 1024 * 1024, 1} },
7025 .block_erase = spi_block_erase_60,
7026 }, {
7027 .eraseblocks = { {16 * 1024 * 1024, 1} },
7028 .block_erase = spi_block_erase_c7,
7029 }
7030 },
7031 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
7032 .printlock = spi_prettyprint_status_register_bp4_srwd,
7033 .unlock = spi_disable_blockprotect_bp4_srwd,
7034 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007035 .read = spi_chip_read,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007036 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007037 .reg_bits =
7038 {
Nico Huber4da971f2024-03-27 01:18:12 +01007039 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007040 .srp = {STATUS1, 7, RW},
7041 .srl = {STATUS2, 0, RW},
7042 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7043 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7044 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7045 .cmp = {STATUS2, 6, RW},
7046 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007047 .wp_write_cfg = spi_wp_write_cfg,
7048 .wp_read_cfg = spi_wp_read_cfg,
7049 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007050 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007051 .prepare_access = spi_prepare_io,
7052 .finish_access = spi_finish_io,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007053 },
7054
7055 {
7056 .vendor = "GigaDevice",
Nico Huber68573af2024-01-06 18:28:22 +01007057 .name = "GD25Q128C",
7058 .bustype = BUS_SPI,
7059 .manufacture_id = GIGADEVICE_ID,
7060 .model_id = GIGADEVICE_GD25Q128,
7061 .total_size = 16384,
7062 .page_size = 256,
7063 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
7064 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
7065 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
7066 .tested = TEST_OK_PREWB,
7067 .probe = probe_spi_rdid,
7068 .probe_timing = TIMING_ZERO,
7069 .block_erasers =
7070 {
7071 {
7072 .eraseblocks = { {4 * 1024, 4096} },
7073 .block_erase = spi_block_erase_20,
7074 }, {
7075 .eraseblocks = { {32 * 1024, 512} },
7076 .block_erase = spi_block_erase_52,
7077 }, {
7078 .eraseblocks = { {64 * 1024, 256} },
7079 .block_erase = spi_block_erase_d8,
7080 }, {
7081 .eraseblocks = { {16 * 1024 * 1024, 1} },
7082 .block_erase = spi_block_erase_60,
7083 }, {
7084 .eraseblocks = { {16 * 1024 * 1024, 1} },
7085 .block_erase = spi_block_erase_c7,
7086 }
7087 },
7088 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
7089 .printlock = spi_prettyprint_status_register_bp4_srwd,
7090 .unlock = spi_disable_blockprotect_bp4_srwd,
7091 .write = spi_chip_write_256,
7092 .read = spi_chip_read,
7093 .voltage = {2700, 3600},
7094 .reg_bits =
7095 {
7096 .qe = {STATUS2, 1, RW},
7097 .srp = {STATUS1, 7, RW},
7098 .srl = {STATUS2, 0, RW},
7099 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7100 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7101 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7102 .cmp = {STATUS2, 6, RW},
7103 },
Nico Huber2a1036b2024-10-20 23:19:49 +02007104 .wp_write_cfg = spi_wp_write_cfg,
7105 .wp_read_cfg = spi_wp_read_cfg,
7106 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber68573af2024-01-06 18:28:22 +01007107 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007108 .prepare_access = spi_prepare_io,
7109 .finish_access = spi_finish_io,
Nico Huber68573af2024-01-06 18:28:22 +01007110 },
7111
7112 {
7113 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007114 .name = "GD25Q16(B)",
7115 .bustype = BUS_SPI,
7116 .manufacture_id = GIGADEVICE_ID,
7117 .model_id = GIGADEVICE_GD25Q16,
7118 .total_size = 2048,
7119 .page_size = 256,
7120 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01007121 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007122 .tested = TEST_OK_PREW,
7123 .probe = probe_spi_rdid,
7124 .probe_timing = TIMING_ZERO,
7125 .block_erasers =
7126 {
7127 {
7128 .eraseblocks = { {4 * 1024, 512} },
7129 .block_erase = spi_block_erase_20,
7130 }, {
7131 .eraseblocks = { {32 * 1024, 64} },
7132 .block_erase = spi_block_erase_52,
7133 }, {
7134 .eraseblocks = { {64 * 1024, 32} },
7135 .block_erase = spi_block_erase_d8,
7136 }, {
7137 .eraseblocks = { {2 * 1024 * 1024, 1} },
7138 .block_erase = spi_block_erase_60,
7139 }, {
7140 .eraseblocks = { {2 * 1024 * 1024, 1} },
7141 .block_erase = spi_block_erase_c7,
7142 }
7143 },
Nico Huber4da971f2024-03-27 01:18:12 +01007144 .reg_bits =
7145 {
7146 .qe = {STATUS2, 1, RW},
7147 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007148 .printlock = spi_prettyprint_status_register_bp4_srwd,
7149 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7150 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007151 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007152 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007153 .prepare_access = spi_prepare_io,
7154 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007155 },
7156
7157 {
7158 .vendor = "GigaDevice",
7159 .name = "GD25Q20(B)",
7160 .bustype = BUS_SPI,
7161 .manufacture_id = GIGADEVICE_ID,
7162 .model_id = GIGADEVICE_GD25Q20,
7163 .total_size = 256,
7164 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007165 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007166 .tested = TEST_OK_PREW,
7167 .probe = probe_spi_rdid,
7168 .probe_timing = TIMING_ZERO,
7169 .block_erasers =
7170 {
7171 {
7172 .eraseblocks = { {4 * 1024, 64} },
7173 .block_erase = spi_block_erase_20,
7174 }, {
7175 .eraseblocks = { {32 * 1024, 8} },
7176 .block_erase = spi_block_erase_52,
7177 }, {
7178 .eraseblocks = { {64 * 1024, 4} },
7179 .block_erase = spi_block_erase_d8,
7180 }, {
7181 .eraseblocks = { {256 * 1024, 1} },
7182 .block_erase = spi_block_erase_60,
7183 }, {
7184 .eraseblocks = { {256 * 1024, 1} },
7185 .block_erase = spi_block_erase_c7,
7186 }
7187 },
Nico Huber4da971f2024-03-27 01:18:12 +01007188 .reg_bits = {
7189 .qe = {STATUS2, 1, RW},
7190 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007191 .printlock = spi_prettyprint_status_register_bp4_srwd,
7192 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7193 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007194 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007195 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007196 .prepare_access = spi_prepare_io,
7197 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007198 },
7199
7200 {
7201 .vendor = "GigaDevice",
Nikolai Artemiev3ca0af02022-06-17 15:10:18 +10007202 .name = "GD25Q256D/GD25Q256E",
Alan Green86fc9cf2019-08-26 15:02:12 +10007203 .bustype = BUS_SPI,
7204 .manufacture_id = GIGADEVICE_ID,
7205 .model_id = GIGADEVICE_GD25Q256D,
7206 .total_size = 32768,
7207 .page_size = 256,
Nikolai Artemievb931e7a2022-12-05 13:06:14 +11007208 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA |
Nico Huber4da971f2024-03-27 01:18:12 +01007209 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
7210 FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007211 .tested = TEST_OK_PREWB,
Alan Green86fc9cf2019-08-26 15:02:12 +10007212 .probe = probe_spi_rdid,
7213 .probe_timing = TIMING_ZERO,
7214 .block_erasers =
7215 {
7216 {
7217 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber5374dc32019-10-04 16:16:15 +02007218 .block_erase = spi_block_erase_21,
7219 }, {
7220 .eraseblocks = { {4 * 1024, 8192} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007221 .block_erase = spi_block_erase_20,
7222 }, {
7223 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber5374dc32019-10-04 16:16:15 +02007224 .block_erase = spi_block_erase_5c,
7225 }, {
7226 .eraseblocks = { {32 * 1024, 1024} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007227 .block_erase = spi_block_erase_52,
7228 }, {
7229 .eraseblocks = { {64 * 1024, 512} },
Nico Huber5374dc32019-10-04 16:16:15 +02007230 .block_erase = spi_block_erase_dc,
7231 }, {
7232 .eraseblocks = { {64 * 1024, 512} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007233 .block_erase = spi_block_erase_d8,
7234 }, {
7235 .eraseblocks = { {32 * 1024 * 1024, 1} },
7236 .block_erase = spi_block_erase_60,
7237 }, {
7238 .eraseblocks = { {32 * 1024 * 1024, 1} },
7239 .block_erase = spi_block_erase_c7,
7240 }
7241 },
7242 .printlock = spi_prettyprint_status_register_bp3_srwd,
7243 .unlock = spi_disable_blockprotect,
7244 .write = spi_chip_write_256,
7245 .read = spi_chip_read,
7246 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007247 .reg_bits =
7248 {
Nico Huber4da971f2024-03-27 01:18:12 +01007249 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007250 .srp = {STATUS1, 7, RW},
7251 .srl = {STATUS2, 6, RW},
7252 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
7253 .tb = {STATUS1, 6, RW},
7254 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007255 .wp_write_cfg = spi_wp_write_cfg,
7256 .wp_read_cfg = spi_wp_read_cfg,
7257 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007258 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007259 .prepare_access = spi_prepare_io,
7260 .finish_access = spi_finish_io,
Alan Green86fc9cf2019-08-26 15:02:12 +10007261 },
7262
7263 {
7264 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007265 .name = "GD25Q32(B)",
7266 .bustype = BUS_SPI,
7267 .manufacture_id = GIGADEVICE_ID,
7268 .model_id = GIGADEVICE_GD25Q32,
7269 .total_size = 4096,
7270 .page_size = 256,
7271 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007272 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007273 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007274 .probe = probe_spi_rdid,
7275 .probe_timing = TIMING_ZERO,
7276 .block_erasers =
7277 {
7278 {
7279 .eraseblocks = { {4 * 1024, 1024} },
7280 .block_erase = spi_block_erase_20,
7281 }, {
7282 .eraseblocks = { {32 * 1024, 128} },
7283 .block_erase = spi_block_erase_52,
7284 }, {
7285 .eraseblocks = { {64 * 1024, 64} },
7286 .block_erase = spi_block_erase_d8,
7287 }, {
7288 .eraseblocks = { {4 * 1024 * 1024, 1} },
7289 .block_erase = spi_block_erase_60,
7290 }, {
7291 .eraseblocks = { {4 * 1024 * 1024, 1} },
7292 .block_erase = spi_block_erase_c7,
7293 }
7294 },
7295 .printlock = spi_prettyprint_status_register_bp4_srwd,
7296 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7297 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007298 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007299 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007300 .reg_bits =
7301 {
Nico Huber4da971f2024-03-27 01:18:12 +01007302 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007303 .srp = {STATUS1, 7, RW},
7304 .srl = {STATUS2, 0, RW},
7305 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7306 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7307 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7308 .cmp = {STATUS2, 6, RW},
7309 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007310 .wp_write_cfg = spi_wp_write_cfg,
7311 .wp_read_cfg = spi_wp_read_cfg,
7312 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007313 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007314 .prepare_access = spi_prepare_io,
7315 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007316 },
7317
7318 {
7319 .vendor = "GigaDevice",
7320 .name = "GD25Q40(B)",
7321 .bustype = BUS_SPI,
7322 .manufacture_id = GIGADEVICE_ID,
7323 .model_id = GIGADEVICE_GD25Q40,
7324 .total_size = 512,
7325 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007326 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Simon Buhrow551664c2022-03-09 16:09:08 +01007327 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007328 .probe = probe_spi_rdid,
7329 .probe_timing = TIMING_ZERO,
7330 .block_erasers =
7331 {
7332 {
7333 .eraseblocks = { {4 * 1024, 128} },
7334 .block_erase = spi_block_erase_20,
7335 }, {
7336 .eraseblocks = { {32 * 1024, 16} },
7337 .block_erase = spi_block_erase_52,
7338 }, {
7339 .eraseblocks = { {64 * 1024, 8} },
7340 .block_erase = spi_block_erase_d8,
7341 }, {
7342 .eraseblocks = { {512 * 1024, 1} },
7343 .block_erase = spi_block_erase_60,
7344 }, {
7345 .eraseblocks = { {512 * 1024, 1} },
7346 .block_erase = spi_block_erase_c7,
7347 }
7348 },
Nico Huber4da971f2024-03-27 01:18:12 +01007349 .reg_bits =
7350 {
7351 .qe = {STATUS2, 1, RW},
7352 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007353 .printlock = spi_prettyprint_status_register_bp4_srwd,
7354 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7355 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007356 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007357 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007358 .prepare_access = spi_prepare_io,
7359 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007360 },
7361
7362 {
7363 .vendor = "GigaDevice",
7364 .name = "GD25Q512",
7365 .bustype = BUS_SPI,
7366 .manufacture_id = GIGADEVICE_ID,
7367 .model_id = GIGADEVICE_GD25Q512,
7368 .total_size = 64,
7369 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007370 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007371 .tested = TEST_OK_PREW,
7372 .probe = probe_spi_rdid,
7373 .probe_timing = TIMING_ZERO,
7374 .block_erasers =
7375 {
7376 {
7377 .eraseblocks = { {4 * 1024, 16} },
7378 .block_erase = spi_block_erase_20,
7379 }, {
7380 .eraseblocks = { {32 * 1024, 2} },
7381 .block_erase = spi_block_erase_52,
7382 }, {
7383 .eraseblocks = { {64 * 1024, 1} },
7384 .block_erase = spi_block_erase_60,
7385 }, {
7386 .eraseblocks = { {64 * 1024, 1} },
7387 .block_erase = spi_block_erase_c7,
7388 }
7389 },
Nico Huber4da971f2024-03-27 01:18:12 +01007390 .reg_bits =
7391 {
7392 .qe = {STATUS2, 1, RW},
7393 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007394 .printlock = spi_prettyprint_status_register_bp4_srwd,
7395 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7396 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007397 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007398 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007399 .prepare_access = spi_prepare_io,
7400 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007401 },
7402
7403 {
7404 .vendor = "GigaDevice",
7405 .name = "GD25Q64(B)",
7406 .bustype = BUS_SPI,
7407 .manufacture_id = GIGADEVICE_ID,
7408 .model_id = GIGADEVICE_GD25Q64,
7409 .total_size = 8192,
7410 .page_size = 256,
7411 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007412 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007413 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007414 .probe = probe_spi_rdid,
7415 .probe_timing = TIMING_ZERO,
7416 .block_erasers =
7417 {
7418 {
7419 .eraseblocks = { {4 * 1024, 2048} },
7420 .block_erase = spi_block_erase_20,
7421 }, {
7422 .eraseblocks = { {32 * 1024, 256} },
7423 .block_erase = spi_block_erase_52,
7424 }, {
7425 .eraseblocks = { {64 * 1024, 128} },
7426 .block_erase = spi_block_erase_d8,
7427 }, {
7428 .eraseblocks = { {8 * 1024 * 1024, 1} },
7429 .block_erase = spi_block_erase_60,
7430 }, {
7431 .eraseblocks = { {8 * 1024 * 1024, 1} },
7432 .block_erase = spi_block_erase_c7,
7433 }
7434 },
7435 .printlock = spi_prettyprint_status_register_bp4_srwd,
7436 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7437 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007438 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007439 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007440 .reg_bits =
7441 {
Nico Huber4da971f2024-03-27 01:18:12 +01007442 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007443 .srp = {STATUS1, 7, RW},
7444 .srl = {STATUS2, 0, RW},
7445 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7446 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7447 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7448 .cmp = {STATUS2, 6, RW},
7449 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007450 .wp_write_cfg = spi_wp_write_cfg,
7451 .wp_read_cfg = spi_wp_read_cfg,
7452 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007453 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007454 .prepare_access = spi_prepare_io,
7455 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007456 },
7457
7458 {
7459 .vendor = "GigaDevice",
7460 .name = "GD25Q80(B)",
7461 .bustype = BUS_SPI,
7462 .manufacture_id = GIGADEVICE_ID,
7463 .model_id = GIGADEVICE_GD25Q80,
7464 .total_size = 1024,
7465 .page_size = 256,
7466 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01007467 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007468 .tested = TEST_OK_PREW,
7469 .probe = probe_spi_rdid,
7470 .probe_timing = TIMING_ZERO,
7471 .block_erasers =
7472 {
7473 {
7474 .eraseblocks = { {4 * 1024, 256} },
7475 .block_erase = spi_block_erase_20,
7476 }, {
7477 .eraseblocks = { {32 * 1024, 32} },
7478 .block_erase = spi_block_erase_52,
7479 }, {
7480 .eraseblocks = { {64 * 1024, 16} },
7481 .block_erase = spi_block_erase_d8,
7482 }, {
7483 .eraseblocks = { {1024 * 1024, 1} },
7484 .block_erase = spi_block_erase_60,
7485 }, {
7486 .eraseblocks = { {1024 * 1024, 1} },
7487 .block_erase = spi_block_erase_c7,
7488 }
7489 },
Nico Huber4da971f2024-03-27 01:18:12 +01007490 .reg_bits =
7491 {
7492 .qe = {STATUS2, 1, RW},
7493 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007494 .printlock = spi_prettyprint_status_register_bp4_srwd,
7495 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7496 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007497 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007498 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007499 .prepare_access = spi_prepare_io,
7500 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007501 },
7502
7503 {
7504 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007505 .name = "GD25T80",
7506 .bustype = BUS_SPI,
7507 .manufacture_id = GIGADEVICE_ID,
7508 .model_id = GIGADEVICE_GD25T80,
7509 .total_size = 1024,
7510 .page_size = 256,
7511 /* OTP: 256B total; enter 0x3A */
7512 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
7513 .tested = TEST_UNTESTED,
7514 .probe = probe_spi_rdid,
7515 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10007516 .block_erasers =
7517 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007518 {
7519 .eraseblocks = { {4 * 1024, 256} },
7520 .block_erase = spi_block_erase_20,
7521 }, {
7522 .eraseblocks = { {64 * 1024, 16} },
7523 .block_erase = spi_block_erase_52,
7524 }, {
7525 .eraseblocks = { {64 * 1024, 16} },
7526 .block_erase = spi_block_erase_d8,
7527 }, {
7528 .eraseblocks = { {1024 * 1024, 1} },
7529 .block_erase = spi_block_erase_60,
7530 }, {
7531 .eraseblocks = { {1024 * 1024, 1} },
7532 .block_erase = spi_block_erase_c7,
7533 }
7534 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00007535 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007536 .unlock = spi_disable_blockprotect,
7537 .write = spi_chip_write_256,
7538 .read = spi_chip_read,
Stefan Tauner352e50b2013-02-22 15:58:45 +00007539 .voltage = {2700, 3600},
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007540 },
7541
7542 {
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007543 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007544 .name = "GD25VQ16C",
7545 .bustype = BUS_SPI,
7546 .manufacture_id = GIGADEVICE_ID,
7547 .model_id = GIGADEVICE_GD25VQ16C,
7548 .total_size = 2 * 1024,
7549 .page_size = 256,
7550 /* Supports SFDP */
7551 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007552 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007553 .tested = TEST_UNTESTED,
7554 .probe = probe_spi_rdid,
7555 .probe_timing = TIMING_ZERO,
7556 .block_erasers =
7557 {
7558 {
7559 .eraseblocks = { { 4 * 1024, 512} },
7560 .block_erase = spi_block_erase_20,
7561 }, {
7562 .eraseblocks = { { 32 * 1024, 64} },
7563 .block_erase = spi_block_erase_52,
7564 }, {
7565 .eraseblocks = { { 64 * 1024, 32} },
7566 .block_erase = spi_block_erase_d8,
7567 }, {
7568 .eraseblocks = { {2 * 1024 * 1024, 1} },
7569 .block_erase = spi_block_erase_60,
7570 }, {
7571 .eraseblocks = { {2 * 1024 * 1024, 1} },
7572 .block_erase = spi_block_erase_c7,
7573 }
7574 },
Nico Huber4da971f2024-03-27 01:18:12 +01007575 .reg_bits =
7576 {
7577 .qe = {STATUS2, 1, RW},
7578 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007579 .printlock = spi_prettyprint_status_register_bp4_srwd,
7580 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7581 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007582 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007583 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007584 .prepare_access = spi_prepare_io,
7585 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007586 },
7587
7588 {
7589 .vendor = "GigaDevice",
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007590 .name = "GD25VQ21B",
7591 .bustype = BUS_SPI,
7592 .manufacture_id = GIGADEVICE_ID,
7593 .model_id = GIGADEVICE_GD25VQ21B,
7594 .total_size = 256,
7595 .page_size = 256,
7596 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007597 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
7598 FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007599 .tested = TEST_UNTESTED,
7600 .probe = probe_spi_rdid,
7601 .probe_timing = TIMING_ZERO,
7602 .block_erasers =
7603 {
7604 {
7605 .eraseblocks = { { 4 * 1024, 64} },
7606 .block_erase = spi_block_erase_20,
7607 }, {
7608 .eraseblocks = { { 32 * 1024, 8} },
7609 .block_erase = spi_block_erase_52,
7610 }, {
7611 .eraseblocks = { { 64 * 1024, 4} },
7612 .block_erase = spi_block_erase_d8,
7613 }, {
7614 .eraseblocks = { {256 * 1024, 1} },
7615 .block_erase = spi_block_erase_60,
7616 }, {
7617 .eraseblocks = { {256 * 1024, 1} },
7618 .block_erase = spi_block_erase_c7,
7619 }
7620 },
Nico Huber4da971f2024-03-27 01:18:12 +01007621 .reg_bits =
7622 {
7623 .qe = {STATUS2, 1, RW},
7624 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007625 .printlock = spi_prettyprint_status_register_bp4_srwd,
7626 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7627 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007628 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007629 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007630 .prepare_access = spi_prepare_io,
7631 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007632 },
7633
7634 {
7635 .vendor = "GigaDevice",
7636 .name = "GD25VQ40C",
7637 .bustype = BUS_SPI,
7638 .manufacture_id = GIGADEVICE_ID,
7639 .model_id = GIGADEVICE_GD25VQ41B,
7640 .total_size = 512,
7641 .page_size = 256,
7642 /* Supports SFDP */
7643 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007644 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007645 .tested = TEST_UNTESTED,
7646 .probe = probe_spi_rdid,
7647 .probe_timing = TIMING_ZERO,
7648 .block_erasers =
7649 {
7650 {
7651 .eraseblocks = { { 4 * 1024, 128} },
7652 .block_erase = spi_block_erase_20,
7653 }, {
7654 .eraseblocks = { { 32 * 1024, 16} },
7655 .block_erase = spi_block_erase_52,
7656 }, {
7657 .eraseblocks = { { 64 * 1024, 8} },
7658 .block_erase = spi_block_erase_d8,
7659 }, {
7660 .eraseblocks = { {512 * 1024, 1} },
7661 .block_erase = spi_block_erase_60,
7662 }, {
7663 .eraseblocks = { {512 * 1024, 1} },
7664 .block_erase = spi_block_erase_c7,
7665 }
7666 },
Nico Huber4da971f2024-03-27 01:18:12 +01007667 .reg_bits =
7668 {
7669 .qe = {STATUS2, 1, RW},
7670 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007671 .printlock = spi_prettyprint_status_register_bp4_srwd,
7672 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7673 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007674 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007675 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007676 .prepare_access = spi_prepare_io,
7677 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007678 },
7679
7680 {
7681 .vendor = "GigaDevice",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007682 .name = "GD25VQ41B",
7683 .bustype = BUS_SPI,
7684 .manufacture_id = GIGADEVICE_ID,
7685 .model_id = GIGADEVICE_GD25VQ41B,
7686 .total_size = 512,
7687 .page_size = 256,
7688 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007689 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
7690 FEATURE_OTP | FEATURE_QIO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00007691 .tested = TEST_OK_PREW,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007692 .probe = probe_spi_rdid,
7693 .probe_timing = TIMING_ZERO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00007694 .block_erasers =
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007695 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00007696 {
7697 .eraseblocks = { { 4 * 1024, 128} },
7698 .block_erase = spi_block_erase_20,
7699 }, {
7700 .eraseblocks = { { 32 * 1024, 16} },
7701 .block_erase = spi_block_erase_52,
7702 }, {
7703 .eraseblocks = { { 64 * 1024, 8} },
7704 .block_erase = spi_block_erase_d8,
7705 }, {
7706 .eraseblocks = { {512 * 1024, 1} },
7707 .block_erase = spi_block_erase_60,
7708 }, {
7709 .eraseblocks = { {512 * 1024, 1} },
7710 .block_erase = spi_block_erase_c7,
7711 }
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007712 },
Nico Huber4da971f2024-03-27 01:18:12 +01007713 .reg_bits =
7714 {
7715 .qe = {STATUS2, 1, RW},
7716 },
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007717 .printlock = spi_prettyprint_status_register_bp4_srwd,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007718 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7719 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007720 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007721 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007722 .prepare_access = spi_prepare_io,
7723 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007724 },
7725
7726 {
7727 .vendor = "GigaDevice",
7728 .name = "GD25VQ80C",
7729 .bustype = BUS_SPI,
7730 .manufacture_id = GIGADEVICE_ID,
7731 .model_id = GIGADEVICE_GD25VQ80C,
7732 .total_size = 1024,
7733 .page_size = 256,
7734 /* Supports SFDP */
7735 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007736 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007737 .tested = TEST_UNTESTED,
7738 .probe = probe_spi_rdid,
7739 .probe_timing = TIMING_ZERO,
7740 .block_erasers =
7741 {
7742 {
7743 .eraseblocks = { { 4 * 1024, 256} },
7744 .block_erase = spi_block_erase_20,
7745 }, {
7746 .eraseblocks = { { 32 * 1024, 32} },
7747 .block_erase = spi_block_erase_52,
7748 }, {
7749 .eraseblocks = { { 64 * 1024, 16} },
7750 .block_erase = spi_block_erase_d8,
7751 }, {
7752 .eraseblocks = { {1024 * 1024, 1} },
7753 .block_erase = spi_block_erase_60,
7754 }, {
7755 .eraseblocks = { {1024 * 1024, 1} },
7756 .block_erase = spi_block_erase_c7,
7757 }
7758 },
Nico Huber4da971f2024-03-27 01:18:12 +01007759 .reg_bits =
7760 {
7761 .qe = {STATUS2, 1, RW},
7762 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007763 .printlock = spi_prettyprint_status_register_bp4_srwd,
7764 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7765 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007766 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007767 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007768 .prepare_access = spi_prepare_io,
7769 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007770 },
7771
7772 {
Dino Li3214f582020-03-25 17:39:53 +08007773 .vendor = "GigaDevice",
7774 .name = "GD25WQ80E",
7775 .bustype = BUS_SPI,
7776 .manufacture_id = GIGADEVICE_ID,
7777 .model_id = GIGADEVICE_GD25WQ80E,
7778 .total_size = 1024,
7779 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007780 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Dino Li3214f582020-03-25 17:39:53 +08007781 .tested = TEST_OK_PREW,
7782 .probe = probe_spi_rdid,
7783 .probe_timing = TIMING_ZERO,
7784 .block_erasers =
7785 {
7786 {
7787 .eraseblocks = { {4 * 1024, 256} },
7788 .block_erase = spi_block_erase_20,
7789 }, {
7790 .eraseblocks = { {32 * 1024, 32} },
7791 .block_erase = spi_block_erase_52,
7792 }, {
7793 .eraseblocks = { {64 * 1024, 16} },
7794 .block_erase = spi_block_erase_d8,
7795 }, {
7796 .eraseblocks = { {1 * 1024 * 1024, 1} },
7797 .block_erase = spi_block_erase_60,
7798 }, {
7799 .eraseblocks = { {1 * 1024 * 1024, 1} },
7800 .block_erase = spi_block_erase_c7,
7801 }
7802 },
Nico Huber4da971f2024-03-27 01:18:12 +01007803 .reg_bits =
7804 {
7805 .qe = {STATUS2, 1, RW},
7806 },
Dino Li3214f582020-03-25 17:39:53 +08007807 .printlock = spi_prettyprint_status_register_bp4_srwd,
7808 .unlock = spi_disable_blockprotect_bp4_srwd,
7809 .write = spi_chip_write_256,
7810 .read = spi_chip_read,
7811 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007812 .prepare_access = spi_prepare_io,
7813 .finish_access = spi_finish_io,
Dino Li3214f582020-03-25 17:39:53 +08007814 },
7815
7816 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007817 .vendor = "Hyundai",
7818 .name = "HY29F002B",
7819 .bustype = BUS_PARALLEL,
7820 .manufacture_id = HYUNDAI_ID,
7821 .model_id = HYUNDAI_HY29F002B,
7822 .total_size = 256,
7823 .page_size = 256 * 1024,
7824 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007825 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007826 .probe = probe_jedec,
7827 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007828 .block_erasers =
7829 {
7830 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007831 .eraseblocks = {
7832 {16 * 1024, 1},
7833 {8 * 1024, 2},
7834 {32 * 1024, 1},
7835 {64 * 1024, 3},
7836 },
7837 .block_erase = erase_sector_jedec,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007838 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007839 .eraseblocks = { {256 * 1024, 1} },
7840 .block_erase = erase_chip_block_jedec,
7841 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007842 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007843 .write = write_jedec_1,
7844 .read = read_memmapped,
7845 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007846 .prepare_access = prepare_memory_access,
7847 .finish_access = finish_memory_access,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007848 },
7849
7850 {
David Borgc96a8bd2010-06-21 16:12:22 +00007851 .vendor = "Hyundai",
7852 .name = "HY29F002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007853 .bustype = BUS_PARALLEL,
David Borgc96a8bd2010-06-21 16:12:22 +00007854 .manufacture_id = HYUNDAI_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007855 .model_id = HYUNDAI_HY29F002T,
David Borgc96a8bd2010-06-21 16:12:22 +00007856 .total_size = 256,
7857 .page_size = 256 * 1024,
7858 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00007859 .tested = TEST_OK_PRE,
David Borgc96a8bd2010-06-21 16:12:22 +00007860 .probe = probe_jedec,
7861 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
7862 .block_erasers =
7863 {
7864 {
7865 .eraseblocks = {
7866 {64 * 1024, 3},
7867 {32 * 1024, 1},
7868 {8 * 1024, 2},
7869 {16 * 1024, 1},
7870 },
7871 .block_erase = erase_sector_jedec,
7872 }, {
7873 .eraseblocks = { {256 * 1024, 1} },
7874 .block_erase = erase_chip_block_jedec,
7875 },
7876 },
7877 .write = write_jedec_1,
7878 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007879 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007880 .prepare_access = prepare_memory_access,
7881 .finish_access = finish_memory_access,
David Borgc96a8bd2010-06-21 16:12:22 +00007882 },
7883
7884 {
7885 .vendor = "Hyundai",
Joshua Roysf1324e02010-09-16 00:51:51 +00007886 .name = "HY29F040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007887 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +00007888 .manufacture_id = HYUNDAI_ID,
7889 .model_id = HYUNDAI_HY29F040A,
7890 .total_size = 512,
7891 .page_size = 64 * 1024,
7892 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
7893 .tested = TEST_UNTESTED,
7894 .probe = probe_jedec,
7895 .probe_timing = TIMING_ZERO,
7896 .block_erasers =
7897 {
7898 {
7899 .eraseblocks = { {64 * 1024, 8} },
7900 .block_erase = erase_sector_jedec,
7901 }, {
7902 .eraseblocks = { {512 * 1024, 1} },
7903 .block_erase = erase_chip_block_jedec,
7904 },
7905 },
7906 .write = write_jedec_1,
7907 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007908 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01007909 .prepare_access = prepare_memory_access,
7910 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +00007911 },
7912
7913 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00007914 .vendor = "ISSI",
Angel Pons2ef47f32018-09-30 16:47:30 +02007915 .name = "IS25LP064",
7916 .bustype = BUS_SPI,
7917 .manufacture_id = ISSI_ID_SPI,
7918 .model_id = ISSI_IS25LP064,
7919 .total_size = 8192,
7920 .page_size = 256,
7921 /* OTP: 1024B total; read 0x48; write 0x42 */
7922 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Simon Buhrow9bf829d2021-10-20 17:09:09 +02007923 .tested = TEST_OK_PREW,
Angel Pons2ef47f32018-09-30 16:47:30 +02007924 .probe = probe_spi_rdid,
7925 .probe_timing = TIMING_ZERO,
7926 .block_erasers =
7927 {
7928 {
7929 .eraseblocks = { {4 * 1024, 2048} },
7930 .block_erase = spi_block_erase_20,
7931 }, {
7932 .eraseblocks = { {4 * 1024, 2048} },
7933 .block_erase = spi_block_erase_d7,
7934 }, {
7935 .eraseblocks = { {32 * 1024, 256} },
7936 .block_erase = spi_block_erase_52,
7937 }, {
7938 .eraseblocks = { {64 * 1024, 128} },
7939 .block_erase = spi_block_erase_d8,
7940 }, {
7941 .eraseblocks = { {8 * 1024 * 1024, 1} },
7942 .block_erase = spi_block_erase_60,
7943 }, {
7944 .eraseblocks = { {8 * 1024 * 1024, 1} },
7945 .block_erase = spi_block_erase_c7,
7946 }
7947 },
7948 .unlock = spi_disable_blockprotect,
7949 .write = spi_chip_write_256,
7950 .read = spi_chip_read,
7951 .voltage = {2300, 3600},
7952 },
7953
7954 {
7955 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -07007956 .name = "IS25LP128",
7957 .bustype = BUS_SPI,
7958 .manufacture_id = ISSI_ID_SPI,
7959 .model_id = ISSI_IS25LP128,
7960 .total_size = 16384,
7961 .page_size = 256,
7962 /* OTP: 1024B total; read 0x48; write 0x42 */
7963 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
7964 .tested = TEST_OK_PREW,
7965 .probe = probe_spi_rdid,
7966 .probe_timing = TIMING_ZERO,
7967 .block_erasers =
7968 {
7969 {
7970 .eraseblocks = { {4 * 1024, 4096} },
7971 .block_erase = spi_block_erase_20,
7972 }, {
7973 .eraseblocks = { {4 * 1024, 4096} },
7974 .block_erase = spi_block_erase_d7,
7975 }, {
7976 .eraseblocks = { {32 * 1024, 512} },
7977 .block_erase = spi_block_erase_52,
7978 }, {
7979 .eraseblocks = { {64 * 1024, 256} },
7980 .block_erase = spi_block_erase_d8,
7981 }, {
7982 .eraseblocks = { {16 * 1024 * 1024, 1} },
7983 .block_erase = spi_block_erase_60,
7984 }, {
7985 .eraseblocks = { {16 * 1024 * 1024, 1} },
7986 .block_erase = spi_block_erase_c7,
7987 }
7988 },
7989 .unlock = spi_disable_blockprotect,
7990 .write = spi_chip_write_256,
7991 .read = spi_chip_read,
7992 .voltage = {2300, 3600},
7993 },
7994
7995 {
7996 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +00007997 .name = "IS25LP256",
7998 .bustype = BUS_SPI,
7999 .manufacture_id = ISSI_ID_SPI,
8000 .model_id = ISSI_IS25LP256,
8001 .total_size = 32768,
8002 .page_size = 256,
8003 /* supports SFDP */
8004 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +02008005 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
8006 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +00008007 .tested = TEST_OK_PREW,
8008 .probe = probe_spi_rdid,
8009 .probe_timing = TIMING_ZERO,
8010 .block_erasers =
8011 {
8012 {
8013 .eraseblocks = { {4 * 1024, 8192} },
8014 .block_erase = spi_block_erase_21,
8015 }, {
8016 .eraseblocks = { {4 * 1024, 8192} },
8017 .block_erase = spi_block_erase_20,
8018 /* could also use spi_block_erase_d7 */
8019 }, {
8020 .eraseblocks = { {32 * 1024, 1024} },
8021 .block_erase = spi_block_erase_5c,
8022 }, {
8023 .eraseblocks = { {32 * 1024, 1024} },
8024 .block_erase = spi_block_erase_52,
8025 }, {
8026 .eraseblocks = { {64 * 1024, 512} },
8027 .block_erase = spi_block_erase_dc,
8028 }, {
8029 .eraseblocks = { {64 * 1024, 512} },
8030 .block_erase = spi_block_erase_d8,
8031 }, {
8032 .eraseblocks = { {32 * 1024 * 1024, 1} },
8033 .block_erase = spi_block_erase_60,
8034 }, {
8035 .eraseblocks = { {32 * 1024 * 1024, 1} },
8036 .block_erase = spi_block_erase_c7,
8037 }
8038 },
8039 .unlock = spi_disable_blockprotect,
8040 .write = spi_chip_write_256,
8041 .read = spi_chip_read,
8042 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008043 .prepare_access = spi_prepare_io,
8044 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +00008045 },
8046
8047 {
8048 .vendor = "ISSI",
Nico Huberb27b8d12018-10-02 20:46:21 +02008049 .name = "IS25WP032",
8050 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +10008051 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +02008052 .model_id = ISSI_IS25WP032,
8053 .total_size = 4096,
8054 .page_size = 256,
8055 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008056 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8057 dummy cycles; non-volatile read parameters, so disable for now */
8058 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +02008059 .tested = TEST_UNTESTED,
8060 .probe = probe_spi_rdid,
8061 .probe_timing = TIMING_ZERO,
8062 .block_erasers =
8063 {
8064 {
8065 .eraseblocks = { {4 * 1024, 1024} },
8066 .block_erase = spi_block_erase_20,
8067 }, {
8068 .eraseblocks = { {4 * 1024, 1024} },
8069 .block_erase = spi_block_erase_d7,
8070 }, {
8071 .eraseblocks = { {32 * 1024, 128} },
8072 .block_erase = spi_block_erase_52,
8073 }, {
8074 .eraseblocks = { {64 * 1024, 64} },
8075 .block_erase = spi_block_erase_d8,
8076 }, {
8077 .eraseblocks = { {4 * 1024 * 1024, 1} },
8078 .block_erase = spi_block_erase_60,
8079 }, {
8080 .eraseblocks = { {4 * 1024 * 1024, 1} },
8081 .block_erase = spi_block_erase_c7,
8082 }
8083 },
8084 .unlock = spi_disable_blockprotect,
8085 .write = spi_chip_write_256,
8086 .read = spi_chip_read,
8087 .voltage = {1650, 1950},
8088 },
8089
8090 {
8091 .vendor = "ISSI",
8092 .name = "IS25WP064",
8093 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +10008094 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +02008095 .model_id = ISSI_IS25WP064,
8096 .total_size = 8192,
8097 .page_size = 256,
8098 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008099 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8100 dummy cycles; non-volatile read parameters, so disable for now */
8101 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +02008102 .tested = TEST_OK_PREW,
8103 .probe = probe_spi_rdid,
8104 .probe_timing = TIMING_ZERO,
8105 .block_erasers =
8106 {
8107 {
8108 .eraseblocks = { {4 * 1024, 2048} },
8109 .block_erase = spi_block_erase_20,
8110 }, {
8111 .eraseblocks = { {4 * 1024, 2048} },
8112 .block_erase = spi_block_erase_d7,
8113 }, {
8114 .eraseblocks = { {32 * 1024, 256} },
8115 .block_erase = spi_block_erase_52,
8116 }, {
8117 .eraseblocks = { {64 * 1024, 128} },
8118 .block_erase = spi_block_erase_d8,
8119 }, {
8120 .eraseblocks = { {8 * 1024 * 1024, 1} },
8121 .block_erase = spi_block_erase_60,
8122 }, {
8123 .eraseblocks = { {8 * 1024 * 1024, 1} },
8124 .block_erase = spi_block_erase_c7,
8125 }
8126 },
8127 .unlock = spi_disable_blockprotect,
8128 .write = spi_chip_write_256,
8129 .read = spi_chip_read,
8130 .voltage = {1650, 1950},
8131 },
8132
8133 {
8134 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -07008135 .name = "IS25WP128",
8136 .bustype = BUS_SPI,
8137 .manufacture_id = ISSI_ID_SPI,
8138 .model_id = ISSI_IS25WP128,
8139 .total_size = 16384,
8140 .page_size = 256,
8141 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008142 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8143 dummy cycles; non-volatile read parameters, so disable for now */
8144 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks3083ed92017-05-02 13:25:56 -07008145 .tested = TEST_OK_PREW,
8146 .probe = probe_spi_rdid,
8147 .probe_timing = TIMING_ZERO,
8148 .block_erasers =
8149 {
8150 {
8151 .eraseblocks = { {4 * 1024, 4096} },
8152 .block_erase = spi_block_erase_20,
8153 }, {
8154 .eraseblocks = { {4 * 1024, 4096} },
8155 .block_erase = spi_block_erase_d7,
8156 }, {
8157 .eraseblocks = { {32 * 1024, 512} },
8158 .block_erase = spi_block_erase_52,
8159 }, {
8160 .eraseblocks = { {64 * 1024, 256} },
8161 .block_erase = spi_block_erase_d8,
8162 }, {
8163 .eraseblocks = { {16 * 1024 * 1024, 1} },
8164 .block_erase = spi_block_erase_60,
8165 }, {
8166 .eraseblocks = { {16 * 1024 * 1024, 1} },
8167 .block_erase = spi_block_erase_c7,
8168 }
8169 },
8170 .unlock = spi_disable_blockprotect,
8171 .write = spi_chip_write_256,
8172 .read = spi_chip_read,
8173 .voltage = {1650, 1950},
8174 },
8175
8176 {
8177 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +00008178 .name = "IS25WP256",
8179 .bustype = BUS_SPI,
8180 .manufacture_id = ISSI_ID_SPI,
8181 .model_id = ISSI_IS25WP256,
8182 .total_size = 32768,
8183 .page_size = 256,
8184 /* supports SFDP */
8185 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +02008186 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
8187 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +00008188 .tested = TEST_OK_PREW,
8189 .probe = probe_spi_rdid,
8190 .probe_timing = TIMING_ZERO,
8191 .block_erasers =
8192 {
8193 {
8194 .eraseblocks = { {4 * 1024, 8192} },
8195 .block_erase = spi_block_erase_21,
8196 }, {
8197 .eraseblocks = { {4 * 1024, 8192} },
8198 .block_erase = spi_block_erase_20,
8199 /* could also use spi_block_erase_d7 */
8200 }, {
8201 .eraseblocks = { {32 * 1024, 1024} },
8202 .block_erase = spi_block_erase_5c,
8203 }, {
8204 .eraseblocks = { {32 * 1024, 1024} },
8205 .block_erase = spi_block_erase_52,
8206 }, {
8207 .eraseblocks = { {64 * 1024, 512} },
8208 .block_erase = spi_block_erase_dc,
8209 }, {
8210 .eraseblocks = { {64 * 1024, 512} },
8211 .block_erase = spi_block_erase_d8,
8212 }, {
8213 .eraseblocks = { {32 * 1024 * 1024, 1} },
8214 .block_erase = spi_block_erase_60,
8215 }, {
8216 .eraseblocks = { {32 * 1024 * 1024, 1} },
8217 .block_erase = spi_block_erase_c7,
8218 }
8219 },
8220 .unlock = spi_disable_blockprotect,
8221 .write = spi_chip_write_256,
8222 .read = spi_chip_read,
8223 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02008224 .prepare_access = spi_prepare_io,
8225 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +00008226 },
8227
8228 {
8229 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008230 .name = "IS29GL064B",
8231 .bustype = BUS_PARALLEL,
8232 .manufacture_id = ISSI_ID,
8233 .model_id = ISSI_PMC_IS29GL064B,
8234 .total_size = 8192,
8235 .page_size = 128 * 1024, /* actual page size is 16 */
8236 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8237 .tested = TEST_UNTESTED,
8238 .probe = probe_jedec_29gl,
8239 .probe_timing = TIMING_ZERO,
8240 .block_erasers =
8241 {
8242 {
8243 .eraseblocks = {
8244 {8 * 1024, 8},
8245 {64 * 1024, 127},
8246 },
8247 .block_erase = erase_sector_jedec,
8248 }, {
8249 .eraseblocks = { {8 * 1024 * 1024, 1} },
8250 .block_erase = erase_chip_block_jedec,
8251 },
8252 },
8253 .write = write_jedec_1,
8254 .read = read_memmapped,
8255 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008256 .prepare_access = prepare_memory_access,
8257 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008258 },
8259
8260 {
8261 .vendor = "ISSI",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008262 .name = "IS29GL064H/L",
8263 .bustype = BUS_PARALLEL,
8264 .manufacture_id = ISSI_ID,
8265 .model_id = ISSI_PMC_IS29GL064HL,
8266 .total_size = 8192,
8267 .page_size = 128 * 1024, /* actual page size is 16 */
8268 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8269 .tested = TEST_UNTESTED,
8270 .probe = probe_jedec_29gl,
8271 .probe_timing = TIMING_ZERO,
8272 .block_erasers =
8273 {
8274 {
8275 .eraseblocks = { {64 * 1024, 128} },
8276 .block_erase = erase_sector_jedec,
8277 }, {
8278 .eraseblocks = { {8 * 1024 * 1024, 1} },
8279 .block_erase = erase_chip_block_jedec,
8280 },
8281 },
8282 .write = write_jedec_1,
8283 .read = read_memmapped,
8284 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008285 .prepare_access = prepare_memory_access,
8286 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008287 },
8288
8289 {
8290 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008291 .name = "IS29GL064T",
8292 .bustype = BUS_PARALLEL,
8293 .manufacture_id = ISSI_ID,
8294 .model_id = ISSI_PMC_IS29GL064T,
8295 .total_size = 8192,
8296 .page_size = 128 * 1024, /* actual page size is 16 */
8297 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8298 .tested = TEST_UNTESTED,
8299 .probe = probe_jedec_29gl,
8300 .probe_timing = TIMING_ZERO,
8301 .block_erasers =
8302 {
8303 {
8304 .eraseblocks = {
8305 {64 * 1024, 127},
8306 {8 * 1024, 8},
8307 },
8308 .block_erase = erase_sector_jedec,
8309 }, {
8310 .eraseblocks = { {8 * 1024 * 1024, 1} },
8311 .block_erase = erase_chip_block_jedec,
8312 },
8313 },
8314 .write = write_jedec_1,
8315 .read = read_memmapped,
8316 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008317 .prepare_access = prepare_memory_access,
8318 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008319 },
8320
8321 {
8322 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008323 .name = "IS29GL128H/L",
8324 .bustype = BUS_PARALLEL,
8325 .manufacture_id = ISSI_ID,
8326 .model_id = ISSI_PMC_IS29GL128HL,
8327 .total_size = 16384,
8328 .page_size = 128 * 1024, /* actual page size is 16 */
8329 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8330 .tested = TEST_UNTESTED,
8331 .probe = probe_jedec_29gl,
8332 .probe_timing = TIMING_ZERO,
8333 .block_erasers =
8334 {
8335 {
8336 .eraseblocks = { {128 * 1024, 128} },
8337 .block_erase = erase_sector_jedec,
8338 }, {
8339 .eraseblocks = { {16 * 1024 * 1024, 1} },
8340 .block_erase = erase_chip_block_jedec,
8341 },
8342 },
8343 .write = write_jedec_1,
8344 .read = read_memmapped,
8345 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008346 .prepare_access = prepare_memory_access,
8347 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008348 },
8349
8350 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008351 .vendor = "Intel",
8352 .name = "25F160S33B8",
8353 .bustype = BUS_SPI,
8354 .manufacture_id = INTEL_ID,
8355 .model_id = INTEL_25F160S33B8,
8356 .total_size = 2048,
8357 .page_size = 256,
8358 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8359 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8360 .tested = TEST_UNTESTED,
8361 .probe = probe_spi_rdid,
8362 .probe_timing = TIMING_ZERO,
8363 .block_erasers =
8364 {
8365 {
8366 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8367 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8368 * have no effect on the memory contents, but sets a flag in the SR.
8369 .eraseblocks = {
8370 {8 * 1024, 8},
8371 {64 * 1024, 31} // inaccessible
8372 },
8373 .block_erase = spi_block_erase_40,
8374 }, { */
8375 .eraseblocks = { {64 * 1024, 32} },
8376 .block_erase = spi_block_erase_d8,
8377 }, {
8378 .eraseblocks = { {2 * 1024 * 1024, 1} },
8379 .block_erase = spi_block_erase_c7,
8380 }
8381 },
8382 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8383 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8384 .write = spi_chip_write_256,
8385 .read = spi_chip_read, /* also fast read 0x0B */
8386 .voltage = {2700, 3600},
8387 },
8388
8389 {
8390 .vendor = "Intel",
8391 .name = "25F160S33T8",
8392 .bustype = BUS_SPI,
8393 .manufacture_id = INTEL_ID,
8394 .model_id = INTEL_25F160S33T8,
8395 .total_size = 2048,
8396 .page_size = 256,
8397 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8398 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8399 .tested = TEST_UNTESTED,
8400 .probe = probe_spi_rdid,
8401 .probe_timing = TIMING_ZERO,
8402 .block_erasers =
8403 {
8404 {
8405 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8406 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8407 * have no effect on the memory contents, but sets a flag in the SR.
8408 .eraseblocks = {
8409 {64 * 1024, 31}, // inaccessible
8410 {8 * 1024, 8}
8411 },
8412 .block_erase = spi_block_erase_40,
8413 }, { */
8414 .eraseblocks = { {64 * 1024, 32} },
8415 .block_erase = spi_block_erase_d8,
8416 }, {
8417 .eraseblocks = { {2 * 1024 * 1024, 1} },
8418 .block_erase = spi_block_erase_c7,
8419 }
8420 },
8421 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8422 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8423 .write = spi_chip_write_256,
8424 .read = spi_chip_read, /* also fast read 0x0B */
8425 .voltage = {2700, 3600},
8426 },
8427
8428 {
8429 .vendor = "Intel",
8430 .name = "25F320S33B8",
8431 .bustype = BUS_SPI,
8432 .manufacture_id = INTEL_ID,
8433 .model_id = INTEL_25F320S33B8,
8434 .total_size = 4096,
8435 .page_size = 256,
8436 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8437 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8438 .tested = TEST_UNTESTED,
8439 .probe = probe_spi_rdid,
8440 .probe_timing = TIMING_ZERO,
8441 .block_erasers =
8442 {
8443 {
8444 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8445 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8446 * have no effect on the memory contents, but sets a flag in the SR.
8447 .eraseblocks = {
8448 {8 * 1024, 8},
8449 {64 * 1024, 63} // inaccessible
8450 },
8451 .block_erase = spi_block_erase_40,
8452 }, { */
8453 .eraseblocks = { {64 * 1024, 64} },
8454 .block_erase = spi_block_erase_d8,
8455 }, {
8456 .eraseblocks = { {4 * 1024 * 1024, 1} },
8457 .block_erase = spi_block_erase_c7,
8458 }
8459 },
8460 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8461 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8462 .write = spi_chip_write_256,
8463 .read = spi_chip_read, /* also fast read 0x0B */
8464 .voltage = {2700, 3600},
8465 },
8466
8467 {
8468 .vendor = "Intel",
8469 .name = "25F320S33T8",
8470 .bustype = BUS_SPI,
8471 .manufacture_id = INTEL_ID,
8472 .model_id = INTEL_25F320S33T8,
8473 .total_size = 4096,
8474 .page_size = 256,
8475 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8476 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8477 .tested = TEST_UNTESTED,
8478 .probe = probe_spi_rdid,
8479 .probe_timing = TIMING_ZERO,
8480 .block_erasers =
8481 {
8482 {
8483 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8484 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8485 * have no effect on the memory contents, but sets a flag in the SR.
8486 .eraseblocks = {
8487 {64 * 1024, 63}, // inaccessible
8488 {8 * 1024, 8}
8489 },
8490 .block_erase = spi_block_erase_40,
8491 }, { */
8492 .eraseblocks = { {64 * 1024, 64} },
8493 .block_erase = spi_block_erase_d8,
8494 }, {
8495 .eraseblocks = { {4 * 1024 * 1024, 1} },
8496 .block_erase = spi_block_erase_c7,
8497 }
8498 },
8499 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8500 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8501 .write = spi_chip_write_256,
8502 .read = spi_chip_read, /* also fast read 0x0B */
8503 .voltage = {2700, 3600},
8504 },
8505
8506 {
8507 .vendor = "Intel",
8508 .name = "25F640S33B8",
8509 .bustype = BUS_SPI,
8510 .manufacture_id = INTEL_ID,
8511 .model_id = INTEL_25F640S33B8,
8512 .total_size = 8192,
8513 .page_size = 256,
8514 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8515 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Zoltan HERPAIe0e8b2b2020-08-08 16:04:34 +02008516 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008517 .probe = probe_spi_rdid,
8518 .probe_timing = TIMING_ZERO,
8519 .block_erasers =
8520 {
8521 {
8522 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8523 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8524 * have no effect on the memory contents, but sets a flag in the SR.
8525 .eraseblocks = {
8526 {8 * 1024, 8},
8527 {64 * 1024, 127} // inaccessible
8528 },
8529 .block_erase = spi_block_erase_40,
8530 }, { */
8531 .eraseblocks = { {64 * 1024, 128} },
8532 .block_erase = spi_block_erase_d8,
8533 }, {
8534 .eraseblocks = { {8 * 1024 * 1024, 1} },
8535 .block_erase = spi_block_erase_c7,
8536 }
8537 },
8538 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8539 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8540 .write = spi_chip_write_256,
8541 .read = spi_chip_read, /* also fast read 0x0B */
8542 .voltage = {2700, 3600},
8543 },
8544
8545 {
8546 .vendor = "Intel",
8547 .name = "25F640S33T8",
8548 .bustype = BUS_SPI,
8549 .manufacture_id = INTEL_ID,
8550 .model_id = INTEL_25F640S33T8,
8551 .total_size = 8192,
8552 .page_size = 256,
8553 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8554 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8555 .tested = TEST_UNTESTED,
8556 .probe = probe_spi_rdid,
8557 .probe_timing = TIMING_ZERO,
8558 .block_erasers =
8559 {
8560 {
8561 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8562 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8563 * have no effect on the memory contents, but sets a flag in the SR.
8564 .eraseblocks = {
8565 {64 * 1024, 127}, // inaccessible
8566 {8 * 1024, 8}
8567 },
8568 .block_erase = spi_block_erase_40,
8569 }, { */
8570 .eraseblocks = { {64 * 1024, 128} },
8571 .block_erase = spi_block_erase_d8,
8572 }, {
8573 .eraseblocks = { {8 * 1024 * 1024, 1} },
8574 .block_erase = spi_block_erase_c7,
8575 }
8576 },
8577 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8578 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8579 .write = spi_chip_write_256,
8580 .read = spi_chip_read, /* also fast read 0x0B */
8581 .voltage = {2700, 3600},
8582 },
8583
8584 {
8585 .vendor = "Intel",
8586 .name = "28F001BN/BX-B",
8587 .bustype = BUS_PARALLEL,
8588 .manufacture_id = INTEL_ID,
8589 .model_id = INTEL_28F001B,
8590 .total_size = 128,
8591 .page_size = 128 * 1024, /* 8k + 2x4k + 112k */
8592 .tested = TEST_UNTESTED,
8593 .probe = probe_jedec,
8594 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8595 .block_erasers =
8596 {
8597 {
8598 .eraseblocks = {
8599 {8 * 1024, 1},
8600 {4 * 1024, 2},
8601 {112 * 1024, 1},
8602 },
8603 .block_erase = erase_block_82802ab,
8604 },
8605 },
8606 .write = write_82802ab,
8607 .read = read_memmapped,
8608 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01008609 .prepare_access = prepare_memory_access,
8610 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008611 },
8612
8613 {
8614 .vendor = "Intel",
8615 .name = "28F001BN/BX-T",
8616 .bustype = BUS_PARALLEL,
8617 .manufacture_id = INTEL_ID,
8618 .model_id = INTEL_28F001T,
8619 .total_size = 128,
8620 .page_size = 128 * 1024, /* 112k + 2x4k + 8k */
8621 .tested = TEST_OK_PREW,
8622 .probe = probe_jedec,
8623 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8624 .block_erasers =
8625 {
8626 {
8627 .eraseblocks = {
8628 {112 * 1024, 1},
8629 {4 * 1024, 2},
8630 {8 * 1024, 1},
8631 },
8632 .block_erase = erase_block_82802ab,
8633 },
8634 },
8635 .write = write_82802ab,
8636 .read = read_memmapped,
8637 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01008638 .prepare_access = prepare_memory_access,
8639 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008640 },
8641
8642 {
8643 .vendor = "Intel",
8644 .name = "28F002BC/BL/BV/BX-T",
8645 .bustype = BUS_PARALLEL,
8646 .manufacture_id = INTEL_ID,
8647 .model_id = INTEL_28F002T,
8648 .total_size = 256,
8649 .page_size = 256 * 1024,
8650 .tested = TEST_OK_PRE,
8651 .probe = probe_82802ab,
8652 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8653 .block_erasers =
8654 {
8655 {
8656 .eraseblocks = {
8657 {128 * 1024, 1},
8658 {96 * 1024, 1},
8659 {8 * 1024, 2},
8660 {16 * 1024, 1},
8661 },
8662 .block_erase = erase_block_82802ab,
8663 },
8664 },
8665 .write = write_82802ab,
8666 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008667 .prepare_access = prepare_memory_access,
8668 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008669 },
8670
8671 {
8672 .vendor = "Intel",
8673 .name = "28F004B5/BE/BV/BX-B",
8674 .bustype = BUS_PARALLEL,
8675 .manufacture_id = INTEL_ID,
8676 .model_id = INTEL_28F004B,
8677 .total_size = 512,
8678 .page_size = 128 * 1024, /* maximal block size */
8679 .tested = TEST_UNTESTED,
8680 .probe = probe_82802ab,
8681 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8682 .block_erasers =
8683 {
8684 {
8685 .eraseblocks = {
8686 {16 * 1024, 1},
8687 {8 * 1024, 2},
8688 {96 * 1024, 1},
8689 {128 * 1024, 3},
8690 },
8691 .block_erase = erase_block_82802ab,
8692 },
8693 },
8694 .write = write_82802ab,
8695 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008696 .prepare_access = prepare_memory_access,
8697 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008698 },
8699
8700 {
8701 .vendor = "Intel",
8702 .name = "28F004B5/BE/BV/BX-T",
8703 .bustype = BUS_PARALLEL,
8704 .manufacture_id = INTEL_ID,
8705 .model_id = INTEL_28F004T,
8706 .total_size = 512,
8707 .page_size = 128 * 1024, /* maximal block size */
8708 .tested = TEST_UNTESTED,
8709 .probe = probe_82802ab,
8710 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8711 .block_erasers =
8712 {
8713 {
8714 .eraseblocks = {
8715 {128 * 1024, 3},
8716 {96 * 1024, 1},
8717 {8 * 1024, 2},
8718 {16 * 1024, 1},
8719 },
8720 .block_erase = erase_block_82802ab,
8721 },
8722 },
8723 .write = write_82802ab,
8724 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008725 .prepare_access = prepare_memory_access,
8726 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008727 },
8728
8729 {
8730 .vendor = "Intel",
8731 .name = "28F008S3/S5/SC",
8732 .bustype = BUS_PARALLEL,
8733 .manufacture_id = INTEL_ID,
8734 .model_id = INTEL_28F004S3,
8735 .total_size = 512,
8736 .page_size = 256,
8737 .tested = TEST_UNTESTED,
8738 .probe = probe_82802ab,
8739 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8740 .block_erasers =
8741 {
8742 {
8743 .eraseblocks = { {64 * 1024, 8} },
8744 .block_erase = erase_block_82802ab,
8745 },
8746 },
8747 .unlock = unlock_28f004s5,
8748 .write = write_82802ab,
8749 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008750 .prepare_access = prepare_memory_access,
8751 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008752 },
8753
8754 {
8755 .vendor = "Intel",
8756 .name = "28F400BV/BX/CE/CV-B",
8757 .bustype = BUS_PARALLEL,
8758 .manufacture_id = INTEL_ID,
8759 .model_id = INTEL_28F400B,
8760 .total_size = 512,
8761 .page_size = 128 * 1024, /* maximal block size */
8762 .feature_bits = FEATURE_ADDR_SHIFTED,
8763 .tested = TEST_UNTESTED,
8764 .probe = probe_82802ab,
8765 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8766 .block_erasers =
8767 {
8768 {
8769 .eraseblocks = {
8770 {16 * 1024, 1},
8771 {8 * 1024, 2},
8772 {96 * 1024, 1},
8773 {128 * 1024, 3},
8774 },
8775 .block_erase = erase_block_82802ab,
8776 },
8777 },
8778 .write = write_82802ab,
8779 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008780 .prepare_access = prepare_memory_access,
8781 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008782 },
8783
8784 {
8785 .vendor = "Intel",
8786 .name = "28F400BV/BX/CE/CV-T",
8787 .bustype = BUS_PARALLEL,
8788 .manufacture_id = INTEL_ID,
8789 .model_id = INTEL_28F400T,
8790 .total_size = 512,
8791 .page_size = 128 * 1024, /* maximal block size */
8792 .feature_bits = FEATURE_ADDR_SHIFTED,
8793 .tested = TEST_UNTESTED,
8794 .probe = probe_82802ab,
8795 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8796 .block_erasers =
8797 {
8798 {
8799 .eraseblocks = {
8800 {128 * 1024, 3},
8801 {96 * 1024, 1},
8802 {8 * 1024, 2},
8803 {16 * 1024, 1},
8804 },
8805 .block_erase = erase_block_82802ab,
8806 },
8807 },
8808 .write = write_82802ab,
8809 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008810 .prepare_access = prepare_memory_access,
8811 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008812 },
8813
8814 {
8815 .vendor = "Intel",
8816 .name = "82802AB",
8817 .bustype = BUS_FWH,
8818 .manufacture_id = INTEL_ID,
8819 .model_id = INTEL_82802AB,
8820 .total_size = 512,
8821 .page_size = 64 * 1024,
Alan Green88552572019-07-24 13:56:06 +10008822 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008823 .probe = probe_82802ab,
8824 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
8825 .block_erasers =
8826 {
8827 {
8828 .eraseblocks = { {64 * 1024, 8} },
8829 .block_erase = erase_block_82802ab,
8830 },
8831 },
8832 .unlock = unlock_regspace2_uniform_64k,
8833 .write = write_82802ab,
8834 .read = read_memmapped,
8835 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01008836 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01008837 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008838 },
8839
8840 {
8841 .vendor = "Intel",
8842 .name = "82802AC",
8843 .bustype = BUS_FWH,
8844 .manufacture_id = INTEL_ID,
8845 .model_id = INTEL_82802AC,
8846 .total_size = 1024,
8847 .page_size = 64 * 1024,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008848 .tested = TEST_OK_PR,
8849 .probe = probe_82802ab,
8850 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
8851 .block_erasers =
8852 {
8853 {
8854 .eraseblocks = { {64 * 1024, 16} },
8855 .block_erase = erase_block_82802ab,
8856 },
8857 },
8858 .unlock = unlock_regspace2_uniform_64k,
8859 .write = write_82802ab,
8860 .read = read_memmapped,
8861 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01008862 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01008863 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008864 },
8865
8866 {
8867 .vendor = "Macronix",
8868 .name = "MX23L12854",
8869 .bustype = BUS_SPI,
8870 .manufacture_id = MACRONIX_ID,
8871 .model_id = MACRONIX_MX23L12854,
8872 .total_size = 16384,
8873 .page_size = 256,
8874 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
8875 .probe = probe_spi_rdid,
8876 .probe_timing = TIMING_ZERO,
8877 .write = NULL, /* MX23L12854 is a mask ROM, so it is read-only */
8878 .read = spi_chip_read, /* Fast read (0x0B) supported */
8879 .voltage = {3000, 3600},
8880 },
8881
8882 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008883 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +00008884 .name = "MX23L1654",
8885 .bustype = BUS_SPI,
8886 .manufacture_id = MACRONIX_ID,
8887 .model_id = MACRONIX_MX23L1654,
8888 .total_size = 2048,
8889 .page_size = 256,
8890 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
8891 .probe = probe_spi_rdid,
8892 .probe_timing = TIMING_ZERO,
8893 .write = NULL, /* MX23L1654 is a mask ROM, so it is read-only */
8894 .read = spi_chip_read, /* Fast read (0x0B) supported */
8895 .voltage = {3000, 3600},
8896 },
8897
8898 {
8899 .vendor = "Macronix",
Michael Coppola4e7f36e2014-05-03 23:01:18 +00008900 .name = "MX23L3254",
8901 .bustype = BUS_SPI,
8902 .manufacture_id = MACRONIX_ID,
8903 .model_id = MACRONIX_MX23L3254,
8904 .total_size = 4096,
8905 .page_size = 256,
Stefan Tauner6455dff2014-05-26 00:36:24 +00008906 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola4e7f36e2014-05-03 23:01:18 +00008907 .probe = probe_spi_rdid,
8908 .probe_timing = TIMING_ZERO,
8909 .write = NULL, /* MX23L3254 is a mask ROM, so it is read-only */
8910 .read = spi_chip_read, /* Fast read (0x0B) supported */
8911 .voltage = {3000, 3600},
8912 },
8913
8914 {
8915 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +00008916 .name = "MX23L6454",
8917 .bustype = BUS_SPI,
8918 .manufacture_id = MACRONIX_ID,
8919 .model_id = MACRONIX_MX23L6454,
8920 .total_size = 8192,
8921 .page_size = 256,
Stefan Tauner23e10b82016-01-23 16:16:49 +00008922 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola583ea322014-08-20 18:56:35 +00008923 .probe = probe_spi_rdid,
8924 .probe_timing = TIMING_ZERO,
8925 .write = NULL, /* MX23L6454 is a mask ROM, so it is read-only */
8926 .read = spi_chip_read, /* Fast read (0x0B) supported */
8927 .voltage = {3000, 3600},
8928 },
8929
8930 {
8931 .vendor = "Macronix",
Stefan Taunerf656e802013-02-02 15:35:44 +00008932 .name = "MX25L1005(C)/MX25L1006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00008933 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00008934 .manufacture_id = MACRONIX_ID,
8935 .model_id = MACRONIX_MX25L1005,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008936 .total_size = 128,
8937 .page_size = 256,
Stefan Taunerf656e802013-02-02 15:35:44 +00008938 /* MX25L1006E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +01008939 /* FEATURE_FAST_READ_DOUT: MX25L1006E */
8940 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Stefan Taunerd7d423b2012-10-20 09:13:16 +00008941 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008942 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00008943 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008944 .block_erasers =
8945 {
8946 {
8947 .eraseblocks = { {4 * 1024, 32} },
8948 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008949 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008950 .eraseblocks = { {64 * 1024, 2} },
8951 .block_erase = spi_block_erase_d8,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008952 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008953 .eraseblocks = { {128 * 1024, 1} },
8954 .block_erase = spi_block_erase_60,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008955 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008956 .eraseblocks = { {128 * 1024, 1} },
8957 .block_erase = spi_block_erase_c7,
8958 },
8959 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00008960 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00008961 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00008962 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01008963 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00008964 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008965 .prepare_access = spi_prepare_io,
8966 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00008967 },
8968
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008969 {
8970 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008971 .name = "MX25L12805D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00008972 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00008973 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008974 .model_id = MACRONIX_MX25L12805D,
8975 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008976 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008977 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01008978 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00008979 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008980 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00008981 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008982 .block_erasers =
8983 {
8984 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008985 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008986 .block_erase = spi_block_erase_20,
8987 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008988 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008989 .block_erase = spi_block_erase_d8,
8990 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008991 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008992 .block_erase = spi_block_erase_60,
8993 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008994 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008995 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008996 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008997 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10008998 .printlock = spi_prettyprint_status_register_bp3_srwd,
8999 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009000 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009001 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009002 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00009003 },
9004
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009005 {
9006 .vendor = "Macronix",
Tao Xia571f6ad2021-07-21 16:41:53 +08009007 .name = "MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009008 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009009 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009010 .model_id = MACRONIX_MX25L12805D,
9011 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009012 .page_size = 256,
Tao Xia571f6ad2021-07-21 16:41:53 +08009013 /* OTP: MX25L12833F has 1KB total, others have 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009014 /* *F versions: FEATURE_QPI_35 + DC bits (6, 4, 8, 10) in configuration register */
9015 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9016 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stefan Tauner8179be52011-06-04 13:13:34 +00009017 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009018 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009019 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009020 .block_erasers =
9021 {
9022 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009023 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009024 .block_erase = spi_block_erase_20,
9025 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009026 .eraseblocks = { {32 * 1024, 512} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009027 .block_erase = spi_block_erase_52,
9028 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009029 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009030 .block_erase = spi_block_erase_d8,
9031 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009032 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009033 .block_erase = spi_block_erase_60,
9034 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009035 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009036 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009037 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009038 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009039 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +01009040 .reg_bits =
9041 {
9042 .qe = {STATUS1, 6, RW},
9043 },
9044 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009045 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009046 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009047 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009048 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009049 .prepare_access = spi_prepare_io,
9050 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009051 },
9052
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009053 {
9054 .vendor = "Macronix",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009055 .name = "MX25L1605",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009056 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009057 .manufacture_id = MACRONIX_ID,
9058 .model_id = MACRONIX_MX25L1605,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009059 .total_size = 2048,
9060 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009061 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Sven Schnelle4bd8a402011-03-07 10:59:06 +00009062 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009063 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009064 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009065 .block_erasers =
9066 {
9067 {
Stefan Tauner226037d2013-03-16 01:22:12 +00009068 .eraseblocks = { {64 * 1024, 32} },
9069 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009070 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +00009071 .eraseblocks = { {64 * 1024, 32} },
9072 .block_erase = spi_block_erase_d8,
9073 }, {
9074 .eraseblocks = { {2 * 1024 * 1024, 1} },
9075 .block_erase = spi_block_erase_60,
9076 }, {
9077 .eraseblocks = { {2 * 1024 * 1024, 1} },
9078 .block_erase = spi_block_erase_c7,
9079 },
9080 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009081 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Stefan Tauner226037d2013-03-16 01:22:12 +00009082 .unlock = spi_disable_blockprotect,
9083 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009084 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009085 .voltage = {2700, 3600},
9086 },
9087
9088 {
9089 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009090 .name = "MX25L1605A/MX25L1606E/MX25L1608E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009091 .bustype = BUS_SPI,
9092 .manufacture_id = MACRONIX_ID,
9093 .model_id = MACRONIX_MX25L1605,
9094 .total_size = 2048,
9095 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009096 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L1606E and MX25L1608E only) */
Nico Huber46552c82024-03-27 01:18:12 +01009097 /* FEATURE_FAST_READ_DOUT: MX25L1606E & MX25L1608E */
9098 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +00009099 .tested = TEST_OK_PREW,
9100 .probe = probe_spi_rdid,
9101 .probe_timing = TIMING_ZERO,
9102 .block_erasers =
9103 {
9104 {
9105 .eraseblocks = { {4 * 1024, 512} },
9106 .block_erase = spi_block_erase_20,
9107 }, {
9108 .eraseblocks = { {64 * 1024, 32} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009109 .block_erase = spi_block_erase_52,
9110 }, {
9111 .eraseblocks = { {64 * 1024, 32} },
9112 .block_erase = spi_block_erase_d8,
9113 }, {
9114 .eraseblocks = { {2 * 1024 * 1024, 1} },
9115 .block_erase = spi_block_erase_60,
9116 }, {
9117 .eraseblocks = { {2 * 1024 * 1024, 1} },
9118 .block_erase = spi_block_erase_c7,
9119 },
9120 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009121 .printlock = spi_prettyprint_status_register_bp3_srwd, /* MX25L1605A bp2 only */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009122 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009123 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009124 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009125 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009126 .prepare_access = spi_prepare_io,
9127 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009128 },
9129
9130 {
9131 .vendor = "Macronix",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009132 .name = "MX25L1605D/MX25L1608D/MX25L1673E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009133 .bustype = BUS_SPI,
9134 .manufacture_id = MACRONIX_ID,
9135 .model_id = MACRONIX_MX25L1605,
9136 .total_size = 2048,
9137 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009138 /* FEATURE_QIO: MX25L1673E */
9139 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009140 .tested = TEST_OK_PREW,
9141 .probe = probe_spi_rdid,
9142 .probe_timing = TIMING_ZERO,
9143 .block_erasers =
9144 {
9145 {
9146 .eraseblocks = { {4 * 1024, 512} },
9147 .block_erase = spi_block_erase_20,
9148 }, {
9149 .eraseblocks = { {64 * 1024, 32} },
9150 .block_erase = spi_block_erase_d8,
9151 }, {
9152 .eraseblocks = { {2 * 1024 * 1024, 1} },
9153 .block_erase = spi_block_erase_60,
9154 }, {
9155 .eraseblocks = { {2 * 1024 * 1024, 1} },
9156 .block_erase = spi_block_erase_c7,
9157 },
9158 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009159 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: Continuously Program (CP) mode, for 73E is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009160 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009161 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009162 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009163 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009164 .prepare_access = spi_prepare_io,
9165 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009166 },
9167
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009168 {
9169 .vendor = "Macronix",
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009170 .name = "MX25L1635D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009171 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009172 .manufacture_id = MACRONIX_ID,
9173 .model_id = MACRONIX_MX25L1635D,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009174 .total_size = 2048,
9175 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +00009176 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009177 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9178 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Angel Ponsc2054872021-01-15 18:57:32 +01009179 .tested = TEST_OK_PREW,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009180 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009181 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009182 .block_erasers =
9183 {
9184 {
9185 .eraseblocks = { {4 * 1024, 512} },
9186 .block_erase = spi_block_erase_20,
9187 }, {
9188 .eraseblocks = { {64 * 1024, 32} },
9189 .block_erase = spi_block_erase_d8,
9190 }, {
9191 .eraseblocks = { {2 * 1024 * 1024, 1} },
9192 .block_erase = spi_block_erase_60,
9193 }, {
9194 .eraseblocks = { {2 * 1024 * 1024, 1} },
9195 .block_erase = spi_block_erase_c7,
9196 }
9197 },
Nico Huber46552c82024-03-27 01:18:12 +01009198 .reg_bits =
9199 {
9200 .qe = {STATUS1, 6, RW},
9201 },
9202 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009203 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009204 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009205 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009206 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009207 .prepare_access = spi_prepare_io,
9208 .finish_access = spi_finish_io,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009209 },
Stephan Guillouxfd315502009-04-20 22:54:13 +00009210
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009211 {
9212 .vendor = "Macronix",
Stephan Guilloux3611b802010-09-13 19:59:28 +00009213 .name = "MX25L1635E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009214 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009215 .manufacture_id = MACRONIX_ID,
9216 .model_id = MACRONIX_MX25L1635E,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009217 .total_size = 2048,
9218 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +00009219 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009220 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9221 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009222 .tested = TEST_UNTESTED,
9223 .probe = probe_spi_rdid,
9224 .probe_timing = TIMING_ZERO,
9225 .block_erasers =
9226 {
9227 {
9228 .eraseblocks = { {4 * 1024, 512} },
9229 .block_erase = spi_block_erase_20,
9230 }, {
9231 .eraseblocks = { {64 * 1024, 32} },
9232 .block_erase = spi_block_erase_d8,
9233 }, {
9234 .eraseblocks = { {2 * 1024 * 1024, 1} },
9235 .block_erase = spi_block_erase_60,
9236 }, {
9237 .eraseblocks = { {2 * 1024 * 1024, 1} },
9238 .block_erase = spi_block_erase_c7,
9239 }
9240 },
Nico Huber46552c82024-03-27 01:18:12 +01009241 .reg_bits =
9242 {
9243 .qe = {STATUS1, 6, RW},
9244 },
9245 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009246 .unlock = spi_disable_blockprotect_bp3_srwd,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009247 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009248 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +00009249 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009250 .prepare_access = spi_prepare_io,
9251 .finish_access = spi_finish_io,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009252 },
9253
9254 {
9255 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009256 .name = "MX25L2005(C)/MX25L2006E",
9257 .bustype = BUS_SPI,
9258 .manufacture_id = MACRONIX_ID,
9259 .model_id = MACRONIX_MX25L2005,
9260 .total_size = 256,
9261 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009262 /* FEATURE_FAST_READ_DOUT: MX25L2006E */
9263 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009264 .tested = TEST_OK_PREW,
9265 .probe = probe_spi_rdid,
9266 .probe_timing = TIMING_ZERO,
9267 .block_erasers =
9268 {
9269 {
9270 .eraseblocks = { {4 * 1024, 64} },
9271 .block_erase = spi_block_erase_20,
9272 }, {
9273 .eraseblocks = { {64 * 1024, 4} },
9274 .block_erase = spi_block_erase_52,
9275 }, {
9276 .eraseblocks = { {64 * 1024, 4} },
9277 .block_erase = spi_block_erase_d8,
9278 }, {
9279 .eraseblocks = { {256 * 1024, 1} },
9280 .block_erase = spi_block_erase_60,
9281 }, {
9282 .eraseblocks = { {256 * 1024, 1} },
9283 .block_erase = spi_block_erase_c7,
9284 },
9285 },
9286 .printlock = spi_prettyprint_status_register_bp1_srwd,
9287 .unlock = spi_disable_blockprotect,
9288 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009289 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009290 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009291 .prepare_access = spi_prepare_io,
9292 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009293 },
9294
9295 {
9296 .vendor = "Macronix",
Alan Green03707302019-08-26 12:50:43 +10009297 .name = "MX25L25635F/MX25L25645G",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009298 .bustype = BUS_SPI,
9299 .manufacture_id = MACRONIX_ID,
9300 .model_id = MACRONIX_MX25L25635F,
9301 .total_size = 32768,
9302 .page_size = 256,
9303 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009304 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
9305 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
9306 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Nico Huberc972aed2024-08-30 02:06:41 +02009307 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009308 .probe = probe_spi_rdid,
9309 .probe_timing = TIMING_ZERO,
9310 .block_erasers =
9311 {
9312 {
9313 .eraseblocks = { {4 * 1024, 8192} },
9314 .block_erase = spi_block_erase_21,
9315 }, {
9316 .eraseblocks = { {4 * 1024, 8192} },
9317 .block_erase = spi_block_erase_20,
9318 }, {
9319 .eraseblocks = { {32 * 1024, 1024} },
9320 .block_erase = spi_block_erase_5c,
9321 }, {
9322 .eraseblocks = { {32 * 1024, 1024} },
9323 .block_erase = spi_block_erase_52,
9324 }, {
9325 .eraseblocks = { {64 * 1024, 512} },
9326 .block_erase = spi_block_erase_dc,
9327 }, {
9328 .eraseblocks = { {64 * 1024, 512} },
9329 .block_erase = spi_block_erase_d8,
9330 }, {
9331 .eraseblocks = { {32 * 1024 * 1024, 1} },
9332 .block_erase = spi_block_erase_60,
9333 }, {
9334 .eraseblocks = { {32 * 1024 * 1024, 1} },
9335 .block_erase = spi_block_erase_c7,
9336 }
9337 },
9338 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +01009339 .reg_bits = {
9340 .qe = {STATUS1, 6, RW},
9341 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
Nico Huberc972aed2024-08-30 02:06:41 +02009342 .srp = {STATUS1, 7, RW},
9343 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9344 .tb = {CONFIG, 3, OTP},
Nico Huber46552c82024-03-27 01:18:12 +01009345 },
Nico Huberc972aed2024-08-30 02:06:41 +02009346 .wp_write_cfg = spi_wp_write_cfg,
9347 .wp_read_cfg = spi_wp_read_cfg,
9348 .wp_get_ranges = spi_wp_get_available_ranges,
9349 .decode_range = decode_range_spi25,
Nico Huber46552c82024-03-27 01:18:12 +01009350 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009351 .unlock = spi_disable_blockprotect_bp3_srwd,
9352 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009353 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009354 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009355 .prepare_access = spi_prepare_io,
9356 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009357 },
9358
9359 {
9360 .vendor = "Macronix",
Stefan Tauner226037d2013-03-16 01:22:12 +00009361 .name = "MX25L3205(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009362 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009363 .manufacture_id = MACRONIX_ID,
9364 .model_id = MACRONIX_MX25L3205,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009365 .total_size = 4096,
9366 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009367 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
David Hendricks22e05322010-12-13 23:54:59 +00009368 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009369 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009370 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +00009371 .block_erasers =
9372 {
9373 {
Stefan Tauner226037d2013-03-16 01:22:12 +00009374 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +00009375 .block_erase = spi_block_erase_20,
9376 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +00009377 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +00009378 .block_erase = spi_block_erase_d8,
9379 }, {
9380 .eraseblocks = { {4 * 1024 * 1024, 1} },
9381 .block_erase = spi_block_erase_60,
9382 }, {
9383 .eraseblocks = { {4 * 1024 * 1024, 1} },
9384 .block_erase = spi_block_erase_c7,
9385 },
9386 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009387 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00009388 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009389 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009390 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009391 .voltage = {2700, 3600},
9392 },
9393
9394 {
9395 .vendor = "Macronix",
9396 .name = "MX25L3205D/MX25L3208D",
9397 .bustype = BUS_SPI,
9398 .manufacture_id = MACRONIX_ID,
9399 .model_id = MACRONIX_MX25L3205,
9400 .total_size = 4096,
9401 .page_size = 256,
9402 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009403 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009404 .tested = TEST_OK_PREW,
9405 .probe = probe_spi_rdid,
9406 .probe_timing = TIMING_ZERO,
9407 .block_erasers =
9408 {
9409 {
9410 .eraseblocks = { {4 * 1024, 1024} },
9411 .block_erase = spi_block_erase_20,
9412 }, {
9413 .eraseblocks = { {64 * 1024, 64} },
9414 .block_erase = spi_block_erase_d8,
9415 }, {
9416 .eraseblocks = { {4 * 1024 * 1024, 1} },
9417 .block_erase = spi_block_erase_60,
9418 }, {
9419 .eraseblocks = { {4 * 1024 * 1024, 1} },
9420 .block_erase = spi_block_erase_c7,
9421 },
9422 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009423 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009424 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009425 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009426 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009427 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009428 .prepare_access = spi_prepare_io,
9429 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009430 },
9431
9432 {
9433 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009434 .name = "MX25L3206E/MX25L3208E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009435 .bustype = BUS_SPI,
9436 .manufacture_id = MACRONIX_ID,
9437 .model_id = MACRONIX_MX25L3205,
9438 .total_size = 4096,
9439 .page_size = 256,
9440 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009441 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner226037d2013-03-16 01:22:12 +00009442 .tested = TEST_OK_PREW,
9443 .probe = probe_spi_rdid,
9444 .probe_timing = TIMING_ZERO,
9445 .block_erasers =
9446 {
9447 {
9448 .eraseblocks = { {4 * 1024, 1024} },
9449 .block_erase = spi_block_erase_20,
9450 }, {
9451 .eraseblocks = { {64 * 1024, 64} },
9452 .block_erase = spi_block_erase_d8,
9453 }, {
9454 .eraseblocks = { {64 * 1024, 64} },
9455 .block_erase = spi_block_erase_52,
9456 }, {
9457 .eraseblocks = { {4 * 1024 * 1024, 1} },
9458 .block_erase = spi_block_erase_60,
9459 }, {
9460 .eraseblocks = { {4 * 1024 * 1024, 1} },
9461 .block_erase = spi_block_erase_c7,
9462 },
9463 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009464 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009465 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009466 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009467 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009468 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009469 .prepare_access = spi_prepare_io,
9470 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009471 },
9472
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009473 {
9474 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009475 .name = "MX25L3235D",
9476 .bustype = BUS_SPI,
9477 .manufacture_id = MACRONIX_ID,
9478 .model_id = MACRONIX_MX25L3235D,
9479 .total_size = 4096,
9480 .page_size = 256,
9481 /* OTP: 256B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009482 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9483 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009484 .tested = TEST_UNTESTED,
9485 .probe = probe_spi_rdid,
9486 .probe_timing = TIMING_ZERO,
9487 .block_erasers =
9488 {
9489 {
9490 .eraseblocks = { {4 * 1024, 1024} },
9491 .block_erase = spi_block_erase_20,
9492 }, {
9493 .eraseblocks = { {64 * 1024, 64} },
9494 .block_erase = spi_block_erase_d8,
9495 }, {
9496 .eraseblocks = { {4 * 1024 * 1024, 1} },
9497 .block_erase = spi_block_erase_60,
9498 }, {
9499 .eraseblocks = { {4 * 1024 * 1024, 1} },
9500 .block_erase = spi_block_erase_c7,
9501 }
9502 },
Nico Huber46552c82024-03-27 01:18:12 +01009503 .reg_bits =
9504 {
9505 .qe = {STATUS1, 6, RW},
9506 },
9507 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009508 .unlock = spi_disable_blockprotect_bp3_srwd,
9509 .write = spi_chip_write_256,
9510 .read = spi_chip_read,
9511 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009512 .prepare_access = spi_prepare_io,
9513 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009514 },
9515
9516 {
9517 .vendor = "Macronix",
Nico Huberb6683e02021-04-21 13:04:29 +02009518 .name = "MX25L3233F/MX25L3273E",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009519 .bustype = BUS_SPI,
9520 .manufacture_id = MACRONIX_ID,
9521 .model_id = MACRONIX_MX25L3205,
9522 .total_size = 4096,
9523 .page_size = 256,
Nico Huber6e69e2b2021-04-21 13:03:13 +02009524 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009525 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Stefan Tauner23e10b82016-01-23 16:16:49 +00009526 .tested = TEST_OK_PREW,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009527 .probe = probe_spi_rdid,
9528 .probe_timing = TIMING_ZERO,
9529 .block_erasers =
9530 {
9531 {
9532 .eraseblocks = { {4 * 1024, 1024} },
9533 .block_erase = spi_block_erase_20,
9534 }, {
9535 .eraseblocks = { {32 * 1024, 128} },
9536 .block_erase = spi_block_erase_52,
9537 }, {
9538 .eraseblocks = { {64 * 1024, 64} },
9539 .block_erase = spi_block_erase_d8,
9540 }, {
9541 .eraseblocks = { {4 * 1024 * 1024, 1} },
9542 .block_erase = spi_block_erase_60,
9543 }, {
9544 .eraseblocks = { {4 * 1024 * 1024, 1} },
9545 .block_erase = spi_block_erase_c7,
9546 },
9547 },
Nico Huber46552c82024-03-27 01:18:12 +01009548 .reg_bits =
9549 {
9550 .qe = {STATUS1, 6, RW},
9551 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009552 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009553 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009554 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009555 .read = spi_chip_read,
Nico Huberb6683e02021-04-21 13:04:29 +02009556 .voltage = {2700, 3600}, /* 33F 2.65V..3.6V */
Nico Huber930d4212024-05-04 18:59:15 +02009557 .prepare_access = spi_prepare_io,
9558 .finish_access = spi_finish_io,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009559 },
9560
9561 {
9562 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009563 .name = "MX25L4005(A/C)/MX25L4006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009564 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009565 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009566 .model_id = MACRONIX_MX25L4005,
9567 .total_size = 512,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009568 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009569 /* FEATURE_FAST_READ_DOUT: MX25L4006E */
9570 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009571 .tested = TEST_OK_PREW,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009572 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009573 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009574 .block_erasers =
9575 {
9576 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009577 .eraseblocks = { {4 * 1024, 128} },
Sean Nelson54596372010-01-09 05:30:14 +00009578 .block_erase = spi_block_erase_20,
9579 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009580 .eraseblocks = { {64 * 1024, 8} },
9581 .block_erase = spi_block_erase_52,
9582 }, {
9583 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson54596372010-01-09 05:30:14 +00009584 .block_erase = spi_block_erase_d8,
9585 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009586 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009587 .block_erase = spi_block_erase_60,
9588 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009589 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009590 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009591 },
Sean Nelson54596372010-01-09 05:30:14 +00009592 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009593 .printlock = spi_prettyprint_status_register_bp2_srwd,
9594 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009595 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009596 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009597 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009598 .prepare_access = spi_prepare_io,
9599 .finish_access = spi_finish_io,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009600 },
9601
9602 {
9603 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009604 .name = "MX25L512(E)/MX25V512(C)",
9605 .bustype = BUS_SPI,
9606 .manufacture_id = MACRONIX_ID,
9607 .model_id = MACRONIX_MX25L512,
9608 .total_size = 64,
9609 .page_size = 256,
9610 /* MX25L512E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +01009611 /* FEATURE_FAST_READ_DOUT: MX25L512E */
9612 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009613 .tested = TEST_OK_PREW,
9614 .probe = probe_spi_rdid,
9615 .probe_timing = TIMING_ZERO,
9616 .block_erasers =
9617 {
9618 {
9619 .eraseblocks = { {4 * 1024, 16} },
9620 .block_erase = spi_block_erase_20,
9621 }, {
9622 .eraseblocks = { {64 * 1024, 1} },
9623 .block_erase = spi_block_erase_52,
9624 }, {
9625 .eraseblocks = { {64 * 1024, 1} },
9626 .block_erase = spi_block_erase_d8,
9627 }, {
9628 .eraseblocks = { {64 * 1024, 1} },
9629 .block_erase = spi_block_erase_60,
9630 }, {
9631 .eraseblocks = { {64 * 1024, 1} },
9632 .block_erase = spi_block_erase_c7,
9633 },
9634 },
9635 .printlock = spi_prettyprint_status_register_bp1_srwd,
9636 .unlock = spi_disable_blockprotect,
9637 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009638 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009639 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V512(C) */
9640 },
9641
9642 {
9643 .vendor = "Macronix",
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009644 .name = "MX25L5121E",
9645 .bustype = BUS_SPI,
9646 .manufacture_id = MACRONIX_ID,
9647 .model_id = MACRONIX_MX25L5121E,
9648 .total_size = 64,
9649 .page_size = 32,
Nico Huber46552c82024-03-27 01:18:12 +01009650 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009651 .tested = TEST_OK_PREW,
9652 .probe = probe_spi_rdid,
9653 .probe_timing = TIMING_ZERO,
9654 .block_erasers =
9655 {
9656 {
9657 .eraseblocks = { {4 * 1024, 16} },
9658 .block_erase = spi_block_erase_20,
9659 }, {
9660 .eraseblocks = { {64 * 1024, 1} },
9661 .block_erase = spi_block_erase_52,
9662 }, {
9663 .eraseblocks = { {64 * 1024, 1} },
9664 .block_erase = spi_block_erase_d8,
9665 }, {
9666 .eraseblocks = { {64 * 1024, 1} },
9667 .block_erase = spi_block_erase_60,
9668 }, {
9669 .eraseblocks = { {64 * 1024, 1} },
9670 .block_erase = spi_block_erase_c7,
9671 },
9672 },
9673 .printlock = spi_prettyprint_status_register_bp1_srwd,
9674 .unlock = spi_disable_blockprotect,
9675 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009676 .read = spi_chip_read,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009677 .voltage = {2700, 3600},
9678 },
9679
9680 {
9681 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009682 .name = "MX25L6405",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009683 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009684 .manufacture_id = MACRONIX_ID,
9685 .model_id = MACRONIX_MX25L6405,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009686 .total_size = 8192,
9687 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009688 /* Has an additional 512B EEPROM sector */
9689 .feature_bits = FEATURE_WRSR_WREN,
Paul Menzelac427b22012-02-16 21:07:07 +00009690 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009691 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009692 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009693 .block_erasers =
9694 {
9695 {
9696 .eraseblocks = { {64 * 1024, 128} },
9697 .block_erase = spi_block_erase_20,
9698 }, {
9699 .eraseblocks = { {64 * 1024, 128} },
9700 .block_erase = spi_block_erase_d8,
9701 }, {
9702 .eraseblocks = { {8 * 1024 * 1024, 1} },
9703 .block_erase = spi_block_erase_60,
9704 }, {
9705 .eraseblocks = { {8 * 1024 * 1024, 1} },
9706 .block_erase = spi_block_erase_c7,
9707 }
9708 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009709 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: error flag */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009710 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009711 .write = spi_chip_write_256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009712 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009713 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00009714 },
9715
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009716 {
9717 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009718 .name = "MX25L6405D",
Stefan Tauner226037d2013-03-16 01:22:12 +00009719 .bustype = BUS_SPI,
9720 .manufacture_id = MACRONIX_ID,
9721 .model_id = MACRONIX_MX25L6405,
9722 .total_size = 8192,
9723 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009724 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009725 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009726 .tested = TEST_OK_PREW,
9727 .probe = probe_spi_rdid,
9728 .probe_timing = TIMING_ZERO,
9729 .block_erasers =
9730 {
9731 {
9732 .eraseblocks = { {4 * 1024, 2048} },
9733 .block_erase = spi_block_erase_20,
9734 }, {
9735 .eraseblocks = { {64 * 1024, 128} },
9736 .block_erase = spi_block_erase_d8,
9737 }, {
9738 .eraseblocks = { {8 * 1024 * 1024, 1} },
9739 .block_erase = spi_block_erase_60,
9740 }, {
9741 .eraseblocks = { {8 * 1024 * 1024, 1} },
9742 .block_erase = spi_block_erase_c7,
9743 }
9744 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009745 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009746 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009747 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009748 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009749 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009750 .prepare_access = spi_prepare_io,
9751 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009752 },
9753
9754 {
9755 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009756 .name = "MX25L6406E/MX25L6408E",
9757 .bustype = BUS_SPI,
9758 .manufacture_id = MACRONIX_ID,
9759 .model_id = MACRONIX_MX25L6405,
9760 .total_size = 8192,
9761 .page_size = 256,
9762 /* MX25L6406E supports SFDP */
9763 /* OTP: 06E 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009764 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009765 .tested = TEST_OK_PREW,
9766 .probe = probe_spi_rdid,
9767 .probe_timing = TIMING_ZERO,
9768 .block_erasers =
9769 {
9770 {
9771 .eraseblocks = { {4 * 1024, 2048} },
9772 .block_erase = spi_block_erase_20,
9773 }, {
9774 .eraseblocks = { {64 * 1024, 128} },
9775 .block_erase = spi_block_erase_52,
9776 }, {
9777 .eraseblocks = { {64 * 1024, 128} },
9778 .block_erase = spi_block_erase_d8,
9779 }, {
9780 .eraseblocks = { {8 * 1024 * 1024, 1} },
9781 .block_erase = spi_block_erase_60,
9782 }, {
9783 .eraseblocks = { {8 * 1024 * 1024, 1} },
9784 .block_erase = spi_block_erase_c7,
9785 }
9786 },
9787 .printlock = spi_prettyprint_status_register_bp3_srwd,
9788 .unlock = spi_disable_blockprotect_bp3_srwd,
9789 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009790 .read = spi_chip_read,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009791 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009792 .prepare_access = spi_prepare_io,
9793 .finish_access = spi_finish_io,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009794 },
9795
9796 {
9797 .vendor = "Macronix",
Nico Huberb0072782017-12-06 21:02:57 +01009798 .name = "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F",
Stefan Tauner226037d2013-03-16 01:22:12 +00009799 .bustype = BUS_SPI,
9800 .manufacture_id = MACRONIX_ID,
9801 .model_id = MACRONIX_MX25L6405,
9802 .total_size = 8192,
9803 .page_size = 256,
9804 /* supports SFDP */
9805 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009806 /* FEATURE_QIO: MX25L6473E, MX25L6473F */
9807 /* FEATURE_FAST_READ_DOUT, _QOUT: MX25L6436E */
9808 /* FEATURE_FAST_READ_DIO, _QIO: MX25L6445E, MX25L6465E */
9809 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +00009810 .tested = TEST_OK_PREW,
9811 .probe = probe_spi_rdid,
9812 .probe_timing = TIMING_ZERO,
9813 .block_erasers =
9814 {
9815 {
9816 .eraseblocks = { {4 * 1024, 2048} },
9817 .block_erase = spi_block_erase_20,
9818 }, {
9819 .eraseblocks = { {32 * 1024, 256} },
9820 .block_erase = spi_block_erase_52,
9821 }, {
9822 .eraseblocks = { {64 * 1024, 128} },
9823 .block_erase = spi_block_erase_d8,
9824 }, {
9825 .eraseblocks = { {8 * 1024 * 1024, 1} },
9826 .block_erase = spi_block_erase_60,
9827 }, {
9828 .eraseblocks = { {8 * 1024 * 1024, 1} },
9829 .block_erase = spi_block_erase_c7,
9830 }
9831 },
Nico Huber46552c82024-03-27 01:18:12 +01009832 .reg_bits =
9833 {
9834 .qe = {STATUS1, 6, RW},
9835 },
9836 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009837 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009838 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009839 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009840 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009841 .prepare_access = spi_prepare_io,
9842 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009843 },
9844
9845 {
9846 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009847 .name = "MX25L6495F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009848 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009849 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009850 .model_id = MACRONIX_MX25L6495F,
9851 .total_size = 8192,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +00009852 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009853 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Stefan Tauner226037d2013-03-16 01:22:12 +00009854 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner0554ca52013-07-25 22:54:25 +00009855 .tested = TEST_OK_PREW,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +00009856 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009857 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009858 .block_erasers =
9859 {
9860 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009861 .eraseblocks = { {4 * 1024, 2048} },
Sean Nelson54596372010-01-09 05:30:14 +00009862 .block_erase = spi_block_erase_20,
9863 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009864 .eraseblocks = { {32 * 1024, 256} },
9865 .block_erase = spi_block_erase_52,
9866 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05309867 .eraseblocks = { {64 * 1024, 128} },
9868 .block_erase = spi_block_erase_d8,
9869 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009870 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009871 .block_erase = spi_block_erase_60,
9872 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009873 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009874 .block_erase = spi_block_erase_c7,
9875 }
9876 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009877 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009878 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009879 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009880 .voltage = {2700, 3600},
9881 },
9882
9883 {
9884 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009885 .name = "MX25L8005/MX25L8006E/MX25L8008E/MX25V8005",
Stefan Tauner5c316f92015-02-08 21:57:52 +00009886 .bustype = BUS_SPI,
9887 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009888 .model_id = MACRONIX_MX25L8005,
9889 .total_size = 1024,
9890 .page_size = 256,
9891 /* MX25L8006E, MX25L8008E support SFDP */
9892 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L8006E, MX25L8008E only) */
Nico Huber46552c82024-03-27 01:18:12 +01009893 /* FEATURE_FAST_READ_DOUT: MX25L8006E, MX25L8008E */
9894 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009895 .tested = TEST_OK_PREW,
9896 .probe = probe_spi_rdid,
9897 .probe_timing = TIMING_ZERO,
9898 .block_erasers =
9899 {
9900 {
9901 .eraseblocks = { {4 * 1024, 256} },
9902 .block_erase = spi_block_erase_20,
9903 }, {
9904 .eraseblocks = { {64 * 1024, 16} },
9905 .block_erase = spi_block_erase_52,
9906 }, {
9907 .eraseblocks = { {64 * 1024, 16} },
9908 .block_erase = spi_block_erase_d8,
9909 }, {
9910 .eraseblocks = { {1024 * 1024, 1} },
9911 .block_erase = spi_block_erase_60,
9912 }, {
9913 .eraseblocks = { {1024 * 1024, 1} },
9914 .block_erase = spi_block_erase_c7,
9915 },
9916 },
9917 .printlock = spi_prettyprint_status_register_bp2_srwd,
9918 .unlock = spi_disable_blockprotect,
9919 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009920 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009921 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V8005 */
9922 },
9923
9924 {
9925 .vendor = "Macronix",
sibradzicf62623c2020-03-14 17:21:34 +09009926 .name = "MX25R3235F",
9927 .bustype = BUS_SPI,
9928 .manufacture_id = MACRONIX_ID,
9929 .model_id = MACRONIX_MX25R3235F,
9930 .total_size = 4096,
9931 .page_size = 256,
9932 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +01009933 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
sibradzicf62623c2020-03-14 17:21:34 +09009934 .tested = TEST_OK_PREW,
9935 .probe = probe_spi_rdid,
9936 .probe_timing = TIMING_ZERO,
9937 .block_erasers =
9938 {
9939 {
9940 .eraseblocks = { {4 * 1024, 1024} },
9941 .block_erase = spi_block_erase_20,
9942 }, {
sibradzicf62623c2020-03-14 17:21:34 +09009943 .eraseblocks = { {32 * 1024, 128} },
9944 .block_erase = spi_block_erase_52,
9945 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05309946 .eraseblocks = { {64 * 1024, 64} },
9947 .block_erase = spi_block_erase_d8,
9948 }, {
sibradzicf62623c2020-03-14 17:21:34 +09009949 .eraseblocks = { {4 * 1024 * 1024, 1} },
9950 .block_erase = spi_block_erase_60,
9951 }, {
9952 .eraseblocks = { {4 * 1024 * 1024, 1} },
9953 .block_erase = spi_block_erase_c7,
9954 }
9955 },
Nico Huber5f509992024-03-27 01:18:12 +01009956 .reg_bits =
9957 {
9958 .qe = {STATUS1, 6, RW},
9959 },
9960 .printlock = spi_prettyprint_status_register_bp3_srwd,
sibradzicf62623c2020-03-14 17:21:34 +09009961 .unlock = spi_disable_blockprotect_bp3_srwd,
9962 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +01009963 .read = spi_chip_read,
sibradzicf62623c2020-03-14 17:21:34 +09009964 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009965 .prepare_access = spi_prepare_io,
9966 .finish_access = spi_finish_io,
sibradzicf62623c2020-03-14 17:21:34 +09009967 },
9968
9969 {
9970 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009971 .name = "MX25R6435F",
9972 .bustype = BUS_SPI,
9973 .manufacture_id = MACRONIX_ID,
9974 .model_id = MACRONIX_MX25R6435F,
9975 .total_size = 8192,
9976 .page_size = 256,
9977 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +01009978 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009979 .tested = TEST_OK_PREW,
9980 .probe = probe_spi_rdid,
9981 .probe_timing = TIMING_ZERO,
9982 .block_erasers =
9983 {
9984 {
9985 .eraseblocks = { {4 * 1024, 2048} },
9986 .block_erase = spi_block_erase_20,
9987 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009988 .eraseblocks = { {32 * 1024, 256} },
9989 .block_erase = spi_block_erase_52,
9990 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05309991 .eraseblocks = { {64 * 1024, 128} },
9992 .block_erase = spi_block_erase_d8,
9993 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009994 .eraseblocks = { {8 * 1024 * 1024, 1} },
9995 .block_erase = spi_block_erase_60,
9996 }, {
9997 .eraseblocks = { {8 * 1024 * 1024, 1} },
9998 .block_erase = spi_block_erase_c7,
9999 }
10000 },
Nico Huber5f509992024-03-27 01:18:12 +010010001 .reg_bits =
10002 {
10003 .qe = {STATUS1, 6, RW},
10004 },
10005 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010006 .unlock = spi_disable_blockprotect_bp3_srwd,
10007 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +010010008 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010009 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010010 .prepare_access = spi_prepare_io,
10011 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010012 },
10013
10014 {
10015 .vendor = "Macronix",
10016 .name = "MX25U12835F",
10017 .bustype = BUS_SPI,
10018 .manufacture_id = MACRONIX_ID,
10019 .model_id = MACRONIX_MX25U12835E,
Stefan Tauner5c316f92015-02-08 21:57:52 +000010020 .total_size = 16384,
10021 .page_size = 256,
10022 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010023 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_35,
10024 .dummy_cycles =
10025 {
10026 /* 133MHz version has configuration register
10027 bit to toggle 8 dummy cycles for QIO, defaults: */
10028 .qpi_fast_read = 4,
10029 .qpi_fast_read_qio = 6,
10030 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000010031 .tested = TEST_OK_PREW,
10032 .probe = probe_spi_rdid,
10033 .probe_timing = TIMING_ZERO,
10034 .block_erasers =
10035 {
10036 {
10037 .eraseblocks = { {4 * 1024, 4096} },
10038 .block_erase = spi_block_erase_20,
10039 }, {
10040 .eraseblocks = { {32 * 1024, 512} },
10041 .block_erase = spi_block_erase_52,
10042 }, {
10043 .eraseblocks = { {64 * 1024, 256} },
10044 .block_erase = spi_block_erase_d8,
10045 }, {
10046 .eraseblocks = { {16 * 1024 * 1024, 1} },
10047 .block_erase = spi_block_erase_60,
10048 }, {
10049 .eraseblocks = { {16 * 1024 * 1024, 1} },
10050 .block_erase = spi_block_erase_c7,
10051 }
10052 },
Angel Ponsf112e242018-09-30 20:14:17 +020010053 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010054 .reg_bits =
10055 {
10056 .qe = {STATUS1, 6, RW},
10057 },
10058 .printlock = spi_prettyprint_status_register_bp3_srwd,
Angel Ponsf112e242018-09-30 20:14:17 +020010059 .unlock = spi_disable_blockprotect_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010060 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010061 .read = spi_chip_read,
Angel Ponsf112e242018-09-30 20:14:17 +020010062 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010063 .prepare_access = spi_prepare_io,
10064 .finish_access = spi_finish_io,
Angel Ponsf112e242018-09-30 20:14:17 +020010065 },
10066
10067 {
10068 .vendor = "Macronix",
Vincent Palatinf800f552013-03-15 02:03:16 +000010069 .name = "MX25U1635E",
10070 .bustype = BUS_SPI,
10071 .manufacture_id = MACRONIX_ID,
10072 .model_id = MACRONIX_MX25U1635E,
10073 .total_size = 2048,
10074 .page_size = 256,
10075 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010076 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10077 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10078 .dummy_cycles =
10079 {
10080 .qpi_fast_read = 4,
10081 .qpi_fast_read_qio = 6,
10082 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000010083 .tested = TEST_OK_PR,
Vincent Palatinf800f552013-03-15 02:03:16 +000010084 .probe = probe_spi_rdid,
10085 .probe_timing = TIMING_ZERO,
10086 .block_erasers =
10087 {
10088 {
10089 .eraseblocks = { {4 * 1024, 512} },
10090 .block_erase = spi_block_erase_20,
10091 }, {
10092 .eraseblocks = { {32 * 1024, 64} },
10093 .block_erase = spi_block_erase_52,
10094 }, {
10095 .eraseblocks = { {64 * 1024, 32} },
10096 .block_erase = spi_block_erase_d8,
10097 }, {
10098 .eraseblocks = { {2 * 1024 * 1024, 1} },
10099 .block_erase = spi_block_erase_60,
10100 }, {
10101 .eraseblocks = { {2 * 1024 * 1024, 1} },
10102 .block_erase = spi_block_erase_c7,
10103 }
10104 },
10105 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010106 .reg_bits =
10107 {
10108 .qe = {STATUS1, 6, RW},
10109 },
10110 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000010111 .unlock = spi_disable_blockprotect_bp3_srwd,
Vincent Palatinf800f552013-03-15 02:03:16 +000010112 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010113 .read = spi_chip_read,
Vincent Palatinf800f552013-03-15 02:03:16 +000010114 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010115 .prepare_access = spi_prepare_io,
10116 .finish_access = spi_finish_io,
Vincent Palatinf800f552013-03-15 02:03:16 +000010117 },
10118
10119 {
10120 .vendor = "Macronix",
David Tomaschikf75d8c52019-06-20 09:49:01 -070010121 .name = "MX25U25635F",
10122 .bustype = BUS_SPI,
10123 .manufacture_id = MACRONIX_ID,
10124 .model_id = MACRONIX_MX25U25635F,
10125 .total_size = 32768,
10126 .page_size = 256,
10127 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010128 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
10129 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
10130 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Nikolai Artemiev148254b2021-03-23 17:21:10 +110010131 .tested = TEST_OK_PREW,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010132 .probe = probe_spi_rdid,
10133 .probe_timing = TIMING_ZERO,
10134 .block_erasers =
10135 {
10136 {
10137 .eraseblocks = { {4 * 1024, 8192} },
10138 .block_erase = spi_block_erase_21,
10139 }, {
10140 .eraseblocks = { {4 * 1024, 8192} },
10141 .block_erase = spi_block_erase_20,
10142 }, {
10143 .eraseblocks = { {32 * 1024, 1024} },
10144 .block_erase = spi_block_erase_5c,
10145 }, {
10146 .eraseblocks = { {32 * 1024, 1024} },
10147 .block_erase = spi_block_erase_52,
10148 }, {
10149 .eraseblocks = { {64 * 1024, 512} },
10150 .block_erase = spi_block_erase_dc,
10151 }, {
10152 .eraseblocks = { {64 * 1024, 512} },
10153 .block_erase = spi_block_erase_d8,
10154 }, {
10155 .eraseblocks = { {32 * 1024 * 1024, 1} },
10156 .block_erase = spi_block_erase_60,
10157 }, {
10158 .eraseblocks = { {32 * 1024 * 1024, 1} },
10159 .block_erase = spi_block_erase_c7,
10160 }
10161 },
10162 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010010163 .reg_bits =
10164 {
Nico Huber4fa39c52024-03-27 01:18:12 +010010165 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010010166 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
10167 },
Nico Huber4fa39c52024-03-27 01:18:12 +010010168 .printlock = spi_prettyprint_status_register_bp3_srwd,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010169 .unlock = spi_disable_blockprotect_bp3_srwd,
10170 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010171 .read = spi_chip_read,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010172 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010173 .prepare_access = spi_prepare_io,
10174 .finish_access = spi_finish_io,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010175 },
10176
10177 {
10178 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010179 .name = "MX25U3235E/F",
10180 .bustype = BUS_SPI,
10181 .manufacture_id = MACRONIX_ID,
10182 .model_id = MACRONIX_MX25U3235E,
10183 .total_size = 4096,
10184 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010185 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100010186 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010187 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10188 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10189 .dummy_cycles =
10190 {
10191 .qpi_fast_read = 4,
10192 .qpi_fast_read_qio = 6,
10193 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010194 .tested = TEST_OK_PREW,
10195 .probe = probe_spi_rdid,
10196 .probe_timing = TIMING_ZERO,
10197 .block_erasers =
10198 {
10199 {
10200 .eraseblocks = { {4 * 1024, 1024} },
10201 .block_erase = spi_block_erase_20,
10202 }, {
10203 .eraseblocks = { {32 * 1024, 128} },
10204 .block_erase = spi_block_erase_52,
10205 }, {
10206 .eraseblocks = { {64 * 1024, 64} },
10207 .block_erase = spi_block_erase_d8,
10208 }, {
10209 .eraseblocks = { {4 * 1024 * 1024, 1} },
10210 .block_erase = spi_block_erase_60,
10211 }, {
10212 .eraseblocks = { {4 * 1024 * 1024, 1} },
10213 .block_erase = spi_block_erase_c7,
10214 }
10215 },
10216 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010217 .reg_bits =
10218 {
10219 .qe = {STATUS1, 6, RW},
10220 },
10221 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010222 .unlock = spi_disable_blockprotect_bp3_srwd,
10223 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010224 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010225 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010226 .prepare_access = spi_prepare_io,
10227 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010228 },
10229
10230 {
10231 .vendor = "Macronix",
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010232 .name = "MX25U51245G",
10233 .bustype = BUS_SPI,
10234 .manufacture_id = MACRONIX_ID,
10235 .model_id = MACRONIX_MX25U51245G,
10236 .total_size = 65536,
10237 .page_size = 256,
10238 /* OTP: 512B factory programmed and 512B customer programmed; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010239 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
10240 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
10241 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010242 .tested = TEST_OK_PREW,
10243 .probe = probe_spi_rdid,
10244 .probe_timing = TIMING_ZERO,
10245 .block_erasers =
10246 {
10247 {
10248 .eraseblocks = { {4 * 1024, 16384} },
10249 .block_erase = spi_block_erase_21,
10250 }, {
10251 .eraseblocks = { {4 * 1024, 16384} },
10252 .block_erase = spi_block_erase_20,
10253 }, {
10254 .eraseblocks = { {32 * 1024, 2048} },
10255 .block_erase = spi_block_erase_5c,
10256 }, {
10257 .eraseblocks = { {32 * 1024, 2048} },
10258 .block_erase = spi_block_erase_52,
10259 }, {
10260 .eraseblocks = { {64 * 1024, 1024} },
10261 .block_erase = spi_block_erase_dc,
10262 }, {
10263 .eraseblocks = { {64 * 1024, 1024} },
10264 .block_erase = spi_block_erase_d8,
10265 }, {
10266 .eraseblocks = { {64 * 1024 * 1024, 1} },
10267 .block_erase = spi_block_erase_60,
10268 }, {
10269 .eraseblocks = { {64 * 1024 * 1024, 1} },
10270 .block_erase = spi_block_erase_c7,
10271 }
10272 },
10273 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010010274 .reg_bits =
10275 {
Nico Huber4fa39c52024-03-27 01:18:12 +010010276 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010010277 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
10278 },
Nico Huber4fa39c52024-03-27 01:18:12 +010010279 .printlock = spi_prettyprint_status_register_bp3_srwd,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010280 .unlock = spi_disable_blockprotect_bp3_srwd,
10281 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010282 .read = spi_chip_read,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010283 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010284 .prepare_access = spi_prepare_io,
10285 .finish_access = spi_finish_io,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010286 },
10287
10288 {
10289 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010290 .name = "MX25U6435E/F",
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010291 .bustype = BUS_SPI,
10292 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010293 .model_id = MACRONIX_MX25U6435E,
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010294 .total_size = 8192,
10295 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010296 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100010297 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010298 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10299 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10300 .dummy_cycles =
10301 {
10302 .qpi_fast_read = 4,
10303 .qpi_fast_read_qio = 6,
10304 },
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010305 .tested = TEST_OK_PREW,
10306 .probe = probe_spi_rdid,
10307 .probe_timing = TIMING_ZERO,
10308 .block_erasers =
10309 {
10310 {
10311 .eraseblocks = { {4 * 1024, 2048} },
10312 .block_erase = spi_block_erase_20,
10313 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010314 .eraseblocks = { {32 * 1024, 256} },
10315 .block_erase = spi_block_erase_52,
10316 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010317 .eraseblocks = { {64 * 1024, 128} },
10318 .block_erase = spi_block_erase_d8,
10319 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010320 .eraseblocks = { {8 * 1024 * 1024, 1} },
10321 .block_erase = spi_block_erase_60,
10322 }, {
10323 .eraseblocks = { {8 * 1024 * 1024, 1} },
10324 .block_erase = spi_block_erase_c7,
10325 }
10326 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010327 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010328 .reg_bits =
10329 {
10330 .qe = {STATUS1, 6, RW},
10331 },
10332 .printlock = spi_prettyprint_status_register_bp3_srwd,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010010333 .unlock = spi_disable_blockprotect_bp3_srwd,
10334 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010335 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010336 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010337 .prepare_access = spi_prepare_io,
10338 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010339 },
10340
10341 {
10342 .vendor = "Macronix",
10343 .name = "MX25U8032E",
10344 .bustype = BUS_SPI,
10345 .manufacture_id = MACRONIX_ID,
10346 .model_id = MACRONIX_MX25U8032E,
10347 .total_size = 1024,
10348 .page_size = 256,
10349 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber4fa39c52024-03-27 01:18:12 +010010350 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
10351 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010352 .tested = TEST_OK_PREW,
10353 .probe = probe_spi_rdid,
10354 .probe_timing = TIMING_ZERO,
10355 .block_erasers =
10356 {
10357 {
10358 .eraseblocks = { {4 * 1024, 256} },
10359 .block_erase = spi_block_erase_20,
10360 }, {
10361 .eraseblocks = { {32 * 1024, 32} },
10362 .block_erase = spi_block_erase_52,
10363 }, {
10364 .eraseblocks = { {64 * 1024, 16} },
10365 .block_erase = spi_block_erase_d8,
10366 }, {
10367 .eraseblocks = { {1024 * 1024, 1} },
10368 .block_erase = spi_block_erase_60,
10369 }, {
10370 .eraseblocks = { {1024 * 1024, 1} },
10371 .block_erase = spi_block_erase_c7,
10372 }
10373 },
10374 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010375 .reg_bits =
10376 {
10377 .qe = {STATUS1, 6, RW},
10378 },
10379 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010380 .unlock = spi_disable_blockprotect_bp3_srwd,
10381 .write = spi_chip_write_256,
Nico Huber4fa39c52024-03-27 01:18:12 +010010382 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010383 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010384 .prepare_access = spi_prepare_io,
10385 .finish_access = spi_finish_io,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010010386 },
10387
10388 {
10389 .vendor = "Macronix",
Mark Panajotovic502a9132009-08-24 01:42:24 +000010390 .name = "MX29F001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010391 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010392 .manufacture_id = MACRONIX_ID,
10393 .model_id = MACRONIX_MX29F001B,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010394 .total_size = 128,
10395 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010396 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10397 .tested = TEST_UNTESTED,
10398 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010399 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010400 .block_erasers =
10401 {
10402 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000010403 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000010404 {8 * 1024, 1},
10405 {4 * 1024, 2},
10406 {8 * 1024, 2},
10407 {32 * 1024, 1},
10408 {64 * 1024, 1},
10409 },
Sean Nelson35727f72010-01-28 23:55:12 +000010410 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010411 }, {
10412 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010413 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010414 }
10415 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010416 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010417 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010418 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010419 .prepare_access = prepare_memory_access,
10420 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010421 },
10422
10423 {
10424 .vendor = "Macronix",
10425 .name = "MX29F001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010426 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010427 .manufacture_id = MACRONIX_ID,
10428 .model_id = MACRONIX_MX29F001T,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010429 .total_size = 128,
10430 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010431 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stefan Tauner74c6ec62011-05-18 01:31:46 +000010432 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000010433 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010434 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010435 .block_erasers =
10436 {
10437 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000010438 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000010439 {64 * 1024, 1},
10440 {32 * 1024, 1},
10441 {8 * 1024, 2},
10442 {4 * 1024, 2},
10443 {8 * 1024, 1},
10444 },
Sean Nelson35727f72010-01-28 23:55:12 +000010445 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010446 }, {
10447 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010448 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010449 }
10450 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010451 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010452 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010453 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010454 .prepare_access = prepare_memory_access,
10455 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010456 },
10457
10458 {
10459 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000010460 .name = "MX29F002(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010461 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010462 .manufacture_id = MACRONIX_ID,
10463 .model_id = MACRONIX_MX29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010464 .total_size = 256,
10465 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010466 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010467 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000010468 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010469 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010470 .block_erasers =
10471 {
10472 {
10473 .eraseblocks = {
10474 {16 * 1024, 1},
10475 {8 * 1024, 2},
10476 {32 * 1024, 1},
10477 {64 * 1024, 3},
10478 },
Sean Nelson35727f72010-01-28 23:55:12 +000010479 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010480 }, {
10481 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010482 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010483 },
10484 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010485 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010486 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010487 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010488 .prepare_access = prepare_memory_access,
10489 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000010490 },
10491
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010492 {
10493 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000010494 .name = "MX29F002(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010495 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010496 .manufacture_id = MACRONIX_ID,
10497 .model_id = MACRONIX_MX29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010498 .total_size = 256,
10499 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010500 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000010501 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000010502 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010503 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010504 .block_erasers =
10505 {
10506 {
10507 .eraseblocks = {
10508 {64 * 1024, 3},
10509 {32 * 1024, 1},
10510 {8 * 1024, 2},
10511 {16 * 1024, 1},
10512 },
Sean Nelson35727f72010-01-28 23:55:12 +000010513 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010514 }, {
10515 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010516 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010517 },
10518 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010519 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010520 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010521 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010522 .prepare_access = prepare_memory_access,
10523 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000010524 },
10525
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010526 {
10527 .vendor = "Macronix",
Daniele Forsi6a18a932014-07-13 14:53:45 +000010528 .name = "MX29F022(N)B",
10529 .bustype = BUS_PARALLEL,
10530 .manufacture_id = MACRONIX_ID,
10531 .model_id = MACRONIX_MX29F022B,
10532 .total_size = 256,
10533 .page_size = 0, /* unused */
10534 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10535 .tested = TEST_UNTESTED,
10536 .probe = probe_jedec,
10537 .probe_timing = TIMING_ZERO,
10538 .block_erasers =
10539 {
10540 {
10541 .eraseblocks = {
10542 {16 * 1024, 1},
10543 {8 * 1024, 2},
10544 {32 * 1024, 1},
10545 {64 * 1024, 3},
10546 },
10547 .block_erase = erase_sector_jedec,
10548 }, {
10549 .eraseblocks = { {256 * 1024, 1} },
10550 .block_erase = erase_chip_block_jedec,
10551 }
10552 },
10553 .write = write_jedec_1,
10554 .read = read_memmapped,
10555 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010556 .prepare_access = prepare_memory_access,
10557 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000010558 },
10559
10560 {
10561 .vendor = "Macronix",
10562 .name = "MX29F022(N)T",
10563 .bustype = BUS_PARALLEL,
10564 .manufacture_id = MACRONIX_ID,
10565 .model_id = MACRONIX_MX29F022T,
10566 .total_size = 256,
10567 .page_size = 0, /* unused */
10568 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10569 .tested = TEST_OK_PREW,
10570 .probe = probe_jedec,
10571 .probe_timing = TIMING_ZERO,
10572 .block_erasers =
10573 {
10574 {
10575 .eraseblocks = {
10576 {64 * 1024, 3},
10577 {32 * 1024, 1},
10578 {8 * 1024, 2},
10579 {16 * 1024, 1},
10580 },
10581 .block_erase = erase_sector_jedec,
10582 }, {
10583 .eraseblocks = { {256 * 1024, 1} },
10584 .block_erase = erase_chip_block_jedec,
10585 }
10586 },
10587 .write = write_jedec_1,
10588 .read = read_memmapped,
10589 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010590 .prepare_access = prepare_memory_access,
10591 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000010592 },
10593
10594 {
10595 .vendor = "Macronix",
Joshua Roysf1324e02010-09-16 00:51:51 +000010596 .name = "MX29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010597 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +000010598 .manufacture_id = MACRONIX_ID,
10599 .model_id = MACRONIX_MX29F040,
10600 .total_size = 512,
10601 .page_size = 64 * 1024,
10602 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10603 .tested = TEST_UNTESTED,
10604 .probe = probe_jedec,
10605 .probe_timing = TIMING_ZERO,
10606 .block_erasers =
10607 {
10608 {
10609 .eraseblocks = { {64 * 1024, 8} },
10610 .block_erase = erase_sector_jedec,
10611 }, {
10612 .eraseblocks = { {512 * 1024, 1} },
10613 .block_erase = erase_chip_block_jedec,
10614 },
10615 },
10616 .write = write_jedec_1,
10617 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000010618 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010619 .prepare_access = prepare_memory_access,
10620 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +000010621 },
10622
10623 {
10624 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010625 .name = "MX29GL128F",
10626 .bustype = BUS_PARALLEL,
10627 .manufacture_id = MACRONIX_ID,
10628 .model_id = MACRONIX_MX29GL128F,
10629 .total_size = 16384,
10630 .page_size = 128 * 1024, /* actual page size is 16 */
10631 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10632 .tested = TEST_UNTESTED,
10633 .probe = probe_jedec_29gl,
10634 .probe_timing = TIMING_ZERO,
10635 .block_erasers =
10636 {
10637 {
10638 .eraseblocks = { {128 * 1024, 128} },
10639 .block_erase = erase_sector_jedec,
10640 }, {
10641 .eraseblocks = { {16 * 1024 * 1024, 1} },
10642 .block_erase = erase_chip_block_jedec,
10643 },
10644 },
10645 .write = write_jedec_1,
10646 .read = read_memmapped,
10647 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010648 .prepare_access = prepare_memory_access,
10649 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010650 },
10651
10652 {
10653 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010654 .name = "MX29GL320EB",
10655 .bustype = BUS_PARALLEL,
10656 .manufacture_id = MACRONIX_ID,
10657 .model_id = MACRONIX_MX29GL320EB,
10658 .total_size = 4096,
10659 .page_size = 128 * 1024, /* actual page size is 16 */
10660 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10661 .tested = TEST_UNTESTED,
10662 .probe = probe_jedec_29gl,
10663 .probe_timing = TIMING_ZERO,
10664 .block_erasers =
10665 {
10666 {
10667 .eraseblocks = {
10668 {8 * 1024, 8},
10669 {64 * 1024, 63},
10670 },
10671 .block_erase = erase_sector_jedec,
10672 }, {
10673 .eraseblocks = { {4 * 1024 * 1024, 1} },
10674 .block_erase = erase_chip_block_jedec,
10675 },
10676 },
10677 .write = write_jedec_1,
10678 .read = read_memmapped,
10679 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010680 .prepare_access = prepare_memory_access,
10681 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010682 },
10683
10684 {
10685 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010686 .name = "MX29GL320EH/L",
10687 .bustype = BUS_PARALLEL,
10688 .manufacture_id = MACRONIX_ID,
10689 .model_id = MACRONIX_MX29GL320EHL,
10690 .total_size = 4096,
10691 .page_size = 128 * 1024, /* actual page size is 16 */
10692 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10693 .tested = TEST_UNTESTED,
10694 .probe = probe_jedec_29gl,
10695 .probe_timing = TIMING_ZERO,
10696 .block_erasers =
10697 {
10698 {
10699 .eraseblocks = { {64 * 1024, 64} },
10700 .block_erase = erase_sector_jedec,
10701 }, {
10702 .eraseblocks = { {4 * 1024 * 1024, 1} },
10703 .block_erase = erase_chip_block_jedec,
10704 },
10705 },
10706 .write = write_jedec_1,
10707 .read = read_memmapped,
10708 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010709 .prepare_access = prepare_memory_access,
10710 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010711 },
10712
10713 {
10714 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010715 .name = "MX29GL320ET",
10716 .bustype = BUS_PARALLEL,
10717 .manufacture_id = MACRONIX_ID,
10718 .model_id = MACRONIX_MX29GL320ET,
10719 .total_size = 4096,
10720 .page_size = 128 * 1024, /* actual page size is 16 */
10721 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10722 .tested = TEST_UNTESTED,
10723 .probe = probe_jedec_29gl,
10724 .probe_timing = TIMING_ZERO,
10725 .block_erasers =
10726 {
10727 {
10728 .eraseblocks = {
10729 {64 * 1024, 63},
10730 {8 * 1024, 8},
10731 },
10732 .block_erase = erase_sector_jedec,
10733 }, {
10734 .eraseblocks = { {4 * 1024 * 1024, 1} },
10735 .block_erase = erase_chip_block_jedec,
10736 },
10737 },
10738 .write = write_jedec_1,
10739 .read = read_memmapped,
10740 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010741 .prepare_access = prepare_memory_access,
10742 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010743 },
10744
10745 {
10746 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010747 .name = "MX29GL640EB",
10748 .bustype = BUS_PARALLEL,
10749 .manufacture_id = MACRONIX_ID,
10750 .model_id = MACRONIX_MX29GL640EB,
10751 .total_size = 8192,
10752 .page_size = 128 * 1024, /* actual page size is 16 */
10753 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10754 .tested = TEST_UNTESTED,
10755 .probe = probe_jedec_29gl,
10756 .probe_timing = TIMING_ZERO,
10757 .block_erasers =
10758 {
10759 {
10760 .eraseblocks = {
10761 {8 * 1024, 8},
10762 {64 * 1024, 127},
10763 },
10764 .block_erase = erase_sector_jedec,
10765 }, {
10766 .eraseblocks = { {8 * 1024 * 1024, 1} },
10767 .block_erase = erase_chip_block_jedec,
10768 },
10769 },
10770 .write = write_jedec_1,
10771 .read = read_memmapped,
10772 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010773 .prepare_access = prepare_memory_access,
10774 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010775 },
10776
10777 {
10778 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010779 .name = "MX29GL640EH/L",
10780 .bustype = BUS_PARALLEL,
10781 .manufacture_id = MACRONIX_ID,
10782 .model_id = MACRONIX_MX29GL640EHL,
10783 .total_size = 8192,
10784 .page_size = 128 * 1024, /* actual page size is 16 */
10785 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10786 .tested = TEST_UNTESTED,
10787 .probe = probe_jedec_29gl,
10788 .probe_timing = TIMING_ZERO,
10789 .block_erasers =
10790 {
10791 {
10792 .eraseblocks = { {64 * 1024, 128} },
10793 .block_erase = erase_sector_jedec,
10794 }, {
10795 .eraseblocks = { {8 * 1024 * 1024, 1} },
10796 .block_erase = erase_chip_block_jedec,
10797 },
10798 },
10799 .write = write_jedec_1,
10800 .read = read_memmapped,
10801 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010802 .prepare_access = prepare_memory_access,
10803 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010804 },
10805
10806 {
10807 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010808 .name = "MX29GL640ET",
10809 .bustype = BUS_PARALLEL,
10810 .manufacture_id = MACRONIX_ID,
10811 .model_id = MACRONIX_MX29GL640ET,
10812 .total_size = 8192,
10813 .page_size = 128 * 1024, /* actual page size is 16 */
10814 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10815 .tested = TEST_UNTESTED,
10816 .probe = probe_jedec_29gl,
10817 .probe_timing = TIMING_ZERO,
10818 .block_erasers =
10819 {
10820 {
10821 .eraseblocks = {
10822 {64 * 1024, 127},
10823 {8 * 1024, 8},
10824 },
10825 .block_erase = erase_sector_jedec,
10826 }, {
10827 .eraseblocks = { {8 * 1024 * 1024, 1} },
10828 .block_erase = erase_chip_block_jedec,
10829 },
10830 },
10831 .write = write_jedec_1,
10832 .read = read_memmapped,
10833 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010834 .prepare_access = prepare_memory_access,
10835 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010836 },
10837
10838 {
10839 .vendor = "Macronix",
Carl-Daniel Hailfinger350a0c32009-07-24 13:59:27 +000010840 .name = "MX29LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010841 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010842 .manufacture_id = MACRONIX_ID,
10843 .model_id = MACRONIX_MX29LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010844 .total_size = 512,
10845 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010846 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10847 .tested = TEST_UNTESTED,
10848 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010849 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010850 .block_erasers =
10851 {
10852 {
Stefan Tauner6697f712014-08-06 15:09:15 +000010853 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000010854 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010855 }, {
10856 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010857 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010858 },
10859 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010860 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010861 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010862 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010863 .prepare_access = prepare_memory_access,
10864 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger7de86392008-12-10 10:32:05 +000010865 },
10866
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010867 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010868 .vendor = "Macronix",
Hemanth Guruva Reddya136d422019-07-11 11:08:27 +020010869 .name = "MX66L51235F/MX25L51245G",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010870 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010871 .manufacture_id = MACRONIX_ID,
10872 .model_id = MACRONIX_MX66L51235F,
10873 .total_size = 65536,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010874 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010875 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
10876 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010877 .tested = TEST_OK_PREW,
10878 .probe = probe_spi_rdid,
10879 .probe_timing = TIMING_ZERO,
10880 .block_erasers =
10881 {
10882 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010883 .eraseblocks = { {4 * 1024, 16384} },
10884 .block_erase = spi_block_erase_21,
10885 }, {
10886 .eraseblocks = { {4 * 1024, 16384} },
10887 .block_erase = spi_block_erase_20,
10888 }, {
10889 .eraseblocks = { {32 * 1024, 2048} },
10890 .block_erase = spi_block_erase_5c,
10891 }, {
10892 .eraseblocks = { {32 * 1024, 2048} },
10893 .block_erase = spi_block_erase_52,
10894 }, {
10895 .eraseblocks = { {64 * 1024, 1024} },
10896 .block_erase = spi_block_erase_dc,
10897 }, {
10898 .eraseblocks = { {64 * 1024, 1024} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010899 .block_erase = spi_block_erase_d8,
10900 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010901 .eraseblocks = { {64 * 1024 * 1024, 1} },
10902 .block_erase = spi_block_erase_60,
10903 }, {
10904 .eraseblocks = { {64 * 1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010905 .block_erase = spi_block_erase_c7,
10906 }
10907 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010908 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
10909 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +000010910 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010911 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010912 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010913 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010914 .prepare_access = spi_prepare_io,
10915 .finish_access = spi_finish_io,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010916 },
10917
Patrick Rudolph3ba83152021-06-08 10:52:19 +020010918 {
10919 .vendor = "Macronix",
10920 .name = "MX66L1G45G",
10921 .bustype = BUS_SPI,
10922 .manufacture_id = MACRONIX_ID,
10923 .model_id = MACRONIX_MX66L1G45G,
10924 .total_size = 131072,
10925 .page_size = 256,
10926 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
10927 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
10928 .tested = TEST_OK_PREW,
10929 .probe = probe_spi_rdid,
10930 .probe_timing = TIMING_ZERO,
10931 .block_erasers =
10932 {
10933 {
10934 .eraseblocks = { {4 * 1024, 32768} },
10935 .block_erase = spi_block_erase_21,
10936 }, {
10937 .eraseblocks = { {4 * 1024, 32768} },
10938 .block_erase = spi_block_erase_20,
10939 }, {
10940 .eraseblocks = { {32 * 1024, 4096} },
10941 .block_erase = spi_block_erase_5c,
10942 }, {
10943 .eraseblocks = { {32 * 1024, 4096} },
10944 .block_erase = spi_block_erase_52,
10945 }, {
10946 .eraseblocks = { {64 * 1024, 2048} },
10947 .block_erase = spi_block_erase_dc,
10948 }, {
10949 .eraseblocks = { {64 * 1024, 2048} },
10950 .block_erase = spi_block_erase_d8,
10951 }, {
10952 .eraseblocks = { {128 * 1024 * 1024, 1} },
10953 .block_erase = spi_block_erase_60,
10954 }, {
10955 .eraseblocks = { {128 * 1024 * 1024, 1} },
10956 .block_erase = spi_block_erase_c7,
10957 }
10958 },
10959 /* TODO: security register and SBLK/SBULK, configuration register */
10960 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
10961 .unlock = spi_disable_blockprotect_bp3_srwd,
10962 .write = spi_chip_write_256,
10963 .read = spi_chip_read, /* Fast read (0x0B) supported */
10964 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010965 .prepare_access = spi_prepare_io,
10966 .finish_access = spi_finish_io,
Patrick Rudolph3ba83152021-06-08 10:52:19 +020010967 },
10968
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010969 /* The ST M25P05 is a bit of a problem. It has the same ID as the
10970 * ST M25P05-A in RES mode, but supports only 128 byte writes instead
10971 * of 256 byte writes. We rely heavily on the fact that probe_spi_res1
10972 * only is successful if RDID does not work.
10973 */
10974 {
10975 .vendor = "Micron/Numonyx/ST",
10976 .name = "M25P05",
10977 .bustype = BUS_SPI,
10978 .manufacture_id = 0, /* Not used. */
10979 .model_id = ST_M25P05_RES,
10980 .total_size = 64,
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, 2} },
10990 .block_erase = spi_block_erase_d8,
10991 }, {
10992 .eraseblocks = { {64 * 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 {
11004 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011005 .name = "M25P05-A",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011006 .bustype = BUS_SPI,
11007 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011008 .model_id = ST_M25P05A,
11009 .total_size = 64,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011010 .page_size = 256,
11011 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011012 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011013 .probe = probe_spi_rdid,
11014 .probe_timing = TIMING_ZERO,
11015 .block_erasers =
11016 {
11017 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011018 .eraseblocks = { {32 * 1024, 2} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011019 .block_erase = spi_block_erase_d8,
11020 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011021 .eraseblocks = { {64 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011022 .block_erase = spi_block_erase_c7,
11023 }
11024 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011025 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011026 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011027 .write = spi_chip_write_256,
11028 .read = spi_chip_read,
11029 .voltage = {2700, 3600},
11030 },
11031
11032 /* The ST M25P10 has the same problem as the M25P05. */
11033 {
11034 .vendor = "Micron/Numonyx/ST",
11035 .name = "M25P10",
11036 .bustype = BUS_SPI,
11037 .manufacture_id = 0, /* Not used. */
11038 .model_id = ST_M25P10_RES,
11039 .total_size = 128,
11040 .page_size = 256,
11041 .feature_bits = FEATURE_WRSR_WREN,
11042 .tested = TEST_UNTESTED,
11043 .probe = probe_spi_res1,
11044 .probe_timing = TIMING_ZERO,
11045 .block_erasers =
11046 {
11047 {
11048 .eraseblocks = { {32 * 1024, 4} },
11049 .block_erase = spi_block_erase_d8,
11050 }, {
11051 .eraseblocks = { {128 * 1024, 1} },
11052 .block_erase = spi_block_erase_c7,
11053 }
11054 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011055 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011056 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011057 .write = spi_chip_write_1, /* 128 */
11058 .read = spi_chip_read,
11059 .voltage = {2700, 3600},
11060 },
11061
11062 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011063 .vendor = "Micron/Numonyx/ST",
11064 .name = "M25P10-A",
11065 .bustype = BUS_SPI,
11066 .manufacture_id = ST_ID,
11067 .model_id = ST_M25P10A,
11068 .total_size = 128,
11069 .page_size = 256,
11070 .feature_bits = FEATURE_WRSR_WREN,
11071 .tested = TEST_OK_PREW,
11072 .probe = probe_spi_rdid,
11073 .probe_timing = TIMING_ZERO,
11074 .block_erasers =
11075 {
11076 {
11077 .eraseblocks = { {32 * 1024, 4} },
11078 .block_erase = spi_block_erase_d8,
11079 }, {
11080 .eraseblocks = { {128 * 1024, 1} },
11081 .block_erase = spi_block_erase_c7,
11082 }
11083 },
11084 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11085 .unlock = spi_disable_blockprotect_bp3_srwd,
11086 .write = spi_chip_write_256,
11087 .read = spi_chip_read,
11088 .voltage = {2700, 3600},
11089 },
11090
11091 {
11092 .vendor = "Micron/Numonyx/ST",
11093 .name = "M25P128",
11094 .bustype = BUS_SPI,
11095 .manufacture_id = ST_ID,
11096 .model_id = ST_M25P128,
11097 .total_size = 16384,
11098 .page_size = 256,
11099 .feature_bits = FEATURE_WRSR_WREN,
11100 .tested = TEST_OK_PREW,
11101 .probe = probe_spi_rdid,
11102 .probe_timing = TIMING_ZERO,
11103 .block_erasers =
11104 {
11105 {
11106 .eraseblocks = { {256 * 1024, 64} },
11107 .block_erase = spi_block_erase_d8,
11108 }, {
11109 .eraseblocks = { {16 * 1024 * 1024, 1} },
11110 .block_erase = spi_block_erase_c7,
11111 }
11112 },
11113 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11114 .unlock = spi_disable_blockprotect_bp3_srwd,
11115 .write = spi_chip_write_256,
11116 .read = spi_chip_read,
11117 .voltage = {2700, 3600},
11118 },
11119
11120 {
11121 .vendor = "Micron/Numonyx/ST",
11122 .name = "M25P16",
11123 .bustype = BUS_SPI,
11124 .manufacture_id = ST_ID,
11125 .model_id = ST_M25P16,
11126 .total_size = 2048,
11127 .page_size = 256,
11128 .feature_bits = FEATURE_WRSR_WREN,
11129 .tested = TEST_OK_PREW,
11130 .probe = probe_spi_rdid,
11131 .probe_timing = TIMING_ZERO,
11132 .block_erasers =
11133 {
11134 {
11135 .eraseblocks = { {64 * 1024, 32} },
11136 .block_erase = spi_block_erase_d8,
11137 }, {
11138 .eraseblocks = { {2 * 1024 * 1024, 1} },
11139 .block_erase = spi_block_erase_c7,
11140 }
11141 },
11142 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11143 .unlock = spi_disable_blockprotect_bp3_srwd,
11144 .write = spi_chip_write_256,
11145 .read = spi_chip_read,
11146 .voltage = {2700, 3600},
11147 },
11148
11149 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011150 .vendor = "Micron/Numonyx/ST", /* Numonyx */
11151 .name = "M25P20",
11152 .bustype = BUS_SPI,
11153 .manufacture_id = ST_ID,
11154 .model_id = ST_M25P20,
11155 .total_size = 256,
11156 .page_size = 256,
11157 .feature_bits = FEATURE_WRSR_WREN,
11158 .tested = TEST_UNTESTED,
11159 .probe = probe_spi_rdid,
11160 .probe_timing = TIMING_ZERO,
11161 .block_erasers =
11162 {
11163 {
11164 .eraseblocks = { {64 * 1024, 4} },
11165 .block_erase = spi_block_erase_d8,
11166 }, {
11167 .eraseblocks = { {256 * 1024, 1} },
11168 .block_erase = spi_block_erase_c7,
11169 }
11170 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011171 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011172 .unlock = spi_disable_blockprotect,
11173 .write = spi_chip_write_256,
11174 .read = spi_chip_read, /* Fast read (0x0B) supported */
11175 .voltage = {2700, 3600},
11176 },
11177
11178 {
11179 .vendor = "Micron/Numonyx/ST",
11180 .name = "M25P20-old",
11181 .bustype = BUS_SPI,
11182 .manufacture_id = 0, /* Not used. */
11183 .model_id = ST_M25P20_RES,
11184 .total_size = 256,
11185 .page_size = 256,
11186 .feature_bits = FEATURE_WRSR_WREN,
11187 .tested = TEST_OK_PREW,
11188 .probe = probe_spi_res1,
11189 .probe_timing = TIMING_ZERO,
11190 .block_erasers =
11191 {
11192 {
11193 .eraseblocks = { {64 * 1024, 4} },
11194 .block_erase = spi_block_erase_d8,
11195 }, {
11196 .eraseblocks = { {256 * 1024, 1} },
11197 .block_erase = spi_block_erase_c7,
11198 }
11199 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011200 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011201 .unlock = spi_disable_blockprotect,
11202 .write = spi_chip_write_256,
11203 .read = spi_chip_read, /* Fast read (0x0B) supported */
11204 .voltage = {2700, 3600},
11205 },
11206
11207 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011208 .vendor = "Micron/Numonyx/ST",
11209 .name = "M25P32",
11210 .bustype = BUS_SPI,
11211 .manufacture_id = ST_ID,
11212 .model_id = ST_M25P32,
11213 .total_size = 4096,
11214 .page_size = 256,
11215 .feature_bits = FEATURE_WRSR_WREN,
11216 .tested = TEST_OK_PREW,
11217 .probe = probe_spi_rdid,
11218 .probe_timing = TIMING_ZERO,
11219 .block_erasers =
11220 {
11221 {
11222 .eraseblocks = { {64 * 1024, 64} },
11223 .block_erase = spi_block_erase_d8,
11224 }, {
11225 .eraseblocks = { {4 * 1024 * 1024, 1} },
11226 .block_erase = spi_block_erase_c7,
11227 }
11228 },
11229 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11230 .unlock = spi_disable_blockprotect_bp3_srwd,
11231 .write = spi_chip_write_256,
11232 .read = spi_chip_read,
11233 .voltage = {2700, 3600},
11234 },
11235
11236 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011237 .vendor = "Micron/Numonyx/ST", /* Numonyx */
11238 .name = "M25P40",
11239 .bustype = BUS_SPI,
11240 .manufacture_id = ST_ID,
11241 .model_id = ST_M25P40,
11242 .total_size = 512,
11243 .page_size = 256,
11244 .feature_bits = FEATURE_WRSR_WREN,
11245 .tested = TEST_OK_PREW,
11246 .probe = probe_spi_rdid,
11247 .probe_timing = TIMING_ZERO,
11248 .block_erasers =
11249 {
11250 {
11251 .eraseblocks = { {64 * 1024, 8} },
11252 .block_erase = spi_block_erase_d8,
11253 }, {
11254 .eraseblocks = { {512 * 1024, 1} },
11255 .block_erase = spi_block_erase_c7,
11256 }
11257 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011258 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011259 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011260 .write = spi_chip_write_256,
11261 .read = spi_chip_read,
11262 .voltage = {2700, 3600},
11263 },
11264
11265 {
11266 .vendor = "Micron/Numonyx/ST",
11267 .name = "M25P40-old",
11268 .bustype = BUS_SPI,
11269 .manufacture_id = 0, /* Not used. */
11270 .model_id = ST_M25P40_RES,
11271 .total_size = 512,
11272 .page_size = 256,
11273 .feature_bits = FEATURE_WRSR_WREN,
11274 .tested = TEST_UNTESTED,
11275 .probe = probe_spi_res1,
11276 .probe_timing = TIMING_ZERO,
11277 .block_erasers =
11278 {
11279 {
11280 .eraseblocks = { {64 * 1024, 8} },
11281 .block_erase = spi_block_erase_d8,
11282 }, {
11283 .eraseblocks = { {512 * 1024, 1} },
11284 .block_erase = spi_block_erase_c7,
11285 }
11286 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011287 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011288 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011289 .write = spi_chip_write_256,
11290 .read = spi_chip_read,
11291 },
11292
11293 {
11294 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011295 .name = "M25P64",
11296 .bustype = BUS_SPI,
11297 .manufacture_id = ST_ID,
11298 .model_id = ST_M25P64,
11299 .total_size = 8192,
11300 .page_size = 256,
11301 .feature_bits = FEATURE_WRSR_WREN,
11302 .tested = TEST_OK_PREW,
11303 .probe = probe_spi_rdid,
11304 .probe_timing = TIMING_ZERO,
11305 .block_erasers =
11306 {
11307 {
11308 .eraseblocks = { {64 * 1024, 128} },
11309 .block_erase = spi_block_erase_d8,
11310 }, {
11311 .eraseblocks = { {8 * 1024 * 1024, 1} },
11312 .block_erase = spi_block_erase_c7,
11313 }
11314 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011315 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011316 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011317 .write = spi_chip_write_256,
11318 .read = spi_chip_read,
11319 .voltage = {2700, 3600},
11320 },
11321
11322 {
11323 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011324 .name = "M25P80",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011325 .bustype = BUS_SPI,
11326 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011327 .model_id = ST_M25P80,
11328 .total_size = 1024,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011329 .page_size = 256,
11330 .feature_bits = FEATURE_WRSR_WREN,
11331 .tested = TEST_OK_PREW,
11332 .probe = probe_spi_rdid,
11333 .probe_timing = TIMING_ZERO,
11334 .block_erasers =
11335 {
11336 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011337 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011338 .block_erase = spi_block_erase_d8,
11339 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011340 .eraseblocks = { {1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011341 .block_erase = spi_block_erase_c7,
11342 }
11343 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011344 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011345 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011346 .write = spi_chip_write_256,
11347 .read = spi_chip_read,
11348 .voltage = {2700, 3600},
11349 },
11350
11351 {
11352 .vendor = "Micron/Numonyx/ST",
11353 .name = "M25PE10",
11354 .bustype = BUS_SPI,
11355 .manufacture_id = ST_ID,
11356 .model_id = ST_M25PE10,
11357 .total_size = 128,
11358 .page_size = 256,
11359 .feature_bits = FEATURE_WRSR_WREN,
11360 .tested = TEST_UNTESTED,
11361 .probe = probe_spi_rdid,
11362 .probe_timing = TIMING_ZERO,
11363 .block_erasers =
11364 {
11365 {
11366 .eraseblocks = { {4 * 1024, 32} },
11367 .block_erase = spi_block_erase_20,
11368 }, {
11369 .eraseblocks = { {64 * 1024, 2} },
11370 .block_erase = spi_block_erase_d8,
11371 }, {
11372 .eraseblocks = { {128 * 1024, 1} },
11373 .block_erase = spi_block_erase_c7,
11374 }
11375 },
11376 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11377 .unlock = spi_disable_blockprotect,
11378 .write = spi_chip_write_256,
11379 .read = spi_chip_read,
11380 .voltage = {2700, 3600},
11381 },
11382
11383 {
11384 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011385 .name = "M25PE16",
11386 .bustype = BUS_SPI,
11387 .manufacture_id = ST_ID,
11388 .model_id = ST_M25PE16,
11389 .total_size = 2048,
11390 .page_size = 256,
11391 .feature_bits = FEATURE_WRSR_WREN,
11392 .tested = TEST_UNTESTED,
11393 .probe = probe_spi_rdid,
11394 .probe_timing = TIMING_ZERO,
11395 .block_erasers =
11396 {
11397 {
11398 .eraseblocks = { {4 * 1024, 512} },
11399 .block_erase = spi_block_erase_20,
11400 }, {
11401 .eraseblocks = { {64 * 1024, 32} },
11402 .block_erase = spi_block_erase_d8,
11403 }, {
11404 .eraseblocks = { {2 * 1024 * 1024, 1} },
11405 .block_erase = spi_block_erase_c7,
11406 }
11407 },
11408 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11409 .unlock = spi_disable_blockprotect,
11410 .write = spi_chip_write_256,
11411 .read = spi_chip_read,
11412 .voltage = {2700, 3600},
11413 },
11414
11415 {
11416 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011417 .name = "M25PE20",
11418 .bustype = BUS_SPI,
11419 .manufacture_id = ST_ID,
11420 .model_id = ST_M25PE20,
11421 .total_size = 256,
11422 .page_size = 256,
11423 .feature_bits = FEATURE_WRSR_WREN,
11424 .tested = TEST_UNTESTED,
11425 .probe = probe_spi_rdid,
11426 .probe_timing = TIMING_ZERO,
11427 .block_erasers =
11428 {
11429 {
11430 .eraseblocks = { {4 * 1024, 64} },
11431 .block_erase = spi_block_erase_20,
11432 }, {
11433 .eraseblocks = { {64 * 1024, 4} },
11434 .block_erase = spi_block_erase_d8,
11435 }, {
11436 .eraseblocks = { {256 * 1024, 1} },
11437 .block_erase = spi_block_erase_c7,
11438 }
11439 },
11440 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11441 .unlock = spi_disable_blockprotect,
11442 .write = spi_chip_write_256,
11443 .read = spi_chip_read,
11444 .voltage = {2700, 3600},
11445 },
11446
11447 {
11448 .vendor = "Micron/Numonyx/ST",
11449 .name = "M25PE40",
11450 .bustype = BUS_SPI,
11451 .manufacture_id = ST_ID,
11452 .model_id = ST_M25PE40,
11453 .total_size = 512,
11454 .page_size = 256,
11455 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011456 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011457 .probe = probe_spi_rdid,
11458 .probe_timing = TIMING_ZERO,
11459 .block_erasers =
11460 {
11461 {
11462 .eraseblocks = { {4 * 1024, 128} },
11463 .block_erase = spi_block_erase_20,
11464 }, {
11465 .eraseblocks = { {64 * 1024, 8} },
11466 .block_erase = spi_block_erase_d8,
11467 }, {
11468 .eraseblocks = { {512 * 1024, 1} },
11469 .block_erase = spi_block_erase_c7,
11470 }
11471 },
11472 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11473 .unlock = spi_disable_blockprotect,
11474 .write = spi_chip_write_256,
11475 .read = spi_chip_read,
11476 .voltage = {2700, 3600},
11477 },
11478
11479 {
11480 .vendor = "Micron/Numonyx/ST",
11481 .name = "M25PE80",
11482 .bustype = BUS_SPI,
11483 .manufacture_id = ST_ID,
11484 .model_id = ST_M25PE80,
11485 .total_size = 1024,
11486 .page_size = 256,
11487 .feature_bits = FEATURE_WRSR_WREN,
11488 .tested = TEST_OK_PREW,
11489 .probe = probe_spi_rdid,
11490 .probe_timing = TIMING_ZERO,
11491 .block_erasers =
11492 {
11493 {
11494 .eraseblocks = { {4 * 1024, 256} },
11495 .block_erase = spi_block_erase_20,
11496 }, {
11497 .eraseblocks = { {64 * 1024, 16} },
11498 .block_erase = spi_block_erase_d8,
11499 }, {
11500 .eraseblocks = { {1024 * 1024, 1} },
11501 .block_erase = spi_block_erase_c7,
11502 }
11503 },
11504 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11505 .unlock = spi_disable_blockprotect,
11506 .write = spi_chip_write_256,
11507 .read = spi_chip_read,
11508 .voltage = {2700, 3600},
11509 },
11510
11511 {
11512 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011513 .name = "M25PX16",
11514 .bustype = BUS_SPI,
11515 .manufacture_id = ST_ID,
11516 .model_id = ST_M25PX16,
11517 .total_size = 2048,
11518 .page_size = 256,
11519 /* OTP: 64B total; read 0x4B; write 0x42 */
11520 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11521 .tested = TEST_OK_PREW,
11522 .probe = probe_spi_rdid,
11523 .probe_timing = TIMING_ZERO,
11524 .block_erasers =
11525 {
11526 {
11527 .eraseblocks = { { 4 * 1024, 512 } },
11528 .block_erase = spi_block_erase_20,
11529 }, {
11530 .eraseblocks = { {64 * 1024, 32} },
11531 .block_erase = spi_block_erase_d8,
11532 }, {
11533 .eraseblocks = { {2 * 1024 * 1024, 1} },
11534 .block_erase = spi_block_erase_c7,
11535 }
11536 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011537 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011538 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11539 .write = spi_chip_write_256,
11540 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011541 .voltage = {2300, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011542 },
11543
11544 {
11545 .vendor = "Micron/Numonyx/ST",
11546 .name = "M25PX32",
11547 .bustype = BUS_SPI,
11548 .manufacture_id = ST_ID,
11549 .model_id = ST_M25PX32,
11550 .total_size = 4096,
11551 .page_size = 256,
11552 /* OTP: 64B total; read 0x4B; write 0x42 */
11553 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11554 .tested = TEST_OK_PRE,
11555 .probe = probe_spi_rdid,
11556 .probe_timing = TIMING_ZERO,
11557 .block_erasers =
11558 {
11559 {
11560 .eraseblocks = { { 4 * 1024, 1024 } },
11561 .block_erase = spi_block_erase_20,
11562 }, {
11563 .eraseblocks = { {64 * 1024, 64} },
11564 .block_erase = spi_block_erase_d8,
11565 }, {
11566 .eraseblocks = { {4 * 1024 * 1024, 1} },
11567 .block_erase = spi_block_erase_c7,
11568 }
11569 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011570 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011571 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11572 .write = spi_chip_write_256,
11573 .read = spi_chip_read,
11574 .voltage = {2700, 3600},
11575 },
11576
11577 {
11578 .vendor = "Micron/Numonyx/ST",
11579 .name = "M25PX64",
11580 .bustype = BUS_SPI,
11581 .manufacture_id = ST_ID,
11582 .model_id = ST_M25PX64,
11583 .total_size = 8192,
11584 .page_size = 256,
11585 /* OTP: 64B total; read 0x4B; write 0x42 */
11586 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011587 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011588 .probe = probe_spi_rdid,
11589 .probe_timing = TIMING_ZERO,
11590 .block_erasers =
11591 {
11592 {
11593 .eraseblocks = { { 4 * 1024, 2048 } },
11594 .block_erase = spi_block_erase_20,
11595 }, {
11596 .eraseblocks = { {64 * 1024, 128} },
11597 .block_erase = spi_block_erase_d8,
11598 }, {
11599 .eraseblocks = { {8 * 1024 * 1024, 1} },
11600 .block_erase = spi_block_erase_c7,
11601 }
11602 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011603 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011604 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11605 .write = spi_chip_write_256,
11606 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011607 .voltage = {2700, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011608 },
11609
11610 {
11611 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011612 .name = "M25PX80",
11613 .bustype = BUS_SPI,
11614 .manufacture_id = ST_ID,
11615 .model_id = ST_M25PX80,
11616 .total_size = 1024,
11617 .page_size = 256,
11618 /* OTP: 64B total; read 0x4B, write 0x42 */
11619 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11620 .tested = TEST_OK_PREW,
11621 .probe = probe_spi_rdid,
11622 .probe_timing = TIMING_ZERO,
11623 .block_erasers =
11624 {
11625 {
11626 .eraseblocks = { { 4 * 1024, 256 } },
11627 .block_erase = spi_block_erase_20,
11628 }, {
11629 .eraseblocks = { {64 * 1024, 16} },
11630 .block_erase = spi_block_erase_d8,
11631 }, {
11632 .eraseblocks = { {1024 * 1024, 1} },
11633 .block_erase = spi_block_erase_c7,
11634 }
11635 },
11636 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
11637 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11638 .write = spi_chip_write_256,
11639 .read = spi_chip_read,
11640 .voltage = {2700, 3600},
11641 },
11642
11643 {
11644 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011645 .name = "M45PE10",
11646 .bustype = BUS_SPI,
11647 .manufacture_id = ST_ID,
11648 .model_id = ST_M45PE10,
11649 .total_size = 128,
11650 .page_size = 256,
11651 .tested = TEST_UNTESTED,
11652 .probe = probe_spi_rdid,
11653 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011654 .block_erasers =
11655 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011656 {
11657 .eraseblocks = { {256, 512} },
11658 .block_erase = spi_block_erase_db,
11659 }, {
11660 .eraseblocks = { {64 * 1024, 2} },
11661 .block_erase = spi_block_erase_d8,
11662 }
11663 },
11664 .printlock = spi_prettyprint_status_register_default_welwip,
11665 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11666 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11667 .read = spi_chip_read, /* Fast read (0x0B) supported */
11668 .voltage = {2700, 3600},
11669 },
11670
11671 {
11672 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011673 .name = "M45PE16",
11674 .bustype = BUS_SPI,
11675 .manufacture_id = ST_ID,
11676 .model_id = ST_M45PE16,
11677 .total_size = 2048,
11678 .page_size = 256,
11679 .tested = TEST_UNTESTED,
11680 .probe = probe_spi_rdid,
11681 .probe_timing = TIMING_ZERO,
11682 .block_erasers =
11683 {
11684 {
11685 .eraseblocks = { {256, 8192} },
11686 .block_erase = spi_block_erase_db,
11687 }, {
11688 .eraseblocks = { {64 * 1024, 32} },
11689 .block_erase = spi_block_erase_d8,
11690 }
11691 },
11692 .printlock = spi_prettyprint_status_register_default_welwip,
11693 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11694 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11695 .read = spi_chip_read, /* Fast read (0x0B) supported */
11696 .voltage = {2700, 3600},
11697 },
11698
11699 {
11700 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011701 .name = "M45PE20",
11702 .bustype = BUS_SPI,
11703 .manufacture_id = ST_ID,
11704 .model_id = ST_M45PE20,
11705 .total_size = 256,
11706 .page_size = 256,
11707 .tested = TEST_UNTESTED,
11708 .probe = probe_spi_rdid,
11709 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011710 .block_erasers =
11711 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011712 {
11713 .eraseblocks = { {256, 1024} },
11714 .block_erase = spi_block_erase_db,
11715 }, {
11716 .eraseblocks = { {64 * 1024, 4} },
11717 .block_erase = spi_block_erase_d8,
11718 }
11719 },
11720 .printlock = spi_prettyprint_status_register_default_welwip,
11721 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11722 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11723 .read = spi_chip_read, /* Fast read (0x0B) supported */
11724 .voltage = {2700, 3600},
11725 },
11726
11727 {
11728 .vendor = "Micron/Numonyx/ST",
11729 .name = "M45PE40",
11730 .bustype = BUS_SPI,
11731 .manufacture_id = ST_ID,
11732 .model_id = ST_M45PE40,
11733 .total_size = 512,
11734 .page_size = 256,
11735 .tested = TEST_UNTESTED,
11736 .probe = probe_spi_rdid,
11737 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011738 .block_erasers =
11739 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011740 {
11741 .eraseblocks = { {256, 2048} },
11742 .block_erase = spi_block_erase_db,
11743 }, {
11744 .eraseblocks = { {64 * 1024, 8} },
11745 .block_erase = spi_block_erase_d8,
11746 }
11747 },
11748 .printlock = spi_prettyprint_status_register_default_welwip,
11749 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
Stefan Tauner23e10b82016-01-23 16:16:49 +000011750 .write = spi_chip_write_256, /* Page write supported (similar to PP but allows 0->1 changes) */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011751 .read = spi_chip_read, /* Fast read (0x0B) supported */
11752 .voltage = {2700, 3600},
11753 },
11754
11755 {
11756 .vendor = "Micron/Numonyx/ST",
11757 .name = "M45PE80",
11758 .bustype = BUS_SPI,
11759 .manufacture_id = ST_ID,
11760 .model_id = ST_M45PE80,
11761 .total_size = 1024,
11762 .page_size = 256,
11763 .tested = TEST_UNTESTED,
11764 .probe = probe_spi_rdid,
11765 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011766 .block_erasers =
11767 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011768 {
11769 .eraseblocks = { {256, 4096} },
11770 .block_erase = spi_block_erase_db,
11771 }, {
11772 .eraseblocks = { {64 * 1024, 16} },
11773 .block_erase = spi_block_erase_d8,
11774 }
11775 },
11776 .printlock = spi_prettyprint_status_register_default_welwip,
11777 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11778 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11779 .read = spi_chip_read, /* Fast read (0x0B) supported */
11780 .voltage = {2700, 3600},
11781 },
11782
11783 {
11784 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070011785 .name = "N25Q00A..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
11786 .bustype = BUS_SPI,
11787 .manufacture_id = ST_ID,
11788 .model_id = ST_N25Q00A__1G,
11789 .total_size = 131072,
11790 .page_size = 256,
11791 /* supports SFDP */
11792 /* OTP: 64B total; read 0x4B, write 0x42 */
11793 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
11794 .tested = TEST_UNTESTED,
11795 .probe = probe_spi_rdid,
11796 .probe_timing = TIMING_ZERO,
11797 .block_erasers =
11798 {
11799 {
11800 .eraseblocks = { {4 * 1024, 32768} },
11801 .block_erase = spi_block_erase_21,
11802 }, {
11803 .eraseblocks = { {4 * 1024, 32768} },
11804 .block_erase = spi_block_erase_20,
11805 }, {
11806 .eraseblocks = { {64 * 1024, 2048} },
11807 .block_erase = spi_block_erase_dc,
11808 }, {
11809 .eraseblocks = { {64 * 1024, 2048} },
11810 .block_erase = spi_block_erase_d8,
11811 }, {
11812 .eraseblocks = { {32768 * 1024, 4} },
11813 .block_erase = spi_block_erase_c4,
11814 }
11815 },
11816 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11817 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11818 .write = spi_chip_write_256, /* Multi I/O supported */
11819 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11820 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020011821 .prepare_access = spi_prepare_io,
11822 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070011823 },
11824
11825 {
11826 .vendor = "Micron/Numonyx/ST",
11827 .name = "N25Q00A..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
11828 .bustype = BUS_SPI,
11829 .manufacture_id = ST_ID,
11830 .model_id = ST_N25Q00A__3G,
11831 .total_size = 131072,
11832 .page_size = 256,
11833 /* supports SFDP */
11834 /* OTP: 64B total; read 0x4B, write 0x42 */
11835 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
11836 .tested = TEST_UNTESTED,
11837 .probe = probe_spi_rdid,
11838 .probe_timing = TIMING_ZERO,
11839 .block_erasers =
11840 {
11841 {
11842 .eraseblocks = { {4 * 1024, 32768} },
11843 .block_erase = spi_block_erase_21,
11844 }, {
11845 .eraseblocks = { {4 * 1024, 32768} },
11846 .block_erase = spi_block_erase_20,
11847 }, {
11848 .eraseblocks = { {64 * 1024, 2048} },
11849 .block_erase = spi_block_erase_dc,
11850 }, {
11851 .eraseblocks = { {64 * 1024, 2048} },
11852 .block_erase = spi_block_erase_d8,
11853 }, {
11854 .eraseblocks = { {32768 * 1024, 4} },
11855 .block_erase = spi_block_erase_c4,
11856 }
11857 },
11858 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11859 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11860 .write = spi_chip_write_256, /* Multi I/O supported */
11861 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11862 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011863 .prepare_access = spi_prepare_io,
11864 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070011865 },
11866
11867 {
11868 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011869 .name = "N25Q016",
11870 .bustype = BUS_SPI,
11871 .manufacture_id = ST_ID,
11872 .model_id = ST_N25Q016__1E,
11873 .total_size = 2048,
11874 .page_size = 256,
11875 /* supports SFDP */
11876 /* OTP: 64B total; read 0x4B, write 0x42 */
11877 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11878 .tested = TEST_UNTESTED,
11879 .probe = probe_spi_rdid,
11880 .probe_timing = TIMING_ZERO,
11881 .block_erasers =
11882 {
11883 {
11884 .eraseblocks = { {4 * 1024, 512} },
11885 .block_erase = spi_block_erase_20,
11886 }, {
11887 .eraseblocks = { {32 * 1024, 64} },
11888 .block_erase = spi_block_erase_52,
11889 }, {
11890 .eraseblocks = { {64 * 1024, 32} },
11891 .block_erase = spi_block_erase_d8,
11892 }, {
11893 .eraseblocks = { {2 * 1024 * 1024, 1} },
11894 .block_erase = spi_block_erase_c7,
11895 }
11896 },
11897 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11898 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11899 .write = spi_chip_write_256, /* Multi I/O supported */
11900 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11901 .voltage = {1700, 2000},
11902 },
11903
11904 {
11905 .vendor = "Micron/Numonyx/ST",
11906 .name = "N25Q032..1E",
11907 .bustype = BUS_SPI,
11908 .manufacture_id = ST_ID,
11909 .model_id = ST_N25Q032__1E,
11910 .total_size = 4096,
11911 .page_size = 256,
11912 /* supports SFDP */
11913 /* OTP: 64B total; read 0x4B, write 0x42 */
11914 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11915 .tested = TEST_UNTESTED,
11916 .probe = probe_spi_rdid,
11917 .probe_timing = TIMING_ZERO,
11918 .block_erasers =
11919 {
11920 {
11921 .eraseblocks = { {4 * 1024, 1024} },
11922 .block_erase = spi_block_erase_20,
11923 }, {
11924 .eraseblocks = { {64 * 1024, 64} },
11925 .block_erase = spi_block_erase_d8,
11926 }, {
11927 .eraseblocks = { {4 * 1024 * 1024, 1} },
11928 .block_erase = spi_block_erase_c7,
11929 }
11930 },
11931 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11932 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11933 .write = spi_chip_write_256, /* Multi I/O supported */
11934 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11935 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011936 .reg_bits =
11937 {
11938 /*
11939 * There is also a volatile lock register per 64KiB sector, which is not
11940 * mutually exclusive with BP-based protection.
11941 */
11942 .srp = {STATUS1, 7, RW},
11943 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
11944 .tb = {STATUS1, 5, RW},
11945 },
Nico Huberaabb3e02023-01-13 00:22:30 +010011946 .wp_write_cfg = spi_wp_write_cfg,
11947 .wp_read_cfg = spi_wp_read_cfg,
11948 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011949 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011950 },
11951
11952 {
11953 .vendor = "Micron/Numonyx/ST",
11954 .name = "N25Q032..3E",
11955 .bustype = BUS_SPI,
11956 .manufacture_id = ST_ID,
11957 .model_id = ST_N25Q032__3E,
11958 .total_size = 4096,
11959 .page_size = 256,
11960 /* supports SFDP */
11961 /* OTP: 64B total; read 0x4B, write 0x42 */
11962 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11963 .tested = TEST_OK_PREW,
11964 .probe = probe_spi_rdid,
11965 .probe_timing = TIMING_ZERO,
11966 .block_erasers =
11967 {
11968 {
11969 .eraseblocks = { {4 * 1024, 1024} },
11970 .block_erase = spi_block_erase_20,
11971 }, {
11972 .eraseblocks = { {64 * 1024, 64} },
11973 .block_erase = spi_block_erase_d8,
11974 }, {
11975 .eraseblocks = { {4 * 1024 * 1024, 1} },
11976 .block_erase = spi_block_erase_c7,
11977 }
11978 },
11979 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11980 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11981 .write = spi_chip_write_256, /* Multi I/O supported */
11982 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11983 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011984 .reg_bits =
11985 {
11986 /*
11987 * There is also a volatile lock register per 64KiB sector, which is not
11988 * mutually exclusive with BP-based protection.
11989 */
11990 .srp = {STATUS1, 7, RW},
11991 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
11992 .tb = {STATUS1, 5, RW},
11993 },
Nico Huberaabb3e02023-01-13 00:22:30 +010011994 .wp_write_cfg = spi_wp_write_cfg,
11995 .wp_read_cfg = spi_wp_read_cfg,
11996 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011997 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011998 },
11999
12000 {
12001 .vendor = "Micron/Numonyx/ST",
12002 .name = "N25Q064..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
12003 .bustype = BUS_SPI,
12004 .manufacture_id = ST_ID,
12005 .model_id = ST_N25Q064__1E,
12006 .total_size = 8192,
12007 .page_size = 256,
12008 /* supports SFDP */
12009 /* OTP: 64B total; read 0x4B, write 0x42 */
12010 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000012011 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012012 .probe = probe_spi_rdid,
12013 .probe_timing = TIMING_ZERO,
12014 .block_erasers =
12015 {
12016 {
12017 .eraseblocks = { {4 * 1024, 2048 } },
12018 .block_erase = spi_block_erase_20,
12019 }, {
12020 .eraseblocks = { {64 * 1024, 128} },
12021 .block_erase = spi_block_erase_d8,
12022 }, {
12023 .eraseblocks = { {8 * 1024 * 1024, 1} },
12024 .block_erase = spi_block_erase_c7,
12025 }
12026 },
12027 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12028 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12029 .write = spi_chip_write_256, /* Multi I/O supported */
12030 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12031 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012032 .reg_bits =
12033 {
12034 /*
12035 * There is also a volatile lock register per 64KiB sector, which is not
12036 * mutually exclusive with BP-based protection.
12037 */
12038 .srp = {STATUS1, 7, RW},
12039 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12040 .tb = {STATUS1, 5, RW},
12041 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012042 .wp_write_cfg = spi_wp_write_cfg,
12043 .wp_read_cfg = spi_wp_read_cfg,
12044 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012045 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012046 },
12047
12048 {
12049 .vendor = "Micron/Numonyx/ST",
12050 .name = "N25Q064..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12051 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012052 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012053 .model_id = ST_N25Q064__3E,
12054 .total_size = 8192,
12055 .page_size = 256,
12056 /* supports SFDP */
12057 /* OTP: 64B total; read 0x4B, write 0x42 */
12058 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12059 .tested = TEST_OK_PREW,
12060 .probe = probe_spi_rdid,
12061 .probe_timing = TIMING_ZERO,
12062 .block_erasers =
12063 {
12064 {
12065 .eraseblocks = { {4 * 1024, 2048 } },
12066 .block_erase = spi_block_erase_20,
12067 }, {
12068 .eraseblocks = { {64 * 1024, 128} },
12069 .block_erase = spi_block_erase_d8,
12070 }, {
12071 .eraseblocks = { {8 * 1024 * 1024, 1} },
12072 .block_erase = spi_block_erase_c7,
12073 }
12074 },
12075 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12076 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12077 .write = spi_chip_write_256, /* Multi I/O supported */
12078 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12079 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012080 .reg_bits =
12081 {
12082 /*
12083 * There is also a volatile lock register per 64KiB sector, which is not
12084 * mutually exclusive with BP-based protection.
12085 */
12086 .srp = {STATUS1, 7, RW},
12087 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12088 .tb = {STATUS1, 5, RW},
12089 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012090 .wp_write_cfg = spi_wp_write_cfg,
12091 .wp_read_cfg = spi_wp_read_cfg,
12092 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012093 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012094 },
12095
12096 {
12097 .vendor = "Micron/Numonyx/ST",
12098 .name = "N25Q128..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
12099 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012100 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012101 .model_id = ST_N25Q128__1E,
12102 .total_size = 16384,
12103 .page_size = 256,
12104 /* supports SFDP */
12105 /* OTP: 64B total; read 0x4B, write 0x42 */
12106 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner23e10b82016-01-23 16:16:49 +000012107 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012108 .probe = probe_spi_rdid,
12109 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012110 .block_erasers =
12111 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012112 {
12113 .eraseblocks = { {4 * 1024, 4096 } },
12114 .block_erase = spi_block_erase_20,
12115 }, {
12116 .eraseblocks = { {64 * 1024, 256} },
12117 .block_erase = spi_block_erase_d8,
12118 }, {
12119 .eraseblocks = { {16384 * 1024, 1} },
12120 .block_erase = spi_block_erase_c7,
12121 }
12122 },
12123 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12124 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12125 .write = spi_chip_write_256, /* Multi I/O supported */
12126 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12127 .voltage = {1700, 2000},
12128 },
12129
12130 {
12131 .vendor = "Micron/Numonyx/ST",
12132 .name = "N25Q128..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12133 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012134 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012135 .model_id = ST_N25Q128__3E,
12136 .total_size = 16384,
12137 .page_size = 256,
12138 /* supports SFDP */
12139 /* OTP: 64B total; read 0x4B, write 0x42 */
12140 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12141 .tested = TEST_OK_PREW,
12142 .probe = probe_spi_rdid,
12143 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012144 .block_erasers =
12145 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012146 {
12147 .eraseblocks = { {4 * 1024, 4096 } },
12148 .block_erase = spi_block_erase_20,
12149 }, {
12150 .eraseblocks = { {64 * 1024, 256} },
12151 .block_erase = spi_block_erase_d8,
12152 }, {
12153 .eraseblocks = { {16384 * 1024, 1} },
12154 .block_erase = spi_block_erase_c7,
12155 }
12156 },
12157 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12158 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12159 .write = spi_chip_write_256, /* Multi I/O supported */
12160 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12161 .voltage = {2700, 3600},
12162 },
12163
12164 {
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012165 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012166 .name = "N25Q256..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
12167 .bustype = BUS_SPI,
12168 .manufacture_id = ST_ID,
12169 .model_id = ST_N25Q256__1E,
12170 .total_size = 32768,
12171 .page_size = 256,
12172 /* supports SFDP */
12173 /* OTP: 64B total; read 0x4B, write 0x42 */
12174 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12175 .tested = TEST_UNTESTED,
12176 .probe = probe_spi_rdid,
12177 .probe_timing = TIMING_ZERO,
12178 .block_erasers =
12179 {
12180 {
12181 .eraseblocks = { {4 * 1024, 8192} },
12182 .block_erase = spi_block_erase_21,
12183 }, {
12184 .eraseblocks = { {4 * 1024, 8192} },
12185 .block_erase = spi_block_erase_20,
12186 }, {
12187 .eraseblocks = { {64 * 1024, 512} },
12188 .block_erase = spi_block_erase_dc,
12189 }, {
12190 .eraseblocks = { {64 * 1024, 512} },
12191 .block_erase = spi_block_erase_d8,
12192 }, {
12193 .eraseblocks = { {32768 * 1024, 1} },
12194 .block_erase = spi_block_erase_c7,
12195 }
12196 },
12197 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12198 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12199 .write = spi_chip_write_256, /* Multi I/O supported */
12200 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12201 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012202 .prepare_access = spi_prepare_io,
12203 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012204 },
12205
12206 {
12207 .vendor = "Micron/Numonyx/ST",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012208 .name = "N25Q256..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12209 .bustype = BUS_SPI,
12210 .manufacture_id = ST_ID,
12211 .model_id = ST_N25Q256__3E,
12212 .total_size = 32768,
12213 .page_size = 256,
12214 /* supports SFDP */
12215 /* OTP: 64B total; read 0x4B, write 0x42 */
12216 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12217 .tested = TEST_UNTESTED,
12218 .probe = probe_spi_rdid,
12219 .probe_timing = TIMING_ZERO,
12220 .block_erasers =
12221 {
12222 {
12223 .eraseblocks = { {4 * 1024, 8192} },
12224 .block_erase = spi_block_erase_21,
12225 }, {
12226 .eraseblocks = { {4 * 1024, 8192} },
12227 .block_erase = spi_block_erase_20,
12228 }, {
12229 .eraseblocks = { {64 * 1024, 512} },
12230 .block_erase = spi_block_erase_dc,
12231 }, {
12232 .eraseblocks = { {64 * 1024, 512} },
12233 .block_erase = spi_block_erase_d8,
12234 }, {
12235 .eraseblocks = { {32768 * 1024, 1} },
12236 .block_erase = spi_block_erase_c7,
12237 }
12238 },
12239 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12240 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12241 .write = spi_chip_write_256, /* Multi I/O supported */
12242 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12243 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012244 .prepare_access = spi_prepare_io,
12245 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012246 },
12247
12248 {
12249 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012250 .name = "N25Q512..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012251 .bustype = BUS_SPI,
12252 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012253 .model_id = ST_N25Q512__1G,
12254 .total_size = 65536,
12255 .page_size = 256,
12256 /* supports SFDP */
12257 /* OTP: 64B total; read 0x4B, write 0x42 */
12258 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12259 .tested = TEST_UNTESTED,
12260 .probe = probe_spi_rdid,
12261 .probe_timing = TIMING_ZERO,
12262 .block_erasers =
12263 {
12264 {
12265 .eraseblocks = { {4 * 1024, 16384} },
12266 .block_erase = spi_block_erase_21,
12267 }, {
12268 .eraseblocks = { {4 * 1024, 16384} },
12269 .block_erase = spi_block_erase_20,
12270 }, {
12271 .eraseblocks = { {64 * 1024, 1024} },
12272 .block_erase = spi_block_erase_dc,
12273 }, {
12274 .eraseblocks = { {64 * 1024, 1024} },
12275 .block_erase = spi_block_erase_d8,
12276 }, {
12277 .eraseblocks = { {32768 * 1024, 2} },
12278 .block_erase = spi_block_erase_c4,
12279 }
12280 },
12281 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12282 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12283 .write = spi_chip_write_256, /* Multi I/O supported */
12284 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12285 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012286 .prepare_access = spi_prepare_io,
12287 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012288 },
12289
12290 {
12291 .vendor = "Micron/Numonyx/ST",
12292 .name = "N25Q512..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
12293 .bustype = BUS_SPI,
12294 .manufacture_id = ST_ID,
12295 .model_id = ST_N25Q512__3G,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012296 .total_size = 65536,
12297 .page_size = 256,
12298 /* supports SFDP */
12299 /* OTP: 64B total; read 0x4B, write 0x42 */
12300 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12301 .tested = TEST_OK_PREW,
12302 .probe = probe_spi_rdid,
12303 .probe_timing = TIMING_ZERO,
12304 .block_erasers =
12305 {
12306 {
12307 .eraseblocks = { {4 * 1024, 16384} },
12308 .block_erase = spi_block_erase_21,
12309 }, {
12310 .eraseblocks = { {4 * 1024, 16384} },
12311 .block_erase = spi_block_erase_20,
12312 }, {
12313 .eraseblocks = { {64 * 1024, 1024} },
12314 .block_erase = spi_block_erase_dc,
12315 }, {
12316 .eraseblocks = { {64 * 1024, 1024} },
12317 .block_erase = spi_block_erase_d8,
12318 }, {
Jacob Creedone8e7b0e2019-07-22 12:21:22 -070012319 .eraseblocks = { {32768 * 1024, 2} },
12320 .block_erase = spi_block_erase_c4,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012321 }
12322 },
12323 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12324 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12325 .write = spi_chip_write_256, /* Multi I/O supported */
12326 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12327 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012328 .prepare_access = spi_prepare_io,
12329 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012330 },
12331
12332 {
Ed Swierk199ab392017-07-03 13:33:44 -070012333 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012334 .name = "MT25QL01G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12335 .bustype = BUS_SPI,
12336 .manufacture_id = ST_ID,
12337 .model_id = ST_N25Q00A__3G,
12338 .total_size = 131072,
12339 .page_size = 256,
12340 /* supports SFDP */
12341 /* OTP: 64B total; read 0x4B, write 0x42 */
12342 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12343 .tested = TEST_OK_PREW,
12344 .probe = probe_spi_rdid,
12345 .probe_timing = TIMING_ZERO,
12346 .block_erasers =
12347 {
12348 {
12349 .eraseblocks = { {4 * 1024, 32768} },
12350 .block_erase = spi_block_erase_21,
12351 }, {
12352 .eraseblocks = { {4 * 1024, 32768} },
12353 .block_erase = spi_block_erase_20,
12354 }, {
12355 .eraseblocks = { {32 * 1024, 4096} },
12356 .block_erase = spi_block_erase_5c,
12357 }, {
12358 .eraseblocks = { {32 * 1024, 4096} },
12359 .block_erase = spi_block_erase_52,
12360 }, {
12361 .eraseblocks = { {64 * 1024, 2048} },
12362 .block_erase = spi_block_erase_dc,
12363 }, {
12364 .eraseblocks = { {64 * 1024, 2048} },
12365 .block_erase = spi_block_erase_d8,
12366 }, {
12367 .eraseblocks = { {65536 * 1024, 2} },
12368 .block_erase = spi_block_erase_c4,
12369 }
12370 },
12371 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12372 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12373 .write = spi_chip_write_256, /* Multi I/O supported */
12374 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12375 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012376 .prepare_access = spi_prepare_io,
12377 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012378 },
12379
12380 {
12381 .vendor = "Micron",
12382 .name = "MT25QU01G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12383 .bustype = BUS_SPI,
12384 .manufacture_id = ST_ID,
12385 .model_id = ST_N25Q00A__1G,
12386 .total_size = 131072,
12387 .page_size = 256,
12388 /* supports SFDP */
12389 /* OTP: 64B total; read 0x4B, write 0x42 */
12390 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12391 .tested = TEST_UNTESTED,
12392 .probe = probe_spi_rdid,
12393 .probe_timing = TIMING_ZERO,
12394 .block_erasers =
12395 {
12396 {
12397 .eraseblocks = { {4 * 1024, 32768} },
12398 .block_erase = spi_block_erase_21,
12399 }, {
12400 .eraseblocks = { {4 * 1024, 32768} },
12401 .block_erase = spi_block_erase_20,
12402 }, {
12403 .eraseblocks = { {32 * 1024, 4096} },
12404 .block_erase = spi_block_erase_5c,
12405 }, {
12406 .eraseblocks = { {32 * 1024, 4096} },
12407 .block_erase = spi_block_erase_52,
12408 }, {
12409 .eraseblocks = { {64 * 1024, 2048} },
12410 .block_erase = spi_block_erase_dc,
12411 }, {
12412 .eraseblocks = { {64 * 1024, 2048} },
12413 .block_erase = spi_block_erase_d8,
12414 }, {
12415 .eraseblocks = { {65536 * 1024, 2} },
12416 .block_erase = spi_block_erase_c4,
12417 }
12418 },
12419 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12420 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12421 .write = spi_chip_write_256, /* Multi I/O supported */
12422 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12423 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012424 .prepare_access = spi_prepare_io,
12425 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012426 },
12427
12428 {
12429 .vendor = "Micron",
12430 .name = "MT25QL02G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12431 .bustype = BUS_SPI,
12432 .manufacture_id = ST_ID,
12433 .model_id = ST_MT25QL02G,
12434 .total_size = 262144,
12435 .page_size = 256,
12436 /* supports SFDP */
12437 /* OTP: 64B total; read 0x4B, write 0x42 */
12438 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12439 .tested = TEST_UNTESTED,
12440 .probe = probe_spi_rdid,
12441 .probe_timing = TIMING_ZERO,
12442 .block_erasers =
12443 {
12444 {
12445 .eraseblocks = { {4 * 1024, 65536} },
12446 .block_erase = spi_block_erase_21,
12447 }, {
12448 .eraseblocks = { {4 * 1024, 65536} },
12449 .block_erase = spi_block_erase_20,
12450 }, {
12451 .eraseblocks = { {32 * 1024, 8192} },
12452 .block_erase = spi_block_erase_5c,
12453 }, {
12454 .eraseblocks = { {32 * 1024, 8192} },
12455 .block_erase = spi_block_erase_52,
12456 }, {
12457 .eraseblocks = { {64 * 1024, 4096} },
12458 .block_erase = spi_block_erase_dc,
12459 }, {
12460 .eraseblocks = { {64 * 1024, 4096} },
12461 .block_erase = spi_block_erase_d8,
12462 }, {
12463 .eraseblocks = { {65536 * 1024, 4} },
12464 .block_erase = spi_block_erase_c4,
12465 }
12466 },
12467 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12468 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12469 .write = spi_chip_write_256, /* Multi I/O supported */
12470 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12471 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012472 .prepare_access = spi_prepare_io,
12473 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012474 },
12475
12476 {
12477 .vendor = "Micron",
12478 .name = "MT25QU02G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12479 .bustype = BUS_SPI,
12480 .manufacture_id = ST_ID,
12481 .model_id = ST_MT25QU02G,
12482 .total_size = 262144,
12483 .page_size = 256,
12484 /* supports SFDP */
12485 /* OTP: 64B total; read 0x4B, write 0x42 */
12486 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12487 .tested = TEST_UNTESTED,
12488 .probe = probe_spi_rdid,
12489 .probe_timing = TIMING_ZERO,
12490 .block_erasers =
12491 {
12492 {
12493 .eraseblocks = { {4 * 1024, 65536} },
12494 .block_erase = spi_block_erase_21,
12495 }, {
12496 .eraseblocks = { {4 * 1024, 65536} },
12497 .block_erase = spi_block_erase_20,
12498 }, {
12499 .eraseblocks = { {32 * 1024, 8192} },
12500 .block_erase = spi_block_erase_5c,
12501 }, {
12502 .eraseblocks = { {32 * 1024, 8192} },
12503 .block_erase = spi_block_erase_52,
12504 }, {
12505 .eraseblocks = { {64 * 1024, 4096} },
12506 .block_erase = spi_block_erase_dc,
12507 }, {
12508 .eraseblocks = { {64 * 1024, 4096} },
12509 .block_erase = spi_block_erase_d8,
12510 }, {
12511 .eraseblocks = { {65536 * 1024, 4} },
12512 .block_erase = spi_block_erase_c4,
12513 }
12514 },
12515 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12516 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12517 .write = spi_chip_write_256, /* Multi I/O supported */
12518 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12519 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012520 .prepare_access = spi_prepare_io,
12521 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012522 },
12523
12524 {
12525 .vendor = "Micron",
12526 .name = "MT25QU128", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12527 .bustype = BUS_SPI,
12528 .manufacture_id = ST_ID,
12529 .model_id = ST_N25Q128__1E,
12530 .total_size = 16384,
12531 .page_size = 256,
12532 /* supports SFDP */
12533 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huber48dc0902023-03-05 17:20:55 +010012534 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012535 .tested = TEST_UNTESTED,
12536 .probe = probe_spi_rdid,
12537 .probe_timing = TIMING_ZERO,
12538 .block_erasers =
12539 {
12540 {
12541 .eraseblocks = { {4 * 1024, 4096} },
12542 .block_erase = spi_block_erase_20,
12543 }, {
12544 .eraseblocks = { {32 * 1024, 512} },
12545 .block_erase = spi_block_erase_52,
12546 }, {
12547 .eraseblocks = { {64 * 1024, 256} },
12548 .block_erase = spi_block_erase_d8,
12549 }, {
12550 .eraseblocks = { {16384 * 1024, 1} },
12551 .block_erase = spi_block_erase_c7,
12552 }, {
12553 .eraseblocks = { {16384 * 1024, 1} },
12554 .block_erase = spi_block_erase_60,
12555 }
12556 },
12557 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12558 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12559 .write = spi_chip_write_256, /* Multi I/O supported */
12560 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12561 .voltage = {1700, 2000},
12562 },
12563
12564 {
12565 .vendor = "Micron",
12566 .name = "MT25QL128", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12567 .bustype = BUS_SPI,
12568 .manufacture_id = ST_ID,
12569 .model_id = ST_N25Q128__3E,
12570 .total_size = 16384,
12571 .page_size = 256,
12572 /* supports SFDP */
12573 /* OTP: 64B total; read 0x4B, write 0x42 */
Rick Altherr1e563602022-12-22 10:25:34 -080012574 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12575 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012576 .probe = probe_spi_rdid,
12577 .probe_timing = TIMING_ZERO,
12578 .block_erasers =
12579 {
12580 {
12581 .eraseblocks = { {4 * 1024, 4096} },
12582 .block_erase = spi_block_erase_20,
12583 }, {
12584 .eraseblocks = { {32 * 1024, 512} },
12585 .block_erase = spi_block_erase_52,
12586 }, {
12587 .eraseblocks = { {64 * 1024, 256} },
12588 .block_erase = spi_block_erase_d8,
12589 }, {
12590 .eraseblocks = { {16384 * 1024, 1} },
12591 .block_erase = spi_block_erase_c7,
12592 }, {
12593 .eraseblocks = { {16384 * 1024, 1} },
12594 .block_erase = spi_block_erase_60,
12595 }
12596 },
12597 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12598 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12599 .write = spi_chip_write_256, /* Multi I/O supported */
12600 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12601 .voltage = {2700, 3600},
12602 },
12603
12604 {
12605 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012606 .name = "MT25QL256", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070012607 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012608 .manufacture_id = ST_ID,
Ed Swierk199ab392017-07-03 13:33:44 -070012609 .model_id = ST_N25Q256__3E,
12610 .total_size = 32768,
12611 .page_size = 256,
12612 /* supports SFDP */
12613 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010012614 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Simon Buhrowb7014f92021-02-15 13:16:57 +010012615 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070012616 .probe = probe_spi_rdid,
12617 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012618 .block_erasers =
12619 {
Ed Swierk199ab392017-07-03 13:33:44 -070012620 {
12621 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012622 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070012623 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012624 .eraseblocks = { {4 * 1024, 8192} },
12625 .block_erase = spi_block_erase_20,
12626 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070012627 .eraseblocks = { {32 * 1024, 1024} },
12628 .block_erase = spi_block_erase_5c,
12629 }, {
12630 .eraseblocks = { {32 * 1024, 1024} },
12631 .block_erase = spi_block_erase_52,
12632 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012633 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012634 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070012635 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012636 .eraseblocks = { {64 * 1024, 512} },
12637 .block_erase = spi_block_erase_d8,
12638 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012639 .eraseblocks = { {32768 * 1024, 1} },
12640 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070012641 }, {
12642 .eraseblocks = { {32768 * 1024, 1} },
12643 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070012644 }
12645 },
12646 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12647 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12648 .write = spi_chip_write_256, /* Multi I/O supported */
12649 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12650 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012651 .prepare_access = spi_prepare_io,
12652 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070012653 },
12654
12655 {
12656 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012657 .name = "MT25QU256", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12658 .bustype = BUS_SPI,
12659 .manufacture_id = ST_ID,
12660 .model_id = ST_N25Q256__1E,
12661 .total_size = 32768,
12662 .page_size = 256,
12663 /* supports SFDP */
12664 /* OTP: 64B total; read 0x4B, write 0x42 */
12665 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons59052582022-03-08 15:23:58 +010012666 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012667 .probe = probe_spi_rdid,
12668 .probe_timing = TIMING_ZERO,
12669 .block_erasers =
12670 {
12671 {
12672 .eraseblocks = { {4 * 1024, 8192} },
12673 .block_erase = spi_block_erase_21,
12674 }, {
12675 .eraseblocks = { {4 * 1024, 8192} },
12676 .block_erase = spi_block_erase_20,
12677 }, {
12678 .eraseblocks = { {32 * 1024, 1024} },
12679 .block_erase = spi_block_erase_5c,
12680 }, {
12681 .eraseblocks = { {32 * 1024, 1024} },
12682 .block_erase = spi_block_erase_52,
12683 }, {
12684 .eraseblocks = { {64 * 1024, 512} },
12685 .block_erase = spi_block_erase_dc,
12686 }, {
12687 .eraseblocks = { {64 * 1024, 512} },
12688 .block_erase = spi_block_erase_d8,
12689 }, {
12690 .eraseblocks = { {32768 * 1024, 1} },
12691 .block_erase = spi_block_erase_c7,
12692 }, {
12693 .eraseblocks = { {32768 * 1024, 1} },
12694 .block_erase = spi_block_erase_60,
12695 }
12696 },
12697 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12698 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12699 .write = spi_chip_write_256, /* Multi I/O supported */
12700 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12701 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012702 .prepare_access = spi_prepare_io,
12703 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012704 },
12705
12706 {
12707 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012708 .name = "MT25QL512", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070012709 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012710 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012711 .model_id = ST_N25Q512__3G,
Ed Swierk199ab392017-07-03 13:33:44 -070012712 .total_size = 65536,
12713 .page_size = 256,
12714 /* supports SFDP */
12715 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010012716 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons3ed5a352018-09-30 16:31:09 +020012717 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070012718 .probe = probe_spi_rdid,
12719 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012720 .block_erasers =
12721 {
Ed Swierk199ab392017-07-03 13:33:44 -070012722 {
12723 .eraseblocks = { {4 * 1024, 16384} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012724 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070012725 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012726 .eraseblocks = { {4 * 1024, 16384} },
12727 .block_erase = spi_block_erase_20,
12728 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070012729 .eraseblocks = { {32 * 1024, 2048} },
12730 .block_erase = spi_block_erase_5c,
12731 }, {
12732 .eraseblocks = { {32 * 1024, 2048} },
12733 .block_erase = spi_block_erase_52,
12734 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012735 .eraseblocks = { {64 * 1024, 1024} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012736 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070012737 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012738 .eraseblocks = { {64 * 1024, 1024} },
12739 .block_erase = spi_block_erase_d8,
12740 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012741 .eraseblocks = { {65536 * 1024, 1} },
12742 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070012743 }, {
12744 .eraseblocks = { {65536 * 1024, 1} },
12745 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070012746 }
12747 },
12748 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12749 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12750 .write = spi_chip_write_256, /* Multi I/O supported */
12751 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12752 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012753 .reg_bits =
12754 {
12755 .srp = {STATUS1, 7, RW},
12756 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12757 .tb = {STATUS1, 5, RW},
12758 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012759 .wp_write_cfg = spi_wp_write_cfg,
12760 .wp_read_cfg = spi_wp_read_cfg,
12761 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012762 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020012763 .prepare_access = spi_prepare_io,
12764 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070012765 },
12766
12767 {
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012768 .vendor = "Micron",
12769 .name = "MT25QU512", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12770 .bustype = BUS_SPI,
12771 .manufacture_id = ST_ID,
12772 .model_id = ST_N25Q512__1G,
12773 .total_size = 65536,
12774 .page_size = 256,
12775 /* supports SFDP */
12776 /* OTP: 64B total; read 0x4B, write 0x42 */
12777 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12778 .tested = TEST_OK_PREW,
12779 .probe = probe_spi_rdid,
12780 .probe_timing = TIMING_ZERO,
12781 .block_erasers =
12782 {
12783 {
12784 .eraseblocks = { {4 * 1024, 16384} },
12785 .block_erase = spi_block_erase_21,
12786 }, {
12787 .eraseblocks = { {4 * 1024, 16384} },
12788 .block_erase = spi_block_erase_20,
12789 }, {
12790 .eraseblocks = { {32 * 1024, 2048} },
12791 .block_erase = spi_block_erase_5c,
12792 }, {
12793 .eraseblocks = { {32 * 1024, 2048} },
12794 .block_erase = spi_block_erase_52,
12795 }, {
12796 .eraseblocks = { {64 * 1024, 1024} },
12797 .block_erase = spi_block_erase_dc,
12798 }, {
12799 .eraseblocks = { {64 * 1024, 1024} },
12800 .block_erase = spi_block_erase_d8,
12801 }, {
12802 .eraseblocks = { {65536 * 1024, 1} },
12803 .block_erase = spi_block_erase_c7,
12804 }, {
12805 .eraseblocks = { {65536 * 1024, 1} },
12806 .block_erase = spi_block_erase_60,
12807 }
12808 },
12809 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12810 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12811 .write = spi_chip_write_256, /* Multi I/O supported */
12812 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12813 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012814 .prepare_access = spi_prepare_io,
12815 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012816 },
12817
12818 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000012819 .vendor = "MoselVitelic",
12820 .name = "V29C51000B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012821 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012822 .manufacture_id = SYNCMOS_MVC_ID,
12823 .model_id = MVC_V29C51000B,
12824 .total_size = 64,
12825 .page_size = 512,
12826 .feature_bits = FEATURE_EITHER_RESET,
12827 .tested = TEST_UNTESTED,
12828 .probe = probe_jedec,
12829 .probe_timing = TIMING_ZERO,
12830 .block_erasers =
12831 {
12832 {
12833 .eraseblocks = { {512, 128} },
12834 .block_erase = erase_sector_jedec,
12835 }, {
12836 .eraseblocks = { {64 * 1024, 1} },
12837 .block_erase = erase_chip_block_jedec,
12838 },
12839 },
12840 .write = write_jedec_1,
12841 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012842 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012843 .prepare_access = prepare_memory_access,
12844 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012845 },
12846
12847 {
12848 .vendor = "MoselVitelic",
12849 .name = "V29C51000T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012850 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012851 .manufacture_id = SYNCMOS_MVC_ID,
12852 .model_id = MVC_V29C51000T,
12853 .total_size = 64,
12854 .page_size = 512,
12855 .feature_bits = FEATURE_EITHER_RESET,
12856 .tested = TEST_UNTESTED,
12857 .probe = probe_jedec,
12858 .probe_timing = TIMING_ZERO,
12859 .block_erasers =
12860 {
12861 {
12862 .eraseblocks = { {512, 128} },
12863 .block_erase = erase_sector_jedec,
12864 }, {
12865 .eraseblocks = { {64 * 1024, 1} },
12866 .block_erase = erase_chip_block_jedec,
12867 },
12868 },
12869 .write = write_jedec_1,
12870 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012871 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012872 .prepare_access = prepare_memory_access,
12873 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012874 },
12875
12876 {
12877 .vendor = "MoselVitelic",
12878 .name = "V29C51400B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012879 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012880 .manufacture_id = SYNCMOS_MVC_ID,
12881 .model_id = MVC_V29C51400B,
12882 .total_size = 512,
12883 .page_size = 1024,
12884 .feature_bits = FEATURE_EITHER_RESET,
12885 .tested = TEST_UNTESTED,
12886 .probe = probe_jedec,
12887 .probe_timing = TIMING_ZERO,
12888 .block_erasers =
12889 {
12890 {
12891 .eraseblocks = { {1024, 512} },
12892 .block_erase = erase_sector_jedec,
12893 }, {
12894 .eraseblocks = { {512 * 1024, 1} },
12895 .block_erase = erase_chip_block_jedec,
12896 },
12897 },
12898 .write = write_jedec_1,
12899 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012900 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012901 .prepare_access = prepare_memory_access,
12902 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012903 },
12904
12905 {
12906 .vendor = "MoselVitelic",
12907 .name = "V29C51400T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012908 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012909 .manufacture_id = SYNCMOS_MVC_ID,
12910 .model_id = MVC_V29C51400T,
12911 .total_size = 512,
12912 .page_size = 1024,
12913 .feature_bits = FEATURE_EITHER_RESET,
12914 .tested = TEST_UNTESTED,
12915 .probe = probe_jedec,
12916 .probe_timing = TIMING_ZERO,
12917 .block_erasers =
12918 {
12919 {
12920 .eraseblocks = { {1024, 512} },
12921 .block_erase = erase_sector_jedec,
12922 }, {
12923 .eraseblocks = { {512 * 1024, 1} },
12924 .block_erase = erase_chip_block_jedec,
12925 },
12926 },
12927 .write = write_jedec_1,
12928 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012929 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012930 .prepare_access = prepare_memory_access,
12931 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012932 },
12933
12934 {
12935 .vendor = "MoselVitelic",
12936 .name = "V29LC51000",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012937 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012938 .manufacture_id = SYNCMOS_MVC_ID,
12939 .model_id = MVC_V29LC51000,
12940 .total_size = 64,
12941 .page_size = 512,
12942 .feature_bits = FEATURE_EITHER_RESET,
12943 .tested = TEST_UNTESTED,
12944 .probe = probe_jedec,
12945 .probe_timing = TIMING_ZERO,
12946 .block_erasers =
12947 {
12948 {
12949 .eraseblocks = { {512, 128} },
12950 .block_erase = erase_sector_jedec,
12951 }, {
12952 .eraseblocks = { {64 * 1024, 1} },
12953 .block_erase = erase_chip_block_jedec,
12954 },
12955 },
12956 .write = write_jedec_1,
12957 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012958 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012959 .prepare_access = prepare_memory_access,
12960 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012961 },
12962
12963 {
12964 .vendor = "MoselVitelic",
12965 .name = "V29LC51001",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012966 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012967 .manufacture_id = SYNCMOS_MVC_ID,
12968 .model_id = MVC_V29LC51001,
12969 .total_size = 128,
12970 .page_size = 512,
12971 .feature_bits = FEATURE_EITHER_RESET,
12972 .tested = TEST_UNTESTED,
12973 .probe = probe_jedec,
12974 .probe_timing = TIMING_ZERO,
12975 .block_erasers =
12976 {
12977 {
12978 .eraseblocks = { {512, 256} },
12979 .block_erase = erase_sector_jedec,
12980 }, {
12981 .eraseblocks = { {128 * 1024, 1} },
12982 .block_erase = erase_chip_block_jedec,
12983 },
12984 },
12985 .write = write_jedec_1,
12986 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012987 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012988 .prepare_access = prepare_memory_access,
12989 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012990 },
12991
12992 {
12993 .vendor = "MoselVitelic",
12994 .name = "V29LC51002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012995 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012996 .manufacture_id = SYNCMOS_MVC_ID,
12997 .model_id = MVC_V29LC51002,
12998 .total_size = 256,
12999 .page_size = 512,
13000 .feature_bits = FEATURE_EITHER_RESET,
13001 .tested = TEST_UNTESTED,
13002 .probe = probe_jedec,
13003 .probe_timing = TIMING_ZERO,
13004 .block_erasers =
13005 {
13006 {
13007 .eraseblocks = { {512, 512} },
13008 .block_erase = erase_sector_jedec,
13009 }, {
13010 .eraseblocks = { {256 * 1024, 1} },
13011 .block_erase = erase_chip_block_jedec,
13012 },
13013 },
13014 .write = write_jedec_1,
13015 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013016 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013017 .prepare_access = prepare_memory_access,
13018 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013019 },
13020
13021 {
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013022 .vendor = "Nantronics",
13023 .name = "N25S10",
13024 .bustype = BUS_SPI,
13025 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13026 .model_id = NANTRONICS_N25S10,
13027 .total_size = 128,
13028 .page_size = 256,
13029 .feature_bits = FEATURE_WRSR_WREN,
13030 .tested = TEST_UNTESTED,
13031 .probe = probe_spi_rdid,
13032 .probe_timing = TIMING_ZERO,
13033 .block_erasers =
13034 {
13035 {
13036 .eraseblocks = { {4 * 1024, 32} },
13037 .block_erase = spi_block_erase_20,
13038 }, {
13039 .eraseblocks = { {4 * 1024, 32} },
13040 .block_erase = spi_block_erase_d7,
13041 }, {
13042 .eraseblocks = { {32 * 1024, 4} },
13043 .block_erase = spi_block_erase_52,
13044 }, {
13045 .eraseblocks = { {64 * 1024, 2} },
13046 .block_erase = spi_block_erase_d8,
13047 }, {
13048 .eraseblocks = { {128 * 1024, 1} },
13049 .block_erase = spi_block_erase_60,
13050 }, {
13051 .eraseblocks = { {128 * 1024, 1} },
13052 .block_erase = spi_block_erase_c7,
13053 }
13054 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013055 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013056 .unlock = spi_disable_blockprotect_bp3_srwd,
13057 .write = spi_chip_write_256,
13058 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13059 .voltage = {2700, 3600},
13060 },
13061
13062 {
13063 .vendor = "Nantronics",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013064 .name = "N25S16",
13065 .bustype = BUS_SPI,
13066 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13067 .model_id = NANTRONICS_N25S16,
13068 .total_size = 2048,
13069 .page_size = 256,
13070 .feature_bits = FEATURE_WRSR_WREN,
13071 .tested = TEST_UNTESTED,
13072 .probe = probe_spi_rdid,
13073 .probe_timing = TIMING_ZERO,
13074 .block_erasers =
13075 {
13076 {
13077 .eraseblocks = { {4 * 1024, 512} },
13078 .block_erase = spi_block_erase_20,
13079 }, {
13080 .eraseblocks = { {64 * 1024, 32} },
13081 .block_erase = spi_block_erase_d8,
13082 }, {
13083 .eraseblocks = { {2048 * 1024, 1} },
13084 .block_erase = spi_block_erase_60,
13085 }, {
13086 .eraseblocks = { {2048 * 1024, 1} },
13087 .block_erase = spi_block_erase_c7,
13088 }
13089 },
13090 .printlock = spi_prettyprint_status_register_bp3_srwd,
13091 .unlock = spi_disable_blockprotect_bp3_srwd,
13092 .write = spi_chip_write_256,
13093 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13094 .voltage = {2700, 3600},
13095 },
13096
13097 {
13098 .vendor = "Nantronics",
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013099 .name = "N25S20",
13100 .bustype = BUS_SPI,
13101 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13102 .model_id = NANTRONICS_N25S20,
13103 .total_size = 256,
13104 .page_size = 256,
13105 .feature_bits = FEATURE_WRSR_WREN,
13106 .tested = TEST_UNTESTED,
13107 .probe = probe_spi_rdid,
13108 .probe_timing = TIMING_ZERO,
13109 .block_erasers =
13110 {
13111 {
13112 .eraseblocks = { {4 * 1024, 64} },
13113 .block_erase = spi_block_erase_20,
13114 }, {
13115 .eraseblocks = { {4 * 1024, 64} },
13116 .block_erase = spi_block_erase_d7,
13117 }, {
13118 .eraseblocks = { {32 * 1024, 8} },
13119 .block_erase = spi_block_erase_52,
13120 }, {
13121 .eraseblocks = { {64 * 1024, 4} },
13122 .block_erase = spi_block_erase_d8,
13123 }, {
13124 .eraseblocks = { {256 * 1024, 1} },
13125 .block_erase = spi_block_erase_60,
13126 }, {
13127 .eraseblocks = { {256 * 1024, 1} },
13128 .block_erase = spi_block_erase_c7,
13129 }
13130 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013131 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013132 .unlock = spi_disable_blockprotect_bp3_srwd,
13133 .write = spi_chip_write_256,
13134 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13135 .voltage = {2700, 3600},
13136 },
13137
13138 {
13139 .vendor = "Nantronics",
13140 .name = "N25S40",
13141 .bustype = BUS_SPI,
13142 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13143 .model_id = NANTRONICS_N25S40,
13144 .total_size = 512,
13145 .page_size = 256,
13146 .feature_bits = FEATURE_WRSR_WREN,
13147 .tested = TEST_UNTESTED,
13148 .probe = probe_spi_rdid,
13149 .probe_timing = TIMING_ZERO,
13150 .block_erasers =
13151 {
13152 {
13153 .eraseblocks = { {4 * 1024, 128} },
13154 .block_erase = spi_block_erase_20,
13155 }, {
13156 .eraseblocks = { {4 * 1024, 128} },
13157 .block_erase = spi_block_erase_d7,
13158 }, {
13159 .eraseblocks = { {32 * 1024, 16} },
13160 .block_erase = spi_block_erase_52,
13161 }, {
13162 .eraseblocks = { {64 * 1024, 8} },
13163 .block_erase = spi_block_erase_d8,
13164 }, {
13165 .eraseblocks = { {512 * 1024, 1} },
13166 .block_erase = spi_block_erase_60,
13167 }, {
13168 .eraseblocks = { {512 * 1024, 1} },
13169 .block_erase = spi_block_erase_c7,
13170 }
13171 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013172 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013173 .unlock = spi_disable_blockprotect_bp3_srwd,
13174 .write = spi_chip_write_256,
13175 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13176 .voltage = {2700, 3600},
13177 },
13178
13179 {
13180 .vendor = "Nantronics",
13181 .name = "N25S80",
13182 .bustype = BUS_SPI,
13183 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13184 .model_id = NANTRONICS_N25S80,
13185 .total_size = 1024,
13186 .page_size = 256,
13187 .feature_bits = FEATURE_WRSR_WREN,
13188 .tested = TEST_UNTESTED,
13189 .probe = probe_spi_rdid,
13190 .probe_timing = TIMING_ZERO,
13191 .block_erasers =
13192 {
13193 {
13194 .eraseblocks = { {4 * 1024, 256} },
13195 .block_erase = spi_block_erase_20,
13196 }, {
13197 .eraseblocks = { {32 * 1024, 32} },
13198 .block_erase = spi_block_erase_52,
13199 }, {
13200 .eraseblocks = { {64 * 1024, 16} },
13201 .block_erase = spi_block_erase_d8,
13202 }, {
13203 .eraseblocks = { {1024 * 1024, 1} },
13204 .block_erase = spi_block_erase_60,
13205 }, {
13206 .eraseblocks = { {1024 * 1024, 1} },
13207 .block_erase = spi_block_erase_c7,
13208 }
13209 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013210 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013211 .unlock = spi_disable_blockprotect_bp3_srwd,
13212 .write = spi_chip_write_256,
13213 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13214 .voltage = {2700, 3600},
13215 },
13216
13217 {
Stefan Taunerf4451612013-04-19 01:59:15 +000013218 .vendor = "PMC",
13219 .name = "Pm25LD010(C)",
13220 .bustype = BUS_SPI,
13221 .manufacture_id = PMC_ID,
13222 .model_id = PMC_PM25LD010,
13223 .total_size = 128,
13224 .page_size = 256,
13225 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000013226 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013227 .probe = probe_spi_rdid,
13228 .probe_timing = TIMING_ZERO,
13229 .block_erasers =
13230 {
13231 {
13232 .eraseblocks = { {4 * 1024, 32} },
13233 .block_erase = spi_block_erase_20,
13234 }, {
13235 .eraseblocks = { {4 * 1024, 32} },
13236 .block_erase = spi_block_erase_d7,
13237 }, {
13238 .eraseblocks = { {32 * 1024, 4} },
13239 .block_erase = spi_block_erase_d8,
13240 }, {
13241 .eraseblocks = { {128 * 1024, 1} },
13242 .block_erase = spi_block_erase_60,
13243 }, {
13244 .eraseblocks = { {128 * 1024, 1} },
13245 .block_erase = spi_block_erase_c7,
13246 }
13247 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013248 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013249 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13250 .write = spi_chip_write_256,
13251 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13252 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD010 */
13253 },
13254
13255 {
13256 .vendor = "PMC",
13257 .name = "Pm25LD020(C)",
13258 .bustype = BUS_SPI,
13259 .manufacture_id = PMC_ID,
13260 .model_id = PMC_PM25LD020,
13261 .total_size = 256,
13262 .page_size = 256,
13263 .feature_bits = FEATURE_WRSR_WREN,
Angel Ponsf5822a82018-09-30 20:09:58 +020013264 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013265 .probe = probe_spi_rdid,
13266 .probe_timing = TIMING_ZERO,
13267 .block_erasers =
13268 {
13269 {
13270 .eraseblocks = { {4 * 1024, 64} },
13271 .block_erase = spi_block_erase_20,
13272 }, {
13273 .eraseblocks = { {4 * 1024, 64} },
13274 .block_erase = spi_block_erase_d7,
13275 }, {
13276 .eraseblocks = { {64 * 1024, 4} },
13277 .block_erase = spi_block_erase_d8,
13278 }, {
13279 .eraseblocks = { {256 * 1024, 1} },
13280 .block_erase = spi_block_erase_60,
13281 }, {
13282 .eraseblocks = { {256 * 1024, 1} },
13283 .block_erase = spi_block_erase_c7,
13284 }
13285 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013286 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013287 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13288 .write = spi_chip_write_256,
13289 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13290 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD020 */
13291 },
13292
13293 {
13294 .vendor = "PMC",
13295 .name = "Pm25LD040(C)",
13296 .bustype = BUS_SPI,
13297 .manufacture_id = PMC_ID,
13298 .model_id = PMC_PM25LV040,
13299 .total_size = 512,
13300 .page_size = 256,
13301 .feature_bits = FEATURE_WRSR_WREN,
Angel Pons05127bf2018-09-30 20:23:24 +020013302 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013303 .probe = probe_spi_rdid,
13304 .probe_timing = TIMING_ZERO,
13305 .block_erasers =
13306 {
13307 {
13308 .eraseblocks = { {4 * 1024, 128} },
13309 .block_erase = spi_block_erase_20,
13310 }, {
13311 .eraseblocks = { {4 * 1024, 128} },
13312 .block_erase = spi_block_erase_d7,
13313 }, {
13314 .eraseblocks = { {64 * 1024, 8} },
13315 .block_erase = spi_block_erase_d8,
13316 }, {
13317 .eraseblocks = { {512 * 1024, 1} },
13318 .block_erase = spi_block_erase_60,
13319 }, {
13320 .eraseblocks = { {512 * 1024, 1} },
13321 .block_erase = spi_block_erase_c7,
13322 }
13323 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013324 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013325 .unlock = spi_disable_blockprotect,
13326 .write = spi_chip_write_256,
13327 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13328 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD040 */
13329 },
13330
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013331 {
13332 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013333 .name = "Pm25LD256C",
13334 .bustype = BUS_SPI,
13335 .manufacture_id = PMC_ID,
13336 .model_id = PMC_PM25LD256C,
13337 .total_size = 32,
13338 .page_size = 256,
13339 .feature_bits = FEATURE_WRSR_WREN,
13340 .tested = TEST_UNTESTED,
13341 .probe = probe_spi_rdid,
13342 .probe_timing = TIMING_ZERO,
13343 .block_erasers =
13344 {
13345 {
13346 .eraseblocks = { {4 * 1024, 8} },
13347 .block_erase = spi_block_erase_20,
13348 }, {
13349 .eraseblocks = { {4 * 1024, 8} },
13350 .block_erase = spi_block_erase_d7,
13351 }, {
13352 .eraseblocks = { {32 * 1024, 1} },
13353 .block_erase = spi_block_erase_d8,
13354 }, {
13355 .eraseblocks = { {32 * 1024, 1} },
13356 .block_erase = spi_block_erase_60,
13357 }, {
13358 .eraseblocks = { {32 * 1024, 1} },
13359 .block_erase = spi_block_erase_c7,
13360 }
13361 },
13362 .printlock = spi_prettyprint_status_register_bp2_srwd,
13363 .unlock = spi_disable_blockprotect,
13364 .write = spi_chip_write_256,
13365 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13366 .voltage = {2700, 3600},
13367 },
13368
13369 {
13370 .vendor = "PMC",
13371 .name = "Pm25LD512(C)",
13372 .bustype = BUS_SPI,
13373 .manufacture_id = PMC_ID,
13374 .model_id = PMC_PM25LD512,
13375 .total_size = 64,
13376 .page_size = 256,
13377 .feature_bits = FEATURE_WRSR_WREN,
13378 .tested = TEST_OK_PREW,
13379 .probe = probe_spi_rdid,
13380 .probe_timing = TIMING_ZERO,
13381 .block_erasers =
13382 {
13383 {
13384 .eraseblocks = { {4 * 1024, 16} },
13385 .block_erase = spi_block_erase_20,
13386 }, {
13387 .eraseblocks = { {4 * 1024, 16} },
13388 .block_erase = spi_block_erase_d7,
13389 }, {
13390 .eraseblocks = { {32 * 1024, 2} },
13391 .block_erase = spi_block_erase_d8,
13392 }, {
13393 .eraseblocks = { {64 * 1024, 1} },
13394 .block_erase = spi_block_erase_60,
13395 }, {
13396 .eraseblocks = { {64 * 1024, 1} },
13397 .block_erase = spi_block_erase_c7,
13398 }
13399 },
13400 .printlock = spi_prettyprint_status_register_bp2_srwd,
13401 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13402 .write = spi_chip_write_256,
13403 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13404 .voltage = {2300, 3600},
13405 },
13406
13407 {
13408 .vendor = "PMC",
13409 .name = "Pm25LQ016",
13410 .bustype = BUS_SPI,
13411 .manufacture_id = PMC_ID,
13412 .model_id = PMC_PM25LQ016,
13413 .total_size = 2048,
13414 .page_size = 256,
13415 /* OTP: 256B total; read 0x4B, write 0xB1 */
13416 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13417 .tested = TEST_UNTESTED,
13418 .probe = probe_spi_rdid,
13419 .probe_timing = TIMING_ZERO,
13420 .block_erasers =
13421 {
13422 {
13423 .eraseblocks = { {4 * 1024, 512} },
13424 .block_erase = spi_block_erase_20,
13425 }, {
13426 .eraseblocks = { {4 * 1024, 512} },
13427 .block_erase = spi_block_erase_d7,
13428 }, {
13429 .eraseblocks = { {64 * 1024, 32} },
13430 .block_erase = spi_block_erase_d8,
13431 }, {
13432 .eraseblocks = { {2048 * 1024, 1} },
13433 .block_erase = spi_block_erase_60,
13434 }, {
13435 .eraseblocks = { {2048 * 1024, 1} },
13436 .block_erase = spi_block_erase_c7,
13437 }
13438 },
13439 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13440 .unlock = spi_disable_blockprotect_bp3_srwd,
13441 .write = spi_chip_write_256,
13442 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13443 .voltage = {2300, 3600},
13444 },
13445
13446 {
13447 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013448 .name = "Pm25LQ020",
13449 .bustype = BUS_SPI,
13450 .manufacture_id = PMC_ID,
13451 .model_id = PMC_PM25LQ020,
13452 .total_size = 256,
13453 .page_size = 256,
13454 /* OTP: 256B total; read 0x4B, write 0xB1 */
13455 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13456 .tested = TEST_UNTESTED,
13457 .probe = probe_spi_rdid,
13458 .probe_timing = TIMING_ZERO,
13459 .block_erasers =
13460 {
13461 {
13462 .eraseblocks = { {4 * 1024, 64} },
13463 .block_erase = spi_block_erase_20,
13464 }, {
13465 .eraseblocks = { {4 * 1024, 64} },
13466 .block_erase = spi_block_erase_d7,
13467 }, {
13468 .eraseblocks = { {64 * 1024, 4} },
13469 .block_erase = spi_block_erase_d8,
13470 }, {
13471 .eraseblocks = { {256 * 1024, 1} },
13472 .block_erase = spi_block_erase_60,
13473 }, {
13474 .eraseblocks = { {256 * 1024, 1} },
13475 .block_erase = spi_block_erase_c7,
13476 }
13477 },
13478 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13479 .unlock = spi_disable_blockprotect_bp3_srwd,
13480 .write = spi_chip_write_256,
13481 .read = spi_chip_read,
13482 .voltage = {2300, 3600},
13483 },
13484
13485 {
13486 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013487 .name = "Pm25LQ032C",
13488 .bustype = BUS_SPI,
13489 .manufacture_id = PMC_ID,
13490 .model_id = PMC_PM25LQ032C,
13491 .total_size = 4096,
13492 .page_size = 256,
13493 /* OTP: 64B total; read 0x4B, write 0xB1 */
13494 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13495 .tested = TEST_OK_PREW,
13496 .probe = probe_spi_rdid,
13497 .probe_timing = TIMING_ZERO,
13498 .block_erasers =
13499 {
13500 {
13501 .eraseblocks = { {4 * 1024, 1024} },
13502 .block_erase = spi_block_erase_20,
13503 }, {
13504 .eraseblocks = { {4 * 1024, 1024} },
13505 .block_erase = spi_block_erase_d7,
13506 }, {
13507 .eraseblocks = { {64 * 1024, 64} },
13508 .block_erase = spi_block_erase_d8,
13509 }, {
13510 .eraseblocks = { {4096 * 1024, 1} },
13511 .block_erase = spi_block_erase_60,
13512 }, {
13513 .eraseblocks = { {4096 * 1024, 1} },
13514 .block_erase = spi_block_erase_c7,
13515 }
13516 },
13517 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13518 .unlock = spi_disable_blockprotect_bp3_srwd,
13519 .write = spi_chip_write_256,
13520 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13521 .voltage = {2700, 3600},
13522 },
13523
13524 {
13525 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013526 .name = "Pm25LQ040",
13527 .bustype = BUS_SPI,
13528 .manufacture_id = PMC_ID,
13529 .model_id = PMC_PM25LQ040,
13530 .total_size = 512,
13531 .page_size = 256,
13532 /* OTP: 256B total; read 0x4B, write 0xB1 */
13533 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13534 .tested = TEST_UNTESTED,
13535 .probe = probe_spi_rdid,
13536 .probe_timing = TIMING_ZERO,
13537 .block_erasers =
13538 {
13539 {
13540 .eraseblocks = { {4 * 1024, 128} },
13541 .block_erase = spi_block_erase_20,
13542 }, {
13543 .eraseblocks = { {4 * 1024, 128} },
13544 .block_erase = spi_block_erase_d7,
13545 }, {
13546 .eraseblocks = { {64 * 1024, 8} },
13547 .block_erase = spi_block_erase_d8,
13548 }, {
13549 .eraseblocks = { {512 * 1024, 1} },
13550 .block_erase = spi_block_erase_60,
13551 }, {
13552 .eraseblocks = { {512 * 1024, 1} },
13553 .block_erase = spi_block_erase_c7,
13554 }
13555 },
13556 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13557 .unlock = spi_disable_blockprotect_bp3_srwd,
13558 .write = spi_chip_write_256,
13559 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13560 .voltage = {2300, 3600},
13561 },
13562
13563 {
13564 .vendor = "PMC",
13565 .name = "Pm25LQ080",
13566 .bustype = BUS_SPI,
13567 .manufacture_id = PMC_ID,
13568 .model_id = PMC_PM25LQ080,
13569 .total_size = 1024,
13570 .page_size = 256,
13571 /* OTP: 64B total; read 0x4B, write 0xB1 */
13572 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13573 .tested = TEST_UNTESTED,
13574 .probe = probe_spi_rdid,
13575 .probe_timing = TIMING_ZERO,
13576 .block_erasers =
13577 {
13578 {
13579 .eraseblocks = { {4 * 1024, 256} },
13580 .block_erase = spi_block_erase_20,
13581 }, {
13582 .eraseblocks = { {4 * 1024, 256} },
13583 .block_erase = spi_block_erase_d7,
13584 }, {
13585 .eraseblocks = { {64 * 1024, 16} },
13586 .block_erase = spi_block_erase_d8,
13587 }, {
13588 .eraseblocks = { {1024 * 1024, 1} },
13589 .block_erase = spi_block_erase_60,
13590 }, {
13591 .eraseblocks = { {1024 * 1024, 1} },
13592 .block_erase = spi_block_erase_c7,
13593 }
13594 },
13595 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13596 .unlock = spi_disable_blockprotect_bp3_srwd,
13597 .write = spi_chip_write_256,
13598 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13599 .voltage = {2300, 3600},
13600 },
13601
13602 {
13603 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013604 .name = "Pm25LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013605 .bustype = BUS_SPI,
Stefan Taunerbecda742014-05-30 19:34:00 +000013606 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013607 .model_id = PMC_PM25LV010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013608 .total_size = 128,
13609 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013610 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerbecda742014-05-30 19:34:00 +000013611 .tested = TEST_OK_PREW,
13612 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013613 .probe_timing = TIMING_ZERO,
13614 .block_erasers =
13615 {
13616 {
13617 .eraseblocks = { {4 * 1024, 32} },
13618 .block_erase = spi_block_erase_d7,
13619 }, {
13620 .eraseblocks = { {32 * 1024, 4} },
13621 .block_erase = spi_block_erase_d8,
13622 }, {
13623 .eraseblocks = { {128 * 1024, 1} },
13624 .block_erase = spi_block_erase_c7,
13625 }
13626 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013627 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013628 .unlock = spi_disable_blockprotect,
13629 .write = spi_chip_write_256,
13630 .read = spi_chip_read, /* Fast read (0x0B) supported */
13631 .voltage = {2700, 3600},
13632 },
13633
13634 {
13635 .vendor = "PMC",
13636 .name = "Pm25LV010A",
13637 .bustype = BUS_SPI,
13638 .manufacture_id = PMC_ID,
13639 .model_id = PMC_PM25LV010,
13640 .total_size = 128,
13641 .page_size = 256,
13642 .feature_bits = FEATURE_WRSR_WREN,
13643 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013644 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013645 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013646 .block_erasers =
13647 {
13648 {
13649 .eraseblocks = { {4 * 1024, 32} },
13650 .block_erase = spi_block_erase_d7,
13651 }, {
13652 .eraseblocks = { {32 * 1024, 4} },
13653 .block_erase = spi_block_erase_d8,
13654 }, {
13655 .eraseblocks = { {128 * 1024, 1} },
13656 .block_erase = spi_block_erase_c7,
13657 }
13658 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013659 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013660 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013661 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013662 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000013663 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013664 },
13665
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013666 {
13667 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013668 .name = "Pm25LV016B",
13669 .bustype = BUS_SPI,
13670 .manufacture_id = PMC_ID,
13671 .model_id = PMC_PM25LV016B,
13672 .total_size = 2048,
13673 .page_size = 256,
13674 .feature_bits = FEATURE_WRSR_WREN,
13675 .tested = TEST_UNTESTED,
13676 .probe = probe_spi_rdid,
13677 .probe_timing = TIMING_ZERO,
13678 .block_erasers =
13679 {
13680 {
13681 .eraseblocks = { {4 * 1024, 512} },
13682 .block_erase = spi_block_erase_d7,
13683 }, {
13684 .eraseblocks = { {4 * 1024, 512} },
13685 .block_erase = spi_block_erase_20,
13686 }, {
13687 .eraseblocks = { {64 * 1024, 32} },
13688 .block_erase = spi_block_erase_d8,
13689 }, {
13690 .eraseblocks = { {2 * 1024 * 1024, 1} },
13691 .block_erase = spi_block_erase_60,
13692 }, {
13693 .eraseblocks = { {2 * 1024 * 1024, 1} },
13694 .block_erase = spi_block_erase_c7,
13695 }
13696 },
13697 .printlock = spi_prettyprint_status_register_bp2_srwd,
13698 .unlock = spi_disable_blockprotect,
13699 .write = spi_chip_write_256,
13700 .read = spi_chip_read, /* Fast read (0x0B) supported */
13701 .voltage = {2700, 3600},
13702 },
13703
13704 {
13705 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013706 .name = "Pm25LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013707 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013708 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013709 .model_id = PMC_PM25LV020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013710 .total_size = 256,
13711 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013712 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013713 .tested = TEST_UNTESTED,
13714 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013715 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013716 .block_erasers =
13717 {
13718 {
13719 .eraseblocks = { {4 * 1024, 64} },
13720 .block_erase = spi_block_erase_d7,
13721 }, {
13722 .eraseblocks = { {64 * 1024, 4} },
13723 .block_erase = spi_block_erase_d8,
13724 }, {
13725 .eraseblocks = { {256 * 1024, 1} },
13726 .block_erase = spi_block_erase_c7,
13727 }
13728 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013729 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013730 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013731 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013732 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013733 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013734 },
13735
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013736 {
13737 .vendor = "PMC",
13738 .name = "Pm25LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013739 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013740 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013741 .model_id = PMC_PM25LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013742 .total_size = 512,
13743 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013744 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner716e0982011-07-25 20:38:52 +000013745 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013746 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013747 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013748 .block_erasers =
13749 {
13750 {
13751 .eraseblocks = { {4 * 1024, 128} },
13752 .block_erase = spi_block_erase_d7,
13753 }, {
13754 .eraseblocks = { {64 * 1024, 8} },
13755 .block_erase = spi_block_erase_d8,
13756 }, {
13757 .eraseblocks = { {512 * 1024, 1} },
13758 .block_erase = spi_block_erase_c7,
13759 }
13760 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013761 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013762 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013763 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013764 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013765 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013766 },
13767
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013768 {
13769 .vendor = "PMC",
13770 .name = "Pm25LV080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013771 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013772 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013773 .model_id = PMC_PM25LV080B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013774 .total_size = 1024,
13775 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013776 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013777 .tested = TEST_UNTESTED,
13778 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013779 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013780 .block_erasers =
13781 {
13782 {
13783 .eraseblocks = { {4 * 1024, 256} },
13784 .block_erase = spi_block_erase_d7,
13785 }, {
13786 .eraseblocks = { {4 * 1024, 256} },
13787 .block_erase = spi_block_erase_20,
13788 }, {
13789 .eraseblocks = { {64 * 1024, 16} },
13790 .block_erase = spi_block_erase_d8,
13791 }, {
13792 .eraseblocks = { {1024 * 1024, 1} },
13793 .block_erase = spi_block_erase_60,
13794 }, {
13795 .eraseblocks = { {1024 * 1024, 1} },
13796 .block_erase = spi_block_erase_c7,
13797 }
13798 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013799 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013800 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013801 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013802 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013803 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013804 },
13805
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013806 {
13807 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013808 .name = "Pm25LV512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013809 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013810 .manufacture_id = PMC_ID_NOPREFIX,
13811 .model_id = PMC_PM25LV512,
13812 .total_size = 64,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013813 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013814 .feature_bits = FEATURE_WRSR_WREN,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013815 .tested = TEST_OK_PREW,
13816 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013817 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013818 .block_erasers =
13819 {
13820 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013821 .eraseblocks = { {4 * 1024, 16} },
Sean Nelson5643c072010-01-19 03:23:07 +000013822 .block_erase = spi_block_erase_d7,
13823 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013824 .eraseblocks = { {32 * 1024, 2} },
Sean Nelson5643c072010-01-19 03:23:07 +000013825 .block_erase = spi_block_erase_d8,
13826 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013827 .eraseblocks = { {64 * 1024, 1} },
Sean Nelson5643c072010-01-19 03:23:07 +000013828 .block_erase = spi_block_erase_c7,
13829 }
13830 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100013831 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013832 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013833 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013834 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000013835 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013836 },
13837
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013838 {
13839 .vendor = "PMC",
Sean Nelson72a9a022009-12-22 22:15:33 +000013840 .name = "Pm29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013841 .bustype = BUS_PARALLEL,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013842 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013843 .model_id = PMC_PM29F002B,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013844 .total_size = 256,
Sean Nelson72a9a022009-12-22 22:15:33 +000013845 .page_size = 8 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000013846 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013847 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000013848 .probe = probe_jedec,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013849 .probe_timing = TIMING_FIXME,
Sean Nelson72a9a022009-12-22 22:15:33 +000013850 .block_erasers =
13851 {
13852 {
13853 .eraseblocks = {
13854 {16 * 1024, 1},
13855 {8 * 1024, 2},
13856 {96 * 1024, 1},
13857 {128 * 1024, 1},
13858 },
Sean Nelson35727f72010-01-28 23:55:12 +000013859 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000013860 }, {
13861 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000013862 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000013863 },
13864 },
Sean Nelson35727f72010-01-28 23:55:12 +000013865 .write = write_jedec_1,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013866 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013867 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013868 .prepare_access = prepare_memory_access,
13869 .finish_access = finish_memory_access,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013870 },
13871
13872 {
13873 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013874 .name = "Pm29F002T",
13875 .bustype = BUS_PARALLEL,
13876 .manufacture_id = PMC_ID_NOPREFIX,
13877 .model_id = PMC_PM29F002T,
13878 .total_size = 256,
13879 .page_size = 8 * 1024,
13880 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
13881 .tested = TEST_OK_PREW,
13882 .probe = probe_jedec,
13883 .probe_timing = TIMING_FIXME,
13884 .block_erasers =
13885 {
13886 {
13887 .eraseblocks = {
13888 {128 * 1024, 1},
13889 {96 * 1024, 1},
13890 {8 * 1024, 2},
13891 {16 * 1024, 1},
13892 },
13893 .block_erase = erase_sector_jedec,
13894 }, {
13895 .eraseblocks = { {256 * 1024, 1} },
13896 .block_erase = erase_chip_block_jedec,
13897 },
13898 },
13899 .write = write_jedec_1,
13900 .read = read_memmapped,
13901 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013902 .prepare_access = prepare_memory_access,
13903 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013904 },
13905
13906 {
13907 .vendor = "PMC",
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013908 .name = "Pm39LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013909 .bustype = BUS_PARALLEL,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013910 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013911 .model_id = PMC_PM39F010, /* Pm39LV010 and Pm39F010 have identical IDs but different voltage */
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013912 .total_size = 128,
13913 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000013914 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000013915 .tested = TEST_OK_PREW,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013916 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000013917 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson5643c072010-01-19 03:23:07 +000013918 .block_erasers =
13919 {
13920 {
13921 .eraseblocks = { {4 * 1024, 32} },
13922 .block_erase = erase_sector_jedec,
13923 }, {
13924 .eraseblocks = { {64 * 1024, 2} },
13925 .block_erase = erase_block_jedec,
13926 }, {
13927 .eraseblocks = { {128 * 1024, 1} },
13928 .block_erase = erase_chip_block_jedec,
13929 }
13930 },
Sean Nelson35727f72010-01-28 23:55:12 +000013931 .write = write_jedec_1,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013932 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013933 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013934 .prepare_access = prepare_memory_access,
13935 .finish_access = finish_memory_access,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013936 },
13937
13938 {
13939 .vendor = "PMC",
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013940 .name = "Pm39LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013941 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013942 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013943 .model_id = PMC_PM39LV020,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013944 .total_size = 256,
13945 .page_size = 4096,
13946 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
13947 .tested = TEST_UNTESTED,
13948 .probe = probe_jedec,
13949 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100013950 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013951 {
13952 {
13953 .eraseblocks = { {4 * 1024, 64} },
13954 .block_erase = erase_sector_jedec,
13955 }, {
13956 .eraseblocks = { {64 * 1024, 4} },
13957 .block_erase = erase_block_jedec,
13958 }, {
13959 .eraseblocks = { {256 * 1024, 1} },
13960 .block_erase = erase_chip_block_jedec,
13961 }
13962 },
13963 .write = write_jedec_1,
13964 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013965 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013966 .prepare_access = prepare_memory_access,
13967 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013968 },
13969
13970 {
13971 .vendor = "PMC",
13972 .name = "Pm39LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013973 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013974 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013975 .model_id = PMC_PM39LV040,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013976 .total_size = 512,
13977 .page_size = 4096,
13978 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000013979 .tested = TEST_OK_PR,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013980 .probe = probe_jedec,
13981 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100013982 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013983 {
13984 {
13985 .eraseblocks = { {4 * 1024, 128} },
13986 .block_erase = erase_sector_jedec,
13987 }, {
13988 .eraseblocks = { {64 * 1024, 8} },
13989 .block_erase = erase_block_jedec,
13990 }, {
13991 .eraseblocks = { {512 * 1024, 1} },
13992 .block_erase = erase_chip_block_jedec,
13993 }
13994 },
13995 .write = write_jedec_1,
13996 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013997 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013998 .prepare_access = prepare_memory_access,
13999 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014000 },
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000014001
14002 {
14003 .vendor = "PMC",
14004 .name = "Pm39LV512",
14005 .bustype = BUS_PARALLEL,
14006 .manufacture_id = PMC_ID_NOPREFIX,
14007 .model_id = PMC_PM39LV512,
14008 .total_size = 64,
14009 .page_size = 4096,
14010 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
14011 .tested = TEST_OK_PREW,
14012 .probe = probe_jedec,
14013 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
14014 .block_erasers =
14015 {
14016 {
14017 .eraseblocks = { {4 * 1024, 16} },
14018 .block_erase = erase_sector_jedec,
14019 }, {
14020 .eraseblocks = { {64 * 1024, 1} },
14021 .block_erase = erase_block_jedec,
14022 }, {
14023 .eraseblocks = { {64 * 1024, 1} },
14024 .block_erase = erase_chip_block_jedec,
14025 }
14026 },
14027 .write = write_jedec_1,
14028 .read = read_memmapped,
14029 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010014030 .prepare_access = prepare_memory_access,
14031 .finish_access = finish_memory_access,
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000014032 },
14033
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014034 {
14035 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014036 .name = "Pm49FL002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014037 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014038 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014039 .model_id = PMC_PM49FL002,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014040 .total_size = 256,
14041 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010014042 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014043 .tested = TEST_OK_PR,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000014044 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000014045 .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */
Sean Nelson5643c072010-01-19 03:23:07 +000014046 .block_erasers =
14047 {
14048 {
14049 .eraseblocks = { {4 * 1024, 64} },
14050 .block_erase = erase_sector_jedec,
14051 }, {
14052 .eraseblocks = { {16 * 1024, 16} },
14053 .block_erase = erase_block_jedec,
14054 }, {
14055 .eraseblocks = { {256 * 1024, 1} },
14056 .block_erase = erase_chip_block_jedec,
14057 }
14058 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014059 .unlock = unlock_regspace2_uniform_32k,
Sean Nelson36172342010-02-27 18:01:15 +000014060 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000014061 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014062 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010014063 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010014064 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000014065 },
14066
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014067 {
14068 .vendor = "PMC",
14069 .name = "Pm49FL004",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014070 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014071 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014072 .model_id = PMC_PM49FL004,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014073 .total_size = 512,
14074 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010014075 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000014076 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000014077 .probe = probe_jedec,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000014078 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000014079 .block_erasers =
14080 {
14081 {
14082 .eraseblocks = { {4 * 1024, 128} },
14083 .block_erase = erase_sector_jedec,
14084 }, {
14085 .eraseblocks = { {64 * 1024, 8} },
14086 .block_erase = erase_block_jedec,
14087 }, {
14088 .eraseblocks = { {512 * 1024, 1} },
14089 .block_erase = erase_chip_block_jedec,
14090 }
14091 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014092 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson36172342010-02-27 18:01:15 +000014093 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000014094 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014095 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010014096 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010014097 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000014098 },
14099
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014100 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014101 .vendor = "SST",
Idwer Volleringf3607d12014-05-07 15:25:04 +000014102 .name = "SST25LF020A",
14103 .bustype = BUS_SPI,
14104 .manufacture_id = SST_ID,
14105 .model_id = SST_SST25VF020_REMS,
14106 .total_size = 256,
14107 .page_size = 256,
14108 .feature_bits = FEATURE_WRSR_EWSR,
14109 .tested = TEST_OK_PREW,
14110 .probe = probe_spi_rems,
14111 .probe_timing = TIMING_ZERO,
14112 .block_erasers =
14113 {
14114 {
14115 .eraseblocks = { {4 * 1024, 64} },
14116 .block_erase = spi_block_erase_20,
14117 }, {
14118 .eraseblocks = { {32 * 1024, 8} },
14119 .block_erase = spi_block_erase_52,
14120 }, {
14121 .eraseblocks = { {256 * 1024, 1} },
14122 .block_erase = spi_block_erase_60,
14123 },
14124 },
14125 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14126 .unlock = spi_disable_blockprotect,
14127 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14128 .read = spi_chip_read, /* Fast read (0x0B) supported */
14129 .voltage = {2700, 3600},
14130 },
14131
14132 {
14133 .vendor = "SST",
Zeus Castro33670ba2011-08-17 09:50:11 +000014134 .name = "SST25LF040A",
14135 .bustype = BUS_SPI,
14136 .manufacture_id = SST_ID,
14137 .model_id = SST_SST25VF040_REMS,
14138 .total_size = 512,
14139 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000014140 .feature_bits = FEATURE_WRSR_EWSR,
Uwe Hermann4335ec82011-09-07 20:20:25 +000014141 .tested = TEST_OK_PREW,
Zeus Castro33670ba2011-08-17 09:50:11 +000014142 .probe = probe_spi_res2,
14143 .probe_timing = TIMING_ZERO,
14144 .block_erasers =
14145 {
14146 {
14147 .eraseblocks = { {4 * 1024, 128} },
14148 .block_erase = spi_block_erase_20,
14149 }, {
14150 .eraseblocks = { {32 * 1024, 16} },
14151 .block_erase = spi_block_erase_52,
14152 }, {
14153 .eraseblocks = { {512 * 1024, 1} },
14154 .block_erase = spi_block_erase_60,
14155 },
14156 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014157 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000014158 .unlock = spi_disable_blockprotect,
14159 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14160 .read = spi_chip_read,
14161 .voltage = {3000, 3600},
14162 },
14163
14164 {
14165 .vendor = "SST",
Stefan Taunere34e3e82013-01-01 00:06:51 +000014166 .name = "SST25LF080(A)",
Zeus Castro33670ba2011-08-17 09:50:11 +000014167 .bustype = BUS_SPI,
14168 .manufacture_id = SST_ID,
14169 .model_id = SST_SST25VF080_REMS,
14170 .total_size = 1024,
14171 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000014172 .feature_bits = FEATURE_WRSR_EITHER,
Zeus Castro33670ba2011-08-17 09:50:11 +000014173 .tested = TEST_UNTESTED,
14174 .probe = probe_spi_res2,
14175 .probe_timing = TIMING_ZERO,
14176 .block_erasers =
14177 {
14178 {
14179 .eraseblocks = { {4 * 1024, 256} },
14180 .block_erase = spi_block_erase_20,
14181 }, {
14182 .eraseblocks = { {32 * 1024, 32} },
14183 .block_erase = spi_block_erase_52,
14184 }, {
14185 .eraseblocks = { {1024 * 1024, 1} },
14186 .block_erase = spi_block_erase_60,
14187 },
14188 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014189 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000014190 .unlock = spi_disable_blockprotect,
14191 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14192 .read = spi_chip_read,
14193 .voltage = {3000, 3600},
14194 },
14195
14196 {
14197 .vendor = "SST",
Stefan Tauner6697f712014-08-06 15:09:15 +000014198 .name = "SST25VF010(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014199 .bustype = BUS_SPI,
Mark Marshall90021f22010-12-03 14:48:11 +000014200 .manufacture_id = SST_ID,
14201 .model_id = SST_SST25VF010_REMS,
14202 .total_size = 128,
14203 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000014204 .feature_bits = FEATURE_WRSR_EWSR,
Mark Marshall90021f22010-12-03 14:48:11 +000014205 .tested = TEST_OK_PREW,
14206 .probe = probe_spi_rems,
14207 .probe_timing = TIMING_ZERO,
14208 .block_erasers =
14209 {
14210 {
14211 .eraseblocks = { {4 * 1024, 32} },
14212 .block_erase = spi_block_erase_20,
14213 }, {
14214 .eraseblocks = { {32 * 1024, 4} },
14215 .block_erase = spi_block_erase_52,
14216 }, {
Cory Henderson370f5822013-10-19 23:09:16 +000014217 .eraseblocks = { {32 * 1024, 4} },
Stefan Tauner6697f712014-08-06 15:09:15 +000014218 .block_erase = spi_block_erase_d8, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014219 }, {
Mark Marshall90021f22010-12-03 14:48:11 +000014220 .eraseblocks = { {128 * 1024, 1} },
14221 .block_erase = spi_block_erase_60,
Cory Henderson370f5822013-10-19 23:09:16 +000014222 }, {
14223 .eraseblocks = { {128 * 1024, 1} },
Stefan Tauner6697f712014-08-06 15:09:15 +000014224 .block_erase = spi_block_erase_c7, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014225 },
14226 },
14227 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14228 .unlock = spi_disable_blockprotect,
14229 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
Stefan Tauner6697f712014-08-06 15:09:15 +000014230 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014231 .voltage = {2700, 3600},
14232 },
14233
14234 {
14235 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014236 .name = "SST25VF016B",
14237 .bustype = BUS_SPI,
14238 .manufacture_id = SST_ID,
14239 .model_id = SST_SST25VF016B,
14240 .total_size = 2048,
14241 .page_size = 256,
14242 .feature_bits = FEATURE_WRSR_EITHER,
14243 .tested = TEST_OK_PREW,
14244 .probe = probe_spi_rdid,
14245 .probe_timing = TIMING_ZERO,
14246 .block_erasers =
14247 {
14248 {
14249 .eraseblocks = { {4 * 1024, 512} },
14250 .block_erase = spi_block_erase_20,
14251 }, {
14252 .eraseblocks = { {32 * 1024, 64} },
14253 .block_erase = spi_block_erase_52,
14254 }, {
14255 .eraseblocks = { {64 * 1024, 32} },
14256 .block_erase = spi_block_erase_d8,
14257 }, {
14258 .eraseblocks = { {2 * 1024 * 1024, 1} },
14259 .block_erase = spi_block_erase_60,
14260 }, {
14261 .eraseblocks = { {2 * 1024 * 1024, 1} },
14262 .block_erase = spi_block_erase_c7,
14263 },
14264 },
14265 .printlock = spi_prettyprint_status_register_sst25vf016,
14266 .unlock = spi_disable_blockprotect,
14267 .write = spi_aai_write,
14268 .read = spi_chip_read,
14269 .voltage = {2700, 3600},
14270 },
14271
14272 {
14273 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014274 .name = "SST25VF020",
14275 .bustype = BUS_SPI,
14276 .manufacture_id = SST_ID,
14277 .model_id = SST_SST25VF020_REMS,
14278 .total_size = 256,
14279 .page_size = 256,
14280 .feature_bits = FEATURE_WRSR_EWSR,
14281 .tested = TEST_UNTESTED,
14282 .probe = probe_spi_rems,
14283 .probe_timing = TIMING_ZERO,
14284 .block_erasers =
14285 {
14286 {
14287 .eraseblocks = { {4 * 1024, 64} },
14288 .block_erase = spi_block_erase_20,
14289 }, {
14290 .eraseblocks = { {32 * 1024, 8} },
14291 .block_erase = spi_block_erase_52,
14292 }, {
14293 .eraseblocks = { {256 * 1024, 1} },
14294 .block_erase = spi_block_erase_60,
14295 },
14296 },
14297 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14298 .unlock = spi_disable_blockprotect,
14299 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14300 .read = spi_chip_read, /* only */
14301 .voltage = {2700, 3600},
14302 },
14303
14304 {
14305 .vendor = "SST",
14306 .name = "SST25VF020B",
14307 .bustype = BUS_SPI,
14308 .manufacture_id = SST_ID,
14309 .model_id = SST_SST25VF020B,
14310 .total_size = 256,
14311 .page_size = 256,
14312 .feature_bits = FEATURE_WRSR_EWSR,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000014313 .tested = TEST_OK_PREW,
Cory Henderson370f5822013-10-19 23:09:16 +000014314 .probe = probe_spi_rdid,
14315 .probe_timing = TIMING_ZERO,
14316 .block_erasers =
14317 {
14318 {
14319 .eraseblocks = { {4 * 1024, 64} },
14320 .block_erase = spi_block_erase_20,
14321 }, {
14322 .eraseblocks = { {32 * 1024, 8} },
14323 .block_erase = spi_block_erase_52,
14324 }, {
14325 .eraseblocks = { {64 * 1024, 4} },
14326 .block_erase = spi_block_erase_d8,
14327 }, {
14328 .eraseblocks = { {256 * 1024, 1} },
14329 .block_erase = spi_block_erase_60,
14330 }, {
14331 .eraseblocks = { {256 * 1024, 1} },
14332 .block_erase = spi_block_erase_c7,
14333 },
14334 },
14335 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 and 2nd SR */
14336 .unlock = spi_disable_blockprotect, /* FIXME: 2nd SR */
14337 .write = spi_aai_write, /* AAI supported (0xAD) */
14338 .read = spi_chip_read, /* Fast read (0x0B) supported */
14339 .voltage = {2700, 3600},
14340 },
14341
14342 {
14343 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014344 .name = "SST25VF032B",
14345 .bustype = BUS_SPI,
14346 .manufacture_id = SST_ID,
14347 .model_id = SST_SST25VF032B,
14348 .total_size = 4096,
14349 .page_size = 256,
14350 .feature_bits = FEATURE_WRSR_EWSR,
14351 .tested = TEST_OK_PREW,
14352 .probe = probe_spi_rdid,
14353 .probe_timing = TIMING_ZERO,
14354 .block_erasers =
14355 {
14356 {
14357 .eraseblocks = { {4 * 1024, 1024} },
14358 .block_erase = spi_block_erase_20,
14359 }, {
14360 .eraseblocks = { {32 * 1024, 128} },
14361 .block_erase = spi_block_erase_52,
14362 }, {
14363 .eraseblocks = { {64 * 1024, 64} },
14364 .block_erase = spi_block_erase_d8,
14365 }, {
14366 .eraseblocks = { {4 * 1024 * 1024, 1} },
14367 .block_erase = spi_block_erase_60,
14368 }, {
14369 .eraseblocks = { {4 * 1024 * 1024, 1} },
14370 .block_erase = spi_block_erase_c7,
14371 },
14372 },
14373 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14374 .unlock = spi_disable_blockprotect,
14375 .write = spi_aai_write,
14376 .read = spi_chip_read,
14377 .voltage = {2700, 3600},
14378 },
14379
14380 {
14381 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014382 .name = "SST25VF040",
14383 .bustype = BUS_SPI,
14384 .manufacture_id = SST_ID,
14385 .model_id = SST_SST25VF040_REMS,
14386 .total_size = 512,
14387 .page_size = 256,
14388 .feature_bits = FEATURE_WRSR_EWSR,
14389 .tested = TEST_OK_PR,
14390 .probe = probe_spi_rems,
14391 .probe_timing = TIMING_ZERO,
14392 .block_erasers =
14393 {
14394 {
14395 .eraseblocks = { {4 * 1024, 128} },
14396 .block_erase = spi_block_erase_20,
14397 }, {
14398 .eraseblocks = { {32 * 1024, 16} },
14399 .block_erase = spi_block_erase_52,
14400 }, {
14401 .eraseblocks = { {512 * 1024, 1} },
14402 .block_erase = spi_block_erase_60,
Mark Marshall90021f22010-12-03 14:48:11 +000014403 },
14404 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014405 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Mark Marshall90021f22010-12-03 14:48:11 +000014406 .unlock = spi_disable_blockprotect,
Cory Henderson370f5822013-10-19 23:09:16 +000014407 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14408 .read = spi_chip_read,
14409 .voltage = {2700, 3600},
14410 },
14411
14412 {
14413 .vendor = "SST",
14414 .name = "SST25VF040B",
14415 .bustype = BUS_SPI,
14416 .manufacture_id = SST_ID,
14417 .model_id = SST_SST25VF040B,
14418 .total_size = 512,
14419 .page_size = 256,
14420 .feature_bits = FEATURE_WRSR_EWSR,
14421 .tested = TEST_OK_PREW,
14422 .probe = probe_spi_rdid,
14423 .probe_timing = TIMING_ZERO,
14424 .block_erasers =
14425 {
14426 {
14427 .eraseblocks = { {4 * 1024, 128} },
14428 .block_erase = spi_block_erase_20,
14429 }, {
14430 .eraseblocks = { {32 * 1024, 16} },
14431 .block_erase = spi_block_erase_52,
14432 }, {
14433 .eraseblocks = { {64 * 1024, 8} },
14434 .block_erase = spi_block_erase_d8,
14435 }, {
14436 .eraseblocks = { {512 * 1024, 1} },
14437 .block_erase = spi_block_erase_60,
14438 }, {
14439 .eraseblocks = { {512 * 1024, 1} },
14440 .block_erase = spi_block_erase_c7,
14441 },
14442 },
14443 .printlock = spi_prettyprint_status_register_sst25vf040b,
14444 .unlock = spi_disable_blockprotect,
14445 .write = spi_aai_write, /* AAI supported (0xAD) */
14446 .read = spi_chip_read, /* Fast read (0x0B) supported */
14447 .voltage = {2700, 3600},
14448 },
14449
14450 {
14451 .vendor = "SST",
14452 .name = "SST25VF040B.REMS",
14453 .bustype = BUS_SPI,
14454 .manufacture_id = SST_ID,
14455 .model_id = SST_SST25VF040B_REMS,
14456 .total_size = 512,
14457 .page_size = 256,
14458 .feature_bits = FEATURE_WRSR_EWSR,
14459 .tested = TEST_OK_PREW,
14460 .probe = probe_spi_rems,
14461 .probe_timing = TIMING_ZERO,
14462 .block_erasers =
14463 {
14464 {
14465 .eraseblocks = { {4 * 1024, 128} },
14466 .block_erase = spi_block_erase_20,
14467 }, {
14468 .eraseblocks = { {32 * 1024, 16} },
14469 .block_erase = spi_block_erase_52,
14470 }, {
14471 .eraseblocks = { {64 * 1024, 8} },
14472 .block_erase = spi_block_erase_d8,
14473 }, {
14474 .eraseblocks = { {512 * 1024, 1} },
14475 .block_erase = spi_block_erase_60,
14476 }, {
14477 .eraseblocks = { {512 * 1024, 1} },
14478 .block_erase = spi_block_erase_c7,
14479 },
14480 },
14481 .printlock = spi_prettyprint_status_register_sst25vf040b,
14482 .unlock = spi_disable_blockprotect,
14483 .write = spi_aai_write,
14484 .read = spi_chip_read,
14485 .voltage = {2700, 3600},
14486 },
14487
14488 {
14489 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014490 .name = "SST25VF064C",
Ben Gardnerbcf61092015-11-22 02:23:31 +000014491 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014492 .manufacture_id = SST_ID,
14493 .model_id = SST_SST25VF064C,
14494 .total_size = 8192,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014495 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014496 .feature_bits = FEATURE_WRSR_EWSR,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014497 .tested = TEST_OK_PREW,
14498 .probe = probe_spi_rdid,
14499 .probe_timing = TIMING_ZERO,
14500 .block_erasers =
14501 {
14502 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014503 .eraseblocks = { {4 * 1024, 2048} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014504 .block_erase = spi_block_erase_20,
14505 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014506 .eraseblocks = { {32 * 1024, 256} },
14507 .block_erase = spi_block_erase_52,
14508 }, {
14509 .eraseblocks = { {64 * 1024, 128} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014510 .block_erase = spi_block_erase_d8,
14511 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014512 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014513 .block_erase = spi_block_erase_60,
14514 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014515 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014516 .block_erase = spi_block_erase_c7,
14517 },
14518 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014519 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14520 .unlock = spi_disable_blockprotect,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014521 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014522 .read = spi_chip_read,
14523 .voltage = {2700, 3600},
Ben Gardnerbcf61092015-11-22 02:23:31 +000014524 },
14525
14526 {
14527 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014528 .name = "SST25VF080B",
14529 .bustype = BUS_SPI,
14530 .manufacture_id = SST_ID,
14531 .model_id = SST_SST25VF080B,
14532 .total_size = 1024,
14533 .page_size = 256,
14534 .feature_bits = FEATURE_WRSR_EWSR,
14535 .tested = TEST_OK_PREW,
14536 .probe = probe_spi_rdid,
14537 .probe_timing = TIMING_ZERO,
14538 .block_erasers =
14539 {
14540 {
14541 .eraseblocks = { {4 * 1024, 256} },
14542 .block_erase = spi_block_erase_20,
14543 }, {
14544 .eraseblocks = { {32 * 1024, 32} },
14545 .block_erase = spi_block_erase_52,
14546 }, {
14547 .eraseblocks = { {64 * 1024, 16} },
14548 .block_erase = spi_block_erase_d8,
14549 }, {
14550 .eraseblocks = { {1024 * 1024, 1} },
14551 .block_erase = spi_block_erase_60,
14552 }, {
14553 .eraseblocks = { {1024 * 1024, 1} },
14554 .block_erase = spi_block_erase_c7,
14555 },
14556 },
14557 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14558 .unlock = spi_disable_blockprotect,
14559 .write = spi_aai_write,
Mark Marshall90021f22010-12-03 14:48:11 +000014560 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +000014561 .voltage = {2700, 3600},
Mark Marshall90021f22010-12-03 14:48:11 +000014562 },
14563
14564 {
14565 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014566 .name = "SST25VF512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014567 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014568 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014569 .model_id = SST_SST25VF512_REMS,
14570 .total_size = 64,
14571 .page_size = 256,
14572 .feature_bits = FEATURE_WRSR_EWSR,
14573 .tested = TEST_OK_PREW,
14574 .probe = probe_spi_rems,
14575 .probe_timing = TIMING_ZERO,
14576 .block_erasers =
14577 {
14578 {
14579 .eraseblocks = { {4 * 1024, 16} },
14580 .block_erase = spi_block_erase_20,
14581 }, {
14582 .eraseblocks = { {32 * 1024, 2} },
14583 .block_erase = spi_block_erase_52,
14584 }, {
14585 .eraseblocks = { {32 * 1024, 2} },
14586 .block_erase = spi_block_erase_d8, /* Supported by SST25VF512A only */
14587 }, {
14588 .eraseblocks = { {64 * 1024, 1} },
14589 .block_erase = spi_block_erase_60,
14590 }, {
14591 .eraseblocks = { {64 * 1024, 1} },
14592 .block_erase = spi_block_erase_c7, /* Supported by SST25VF512A only */
14593 },
14594 },
14595 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14596 .unlock = spi_disable_blockprotect,
14597 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14598 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF512A only */
14599 .voltage = {2700, 3600},
14600 },
14601
14602 {
14603 .vendor = "SST",
14604 .name = "SST25WF010",
14605 .bustype = BUS_SPI,
14606 .manufacture_id = SST_ID,
14607 .model_id = SST_SST25WF010,
14608 .total_size = 128,
14609 .page_size = 256,
14610 .feature_bits = FEATURE_WRSR_EITHER,
14611 .tested = TEST_UNTESTED,
14612 .probe = probe_spi_rdid,
14613 .probe_timing = TIMING_ZERO,
14614 .block_erasers =
14615 {
14616 {
14617 .eraseblocks = { {4 * 1024, 32} },
14618 .block_erase = spi_block_erase_20,
14619 }, {
14620 .eraseblocks = { {32 * 1024, 4} },
14621 .block_erase = spi_block_erase_52,
14622 }, {
14623 .eraseblocks = { {1024 * 128, 1} },
14624 .block_erase = spi_block_erase_60,
14625 }, {
14626 .eraseblocks = { {1024 * 128, 1} },
14627 .block_erase = spi_block_erase_c7,
14628 },
14629 },
14630 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14631 .unlock = spi_disable_blockprotect_bp2_srwd,
14632 .write = spi_aai_write,
14633 .read = spi_chip_read, /* Fast read (0x0B) supported */
14634 .voltage = {1650, 1950},
14635 },
14636
14637 {
14638 .vendor = "SST",
14639 .name = "SST25WF020",
14640 .bustype = BUS_SPI,
14641 .manufacture_id = SST_ID,
14642 .model_id = SST_SST25WF020,
14643 .total_size = 256,
14644 .page_size = 256,
14645 .feature_bits = FEATURE_WRSR_EITHER,
14646 .tested = TEST_UNTESTED,
14647 .probe = probe_spi_rdid,
14648 .probe_timing = TIMING_ZERO,
14649 .block_erasers =
14650 {
14651 {
14652 .eraseblocks = { {4 * 1024, 64} },
14653 .block_erase = spi_block_erase_20,
14654 }, {
14655 .eraseblocks = { {32 * 1024, 8} },
14656 .block_erase = spi_block_erase_52,
14657 }, {
14658 .eraseblocks = { {64 * 1024, 4} },
14659 .block_erase = spi_block_erase_d8,
14660 }, {
14661 .eraseblocks = { {1024 * 256, 1} },
14662 .block_erase = spi_block_erase_60,
14663 }, {
14664 .eraseblocks = { {1024 * 256, 1} },
14665 .block_erase = spi_block_erase_c7,
14666 },
14667 },
14668 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14669 .unlock = spi_disable_blockprotect_bp2_srwd,
14670 .write = spi_aai_write,
14671 .read = spi_chip_read, /* Fast read (0x0B) supported */
14672 .voltage = {1650, 1950},
14673 },
14674
14675 {
14676 .vendor = "SST",
14677 .name = "SST25WF020A",
14678 .bustype = BUS_SPI,
14679 .manufacture_id = SANYO_ID, /* See flashchips.h */
14680 .model_id = SST_SST25WF020A,
14681 .total_size = 256,
14682 .page_size = 256,
14683 .feature_bits = FEATURE_WRSR_WREN,
14684 .tested = TEST_UNTESTED,
14685 .probe = probe_spi_rdid,
14686 .probe_timing = TIMING_ZERO,
14687 .block_erasers =
14688 {
14689 {
14690 .eraseblocks = { {4 * 1024, 64} },
14691 .block_erase = spi_block_erase_20,
14692 }, {
14693 .eraseblocks = { {64 * 1024, 4} },
14694 .block_erase = spi_block_erase_d8,
14695 }, {
14696 .eraseblocks = { {256 * 1024, 1} },
14697 .block_erase = spi_block_erase_60,
14698 }, {
14699 .eraseblocks = { {256 * 1024, 1} },
14700 .block_erase = spi_block_erase_c7,
14701 },
14702 },
14703 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14704 .unlock = spi_disable_blockprotect_bp2_srwd,
14705 .write = spi_chip_write_256,
14706 .read = spi_chip_read, /* Fast read (0x0B) supported */
14707 .voltage = {1650, 1950},
14708 },
14709
14710 {
14711 .vendor = "SST",
14712 .name = "SST25WF040",
14713 .bustype = BUS_SPI,
14714 .manufacture_id = SST_ID,
14715 .model_id = SST_SST25WF040,
14716 .total_size = 512,
14717 .page_size = 256,
14718 .feature_bits = FEATURE_WRSR_EITHER,
14719 .tested = TEST_UNTESTED,
14720 .probe = probe_spi_rdid,
14721 .probe_timing = TIMING_ZERO,
14722 .block_erasers =
14723 {
14724 {
14725 .eraseblocks = { {4 * 1024, 128} },
14726 .block_erase = spi_block_erase_20,
14727 }, {
14728 .eraseblocks = { {32 * 1024, 16} },
14729 .block_erase = spi_block_erase_52,
14730 }, {
14731 .eraseblocks = { {64 * 1024, 8} },
14732 .block_erase = spi_block_erase_d8,
14733 }, {
14734 .eraseblocks = { {1024 * 512, 1} },
14735 .block_erase = spi_block_erase_60,
14736 }, {
14737 .eraseblocks = { {1024 * 512, 1} },
14738 .block_erase = spi_block_erase_c7,
14739 },
14740 },
14741 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14742 .unlock = spi_disable_blockprotect_bp2_srwd,
14743 .write = spi_aai_write,
14744 .read = spi_chip_read, /* Fast read (0x0B) supported */
14745 .voltage = {1650, 1950},
14746 },
14747
14748 {
14749 .vendor = "SST",
14750 .name = "SST25WF040B",
14751 .bustype = BUS_SPI,
14752 .manufacture_id = SANYO_ID, /* See flashchips.h */
14753 .model_id = SST_SST25WF040B,
14754 .total_size = 512,
14755 .page_size = 256,
14756 .feature_bits = FEATURE_WRSR_WREN,
14757 .tested = TEST_UNTESTED,
14758 .probe = probe_spi_rdid,
14759 .probe_timing = TIMING_ZERO,
14760 .block_erasers =
14761 {
14762 {
14763 .eraseblocks = { {4 * 1024, 128} },
14764 .block_erase = spi_block_erase_20,
14765 }, {
14766 .eraseblocks = { {64 * 1024, 8} },
14767 .block_erase = spi_block_erase_d8,
14768 }, {
14769 .eraseblocks = { {512 * 1024, 1} },
14770 .block_erase = spi_block_erase_60,
14771 }, {
14772 .eraseblocks = { {512 * 1024, 1} },
14773 .block_erase = spi_block_erase_c7,
14774 },
14775 },
14776 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14777 .unlock = spi_disable_blockprotect_bp2_srwd,
14778 .write = spi_chip_write_256,
14779 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
14780 .voltage = {1650, 1950},
14781 },
14782
14783 {
14784 .vendor = "SST",
14785 .name = "SST25WF080",
14786 .bustype = BUS_SPI,
14787 .manufacture_id = SST_ID,
14788 .model_id = SST_SST25WF080,
14789 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014790 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000014791 .feature_bits = FEATURE_WRSR_EITHER,
Mark Marshall90021f22010-12-03 14:48:11 +000014792 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014793 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000014794 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014795 .block_erasers =
14796 {
14797 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014798 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014799 .block_erase = spi_block_erase_20,
14800 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014801 .eraseblocks = { {32 * 1024, 32} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014802 .block_erase = spi_block_erase_52,
14803 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014804 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014805 .block_erase = spi_block_erase_d8,
14806 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014807 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014808 .block_erase = spi_block_erase_60,
14809 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014810 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014811 .block_erase = spi_block_erase_c7,
14812 },
14813 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014814 .printlock = spi_prettyprint_status_register_sst25, /* *does* have a BP3 but it is useless */
14815 .unlock = spi_disable_blockprotect_bp3_srwd,
Joshua Roys87955bf2011-08-01 18:39:28 +000014816 .write = spi_aai_write,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014817 .read = spi_chip_read, /* Fast read (0x0B) supported */
14818 .voltage = {1650, 1950},
FENG yu ningff692fb2008-12-08 18:15:10 +000014819 },
14820
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014821 {
14822 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014823 .name = "SST25WF080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014824 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014825 .manufacture_id = SANYO_ID, /* See flashchips.h */
14826 .model_id = SST_SST25WF080B,
14827 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014828 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014829 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerfcf6a8c2011-05-18 01:32:00 +000014830 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014831 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000014832 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014833 .block_erasers =
14834 {
14835 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014836 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014837 .block_erase = spi_block_erase_20,
14838 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014839 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014840 .block_erase = spi_block_erase_d8,
14841 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014842 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014843 .block_erase = spi_block_erase_60,
14844 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014845 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014846 .block_erase = spi_block_erase_c7,
14847 },
14848 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014849 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14850 .unlock = spi_disable_blockprotect_bp2_srwd,
Helge Wagner1db7a442010-10-05 22:29:08 +000014851 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014852 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
14853 .voltage = {1650, 1950},
14854 },
14855
14856 {
14857 .vendor = "SST",
14858 .name = "SST25WF512",
14859 .bustype = BUS_SPI,
14860 .manufacture_id = SST_ID,
14861 .model_id = SST_SST25WF512,
14862 .total_size = 64,
14863 .page_size = 256,
14864 .feature_bits = FEATURE_WRSR_EITHER,
14865 .tested = TEST_UNTESTED,
14866 .probe = probe_spi_rdid,
14867 .probe_timing = TIMING_ZERO,
14868 .block_erasers =
14869 {
14870 {
14871 .eraseblocks = { {4 * 1024, 16} },
14872 .block_erase = spi_block_erase_20,
14873 }, {
14874 .eraseblocks = { {32 * 1024, 2} },
14875 .block_erase = spi_block_erase_52,
14876 }, {
14877 .eraseblocks = { {1024 * 64, 1} },
14878 .block_erase = spi_block_erase_60,
14879 }, {
14880 .eraseblocks = { {1024 * 64, 1} },
14881 .block_erase = spi_block_erase_c7,
14882 },
14883 },
14884 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14885 .unlock = spi_disable_blockprotect_bp2_srwd,
14886 .write = spi_aai_write,
14887 .read = spi_chip_read, /* Fast read (0x0B) supported */
14888 .voltage = {1650, 1950},
Ed Swierk86f4e6d2010-07-21 15:02:22 +000014889 },
14890
14891 {
14892 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010014893 .name = "SST26VF016",
14894 .bustype = BUS_SPI,
14895 .manufacture_id = SST_ID,
14896 .model_id = SST_SST26VF016,
14897 .total_size = 2048,
14898 .page_size = 256,
14899 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14900 .tested = TEST_UNTESTED,
14901 .probe = probe_spi_rdid,
14902 .probe_timing = TIMING_ZERO,
14903 .block_erasers =
14904 {
14905 {
14906 .eraseblocks = { {4 * 1024, 512} },
14907 .block_erase = spi_block_erase_20,
14908 }, {
14909 .eraseblocks = {
14910 {8 * 1024, 4},
14911 {32 * 1024, 1},
14912 {64 * 1024, 30},
14913 {32 * 1024, 1},
14914 {8 * 1024, 4},
14915 },
14916 .block_erase = spi_block_erase_d8,
14917 }, {
14918 .eraseblocks = { {2 * 1024 * 1024, 1} },
14919 .block_erase = spi_block_erase_c7,
14920 },
14921 },
14922 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
14923 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
14924 .write = spi_chip_write_256, /* Multi I/O supported */
14925 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14926 .voltage = {2700, 3600},
14927 },
14928
14929 {
14930 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070014931 .name = "SST26VF016B(A)",
14932 .bustype = BUS_SPI,
14933 .manufacture_id = SST_ID,
14934 .model_id = SST_SST26VF016B,
14935 .total_size = 2048,
14936 .page_size = 256,
14937 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14938 .tested = TEST_OK_PREW,
14939 .probe = probe_spi_rdid,
14940 .probe_timing = TIMING_ZERO,
14941 .block_erasers =
14942 {
14943 {
14944 .eraseblocks = { {4 * 1024, 512} },
14945 .block_erase = spi_block_erase_20,
14946 }, {
14947 .eraseblocks = {
14948 {8 * 1024, 4},
14949 {32 * 1024, 1},
14950 {64 * 1024, 30},
14951 {32 * 1024, 1},
14952 {8 * 1024, 4},
14953 },
14954 .block_erase = spi_block_erase_d8,
14955 }, {
14956 .eraseblocks = { {2 * 1024 * 1024, 1} },
14957 .block_erase = spi_block_erase_c7,
14958 },
14959 },
14960 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
14961 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
14962 .write = spi_chip_write_256, /* Multi I/O supported */
14963 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14964 .voltage = {2700, 3600},
14965 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100014966
Wei Hu25584de2018-04-30 14:02:08 -070014967 {
14968 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010014969 .name = "SST26VF032",
14970 .bustype = BUS_SPI,
14971 .manufacture_id = SST_ID,
14972 .model_id = SST_SST26VF032,
14973 .total_size = 4096,
14974 .page_size = 256,
14975 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14976 .tested = TEST_UNTESTED,
14977 .probe = probe_spi_rdid,
14978 .probe_timing = TIMING_ZERO,
14979 .block_erasers =
14980 {
14981 {
14982 .eraseblocks = { {4 * 1024, 1024} },
14983 .block_erase = spi_block_erase_20,
14984 }, {
14985 .eraseblocks = {
14986 {8 * 1024, 4},
14987 {32 * 1024, 1},
14988 {64 * 1024, 62},
14989 {32 * 1024, 1},
14990 {8 * 1024, 4},
14991 },
14992 .block_erase = spi_block_erase_d8,
14993 }, {
14994 .eraseblocks = { {4 * 1024 * 1024, 1} },
14995 .block_erase = spi_block_erase_c7,
14996 },
14997 },
14998 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
14999 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15000 .write = spi_chip_write_256, /* Multi I/O supported */
15001 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15002 .voltage = {2700, 3600},
15003 },
15004
15005 {
15006 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070015007 .name = "SST26VF032B(A)",
15008 .bustype = BUS_SPI,
15009 .manufacture_id = SST_ID,
15010 .model_id = SST_SST26VF032B,
15011 .total_size = 4096,
15012 .page_size = 256,
15013 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15014 .tested = TEST_UNTESTED,
15015 .probe = probe_spi_rdid,
15016 .probe_timing = TIMING_ZERO,
15017 .block_erasers =
15018 {
15019 {
15020 .eraseblocks = { {4 * 1024, 1024} },
15021 .block_erase = spi_block_erase_20,
15022 }, {
15023 .eraseblocks = {
15024 {8 * 1024, 4},
15025 {32 * 1024, 1},
15026 {64 * 1024, 62},
15027 {32 * 1024, 1},
15028 {8 * 1024, 4},
15029 },
15030 .block_erase = spi_block_erase_d8,
15031 }, {
15032 .eraseblocks = { {4 * 1024 * 1024, 1} },
15033 .block_erase = spi_block_erase_c7,
15034 },
15035 },
15036 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
15037 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15038 .write = spi_chip_write_256, /* Multi I/O supported */
15039 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15040 .voltage = {2700, 3600},
15041 },
15042
Wei Hu25584de2018-04-30 14:02:08 -070015043 {
15044 .vendor = "SST",
15045 .name = "SST26VF064B(A)",
15046 .bustype = BUS_SPI,
15047 .manufacture_id = SST_ID,
15048 .model_id = SST_SST26VF064B,
15049 .total_size = 8192,
15050 .page_size = 256,
15051 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15052 .tested = TEST_OK_PREW,
15053 .probe = probe_spi_rdid,
15054 .probe_timing = TIMING_ZERO,
15055 .block_erasers =
15056 {
15057 {
15058 .eraseblocks = { {4 * 1024, 2048} },
15059 .block_erase = spi_block_erase_20,
15060 }, {
15061 .eraseblocks = {
15062 {8 * 1024, 4},
15063 {32 * 1024, 1},
15064 {64 * 1024, 126},
15065 {32 * 1024, 1},
15066 {8 * 1024, 4},
15067 },
15068 .block_erase = spi_block_erase_d8,
15069 }, {
15070 .eraseblocks = { {8 * 1024 * 1024, 1} },
15071 .block_erase = spi_block_erase_c7,
15072 },
15073 },
15074 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
15075 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15076 .write = spi_chip_write_256, /* Multi I/O supported */
15077 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15078 .voltage = {2700, 3600},
15079 },
15080
15081 {
15082 .vendor = "SST",
Nico Huberd4e41d32024-10-18 14:59:54 +020015083 .name = "SST26VF080A",
15084 .bustype = BUS_SPI,
15085 .manufacture_id = SST_ID,
15086 .model_id = SST_SST26VF080A,
15087 .total_size = 1024,
15088 .page_size = 256,
15089 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15090 .tested = TEST_UNTESTED,
15091 .probe = probe_spi_rdid,
15092 .probe_timing = TIMING_ZERO,
15093 .block_erasers =
15094 {
15095 {
15096 .eraseblocks = { {4 * 1024, 256} },
15097 .block_erase = spi_block_erase_20,
15098 }, {
15099 .eraseblocks = { {32 * 1024, 32} },
15100 .block_erase = spi_block_erase_52,
15101 }, {
15102 .eraseblocks = { {64 * 1024, 16} },
15103 .block_erase = spi_block_erase_d8,
15104 }, {
15105 .eraseblocks = { {1024 * 1024, 1} },
15106 .block_erase = spi_block_erase_60,
15107 }, {
15108 .eraseblocks = { {1024 * 1024, 1} },
15109 .block_erase = spi_block_erase_c7,
15110 },
15111 },
15112 .printlock = spi_prettyprint_status_register_bp3_srwd,
15113 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15114 .write = spi_chip_write_256, /* Multi I/O supported */
15115 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15116 .voltage = {2700, 3600},
15117 },
15118
15119 {
15120 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015121 .name = "SST28SF040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015122 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015123 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015124 .model_id = SST_SST28SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015125 .total_size = 512,
15126 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000015127 .feature_bits = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015128 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015129 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015130 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst28sf040.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015131 .block_erasers =
15132 {
15133 {
15134 .eraseblocks = { {128, 4096} },
15135 .block_erase = erase_sector_28sf040,
15136 }, {
15137 .eraseblocks = { {512 * 1024, 1} },
15138 .block_erase = erase_chip_28sf040,
15139 }
15140 },
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015141 .unlock = unprotect_28sf040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015142 .write = write_28sf040,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015143 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015144 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015145 .prepare_access = prepare_memory_access,
15146 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015147 },
15148
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015149 {
15150 .vendor = "SST",
15151 .name = "SST29EE010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015152 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015153 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015154 .model_id = SST_SST29EE010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015155 .total_size = 128,
15156 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015157 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015158 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015159 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015160 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015161 .block_erasers =
15162 {
15163 {
15164 .eraseblocks = { {128 * 1024, 1} },
15165 .block_erase = erase_chip_block_jedec,
15166 }
15167 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015168 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015169 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015170 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015171 .prepare_access = prepare_memory_access,
15172 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015173 },
15174
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015175 {
15176 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015177 .name = "SST29EE020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015178 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015179 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015180 .model_id = SST_SST29EE020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015181 .total_size = 256,
15182 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015183 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015184 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015185 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000015186 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015187 .block_erasers =
15188 {
15189 {
15190 .eraseblocks = { {256 * 1024, 1} },
15191 .block_erase = erase_chip_block_jedec,
15192 }
15193 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015194 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015195 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015196 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015197 .prepare_access = prepare_memory_access,
15198 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015199 },
15200
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015201 {
15202 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015203 .name = "SST29LE010",
15204 .bustype = BUS_PARALLEL,
15205 .manufacture_id = SST_ID,
15206 .model_id = SST_SST29LE010,
15207 .total_size = 128,
15208 .page_size = 128,
15209 .feature_bits = FEATURE_LONG_RESET,
15210 .tested = TEST_UNTESTED,
15211 .probe = probe_jedec,
15212 .probe_timing = 10,
15213 .block_erasers =
15214 {
15215 {
15216 .eraseblocks = { {128 * 1024, 1} },
15217 .block_erase = erase_chip_block_jedec,
15218 }
15219 },
15220 .write = write_jedec,
15221 .read = read_memmapped,
15222 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015223 .prepare_access = prepare_memory_access,
15224 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015225 },
15226
15227 {
15228 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015229 .name = "SST29LE020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015230 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015231 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015232 .model_id = SST_SST29LE020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015233 .total_size = 256,
15234 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015235 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015236 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015237 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015238 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015239 .block_erasers =
15240 {
15241 {
15242 .eraseblocks = { {256 * 1024, 1} },
15243 .block_erase = erase_chip_block_jedec,
15244 }
15245 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015246 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015247 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015248 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015249 .prepare_access = prepare_memory_access,
15250 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015251 },
15252
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015253 {
15254 .vendor = "SST",
15255 .name = "SST39SF010A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015256 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015257 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015258 .model_id = SST_SST39SF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015259 .total_size = 128,
15260 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015261 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000015262 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015263 .probe = probe_jedec,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000015264 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015265 .block_erasers =
15266 {
15267 {
15268 .eraseblocks = { {4 * 1024, 32} },
15269 .block_erase = erase_sector_jedec,
15270 }, {
15271 .eraseblocks = { {128 * 1024, 1} },
15272 .block_erase = erase_chip_block_jedec,
15273 }
15274 },
Sean Nelson35727f72010-01-28 23:55:12 +000015275 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015276 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015277 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015278 .prepare_access = prepare_memory_access,
15279 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015280 },
15281
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015282 {
15283 .vendor = "SST",
15284 .name = "SST39SF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015285 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015286 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015287 .model_id = SST_SST39SF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015288 .total_size = 256,
15289 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015290 .feature_bits = FEATURE_EITHER_RESET,
Uwe Hermann19f46f22011-06-18 22:56:14 +000015291 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015292 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015293 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015294 .block_erasers =
15295 {
15296 {
15297 .eraseblocks = { {4 * 1024, 64} },
15298 .block_erase = erase_sector_jedec,
15299 }, {
15300 .eraseblocks = { {256 * 1024, 1} },
15301 .block_erase = erase_chip_block_jedec,
15302 }
15303 },
Sean Nelson35727f72010-01-28 23:55:12 +000015304 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015305 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015306 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015307 .prepare_access = prepare_memory_access,
15308 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015309 },
15310
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015311 {
15312 .vendor = "SST",
15313 .name = "SST39SF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015314 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015315 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015316 .model_id = SST_SST39SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015317 .total_size = 512,
15318 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015319 .feature_bits = FEATURE_EITHER_RESET,
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000015320 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015321 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015322 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015323 .block_erasers =
15324 {
15325 {
15326 .eraseblocks = { {4 * 1024, 128} },
15327 .block_erase = erase_sector_jedec,
15328 }, {
15329 .eraseblocks = { {512 * 1024, 1} },
15330 .block_erase = erase_chip_block_jedec,
15331 }
15332 },
Sean Nelson35727f72010-01-28 23:55:12 +000015333 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015334 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015335 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015336 .prepare_access = prepare_memory_access,
15337 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015338 },
15339
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015340 {
15341 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015342 .name = "SST39SF512",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015343 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015344 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015345 .model_id = SST_SST39SF512,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015346 .total_size = 64,
15347 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015348 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd7d423b2012-10-20 09:13:16 +000015349 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015350 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015351 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015352 .block_erasers =
15353 {
15354 {
15355 .eraseblocks = { {4 * 1024, 16} },
15356 .block_erase = erase_sector_jedec,
15357 }, {
15358 .eraseblocks = { {64 * 1024, 1} },
15359 .block_erase = erase_chip_block_jedec,
15360 }
15361 },
Sean Nelson35727f72010-01-28 23:55:12 +000015362 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015363 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015364 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015365 .prepare_access = prepare_memory_access,
15366 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015367 },
15368
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015369 {
15370 .vendor = "SST",
15371 .name = "SST39VF010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015372 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015373 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015374 .model_id = SST_SST39VF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015375 .total_size = 128,
15376 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015377 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd94d25d2012-07-28 03:17:15 +000015378 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015379 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015380 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015381 .block_erasers =
15382 {
15383 {
15384 .eraseblocks = { {4 * 1024, 32} },
15385 .block_erase = erase_sector_jedec,
15386 }, {
15387 .eraseblocks = { {128 * 1024, 1} },
15388 .block_erase = erase_chip_block_jedec,
15389 }
15390 },
Sean Nelson35727f72010-01-28 23:55:12 +000015391 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015392 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015393 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015394 .prepare_access = prepare_memory_access,
15395 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015396 },
15397
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015398 {
15399 .vendor = "SST",
15400 .name = "SST39VF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015401 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015402 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015403 .model_id = SST_SST39VF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015404 .total_size = 256,
15405 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015406 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner5c316f92015-02-08 21:57:52 +000015407 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015408 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015409 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015410 .block_erasers =
15411 {
15412 {
15413 .eraseblocks = { {4 * 1024, 64} },
15414 .block_erase = erase_sector_jedec,
15415 }, {
15416 .eraseblocks = { {256 * 1024, 1} },
15417 .block_erase = erase_chip_block_jedec,
15418 }
15419 },
Sean Nelson35727f72010-01-28 23:55:12 +000015420 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015421 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015422 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015423 .prepare_access = prepare_memory_access,
15424 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015425 },
15426
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015427 {
15428 .vendor = "SST",
15429 .name = "SST39VF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015430 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015431 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015432 .model_id = SST_SST39VF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015433 .total_size = 512,
15434 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015435 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015436 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015437 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015438 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015439 .block_erasers =
15440 {
15441 {
15442 .eraseblocks = { {4 * 1024, 128} },
15443 .block_erase = erase_sector_jedec,
15444 }, {
15445 .eraseblocks = { {512 * 1024, 1} },
15446 .block_erase = erase_chip_block_jedec,
15447 }
15448 },
Sean Nelson35727f72010-01-28 23:55:12 +000015449 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015450 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015451 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015452 .prepare_access = prepare_memory_access,
15453 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger90eff152008-12-08 23:51:45 +000015454 },
FENG yu ningff692fb2008-12-08 18:15:10 +000015455
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015456 {
15457 .vendor = "SST",
Peter Stuge8440cc02009-01-25 23:55:12 +000015458 .name = "SST39VF080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015459 .bustype = BUS_PARALLEL,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000015460 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015461 .model_id = SST_SST39VF080,
Peter Stuge8440cc02009-01-25 23:55:12 +000015462 .total_size = 1024,
15463 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015464 .feature_bits = FEATURE_EITHER_RESET,
Peter Stuge8440cc02009-01-25 23:55:12 +000015465 .tested = TEST_UNTESTED,
15466 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015467 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015468 .block_erasers =
15469 {
15470 {
15471 .eraseblocks = { {4 * 1024, 256} },
15472 .block_erase = erase_sector_jedec,
15473 }, {
15474 .eraseblocks = { {64 * 1024, 16} },
15475 .block_erase = erase_block_jedec,
15476 }, {
15477 .eraseblocks = { {1024 * 1024, 1} },
15478 .block_erase = erase_chip_block_jedec,
15479 }
15480 },
Sean Nelson35727f72010-01-28 23:55:12 +000015481 .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 = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015484 .prepare_access = prepare_memory_access,
15485 .finish_access = finish_memory_access,
Peter Stuge8440cc02009-01-25 23:55:12 +000015486 },
15487
15488 {
15489 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015490 .name = "SST39VF512",
15491 .bustype = BUS_PARALLEL,
15492 .manufacture_id = SST_ID,
15493 .model_id = SST_SST39VF512,
15494 .total_size = 64,
15495 .page_size = 4096,
15496 .feature_bits = FEATURE_EITHER_RESET,
15497 .tested = TEST_OK_PREW,
15498 .probe = probe_jedec,
15499 .probe_timing = 1, /* 150 ns */
15500 .block_erasers =
15501 {
15502 {
15503 .eraseblocks = { {4 * 1024, 16} },
15504 .block_erase = erase_sector_jedec,
15505 }, {
15506 .eraseblocks = { {64 * 1024, 1} },
15507 .block_erase = erase_chip_block_jedec,
15508 }
15509 },
15510 .write = write_jedec_1,
15511 .read = read_memmapped,
15512 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015513 .prepare_access = prepare_memory_access,
15514 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015515 },
15516
15517 {
15518 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015519 .name = "SST49LF002A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015520 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015521 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015522 .model_id = SST_SST49LF002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015523 .total_size = 256,
15524 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015525 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000015526 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015527 .probe = probe_jedec,
15528 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015529 .block_erasers =
15530 {
15531 {
15532 .eraseblocks = { {4 * 1024, 64} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015533 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015534 }, {
15535 .eraseblocks = { {16 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015536 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015537 }, {
15538 .eraseblocks = { {256 * 1024, 1} },
15539 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15540 }
15541 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015542 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015543 .unlock = unlock_sst_fwhub,
15544 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015545 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015546 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015547 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015548 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015549 },
15550
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015551 {
15552 .vendor = "SST",
15553 .name = "SST49LF003A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015554 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015555 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015556 .model_id = SST_SST49LF003A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015557 .total_size = 384,
15558 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015559 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000015560 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015561 .probe = probe_jedec,
15562 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015563 .block_erasers =
15564 {
15565 {
15566 .eraseblocks = { {4 * 1024, 96} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015567 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015568 }, {
15569 .eraseblocks = { {64 * 1024, 6} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015570 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015571 }, {
15572 .eraseblocks = { {384 * 1024, 1} },
15573 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15574 }
15575 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015576 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015577 .unlock = unlock_sst_fwhub,
15578 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015579 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015580 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015581 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015582 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015583 },
15584
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015585 {
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015586 /* Contrary to the data sheet, TBL# on the SST49LF004B affects the top 128kB (instead of 64kB)
15587 * and is only honored for 64k block erase, but not 4k sector erase.
15588 */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015589 .vendor = "SST",
15590 .name = "SST49LF004A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015591 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015592 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015593 .model_id = SST_SST49LF004A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015594 .total_size = 512,
15595 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015596 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000015597 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015598 .probe = probe_jedec,
15599 .probe_timing = 1, /* 150 ns */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015600 .block_erasers =
15601 {
15602 {
15603 .eraseblocks = { {4 * 1024, 128} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015604 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015605 }, {
15606 .eraseblocks = { {64 * 1024, 8} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015607 .block_erase = erase_block_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015608 }, {
15609 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson51c83fb2010-01-20 20:55:53 +000015610 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015611 },
15612 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015613 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015614 .unlock = unlock_sst_fwhub,
15615 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015616 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015617 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015618 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015619 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015620 },
15621
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015622 {
15623 .vendor = "SST",
15624 .name = "SST49LF004C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015625 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015626 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015627 .model_id = SST_SST49LF004C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015628 .total_size = 512,
15629 .page_size = 4 * 1024,
15630 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015631 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015632 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015633 .block_erasers =
15634 {
15635 {
15636 .eraseblocks = { {4 * 1024, 128} },
15637 .block_erase = erase_sector_49lfxxxc,
15638 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015639 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015640 {64 * 1024, 7},
15641 {32 * 1024, 1},
15642 {8 * 1024, 2},
15643 {16 * 1024, 1},
15644 },
Sean Nelson69e58112010-03-23 17:10:28 +000015645 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015646 }
15647 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015648 .printlock = printlock_regspace2_block_eraser_1,
15649 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015650 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015651 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015652 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015653 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015654 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015655 },
15656
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015657 {
15658 .vendor = "SST",
15659 .name = "SST49LF008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015660 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015661 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015662 .model_id = SST_SST49LF008A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015663 .total_size = 1024,
15664 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015665 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000015666 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015667 .probe = probe_jedec,
15668 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015669 .block_erasers =
15670 {
15671 {
15672 .eraseblocks = { {4 * 1024, 256} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015673 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015674 }, {
15675 .eraseblocks = { {64 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015676 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015677 }, {
15678 .eraseblocks = { {1024 * 1024, 1} },
15679 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15680 }
15681 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015682 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015683 .unlock = unlock_sst_fwhub,
15684 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015685 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015686 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015687 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015688 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015689 },
15690
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015691 {
15692 .vendor = "SST",
15693 .name = "SST49LF008C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015694 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015695 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015696 .model_id = SST_SST49LF008C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015697 .total_size = 1024,
15698 .page_size = 4 * 1024,
15699 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015700 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015701 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015702 .block_erasers =
15703 {
15704 {
15705 .eraseblocks = { {4 * 1024, 256} },
15706 .block_erase = erase_sector_49lfxxxc,
15707 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015708 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015709 {64 * 1024, 15},
15710 {32 * 1024, 1},
15711 {8 * 1024, 2},
15712 {16 * 1024, 1},
15713 },
Sean Nelson69e58112010-03-23 17:10:28 +000015714 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015715 }
15716 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015717 .printlock = printlock_regspace2_block_eraser_1,
15718 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015719 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015720 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015721 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015722 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015723 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015724 },
15725
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015726 {
15727 .vendor = "SST",
15728 .name = "SST49LF016C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015729 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015730 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015731 .model_id = SST_SST49LF016C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015732 .total_size = 2048,
15733 .page_size = 4 * 1024,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015734 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015735 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015736 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015737 .block_erasers =
15738 {
15739 {
15740 .eraseblocks = { {4 * 1024, 512} },
15741 .block_erase = erase_sector_49lfxxxc,
15742 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015743 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015744 {64 * 1024, 31},
15745 {32 * 1024, 1},
15746 {8 * 1024, 2},
15747 {16 * 1024, 1},
15748 },
Sean Nelson69e58112010-03-23 17:10:28 +000015749 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015750 }
15751 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015752 .printlock = printlock_regspace2_block_eraser_1,
15753 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015754 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015755 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015756 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015757 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015758 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015759 },
15760
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015761 {
15762 .vendor = "SST",
15763 .name = "SST49LF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015764 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015765 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015766 .model_id = SST_SST49LF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015767 .total_size = 256,
15768 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015769 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner8179be52011-06-04 13:13:34 +000015770 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015771 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015772 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015773 .block_erasers =
15774 {
15775 {
15776 .eraseblocks = { {4 * 1024, 64} },
15777 .block_erase = erase_sector_jedec,
15778 }, {
15779 .eraseblocks = { {16 * 1024, 16} },
15780 .block_erase = erase_block_jedec,
15781 }, {
15782 .eraseblocks = { {256 * 1024, 1} },
15783 .block_erase = NULL,
15784 }
15785 },
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 Huber9eec4072023-01-12 01:17:30 +010015789 .prepare_access = prepare_memory_access,
15790 .finish_access = finish_memory_access,
Sven Schnellec208dfb2009-01-07 12:35:09 +000015791 },
15792
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015793 {
15794 .vendor = "SST",
15795 .name = "SST49LF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015796 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015797 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015798 .model_id = SST_SST49LF020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015799 .total_size = 256,
Carl-Daniel Hailfingerda654322009-07-23 01:44:38 +000015800 .page_size = 4 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015801 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015802 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015803 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015804 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015805 .block_erasers =
15806 {
15807 {
15808 .eraseblocks = { {4 * 1024, 64} },
15809 .block_erase = erase_sector_jedec,
15810 }, {
15811 .eraseblocks = { {16 * 1024, 16} },
15812 .block_erase = erase_block_jedec,
15813 }, {
15814 .eraseblocks = { {256 * 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 = "SST49LF040",
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_SST49LF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015831 .total_size = 512,
15832 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015833 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000015834 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015835 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015836 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015837 .block_erasers =
15838 {
15839 {
15840 .eraseblocks = { {4 * 1024, 128} },
15841 .block_erase = erase_sector_jedec,
15842 }, {
15843 .eraseblocks = { {64 * 1024, 8} },
15844 .block_erase = erase_block_jedec,
15845 }, {
15846 .eraseblocks = { {512 * 1024, 1} },
15847 .block_erase = NULL,
15848 }
15849 },
Sean Nelson35727f72010-01-28 23:55:12 +000015850 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015851 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015852 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015853 .prepare_access = prepare_memory_access,
15854 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015855 },
15856
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015857 {
15858 .vendor = "SST",
15859 .name = "SST49LF040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015860 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015861 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015862 .model_id = SST_SST49LF040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015863 .total_size = 512,
15864 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015865 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015866 .tested = TEST_OK_PREW,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015867 .probe = probe_jedec,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015868 .probe_timing = 1, /* 150ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015869 .block_erasers =
15870 {
15871 {
15872 .eraseblocks = { {4 * 1024, 128} },
15873 .block_erase = erase_sector_jedec,
15874 }, {
15875 .eraseblocks = { {64 * 1024, 8} },
15876 .block_erase = erase_block_jedec,
15877 }, {
15878 .eraseblocks = { {512 * 1024, 1} },
15879 .block_erase = NULL,
15880 }
15881 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015882 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000015883 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015884 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015885 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015886 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015887 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015888 },
15889
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015890 {
15891 .vendor = "SST",
15892 .name = "SST49LF080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015893 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015894 .manufacture_id = SST_ID,
Elyes HAOUAS124ef382018-03-27 12:15:09 +020015895 .model_id = SST_SST49LF080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015896 .total_size = 1024,
15897 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015898 .feature_bits = FEATURE_EITHER_RESET,
Brandon Dowdyf07bf322011-03-06 18:31:11 +000015899 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015900 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015901 .probe_timing = TIMING_FIXME,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015902 .block_erasers =
15903 {
15904 {
15905 .eraseblocks = { {4 * 1024, 256} },
15906 .block_erase = erase_sector_jedec,
15907 }, {
15908 .eraseblocks = { {64 * 1024, 16} },
15909 .block_erase = erase_block_jedec,
15910 }, {
15911 .eraseblocks = { {1024 * 1024, 1} },
15912 .block_erase = NULL,
15913 }
15914 },
Sean Nelson35727f72010-01-28 23:55:12 +000015915 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015916 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015917 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015918 .prepare_access = prepare_memory_access,
15919 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015920 },
15921
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015922 {
15923 .vendor = "SST",
15924 .name = "SST49LF160C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015925 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015926 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015927 .model_id = SST_SST49LF160C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015928 .total_size = 2048,
15929 .page_size = 4 * 1024,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015930 .tested = TEST_OK_PR,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015931 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015932 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015933 .block_erasers =
15934 {
15935 {
15936 .eraseblocks = { {4 * 1024, 512} },
15937 .block_erase = erase_sector_49lfxxxc,
15938 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015939 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015940 {64 * 1024, 31},
15941 {32 * 1024, 1},
15942 {8 * 1024, 2},
15943 {16 * 1024, 1},
15944 },
Sean Nelson69e58112010-03-23 17:10:28 +000015945 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015946 }
15947 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015948 .printlock = printlock_regspace2_block_eraser_1,
15949 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015950 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015951 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015952 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015953 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015954 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015955 },
15956
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015957 {
15958 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015959 .name = "M29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015960 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015961 .manufacture_id = ST_ID,
15962 .model_id = ST_M29F002B,
15963 .total_size = 256,
15964 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015965 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015966 .tested = TEST_UNTESTED,
15967 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000015968 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000015969 .block_erasers =
15970 {
15971 {
15972 .eraseblocks = {
15973 {16 * 1024, 1},
15974 {8 * 1024, 2},
15975 {32 * 1024, 1},
15976 {64 * 1024, 3},
15977 },
15978 .block_erase = erase_sector_jedec,
15979 }, {
15980 .eraseblocks = { {256 * 1024, 1} },
15981 .block_erase = erase_chip_block_jedec,
15982 }
15983 },
Sean Nelson35727f72010-01-28 23:55:12 +000015984 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015985 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000015986 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010015987 .prepare_access = prepare_memory_access,
15988 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015989 },
15990
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015991 {
15992 .vendor = "ST",
15993 .name = "M29F002T/NT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015994 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015995 .manufacture_id = ST_ID,
15996 .model_id = ST_M29F002T,
15997 .total_size = 256,
15998 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015999 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stefan Taunere34e3e82013-01-01 00:06:51 +000016000 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016001 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016002 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016003 .block_erasers =
16004 {
16005 {
16006 .eraseblocks = {
16007 {64 * 1024, 3},
16008 {32 * 1024, 1},
16009 {8 * 1024, 2},
16010 {16 * 1024, 1},
16011 },
16012 .block_erase = erase_sector_jedec,
16013 }, {
16014 .eraseblocks = { {256 * 1024, 1} },
16015 .block_erase = erase_chip_block_jedec,
16016 }
16017 },
Sean Nelson35727f72010-01-28 23:55:12 +000016018 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016019 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000016020 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010016021 .prepare_access = prepare_memory_access,
16022 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016023 },
16024
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016025 {
16026 .vendor = "ST",
16027 .name = "M29F040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016028 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016029 .manufacture_id = ST_ID,
16030 .model_id = ST_M29F040B,
16031 .total_size = 512,
16032 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016033 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
16034 .tested = TEST_UNTESTED,
16035 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000016036 .probe_timing = TIMING_ZERO, /* datasheet specifies no timing */
Sean Nelson56358aa2010-01-19 16:08:51 +000016037 .block_erasers =
16038 {
16039 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016040 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000016041 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016042 }, {
16043 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000016044 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016045 }
16046 },
Sean Nelson35727f72010-01-28 23:55:12 +000016047 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016048 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016049 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016050 .prepare_access = prepare_memory_access,
16051 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016052 },
16053
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016054 {
Sean Nelson35727f72010-01-28 23:55:12 +000016055 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016056 .vendor = "ST",
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016057 .name = "M29F400BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016058 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016059 .manufacture_id = ST_ID,
16060 .model_id = ST_M29F400BB,
16061 .total_size = 512,
16062 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016063 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000016064 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016065 .probe = probe_jedec,
16066 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016067 .block_erasers =
16068 {
16069 {
16070 .eraseblocks = {
16071 {16 * 1024, 1},
16072 {8 * 1024, 2},
16073 {32 * 1024, 1},
16074 {64 * 1024, 7},
16075 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016076 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016077 }, {
16078 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016079 .block_erase = erase_chip_block_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016080 }
16081 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016082 .write = write_jedec_1,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016083 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016084 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016085 .prepare_access = prepare_memory_access,
16086 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016087 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100016088
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016089 {
16090 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
16091 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016092 .name = "M29F400BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016093 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016094 .manufacture_id = ST_ID,
16095 .model_id = ST_M29F400BT,
16096 .total_size = 512,
16097 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016098 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016099 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016100 .probe = probe_jedec,
16101 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson56358aa2010-01-19 16:08:51 +000016102 .block_erasers =
16103 {
16104 {
16105 .eraseblocks = {
16106 {64 * 1024, 7},
16107 {32 * 1024, 1},
16108 {8 * 1024, 2},
16109 {16 * 1024, 1},
16110 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016111 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016112 }, {
16113 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016114 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016115 }
16116 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016117 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016118 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016119 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016120 .prepare_access = prepare_memory_access,
16121 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016122 },
16123
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016124 {
16125 .vendor = "ST",
16126 .name = "M29W010B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016127 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016128 .manufacture_id = ST_ID,
16129 .model_id = ST_M29W010B,
16130 .total_size = 128,
16131 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016132 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016133 .tested = TEST_UNTESTED,
16134 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016135 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016136 .block_erasers =
16137 {
16138 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016139 .eraseblocks = { {16 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000016140 .block_erase = erase_sector_jedec,
16141 }, {
16142 .eraseblocks = { {128 * 1024, 1} },
16143 .block_erase = erase_chip_block_jedec,
16144 }
16145 },
Sean Nelson35727f72010-01-28 23:55:12 +000016146 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016147 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016148 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016149 .prepare_access = prepare_memory_access,
16150 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016151 },
16152
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016153 {
16154 .vendor = "ST",
16155 .name = "M29W040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016156 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016157 .manufacture_id = ST_ID,
16158 .model_id = ST_M29W040B,
16159 .total_size = 512,
16160 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016161 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016162 .tested = TEST_UNTESTED,
16163 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016164 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016165 .block_erasers =
16166 {
16167 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016168 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000016169 .block_erase = erase_sector_jedec,
16170 }, {
16171 .eraseblocks = { {512 * 1024, 1} },
16172 .block_erase = erase_chip_block_jedec,
16173 }
16174 },
Sean Nelson35727f72010-01-28 23:55:12 +000016175 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016176 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016177 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016178 .prepare_access = prepare_memory_access,
16179 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016180 },
16181
Stefan Taunereb582572012-09-21 12:52:50 +000016182 {
16183 .vendor = "ST",
16184 .name = "M29W512B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016185 .bustype = BUS_PARALLEL,
Alan Greenfa3fcd32019-06-27 15:41:50 +100016186 .manufacture_id = ST_ID,
Stefan Taunereb582572012-09-21 12:52:50 +000016187 .model_id = ST_M29W512B,
16188 .total_size = 64,
16189 .page_size = 64 * 1024,
16190 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stefan Tauner0554ca52013-07-25 22:54:25 +000016191 .tested = TEST_OK_PREW,
Stefan Taunereb582572012-09-21 12:52:50 +000016192 .probe = probe_jedec,
16193 .probe_timing = TIMING_ZERO,
16194 .block_erasers =
16195 {
16196 {
16197 .eraseblocks = { {64 * 1024, 1} },
16198 .block_erase = erase_chip_block_jedec,
16199 }
16200 },
16201 .write = write_jedec_1,
16202 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016203 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016204 .prepare_access = prepare_memory_access,
16205 .finish_access = finish_memory_access,
Stefan Taunereb582572012-09-21 12:52:50 +000016206 },
Jeffrey A. Kentba7c9222010-02-01 05:49:46 +000016207
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016208 {
16209 .vendor = "ST",
16210 .name = "M50FLW040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016211 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016212 .manufacture_id = ST_ID,
16213 .model_id = ST_M50FLW040A,
16214 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016215 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016216 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016217 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016218 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016219 .block_erasers =
16220 {
16221 {
Sean Nelson329bde72010-01-19 16:39:19 +000016222 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016223 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016224 {64 * 1024, 5}, /* block */
16225 {4 * 1024, 16}, /* sector */
16226 {4 * 1024, 16}, /* sector */
16227 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016228 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016229 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016230 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016231 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016232 }
16233 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016234 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100016235 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016236 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016237 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016238 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016239 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016240 },
16241
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016242 {
16243 .vendor = "ST",
16244 .name = "M50FLW040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016245 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016246 .manufacture_id = ST_ID,
16247 .model_id = ST_M50FLW040B,
16248 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016249 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016250 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016251 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016252 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016253 .block_erasers =
16254 {
16255 {
Sean Nelson329bde72010-01-19 16:39:19 +000016256 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016257 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016258 {4 * 1024, 16}, /* sector */
16259 {64 * 1024, 5}, /* block */
16260 {4 * 1024, 16}, /* sector */
16261 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016262 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016263 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016264 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016265 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016266 }
16267 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016268 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100016269 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016270 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016271 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016272 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016273 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016274 },
16275
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016276 {
16277 .vendor = "ST",
16278 .name = "M50FLW080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016279 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016280 .manufacture_id = ST_ID,
16281 .model_id = ST_M50FLW080A,
16282 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016283 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016284 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000016285 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016286 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016287 .block_erasers =
16288 {
16289 {
Sean Nelson329bde72010-01-19 16:39:19 +000016290 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016291 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016292 {64 * 1024, 13}, /* block */
16293 {4 * 1024, 16}, /* sector */
16294 {4 * 1024, 16}, /* sector */
16295 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016296 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016297 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016298 .eraseblocks = { {64 * 1024, 16} },
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 .printlock = printlock_regspace2_block_eraser_0,
16303 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016304 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016305 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016306 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016307 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016308 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016309 },
16310
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016311 {
16312 .vendor = "ST",
16313 .name = "M50FLW080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016314 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016315 .manufacture_id = ST_ID,
16316 .model_id = ST_M50FLW080B,
16317 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016318 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016319 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016320 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016321 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016322 .block_erasers =
16323 {
16324 {
Sean Nelson329bde72010-01-19 16:39:19 +000016325 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016326 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016327 {4 * 1024, 16}, /* sector */
16328 {64 * 1024, 13}, /* block */
16329 {4 * 1024, 16}, /* sector */
16330 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016331 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016332 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016333 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016334 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016335 }
16336 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016337 .printlock = printlock_regspace2_block_eraser_0,
16338 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016339 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016340 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016341 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016342 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016343 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016344 },
16345
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016346 {
16347 .vendor = "ST",
16348 .name = "M50FW002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016349 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016350 .manufacture_id = ST_ID,
16351 .model_id = ST_M50FW002,
16352 .total_size = 256,
Stefan Tauner4404f732013-09-12 08:28:56 +000016353 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016354 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000016355 .probe = probe_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016356 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016357 .block_erasers =
16358 {
16359 {
16360 .eraseblocks = {
16361 {64 * 1024, 3},
16362 {32 * 1024, 1},
16363 {8 * 1024, 2},
16364 {16 * 1024, 1},
16365 },
Sean Nelson28accc22010-03-19 18:47:06 +000016366 .block_erase = erase_block_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016367 }, {
Stefan Tauner5c316f92015-02-08 21:57:52 +000016368 .eraseblocks = { {256 * 1024, 1} },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016369 .block_erase = NULL, /* Only in A/A mux mode */
Sean Nelson56358aa2010-01-19 16:08:51 +000016370 }
16371 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016372 .printlock = printlock_regspace2_block_eraser_0,
16373 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016374 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016375 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016376 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016377 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016378 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016379 },
16380
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016381 {
16382 .vendor = "ST",
16383 .name = "M50FW016",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016384 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016385 .manufacture_id = ST_ID,
16386 .model_id = ST_M50FW016,
16387 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000016388 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016389 .tested = TEST_UNTESTED,
16390 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016391 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016392 .block_erasers =
16393 {
16394 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016395 .eraseblocks = { {64 * 1024, 32} },
Sean Nelson28accc22010-03-19 18:47:06 +000016396 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016397 }
16398 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016399 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016400 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016401 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016402 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016403 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016404 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016405 },
16406
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016407 {
16408 .vendor = "ST",
16409 .name = "M50FW040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016410 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016411 .manufacture_id = ST_ID,
16412 .model_id = ST_M50FW040,
16413 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016414 .page_size = 0,
Sean Nelson28accc22010-03-19 18:47:06 +000016415 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016416 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016417 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016418 .block_erasers =
16419 {
16420 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016421 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016422 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016423 }
16424 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016425 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016426 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016427 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016428 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016429 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016430 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016431 },
16432
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016433 {
16434 .vendor = "ST",
16435 .name = "M50FW080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016436 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016437 .manufacture_id = ST_ID,
16438 .model_id = ST_M50FW080,
16439 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016440 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016441 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016442 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016443 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016444 .block_erasers =
16445 {
16446 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016447 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016448 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016449 }
16450 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016451 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016452 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016453 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016454 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016455 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016456 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016457 },
16458
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016459 {
16460 .vendor = "ST",
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016461 .name = "M50LPW080",
16462 .bustype = BUS_LPC, /* A/A Mux */
16463 .manufacture_id = ST_ID,
16464 .model_id = ST_M50LPW080,
16465 .total_size = 1024,
16466 .page_size = 0,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016467 .tested = TEST_UNTESTED,
16468 .probe = probe_82802ab,
16469 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
16470 .block_erasers =
16471 {
16472 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016473 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016474 .block_erase = erase_block_82802ab,
16475 }
16476 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016477 .unlock = unlock_regspace2_uniform_64k,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016478 .write = write_82802ab,
16479 .read = read_memmapped,
16480 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016481 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016482 .finish_access = finish_memory_access,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016483 },
16484
16485 {
16486 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016487 .name = "M50LPW116",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016488 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016489 .manufacture_id = ST_ID,
16490 .model_id = ST_M50LPW116,
16491 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000016492 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016493 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016494 .probe = probe_82802ab,
Udu Ogahc04ee222009-09-05 01:31:32 +000016495 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016496 .block_erasers =
16497 {
16498 {
16499 .eraseblocks = {
16500 {4 * 1024, 16},
16501 {64 * 1024, 30},
16502 {32 * 1024, 1},
16503 {8 * 1024, 2},
16504 {16 * 1024, 1},
16505 },
Sean Nelson28accc22010-03-19 18:47:06 +000016506 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016507 }
16508 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016509 .printlock = printlock_regspace2_block_eraser_0,
16510 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016511 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016512 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016513 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016514 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016515 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016516 },
16517
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016518 {
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030016519 .vendor = "ST",
16520 .name = "M95M02",
16521 .bustype = BUS_SPI,
16522 .manufacture_id = ST_ID,
16523 .model_id = ST_M95M02,
16524 .total_size = 256,
16525 .page_size = 256,
16526 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
16527 .tested = TEST_OK_PREW,
Nico Huber54557862023-05-15 12:01:04 +020016528 .spi_cmd_set = SPI95,
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030016529 .probe = probe_spi_st95,
16530 .probe_timing = TIMING_ZERO,
16531 .block_erasers =
16532 {
16533 {
16534 .eraseblocks = { {256 * 1024, 1} },
16535 .block_erase = spi_block_erase_emulation,
16536 }
16537 },
16538
16539 .printlock = spi_prettyprint_status_register_bp1_srwd,
16540 .unlock = spi_disable_blockprotect_bp1_srwd,
16541 .write = spi_chip_write_256,
16542 .read = spi_chip_read,
16543 .voltage = {2500, 5500},
16544 },
16545
16546 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100016547 .vendor = "Sanyo",
16548 .name = "LE25FU106B",
16549 .bustype = BUS_SPI,
16550 .manufacture_id = SANYO_ID,
16551 .model_id = SANYO_LE25FU106B,
16552 .total_size = 128,
16553 .page_size = 256,
16554 .feature_bits = FEATURE_WRSR_WREN,
16555 .tested = TEST_UNTESTED,
16556 .probe = probe_spi_res2,
16557 .probe_timing = TIMING_ZERO,
16558 .block_erasers =
16559 {
16560 /* FIXME: Is this correct?
16561 {
16562 .eraseblocks = { {2 * 1024, 64} },
16563 .block_erase = spi_block_erase_d7,
16564 },*/
16565 {
16566 .eraseblocks = { {32 * 1024, 4} },
16567 .block_erase = spi_block_erase_d8,
16568 }, {
16569 .eraseblocks = { {128 * 1024, 1} },
16570 .block_erase = spi_block_erase_c7,
16571 }
16572 },
16573 .printlock = spi_prettyprint_status_register_bp1_srwd,
16574 .unlock = spi_disable_blockprotect_bp1_srwd,
16575 .write = spi_chip_write_256,
16576 .read = spi_chip_read,
16577 .voltage = {2300, 3600},
16578 },
16579
16580 {
16581 .vendor = "Sanyo",
16582 .name = "LE25FU206",
16583 .bustype = BUS_SPI,
16584 .manufacture_id = SANYO_ID,
16585 .model_id = SANYO_LE25FU206,
16586 .total_size = 256,
16587 .page_size = 256,
16588 .feature_bits = FEATURE_WRSR_WREN,
16589 .tested = TEST_UNTESTED,
16590 .probe = probe_spi_res2,
16591 .probe_timing = TIMING_ZERO,
16592 .block_erasers =
16593 {
16594 {
16595 .eraseblocks = { {4 * 1024, 64} },
16596 .block_erase = spi_block_erase_d7,
16597 }, {
16598 .eraseblocks = { {64 * 1024, 4} },
16599 .block_erase = spi_block_erase_d8,
16600 }, {
16601 .eraseblocks = { {256 * 1024, 1} },
16602 .block_erase = spi_block_erase_c7,
16603 }
16604 },
16605 .printlock = spi_prettyprint_status_register_bp1_srwd,
16606 .unlock = spi_disable_blockprotect_bp1_srwd,
16607 .write = spi_chip_write_256,
16608 .read = spi_chip_read,
16609 .voltage = {2300, 3600},
16610 },
16611
16612 {
16613 .vendor = "Sanyo",
16614 .name = "LE25FU206A",
16615 .bustype = BUS_SPI,
16616 .manufacture_id = SANYO_ID,
16617 .model_id = SANYO_LE25FU206A,
16618 .total_size = 256,
16619 .page_size = 256,
16620 .tested = TEST_UNTESTED,
16621 .probe = probe_spi_rdid,
16622 .probe_timing = TIMING_ZERO,
16623 .block_erasers =
16624 {
16625 {
16626 .eraseblocks = { {4 * 1024, 64} },
16627 .block_erase = spi_block_erase_20,
16628 }, {
16629 .eraseblocks = { {4 * 1024, 64} },
16630 .block_erase = spi_block_erase_d7,
16631 }, {
16632 .eraseblocks = { {64 * 1024, 4} },
16633 .block_erase = spi_block_erase_d8,
16634 }, {
16635 .eraseblocks = { {256 * 1024, 1} },
16636 .block_erase = spi_block_erase_60,
16637 }, {
16638 .eraseblocks = { {256 * 1024, 1} },
16639 .block_erase = spi_block_erase_c7,
16640 }
16641 },
16642 .printlock = spi_prettyprint_status_register_bp2_srwd,
16643 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16644 .write = spi_chip_write_256,
16645 .read = spi_chip_read,
16646 .voltage = {2300, 3600},
16647 },
16648
16649 {
16650 .vendor = "Sanyo",
16651 .name = "LE25FU406B",
16652 .bustype = BUS_SPI,
16653 .manufacture_id = SANYO_ID,
16654 .model_id = SANYO_LE25FU406B,
16655 .total_size = 512,
16656 .page_size = 256,
16657 .feature_bits = FEATURE_WRSR_WREN,
16658 .tested = TEST_OK_PREW,
16659 .probe = probe_spi_res2,
16660 .probe_timing = TIMING_ZERO,
16661 .block_erasers =
16662 {
16663 {
16664 .eraseblocks = { {4 * 1024, 128} },
16665 .block_erase = spi_block_erase_d7,
16666 }, {
16667 .eraseblocks = { {64 * 1024, 8} },
16668 .block_erase = spi_block_erase_d8,
16669 }, {
16670 .eraseblocks = { {512 * 1024, 1} },
16671 .block_erase = spi_block_erase_c7,
16672 }
16673 },
16674 .printlock = spi_prettyprint_status_register_bp2_srwd,
16675 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16676 .write = spi_chip_write_256,
16677 .read = spi_chip_read,
16678 .voltage = {2300, 3600},
16679 },
16680
16681 {
16682 .vendor = "Sanyo",
16683 .name = "LE25FU406C/LE25U40CMC",
16684 .bustype = BUS_SPI,
16685 .manufacture_id = SANYO_ID,
16686 .model_id = SANYO_LE25FU406C,
16687 .total_size = 512,
16688 .page_size = 256,
16689 .feature_bits = FEATURE_WRSR_WREN,
16690 .tested = TEST_OK_PREW,
16691 .probe = probe_spi_rdid,
16692 .probe_timing = TIMING_ZERO,
16693 .block_erasers =
16694 {
16695 {
16696 .eraseblocks = { {4 * 1024, 128} },
16697 .block_erase = spi_block_erase_20,
16698 }, {
16699 .eraseblocks = { {4 * 1024, 128} },
16700 .block_erase = spi_block_erase_d7,
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_60,
16707 }, {
16708 .eraseblocks = { {512 * 1024, 1} },
16709 .block_erase = spi_block_erase_c7,
16710 }
16711 },
16712 .printlock = spi_prettyprint_status_register_bp2_srwd,
16713 .unlock = spi_disable_blockprotect_bp2_srwd,
16714 .write = spi_chip_write_256,
16715 .read = spi_chip_read, /* Fast read (0x0B), dual read (0x3B) and dual I/O (0xBB) supported */
16716 .voltage = {2300, 3600},
16717 },
16718
16719 {
16720 .vendor = "Sanyo",
16721 .name = "LE25FW106",
16722 .bustype = BUS_SPI,
16723 .manufacture_id = SANYO_ID,
16724 .model_id = SANYO_LE25FW106,
16725 .total_size = 128,
16726 .page_size = 256,
16727 .feature_bits = FEATURE_WRSR_WREN,
16728 .tested = TEST_OK_PREW,
16729 .probe = probe_spi_res2,
16730 .probe_timing = TIMING_ZERO,
16731 .block_erasers =
16732 {
16733 {
16734 .eraseblocks = { {2 * 1024, 64} },
16735 .block_erase = spi_block_erase_d7,
16736 }, {
16737 .eraseblocks = { {32 * 1024, 4} },
16738 .block_erase = spi_block_erase_d8,
16739 }, {
16740 .eraseblocks = { {128 * 1024, 1} },
16741 .block_erase = spi_block_erase_c7,
16742 }
16743 },
16744 .printlock = spi_prettyprint_status_register_bp1_srwd, /* FIXME: Add ERSER error flag. */
16745 .unlock = spi_disable_blockprotect_bp1_srwd,
16746 .write = spi_chip_write_256,
16747 .read = spi_chip_read,
16748 .voltage = {2700, 3600},
16749 },
16750
16751 {
16752 .vendor = "Sanyo",
16753 .name = "LE25FW203A",
16754 .bustype = BUS_SPI,
16755 .manufacture_id = SANYO_ID,
16756 .model_id = SANYO_LE25FW203A,
16757 .total_size = 256,
16758 .page_size = 256,
16759 .tested = TEST_UNTESTED,
16760 .probe = probe_spi_rdid,
16761 .probe_timing = TIMING_ZERO,
16762 .block_erasers =
16763 {
16764 {
16765 .eraseblocks = { {256, 1024} },
16766 .block_erase = spi_block_erase_db,
16767 }, {
16768 .eraseblocks = { {64 * 1024, 4} },
16769 .block_erase = spi_block_erase_d8,
16770 }, {
16771 .eraseblocks = { {256 * 1024, 1} },
16772 .block_erase = spi_block_erase_c7,
16773 }
16774 },
16775 .printlock = spi_prettyprint_status_register_default_welwip,
16776 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
16777 .write = spi_chip_write_256,
16778 .read = spi_chip_read,
16779 .voltage = {2700, 3600},
16780 },
16781
16782 {
16783 .vendor = "Sanyo",
16784 .name = "LE25FW403A",
16785 .bustype = BUS_SPI,
16786 .manufacture_id = SANYO_ID,
16787 .model_id = SANYO_LE25FW403A,
16788 .total_size = 512,
16789 .page_size = 256,
16790 .tested = TEST_UNTESTED,
16791 .probe = probe_spi_rdid,
16792 .probe_timing = TIMING_ZERO,
16793 .block_erasers =
16794 {
16795 {
16796 .eraseblocks = { {256, 2 * 1024} },
16797 .block_erase = spi_block_erase_db,
16798 }, {
16799 .eraseblocks = { {64 * 1024, 8} },
16800 .block_erase = spi_block_erase_d8,
16801 }, {
16802 .eraseblocks = { {512 * 1024, 1} },
16803 .block_erase = spi_block_erase_c7,
16804 }
16805 },
16806 .printlock = spi_prettyprint_status_register_default_welwip,
16807 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
16808 .write = spi_chip_write_256,
16809 .read = spi_chip_read,
16810 .voltage = {2700, 3600},
16811 },
16812
16813 {
16814 .vendor = "Sanyo",
16815 .name = "LE25FW406A",
16816 .bustype = BUS_SPI,
16817 .manufacture_id = SANYO_ID,
16818 .model_id = SANYO_LE25FW406A,
16819 .total_size = 512,
16820 .page_size = 256,
16821 .feature_bits = FEATURE_WRSR_WREN,
16822 .tested = TEST_OK_PREW,
16823 .probe = probe_spi_res2,
16824 .probe_timing = TIMING_ZERO,
16825 .block_erasers =
16826 {
16827 {
16828 .eraseblocks = { {4 * 1024, 128} },
16829 .block_erase = spi_block_erase_d7,
16830 }, {
16831 .eraseblocks = { {64 * 1024, 8} },
16832 .block_erase = spi_block_erase_d8,
16833 }, {
16834 .eraseblocks = { {512 * 1024, 1} },
16835 .block_erase = spi_block_erase_c7,
16836 }
16837 },
16838 .printlock = spi_prettyprint_status_register_plain,
16839 .unlock = spi_disable_blockprotect,
16840 .write = spi_chip_write_256,
16841 .read = spi_chip_read,
16842 .voltage = {2700, 3600},
16843 },
16844
16845 {
16846 .vendor = "Sanyo",
16847 .name = "LE25FW418A",
16848 .bustype = BUS_SPI,
16849 .manufacture_id = SANYO_ID,
16850 .model_id = SANYO_LE25FW418A,
16851 .total_size = 512,
16852 .page_size = 256,
16853 .feature_bits = FEATURE_WRSR_WREN,
16854 .tested = TEST_UNTESTED,
16855 .probe = probe_spi_res2,
16856 .probe_timing = TIMING_ZERO,
16857 .block_erasers =
16858 {
16859 {
16860 .eraseblocks = { {4 * 1024, 128} },
16861 .block_erase = spi_block_erase_d7,
16862 }, {
16863 .eraseblocks = { {64 * 1024, 8} },
16864 .block_erase = spi_block_erase_d8,
16865 }, {
16866 .eraseblocks = { {512 * 1024, 1} },
16867 .block_erase = spi_block_erase_c7,
16868 }
16869 },
16870 .printlock = spi_prettyprint_status_register_bp2_srwd,
16871 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16872 .write = spi_chip_write_256,
16873 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
16874 .voltage = {2700, 3600},
16875 },
16876
16877 {
16878 .vendor = "Sanyo",
16879 .name = "LE25FW806",
16880 .bustype = BUS_SPI,
16881 .manufacture_id = SANYO_ID,
16882 .model_id = SANYO_LE25FW806,
16883 .total_size = 1024,
16884 .page_size = 256,
16885 .feature_bits = FEATURE_WRSR_WREN,
16886 .tested = TEST_UNTESTED,
16887 .probe = probe_spi_res2,
16888 .probe_timing = TIMING_ZERO,
16889 .block_erasers =
16890 {
16891 {
16892 .eraseblocks = { {4 * 1024, 256} },
16893 .block_erase = spi_block_erase_20,
16894 }, {
16895 .eraseblocks = { {4 * 1024, 256} },
16896 .block_erase = spi_block_erase_d7,
16897 }, {
16898 .eraseblocks = { {64 * 1024, 16} },
16899 .block_erase = spi_block_erase_d8,
16900 }, {
16901 .eraseblocks = { {1024 * 1024, 1} },
16902 .block_erase = spi_block_erase_c7,
16903 }
16904 },
16905 .printlock = spi_prettyprint_status_register_bp2_srwd,
16906 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16907 .write = spi_chip_write_256,
16908 .read = spi_chip_read,
16909 .voltage = {2700, 3600},
16910 },
16911
16912 {
16913 .vendor = "Sanyo",
16914 .name = "LE25FW808",
16915 .bustype = BUS_SPI,
16916 .manufacture_id = SANYO_ID,
16917 .model_id = SANYO_LE25FW808,
16918 .total_size = 1024,
16919 .page_size = 256,
16920 .feature_bits = FEATURE_WRSR_WREN,
16921 .tested = TEST_UNTESTED,
16922 .probe = probe_spi_res2,
16923 .probe_timing = TIMING_ZERO,
16924 .block_erasers =
16925 {
16926 {
16927 .eraseblocks = { {8 * 1024, 128} },
16928 .block_erase = spi_block_erase_d7,
16929 }, {
16930 .eraseblocks = { {64 * 1024, 16} },
16931 .block_erase = spi_block_erase_d8,
16932 }, {
16933 .eraseblocks = { {1024 * 1024, 1} },
16934 .block_erase = spi_block_erase_c7,
16935 }
16936 },
16937 .printlock = spi_prettyprint_status_register_bp2_srwd,
16938 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16939 .write = spi_chip_write_256,
16940 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
16941 .voltage = {2700, 3600},
16942 },
16943
16944 {
16945 .vendor = "Sharp",
16946 .name = "LH28F008BJT-BTLZ1",
16947 .bustype = BUS_PARALLEL,
16948 .manufacture_id = SHARP_ID,
16949 .model_id = SHARP_LH28F008BJ__PB,
16950 .total_size = 1024,
16951 .page_size = 64 * 1024,
16952 .tested = TEST_OK_PREW,
16953 .probe = probe_82802ab,
16954 .probe_timing = TIMING_ZERO,
16955 .block_erasers =
16956 {
16957 {
16958 .eraseblocks = {
16959 {8 * 1024, 8},
16960 {64 * 1024, 15}
16961 },
16962 .block_erase = erase_block_82802ab,
16963 }, {
16964 .eraseblocks = { {1024 * 1024, 1} },
16965 .block_erase = erase_sector_49lfxxxc,
16966 }
16967 },
16968 .unlock = unlock_lh28f008bjt,
16969 .write = write_82802ab,
16970 .read = read_memmapped,
16971 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016972 .prepare_access = prepare_memory_access,
16973 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016974 },
16975
16976 {
16977 .vendor = "Sharp",
16978 .name = "LHF00L04",
16979 .bustype = BUS_FWH, /* A/A Mux */
16980 .manufacture_id = SHARP_ID,
16981 .model_id = SHARP_LHF00L04,
16982 .total_size = 1024,
16983 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010016984 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016985 .tested = TEST_UNTESTED,
16986 .probe = probe_82802ab,
16987 .probe_timing = TIMING_ZERO,
16988 .block_erasers =
16989 {
16990 {
16991 .eraseblocks = {
16992 {64 * 1024, 15},
16993 {8 * 1024, 8}
16994 },
16995 .block_erase = erase_block_82802ab,
16996 }, {
16997 .eraseblocks = {
16998 {1024 * 1024, 1}
16999 },
17000 .block_erase = NULL, /* 30 D0, only in A/A mux mode */
17001 },
17002 },
17003 .unlock = unlock_regspace2_uniform_64k,
17004 .write = write_82802ab,
17005 .read = read_memmapped,
17006 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010017007 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010017008 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017009 },
17010
17011 {
17012 .vendor = "Spansion",
17013 .name = "S25FL004A",
17014 .bustype = BUS_SPI,
17015 .manufacture_id = SPANSION_ID,
17016 .model_id = SPANSION_S25FL004A,
17017 .total_size = 512,
17018 .page_size = 256,
17019 .feature_bits = FEATURE_WRSR_WREN,
17020 .tested = TEST_UNTESTED,
17021 .probe = probe_spi_rdid,
17022 .probe_timing = TIMING_ZERO,
17023 .block_erasers =
17024 {
17025 {
17026 .eraseblocks = { {64 * 1024, 8} },
17027 .block_erase = spi_block_erase_d8,
17028 }, {
17029 .eraseblocks = { {512 * 1024, 1} },
17030 .block_erase = spi_block_erase_c7,
17031 }
17032 },
17033 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17034 .unlock = spi_disable_blockprotect,
17035 .write = spi_chip_write_256,
17036 .read = spi_chip_read,
17037 .voltage = {2700, 3600},
17038 },
17039
17040 {
17041 .vendor = "Spansion",
17042 .name = "S25FL008A",
17043 .bustype = BUS_SPI,
17044 .manufacture_id = SPANSION_ID,
17045 .model_id = SPANSION_S25FL008A,
17046 .total_size = 1024,
17047 .page_size = 256,
17048 .feature_bits = FEATURE_WRSR_WREN,
17049 .tested = TEST_OK_PRE,
17050 .probe = probe_spi_rdid,
17051 .probe_timing = TIMING_ZERO,
17052 .block_erasers =
17053 {
17054 {
17055 .eraseblocks = { {64 * 1024, 16} },
17056 .block_erase = spi_block_erase_d8,
17057 }, {
17058 .eraseblocks = { {1024 * 1024, 1} },
17059 .block_erase = spi_block_erase_c7,
17060 }
17061 },
17062 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17063 .unlock = spi_disable_blockprotect,
17064 .write = spi_chip_write_256,
17065 .read = spi_chip_read,
17066 .voltage = {2700, 3600},
17067 },
17068
17069 {
17070 .vendor = "Spansion",
17071 .name = "S25FL016A",
17072 .bustype = BUS_SPI,
17073 .manufacture_id = SPANSION_ID,
17074 .model_id = SPANSION_S25FL016A,
17075 .total_size = 2048,
17076 .page_size = 256,
17077 .feature_bits = FEATURE_WRSR_WREN,
17078 .tested = TEST_OK_PREW,
17079 .probe = probe_spi_rdid,
17080 .probe_timing = TIMING_ZERO,
17081 .block_erasers =
17082 {
17083 {
17084 .eraseblocks = { {64 * 1024, 32} },
17085 .block_erase = spi_block_erase_d8,
17086 }, {
17087 .eraseblocks = { {2 * 1024 * 1024, 1} },
17088 .block_erase = spi_block_erase_c7,
17089 }
17090 },
17091 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17092 .unlock = spi_disable_blockprotect,
17093 .write = spi_chip_write_256,
17094 .read = spi_chip_read,
17095 .voltage = {2700, 3600},
17096 },
17097
17098 {
17099 .vendor = "Spansion",
17100 .name = "S25FL032A/P",
17101 .bustype = BUS_SPI,
17102 .manufacture_id = SPANSION_ID,
17103 .model_id = SPANSION_S25FL032A,
17104 .total_size = 4096,
17105 .page_size = 256,
17106 .feature_bits = FEATURE_WRSR_WREN,
17107 .tested = TEST_OK_PREW,
17108 .probe = probe_spi_rdid,
17109 .probe_timing = TIMING_ZERO,
17110 .block_erasers =
17111 {
17112 {
17113 .eraseblocks = { {64 * 1024, 64} },
17114 .block_erase = spi_block_erase_d8,
17115 }, {
17116 .eraseblocks = { {4 * 1024 * 1024, 1} },
17117 .block_erase = spi_block_erase_c7,
17118 }
17119 },
17120 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17121 .unlock = spi_disable_blockprotect,
17122 .write = spi_chip_write_256,
17123 .read = spi_chip_read,
17124 .voltage = {2700, 3600},
17125 },
17126
17127 {
17128 .vendor = "Spansion",
17129 .name = "S25FL064A/P",
17130 .bustype = BUS_SPI,
17131 .manufacture_id = SPANSION_ID,
17132 .model_id = SPANSION_S25FL064A,
17133 .total_size = 8192,
17134 .page_size = 256,
17135 .feature_bits = FEATURE_WRSR_WREN,
17136 .tested = TEST_OK_PREW,
17137 .probe = probe_spi_rdid,
17138 .probe_timing = TIMING_ZERO,
17139 .block_erasers =
17140 {
17141 {
17142 .eraseblocks = { {64 * 1024, 128} },
17143 .block_erase = spi_block_erase_d8,
17144 }, {
17145 .eraseblocks = { {8 * 1024 * 1024, 1} },
17146 .block_erase = spi_block_erase_c7,
17147 }
17148 },
17149 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17150 .unlock = spi_disable_blockprotect,
17151 .write = spi_chip_write_256,
17152 .read = spi_chip_read,
17153 .voltage = {2700, 3600},
17154 },
17155
17156 {
17157 .vendor = "Spansion",
17158 .name = "S25FL116K/S25FL216K", /* FIXME: separate them */
17159 .bustype = BUS_SPI,
17160 .manufacture_id = SPANSION_ID,
17161 .model_id = SPANSION_S25FL216,
17162 .total_size = 2048,
17163 .page_size = 256,
17164 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (S25FL116K only) */
17165 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17166 .tested = TEST_UNTESTED,
17167 .probe = probe_spi_rdid,
17168 .probe_timing = TIMING_ZERO,
17169 .block_erasers =
17170 {
17171 {
17172 .eraseblocks = { {4 * 1024, 512} },
17173 .block_erase = spi_block_erase_20,
17174 }, {
17175 .eraseblocks = { {64 * 1024, 32} },
17176 .block_erase = spi_block_erase_d8,
17177 }, {
17178 .eraseblocks = { { 2048 * 1024, 1} },
17179 .block_erase = spi_block_erase_60,
17180 }, {
17181 .eraseblocks = { { 2048 * 1024, 1} },
17182 .block_erase = spi_block_erase_c7,
17183 }
17184 },
17185 .printlock = spi_prettyprint_status_register_bp3_srwd,
17186 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17187 .write = spi_chip_write_256,
17188 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17189 .voltage = {2700, 3600},
17190 },
17191
17192 {
17193 .vendor = "Spansion",
17194 .name = "S25FL127S-256kB", /* uniform 256kB sectors */
17195 .bustype = BUS_SPI,
17196 .manufacture_id = SPANSION_ID,
17197 .model_id = SPANSION_S25FL128,
17198 .total_size = 16384,
17199 .page_size = 512,
17200 /* supports 4B addressing */
17201 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17202 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17203 .tested = TEST_UNTESTED,
17204 .probe = probe_spi_rdid,
17205 .probe_timing = TIMING_ZERO,
17206 .block_erasers =
17207 {
17208 {
17209 .eraseblocks = { {256 * 1024, 64} },
17210 .block_erase = spi_block_erase_d8,
17211 }, {
17212 .eraseblocks = { { 16384 * 1024, 1} },
17213 .block_erase = spi_block_erase_60,
17214 }, {
17215 .eraseblocks = { { 16384 * 1024, 1} },
17216 .block_erase = spi_block_erase_c7,
17217 }
17218 },
17219 .printlock = spi_prettyprint_status_register_bp2_srwd,
17220 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17221 .write = spi_chip_write_256, /* Multi I/O supported */
17222 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17223 .voltage = {2700, 3600},
17224 },
17225
17226 {
17227 .vendor = "Spansion",
17228 .name = "S25FL127S-64kB", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17229 .bustype = BUS_SPI,
17230 .manufacture_id = SPANSION_ID,
17231 .model_id = SPANSION_S25FL128,
17232 .total_size = 16384,
17233 .page_size = 256,
17234 /* supports 4B addressing */
17235 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17236 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17237 .tested = TEST_OK_PREW,
17238 /* FIXME: we should distinguish the configuration on probing time like we do for AT45DB chips */
17239 .probe = probe_spi_rdid,
17240 .probe_timing = TIMING_ZERO,
17241 .block_erasers =
17242 {
17243 {
17244 /* This chip supports erasing of 32 so-called "parameter sectors" with
17245 * opcode 0x20 which may be configured to be on top or bottom of the address
17246 * space. Trying to access an address outside these 4kB blocks does have no
17247 * effect on the memory contents, e.g.
17248 .eraseblocks = {
17249 {4 * 1024, 32},
17250 {64 * 1024, 254} // inaccessible
17251 },
17252 .block_erase = spi_block_erase_20,
17253 }, { */
17254 .eraseblocks = { { 64 * 1024, 256} },
17255 .block_erase = spi_block_erase_d8,
17256 }, {
17257 .eraseblocks = { { 16384 * 1024, 1} },
17258 .block_erase = spi_block_erase_60,
17259 }, {
17260 .eraseblocks = { { 16384 * 1024, 1} },
17261 .block_erase = spi_block_erase_c7,
17262 }
17263 },
17264 .printlock = spi_prettyprint_status_register_bp2_srwd,
17265 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17266 .write = spi_chip_write_256, /* Multi I/O supported */
17267 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17268 .voltage = {2700, 3600},
17269 },
17270
17271 {
17272 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020017273 .name = "S25FL128L",
17274 .bustype = BUS_SPI,
17275 .manufacture_id = SPANSION_ID,
17276 .model_id = SPANSION_S25FL128L,
17277 .total_size = 16384,
17278 .page_size = 256,
17279 /* 4 x 256B Security Region (OTP) */
17280 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP,
17281 .tested = TEST_UNTESTED,
17282 .probe = probe_spi_rdid,
17283 .probe_timing = TIMING_ZERO,
17284 .block_erasers =
17285 {
17286 {
17287 .eraseblocks = { {4 * 1024, 4096} },
17288 .block_erase = spi_block_erase_20,
17289 }, {
17290 .eraseblocks = { {32 * 1024, 512} },
17291 .block_erase = spi_block_erase_52,
17292 }, {
17293 .eraseblocks = { {64 * 1024, 256} },
17294 .block_erase = spi_block_erase_d8,
17295 }, {
17296 .eraseblocks = { {16384 * 1024, 1} },
17297 .block_erase = spi_block_erase_60,
17298 }, {
17299 .eraseblocks = { {16384 * 1024, 1} },
17300 .block_erase = spi_block_erase_c7,
17301 }
17302 },
17303 .printlock = spi_prettyprint_status_register_bp2_srwd,
17304 .unlock = spi_disable_blockprotect_bp2_srwd,
17305 .write = spi_chip_write_256,
17306 .read = spi_chip_read, /* Fast read (0x0B) supported */
17307 .voltage = {2700, 3600},
17308 .reg_bits =
17309 {
17310 /*
17311 * Note: This chip has a read-only Status Register 2 that is not
17312 * counted here. Registers are mapped as follows:
17313 * STATUS1 ... Status Register 1
17314 * STATUS2 ... Configuration Register 1
17315 * STATUS3 ... Configuration Register 2
17316 */
17317 .srp = {STATUS1, 7, RW},
17318 .srl = {STATUS2, 0, RW},
17319 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17320 .tb = {STATUS1, 5, RW},
17321 .sec = {STATUS1, 6, RW},
17322 .cmp = {STATUS2, 6, RW},
17323 .wps = {STATUS3, 2, RW},
17324 },
Nico Huberaabb3e02023-01-13 00:22:30 +010017325 .wp_write_cfg = spi_wp_write_cfg,
17326 .wp_read_cfg = spi_wp_read_cfg,
17327 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020017328 .decode_range = decode_range_spi25,
17329 },
17330
17331 {
17332 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100017333 .name = "S25FL128P......0", /* uniform 64 kB sectors */
17334 .bustype = BUS_SPI,
17335 .manufacture_id = SPANSION_ID,
17336 .model_id = SPANSION_S25FL128,
17337 .total_size = 16384,
17338 .page_size = 256,
17339 .feature_bits = FEATURE_WRSR_WREN,
17340 .tested = TEST_OK_PREW,
17341 .probe = probe_spi_rdid,
17342 .probe_timing = TIMING_ZERO,
17343 .block_erasers =
17344 {
17345 {
17346 .eraseblocks = { {64 * 1024, 256} },
17347 .block_erase = spi_block_erase_20,
17348 }, {
17349 .eraseblocks = { {64 * 1024, 256} },
17350 .block_erase = spi_block_erase_d8,
17351 }, {
17352 .eraseblocks = { { 16384 * 1024, 1} },
17353 .block_erase = spi_block_erase_60,
17354 }, {
17355 .eraseblocks = { { 16384 * 1024, 1} },
17356 .block_erase = spi_block_erase_c7,
17357 }
17358 },
17359 .printlock = spi_prettyprint_status_register_bp3_srwd,
17360 .unlock = spi_disable_blockprotect_bp3_srwd,
17361 .write = spi_chip_write_256,
17362 .read = spi_chip_read, /* Fast read (0x0B) supported */
17363 .voltage = {2700, 3600},
17364 },
17365
17366 {
17367 .vendor = "Spansion",
17368 .name = "S25FL128P......1", /* uniform 256kB sectors */
17369 .bustype = BUS_SPI,
17370 .manufacture_id = SPANSION_ID,
17371 .model_id = SPANSION_S25FL128,
17372 .total_size = 16384,
17373 .page_size = 256,
17374 .feature_bits = FEATURE_WRSR_WREN,
17375 .tested = TEST_UNTESTED,
17376 .probe = probe_spi_rdid,
17377 .probe_timing = TIMING_ZERO,
17378 .block_erasers =
17379 {
17380 {
17381 .eraseblocks = { {256 * 1024, 64} },
17382 .block_erase = spi_block_erase_d8,
17383 }, {
17384 .eraseblocks = { { 16384 * 1024, 1} },
17385 .block_erase = spi_block_erase_c7,
17386 }
17387 },
17388 .printlock = spi_prettyprint_status_register_bp2_srwd,
17389 .unlock = spi_disable_blockprotect_bp2_srwd,
17390 .write = spi_chip_write_256,
17391 .read = spi_chip_read, /* Fast read (0x0B) supported */
17392 .voltage = {2700, 3600},
17393 },
17394
17395 {
17396 .vendor = "Spansion",
17397 .name = "S25FL128S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17398 .bustype = BUS_SPI,
17399 .manufacture_id = SPANSION_ID,
17400 .model_id = SPANSION_S25FL128,
17401 .total_size = 16384,
17402 .page_size = 256,
17403 /* supports 4B addressing */
17404 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17405 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17406 .tested = TEST_OK_PREW,
17407 .probe = probe_spi_rdid,
17408 .probe_timing = TIMING_ZERO,
17409 .block_erasers =
17410 {
17411 {
17412 /* This chip supports erasing of the 32 so-called "parameter sectors" with
17413 * opcode 0x20. Trying to access an address outside these 4kB blocks does
17414 * have no effect on the memory contents, but sets a flag in the SR.
17415 .eraseblocks = {
17416 {4 * 1024, 32},
17417 {64 * 1024, 254} // inaccessible
17418 },
17419 .block_erase = spi_block_erase_20,
17420 }, { */
17421 .eraseblocks = { { 64 * 1024, 256} },
17422 .block_erase = spi_block_erase_d8,
17423 }, {
17424 .eraseblocks = { { 16384 * 1024, 1} },
17425 .block_erase = spi_block_erase_60,
17426 }, {
17427 .eraseblocks = { { 16384 * 1024, 1} },
17428 .block_erase = spi_block_erase_c7,
17429 }
17430 },
17431 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17432 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17433 .write = spi_chip_write_256, /* Multi I/O supported */
17434 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17435 .voltage = {2700, 3600},
17436 },
17437
17438 {
17439 .vendor = "Spansion",
17440 .name = "S25FL128S......1", /* uniform 256 kB sectors */
17441 .bustype = BUS_SPI,
17442 .manufacture_id = SPANSION_ID,
17443 .model_id = SPANSION_S25FL128,
17444 .total_size = 16384,
17445 .page_size = 512,
17446 /* supports 4B addressing */
17447 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17448 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17449 .tested = TEST_UNTESTED,
17450 .probe = probe_spi_rdid,
17451 .probe_timing = TIMING_ZERO,
17452 .block_erasers =
17453 {
17454 {
17455 .eraseblocks = { {256 * 1024, 64} },
17456 .block_erase = spi_block_erase_d8,
17457 }, {
17458 .eraseblocks = { { 16384 * 1024, 1} },
17459 .block_erase = spi_block_erase_60,
17460 }, {
17461 .eraseblocks = { { 16384 * 1024, 1} },
17462 .block_erase = spi_block_erase_c7,
17463 }
17464 },
17465 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17466 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17467 .write = spi_chip_write_256, /* Multi I/O supported */
17468 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17469 .voltage = {2700, 3600},
17470 },
17471
17472 {
17473 .vendor = "Spansion",
17474 .name = "S25FL129P......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17475 .bustype = BUS_SPI,
17476 .manufacture_id = SPANSION_ID,
17477 .model_id = SPANSION_S25FL128,
17478 .total_size = 16384,
17479 .page_size = 256,
17480 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
17481 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17482 .tested = TEST_OK_PREW,
17483 .probe = probe_spi_rdid,
17484 .probe_timing = TIMING_ZERO,
17485 .block_erasers =
17486 {
17487 {
17488 /* FIXME: This chip supports erasing of the 32 so-called "parameter sectors" with
17489 * opcode 0x20. Trying to access an address outside these 4kB blocks does have no
17490 * effect on the memory contents, but sets a flag in the SR.
17491 .eraseblocks = {
17492 {4 * 1024, 32},
17493 {64 * 1024, 254} // inaccessible
17494 },
17495 .block_erase = spi_block_erase_20,
17496 }, { */
17497 /* FIXME: Additionally it also supports erase opcode 40h for the respective 2*4 kB pairs
17498 .eraseblocks = {
17499 {8 * 1024, 16},
17500 {64 * 1024, 254} // inaccessible
17501 },
17502 .block_erase = spi_block_erase_40,
17503 }, { */
17504 .eraseblocks = { { 64 * 1024, 256} },
17505 .block_erase = spi_block_erase_d8,
17506 }, {
17507 .eraseblocks = { { 16384 * 1024, 1} },
17508 .block_erase = spi_block_erase_60,
17509 }, {
17510 .eraseblocks = { { 16384 * 1024, 1} },
17511 .block_erase = spi_block_erase_c7,
17512 }
17513 },
17514 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
17515 .unlock = spi_disable_blockprotect_bp2_srwd,
17516 .write = spi_chip_write_256, /* Multi I/O supported */
17517 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17518 .voltage = {2700, 3600},
17519 },
17520
17521 {
17522 .vendor = "Spansion",
17523 .name = "S25FL129P......1", /* uniform 256 kB sectors */
17524 .bustype = BUS_SPI,
17525 .manufacture_id = SPANSION_ID,
17526 .model_id = SPANSION_S25FL128,
17527 .total_size = 16384,
17528 .page_size = 256,
17529 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
17530 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17531 .tested = TEST_UNTESTED,
17532 .probe = probe_spi_rdid,
17533 .probe_timing = TIMING_ZERO,
17534 .block_erasers =
17535 {
17536 {
17537 .eraseblocks = { {256 * 1024, 64} },
17538 .block_erase = spi_block_erase_d8,
17539 }, {
17540 .eraseblocks = { { 16384 * 1024, 1} },
17541 .block_erase = spi_block_erase_60,
17542 }, {
17543 .eraseblocks = { { 16384 * 1024, 1} },
17544 .block_erase = spi_block_erase_c7,
17545 }
17546 },
17547 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
17548 .unlock = spi_disable_blockprotect_bp2_srwd,
17549 .write = spi_chip_write_256, /* Multi I/O supported */
17550 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17551 .voltage = {2700, 3600},
17552 },
17553
17554 {
17555 .vendor = "Spansion",
17556 .name = "S25FL132K",
17557 .bustype = BUS_SPI,
17558 .manufacture_id = SPANSION_ID,
17559 .model_id = SPANSION_S25FL132K,
17560 .total_size = 4096,
17561 .page_size = 256,
17562 /* OTP: 768B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
17563 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17564 .tested = TEST_UNTESTED,
17565 .probe = probe_spi_rdid,
17566 .probe_timing = TIMING_ZERO,
17567 .block_erasers =
17568 {
17569 {
17570 .eraseblocks = { {4 * 1024, 1024} },
17571 .block_erase = spi_block_erase_20,
17572 }, {
17573 .eraseblocks = { {64 * 1024, 64} },
17574 .block_erase = spi_block_erase_d8,
17575 }, {
17576 .eraseblocks = { { 4096 * 1024, 1} },
17577 .block_erase = spi_block_erase_60,
17578 }, {
17579 .eraseblocks = { { 4096 * 1024, 1} },
17580 .block_erase = spi_block_erase_c7,
17581 }
17582 },
17583 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
17584 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17585 .write = spi_chip_write_256,
17586 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17587 .voltage = {2700, 3600},
17588 },
17589
17590 {
17591 .vendor = "Spansion",
17592 .name = "S25FL164K",
17593 .bustype = BUS_SPI,
17594 .manufacture_id = SPANSION_ID,
17595 .model_id = SPANSION_S25FL164K,
17596 .total_size = 8192,
17597 .page_size = 256,
17598 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
17599 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17600 .tested = TEST_OK_PREW,
17601 .probe = probe_spi_rdid,
17602 .probe_timing = TIMING_ZERO,
17603 .block_erasers =
17604 {
17605 {
17606 .eraseblocks = { {4 * 1024, 2048} },
17607 .block_erase = spi_block_erase_20,
17608 }, {
17609 .eraseblocks = { {64 * 1024, 128} },
17610 .block_erase = spi_block_erase_d8,
17611 }, {
17612 .eraseblocks = { { 8192 * 1024, 1} },
17613 .block_erase = spi_block_erase_60,
17614 }, {
17615 .eraseblocks = { { 8192 * 1024, 1} },
17616 .block_erase = spi_block_erase_c7,
17617 }
17618 },
17619 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
17620 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17621 .write = spi_chip_write_256,
17622 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17623 .voltage = {2700, 3600},
17624 },
17625
17626 {
17627 .vendor = "Spansion",
17628 .name = "S25FL204K",
17629 .bustype = BUS_SPI,
17630 .manufacture_id = SPANSION_ID,
17631 .model_id = SPANSION_S25FL204,
17632 .total_size = 512,
17633 .page_size = 256,
17634 .feature_bits = FEATURE_WRSR_WREN,
17635 .tested = TEST_OK_PR,
17636 .probe = probe_spi_rdid,
17637 .probe_timing = TIMING_ZERO,
17638 .block_erasers =
17639 {
17640 {
17641 .eraseblocks = { {4 * 1024, 128} },
17642 .block_erase = spi_block_erase_20,
17643 }, {
17644 .eraseblocks = { {64 * 1024, 8} },
17645 .block_erase = spi_block_erase_d8,
17646 }, {
17647 .eraseblocks = { { 512 * 1024, 1} },
17648 .block_erase = spi_block_erase_60,
17649 }, {
17650 .eraseblocks = { { 512 * 1024, 1} },
17651 .block_erase = spi_block_erase_c7,
17652 }
17653 },
17654 .printlock = spi_prettyprint_status_register_bp3_srwd,
17655 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17656 .write = spi_chip_write_256,
17657 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17658 .voltage = {2700, 3600},
17659 },
17660
17661 {
17662 .vendor = "Spansion",
17663 .name = "S25FL208K",
17664 .bustype = BUS_SPI,
17665 .manufacture_id = SPANSION_ID,
17666 .model_id = SPANSION_S25FL208,
17667 .total_size = 1024,
17668 .page_size = 256,
17669 .feature_bits = FEATURE_WRSR_WREN,
17670 .tested = TEST_OK_PREW,
17671 .probe = probe_spi_rdid,
17672 .probe_timing = TIMING_ZERO,
17673 .block_erasers =
17674 {
17675 {
17676 .eraseblocks = { {4 * 1024, 256} },
17677 .block_erase = spi_block_erase_20,
17678 }, {
17679 .eraseblocks = { {64 * 1024, 16} },
17680 .block_erase = spi_block_erase_d8,
17681 }, {
17682 .eraseblocks = { { 1024 * 1024, 1} },
17683 .block_erase = spi_block_erase_60,
17684 }, {
17685 .eraseblocks = { { 1024 * 1024, 1} },
17686 .block_erase = spi_block_erase_c7,
17687 }
17688 },
17689 .printlock = spi_prettyprint_status_register_bp3_srwd,
17690 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17691 .write = spi_chip_write_256,
17692 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17693 .voltage = {2700, 3600},
17694 },
17695
17696 {
17697 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020017698 .name = "S25FL256L",
17699 .bustype = BUS_SPI,
17700 .manufacture_id = SPANSION_ID,
17701 .model_id = SPANSION_S25FL256L,
17702 .total_size = 32768,
17703 .page_size = 256,
17704 /* 4 x 256B Security Region (OTP) */
17705 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP |
17706 FEATURE_4BA_ENTER | FEATURE_4BA_NATIVE,
17707 .tested = TEST_UNTESTED,
17708 .probe = probe_spi_rdid,
17709 .probe_timing = TIMING_ZERO,
17710 .block_erasers =
17711 {
17712 {
17713 .eraseblocks = { {4 * 1024, 8192} },
17714 .block_erase = spi_block_erase_21,
17715 }, {
17716 .eraseblocks = { {4 * 1024, 8192} },
17717 .block_erase = spi_block_erase_20,
17718 }, {
17719 .eraseblocks = { {32 * 1024, 1024} },
17720 .block_erase = spi_block_erase_53,
17721 }, {
17722 .eraseblocks = { {32 * 1024, 1024} },
17723 .block_erase = spi_block_erase_52,
17724 }, {
17725 .eraseblocks = { {64 * 1024, 512} },
17726 .block_erase = spi_block_erase_dc,
17727 }, {
17728 .eraseblocks = { {64 * 1024, 512} },
17729 .block_erase = spi_block_erase_d8,
17730 }, {
17731 .eraseblocks = { {32768 * 1024, 1} },
17732 .block_erase = spi_block_erase_60,
17733 }, {
17734 .eraseblocks = { {32768 * 1024, 1} },
17735 .block_erase = spi_block_erase_c7,
17736 }
17737 },
17738 .printlock = spi_prettyprint_status_register_bp3_srwd,
17739 .unlock = spi_disable_blockprotect_bp3_srwd,
17740 .write = spi_chip_write_256,
17741 .read = spi_chip_read, /* Fast read (0x0B) supported */
17742 .voltage = {2700, 3600},
17743 .reg_bits =
17744 {
17745 /*
17746 * Note: This chip has a read-only Status Register 2 that is not
17747 * counted here. Registers are mapped as follows:
17748 * STATUS1 ... Status Register 1
17749 * STATUS2 ... Configuration Register 1
17750 * STATUS3 ... Configuration Register 2
17751 */
17752 .srp = {STATUS1, 7, RW},
17753 .srl = {STATUS2, 0, RW},
17754 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
17755 .tb = {STATUS1, 6, RW},
17756 .cmp = {STATUS2, 6, RW},
17757 .wps = {STATUS3, 2, RW},
17758 },
Nico Huberaabb3e02023-01-13 00:22:30 +010017759 .wp_write_cfg = spi_wp_write_cfg,
17760 .wp_read_cfg = spi_wp_read_cfg,
17761 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020017762 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020017763 .prepare_access = spi_prepare_io,
17764 .finish_access = spi_finish_io,
Nico Huberfffc48d2022-05-28 14:26:06 +020017765 },
17766
17767 {
17768 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100017769 .name = "S25FL256S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17770 .bustype = BUS_SPI,
17771 .manufacture_id = SPANSION_ID,
17772 .model_id = SPANSION_S25FL256,
17773 .total_size = 32768,
17774 .page_size = 256,
17775 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber9bb8a322022-05-24 15:07:34 +020017776 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
17777 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017778 .tested = TEST_OK_PREW,
17779 .probe = probe_spi_rdid,
17780 .probe_timing = TIMING_ZERO,
17781 .block_erasers =
17782 {
17783 {
17784 /* This chip supports erasing of the 32 so-called "parameter sectors" with
17785 * opcode 0x20. Trying to access an address outside these 4kB blocks does
17786 * have no effect on the memory contents, but sets a flag in the SR.
17787 .eraseblocks = {
17788 {4 * 1024, 32},
17789 {64 * 1024, 254} // inaccessible
17790 },
17791 .block_erase = spi_block_erase_20,
17792 }, { */
17793 .eraseblocks = { { 64 * 1024, 512} },
17794 .block_erase = spi_block_erase_dc,
17795 }, {
17796 .eraseblocks = { { 64 * 1024, 512} },
17797 .block_erase = spi_block_erase_d8,
17798 }, {
17799 .eraseblocks = { { 32768 * 1024, 1} },
17800 .block_erase = spi_block_erase_60,
17801 }, {
17802 .eraseblocks = { { 32768 * 1024, 1} },
17803 .block_erase = spi_block_erase_c7,
17804 }
17805 },
17806 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17807 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17808 .write = spi_chip_write_256, /* Multi I/O supported */
17809 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17810 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020017811 .prepare_access = spi_prepare_io,
17812 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017813 },
17814
17815 {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017816 .vendor = "Spansion",
17817 .name = "S25FL512S",
17818 .bustype = BUS_SPI,
17819 .manufacture_id = SPANSION_ID,
17820 .model_id = SPANSION_S25FL512,
17821 .total_size = 65536, /* 512 Mb (=> 64 MB)) */
17822 .page_size = 256,
17823 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber26237922022-06-20 19:37:37 +020017824 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
17825 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
17826 .tested = TEST_UNTESTED,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017827 .probe = probe_spi_rdid,
17828 .probe_timing = TIMING_ZERO,
17829 .block_erasers =
17830 {
17831 {
17832 .eraseblocks = { { 256 * 1024, 256} },
17833 .block_erase = spi_block_erase_dc,
17834 }, {
Nico Huberbb608ff2022-05-24 15:33:26 +020017835 .eraseblocks = { { 256 * 1024, 256} },
17836 .block_erase = spi_block_erase_d8,
17837 }, {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017838 .eraseblocks = { { 65536 * 1024, 1} },
17839 .block_erase = spi_block_erase_60,
17840 }, {
17841 .eraseblocks = { { 65536 * 1024, 1} },
17842 .block_erase = spi_block_erase_c7,
17843 }
17844 },
17845 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17846 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17847 .write = spi_chip_write_256, /* Multi I/O supported, IGNORE for now */
17848 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17849 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020017850 .prepare_access = spi_prepare_io,
17851 .finish_access = spi_finish_io,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017852 },
17853
17854 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017855 .vendor = "SyncMOS/MoselVitelic",
17856 .name = "{F,S,V}29C51001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017857 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017858 .manufacture_id = SYNCMOS_MVC_ID,
17859 .model_id = SM_MVC_29C51001B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017860 .total_size = 128,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017861 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000017862 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017863 .tested = TEST_UNTESTED,
17864 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000017865 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000017866 .block_erasers =
17867 {
17868 {
17869 .eraseblocks = { {512, 256} },
17870 .block_erase = erase_sector_jedec,
17871 }, {
17872 .eraseblocks = { {128 * 1024, 1} },
17873 .block_erase = erase_chip_block_jedec,
17874 },
17875 },
Sean Nelson35727f72010-01-28 23:55:12 +000017876 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000017877 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017878 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017879 .prepare_access = prepare_memory_access,
17880 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000017881 },
17882
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017883 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017884 .vendor = "SyncMOS/MoselVitelic",
17885 .name = "{F,S,V}29C51001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017886 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017887 .manufacture_id = SYNCMOS_MVC_ID,
17888 .model_id = SM_MVC_29C51001T,
17889 .total_size = 128,
17890 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000017891 .feature_bits = FEATURE_EITHER_RESET,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017892 .tested = TEST_UNTESTED,
17893 .probe = probe_jedec,
17894 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
17895 .block_erasers =
17896 {
17897 {
17898 .eraseblocks = { {512, 256} },
17899 .block_erase = erase_sector_jedec,
17900 }, {
17901 .eraseblocks = { {128 * 1024, 1} },
17902 .block_erase = erase_chip_block_jedec,
17903 },
17904 },
17905 .write = write_jedec_1,
17906 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017907 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017908 .prepare_access = prepare_memory_access,
17909 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017910 },
17911
17912 {
17913 .vendor = "SyncMOS/MoselVitelic",
17914 .name = "{F,S,V}29C51002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017915 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017916 .manufacture_id = SYNCMOS_MVC_ID,
17917 .model_id = SM_MVC_29C51002B,
17918 .total_size = 256,
17919 .page_size = 512,
17920 .feature_bits = FEATURE_EITHER_RESET,
17921 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017922 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000017923 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000017924 .block_erasers =
17925 {
17926 {
17927 .eraseblocks = { {512, 512} },
17928 .block_erase = erase_sector_jedec,
17929 }, {
17930 .eraseblocks = { {256 * 1024, 1} },
17931 .block_erase = erase_chip_block_jedec,
17932 },
17933 },
Sean Nelson35727f72010-01-28 23:55:12 +000017934 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000017935 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010017936 .prepare_access = prepare_memory_access,
17937 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000017938 },
17939
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017940 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017941 .vendor = "SyncMOS/MoselVitelic",
17942 .name = "{F,S,V}29C51002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017943 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017944 .manufacture_id = SYNCMOS_MVC_ID,
17945 .model_id = SM_MVC_29C51002T,
17946 .total_size = 256,
17947 .page_size = 512,
17948 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000017949 .tested = TEST_OK_PREW,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017950 .probe = probe_jedec,
17951 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
17952 .block_erasers =
17953 {
17954 {
17955 .eraseblocks = { {512, 512} },
17956 .block_erase = erase_sector_jedec,
17957 }, {
17958 .eraseblocks = { {256 * 1024, 1} },
17959 .block_erase = erase_chip_block_jedec,
17960 },
17961 },
17962 .write = write_jedec_1,
17963 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010017964 .prepare_access = prepare_memory_access,
17965 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017966 },
17967
17968 {
17969 .vendor = "SyncMOS/MoselVitelic",
17970 .name = "{F,S,V}29C51004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017971 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017972 .manufacture_id = SYNCMOS_MVC_ID,
17973 .model_id = SM_MVC_29C51004B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017974 .total_size = 512,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017975 .page_size = 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000017976 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017977 .tested = TEST_UNTESTED,
17978 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000017979 .probe_timing = TIMING_ZERO,
Sean Nelson56358aa2010-01-19 16:08:51 +000017980 .block_erasers =
17981 {
17982 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017983 .eraseblocks = { {1024, 512} },
17984 .block_erase = erase_sector_jedec,
17985 }, {
17986 .eraseblocks = { {512 * 1024, 1} },
17987 .block_erase = erase_chip_block_jedec,
17988 },
17989 },
17990 .write = write_jedec_1,
17991 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017992 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017993 .prepare_access = prepare_memory_access,
17994 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017995 },
17996
17997 {
17998 .vendor = "SyncMOS/MoselVitelic",
17999 .name = "{F,S,V}29C51004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018000 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018001 .manufacture_id = SYNCMOS_MVC_ID,
18002 .model_id = SM_MVC_29C51004T,
18003 .total_size = 512,
18004 .page_size = 1024,
18005 .feature_bits = FEATURE_EITHER_RESET,
18006 .tested = TEST_UNTESTED,
18007 .probe = probe_jedec,
18008 .probe_timing = TIMING_ZERO,
18009 .block_erasers =
18010 {
18011 {
18012 .eraseblocks = { {1024, 512} },
18013 .block_erase = erase_sector_jedec,
18014 }, {
18015 .eraseblocks = { {512 * 1024, 1} },
18016 .block_erase = erase_chip_block_jedec,
18017 },
18018 },
18019 .write = write_jedec_1,
18020 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018021 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018022 .prepare_access = prepare_memory_access,
18023 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018024 },
18025
18026 {
18027 .vendor = "SyncMOS/MoselVitelic",
18028 .name = "{S,V}29C31004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018029 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018030 .manufacture_id = SYNCMOS_MVC_ID,
18031 .model_id = SM_MVC_29C31004B,
18032 .total_size = 512,
18033 .page_size = 1024,
18034 .feature_bits = FEATURE_EITHER_RESET,
18035 .tested = TEST_UNTESTED,
18036 .probe = probe_jedec,
18037 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
18038 .block_erasers =
18039 {
18040 {
18041 .eraseblocks = { {1024, 512} },
18042 .block_erase = erase_sector_jedec,
18043 }, {
18044 .eraseblocks = { {512 * 1024, 1} },
18045 .block_erase = erase_chip_block_jedec,
18046 },
18047 },
18048 .write = write_jedec_1,
18049 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018050 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010018051 .prepare_access = prepare_memory_access,
18052 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018053 },
18054
18055 {
18056 .vendor = "SyncMOS/MoselVitelic",
18057 .name = "{S,V}29C31004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018058 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018059 .manufacture_id = SYNCMOS_MVC_ID,
18060 .model_id = SM_MVC_29C31004T,
18061 .total_size = 512,
18062 .page_size = 1024,
18063 .feature_bits = FEATURE_EITHER_RESET,
18064 .tested = TEST_UNTESTED,
18065 .probe = probe_jedec,
18066 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
18067 .block_erasers =
18068 {
18069 {
18070 .eraseblocks = { {1024, 512} },
Sean Nelson56358aa2010-01-19 16:08:51 +000018071 .block_erase = erase_sector_jedec,
18072 }, {
18073 .eraseblocks = { {512 * 1024, 1} },
18074 .block_erase = erase_chip_block_jedec,
18075 },
18076 },
Sean Nelson35727f72010-01-28 23:55:12 +000018077 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000018078 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018079 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010018080 .prepare_access = prepare_memory_access,
18081 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000018082 },
18083
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018084 {
Uwe Hermanna106d152009-05-27 23:17:40 +000018085 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018086 .name = "TMS29F002RB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018087 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018088 .manufacture_id = TI_OLD_ID,
18089 .model_id = TI_TMS29F002RB,
18090 .total_size = 256,
18091 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000018092 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018093 .tested = TEST_UNTESTED,
18094 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000018095 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000018096 .block_erasers =
18097 {
18098 {
18099 .eraseblocks = {
18100 {16 * 1024, 1},
18101 {8 * 1024, 2},
18102 {32 * 1024, 1},
18103 {64 * 1024, 3},
18104 },
18105 .block_erase = erase_sector_jedec,
18106 }, {
18107 .eraseblocks = { {256 * 1024, 1} },
18108 .block_erase = erase_chip_block_jedec,
18109 },
18110 },
Sean Nelson35727f72010-01-28 23:55:12 +000018111 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018112 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018113 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018114 .prepare_access = prepare_memory_access,
18115 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018116 },
18117
18118 {
Uwe Hermanna106d152009-05-27 23:17:40 +000018119 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018120 .name = "TMS29F002RT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018121 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018122 .manufacture_id = TI_OLD_ID,
18123 .model_id = TI_TMS29F002RT,
18124 .total_size = 256,
18125 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000018126 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018127 .tested = TEST_UNTESTED,
18128 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000018129 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000018130 .block_erasers =
18131 {
18132 {
18133 .eraseblocks = {
18134 {64 * 1024, 3},
18135 {32 * 1024, 1},
18136 {8 * 1024, 2},
18137 {16 * 1024, 1},
18138 },
18139 .block_erase = erase_sector_jedec,
18140 }, {
18141 .eraseblocks = { {256 * 1024, 1} },
18142 .block_erase = erase_chip_block_jedec,
18143 },
18144 },
Sean Nelson35727f72010-01-28 23:55:12 +000018145 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018146 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018147 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018148 .prepare_access = prepare_memory_access,
18149 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018150 },
18151
18152 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018153 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018154 .name = "W25P16",
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018155 .bustype = BUS_SPI,
18156 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018157 .model_id = WINBOND_NEX_W25P16,
18158 .total_size = 2048,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018159 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018160 .feature_bits = FEATURE_WRSR_WREN,
18161 .tested = TEST_UNTESTED,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018162 .probe = probe_spi_rdid,
18163 .probe_timing = TIMING_ZERO,
18164 .block_erasers =
18165 {
18166 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018167 .eraseblocks = { {64 * 1024, 32} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018168 .block_erase = spi_block_erase_d8,
18169 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018170 .eraseblocks = { {2048 * 1024, 1} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018171 .block_erase = spi_block_erase_c7,
18172 }
18173 },
18174 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18175 .unlock = spi_disable_blockprotect,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018176 .write = spi_chip_write_256,
18177 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018178 .voltage = {2700, 3600},
18179 },
18180
18181 {
18182 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018183 .name = "W25P32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018184 .bustype = BUS_SPI,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018185 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018186 .model_id = WINBOND_NEX_W25P32,
18187 .total_size = 4096,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018188 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018189 .feature_bits = FEATURE_WRSR_WREN,
18190 .tested = TEST_UNTESTED,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018191 .probe = probe_spi_rdid,
18192 .probe_timing = TIMING_ZERO,
18193 .block_erasers =
18194 {
18195 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018196 .eraseblocks = { {64 * 1024, 64} },
18197 .block_erase = spi_block_erase_d8,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018198 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018199 .eraseblocks = { {4096 * 1024, 1} },
18200 .block_erase = spi_block_erase_c7,
18201 }
18202 },
18203 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18204 .unlock = spi_disable_blockprotect,
18205 .write = spi_chip_write_256,
18206 .read = spi_chip_read, /* Fast read (0x0B) supported */
18207 .voltage = {2700, 3600},
18208 },
18209
18210 {
18211 .vendor = "Winbond",
18212 .name = "W25P80",
18213 .bustype = BUS_SPI,
18214 .manufacture_id = WINBOND_NEX_ID,
18215 .model_id = WINBOND_NEX_W25P80,
18216 .total_size = 1024,
18217 .page_size = 256,
18218 .feature_bits = FEATURE_WRSR_WREN,
18219 .tested = TEST_UNTESTED,
18220 .probe = probe_spi_rdid,
18221 .probe_timing = TIMING_ZERO,
18222 .block_erasers =
18223 {
18224 {
Rudolf Marekce1c7982010-04-20 19:34:31 +000018225 .eraseblocks = { {64 * 1024, 16} },
18226 .block_erase = spi_block_erase_d8,
18227 }, {
18228 .eraseblocks = { {1024 * 1024, 1} },
Rudolf Marekce1c7982010-04-20 19:34:31 +000018229 .block_erase = spi_block_erase_c7,
18230 }
18231 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018232 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000018233 .unlock = spi_disable_blockprotect,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018234 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018235 .read = spi_chip_read, /* Fast read (0x0B) supported */
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018236 .voltage = {2700, 3600},
David Hendricksc4acec92010-06-24 11:39:57 +000018237 },
18238
18239 {
18240 .vendor = "Winbond",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018241 .name = "W25Q128.V",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018242 .bustype = BUS_SPI,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018243 .manufacture_id = WINBOND_NEX_ID,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018244 .model_id = WINBOND_NEX_W25Q128_V,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018245 .total_size = 16384,
18246 .page_size = 256,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018247 /* supports SFDP */
18248 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018249 /* QPI: only FV & JV..M versions */
Nico Huber98970632024-08-30 02:14:05 +020018250 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020018251 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Edward O'Callaghana97e3532022-12-16 15:41:05 +110018252 .tested = TEST_OK_PREWB,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018253 .probe = probe_spi_rdid,
18254 .probe_timing = TIMING_ZERO,
18255 .block_erasers =
18256 {
18257 {
18258 .eraseblocks = { {4 * 1024, 4096} },
18259 .block_erase = spi_block_erase_20,
18260 }, {
18261 .eraseblocks = { {32 * 1024, 512} },
18262 .block_erase = spi_block_erase_52,
18263 }, {
18264 .eraseblocks = { {64 * 1024, 256} },
18265 .block_erase = spi_block_erase_d8,
18266 }, {
18267 .eraseblocks = { {16 * 1024 * 1024, 1} },
18268 .block_erase = spi_block_erase_60,
18269 }, {
18270 .eraseblocks = { {16 * 1024 * 1024, 1} },
18271 .block_erase = spi_block_erase_c7,
18272 }
18273 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018274 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Antony Rheneus0fbba982011-05-26 14:28:51 +000018275 .unlock = spi_disable_blockprotect,
18276 .write = spi_chip_write_256,
18277 .read = spi_chip_read,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018278 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018279 /* FIXME: Older versions (e.g. 25Q128BV) use WRSR_EXT and have no WPS. */
18280 .reg_bits =
18281 {
Nico Huber2133f592024-01-06 18:30:01 +010018282 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018283 .srp = {STATUS1, 7, RW},
18284 .srl = {STATUS2, 0, RW},
18285 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18286 .tb = {STATUS1, 5, RW},
18287 .sec = {STATUS1, 6, RW},
18288 .cmp = {STATUS2, 6, RW},
18289 .wps = {STATUS3, 2, RW},
18290 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018291 .wp_write_cfg = spi_wp_write_cfg,
18292 .wp_read_cfg = spi_wp_read_cfg,
18293 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018294 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018295 .prepare_access = spi_prepare_io,
18296 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018297 },
18298
18299 {
18300 .vendor = "Winbond",
Patrick Rudolph34323492018-10-04 14:59:40 +020018301 .name = "W25Q128.V..M",
18302 .bustype = BUS_SPI,
18303 .manufacture_id = WINBOND_NEX_ID,
18304 .model_id = WINBOND_NEX_W25Q128_V_M,
18305 .total_size = 16384,
18306 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010018307 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
18308 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030018309 .tested = TEST_OK_PREWB,
Patrick Rudolph34323492018-10-04 14:59:40 +020018310 .probe = probe_spi_rdid,
18311 .probe_timing = TIMING_ZERO,
18312 .block_erasers =
18313 {
18314 {
18315 .eraseblocks = { {4 * 1024, 4096} },
18316 .block_erase = spi_block_erase_20,
18317 }, {
18318 .eraseblocks = { {32 * 1024, 512} },
18319 .block_erase = spi_block_erase_52,
18320 }, {
18321 .eraseblocks = { {64 * 1024, 256} },
18322 .block_erase = spi_block_erase_d8,
18323 }, {
18324 .eraseblocks = { {16 * 1024 * 1024, 1} },
18325 .block_erase = spi_block_erase_60,
18326 }, {
18327 .eraseblocks = { {16 * 1024 * 1024, 1} },
18328 .block_erase = spi_block_erase_c7,
18329 }
18330 },
Alan Greena1fc01d2019-09-23 17:12:44 +100018331 .printlock = spi_prettyprint_status_register_plain,
Patrick Rudolph34323492018-10-04 14:59:40 +020018332 .unlock = spi_disable_blockprotect,
18333 .write = spi_chip_write_256,
18334 .read = spi_chip_read,
18335 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018336 .reg_bits =
18337 {
Nico Huber2133f592024-01-06 18:30:01 +010018338 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018339 .srp = {STATUS1, 7, RW},
18340 .srl = {STATUS2, 0, RW},
18341 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18342 .tb = {STATUS1, 5, RW},
18343 .sec = {STATUS1, 6, RW},
18344 .cmp = {STATUS2, 6, RW},
18345 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018346 .wp_write_cfg = spi_wp_write_cfg,
18347 .wp_read_cfg = spi_wp_read_cfg,
18348 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018349 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018350 .prepare_access = spi_prepare_io,
18351 .finish_access = spi_finish_io,
Patrick Rudolph34323492018-10-04 14:59:40 +020018352 },
18353
18354 {
18355 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018356 .name = "W25Q128.W",
18357 .bustype = BUS_SPI,
18358 .manufacture_id = WINBOND_NEX_ID,
18359 .model_id = WINBOND_NEX_W25Q128_W,
18360 .total_size = 16384,
18361 .page_size = 256,
18362 /* supports SFDP */
18363 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018364 /* QPI: only FW & JW..M versions */
18365 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018366 .tested = TEST_OK_PREW,
18367 .probe = probe_spi_rdid,
18368 .probe_timing = TIMING_ZERO,
18369 .block_erasers =
18370 {
18371 {
18372 .eraseblocks = { {4 * 1024, 4096} },
18373 .block_erase = spi_block_erase_20,
18374 }, {
18375 .eraseblocks = { {32 * 1024, 512} },
18376 .block_erase = spi_block_erase_52,
18377 }, {
18378 .eraseblocks = { {64 * 1024, 256} },
18379 .block_erase = spi_block_erase_d8,
18380 }, {
18381 .eraseblocks = { {16 * 1024 * 1024, 1} },
18382 .block_erase = spi_block_erase_60,
18383 }, {
18384 .eraseblocks = { {16 * 1024 * 1024, 1} },
18385 .block_erase = spi_block_erase_c7,
18386 }
18387 },
18388 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18389 .unlock = spi_disable_blockprotect,
18390 .write = spi_chip_write_256,
18391 .read = spi_chip_read,
18392 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018393 .reg_bits =
18394 {
Nico Huber2133f592024-01-06 18:30:01 +010018395 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018396 .srp = {STATUS1, 7, RW},
18397 .srl = {STATUS2, 0, RW},
18398 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18399 .tb = {STATUS1, 5, RW},
18400 .sec = {STATUS1, 6, RW},
18401 .cmp = {STATUS2, 6, RW},
18402 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018403 .wp_write_cfg = spi_wp_write_cfg,
18404 .wp_read_cfg = spi_wp_read_cfg,
18405 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018406 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018407 .prepare_access = spi_prepare_io,
18408 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018409 },
18410
18411 {
18412 .vendor = "Winbond",
Peichao Wang1a119492019-11-11 15:26:41 +080018413 .name = "W25Q128.JW.DTR",
18414 .bustype = BUS_SPI,
18415 .manufacture_id = WINBOND_NEX_ID,
18416 .model_id = WINBOND_NEX_W25Q128_DTR,
18417 .total_size = 16384,
18418 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010018419 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
18420 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Peichao Wang1a119492019-11-11 15:26:41 +080018421 .tested = TEST_OK_PREW,
18422 .probe = probe_spi_rdid,
18423 .probe_timing = TIMING_ZERO,
18424 .block_erasers =
18425 {
18426 {
18427 .eraseblocks = { {4 * 1024, 4096} },
18428 .block_erase = spi_block_erase_20,
18429 }, {
18430 .eraseblocks = { {32 * 1024, 512} },
18431 .block_erase = spi_block_erase_52,
18432 }, {
18433 .eraseblocks = { {64 * 1024, 256} },
18434 .block_erase = spi_block_erase_d8,
18435 }, {
18436 .eraseblocks = { {16 * 1024 * 1024, 1} },
18437 .block_erase = spi_block_erase_60,
18438 }, {
18439 .eraseblocks = { {16 * 1024 * 1024, 1} },
18440 .block_erase = spi_block_erase_c7,
18441 }
18442 },
18443 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18444 .unlock = spi_disable_blockprotect,
18445 .write = spi_chip_write_256,
18446 .read = spi_chip_read,
18447 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018448 .reg_bits =
18449 {
Nico Huber2133f592024-01-06 18:30:01 +010018450 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018451 .srp = {STATUS1, 7, RW},
18452 .srl = {STATUS2, 0, RW},
18453 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18454 .tb = {STATUS1, 5, RW},
18455 .sec = {STATUS1, 6, RW},
18456 .cmp = {STATUS2, 6, RW},
18457 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018458 .wp_write_cfg = spi_wp_write_cfg,
18459 .wp_read_cfg = spi_wp_read_cfg,
18460 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018461 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018462 .prepare_access = spi_prepare_io,
18463 .finish_access = spi_finish_io,
Peichao Wang1a119492019-11-11 15:26:41 +080018464 },
18465
18466 {
18467 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018468 .name = "W25Q16.V",
18469 .bustype = BUS_SPI,
18470 .manufacture_id = WINBOND_NEX_ID,
18471 .model_id = WINBOND_NEX_W25Q16_V,
18472 .total_size = 2048,
18473 .page_size = 256,
18474 /* supports SFDP */
18475 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018476 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018477 .tested = TEST_OK_PREW,
18478 .probe = probe_spi_rdid,
18479 .probe_timing = TIMING_ZERO,
18480 .block_erasers =
18481 {
18482 {
18483 .eraseblocks = { {4 * 1024, 512} },
18484 .block_erase = spi_block_erase_20,
18485 }, {
18486 .eraseblocks = { {32 * 1024, 64} },
18487 .block_erase = spi_block_erase_52,
18488 }, {
18489 .eraseblocks = { {64 * 1024, 32} },
18490 .block_erase = spi_block_erase_d8,
18491 }, {
18492 .eraseblocks = { {2 * 1024 * 1024, 1} },
18493 .block_erase = spi_block_erase_60,
18494 }, {
18495 .eraseblocks = { {2 * 1024 * 1024, 1} },
18496 .block_erase = spi_block_erase_c7,
18497 }
18498 },
Nico Huber2133f592024-01-06 18:30:01 +010018499 .reg_bits =
18500 {
18501 .qe = {STATUS2, 1, RW},
18502 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018503 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18504 .unlock = spi_disable_blockprotect,
18505 .write = spi_chip_write_256,
18506 .read = spi_chip_read,
18507 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020018508 .prepare_access = spi_prepare_io,
18509 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018510 },
18511
18512 {
18513 .vendor = "Winbond",
18514 .name = "W25Q16.W",
18515 .bustype = BUS_SPI,
18516 .manufacture_id = WINBOND_NEX_ID,
18517 .model_id = WINBOND_NEX_W25Q16_W,
18518 .total_size = 2048,
18519 .page_size = 256,
18520 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018521 /* QPI: only FW & JW..M versions .qpi_read_params = { 2, 4, 6, 8 } */
18522 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018523 .tested = TEST_UNTESTED,
18524 .probe = probe_spi_rdid,
18525 .probe_timing = TIMING_ZERO,
18526 .block_erasers =
18527 {
18528 {
18529 .eraseblocks = { {4 * 1024, 512} },
18530 .block_erase = spi_block_erase_20,
18531 }, {
18532 .eraseblocks = { {32 * 1024, 64} },
18533 .block_erase = spi_block_erase_52,
18534 }, {
18535 .eraseblocks = { {64 * 1024, 32} },
18536 .block_erase = spi_block_erase_d8,
18537 }, {
18538 .eraseblocks = { {2 * 1024 * 1024, 1} },
18539 .block_erase = spi_block_erase_60,
18540 }, {
18541 .eraseblocks = { {2 * 1024 * 1024, 1} },
18542 .block_erase = spi_block_erase_c7,
18543 }
18544 },
Nico Huber2133f592024-01-06 18:30:01 +010018545 .reg_bits =
18546 {
18547 .qe = {STATUS2, 1, RW},
18548 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018549 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18550 .unlock = spi_disable_blockprotect,
18551 .write = spi_chip_write_256,
18552 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010018553 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018554 .prepare_access = spi_prepare_io,
18555 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018556 },
18557
18558 {
18559 .vendor = "Winbond",
18560 .name = "W25Q20.W",
18561 .bustype = BUS_SPI,
18562 .manufacture_id = WINBOND_NEX_ID,
18563 .model_id = WINBOND_NEX_W25Q20_W,
18564 .total_size = 256,
18565 .page_size = 256,
18566 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018567 /* W25Q20EW: FEATURE_WRSR2 */
18568 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018569 .tested = TEST_UNTESTED,
18570 .probe = probe_spi_rdid,
18571 .probe_timing = TIMING_ZERO,
18572 .block_erasers =
18573 {
18574 {
18575 .eraseblocks = { {4 * 1024, 64} },
18576 .block_erase = spi_block_erase_20,
18577 }, {
18578 .eraseblocks = { {32 * 1024, 8} },
18579 .block_erase = spi_block_erase_52,
18580 }, {
18581 .eraseblocks = { {64 * 1024, 4} },
18582 .block_erase = spi_block_erase_d8,
18583 }, {
18584 .eraseblocks = { {256 * 1024, 1} },
18585 .block_erase = spi_block_erase_60,
18586 }, {
18587 .eraseblocks = { {256 * 1024, 1} },
18588 .block_erase = spi_block_erase_c7,
18589 }
18590 },
Nico Huber2133f592024-01-06 18:30:01 +010018591 .reg_bits =
18592 {
18593 .qe = {STATUS2, 1, RW},
18594 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018595 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18596 .unlock = spi_disable_blockprotect,
18597 .write = spi_chip_write_256,
18598 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010018599 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018600 .prepare_access = spi_prepare_io,
18601 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018602 },
18603
18604 {
18605 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020018606 .name = "W25Q256FV",
Boris Baykovaa6c3742016-06-11 18:29:01 +020018607 .bustype = BUS_SPI,
18608 .manufacture_id = WINBOND_NEX_ID,
18609 .model_id = WINBOND_NEX_W25Q256_V,
18610 .total_size = 32768,
18611 .page_size = 256,
18612 /* supports SFDP */
18613 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018614 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
18615 FEATURE_4BA_ENTER_WREN | FEATURE_4BA_EAR_C5C8 |
18616 FEATURE_4BA_READ | FEATURE_4BA_FAST_READ |
18617 FEATURE_QPI_SRP,
18618 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons3130cbd2018-09-30 19:32:30 +020018619 .tested = TEST_OK_PREW,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018620 .probe = probe_spi_rdid,
18621 .probe_timing = TIMING_ZERO,
18622 .block_erasers =
18623 {
18624 {
18625 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7a077222017-10-14 18:18:30 +020018626 .block_erase = spi_block_erase_20,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018627 }, {
18628 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber7a077222017-10-14 18:18:30 +020018629 .block_erase = spi_block_erase_52,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018630 }, {
18631 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7a077222017-10-14 18:18:30 +020018632 .block_erase = spi_block_erase_d8,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018633 }, {
18634 .eraseblocks = { {32 * 1024 * 1024, 1} },
18635 .block_erase = spi_block_erase_60,
18636 }, {
18637 .eraseblocks = { {32 * 1024 * 1024, 1} },
18638 .block_erase = spi_block_erase_c7,
18639 }
18640 },
18641 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18642 .unlock = spi_disable_blockprotect,
18643 .write = spi_chip_write_256,
18644 .read = spi_chip_read,
18645 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018646 .reg_bits =
18647 {
Nico Huber2133f592024-01-06 18:30:01 +010018648 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018649 .srp = {STATUS1, 7, RW},
18650 .srl = {STATUS2, 0, RW},
18651 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18652 .tb = {STATUS1, 6, RW},
18653 .cmp = {STATUS2, 6, RW},
18654 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018655 .wp_write_cfg = spi_wp_write_cfg,
18656 .wp_read_cfg = spi_wp_read_cfg,
18657 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018658 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018659 .prepare_access = spi_prepare_io,
18660 .finish_access = spi_finish_io,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018661 },
18662
18663 {
18664 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020018665 .name = "W25Q256JV_Q",
18666 .bustype = BUS_SPI,
18667 .manufacture_id = WINBOND_NEX_ID,
18668 .model_id = WINBOND_NEX_W25Q256_V,
18669 .total_size = 32768,
18670 .page_size = 256,
18671 /* supports SFDP */
18672 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018673 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Nico Huberddfbbe82023-12-21 16:31:27 +010018674 .tested = TEST_OK_PREW,
Nico Huber5215eab2022-05-23 15:13:07 +020018675 .probe = probe_spi_rdid,
18676 .probe_timing = TIMING_ZERO,
18677 .block_erasers =
18678 {
18679 {
18680 .eraseblocks = { {4 * 1024, 8192} },
18681 .block_erase = spi_block_erase_21,
18682 }, {
18683 .eraseblocks = { {4 * 1024, 8192} },
18684 .block_erase = spi_block_erase_20,
18685 }, {
18686 .eraseblocks = { {32 * 1024, 1024} },
18687 .block_erase = spi_block_erase_52,
18688 }, {
18689 .eraseblocks = { {64 * 1024, 512} },
18690 .block_erase = spi_block_erase_dc,
18691 }, {
18692 .eraseblocks = { {64 * 1024, 512} },
18693 .block_erase = spi_block_erase_d8,
18694 }, {
18695 .eraseblocks = { {32 * 1024 * 1024, 1} },
18696 .block_erase = spi_block_erase_60,
18697 }, {
18698 .eraseblocks = { {32 * 1024 * 1024, 1} },
18699 .block_erase = spi_block_erase_c7,
18700 }
18701 },
18702 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18703 .unlock = spi_disable_blockprotect,
18704 .write = spi_chip_write_256,
18705 .read = spi_chip_read,
18706 .voltage = {2700, 3600},
18707 .reg_bits =
18708 {
Nico Huber2133f592024-01-06 18:30:01 +010018709 .qe = {STATUS2, 1, RW},
Nico Huber5215eab2022-05-23 15:13:07 +020018710 .srp = {STATUS1, 7, RW},
18711 .srl = {STATUS2, 0, RW},
18712 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18713 .tb = {STATUS1, 6, RW},
18714 .cmp = {STATUS2, 6, RW},
18715 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018716 .wp_write_cfg = spi_wp_write_cfg,
18717 .wp_read_cfg = spi_wp_read_cfg,
18718 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber5215eab2022-05-23 15:13:07 +020018719 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018720 .prepare_access = spi_prepare_io,
18721 .finish_access = spi_finish_io,
Nico Huber5215eab2022-05-23 15:13:07 +020018722 },
18723
18724 {
18725 .vendor = "Winbond",
David Hendricks49876792018-10-27 20:19:42 +000018726 .name = "W25Q256JV_M",
18727 .bustype = BUS_SPI,
18728 .manufacture_id = WINBOND_NEX_ID,
18729 .model_id = WINBOND_NEX_W25Q256JV_M,
18730 .total_size = 32768,
18731 .page_size = 256,
18732 /* supports SFDP */
18733 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018734 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
18735 FEATURE_4BA | FEATURE_QPI_SRP,
18736 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
David Hendricks49876792018-10-27 20:19:42 +000018737 .tested = TEST_OK_PREW,
18738 .probe = probe_spi_rdid,
18739 .probe_timing = TIMING_ZERO,
18740 .block_erasers =
18741 {
18742 {
18743 .eraseblocks = { {4 * 1024, 8192} },
18744 .block_erase = spi_block_erase_21,
18745 }, {
18746 .eraseblocks = { {4 * 1024, 8192} },
18747 .block_erase = spi_block_erase_20,
18748 }, {
18749 .eraseblocks = { {32 * 1024, 1024} },
18750 .block_erase = spi_block_erase_52,
18751 }, {
18752 .eraseblocks = { {64 * 1024, 512} },
18753 .block_erase = spi_block_erase_dc,
18754 }, {
18755 .eraseblocks = { {64 * 1024, 512} },
18756 .block_erase = spi_block_erase_d8,
18757 }, {
18758 .eraseblocks = { {32 * 1024 * 1024, 1} },
18759 .block_erase = spi_block_erase_60,
18760 }, {
18761 .eraseblocks = { {32 * 1024 * 1024, 1} },
18762 .block_erase = spi_block_erase_c7,
18763 }
18764 },
18765 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18766 .unlock = spi_disable_blockprotect,
18767 .write = spi_chip_write_256,
18768 .read = spi_chip_read,
18769 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018770 .reg_bits =
18771 {
Nico Huber2133f592024-01-06 18:30:01 +010018772 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018773 .srp = {STATUS1, 7, RW},
18774 .srl = {STATUS2, 0, RW},
18775 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18776 .tb = {STATUS1, 6, RW},
18777 .cmp = {STATUS2, 6, RW},
18778 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018779 .wp_write_cfg = spi_wp_write_cfg,
18780 .wp_read_cfg = spi_wp_read_cfg,
18781 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018782 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018783 .prepare_access = spi_prepare_io,
18784 .finish_access = spi_finish_io,
David Hendricks49876792018-10-27 20:19:42 +000018785 },
18786
18787 {
18788 .vendor = "Winbond",
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020018789 .name = "W25Q256JW",
el-coderon01209852020-04-29 12:12:53 +020018790 .bustype = BUS_SPI,
18791 .manufacture_id = WINBOND_NEX_ID,
18792 .model_id = WINBOND_NEX_W25Q256_W,
18793 .total_size = 32768,
18794 .page_size = 256,
18795 /* supports SFDP */
18796 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018797 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
18798 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
el-coderon01209852020-04-29 12:12:53 +020018799 .tested = TEST_OK_PREW,
18800 .probe = probe_spi_rdid,
18801 .probe_timing = TIMING_ZERO,
18802 .block_erasers =
18803 {
18804 {
18805 .eraseblocks = { {4 * 1024, 8192} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020018806 .block_erase = spi_block_erase_21,
18807 }, {
18808 .eraseblocks = { {4 * 1024, 8192} },
el-coderon01209852020-04-29 12:12:53 +020018809 .block_erase = spi_block_erase_20,
18810 }, {
18811 .eraseblocks = { {32 * 1024, 1024} },
18812 .block_erase = spi_block_erase_52,
18813 }, {
18814 .eraseblocks = { {64 * 1024, 512} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020018815 .block_erase = spi_block_erase_dc,
18816 }, {
18817 .eraseblocks = { {64 * 1024, 512} },
el-coderon01209852020-04-29 12:12:53 +020018818 .block_erase = spi_block_erase_d8,
18819 }, {
18820 .eraseblocks = { {32 * 1024 * 1024, 1} },
18821 .block_erase = spi_block_erase_60,
18822 }, {
18823 .eraseblocks = { {32 * 1024 * 1024, 1} },
18824 .block_erase = spi_block_erase_c7,
18825 }
18826 },
Nico Huber2133f592024-01-06 18:30:01 +010018827 .reg_bits =
18828 {
18829 .qe = {STATUS2, 1, RW},
18830 },
el-coderon01209852020-04-29 12:12:53 +020018831 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18832 .unlock = spi_disable_blockprotect,
18833 .write = spi_chip_write_256,
18834 .read = spi_chip_read,
18835 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018836 .prepare_access = spi_prepare_io,
18837 .finish_access = spi_finish_io,
el-coderon01209852020-04-29 12:12:53 +020018838 },
18839
18840 {
18841 .vendor = "Winbond",
David Hendricks31532602020-08-16 17:14:56 -070018842 .name = "W25Q256JW_DTR",
18843 .bustype = BUS_SPI,
18844 .manufacture_id = WINBOND_NEX_ID,
18845 .model_id = WINBOND_NEX_W25Q256_DTR,
18846 .total_size = 32768,
18847 .page_size = 256,
18848 /* supports SFDP */
18849 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018850 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
18851 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
18852 .dummy_cycles =
18853 {
18854 .qpi_read_params = {
18855 2, /* Datasheet Rev.K says 4 is the default, though.
18856 Will assume that the text is wrong, if not,
18857 we'll know why it doesn't work. */
18858 4, 6, 8
18859 },
18860 },
Kapil Porwal111c3802022-12-09 19:41:27 +053018861 .tested = TEST_OK_PREWB,
David Hendricks31532602020-08-16 17:14:56 -070018862 .probe = probe_spi_rdid,
18863 .probe_timing = TIMING_ZERO,
18864 .block_erasers =
18865 {
18866 {
18867 .eraseblocks = { {4 * 1024, 8192} },
18868 .block_erase = spi_block_erase_21,
18869 }, {
18870 .eraseblocks = { {4 * 1024, 8192} },
18871 .block_erase = spi_block_erase_20,
18872 }, {
18873 .eraseblocks = { {32 * 1024, 1024} },
18874 .block_erase = spi_block_erase_52,
18875 }, {
18876 .eraseblocks = { {64 * 1024, 512} },
18877 .block_erase = spi_block_erase_dc,
18878 }, {
18879 .eraseblocks = { {64 * 1024, 512} },
18880 .block_erase = spi_block_erase_d8,
18881 }, {
18882 .eraseblocks = { {32 * 1024 * 1024, 1} },
18883 .block_erase = spi_block_erase_60,
18884 }, {
18885 .eraseblocks = { {32 * 1024 * 1024, 1} },
18886 .block_erase = spi_block_erase_c7,
18887 }
18888 },
18889 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18890 .unlock = spi_disable_blockprotect,
18891 .write = spi_chip_write_256,
18892 .read = spi_chip_read,
18893 .voltage = {1700, 1950},
Kapil Porwal111c3802022-12-09 19:41:27 +053018894 .reg_bits =
18895 {
Nico Huber2133f592024-01-06 18:30:01 +010018896 .qe = {STATUS2, 1, RW},
Kapil Porwal111c3802022-12-09 19:41:27 +053018897 .srp = {STATUS1, 7, RW},
18898 .srl = {STATUS2, 0, RW},
18899 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18900 .tb = {STATUS1, 6, RW},
18901 .cmp = {STATUS2, 6, RW},
18902 .wps = {STATUS3, 2, RW},
18903 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018904 .wp_write_cfg = spi_wp_write_cfg,
18905 .wp_read_cfg = spi_wp_read_cfg,
18906 .wp_get_ranges = spi_wp_get_available_ranges,
Kapil Porwal111c3802022-12-09 19:41:27 +053018907 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018908 .prepare_access = spi_prepare_io,
18909 .finish_access = spi_finish_io,
David Hendricks31532602020-08-16 17:14:56 -070018910 },
18911
18912 {
18913 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018914 .name = "W25Q32BV/W25Q32CV/W25Q32DV",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018915 .bustype = BUS_SPI,
18916 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018917 .model_id = WINBOND_NEX_W25Q32_V,
18918 .total_size = 4096,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018919 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018920 /* supports SFDP */
18921 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018922 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018923 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018924 .probe = probe_spi_rdid,
18925 .probe_timing = TIMING_ZERO,
18926 .block_erasers =
18927 {
18928 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018929 .eraseblocks = { {4 * 1024, 1024} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018930 .block_erase = spi_block_erase_20,
18931 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018932 .eraseblocks = { {32 * 1024, 128} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018933 .block_erase = spi_block_erase_52,
18934 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018935 .eraseblocks = { {64 * 1024, 64} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018936 .block_erase = spi_block_erase_d8,
18937 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018938 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018939 .block_erase = spi_block_erase_60,
18940 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018941 .eraseblocks = { {4 * 1024 * 1024, 1} },
18942 .block_erase = spi_block_erase_c7,
18943 }
18944 },
18945 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18946 .unlock = spi_disable_blockprotect,
18947 .write = spi_chip_write_256,
18948 .read = spi_chip_read,
18949 .voltage = {2700, 3600},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018950 .reg_bits =
18951 {
Nico Huber2133f592024-01-06 18:30:01 +010018952 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018953 .srp = {STATUS1, 7, RW},
18954 .srl = {STATUS2, 0, RW},
18955 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18956 .tb = {STATUS1, 5, RW},
18957 .sec = {STATUS1, 6, RW},
18958 .cmp = {STATUS2, 6, RW},
18959 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018960 .wp_write_cfg = spi_wp_write_cfg,
18961 .wp_read_cfg = spi_wp_read_cfg,
18962 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018963 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018964 .prepare_access = spi_prepare_io,
18965 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018966 },
18967
18968 {
18969 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018970 .name = "W25Q32FV",
18971 .bustype = BUS_SPI,
18972 .manufacture_id = WINBOND_NEX_ID,
18973 .model_id = WINBOND_NEX_W25Q32_V,
18974 .total_size = 4096,
18975 .page_size = 256,
18976 /* supports SFDP */
18977 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018978 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018979 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010018980 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018981 .tested = TEST_OK_PREW,
18982 .probe = probe_spi_rdid,
18983 .probe_timing = TIMING_ZERO,
18984 .block_erasers =
18985 {
18986 {
18987 .eraseblocks = { {4 * 1024, 1024} },
18988 .block_erase = spi_block_erase_20,
18989 }, {
18990 .eraseblocks = { {32 * 1024, 128} },
18991 .block_erase = spi_block_erase_52,
18992 }, {
18993 .eraseblocks = { {64 * 1024, 64} },
18994 .block_erase = spi_block_erase_d8,
18995 }, {
18996 .eraseblocks = { {4 * 1024 * 1024, 1} },
18997 .block_erase = spi_block_erase_60,
18998 }, {
18999 .eraseblocks = { {4 * 1024 * 1024, 1} },
19000 .block_erase = spi_block_erase_c7,
19001 }
19002 },
19003 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19004 .unlock = spi_disable_blockprotect,
19005 .write = spi_chip_write_256,
19006 .read = spi_chip_read,
19007 .voltage = {2700, 3600},
19008 .reg_bits =
19009 {
Nico Huber2133f592024-01-06 18:30:01 +010019010 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019011 .srp = {STATUS1, 7, RW},
19012 .srl = {STATUS2, 0, RW},
19013 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19014 .tb = {STATUS1, 5, RW},
19015 .sec = {STATUS1, 6, RW},
19016 .cmp = {STATUS2, 6, RW},
19017 .wps = {STATUS3, 2, RW},
19018 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019019 .wp_write_cfg = spi_wp_write_cfg,
19020 .wp_read_cfg = spi_wp_read_cfg,
19021 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019022 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019023 .prepare_access = spi_prepare_io,
19024 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019025 },
19026
19027 {
19028 .vendor = "Winbond",
19029 .name = "W25Q32JV",
19030 .bustype = BUS_SPI,
19031 .manufacture_id = WINBOND_NEX_ID,
19032 .model_id = WINBOND_NEX_W25Q32_V,
19033 .total_size = 4096,
19034 .page_size = 256,
19035 /* supports SFDP */
19036 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019037 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019038 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
19039 .tested = TEST_OK_PREW,
19040 .probe = probe_spi_rdid,
19041 .probe_timing = TIMING_ZERO,
19042 .block_erasers =
19043 {
19044 {
19045 .eraseblocks = { {4 * 1024, 1024} },
19046 .block_erase = spi_block_erase_20,
19047 }, {
19048 .eraseblocks = { {32 * 1024, 128} },
19049 .block_erase = spi_block_erase_52,
19050 }, {
19051 .eraseblocks = { {64 * 1024, 64} },
19052 .block_erase = spi_block_erase_d8,
19053 }, {
19054 .eraseblocks = { {4 * 1024 * 1024, 1} },
19055 .block_erase = spi_block_erase_60,
19056 }, {
19057 .eraseblocks = { {4 * 1024 * 1024, 1} },
19058 .block_erase = spi_block_erase_c7,
19059 }
19060 },
19061 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19062 .unlock = spi_disable_blockprotect,
19063 .write = spi_chip_write_256,
19064 .read = spi_chip_read,
19065 .voltage = {2700, 3600},
19066 .reg_bits =
19067 {
Nico Huber2133f592024-01-06 18:30:01 +010019068 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019069 .srp = {STATUS1, 7, RW},
19070 .srl = {STATUS2, 0, RW},
19071 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19072 .tb = {STATUS1, 5, RW},
19073 .sec = {STATUS1, 6, RW},
19074 .cmp = {STATUS2, 6, RW},
19075 .wps = {STATUS3, 2, RW},
19076 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019077 .wp_write_cfg = spi_wp_write_cfg,
19078 .wp_read_cfg = spi_wp_read_cfg,
19079 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019080 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019081 .prepare_access = spi_prepare_io,
19082 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019083 },
19084
19085 {
19086 .vendor = "Winbond",
Angel Pons0d4354e2024-05-26 16:33:51 +020019087 .name = "W25Q32JV-.M",
19088 .bustype = BUS_SPI,
19089 .manufacture_id = WINBOND_NEX_ID,
19090 .model_id = WINBOND_NEX_W25Q32JV,
19091 .total_size = 4096,
19092 .page_size = 256,
19093 /* supports SFDP */
Nico Huber1412d9f2024-01-06 18:25:49 +010019094 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Angel Pons0d4354e2024-05-26 16:33:51 +020019095 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010019096 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons0d4354e2024-05-26 16:33:51 +020019097 .tested = TEST_OK_PREW,
19098 .probe = probe_spi_rdid,
19099 .probe_timing = TIMING_ZERO,
19100 .block_erasers =
19101 {
19102 {
19103 .eraseblocks = { {4 * 1024, 1024} },
19104 .block_erase = spi_block_erase_20,
19105 }, {
19106 .eraseblocks = { {32 * 1024, 128} },
19107 .block_erase = spi_block_erase_52,
19108 }, {
19109 .eraseblocks = { {64 * 1024, 64} },
19110 .block_erase = spi_block_erase_d8,
19111 }, {
19112 .eraseblocks = { {4 * 1024 * 1024, 1} },
19113 .block_erase = spi_block_erase_60,
19114 }, {
19115 .eraseblocks = { {4 * 1024 * 1024, 1} },
19116 .block_erase = spi_block_erase_c7,
19117 }
19118 },
19119 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19120 .unlock = spi_disable_blockprotect_bp2_srwd,
19121 .write = spi_chip_write_256,
19122 .read = spi_chip_read,
19123 .voltage = {2700, 3600},
19124 .reg_bits =
19125 {
Nico Huber2133f592024-01-06 18:30:01 +010019126 .qe = {STATUS2, 1, RW},
Angel Pons0d4354e2024-05-26 16:33:51 +020019127 .srp = {STATUS1, 7, RW},
19128 .srl = {STATUS2, 0, RW},
19129 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19130 .tb = {STATUS1, 5, RW},
19131 .sec = {STATUS1, 6, RW},
19132 .cmp = {STATUS2, 6, RW},
19133 .wps = {STATUS3, 2, RW},
19134 },
19135 .wp_write_cfg = spi_wp_write_cfg,
19136 .wp_read_cfg = spi_wp_read_cfg,
19137 .wp_get_ranges = spi_wp_get_available_ranges,
19138 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019139 .prepare_access = spi_prepare_io,
19140 .finish_access = spi_finish_io,
Angel Pons0d4354e2024-05-26 16:33:51 +020019141 },
19142
19143 {
19144 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019145 .name = "W25Q32BW/W25Q32CW/W25Q32DW",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019146 .bustype = BUS_SPI,
19147 .manufacture_id = WINBOND_NEX_ID,
19148 .model_id = WINBOND_NEX_W25Q32_W,
19149 .total_size = 4096,
19150 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019151 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019152 /* QPI: only DW version */
19153 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019154 .tested = TEST_OK_PREW,
19155 .probe = probe_spi_rdid,
19156 .probe_timing = TIMING_ZERO,
19157 .block_erasers =
19158 {
19159 {
19160 .eraseblocks = { {4 * 1024, 1024} },
19161 .block_erase = spi_block_erase_20,
19162 }, {
19163 .eraseblocks = { {32 * 1024, 128} },
19164 .block_erase = spi_block_erase_52,
19165 }, {
19166 .eraseblocks = { {64 * 1024, 64} },
19167 .block_erase = spi_block_erase_d8,
19168 }, {
19169 .eraseblocks = { {4 * 1024 * 1024, 1} },
19170 .block_erase = spi_block_erase_60,
19171 }, {
19172 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019173 .block_erase = spi_block_erase_c7,
19174 }
19175 },
19176 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19177 .unlock = spi_disable_blockprotect,
19178 .write = spi_chip_write_256,
19179 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019180 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019181 .reg_bits =
19182 {
Nico Huber2133f592024-01-06 18:30:01 +010019183 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019184 .srp = {STATUS1, 7, RW},
19185 .srl = {STATUS2, 0, RW},
19186 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19187 .tb = {STATUS1, 5, RW},
19188 .sec = {STATUS1, 6, RW},
19189 .cmp = {STATUS2, 6, RW},
19190 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019191 .wp_write_cfg = spi_wp_write_cfg,
19192 .wp_read_cfg = spi_wp_read_cfg,
19193 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019194 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019195 .prepare_access = spi_prepare_io,
19196 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019197 },
19198
19199 {
19200 .vendor = "Winbond",
19201 .name = "W25Q32FW",
19202 .bustype = BUS_SPI,
19203 .manufacture_id = WINBOND_NEX_ID,
19204 .model_id = WINBOND_NEX_W25Q32_W,
19205 .total_size = 4096,
19206 .page_size = 256,
19207 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019208 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019209 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010019210 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019211 .tested = TEST_OK_PREW,
19212 .probe = probe_spi_rdid,
19213 .probe_timing = TIMING_ZERO,
19214 .block_erasers =
19215 {
19216 {
19217 .eraseblocks = { {4 * 1024, 1024} },
19218 .block_erase = spi_block_erase_20,
19219 }, {
19220 .eraseblocks = { {32 * 1024, 128} },
19221 .block_erase = spi_block_erase_52,
19222 }, {
19223 .eraseblocks = { {64 * 1024, 64} },
19224 .block_erase = spi_block_erase_d8,
19225 }, {
19226 .eraseblocks = { {4 * 1024 * 1024, 1} },
19227 .block_erase = spi_block_erase_60,
19228 }, {
19229 .eraseblocks = { {4 * 1024 * 1024, 1} },
19230 .block_erase = spi_block_erase_c7,
19231 }
19232 },
19233 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19234 .unlock = spi_disable_blockprotect,
19235 .write = spi_chip_write_256,
19236 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019237 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019238 .reg_bits =
19239 {
Nico Huber2133f592024-01-06 18:30:01 +010019240 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019241 .srp = {STATUS1, 7, RW},
19242 .srl = {STATUS2, 0, RW},
19243 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19244 .tb = {STATUS1, 5, RW},
19245 .sec = {STATUS1, 6, RW},
19246 .cmp = {STATUS2, 6, RW},
19247 .wps = {STATUS3, 2, RW},
19248 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019249 .wp_write_cfg = spi_wp_write_cfg,
19250 .wp_read_cfg = spi_wp_read_cfg,
19251 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019252 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019253 .prepare_access = spi_prepare_io,
19254 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019255 },
19256
19257 {
19258 .vendor = "Winbond",
19259 .name = "W25Q32JW...Q",
19260 .bustype = BUS_SPI,
19261 .manufacture_id = WINBOND_NEX_ID,
19262 .model_id = WINBOND_NEX_W25Q32_W,
19263 .total_size = 4096,
19264 .page_size = 256,
19265 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19266 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010019267 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019268 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
19269 .tested = TEST_OK_PREW,
19270 .probe = probe_spi_rdid,
19271 .probe_timing = TIMING_ZERO,
19272 .block_erasers =
19273 {
19274 {
19275 .eraseblocks = { {4 * 1024, 1024} },
19276 .block_erase = spi_block_erase_20,
19277 }, {
19278 .eraseblocks = { {32 * 1024, 128} },
19279 .block_erase = spi_block_erase_52,
19280 }, {
19281 .eraseblocks = { {64 * 1024, 64} },
19282 .block_erase = spi_block_erase_d8,
19283 }, {
19284 .eraseblocks = { {4 * 1024 * 1024, 1} },
19285 .block_erase = spi_block_erase_60,
19286 }, {
19287 .eraseblocks = { {4 * 1024 * 1024, 1} },
19288 .block_erase = spi_block_erase_c7,
19289 }
19290 },
19291 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19292 .unlock = spi_disable_blockprotect,
19293 .write = spi_chip_write_256,
19294 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019295 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019296 .reg_bits =
19297 {
19298 .srp = {STATUS1, 7, RW},
19299 .srl = {STATUS2, 0, RW},
19300 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19301 .tb = {STATUS1, 5, RW},
19302 .sec = {STATUS1, 6, RW},
19303 .cmp = {STATUS2, 6, RW},
19304 .wps = {STATUS3, 2, RW},
19305 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019306 .wp_write_cfg = spi_wp_write_cfg,
19307 .wp_read_cfg = spi_wp_read_cfg,
19308 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019309 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019310 .prepare_access = spi_prepare_io,
19311 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019312 },
19313
19314 {
19315 .vendor = "Winbond",
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019316 .name = "W25Q32JW...M",
19317 .bustype = BUS_SPI,
19318 .manufacture_id = WINBOND_NEX_ID,
19319 .model_id = WINBOND_NEX_W25Q32JW_M,
19320 .total_size = 4096,
19321 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019322 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19323 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010019324 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019325 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_WRSR_EXT2,
Nico Huber2133f592024-01-06 18:30:01 +010019326 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019327 .tested = TEST_OK_PREW,
19328 .probe = probe_spi_rdid,
19329 .probe_timing = TIMING_ZERO,
19330 .block_erasers =
19331 {
19332 {
19333 .eraseblocks = { {4 * 1024, 1024} },
19334 .block_erase = spi_block_erase_20,
19335 }, {
19336 .eraseblocks = { {32 * 1024, 128} },
19337 .block_erase = spi_block_erase_52,
19338 }, {
19339 .eraseblocks = { {64 * 1024, 64} },
19340 .block_erase = spi_block_erase_d8,
19341 }, {
19342 .eraseblocks = { {4 * 1024 * 1024, 1} },
19343 .block_erase = spi_block_erase_60,
19344 }, {
19345 .eraseblocks = { {4 * 1024 * 1024, 1} },
19346 .block_erase = spi_block_erase_c7,
19347 }
19348 },
19349 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19350 .unlock = spi_disable_blockprotect_bp2_srwd,
19351 .write = spi_chip_write_256,
19352 .read = spi_chip_read,
19353 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019354 .reg_bits =
19355 {
Nico Huber2133f592024-01-06 18:30:01 +010019356 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019357 .srp = {STATUS1, 7, RW},
19358 .srl = {STATUS2, 0, RW},
19359 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19360 .tb = {STATUS1, 5, RW},
19361 .sec = {STATUS1, 6, RW},
19362 .cmp = {STATUS2, 6, RW},
19363 .wps = {STATUS3, 2, RW},
19364 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019365 .wp_write_cfg = spi_wp_write_cfg,
19366 .wp_read_cfg = spi_wp_read_cfg,
19367 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019368 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019369 .prepare_access = spi_prepare_io,
19370 .finish_access = spi_finish_io,
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019371 },
19372
19373 {
19374 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019375 .name = "W25Q40.V",
19376 .bustype = BUS_SPI,
19377 .manufacture_id = WINBOND_NEX_ID,
19378 .model_id = WINBOND_NEX_W25Q40_V,
19379 .total_size = 512,
19380 .page_size = 256,
19381 /* supports SFDP */
19382 /* OTP: 756B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019383 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019384 .tested = TEST_OK_PREW,
19385 .probe = probe_spi_rdid,
19386 .probe_timing = TIMING_ZERO,
19387 .block_erasers =
19388 {
19389 {
19390 .eraseblocks = { {4 * 1024, 128} },
19391 .block_erase = spi_block_erase_20,
19392 }, {
19393 .eraseblocks = { {32 * 1024, 16} },
19394 .block_erase = spi_block_erase_52,
19395 }, {
19396 .eraseblocks = { {64 * 1024, 8} },
19397 .block_erase = spi_block_erase_d8,
19398 }, {
19399 .eraseblocks = { {512 * 1024, 1} },
19400 .block_erase = spi_block_erase_60,
19401 }, {
19402 .eraseblocks = { {512 * 1024, 1} },
19403 .block_erase = spi_block_erase_c7,
19404 }
19405 },
Nico Huber2133f592024-01-06 18:30:01 +010019406 .reg_bits =
19407 {
19408 .qe = {STATUS2, 1, RW},
19409 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019410 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19411 .unlock = spi_disable_blockprotect,
19412 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber2133f592024-01-06 18:30:01 +010019413 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019414 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019415 .prepare_access = spi_prepare_io,
19416 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019417 },
19418
19419 {
19420 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020019421 .name = "W25Q40BW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019422 .bustype = BUS_SPI,
19423 .manufacture_id = WINBOND_NEX_ID,
Nico Huber25683572018-03-30 13:50:13 +020019424 .model_id = WINBOND_NEX_W25Q40BW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019425 .total_size = 512,
19426 .page_size = 256,
19427 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019428 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Angel Pons3164a0c2018-09-30 20:26:06 +020019429 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019430 .probe = probe_spi_rdid,
19431 .probe_timing = TIMING_ZERO,
19432 .block_erasers =
19433 {
19434 {
19435 .eraseblocks = { {4 * 1024, 128} },
19436 .block_erase = spi_block_erase_20,
19437 }, {
19438 .eraseblocks = { {32 * 1024, 16} },
19439 .block_erase = spi_block_erase_52,
19440 }, {
19441 .eraseblocks = { {64 * 1024, 8} },
19442 .block_erase = spi_block_erase_d8,
19443 }, {
19444 .eraseblocks = { {512 * 1024, 1} },
19445 .block_erase = spi_block_erase_60,
19446 }, {
19447 .eraseblocks = { {512 * 1024, 1} },
19448 .block_erase = spi_block_erase_c7,
19449 }
19450 },
Nico Huber2133f592024-01-06 18:30:01 +010019451 .reg_bits =
19452 {
19453 .qe = {STATUS2, 1, RW},
19454 },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019455 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19456 .unlock = spi_disable_blockprotect,
19457 .write = spi_chip_write_256,
19458 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019459 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019460 .prepare_access = spi_prepare_io,
19461 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019462 },
19463
19464 {
19465 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020019466 .name = "W25Q40EW",
19467 .bustype = BUS_SPI,
19468 .manufacture_id = WINBOND_NEX_ID,
19469 .model_id = WINBOND_NEX_W25Q40EW,
19470 .total_size = 512,
19471 .page_size = 256,
19472 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019473 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
19474 FEATURE_OTP | FEATURE_QPI_SRP,
19475 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green07b8a172019-09-23 16:47:05 +100019476 .tested = TEST_OK_PREW,
Nico Huber25683572018-03-30 13:50:13 +020019477 .probe = probe_spi_rdid,
19478 .probe_timing = TIMING_ZERO,
19479 .block_erasers =
19480 {
19481 {
19482 .eraseblocks = { {4 * 1024, 128} },
19483 .block_erase = spi_block_erase_20,
19484 }, {
19485 .eraseblocks = { {32 * 1024, 16} },
19486 .block_erase = spi_block_erase_52,
19487 }, {
19488 .eraseblocks = { {64 * 1024, 8} },
19489 .block_erase = spi_block_erase_d8,
19490 }, {
19491 .eraseblocks = { {512 * 1024, 1} },
19492 .block_erase = spi_block_erase_60,
19493 }, {
19494 .eraseblocks = { {512 * 1024, 1} },
19495 .block_erase = spi_block_erase_c7,
19496 }
19497 },
Nico Huber2133f592024-01-06 18:30:01 +010019498 .reg_bits =
19499 {
19500 .qe = {STATUS2, 1, RW},
19501 },
Nico Huber25683572018-03-30 13:50:13 +020019502 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19503 .unlock = spi_disable_blockprotect,
19504 .write = spi_chip_write_256,
19505 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019506 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019507 .prepare_access = spi_prepare_io,
19508 .finish_access = spi_finish_io,
Nico Huber25683572018-03-30 13:50:13 +020019509 },
19510
Stanislav Sedovf5775442018-03-07 14:16:51 -080019511 {
19512 .vendor = "Winbond",
Joel Stanley55439612019-07-27 19:25:35 +093019513 .name = "W25Q512JV",
19514 .bustype = BUS_SPI,
19515 .manufacture_id = WINBOND_NEX_ID,
19516 .model_id = WINBOND_NEX_W25Q512JV,
19517 .total_size = 64 * 1024,
19518 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010019519 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
19520 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Joel Stanley55439612019-07-27 19:25:35 +093019521 .tested = TEST_OK_PREW,
19522 .probe = probe_spi_rdid,
19523 .probe_timing = TIMING_ZERO,
19524 .block_erasers =
19525 {
19526 {
19527 .eraseblocks = { {4 * 1024, 16384} },
19528 .block_erase = spi_block_erase_21,
19529 }, {
19530 .eraseblocks = { {4 * 1024, 16384} },
19531 .block_erase = spi_block_erase_20,
19532 }, {
19533 .eraseblocks = { {32 * 1024, 2048} },
19534 .block_erase = spi_block_erase_52,
19535 }, {
19536 .eraseblocks = { {64 * 1024, 1024} },
19537 .block_erase = spi_block_erase_dc,
19538 }, {
19539 .eraseblocks = { {64 * 1024, 1024} },
19540 .block_erase = spi_block_erase_d8,
19541 }, {
19542 .eraseblocks = { {64 * 1024 * 1024, 1} },
19543 .block_erase = spi_block_erase_60,
19544 }, {
19545 .eraseblocks = { {64 * 1024 * 1024, 1} },
19546 .block_erase = spi_block_erase_c7,
19547 }
19548 },
Nico Huber2133f592024-01-06 18:30:01 +010019549 .reg_bits =
19550 {
19551 .qe = {STATUS2, 1, RW},
19552 },
Joel Stanley55439612019-07-27 19:25:35 +093019553 .printlock = spi_prettyprint_status_register_plain,
19554 .unlock = spi_disable_blockprotect,
19555 .write = spi_chip_write_256,
19556 .read = spi_chip_read,
19557 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019558 .prepare_access = spi_prepare_io,
19559 .finish_access = spi_finish_io,
Joel Stanley55439612019-07-27 19:25:35 +093019560 },
19561
19562 {
Alexandru M Stan6ce26a72024-10-11 22:47:24 -070019563 .vendor = "Winbond",
19564 .name = "W25R512NW/W74M51NW",
19565 .bustype = BUS_SPI,
19566 .manufacture_id = WINBOND_NEX_ID,
19567 .model_id = WINBOND_NEX_W25R512NW,
19568 .total_size = 65536,
19569 .page_size = 256,
19570 /* supports SFDP */
19571 /* OTP: 3X256B; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19572 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
19573 .tested = TEST_OK_PREW,
19574 .probe = probe_spi_rdid,
19575 .probe_timing = TIMING_ZERO,
19576 .block_erasers =
19577 {
19578 {
19579 .eraseblocks = { {4 * 1024, 16384} },
19580 .block_erase = spi_block_erase_21,
19581 }, {
19582 .eraseblocks = { {4 * 1024, 16384} },
19583 .block_erase = spi_block_erase_20,
19584 }, {
19585 .eraseblocks = { {32 * 1024, 2048} },
19586 .block_erase = spi_block_erase_52,
19587 }, {
19588 .eraseblocks = { {64 * 1024, 1024} },
19589 .block_erase = spi_block_erase_dc,
19590 }, {
19591 .eraseblocks = { {64 * 1024, 1024} },
19592 .block_erase = spi_block_erase_d8,
19593 }, {
19594 .eraseblocks = { {64 * 1024 * 1024, 1} },
19595 .block_erase = spi_block_erase_60,
19596 }, {
19597 .eraseblocks = { {64 * 1024 * 1024, 1} },
19598 .block_erase = spi_block_erase_c7,
19599 }
19600 },
19601 .printlock = spi_prettyprint_status_register_bp3_srwd,
19602 .unlock = spi_disable_blockprotect,
19603 .write = spi_chip_write_256,
19604 .read = spi_chip_read,
19605 .voltage = {1700, 1950},
19606 .prepare_access = spi_prepare_io,
19607 .finish_access = spi_finish_io,
19608 },
19609
19610 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010019611 .vendor = "Winbond",
19612 .name = "W25Q512NW-IM",
19613 .bustype = BUS_SPI,
19614 .manufacture_id = WINBOND_NEX_ID,
19615 .model_id = WINBOND_NEX_W25Q512NW_IM,
19616 .total_size = 64 * 1024,
19617 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010019618 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
19619 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
19620 .dummy_cycles =
19621 {
19622 /* Actually has 3 parameter bits, but higher values only help with DTR. */
19623 .qpi_read_params = { 2, 4, 6, 8 },
19624 },
Subrata Banikf5bffd92022-12-14 12:30:43 +053019625 .tested = TEST_OK_PREWB,
Felix Singer3c9bdb92022-12-15 23:30:16 +010019626 .probe = probe_spi_rdid,
19627 .probe_timing = TIMING_ZERO,
19628 .block_erasers =
Atul Dhudase2502dbd2021-09-21 10:02:20 +053019629 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010019630 {
19631 .eraseblocks = { {4 * 1024, 16384} },
19632 .block_erase = spi_block_erase_21,
19633 }, {
19634 .eraseblocks = { {4 * 1024, 16384} },
19635 .block_erase = spi_block_erase_20,
19636 }, {
19637 .eraseblocks = { {32 * 1024, 2048} },
19638 .block_erase = spi_block_erase_52,
19639 }, {
19640 .eraseblocks = { {64 * 1024, 1024} },
19641 .block_erase = spi_block_erase_dc,
19642 }, {
19643 .eraseblocks = { {64 * 1024, 1024} },
19644 .block_erase = spi_block_erase_d8,
19645 }, {
19646 .eraseblocks = { {64 * 1024 * 1024, 1} },
19647 .block_erase = spi_block_erase_60,
19648 }, {
19649 .eraseblocks = { {64 * 1024 * 1024, 1} },
19650 .block_erase = spi_block_erase_c7,
19651 }
19652 },
19653 .unlock = spi_disable_blockprotect,
19654 .write = spi_chip_write_256,
19655 .read = spi_chip_read,
19656 .voltage = {1650, 1950},
Subrata Banikf5bffd92022-12-14 12:30:43 +053019657 .reg_bits =
19658 {
Nico Huber2133f592024-01-06 18:30:01 +010019659 .qe = {STATUS2, 1, RW},
Subrata Banikf5bffd92022-12-14 12:30:43 +053019660 .srp = {STATUS1, 7, RW},
19661 .srl = {STATUS2, 0, RW},
19662 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
19663 .tb = {STATUS1, 6, RW},
19664 .cmp = {STATUS2, 6, RW},
19665 .wps = {STATUS3, 2, RW},
19666 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019667 .wp_write_cfg = spi_wp_write_cfg,
19668 .wp_read_cfg = spi_wp_read_cfg,
19669 .wp_get_ranges = spi_wp_get_available_ranges,
Subrata Banikf5bffd92022-12-14 12:30:43 +053019670 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019671 .prepare_access = spi_prepare_io,
19672 .finish_access = spi_finish_io,
Atul Dhudase2502dbd2021-09-21 10:02:20 +053019673 },
19674
19675 {
Joel Stanley55439612019-07-27 19:25:35 +093019676 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019677 .name = "W25Q64BV/W25Q64CV/W25Q64FV",
Stanislav Sedovf5775442018-03-07 14:16:51 -080019678 .bustype = BUS_SPI,
19679 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019680 .model_id = WINBOND_NEX_W25Q64_V,
19681 .total_size = 8192,
Stanislav Sedovf5775442018-03-07 14:16:51 -080019682 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019683 /* supports SFDP */
19684 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019685 /* QPI: only FV version */
19686 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030019687 .tested = TEST_OK_PREWB,
Stanislav Sedovf5775442018-03-07 14:16:51 -080019688 .probe = probe_spi_rdid,
19689 .probe_timing = TIMING_ZERO,
19690 .block_erasers =
19691 {
19692 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019693 .eraseblocks = { {4 * 1024, 2048} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019694 .block_erase = spi_block_erase_20,
19695 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019696 .eraseblocks = { {32 * 1024, 256} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019697 .block_erase = spi_block_erase_52,
19698 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019699 .eraseblocks = { {64 * 1024, 128} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019700 .block_erase = spi_block_erase_d8,
19701 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019702 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019703 .block_erase = spi_block_erase_60,
19704 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019705 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019706 .block_erase = spi_block_erase_c7,
19707 }
19708 },
19709 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19710 .unlock = spi_disable_blockprotect,
19711 .write = spi_chip_write_256,
19712 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019713 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019714 .reg_bits =
19715 {
Nico Huber2133f592024-01-06 18:30:01 +010019716 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019717 .srp = {STATUS1, 7, RW},
19718 .srl = {STATUS2, 0, RW},
19719 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19720 .tb = {STATUS1, 5, RW},
19721 .sec = {STATUS1, 6, RW},
19722 .cmp = {STATUS2, 6, RW},
19723 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019724 .wp_write_cfg = spi_wp_write_cfg,
19725 .wp_read_cfg = spi_wp_read_cfg,
19726 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019727 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019728 .prepare_access = spi_prepare_io,
19729 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019730 },
19731
19732 {
19733 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019734 .name = "W25Q64JV-.Q",
19735 .bustype = BUS_SPI,
19736 .manufacture_id = WINBOND_NEX_ID,
19737 .model_id = WINBOND_NEX_W25Q64_V,
19738 .total_size = 8192,
19739 .page_size = 256,
19740 /* supports SFDP */
19741 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019742 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020019743 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019744 .tested = TEST_OK_PREW,
19745 .probe = probe_spi_rdid,
19746 .probe_timing = TIMING_ZERO,
19747 .block_erasers =
19748 {
19749 {
19750 .eraseblocks = { {4 * 1024, 2048} },
19751 .block_erase = spi_block_erase_20,
19752 }, {
19753 .eraseblocks = { {32 * 1024, 256} },
19754 .block_erase = spi_block_erase_52,
19755 }, {
19756 .eraseblocks = { {64 * 1024, 128} },
19757 .block_erase = spi_block_erase_d8,
19758 }, {
19759 .eraseblocks = { {8 * 1024 * 1024, 1} },
19760 .block_erase = spi_block_erase_60,
19761 }, {
19762 .eraseblocks = { {8 * 1024 * 1024, 1} },
19763 .block_erase = spi_block_erase_c7,
19764 }
19765 },
19766 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19767 .unlock = spi_disable_blockprotect,
19768 .write = spi_chip_write_256,
19769 .read = spi_chip_read,
19770 .voltage = {2700, 3600},
19771 .reg_bits =
19772 {
Nico Huber2133f592024-01-06 18:30:01 +010019773 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019774 .srp = {STATUS1, 7, RW},
19775 .srl = {STATUS2, 0, RW},
19776 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19777 .tb = {STATUS1, 5, RW},
19778 .sec = {STATUS1, 6, RW},
19779 .cmp = {STATUS2, 6, RW},
19780 .wps = {STATUS3, 2, RW},
19781 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019782 .wp_write_cfg = spi_wp_write_cfg,
19783 .wp_read_cfg = spi_wp_read_cfg,
19784 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019785 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019786 .prepare_access = spi_prepare_io,
19787 .finish_access = spi_finish_io,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019788 },
19789
19790 {
19791 .vendor = "Winbond",
19792 .name = "W25Q64JV-.M",
Simon Buhrow236a38c2021-11-05 11:48:30 +010019793 .bustype = BUS_SPI,
19794 .manufacture_id = WINBOND_NEX_ID,
19795 .model_id = WINBOND_NEX_W25Q64JV,
19796 .total_size = 8192,
19797 .page_size = 256,
19798 /* supports SFDP */
Nico Huber2133f592024-01-06 18:30:01 +010019799 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
19800 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010019801 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Simon Buhrow236a38c2021-11-05 11:48:30 +010019802 .tested = TEST_OK_PREW,
19803 .probe = probe_spi_rdid,
19804 .probe_timing = TIMING_ZERO,
19805 .block_erasers =
19806 {
19807 {
19808 .eraseblocks = { {4 * 1024, 2048} },
19809 .block_erase = spi_block_erase_20,
19810 }, {
19811 .eraseblocks = { {32 * 1024, 256} },
19812 .block_erase = spi_block_erase_52,
19813 }, {
19814 .eraseblocks = { {64 * 1024, 128} },
19815 .block_erase = spi_block_erase_d8,
19816 }, {
19817 .eraseblocks = { {8 * 1024 * 1024, 1} },
19818 .block_erase = spi_block_erase_60,
19819 }, {
19820 .eraseblocks = { {8 * 1024 * 1024, 1} },
19821 .block_erase = spi_block_erase_c7,
19822 }
19823 },
Nico Huber2133f592024-01-06 18:30:01 +010019824 .reg_bits =
19825 {
19826 .qe = {STATUS2, 1, RW},
19827 },
Simon Buhrow236a38c2021-11-05 11:48:30 +010019828 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19829 .unlock = spi_disable_blockprotect_bp2_srwd,
19830 .write = spi_chip_write_256,
19831 .read = spi_chip_read,
19832 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019833 .prepare_access = spi_prepare_io,
19834 .finish_access = spi_finish_io,
Simon Buhrow236a38c2021-11-05 11:48:30 +010019835 },
19836
19837 {
19838 .vendor = "Winbond",
Nico Hubera358b142024-04-14 18:29:06 +020019839 .name = "W25Q64DW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019840 .bustype = BUS_SPI,
19841 .manufacture_id = WINBOND_NEX_ID,
19842 .model_id = WINBOND_NEX_W25Q64_W,
19843 .total_size = 8192,
19844 .page_size = 256,
19845 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019846 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
19847 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nico Hubera358b142024-04-14 18:29:06 +020019848 .tested = TEST_OK_PREW,
19849 .probe = probe_spi_rdid,
19850 .probe_timing = TIMING_ZERO,
19851 .block_erasers =
19852 {
19853 {
19854 .eraseblocks = { {4 * 1024, 2048} },
19855 .block_erase = spi_block_erase_20,
19856 }, {
19857 .eraseblocks = { {32 * 1024, 256} },
19858 .block_erase = spi_block_erase_52,
19859 }, {
19860 .eraseblocks = { {64 * 1024, 128} },
19861 .block_erase = spi_block_erase_d8,
19862 }, {
19863 .eraseblocks = { {8 * 1024 * 1024, 1} },
19864 .block_erase = spi_block_erase_60,
19865 }, {
19866 .eraseblocks = { {8 * 1024 * 1024, 1} },
19867 .block_erase = spi_block_erase_c7,
19868 }
19869 },
19870 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19871 .unlock = spi_disable_blockprotect,
19872 .write = spi_chip_write_256,
19873 .read = spi_chip_read,
19874 .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
19875 .reg_bits =
19876 {
19877 .srp = {STATUS1, 7, RW},
19878 .srl = {STATUS2, 0, RW},
19879 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19880 .tb = {STATUS1, 5, RW},
19881 .sec = {STATUS1, 6, RW},
19882 .cmp = {STATUS2, 6, RW},
19883 },
19884 .wp_write_cfg = spi_wp_write_cfg,
19885 .wp_read_cfg = spi_wp_read_cfg,
19886 .wp_get_ranges = spi_wp_get_available_ranges,
19887 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019888 .prepare_access = spi_prepare_io,
19889 .finish_access = spi_finish_io,
Nico Hubera358b142024-04-14 18:29:06 +020019890 },
19891
19892 {
19893 .vendor = "Winbond",
19894 .name = "W25Q64FW/W25Q64JW...Q",
19895 .bustype = BUS_SPI,
19896 .manufacture_id = WINBOND_NEX_ID,
19897 .model_id = WINBOND_NEX_W25Q64_W,
19898 .total_size = 8192,
19899 .page_size = 256,
19900 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019901 /* FEATURE_QPI_SRP (2, 4, 6, 8): only FW version */
Nico Hubera358b142024-04-14 18:29:06 +020019902 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
Nico Huber1412d9f2024-01-06 18:25:49 +010019903 FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030019904 .tested = TEST_OK_PREWB,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019905 .probe = probe_spi_rdid,
19906 .probe_timing = TIMING_ZERO,
19907 .block_erasers =
19908 {
19909 {
19910 .eraseblocks = { {4 * 1024, 2048} },
19911 .block_erase = spi_block_erase_20,
19912 }, {
19913 .eraseblocks = { {32 * 1024, 256} },
19914 .block_erase = spi_block_erase_52,
19915 }, {
19916 .eraseblocks = { {64 * 1024, 128} },
19917 .block_erase = spi_block_erase_d8,
19918 }, {
19919 .eraseblocks = { {8 * 1024 * 1024, 1} },
19920 .block_erase = spi_block_erase_60,
19921 }, {
19922 .eraseblocks = { {8 * 1024 * 1024, 1} },
19923 .block_erase = spi_block_erase_c7,
19924 }
19925 },
19926 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19927 .unlock = spi_disable_blockprotect,
19928 .write = spi_chip_write_256,
19929 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019930 .voltage = {1700, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110019931 .reg_bits =
19932 {
Nico Huber2133f592024-01-06 18:30:01 +010019933 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110019934 .srp = {STATUS1, 7, RW},
19935 .srl = {STATUS2, 0, RW},
19936 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19937 .tb = {STATUS1, 5, RW},
19938 .sec = {STATUS1, 6, RW},
19939 .cmp = {STATUS2, 6, RW},
19940 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019941 .wp_write_cfg = spi_wp_write_cfg,
19942 .wp_read_cfg = spi_wp_read_cfg,
19943 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110019944 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019945 .prepare_access = spi_prepare_io,
19946 .finish_access = spi_finish_io,
Antony Rheneus0fbba982011-05-26 14:28:51 +000019947 },
19948
19949 {
19950 .vendor = "Winbond",
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100019951 .name = "W25Q64JW...M",
Scott Chao1bbc5012020-04-08 22:10:50 +080019952 .bustype = BUS_SPI,
19953 .manufacture_id = WINBOND_NEX_ID,
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100019954 .model_id = WINBOND_NEX_W25Q64JW_M,
Scott Chao1bbc5012020-04-08 22:10:50 +080019955 .total_size = 8192,
19956 .page_size = 256,
19957 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19958 /* QPI enable 0x38, disable 0xFF */
Nico Huber1412d9f2024-01-06 18:25:49 +010019959 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
19960 FEATURE_OTP | FEATURE_QPI_SRP,
19961 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Scott Chao1bbc5012020-04-08 22:10:50 +080019962 .tested = TEST_OK_PREW,
19963 .probe = probe_spi_rdid,
19964 .probe_timing = TIMING_ZERO,
19965 .block_erasers =
19966 {
19967 {
19968 .eraseblocks = { {4 * 1024, 2048} },
19969 .block_erase = spi_block_erase_20,
19970 }, {
19971 .eraseblocks = { {32 * 1024, 256} },
19972 .block_erase = spi_block_erase_52,
19973 }, {
19974 .eraseblocks = { {64 * 1024, 128} },
19975 .block_erase = spi_block_erase_d8,
19976 }, {
19977 .eraseblocks = { {8 * 1024 * 1024, 1} },
19978 .block_erase = spi_block_erase_60,
19979 }, {
19980 .eraseblocks = { {8 * 1024 * 1024, 1} },
19981 .block_erase = spi_block_erase_c7,
19982 }
19983 },
19984 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19985 .unlock = spi_disable_blockprotect,
19986 .write = spi_chip_write_256,
19987 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019988 .voltage = {1700, 1950},
Evan Benn29c8b5d2022-09-13 16:01:10 +100019989 .reg_bits =
19990 {
Nico Huber2133f592024-01-06 18:30:01 +010019991 .qe = {STATUS2, 1, RW},
Evan Benn29c8b5d2022-09-13 16:01:10 +100019992 .srp = {STATUS1, 7, RW},
19993 .srl = {STATUS2, 0, RW},
19994 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19995 .tb = {STATUS1, 5, RW},
19996 .sec = {STATUS1, 6, RW},
19997 .cmp = {STATUS2, 6, RW},
19998 .wps = {STATUS3, 2, RW},
19999 },
Nico Huberaabb3e02023-01-13 00:22:30 +010020000 .wp_write_cfg = spi_wp_write_cfg,
20001 .wp_read_cfg = spi_wp_read_cfg,
20002 .wp_get_ranges = spi_wp_get_available_ranges,
Evan Benn29c8b5d2022-09-13 16:01:10 +100020003 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020020004 .prepare_access = spi_prepare_io,
20005 .finish_access = spi_finish_io,
Scott Chao1bbc5012020-04-08 22:10:50 +080020006 },
20007
20008 {
20009 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020010 .name = "W25Q80.V",
Nico Huber70eed9f2017-04-24 22:19:27 +020020011 .bustype = BUS_SPI,
20012 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020013 .model_id = WINBOND_NEX_W25Q80_V,
20014 .total_size = 1024,
Nico Huber70eed9f2017-04-24 22:19:27 +020020015 .page_size = 256,
20016 /* supports SFDP */
20017 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010020018 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
David Hendricks48729d32017-12-08 14:44:07 -080020019 .tested = TEST_OK_PREW,
Nico Huber70eed9f2017-04-24 22:19:27 +020020020 .probe = probe_spi_rdid,
20021 .probe_timing = TIMING_ZERO,
20022 .block_erasers =
20023 {
20024 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020025 .eraseblocks = { {4 * 1024, 256} },
Nico Huber70eed9f2017-04-24 22:19:27 +020020026 .block_erase = spi_block_erase_20,
20027 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020028 .eraseblocks = { {32 * 1024, 32} },
Nico Huber70eed9f2017-04-24 22:19:27 +020020029 .block_erase = spi_block_erase_52,
20030 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020031 .eraseblocks = { {64 * 1024, 16} },
Nico Huber70eed9f2017-04-24 22:19:27 +020020032 .block_erase = spi_block_erase_d8,
20033 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020034 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020020035 .block_erase = spi_block_erase_60,
20036 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020037 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020020038 .block_erase = spi_block_erase_c7,
20039 }
20040 },
Nico Huber2133f592024-01-06 18:30:01 +010020041 .reg_bits =
20042 {
20043 .qe = {STATUS2, 1, RW},
20044 },
Nico Huber70eed9f2017-04-24 22:19:27 +020020045 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20046 .unlock = spi_disable_blockprotect,
20047 .write = spi_chip_write_256,
20048 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020049 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020050 .prepare_access = spi_prepare_io,
20051 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020052 },
20053
20054 {
20055 .vendor = "Winbond",
20056 .name = "W25Q80BW",
20057 .bustype = BUS_SPI,
20058 .manufacture_id = WINBOND_NEX_ID,
20059 .model_id = WINBOND_NEX_W25Q80BW,
20060 .total_size = 1024,
20061 .page_size = 256,
20062 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010020063 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020064 .tested = TEST_OK_PREW,
20065 .probe = probe_spi_rdid,
20066 .probe_timing = TIMING_ZERO,
20067 .block_erasers =
20068 {
20069 {
20070 .eraseblocks = { {4 * 1024, 256} },
20071 .block_erase = spi_block_erase_20,
20072 }, {
20073 .eraseblocks = { {32 * 1024, 32} },
20074 .block_erase = spi_block_erase_52,
20075 }, {
20076 .eraseblocks = { {64 * 1024, 16} },
20077 .block_erase = spi_block_erase_d8,
20078 }, {
20079 .eraseblocks = { {1 * 1024 * 1024, 1} },
20080 .block_erase = spi_block_erase_60,
20081 }, {
20082 .eraseblocks = { {1 * 1024 * 1024, 1} },
20083 .block_erase = spi_block_erase_c7,
20084 }
20085 },
Nico Huber2133f592024-01-06 18:30:01 +010020086 .reg_bits =
20087 {
20088 .qe = {STATUS2, 1, RW},
20089 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100020090 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20091 .unlock = spi_disable_blockprotect,
20092 .write = spi_chip_write_256,
20093 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010020094 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020020095 .prepare_access = spi_prepare_io,
20096 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020097 },
20098
20099 {
20100 .vendor = "Winbond",
20101 .name = "W25Q80EW",
20102 .bustype = BUS_SPI,
20103 .manufacture_id = WINBOND_NEX_ID,
20104 .model_id = WINBOND_NEX_W25Q80EW,
20105 .total_size = 1024,
20106 .page_size = 256,
20107 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010020108 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
20109 FEATURE_OTP | FEATURE_QPI_SRP,
20110 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green1f9cc7d2019-07-01 11:10:45 +100020111 .tested = TEST_OK_PREW,
20112 .probe = probe_spi_rdid,
20113 .probe_timing = TIMING_ZERO,
20114 .block_erasers =
20115 {
20116 {
20117 .eraseblocks = { {4 * 1024, 256} },
20118 .block_erase = spi_block_erase_20,
20119 }, {
20120 .eraseblocks = { {32 * 1024, 32} },
20121 .block_erase = spi_block_erase_52,
20122 }, {
20123 .eraseblocks = { {64 * 1024, 16} },
20124 .block_erase = spi_block_erase_d8,
20125 }, {
20126 .eraseblocks = { {1 * 1024 * 1024, 1} },
20127 .block_erase = spi_block_erase_60,
20128 }, {
20129 .eraseblocks = { {1 * 1024 * 1024, 1} },
20130 .block_erase = spi_block_erase_c7,
20131 }
20132 },
Nico Huber2133f592024-01-06 18:30:01 +010020133 .reg_bits =
20134 {
20135 .qe = {STATUS2, 1, RW},
20136 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100020137 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20138 .unlock = spi_disable_blockprotect,
20139 .write = spi_chip_write_256,
20140 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010020141 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020020142 .prepare_access = spi_prepare_io,
20143 .finish_access = spi_finish_io,
Nico Huber70eed9f2017-04-24 22:19:27 +020020144 },
20145
20146 {
20147 .vendor = "Winbond",
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020148 .name = "W25X05",
20149 .bustype = BUS_SPI,
20150 .manufacture_id = WINBOND_NEX_ID,
20151 .model_id = WINBOND_NEX_W25X05,
20152 .total_size = 64,
20153 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020154 /* FEATURE_FAST_READ_DIO since W25X05B */
20155 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020156 .tested = TEST_OK_PREW,
20157 .probe = probe_spi_rdid,
20158 .probe_timing = TIMING_ZERO,
20159 .block_erasers =
20160 {
20161 {
20162 .eraseblocks = { {4 * 1024, 16} },
20163 .block_erase = spi_block_erase_20,
20164 }, {
20165 .eraseblocks = { {32 * 1024, 2} },
20166 .block_erase = spi_block_erase_52,
20167 }, {
20168 .eraseblocks = { {64 * 1024, 1} },
20169 .block_erase = spi_block_erase_d8,
20170 }
20171 },
20172 .printlock = spi_prettyprint_status_register_plain,
20173 .unlock = spi_disable_blockprotect,
20174 .write = spi_chip_write_256,
20175 .read = spi_chip_read,
20176 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020177 .prepare_access = spi_prepare_io,
20178 .finish_access = spi_finish_io,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020179 },
20180
20181 {
20182 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020183 .name = "W25X10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020184 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020185 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020186 .model_id = WINBOND_NEX_W25X10,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020187 .total_size = 128,
20188 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020189 /* FEATURE_FAST_READ_DIO since W25X10B */
20190 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunere34e3e82013-01-01 00:06:51 +000020191 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020192 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000020193 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020194 .block_erasers =
20195 {
20196 {
20197 .eraseblocks = { {4 * 1024, 32} },
20198 .block_erase = spi_block_erase_20,
20199 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020200 .eraseblocks = { {64 * 1024, 2} },
20201 .block_erase = spi_block_erase_d8,
20202 }, {
20203 .eraseblocks = { {128 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020204 .block_erase = spi_block_erase_c7,
20205 }
20206 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020207 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020208 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000020209 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020210 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020211 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020212 .prepare_access = spi_prepare_io,
20213 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000020214 },
20215
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020216 {
20217 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020218 .name = "W25X16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020219 .bustype = BUS_SPI,
Hector Martina721ae22009-07-11 19:39:11 +000020220 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020221 .model_id = WINBOND_NEX_W25X16,
Hector Martina721ae22009-07-11 19:39:11 +000020222 .total_size = 2048,
20223 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020224 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner8179be52011-06-04 13:13:34 +000020225 .tested = TEST_OK_PREW,
Hector Martina721ae22009-07-11 19:39:11 +000020226 .probe = probe_spi_rdid,
20227 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020228 .block_erasers =
20229 {
20230 {
20231 .eraseblocks = { {4 * 1024, 512} },
20232 .block_erase = spi_block_erase_20,
20233 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020234 .eraseblocks = { {64 * 1024, 32} },
20235 .block_erase = spi_block_erase_d8,
20236 }, {
20237 .eraseblocks = { {2 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020238 .block_erase = spi_block_erase_c7,
20239 }
20240 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020241 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020242 .unlock = spi_disable_blockprotect,
Hector Martina721ae22009-07-11 19:39:11 +000020243 .write = spi_chip_write_256,
20244 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020245 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020246 .prepare_access = spi_prepare_io,
20247 .finish_access = spi_finish_io,
Hector Martina721ae22009-07-11 19:39:11 +000020248 },
20249
20250 {
20251 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020252 .name = "W25X20",
20253 .bustype = BUS_SPI,
20254 .manufacture_id = WINBOND_NEX_ID,
20255 .model_id = WINBOND_NEX_W25X20,
20256 .total_size = 256,
20257 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020258 /* FEATURE_FAST_READ_DIO since W25X20B */
20259 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020260 .tested = TEST_OK_PREW,
20261 .probe = probe_spi_rdid,
20262 .probe_timing = TIMING_ZERO,
20263 .block_erasers =
20264 {
20265 {
20266 .eraseblocks = { {4 * 1024, 64} },
20267 .block_erase = spi_block_erase_20,
20268 }, {
20269 .eraseblocks = { {64 * 1024, 4} },
20270 .block_erase = spi_block_erase_d8,
20271 }, {
20272 .eraseblocks = { {256 * 1024, 1} },
20273 .block_erase = spi_block_erase_c7,
20274 }
20275 },
20276 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20277 .unlock = spi_disable_blockprotect,
20278 .write = spi_chip_write_256,
20279 .read = spi_chip_read,
20280 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020281 .prepare_access = spi_prepare_io,
20282 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020283 },
20284
20285 {
20286 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020287 .name = "W25X32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020288 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000020289 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020290 .model_id = WINBOND_NEX_W25X32,
Zheng Bao1db2b752009-11-26 11:05:01 +000020291 .total_size = 4096,
20292 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020293 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000020294 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000020295 .probe = probe_spi_rdid,
20296 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020297 .block_erasers =
20298 {
20299 {
20300 .eraseblocks = { {4 * 1024, 1024} },
20301 .block_erase = spi_block_erase_20,
20302 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020303 .eraseblocks = { {64 * 1024, 64} },
20304 .block_erase = spi_block_erase_d8,
20305 }, {
20306 .eraseblocks = { {4 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020307 .block_erase = spi_block_erase_c7,
20308 }
20309 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020310 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020311 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000020312 .write = spi_chip_write_256,
20313 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020314 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020315 .prepare_access = spi_prepare_io,
20316 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000020317 },
20318
20319 {
20320 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020321 .name = "W25X40",
20322 .bustype = BUS_SPI,
20323 .manufacture_id = WINBOND_NEX_ID,
20324 .model_id = WINBOND_NEX_W25X40,
20325 .total_size = 512,
20326 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020327 /* FEATURE_FAST_READ_DIO since W25X40B */
20328 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020329 .tested = TEST_OK_PREW,
20330 .probe = probe_spi_rdid,
20331 .probe_timing = TIMING_ZERO,
20332 .block_erasers =
20333 {
20334 {
20335 .eraseblocks = { {4 * 1024, 128} },
20336 .block_erase = spi_block_erase_20,
20337 }, {
20338 .eraseblocks = { {64 * 1024, 8} },
20339 .block_erase = spi_block_erase_d8,
20340 }, {
20341 .eraseblocks = { {512 * 1024, 1} },
20342 .block_erase = spi_block_erase_c7,
20343 }
20344 },
20345 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20346 .unlock = spi_disable_blockprotect,
20347 .write = spi_chip_write_256,
20348 .read = spi_chip_read,
20349 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020350 .prepare_access = spi_prepare_io,
20351 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020352 },
20353
20354 {
20355 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020356 .name = "W25X64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020357 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000020358 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020359 .model_id = WINBOND_NEX_W25X64,
Zheng Bao1db2b752009-11-26 11:05:01 +000020360 .total_size = 8192,
20361 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020362 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner23e10b82016-01-23 16:16:49 +000020363 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000020364 .probe = probe_spi_rdid,
20365 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020366 .block_erasers =
20367 {
20368 {
20369 .eraseblocks = { {4 * 1024, 2048} },
20370 .block_erase = spi_block_erase_20,
20371 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020372 .eraseblocks = { {64 * 1024, 128} },
20373 .block_erase = spi_block_erase_d8,
20374 }, {
20375 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020376 .block_erase = spi_block_erase_c7,
20377 }
20378 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020379 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020380 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000020381 .write = spi_chip_write_256,
20382 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020383 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020384 .prepare_access = spi_prepare_io,
20385 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000020386 },
20387
20388 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100020389 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020390 .name = "W25X80",
Alan Greenfa3fcd32019-06-27 15:41:50 +100020391 .bustype = BUS_SPI,
20392 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020393 .model_id = WINBOND_NEX_W25X80,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020394 .total_size = 1024,
20395 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020396 /* FEATURE_FAST_READ_DIO since W25X80B */
20397 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020398 .tested = TEST_OK_PREW,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020399 .probe = probe_spi_rdid,
20400 .probe_timing = TIMING_ZERO,
20401 .block_erasers =
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020402 {
20403 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020404 .eraseblocks = { {4 * 1024, 256} },
20405 .block_erase = spi_block_erase_20,
20406 }, {
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020407 .eraseblocks = { {64 * 1024, 16} },
20408 .block_erase = spi_block_erase_d8,
20409 }, {
20410 .eraseblocks = { {1024 * 1024, 1} },
20411 .block_erase = spi_block_erase_c7,
20412 }
20413 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100020414 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20415 .unlock = spi_disable_blockprotect,
20416 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020417 .read = spi_chip_read,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020418 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020419 .prepare_access = spi_prepare_io,
20420 .finish_access = spi_finish_io,
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020421 },
20422
Alan Greenf29ea362019-06-27 17:14:02 +100020423 /* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
20424 {
Carl-Daniel Hailfinger2e88a9f2011-07-26 14:18:52 +000020425 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020426 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020427 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020428 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020429 .model_id = WINBOND_W29C010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020430 .total_size = 128,
20431 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000020432 .feature_bits = FEATURE_LONG_RESET,
David Hendricks567b7b82011-05-18 01:31:03 +000020433 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020434 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020435 .probe_timing = 10, /* used datasheet for the W29C011A */
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020436 .block_erasers =
20437 {
20438 {
20439 .eraseblocks = { {128 * 1024, 1} },
20440 .block_erase = erase_chip_block_jedec,
20441 }
20442 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020443 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020444 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010020445 .prepare_access = prepare_memory_access,
20446 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020447 },
20448
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020449 {
20450 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020451 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012-old",
20452 .bustype = BUS_PARALLEL,
20453 .manufacture_id = WINBOND_ID,
20454 .model_id = WINBOND_W29C010,
20455 .total_size = 128,
20456 .page_size = 128,
20457 .feature_bits = FEATURE_LONG_RESET,
20458 .tested = TEST_OK_PREW,
20459 .probe = probe_w29ee011,
20460 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (w29ee011.c) */
20461 .block_erasers =
20462 {
20463 {
20464 .eraseblocks = { {128 * 1024, 1} },
20465 .block_erase = erase_chip_block_jedec,
20466 }
20467 },
20468 .write = write_jedec,
20469 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010020470 .prepare_access = prepare_memory_access,
20471 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020472 },
20473
20474 {
20475 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020476 .name = "W29C020(C)/W29C022",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020477 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020478 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020479 .model_id = WINBOND_W29C020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020480 .total_size = 256,
20481 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000020482 .feature_bits = FEATURE_LONG_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020483 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020484 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020485 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020486 .block_erasers =
20487 {
20488 {
20489 .eraseblocks = { {256 * 1024, 1} },
20490 .block_erase = erase_chip_block_jedec,
20491 }
20492 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020493 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020494 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020495 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020496 .prepare_access = prepare_memory_access,
20497 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020498 },
20499
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020500 {
20501 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020502 .name = "W29C040/P",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020503 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020504 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020505 .model_id = WINBOND_W29C040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020506 .total_size = 512,
20507 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000020508 .feature_bits = FEATURE_LONG_RESET,
20509 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020510 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000020511 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020512 .block_erasers =
20513 {
20514 {
20515 .eraseblocks = { {512 * 1024, 1} },
20516 .block_erase = erase_chip_block_jedec,
20517 }
20518 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020519 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020520 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020521 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020522 .prepare_access = prepare_memory_access,
20523 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020524 },
20525
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020526 {
20527 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020528 .name = "W29C512A/W29EE512",
20529 .bustype = BUS_PARALLEL,
20530 .manufacture_id = WINBOND_ID,
20531 .model_id = WINBOND_W29C512A,
20532 .total_size = 64,
20533 .page_size = 128,
20534 .feature_bits = FEATURE_LONG_RESET,
20535 .tested = TEST_OK_PREW,
20536 .probe = probe_jedec,
20537 .probe_timing = 10,
20538 .block_erasers =
20539 {
20540 {
20541 .eraseblocks = { {64 * 1024, 1} },
20542 .block_erase = erase_chip_block_jedec,
20543 }
20544 },
20545 .write = write_jedec,
20546 .read = read_memmapped,
20547 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020548 .prepare_access = prepare_memory_access,
20549 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020550 },
20551
20552 {
20553 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020554 .name = "W29GL032CB",
20555 .bustype = BUS_PARALLEL,
20556 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20557 .model_id = WINBOND_W29GL032CB,
20558 .total_size = 4096,
20559 .page_size = 128 * 1024, /* actual page size is 16 */
20560 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20561 .tested = TEST_UNTESTED,
20562 .probe = probe_jedec_29gl,
20563 .probe_timing = TIMING_ZERO,
20564 .block_erasers =
20565 {
20566 {
20567 .eraseblocks = {
20568 {8 * 1024, 8},
20569 {64 * 1024, 63},
20570 },
20571 .block_erase = erase_sector_jedec,
20572 }, {
20573 .eraseblocks = { {4 * 1024 * 1024, 1} },
20574 .block_erase = erase_chip_block_jedec,
20575 },
20576 },
20577 .write = write_jedec_1,
20578 .read = read_memmapped,
20579 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020580 .prepare_access = prepare_memory_access,
20581 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020582 },
20583
20584 {
20585 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020586 .name = "W29GL032CH/L",
20587 .bustype = BUS_PARALLEL,
20588 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20589 .model_id = WINBOND_W29GL032CHL,
20590 .total_size = 4096,
20591 .page_size = 128 * 1024, /* actual page size is 16 */
20592 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20593 .tested = TEST_UNTESTED,
20594 .probe = probe_jedec_29gl,
20595 .probe_timing = TIMING_ZERO,
20596 .block_erasers =
20597 {
20598 {
20599 .eraseblocks = { {64 * 1024, 64} },
20600 .block_erase = erase_sector_jedec,
20601 }, {
20602 .eraseblocks = { {4 * 1024 * 1024, 1} },
20603 .block_erase = erase_chip_block_jedec,
20604 },
20605 },
20606 .write = write_jedec_1,
20607 .read = read_memmapped,
20608 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020609 .prepare_access = prepare_memory_access,
20610 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020611 },
20612
20613 {
20614 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020615 .name = "W29GL032CT",
20616 .bustype = BUS_PARALLEL,
20617 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20618 .model_id = WINBOND_W29GL032CT,
20619 .total_size = 4096,
20620 .page_size = 128 * 1024, /* actual page size is 16 */
20621 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20622 .tested = TEST_UNTESTED,
20623 .probe = probe_jedec_29gl,
20624 .probe_timing = TIMING_ZERO,
20625 .block_erasers =
20626 {
20627 {
20628 .eraseblocks = {
20629 {64 * 1024, 63},
20630 {8 * 1024, 8},
20631 },
20632 .block_erase = erase_sector_jedec,
20633 }, {
20634 .eraseblocks = { {4 * 1024 * 1024, 1} },
20635 .block_erase = erase_chip_block_jedec,
20636 },
20637 },
20638 .write = write_jedec_1,
20639 .read = read_memmapped,
20640 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020641 .prepare_access = prepare_memory_access,
20642 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020643 },
20644
20645 {
20646 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020647 .name = "W29GL064CB",
20648 .bustype = BUS_PARALLEL,
20649 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20650 .model_id = WINBOND_W29GL064CB,
20651 .total_size = 8192,
20652 .page_size = 128 * 1024, /* actual page size is 16 */
20653 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20654 .tested = TEST_UNTESTED,
20655 .probe = probe_jedec_29gl,
20656 .probe_timing = TIMING_ZERO,
20657 .block_erasers =
20658 {
20659 {
20660 .eraseblocks = {
20661 {8 * 1024, 8},
20662 {64 * 1024, 127},
20663 },
20664 .block_erase = erase_sector_jedec,
20665 }, {
20666 .eraseblocks = { {8 * 1024 * 1024, 1} },
20667 .block_erase = erase_chip_block_jedec,
20668 },
20669 },
20670 .write = write_jedec_1,
20671 .read = read_memmapped,
20672 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020673 .prepare_access = prepare_memory_access,
20674 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020675 },
20676
20677 {
20678 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020679 .name = "W29GL064CH/L",
20680 .bustype = BUS_PARALLEL,
20681 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20682 .model_id = WINBOND_W29GL064CHL,
20683 .total_size = 8192,
20684 .page_size = 128 * 1024, /* actual page size is 16 */
20685 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20686 .tested = TEST_UNTESTED,
20687 .probe = probe_jedec_29gl,
20688 .probe_timing = TIMING_ZERO,
20689 .block_erasers =
20690 {
20691 {
20692 .eraseblocks = { {64 * 1024, 128} },
20693 .block_erase = erase_sector_jedec,
20694 }, {
20695 .eraseblocks = { {8 * 1024 * 1024, 1} },
20696 .block_erase = erase_chip_block_jedec,
20697 },
20698 },
20699 .write = write_jedec_1,
20700 .read = read_memmapped,
20701 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020702 .prepare_access = prepare_memory_access,
20703 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020704 },
20705
20706 {
20707 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020708 .name = "W29GL064CT",
20709 .bustype = BUS_PARALLEL,
20710 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20711 .model_id = WINBOND_W29GL064CT,
20712 .total_size = 8192,
20713 .page_size = 128 * 1024, /* actual page size is 16 */
20714 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20715 .tested = TEST_UNTESTED,
20716 .probe = probe_jedec_29gl,
20717 .probe_timing = TIMING_ZERO,
20718 .block_erasers =
20719 {
20720 {
20721 .eraseblocks = {
20722 {64 * 1024, 127},
20723 {8 * 1024, 8},
20724 },
20725 .block_erase = erase_sector_jedec,
20726 }, {
20727 .eraseblocks = { {8 * 1024 * 1024, 1} },
20728 .block_erase = erase_chip_block_jedec,
20729 },
20730 },
20731 .write = write_jedec_1,
20732 .read = read_memmapped,
20733 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020734 .prepare_access = prepare_memory_access,
20735 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020736 },
20737
20738 {
20739 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020740 .name = "W29GL128C",
20741 .bustype = BUS_PARALLEL,
20742 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20743 .model_id = WINBOND_W29GL128CHL,
20744 .total_size = 16384,
20745 .page_size = 128 * 1024, /* actual page size is 16 */
20746 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20747 .tested = TEST_UNTESTED,
20748 .probe = probe_jedec_29gl,
20749 .probe_timing = TIMING_ZERO,
20750 .block_erasers =
20751 {
20752 {
20753 .eraseblocks = { {128 * 1024, 128} },
20754 .block_erase = erase_sector_jedec,
20755 }, {
20756 .eraseblocks = { {16 * 1024 * 1024, 1} },
20757 .block_erase = erase_chip_block_jedec,
20758 },
20759 },
20760 .write = write_jedec_1,
20761 .read = read_memmapped,
20762 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020763 .prepare_access = prepare_memory_access,
20764 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020765 },
20766
20767 {
20768 .vendor = "Winbond",
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020769 .name = "W39F010",
20770 .bustype = BUS_PARALLEL,
20771 .manufacture_id = WINBOND_ID,
20772 .model_id = WINBOND_W39F010,
20773 .total_size = 128,
20774 .page_size = 4 * 1024,
20775 .feature_bits = FEATURE_EITHER_RESET,
20776 .tested = TEST_OK_PREW,
20777 .probe = probe_jedec,
20778 .probe_timing = 10,
20779 .block_erasers =
20780 {
20781 {
20782 .eraseblocks = { {4 * 1024, 32} },
20783 .block_erase = erase_block_jedec,
20784 }, {
20785 .eraseblocks = { {128 * 1024, 1} },
20786 .block_erase = erase_chip_block_jedec,
20787 }
20788 },
20789 .printlock = printlock_w39f010,
20790 .write = write_jedec_1,
20791 .read = read_memmapped,
20792 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020793 .prepare_access = prepare_memory_access,
20794 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020795 },
20796
20797 {
20798 .vendor = "Winbond",
20799 .name = "W39L010",
20800 .bustype = BUS_PARALLEL,
20801 .manufacture_id = WINBOND_ID,
20802 .model_id = WINBOND_W39L010,
20803 .total_size = 128,
20804 .page_size = 4 * 1024,
20805 .feature_bits = FEATURE_EITHER_RESET,
20806 .tested = TEST_UNTESTED,
20807 .probe = probe_jedec,
20808 .probe_timing = 10,
20809 .block_erasers =
20810 {
20811 {
20812 .eraseblocks = { {4 * 1024, 32} },
20813 .block_erase = erase_block_jedec,
20814 }, {
20815 .eraseblocks = { {128 * 1024, 1} },
20816 .block_erase = erase_chip_block_jedec,
20817 }
20818 },
20819 .printlock = printlock_w39l010,
20820 .write = write_jedec_1,
20821 .read = read_memmapped,
20822 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020823 .prepare_access = prepare_memory_access,
20824 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020825 },
20826
20827 {
20828 .vendor = "Winbond",
20829 .name = "W39L020",
20830 .bustype = BUS_PARALLEL,
20831 .manufacture_id = WINBOND_ID,
20832 .model_id = WINBOND_W39L020,
20833 .total_size = 256,
20834 .page_size = 4 * 1024,
20835 .feature_bits = FEATURE_EITHER_RESET,
20836 .tested = TEST_UNTESTED,
20837 .probe = probe_jedec,
20838 .probe_timing = 10,
20839 .block_erasers =
20840 {
20841 {
20842 .eraseblocks = { {4 * 1024, 64} },
20843 .block_erase = erase_block_jedec,
20844 }, {
20845 .eraseblocks = { {64 * 1024, 4} },
20846 .block_erase = erase_sector_jedec,
20847 }, {
20848 .eraseblocks = { {256 * 1024, 1} },
20849 .block_erase = erase_chip_block_jedec,
20850 }
20851 },
20852 .printlock = printlock_w39l020,
20853 .write = write_jedec_1,
20854 .read = read_memmapped,
20855 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020856 .prepare_access = prepare_memory_access,
20857 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020858 },
20859
20860 {
20861 .vendor = "Winbond",
Michael Karcher19e0aac2011-03-06 17:58:05 +000020862 .name = "W39L040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020863 .bustype = BUS_PARALLEL,
Michael Karcher19e0aac2011-03-06 17:58:05 +000020864 .manufacture_id = WINBOND_ID,
20865 .model_id = WINBOND_W39L040,
20866 .total_size = 512,
20867 .page_size = 64 * 1024,
20868 .feature_bits = FEATURE_EITHER_RESET,
20869 .tested = TEST_OK_PR,
20870 .probe = probe_jedec,
20871 .probe_timing = 10,
20872 .block_erasers =
20873 {
20874 {
20875 .eraseblocks = { {4 * 1024, 128} },
20876 .block_erase = erase_block_jedec,
20877 }, {
20878 .eraseblocks = { {64 * 1024, 8} },
20879 .block_erase = erase_sector_jedec,
20880 }, {
20881 .eraseblocks = { {512 * 1024, 1} },
20882 .block_erase = erase_chip_block_jedec,
20883 }
20884 },
20885 .printlock = printlock_w39l040,
20886 .write = write_jedec_1,
20887 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020888 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020889 .prepare_access = prepare_memory_access,
20890 .finish_access = finish_memory_access,
Michael Karcher19e0aac2011-03-06 17:58:05 +000020891 },
20892
20893 {
20894 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020895 .name = "W39V040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020896 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020897 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020898 .model_id = WINBOND_W39V040A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020899 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020900 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020901 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000020902 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020903 .probe = probe_jedec,
Stefan Tauner716e0982011-07-25 20:38:52 +000020904 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020905 .block_erasers =
20906 {
20907 {
20908 .eraseblocks = { {64 * 1024, 8} },
20909 .block_erase = erase_sector_jedec,
20910 }, {
20911 .eraseblocks = { {512 * 1024, 1} },
20912 .block_erase = erase_chip_block_jedec,
20913 }
20914 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020915 .printlock = printlock_w39v040a,
Sean Nelson35727f72010-01-28 23:55:12 +000020916 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020917 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020918 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020919 .prepare_access = prepare_memory_access,
20920 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020921 },
20922
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020923 {
20924 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020925 .name = "W39V040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020926 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020927 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020928 .model_id = WINBOND_W39V040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020929 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020930 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020931 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000020932 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020933 .probe = probe_jedec,
Paul Menzel018d4822011-10-21 12:33:07 +000020934 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020935 .block_erasers =
20936 {
20937 {
20938 .eraseblocks = { {64 * 1024, 8} },
20939 .block_erase = erase_sector_jedec,
20940 }, {
20941 .eraseblocks = { {512 * 1024, 1} },
20942 .block_erase = erase_chip_block_jedec,
20943 }
20944 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020945 .printlock = printlock_w39v040b,
Sean Nelson35727f72010-01-28 23:55:12 +000020946 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020947 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020948 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020949 .prepare_access = prepare_memory_access,
20950 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020951 },
20952
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020953 {
20954 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020955 .name = "W39V040C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020956 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020957 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020958 .model_id = WINBOND_W39V040C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020959 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020960 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020961 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000020962 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000020963 .probe = probe_jedec,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020964 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020965 .block_erasers =
20966 {
20967 {
20968 .eraseblocks = { {64 * 1024, 8} },
20969 .block_erase = erase_sector_jedec,
20970 }, {
20971 .eraseblocks = { {512 * 1024, 1} },
20972 .block_erase = erase_chip_block_jedec,
20973 }
20974 },
Sean Nelson6e0b9122010-02-19 00:52:10 +000020975 .printlock = printlock_w39v040c,
Sean Nelson35727f72010-01-28 23:55:12 +000020976 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020977 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020978 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020979 .prepare_access = prepare_memory_access,
20980 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020981 },
20982
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020983 {
20984 .vendor = "Winbond",
20985 .name = "W39V040FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020986 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020987 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020988 .model_id = WINBOND_W39V040FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020989 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020990 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010020991 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000020992 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020993 .probe = probe_jedec,
Antony Rheneus0fbba982011-05-26 14:28:51 +000020994 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020995 .block_erasers =
20996 {
20997 {
20998 .eraseblocks = { {4 * 1024, 128} },
20999 .block_erase = erase_block_jedec,
21000 }, {
21001 .eraseblocks = { {64 * 1024, 8} },
21002 .block_erase = erase_sector_jedec,
21003 }, {
21004 .eraseblocks = { {512 * 1024, 1} },
21005 .block_erase = erase_chip_block_jedec,
21006 }
21007 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021008 .printlock = printlock_w39v040fa,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000021009 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000021010 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021011 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021012 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010021013 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021014 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021015 },
21016
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021017 {
21018 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021019 .name = "W39V040FB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021020 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021021 .manufacture_id = WINBOND_ID,
21022 .model_id = WINBOND_W39V040B,
21023 .total_size = 512,
21024 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021025 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner0be072c2016-03-13 15:16:30 +000021026 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021027 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000021028 .probe_timing = 10,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021029 .block_erasers =
21030 {
21031 {
21032 .eraseblocks = { {64 * 1024, 8} },
21033 .block_erase = erase_sector_jedec,
21034 }, {
21035 .eraseblocks = { {512 * 1024, 1} },
21036 .block_erase = erase_chip_block_jedec,
21037 }
21038 },
21039 .printlock = printlock_w39v040fb,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000021040 .unlock = unlock_regspace2_uniform_64k,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021041 .write = write_jedec_1,
21042 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000021043 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021044 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021045 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021046 },
21047
21048 {
21049 .vendor = "Winbond",
21050 .name = "W39V040FC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021051 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021052 .manufacture_id = WINBOND_ID,
21053 .model_id = WINBOND_W39V040C,
21054 .total_size = 512,
21055 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021056 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauneraf2db612011-12-02 21:48:17 +000021057 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021058 .probe = probe_jedec,
21059 .probe_timing = 10,
21060 .block_erasers =
21061 {
21062 {
21063 .eraseblocks = { {64 * 1024, 8} },
21064 .block_erase = erase_sector_jedec,
21065 }, {
21066 .eraseblocks = { {512 * 1024, 1} },
21067 .block_erase = erase_chip_block_jedec,
21068 }
21069 },
21070 .printlock = printlock_w39v040fc,
21071 .write = write_jedec_1,
21072 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000021073 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021074 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021075 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021076 },
21077
21078 {
21079 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021080 .name = "W39V080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021081 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021082 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021083 .model_id = WINBOND_W39V080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021084 .total_size = 1024,
Sean Nelson72a9a022009-12-22 22:15:33 +000021085 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000021086 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzelac427b22012-02-16 21:07:07 +000021087 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021088 .probe = probe_jedec,
Paul Menzelac427b22012-02-16 21:07:07 +000021089 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021090 .block_erasers =
21091 {
21092 {
21093 .eraseblocks = { {64 * 1024, 16} },
21094 .block_erase = erase_sector_jedec,
21095 }, {
21096 .eraseblocks = { {1024 * 1024, 1} },
21097 .block_erase = erase_chip_block_jedec,
21098 }
21099 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021100 .printlock = printlock_w39v080a,
Sean Nelson35727f72010-01-28 23:55:12 +000021101 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021102 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021103 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021104 .prepare_access = prepare_memory_access,
21105 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021106 },
21107
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021108 {
21109 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100021110 .name = "W39V080FA",
21111 .bustype = BUS_FWH,
21112 .manufacture_id = WINBOND_ID,
21113 .model_id = WINBOND_W39V080FA,
21114 .total_size = 1024,
21115 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021116 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021117 .tested = TEST_OK_PREW,
21118 .probe = probe_jedec,
21119 .probe_timing = 10,
21120 .block_erasers =
21121 {
21122 {
21123 .eraseblocks = { {64 * 1024, 16} },
21124 .block_erase = erase_sector_jedec,
21125 }, {
21126 .eraseblocks = { {1024 * 1024, 1} },
21127 .block_erase = erase_chip_block_jedec,
21128 }
21129 },
21130 .printlock = printlock_w39v080fa,
21131 .unlock = unlock_regspace2_uniform_64k,
21132 .write = write_jedec_1,
21133 .read = read_memmapped,
21134 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021135 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021136 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021137 },
21138
21139 {
21140 .vendor = "Winbond",
21141 .name = "W39V080FA (dual mode)",
21142 .bustype = BUS_FWH,
21143 .manufacture_id = WINBOND_ID,
21144 .model_id = WINBOND_W39V080FA_DM,
21145 .total_size = 512,
21146 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021147 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021148 .tested = TEST_UNTESTED,
21149 .probe = probe_jedec,
21150 .probe_timing = 10,
21151 .block_erasers =
21152 {
21153 {
21154 .eraseblocks = { {64 * 1024, 8} },
21155 .block_erase = erase_sector_jedec,
21156 }, {
21157 .eraseblocks = { {512 * 1024, 1} },
21158 .block_erase = erase_chip_block_jedec,
21159 }
21160 },
21161 .printlock = printlock_w39v080fa_dual,
21162 .write = write_jedec_1,
21163 .read = read_memmapped,
21164 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021165 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021166 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021167 },
21168
21169 {
21170 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000021171 .name = "W49F002U/N",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021172 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021173 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021174 .model_id = WINBOND_W49F002U,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021175 .total_size = 256,
21176 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021177 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000021178 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021179 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000021180 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021181 .block_erasers =
21182 {
21183 {
21184 .eraseblocks = {
21185 {128 * 1024, 1},
21186 {96 * 1024, 1},
21187 {8 * 1024, 2},
21188 {16 * 1024, 1},
21189 },
21190 .block_erase = erase_sector_jedec,
21191 }, {
21192 .eraseblocks = { {256 * 1024, 1} },
21193 .block_erase = erase_chip_block_jedec,
21194 }
21195 },
Sean Nelson35727f72010-01-28 23:55:12 +000021196 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021197 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021198 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010021199 .prepare_access = prepare_memory_access,
21200 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021201 },
21202
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021203 {
21204 .vendor = "Winbond",
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021205 .name = "W49F020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021206 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021207 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021208 .model_id = WINBOND_W49F020,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021209 .total_size = 256,
21210 .page_size = 128,
21211 .feature_bits = FEATURE_EITHER_RESET,
21212 .tested = TEST_OK_PROBE,
21213 .probe = probe_jedec,
21214 .probe_timing = 10,
21215 .block_erasers =
21216 {
21217 {
21218 .eraseblocks = { {256 * 1024, 1} },
21219 .block_erase = erase_chip_block_jedec,
21220 }
21221 },
21222 .write = write_jedec_1,
21223 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021224 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010021225 .prepare_access = prepare_memory_access,
21226 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021227 },
21228
21229 {
21230 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021231 .name = "W49V002A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021232 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021233 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021234 .model_id = WINBOND_W49V002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021235 .total_size = 256,
21236 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021237 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000021238 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021239 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000021240 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021241 .block_erasers =
21242 {
21243 {
21244 .eraseblocks = {
21245 {64 * 1024, 3},
21246 {32 * 1024, 1},
21247 {8 * 1024, 2},
21248 {16 * 1024, 1},
21249 },
21250 .block_erase = erase_sector_jedec,
21251 }, {
21252 .eraseblocks = { {256 * 1024, 1} },
21253 .block_erase = erase_chip_block_jedec,
21254 }
21255 },
Sean Nelson35727f72010-01-28 23:55:12 +000021256 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021257 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021258 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021259 .prepare_access = prepare_memory_access,
21260 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021261 },
21262
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021263 {
21264 .vendor = "Winbond",
21265 .name = "W49V002FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021266 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021267 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021268 .model_id = WINBOND_W49V002FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021269 .total_size = 256,
21270 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021271 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000021272 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021273 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000021274 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021275 .block_erasers =
21276 {
21277 {
21278 .eraseblocks = {
21279 {64 * 1024, 3},
21280 {32 * 1024, 1},
21281 {8 * 1024, 2},
21282 {16 * 1024, 1},
21283 },
21284 .block_erase = erase_sector_jedec,
21285 }, {
21286 .eraseblocks = { {256 * 1024, 1} },
21287 .block_erase = erase_chip_block_jedec,
21288 }
21289 },
Sean Nelson35727f72010-01-28 23:55:12 +000021290 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021291 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021292 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021293 .prepare_access = prepare_memory_access,
21294 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021295 },
21296
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021297 {
luke heef884232020-12-28 18:22:21 +080021298 .vendor = "XMC",
21299 .name = "XM25QH128C",
21300 .bustype = BUS_SPI,
21301 .manufacture_id = ST_ID,
21302 .model_id = XMC_XM25QH128C,
21303 .total_size = 16384,
21304 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010021305 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
21306 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021307 .tested = TEST_UNTESTED,
21308 .probe = probe_spi_rdid,
21309 .probe_timing = TIMING_ZERO,
21310 .block_erasers =
21311 {
21312 {
21313 .eraseblocks = { {4 * 1024, 4096} },
21314 .block_erase = spi_block_erase_20,
21315 }, {
21316 .eraseblocks = { {32 * 1024, 512} },
21317 .block_erase = spi_block_erase_52,
21318 }, {
21319 .eraseblocks = { {64 * 1024, 256} },
21320 .block_erase = spi_block_erase_d8,
21321 }, {
21322 .eraseblocks = { {16 * 1024 * 1024, 1} },
21323 .block_erase = spi_block_erase_60,
21324 }, {
21325 .eraseblocks = { {16 * 1024 * 1024, 1} },
21326 .block_erase = spi_block_erase_c7,
21327 }
21328 },
21329 .printlock = spi_prettyprint_status_register_plain,
21330 .unlock = spi_disable_blockprotect,
21331 .write = spi_chip_write_256,
21332 .read = spi_chip_read,
21333 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021334 .reg_bits =
21335 {
Nico Huber96786d02024-01-06 18:30:15 +010021336 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021337 .srp = {STATUS1, 7, RW},
21338 .srl = {STATUS2, 0, RW},
21339 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
21340 .tb = {STATUS1, 5, RW},
21341 .sec = {STATUS1, 6, RW},
21342 .cmp = {STATUS2, 6, RW},
21343 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021344 .wp_write_cfg = spi_wp_write_cfg,
21345 .wp_read_cfg = spi_wp_read_cfg,
21346 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021347 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020021348 .prepare_access = spi_prepare_io,
21349 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021350 },
21351
21352 {
21353 .vendor = "XMC",
21354 .name = "XM25QH256C",
21355 .bustype = BUS_SPI,
21356 .manufacture_id = ST_ID,
21357 .model_id = XMC_XM25QH256C,
21358 .total_size = 32768,
21359 .page_size = 256,
21360 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021361 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
21362 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
21363 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021364 .tested = TEST_UNTESTED,
21365 .probe = probe_spi_rdid,
21366 .probe_timing = TIMING_ZERO,
21367 .block_erasers =
21368 {
21369 {
21370 .eraseblocks = { {4 * 1024, 8192} },
21371 .block_erase = spi_block_erase_21,
21372 }, {
21373 .eraseblocks = { {4 * 1024, 8192} },
21374 .block_erase = spi_block_erase_20,
21375 }, {
21376 .eraseblocks = { {32 * 1024, 1024} },
21377 .block_erase = spi_block_erase_52,
21378 }, {
21379 .eraseblocks = { {64 * 1024, 512} },
21380 .block_erase = spi_block_erase_dc,
21381 }, {
21382 .eraseblocks = { {64 * 1024, 512} },
21383 .block_erase = spi_block_erase_d8,
21384 }, {
21385 .eraseblocks = { {32 * 1024 * 1024, 1} },
21386 .block_erase = spi_block_erase_60,
21387 }, {
21388 .eraseblocks = { {32 * 1024 * 1024, 1} },
21389 .block_erase = spi_block_erase_c7,
21390 }
21391 },
21392 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21393 .unlock = spi_disable_blockprotect,
21394 .write = spi_chip_write_256,
21395 .read = spi_chip_read,
21396 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021397 .reg_bits =
21398 {
Nico Huber96786d02024-01-06 18:30:15 +010021399 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021400 .srp = {STATUS1, 7, RW},
21401 .srl = {STATUS2, 0, RW},
21402 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
21403 .tb = {STATUS1, 6, RW},
21404 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021405 .wp_write_cfg = spi_wp_write_cfg,
21406 .wp_read_cfg = spi_wp_read_cfg,
21407 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021408 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020021409 .prepare_access = spi_prepare_io,
21410 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021411 },
21412
21413 {
21414 .vendor = "XMC",
21415 .name = "XM25QH64C",
21416 .bustype = BUS_SPI,
21417 .manufacture_id = ST_ID,
21418 .model_id = XMC_XM25QH64C,
21419 .total_size = 8192,
21420 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010021421 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021422 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021423 .tested = TEST_UNTESTED,
21424 .probe = probe_spi_rdid,
21425 .probe_timing = TIMING_ZERO,
21426 .block_erasers =
21427 {
21428 {
21429 .eraseblocks = { {4 * 1024, 2048} },
21430 .block_erase = spi_block_erase_20,
21431 }, {
21432 .eraseblocks = { {32 * 1024, 256} },
21433 .block_erase = spi_block_erase_52,
21434 }, {
21435 .eraseblocks = { {64 * 1024, 128} },
21436 .block_erase = spi_block_erase_d8,
21437 }, {
21438 .eraseblocks = { {8 * 1024 * 1024, 1} },
21439 .block_erase = spi_block_erase_60,
21440 }, {
21441 .eraseblocks = { {8 * 1024 * 1024, 1} },
21442 .block_erase = spi_block_erase_c7,
21443 }
21444 },
Nico Huber96786d02024-01-06 18:30:15 +010021445 .reg_bits =
21446 {
21447 .qe = {STATUS2, 1, RW},
21448 },
luke heef884232020-12-28 18:22:21 +080021449 .printlock = spi_prettyprint_status_register_plain,
21450 .unlock = spi_disable_blockprotect,
21451 .write = spi_chip_write_256,
21452 .read = spi_chip_read,
21453 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020021454 .prepare_access = spi_prepare_io,
21455 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021456 },
21457
21458 {
21459 .vendor = "XMC",
21460 .name = "XM25QU128C",
21461 .bustype = BUS_SPI,
21462 .manufacture_id = ST_ID,
21463 .model_id = XMC_XM25QU128C,
21464 .total_size = 16384,
21465 .page_size = 256,
21466 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021467 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021468 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021469 .tested = TEST_UNTESTED,
21470 .probe = probe_spi_rdid,
21471 .probe_timing = TIMING_ZERO,
21472 .block_erasers =
21473 {
21474 {
21475 .eraseblocks = { {4 * 1024, 4096} },
21476 .block_erase = spi_block_erase_20,
21477 }, {
21478 .eraseblocks = { {32 * 1024, 512} },
21479 .block_erase = spi_block_erase_52,
21480 }, {
21481 .eraseblocks = { {64 * 1024, 256} },
21482 .block_erase = spi_block_erase_d8,
21483 }, {
21484 .eraseblocks = { {16 * 1024 * 1024, 1} },
21485 .block_erase = spi_block_erase_60,
21486 }, {
21487 .eraseblocks = { {16 * 1024 * 1024, 1} },
21488 .block_erase = spi_block_erase_c7,
21489 }
21490 },
Nico Huber96786d02024-01-06 18:30:15 +010021491 .reg_bits =
21492 {
21493 .qe = {STATUS2, 1, RW},
21494 },
luke heef884232020-12-28 18:22:21 +080021495 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21496 .unlock = spi_disable_blockprotect,
21497 .write = spi_chip_write_256,
21498 .read = spi_chip_read,
21499 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021500 .prepare_access = spi_prepare_io,
21501 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021502 },
21503
21504 {
21505 .vendor = "XMC",
21506 .name = "XM25QU256C",
21507 .bustype = BUS_SPI,
21508 .manufacture_id = ST_ID,
21509 .model_id = XMC_XM25QU256C,
21510 .total_size = 32768,
21511 .page_size = 256,
21512 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021513 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
21514 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
21515 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021516 .tested = TEST_UNTESTED,
21517 .probe = probe_spi_rdid,
21518 .probe_timing = TIMING_ZERO,
21519 .block_erasers =
21520 {
21521 {
21522 .eraseblocks = { {4 * 1024, 8192} },
21523 .block_erase = spi_block_erase_21,
21524 }, {
21525 .eraseblocks = { {4 * 1024, 8192} },
21526 .block_erase = spi_block_erase_20,
21527 }, {
21528 .eraseblocks = { {32 * 1024, 1024} },
21529 .block_erase = spi_block_erase_52,
21530 }, {
21531 .eraseblocks = { {64 * 1024, 512} },
21532 .block_erase = spi_block_erase_dc,
21533 }, {
21534 .eraseblocks = { {64 * 1024, 512} },
21535 .block_erase = spi_block_erase_d8,
21536 }, {
21537 .eraseblocks = { {32 * 1024 * 1024, 1} },
21538 .block_erase = spi_block_erase_60,
21539 }, {
21540 .eraseblocks = { {32 * 1024 * 1024, 1} },
21541 .block_erase = spi_block_erase_c7,
21542 }
21543 },
Nico Huber96786d02024-01-06 18:30:15 +010021544 .reg_bits =
21545 {
21546 .qe = {STATUS2, 1, RW},
21547 },
luke heef884232020-12-28 18:22:21 +080021548 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21549 .unlock = spi_disable_blockprotect,
21550 .write = spi_chip_write_256,
21551 .read = spi_chip_read,
21552 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021553 .prepare_access = spi_prepare_io,
21554 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021555 },
21556
21557 {
21558 .vendor = "XMC",
21559 .name = "XM25QU64C",
21560 .bustype = BUS_SPI,
21561 .manufacture_id = ST_ID,
21562 .model_id = XMC_XM25QU64C,
21563 .total_size = 8192,
21564 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010021565 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021566 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021567 .tested = TEST_UNTESTED,
21568 .probe = probe_spi_rdid,
21569 .probe_timing = TIMING_ZERO,
21570 .block_erasers =
21571 {
21572 {
21573 .eraseblocks = { {4 * 1024, 2048} },
21574 .block_erase = spi_block_erase_20,
21575 }, {
21576 .eraseblocks = { {32 * 1024, 256} },
21577 .block_erase = spi_block_erase_52,
21578 }, {
21579 .eraseblocks = { {64 * 1024, 128} },
21580 .block_erase = spi_block_erase_d8,
21581 }, {
21582 .eraseblocks = { {8 * 1024 * 1024, 1} },
21583 .block_erase = spi_block_erase_60,
21584 }, {
21585 .eraseblocks = { {8 * 1024 * 1024, 1} },
21586 .block_erase = spi_block_erase_c7,
21587 }
21588 },
Nico Huber96786d02024-01-06 18:30:15 +010021589 .reg_bits =
21590 {
21591 .qe = {STATUS2, 1, RW},
21592 },
luke heef884232020-12-28 18:22:21 +080021593 .printlock = spi_prettyprint_status_register_plain,
21594 .unlock = spi_disable_blockprotect,
21595 .write = spi_chip_write_256,
21596 .read = spi_chip_read,
21597 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021598 .prepare_access = spi_prepare_io,
21599 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021600 },
21601
21602 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100021603 .vendor = "Zetta Device",
21604 .name = "ZD25D20",
21605 .bustype = BUS_SPI,
21606 .manufacture_id = ZETTADEVICE_ID,
21607 .model_id = ZETTADEVICE_ZD25D20,
21608 .total_size = 256,
21609 .page_size = 256,
21610 .feature_bits = FEATURE_WRSR_WREN,
21611 .tested = TEST_UNTESTED,
21612 .probe = probe_spi_rdid,
21613 .probe_timing = TIMING_ZERO,
21614 .block_erasers =
David Hendricksa72d5a92018-02-11 17:58:44 -080021615 {
21616 {
21617 .eraseblocks = { {4 * 1024, 64} },
21618 .block_erase = spi_block_erase_20,
21619 }, {
21620 .eraseblocks = { {32 * 1024, 8} },
21621 .block_erase = spi_block_erase_52,
21622 }, {
21623 .eraseblocks = { {64 * 1024, 4} },
21624 .block_erase = spi_block_erase_d8,
21625 }, {
21626 .eraseblocks = { {256 * 1024, 1} },
21627 .block_erase = spi_block_erase_60,
21628 }, {
21629 .eraseblocks = { {256 * 1024, 1} },
21630 .block_erase = spi_block_erase_c7,
21631 }
21632 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100021633 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21634 .unlock = spi_disable_blockprotect,
21635 .write = spi_chip_write_256,
21636 .read = spi_chip_read,
21637 .voltage = {2700, 3600},
David Hendricksa72d5a92018-02-11 17:58:44 -080021638 },
21639
21640 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100021641 .vendor = "Zetta Device",
21642 .name = "ZD25D40",
21643 .bustype = BUS_SPI,
21644 .manufacture_id = ZETTADEVICE_ID,
21645 .model_id = ZETTADEVICE_ZD25D40,
21646 .total_size = 512,
21647 .page_size = 256,
21648 .feature_bits = FEATURE_WRSR_WREN,
21649 .tested = TEST_UNTESTED,
21650 .probe = probe_spi_rdid,
21651 .probe_timing = TIMING_ZERO,
21652 .block_erasers =
nybashcbb46e22018-02-11 17:53:49 -080021653 {
21654 {
21655 .eraseblocks = { {4 * 1024, 128} },
21656 .block_erase = spi_block_erase_20,
21657 }, {
21658 .eraseblocks = { {32 * 1024, 16} },
21659 .block_erase = spi_block_erase_52,
21660 }, {
21661 .eraseblocks = { {64 * 1024, 8} },
21662 .block_erase = spi_block_erase_d8,
21663 }, {
21664 .eraseblocks = { {512 * 1024, 1} },
21665 .block_erase = spi_block_erase_60,
21666 }, {
21667 .eraseblocks = { {512 * 1024, 1} },
21668 .block_erase = spi_block_erase_c7,
21669 }
21670 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100021671 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21672 .unlock = spi_disable_blockprotect,
21673 .write = spi_chip_write_256,
21674 .read = spi_chip_read,
21675 .voltage = {2700, 3600},
nybashcbb46e22018-02-11 17:53:49 -080021676 },
21677
Stefan Taunerac1b4c82012-02-17 14:51:04 +000021678 {
Nico Huber34e3de62024-10-20 13:00:12 +020021679 .vendor = "Zetta Device",
21680 .name = "ZD25LQ64",
21681 .bustype = BUS_SPI,
21682 .manufacture_id = ZETTADEVICE_ID,
21683 .model_id = ZETTADEVICE_ZD25LQ64,
21684 .total_size = 8192,
21685 .page_size = 256,
21686 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR_EXT2 |
21687 FEATURE_OTP | FEATURE_QPI_SRP,
21688 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
21689 .tested = TEST_UNTESTED,
21690 .probe = probe_spi_rdid,
21691 .probe_timing = TIMING_ZERO,
21692 .block_erasers =
21693 {
21694 {
21695 .eraseblocks = { {4 * 1024, 2048} },
21696 .block_erase = spi_block_erase_20,
21697 }, {
21698 .eraseblocks = { {32 * 1024, 256} },
21699 .block_erase = spi_block_erase_52,
21700 }, {
21701 .eraseblocks = { {64 * 1024, 128} },
21702 .block_erase = spi_block_erase_d8,
21703 }, {
21704 .eraseblocks = { {8192 * 1024, 1} },
21705 .block_erase = spi_block_erase_60,
21706 }, {
21707 .eraseblocks = { {8192 * 1024, 1} },
21708 .block_erase = spi_block_erase_c7,
21709 },
21710 },
21711 .reg_bits =
21712 {
21713 .qe = {STATUS2, 1, RW},
21714 .srp = {STATUS1, 7, RW},
21715 .srl = {STATUS2, 0, RW},
21716 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
21717 .tb = {STATUS1, 5, RW},
21718 .sec = {STATUS1, 6, RW},
21719 .cmp = {STATUS2, 6, RW},
21720 },
21721 .wp_write_cfg = spi_wp_write_cfg,
21722 .wp_read_cfg = spi_wp_read_cfg,
21723 .wp_get_ranges = spi_wp_get_available_ranges,
21724 .decode_range = decode_range_spi25,
21725 .printlock = spi_prettyprint_status_register_bp2_srwd,
21726 .unlock = spi_disable_blockprotect_bp2_srwd,
21727 .write = spi_chip_write_256,
21728 .read = spi_chip_read,
21729 .voltage = {1650, 1950},
21730 .prepare_access = spi_prepare_io,
21731 .finish_access = spi_finish_io,
21732 },
21733
21734 {
21735 .vendor = "Zetta Device",
21736 .name = "ZD25LQ128",
21737 .bustype = BUS_SPI,
21738 .manufacture_id = ZETTADEVICE_ID,
21739 .model_id = ZETTADEVICE_ZD25LQ128,
21740 .total_size = 16384,
21741 .page_size = 256,
21742 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR_EXT2 |
21743 FEATURE_OTP | FEATURE_QPI_SRP,
21744 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
21745 .tested = TEST_UNTESTED,
21746 .probe = probe_spi_rdid,
21747 .probe_timing = TIMING_ZERO,
21748 .block_erasers =
21749 {
21750 {
21751 .eraseblocks = { {4 * 1024, 4096} },
21752 .block_erase = spi_block_erase_20,
21753 }, {
21754 .eraseblocks = { {32 * 1024, 512} },
21755 .block_erase = spi_block_erase_52,
21756 }, {
21757 .eraseblocks = { {64 * 1024, 256} },
21758 .block_erase = spi_block_erase_d8,
21759 }, {
21760 .eraseblocks = { {16384 * 1024, 1} },
21761 .block_erase = spi_block_erase_60,
21762 }, {
21763 .eraseblocks = { {16384 * 1024, 1} },
21764 .block_erase = spi_block_erase_c7,
21765 },
21766 },
21767 .reg_bits =
21768 {
21769 .qe = {STATUS2, 1, RW},
21770 .srp = {STATUS1, 7, RW},
21771 .srl = {STATUS2, 0, RW},
21772 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
21773 .tb = {STATUS1, 5, RW},
21774 .sec = {STATUS1, 6, RW},
21775 .cmp = {STATUS2, 6, RW},
21776 },
21777 .wp_write_cfg = spi_wp_write_cfg,
21778 .wp_read_cfg = spi_wp_read_cfg,
21779 .wp_get_ranges = spi_wp_get_available_ranges,
21780 .decode_range = decode_range_spi25,
21781 .printlock = spi_prettyprint_status_register_bp2_srwd,
21782 .unlock = spi_disable_blockprotect_bp2_srwd,
21783 .write = spi_chip_write_256,
21784 .read = spi_chip_read,
21785 .voltage = {1650, 1950},
21786 .prepare_access = spi_prepare_io,
21787 .finish_access = spi_finish_io,
21788 },
21789
21790 {
Alan Greendd592202019-08-23 10:11:37 +100021791 .vendor = "Unknown",
21792 .name = "SFDP-capable chip",
21793 .bustype = BUS_SPI,
21794 .manufacture_id = GENERIC_MANUF_ID,
21795 .model_id = SFDP_DEVICE_ID,
21796 .total_size = 0, /* set by probing function */
21797 .page_size = 0, /* set by probing function */
21798 .feature_bits = 0, /* set by probing function */
21799 /* We present our own "report this" text hence we do not */
21800 /* want the default "This flash part has status UNTESTED..." */
21801 /* text to be printed. */
21802 .tested = TEST_OK_PREW,
21803 .probe = probe_spi_sfdp,
21804 .block_erasers = {}, /* set by probing function */
21805 .unlock = spi_disable_blockprotect, /* is this safe? */
21806 .write = NULL, /* set by probing function */
21807 .read = spi_chip_read,
21808 /* FIXME: some vendor extensions define this */
21809 .voltage = {0},
21810 },
21811
21812 {
Carl-Daniel Hailfinger532c7172011-11-04 21:35:26 +000021813 .vendor = "Programmer",
21814 .name = "Opaque flash chip",
21815 .bustype = BUS_PROG,
21816 .manufacture_id = PROGMANUF_ID,
21817 .model_id = PROGDEV_ID,
21818 .total_size = 0,
21819 .page_size = 256,
21820 /* probe is assumed to work, rest will be filled in by probe */
21821 .tested = TEST_OK_PROBE,
21822 .probe = probe_opaque,
21823 /* eraseblock sizes will be set by the probing function */
21824 .block_erasers =
21825 {
21826 {
21827 .block_erase = erase_opaque,
21828 }
21829 },
21830 .write = write_opaque,
21831 .read = read_opaque,
21832 },
21833
21834 {
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000021835 .vendor = "AMIC",
21836 .name = "unknown AMIC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021837 .bustype = BUS_SPI,
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000021838 .manufacture_id = AMIC_ID,
21839 .model_id = GENERIC_DEVICE_ID,
21840 .total_size = 0,
21841 .page_size = 256,
21842 .tested = TEST_BAD_PREW,
21843 .probe = probe_spi_rdid4,
21844 .probe_timing = TIMING_ZERO,
21845 .write = NULL,
21846 .read = NULL,
21847 },
21848
21849 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021850 .vendor = "Atmel",
21851 .name = "unknown Atmel SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021852 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021853 .manufacture_id = ATMEL_ID,
21854 .model_id = GENERIC_DEVICE_ID,
21855 .total_size = 0,
21856 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021857 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021858 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021859 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021860 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021861 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021862 },
21863
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021864 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +000021865 .vendor = "Eon",
21866 .name = "unknown Eon SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021867 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021868 .manufacture_id = EON_ID_NOPREFIX,
21869 .model_id = GENERIC_DEVICE_ID,
21870 .total_size = 0,
21871 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021872 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021873 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021874 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021875 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021876 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021877 },
21878
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021879 {
21880 .vendor = "Macronix",
21881 .name = "unknown Macronix SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021882 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000021883 .manufacture_id = MACRONIX_ID,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021884 .model_id = GENERIC_DEVICE_ID,
21885 .total_size = 0,
21886 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021887 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021888 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021889 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021890 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021891 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021892 },
21893
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021894 {
21895 .vendor = "PMC",
21896 .name = "unknown PMC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021897 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021898 .manufacture_id = PMC_ID,
21899 .model_id = GENERIC_DEVICE_ID,
21900 .total_size = 0,
21901 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021902 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021903 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021904 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021905 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021906 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021907 },
21908
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021909 {
21910 .vendor = "SST",
21911 .name = "unknown SST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021912 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021913 .manufacture_id = SST_ID,
21914 .model_id = GENERIC_DEVICE_ID,
21915 .total_size = 0,
21916 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021917 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021918 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021919 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021920 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021921 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021922 },
21923
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021924 {
21925 .vendor = "ST",
21926 .name = "unknown ST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021927 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021928 .manufacture_id = ST_ID,
21929 .model_id = GENERIC_DEVICE_ID,
21930 .total_size = 0,
21931 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021932 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021933 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021934 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021935 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021936 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021937 },
Uwe Hermannfc425e82008-03-16 02:06:25 +000021938
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021939 {
Sean Nelson118e1d62009-11-24 02:08:11 +000021940 .vendor = "Sanyo",
21941 .name = "unknown Sanyo SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021942 .bustype = BUS_SPI,
Sean Nelson118e1d62009-11-24 02:08:11 +000021943 .manufacture_id = SANYO_ID,
21944 .model_id = GENERIC_DEVICE_ID,
21945 .total_size = 0,
21946 .page_size = 256,
21947 .tested = TEST_BAD_PREW,
21948 .probe = probe_spi_rdid,
21949 .probe_timing = TIMING_ZERO,
Sean Nelson118e1d62009-11-24 02:08:11 +000021950 .write = NULL,
21951 .read = NULL,
21952 },
21953
21954 {
Stefan Taunereb582572012-09-21 12:52:50 +000021955 .vendor = "Winbond",
21956 .name = "unknown Winbond (ex Nexcom) SPI chip",
21957 .bustype = BUS_SPI,
21958 .manufacture_id = WINBOND_NEX_ID,
21959 .model_id = GENERIC_DEVICE_ID,
21960 .total_size = 0,
21961 .page_size = 256,
21962 .tested = TEST_BAD_PREW,
21963 .probe = probe_spi_rdid,
21964 .probe_timing = TIMING_ZERO,
21965 .write = NULL,
21966 .read = NULL,
21967 },
21968
21969 {
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021970 .vendor = "Generic",
21971 .name = "unknown SPI chip (RDID)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021972 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021973 .manufacture_id = GENERIC_MANUF_ID,
21974 .model_id = GENERIC_DEVICE_ID,
21975 .total_size = 0,
21976 .page_size = 256,
21977 .tested = TEST_BAD_PREW,
21978 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021979 .write = NULL,
21980 },
Stefan Tauneraf2db612011-12-02 21:48:17 +000021981
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021982 {
21983 .vendor = "Generic",
21984 .name = "unknown SPI chip (REMS)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021985 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021986 .manufacture_id = GENERIC_MANUF_ID,
21987 .model_id = GENERIC_DEVICE_ID,
21988 .total_size = 0,
21989 .page_size = 256,
21990 .tested = TEST_BAD_PREW,
21991 .probe = probe_spi_rems,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021992 .write = NULL,
21993 },
21994
Stefan Tauner96658be2014-05-26 22:05:31 +000021995 {0}
Stephan Guilloux72cf5652009-04-21 01:46:07 +000021996};
Stefan Tauner96658be2014-05-26 22:05:31 +000021997
21998const unsigned int flashchips_size = ARRAY_SIZE(flashchips);