blob: 48bfa4656ee247ea6a6e2c39623514f766edef96 [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 },
7104 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007105 .prepare_access = spi_prepare_io,
7106 .finish_access = spi_finish_io,
Nico Huber68573af2024-01-06 18:28:22 +01007107 },
7108
7109 {
7110 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007111 .name = "GD25Q16(B)",
7112 .bustype = BUS_SPI,
7113 .manufacture_id = GIGADEVICE_ID,
7114 .model_id = GIGADEVICE_GD25Q16,
7115 .total_size = 2048,
7116 .page_size = 256,
7117 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01007118 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007119 .tested = TEST_OK_PREW,
7120 .probe = probe_spi_rdid,
7121 .probe_timing = TIMING_ZERO,
7122 .block_erasers =
7123 {
7124 {
7125 .eraseblocks = { {4 * 1024, 512} },
7126 .block_erase = spi_block_erase_20,
7127 }, {
7128 .eraseblocks = { {32 * 1024, 64} },
7129 .block_erase = spi_block_erase_52,
7130 }, {
7131 .eraseblocks = { {64 * 1024, 32} },
7132 .block_erase = spi_block_erase_d8,
7133 }, {
7134 .eraseblocks = { {2 * 1024 * 1024, 1} },
7135 .block_erase = spi_block_erase_60,
7136 }, {
7137 .eraseblocks = { {2 * 1024 * 1024, 1} },
7138 .block_erase = spi_block_erase_c7,
7139 }
7140 },
Nico Huber4da971f2024-03-27 01:18:12 +01007141 .reg_bits =
7142 {
7143 .qe = {STATUS2, 1, RW},
7144 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007145 .printlock = spi_prettyprint_status_register_bp4_srwd,
7146 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7147 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007148 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007149 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007150 .prepare_access = spi_prepare_io,
7151 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007152 },
7153
7154 {
7155 .vendor = "GigaDevice",
7156 .name = "GD25Q20(B)",
7157 .bustype = BUS_SPI,
7158 .manufacture_id = GIGADEVICE_ID,
7159 .model_id = GIGADEVICE_GD25Q20,
7160 .total_size = 256,
7161 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007162 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007163 .tested = TEST_OK_PREW,
7164 .probe = probe_spi_rdid,
7165 .probe_timing = TIMING_ZERO,
7166 .block_erasers =
7167 {
7168 {
7169 .eraseblocks = { {4 * 1024, 64} },
7170 .block_erase = spi_block_erase_20,
7171 }, {
7172 .eraseblocks = { {32 * 1024, 8} },
7173 .block_erase = spi_block_erase_52,
7174 }, {
7175 .eraseblocks = { {64 * 1024, 4} },
7176 .block_erase = spi_block_erase_d8,
7177 }, {
7178 .eraseblocks = { {256 * 1024, 1} },
7179 .block_erase = spi_block_erase_60,
7180 }, {
7181 .eraseblocks = { {256 * 1024, 1} },
7182 .block_erase = spi_block_erase_c7,
7183 }
7184 },
Nico Huber4da971f2024-03-27 01:18:12 +01007185 .reg_bits = {
7186 .qe = {STATUS2, 1, RW},
7187 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007188 .printlock = spi_prettyprint_status_register_bp4_srwd,
7189 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7190 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007191 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007192 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007193 .prepare_access = spi_prepare_io,
7194 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007195 },
7196
7197 {
7198 .vendor = "GigaDevice",
Nikolai Artemiev3ca0af02022-06-17 15:10:18 +10007199 .name = "GD25Q256D/GD25Q256E",
Alan Green86fc9cf2019-08-26 15:02:12 +10007200 .bustype = BUS_SPI,
7201 .manufacture_id = GIGADEVICE_ID,
7202 .model_id = GIGADEVICE_GD25Q256D,
7203 .total_size = 32768,
7204 .page_size = 256,
Nikolai Artemievb931e7a2022-12-05 13:06:14 +11007205 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA |
Nico Huber4da971f2024-03-27 01:18:12 +01007206 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
7207 FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007208 .tested = TEST_OK_PREWB,
Alan Green86fc9cf2019-08-26 15:02:12 +10007209 .probe = probe_spi_rdid,
7210 .probe_timing = TIMING_ZERO,
7211 .block_erasers =
7212 {
7213 {
7214 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber5374dc32019-10-04 16:16:15 +02007215 .block_erase = spi_block_erase_21,
7216 }, {
7217 .eraseblocks = { {4 * 1024, 8192} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007218 .block_erase = spi_block_erase_20,
7219 }, {
7220 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber5374dc32019-10-04 16:16:15 +02007221 .block_erase = spi_block_erase_5c,
7222 }, {
7223 .eraseblocks = { {32 * 1024, 1024} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007224 .block_erase = spi_block_erase_52,
7225 }, {
7226 .eraseblocks = { {64 * 1024, 512} },
Nico Huber5374dc32019-10-04 16:16:15 +02007227 .block_erase = spi_block_erase_dc,
7228 }, {
7229 .eraseblocks = { {64 * 1024, 512} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007230 .block_erase = spi_block_erase_d8,
7231 }, {
7232 .eraseblocks = { {32 * 1024 * 1024, 1} },
7233 .block_erase = spi_block_erase_60,
7234 }, {
7235 .eraseblocks = { {32 * 1024 * 1024, 1} },
7236 .block_erase = spi_block_erase_c7,
7237 }
7238 },
7239 .printlock = spi_prettyprint_status_register_bp3_srwd,
7240 .unlock = spi_disable_blockprotect,
7241 .write = spi_chip_write_256,
7242 .read = spi_chip_read,
7243 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007244 .reg_bits =
7245 {
Nico Huber4da971f2024-03-27 01:18:12 +01007246 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007247 .srp = {STATUS1, 7, RW},
7248 .srl = {STATUS2, 6, RW},
7249 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
7250 .tb = {STATUS1, 6, RW},
7251 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007252 .wp_write_cfg = spi_wp_write_cfg,
7253 .wp_read_cfg = spi_wp_read_cfg,
7254 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007255 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007256 .prepare_access = spi_prepare_io,
7257 .finish_access = spi_finish_io,
Alan Green86fc9cf2019-08-26 15:02:12 +10007258 },
7259
7260 {
7261 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007262 .name = "GD25Q32(B)",
7263 .bustype = BUS_SPI,
7264 .manufacture_id = GIGADEVICE_ID,
7265 .model_id = GIGADEVICE_GD25Q32,
7266 .total_size = 4096,
7267 .page_size = 256,
7268 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007269 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007270 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007271 .probe = probe_spi_rdid,
7272 .probe_timing = TIMING_ZERO,
7273 .block_erasers =
7274 {
7275 {
7276 .eraseblocks = { {4 * 1024, 1024} },
7277 .block_erase = spi_block_erase_20,
7278 }, {
7279 .eraseblocks = { {32 * 1024, 128} },
7280 .block_erase = spi_block_erase_52,
7281 }, {
7282 .eraseblocks = { {64 * 1024, 64} },
7283 .block_erase = spi_block_erase_d8,
7284 }, {
7285 .eraseblocks = { {4 * 1024 * 1024, 1} },
7286 .block_erase = spi_block_erase_60,
7287 }, {
7288 .eraseblocks = { {4 * 1024 * 1024, 1} },
7289 .block_erase = spi_block_erase_c7,
7290 }
7291 },
7292 .printlock = spi_prettyprint_status_register_bp4_srwd,
7293 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7294 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007295 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007296 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007297 .reg_bits =
7298 {
Nico Huber4da971f2024-03-27 01:18:12 +01007299 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007300 .srp = {STATUS1, 7, RW},
7301 .srl = {STATUS2, 0, RW},
7302 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7303 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7304 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7305 .cmp = {STATUS2, 6, RW},
7306 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007307 .wp_write_cfg = spi_wp_write_cfg,
7308 .wp_read_cfg = spi_wp_read_cfg,
7309 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007310 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007311 .prepare_access = spi_prepare_io,
7312 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007313 },
7314
7315 {
7316 .vendor = "GigaDevice",
7317 .name = "GD25Q40(B)",
7318 .bustype = BUS_SPI,
7319 .manufacture_id = GIGADEVICE_ID,
7320 .model_id = GIGADEVICE_GD25Q40,
7321 .total_size = 512,
7322 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007323 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Simon Buhrow551664c2022-03-09 16:09:08 +01007324 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007325 .probe = probe_spi_rdid,
7326 .probe_timing = TIMING_ZERO,
7327 .block_erasers =
7328 {
7329 {
7330 .eraseblocks = { {4 * 1024, 128} },
7331 .block_erase = spi_block_erase_20,
7332 }, {
7333 .eraseblocks = { {32 * 1024, 16} },
7334 .block_erase = spi_block_erase_52,
7335 }, {
7336 .eraseblocks = { {64 * 1024, 8} },
7337 .block_erase = spi_block_erase_d8,
7338 }, {
7339 .eraseblocks = { {512 * 1024, 1} },
7340 .block_erase = spi_block_erase_60,
7341 }, {
7342 .eraseblocks = { {512 * 1024, 1} },
7343 .block_erase = spi_block_erase_c7,
7344 }
7345 },
Nico Huber4da971f2024-03-27 01:18:12 +01007346 .reg_bits =
7347 {
7348 .qe = {STATUS2, 1, RW},
7349 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007350 .printlock = spi_prettyprint_status_register_bp4_srwd,
7351 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7352 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007353 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007354 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007355 .prepare_access = spi_prepare_io,
7356 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007357 },
7358
7359 {
7360 .vendor = "GigaDevice",
7361 .name = "GD25Q512",
7362 .bustype = BUS_SPI,
7363 .manufacture_id = GIGADEVICE_ID,
7364 .model_id = GIGADEVICE_GD25Q512,
7365 .total_size = 64,
7366 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007367 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007368 .tested = TEST_OK_PREW,
7369 .probe = probe_spi_rdid,
7370 .probe_timing = TIMING_ZERO,
7371 .block_erasers =
7372 {
7373 {
7374 .eraseblocks = { {4 * 1024, 16} },
7375 .block_erase = spi_block_erase_20,
7376 }, {
7377 .eraseblocks = { {32 * 1024, 2} },
7378 .block_erase = spi_block_erase_52,
7379 }, {
7380 .eraseblocks = { {64 * 1024, 1} },
7381 .block_erase = spi_block_erase_60,
7382 }, {
7383 .eraseblocks = { {64 * 1024, 1} },
7384 .block_erase = spi_block_erase_c7,
7385 }
7386 },
Nico Huber4da971f2024-03-27 01:18:12 +01007387 .reg_bits =
7388 {
7389 .qe = {STATUS2, 1, RW},
7390 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007391 .printlock = spi_prettyprint_status_register_bp4_srwd,
7392 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7393 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007394 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007395 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007396 .prepare_access = spi_prepare_io,
7397 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007398 },
7399
7400 {
7401 .vendor = "GigaDevice",
7402 .name = "GD25Q64(B)",
7403 .bustype = BUS_SPI,
7404 .manufacture_id = GIGADEVICE_ID,
7405 .model_id = GIGADEVICE_GD25Q64,
7406 .total_size = 8192,
7407 .page_size = 256,
7408 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007409 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007410 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007411 .probe = probe_spi_rdid,
7412 .probe_timing = TIMING_ZERO,
7413 .block_erasers =
7414 {
7415 {
7416 .eraseblocks = { {4 * 1024, 2048} },
7417 .block_erase = spi_block_erase_20,
7418 }, {
7419 .eraseblocks = { {32 * 1024, 256} },
7420 .block_erase = spi_block_erase_52,
7421 }, {
7422 .eraseblocks = { {64 * 1024, 128} },
7423 .block_erase = spi_block_erase_d8,
7424 }, {
7425 .eraseblocks = { {8 * 1024 * 1024, 1} },
7426 .block_erase = spi_block_erase_60,
7427 }, {
7428 .eraseblocks = { {8 * 1024 * 1024, 1} },
7429 .block_erase = spi_block_erase_c7,
7430 }
7431 },
7432 .printlock = spi_prettyprint_status_register_bp4_srwd,
7433 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7434 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007435 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007436 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007437 .reg_bits =
7438 {
Nico Huber4da971f2024-03-27 01:18:12 +01007439 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007440 .srp = {STATUS1, 7, RW},
7441 .srl = {STATUS2, 0, RW},
7442 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7443 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7444 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7445 .cmp = {STATUS2, 6, RW},
7446 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007447 .wp_write_cfg = spi_wp_write_cfg,
7448 .wp_read_cfg = spi_wp_read_cfg,
7449 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007450 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007451 .prepare_access = spi_prepare_io,
7452 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007453 },
7454
7455 {
7456 .vendor = "GigaDevice",
7457 .name = "GD25Q80(B)",
7458 .bustype = BUS_SPI,
7459 .manufacture_id = GIGADEVICE_ID,
7460 .model_id = GIGADEVICE_GD25Q80,
7461 .total_size = 1024,
7462 .page_size = 256,
7463 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01007464 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007465 .tested = TEST_OK_PREW,
7466 .probe = probe_spi_rdid,
7467 .probe_timing = TIMING_ZERO,
7468 .block_erasers =
7469 {
7470 {
7471 .eraseblocks = { {4 * 1024, 256} },
7472 .block_erase = spi_block_erase_20,
7473 }, {
7474 .eraseblocks = { {32 * 1024, 32} },
7475 .block_erase = spi_block_erase_52,
7476 }, {
7477 .eraseblocks = { {64 * 1024, 16} },
7478 .block_erase = spi_block_erase_d8,
7479 }, {
7480 .eraseblocks = { {1024 * 1024, 1} },
7481 .block_erase = spi_block_erase_60,
7482 }, {
7483 .eraseblocks = { {1024 * 1024, 1} },
7484 .block_erase = spi_block_erase_c7,
7485 }
7486 },
Nico Huber4da971f2024-03-27 01:18:12 +01007487 .reg_bits =
7488 {
7489 .qe = {STATUS2, 1, RW},
7490 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007491 .printlock = spi_prettyprint_status_register_bp4_srwd,
7492 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7493 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007494 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007495 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007496 .prepare_access = spi_prepare_io,
7497 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007498 },
7499
7500 {
7501 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007502 .name = "GD25T80",
7503 .bustype = BUS_SPI,
7504 .manufacture_id = GIGADEVICE_ID,
7505 .model_id = GIGADEVICE_GD25T80,
7506 .total_size = 1024,
7507 .page_size = 256,
7508 /* OTP: 256B total; enter 0x3A */
7509 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
7510 .tested = TEST_UNTESTED,
7511 .probe = probe_spi_rdid,
7512 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10007513 .block_erasers =
7514 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007515 {
7516 .eraseblocks = { {4 * 1024, 256} },
7517 .block_erase = spi_block_erase_20,
7518 }, {
7519 .eraseblocks = { {64 * 1024, 16} },
7520 .block_erase = spi_block_erase_52,
7521 }, {
7522 .eraseblocks = { {64 * 1024, 16} },
7523 .block_erase = spi_block_erase_d8,
7524 }, {
7525 .eraseblocks = { {1024 * 1024, 1} },
7526 .block_erase = spi_block_erase_60,
7527 }, {
7528 .eraseblocks = { {1024 * 1024, 1} },
7529 .block_erase = spi_block_erase_c7,
7530 }
7531 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00007532 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007533 .unlock = spi_disable_blockprotect,
7534 .write = spi_chip_write_256,
7535 .read = spi_chip_read,
Stefan Tauner352e50b2013-02-22 15:58:45 +00007536 .voltage = {2700, 3600},
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007537 },
7538
7539 {
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007540 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007541 .name = "GD25VQ16C",
7542 .bustype = BUS_SPI,
7543 .manufacture_id = GIGADEVICE_ID,
7544 .model_id = GIGADEVICE_GD25VQ16C,
7545 .total_size = 2 * 1024,
7546 .page_size = 256,
7547 /* Supports SFDP */
7548 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007549 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007550 .tested = TEST_UNTESTED,
7551 .probe = probe_spi_rdid,
7552 .probe_timing = TIMING_ZERO,
7553 .block_erasers =
7554 {
7555 {
7556 .eraseblocks = { { 4 * 1024, 512} },
7557 .block_erase = spi_block_erase_20,
7558 }, {
7559 .eraseblocks = { { 32 * 1024, 64} },
7560 .block_erase = spi_block_erase_52,
7561 }, {
7562 .eraseblocks = { { 64 * 1024, 32} },
7563 .block_erase = spi_block_erase_d8,
7564 }, {
7565 .eraseblocks = { {2 * 1024 * 1024, 1} },
7566 .block_erase = spi_block_erase_60,
7567 }, {
7568 .eraseblocks = { {2 * 1024 * 1024, 1} },
7569 .block_erase = spi_block_erase_c7,
7570 }
7571 },
Nico Huber4da971f2024-03-27 01:18:12 +01007572 .reg_bits =
7573 {
7574 .qe = {STATUS2, 1, RW},
7575 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007576 .printlock = spi_prettyprint_status_register_bp4_srwd,
7577 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7578 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007579 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007580 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007581 .prepare_access = spi_prepare_io,
7582 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007583 },
7584
7585 {
7586 .vendor = "GigaDevice",
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007587 .name = "GD25VQ21B",
7588 .bustype = BUS_SPI,
7589 .manufacture_id = GIGADEVICE_ID,
7590 .model_id = GIGADEVICE_GD25VQ21B,
7591 .total_size = 256,
7592 .page_size = 256,
7593 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007594 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
7595 FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007596 .tested = TEST_UNTESTED,
7597 .probe = probe_spi_rdid,
7598 .probe_timing = TIMING_ZERO,
7599 .block_erasers =
7600 {
7601 {
7602 .eraseblocks = { { 4 * 1024, 64} },
7603 .block_erase = spi_block_erase_20,
7604 }, {
7605 .eraseblocks = { { 32 * 1024, 8} },
7606 .block_erase = spi_block_erase_52,
7607 }, {
7608 .eraseblocks = { { 64 * 1024, 4} },
7609 .block_erase = spi_block_erase_d8,
7610 }, {
7611 .eraseblocks = { {256 * 1024, 1} },
7612 .block_erase = spi_block_erase_60,
7613 }, {
7614 .eraseblocks = { {256 * 1024, 1} },
7615 .block_erase = spi_block_erase_c7,
7616 }
7617 },
Nico Huber4da971f2024-03-27 01:18:12 +01007618 .reg_bits =
7619 {
7620 .qe = {STATUS2, 1, RW},
7621 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007622 .printlock = spi_prettyprint_status_register_bp4_srwd,
7623 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7624 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007625 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007626 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007627 .prepare_access = spi_prepare_io,
7628 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007629 },
7630
7631 {
7632 .vendor = "GigaDevice",
7633 .name = "GD25VQ40C",
7634 .bustype = BUS_SPI,
7635 .manufacture_id = GIGADEVICE_ID,
7636 .model_id = GIGADEVICE_GD25VQ41B,
7637 .total_size = 512,
7638 .page_size = 256,
7639 /* Supports SFDP */
7640 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007641 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007642 .tested = TEST_UNTESTED,
7643 .probe = probe_spi_rdid,
7644 .probe_timing = TIMING_ZERO,
7645 .block_erasers =
7646 {
7647 {
7648 .eraseblocks = { { 4 * 1024, 128} },
7649 .block_erase = spi_block_erase_20,
7650 }, {
7651 .eraseblocks = { { 32 * 1024, 16} },
7652 .block_erase = spi_block_erase_52,
7653 }, {
7654 .eraseblocks = { { 64 * 1024, 8} },
7655 .block_erase = spi_block_erase_d8,
7656 }, {
7657 .eraseblocks = { {512 * 1024, 1} },
7658 .block_erase = spi_block_erase_60,
7659 }, {
7660 .eraseblocks = { {512 * 1024, 1} },
7661 .block_erase = spi_block_erase_c7,
7662 }
7663 },
Nico Huber4da971f2024-03-27 01:18:12 +01007664 .reg_bits =
7665 {
7666 .qe = {STATUS2, 1, RW},
7667 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007668 .printlock = spi_prettyprint_status_register_bp4_srwd,
7669 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7670 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007671 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007672 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007673 .prepare_access = spi_prepare_io,
7674 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007675 },
7676
7677 {
7678 .vendor = "GigaDevice",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007679 .name = "GD25VQ41B",
7680 .bustype = BUS_SPI,
7681 .manufacture_id = GIGADEVICE_ID,
7682 .model_id = GIGADEVICE_GD25VQ41B,
7683 .total_size = 512,
7684 .page_size = 256,
7685 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007686 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
7687 FEATURE_OTP | FEATURE_QIO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00007688 .tested = TEST_OK_PREW,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007689 .probe = probe_spi_rdid,
7690 .probe_timing = TIMING_ZERO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00007691 .block_erasers =
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007692 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00007693 {
7694 .eraseblocks = { { 4 * 1024, 128} },
7695 .block_erase = spi_block_erase_20,
7696 }, {
7697 .eraseblocks = { { 32 * 1024, 16} },
7698 .block_erase = spi_block_erase_52,
7699 }, {
7700 .eraseblocks = { { 64 * 1024, 8} },
7701 .block_erase = spi_block_erase_d8,
7702 }, {
7703 .eraseblocks = { {512 * 1024, 1} },
7704 .block_erase = spi_block_erase_60,
7705 }, {
7706 .eraseblocks = { {512 * 1024, 1} },
7707 .block_erase = spi_block_erase_c7,
7708 }
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007709 },
Nico Huber4da971f2024-03-27 01:18:12 +01007710 .reg_bits =
7711 {
7712 .qe = {STATUS2, 1, RW},
7713 },
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007714 .printlock = spi_prettyprint_status_register_bp4_srwd,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007715 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7716 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007717 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007718 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007719 .prepare_access = spi_prepare_io,
7720 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007721 },
7722
7723 {
7724 .vendor = "GigaDevice",
7725 .name = "GD25VQ80C",
7726 .bustype = BUS_SPI,
7727 .manufacture_id = GIGADEVICE_ID,
7728 .model_id = GIGADEVICE_GD25VQ80C,
7729 .total_size = 1024,
7730 .page_size = 256,
7731 /* Supports SFDP */
7732 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007733 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007734 .tested = TEST_UNTESTED,
7735 .probe = probe_spi_rdid,
7736 .probe_timing = TIMING_ZERO,
7737 .block_erasers =
7738 {
7739 {
7740 .eraseblocks = { { 4 * 1024, 256} },
7741 .block_erase = spi_block_erase_20,
7742 }, {
7743 .eraseblocks = { { 32 * 1024, 32} },
7744 .block_erase = spi_block_erase_52,
7745 }, {
7746 .eraseblocks = { { 64 * 1024, 16} },
7747 .block_erase = spi_block_erase_d8,
7748 }, {
7749 .eraseblocks = { {1024 * 1024, 1} },
7750 .block_erase = spi_block_erase_60,
7751 }, {
7752 .eraseblocks = { {1024 * 1024, 1} },
7753 .block_erase = spi_block_erase_c7,
7754 }
7755 },
Nico Huber4da971f2024-03-27 01:18:12 +01007756 .reg_bits =
7757 {
7758 .qe = {STATUS2, 1, RW},
7759 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007760 .printlock = spi_prettyprint_status_register_bp4_srwd,
7761 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7762 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007763 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007764 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007765 .prepare_access = spi_prepare_io,
7766 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007767 },
7768
7769 {
Dino Li3214f582020-03-25 17:39:53 +08007770 .vendor = "GigaDevice",
7771 .name = "GD25WQ80E",
7772 .bustype = BUS_SPI,
7773 .manufacture_id = GIGADEVICE_ID,
7774 .model_id = GIGADEVICE_GD25WQ80E,
7775 .total_size = 1024,
7776 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007777 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Dino Li3214f582020-03-25 17:39:53 +08007778 .tested = TEST_OK_PREW,
7779 .probe = probe_spi_rdid,
7780 .probe_timing = TIMING_ZERO,
7781 .block_erasers =
7782 {
7783 {
7784 .eraseblocks = { {4 * 1024, 256} },
7785 .block_erase = spi_block_erase_20,
7786 }, {
7787 .eraseblocks = { {32 * 1024, 32} },
7788 .block_erase = spi_block_erase_52,
7789 }, {
7790 .eraseblocks = { {64 * 1024, 16} },
7791 .block_erase = spi_block_erase_d8,
7792 }, {
7793 .eraseblocks = { {1 * 1024 * 1024, 1} },
7794 .block_erase = spi_block_erase_60,
7795 }, {
7796 .eraseblocks = { {1 * 1024 * 1024, 1} },
7797 .block_erase = spi_block_erase_c7,
7798 }
7799 },
Nico Huber4da971f2024-03-27 01:18:12 +01007800 .reg_bits =
7801 {
7802 .qe = {STATUS2, 1, RW},
7803 },
Dino Li3214f582020-03-25 17:39:53 +08007804 .printlock = spi_prettyprint_status_register_bp4_srwd,
7805 .unlock = spi_disable_blockprotect_bp4_srwd,
7806 .write = spi_chip_write_256,
7807 .read = spi_chip_read,
7808 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007809 .prepare_access = spi_prepare_io,
7810 .finish_access = spi_finish_io,
Dino Li3214f582020-03-25 17:39:53 +08007811 },
7812
7813 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007814 .vendor = "Hyundai",
7815 .name = "HY29F002B",
7816 .bustype = BUS_PARALLEL,
7817 .manufacture_id = HYUNDAI_ID,
7818 .model_id = HYUNDAI_HY29F002B,
7819 .total_size = 256,
7820 .page_size = 256 * 1024,
7821 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007822 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007823 .probe = probe_jedec,
7824 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007825 .block_erasers =
7826 {
7827 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007828 .eraseblocks = {
7829 {16 * 1024, 1},
7830 {8 * 1024, 2},
7831 {32 * 1024, 1},
7832 {64 * 1024, 3},
7833 },
7834 .block_erase = erase_sector_jedec,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007835 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007836 .eraseblocks = { {256 * 1024, 1} },
7837 .block_erase = erase_chip_block_jedec,
7838 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007839 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007840 .write = write_jedec_1,
7841 .read = read_memmapped,
7842 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007843 .prepare_access = prepare_memory_access,
7844 .finish_access = finish_memory_access,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007845 },
7846
7847 {
David Borgc96a8bd2010-06-21 16:12:22 +00007848 .vendor = "Hyundai",
7849 .name = "HY29F002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007850 .bustype = BUS_PARALLEL,
David Borgc96a8bd2010-06-21 16:12:22 +00007851 .manufacture_id = HYUNDAI_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007852 .model_id = HYUNDAI_HY29F002T,
David Borgc96a8bd2010-06-21 16:12:22 +00007853 .total_size = 256,
7854 .page_size = 256 * 1024,
7855 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00007856 .tested = TEST_OK_PRE,
David Borgc96a8bd2010-06-21 16:12:22 +00007857 .probe = probe_jedec,
7858 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
7859 .block_erasers =
7860 {
7861 {
7862 .eraseblocks = {
7863 {64 * 1024, 3},
7864 {32 * 1024, 1},
7865 {8 * 1024, 2},
7866 {16 * 1024, 1},
7867 },
7868 .block_erase = erase_sector_jedec,
7869 }, {
7870 .eraseblocks = { {256 * 1024, 1} },
7871 .block_erase = erase_chip_block_jedec,
7872 },
7873 },
7874 .write = write_jedec_1,
7875 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007876 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007877 .prepare_access = prepare_memory_access,
7878 .finish_access = finish_memory_access,
David Borgc96a8bd2010-06-21 16:12:22 +00007879 },
7880
7881 {
7882 .vendor = "Hyundai",
Joshua Roysf1324e02010-09-16 00:51:51 +00007883 .name = "HY29F040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007884 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +00007885 .manufacture_id = HYUNDAI_ID,
7886 .model_id = HYUNDAI_HY29F040A,
7887 .total_size = 512,
7888 .page_size = 64 * 1024,
7889 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
7890 .tested = TEST_UNTESTED,
7891 .probe = probe_jedec,
7892 .probe_timing = TIMING_ZERO,
7893 .block_erasers =
7894 {
7895 {
7896 .eraseblocks = { {64 * 1024, 8} },
7897 .block_erase = erase_sector_jedec,
7898 }, {
7899 .eraseblocks = { {512 * 1024, 1} },
7900 .block_erase = erase_chip_block_jedec,
7901 },
7902 },
7903 .write = write_jedec_1,
7904 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007905 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01007906 .prepare_access = prepare_memory_access,
7907 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +00007908 },
7909
7910 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00007911 .vendor = "ISSI",
Angel Pons2ef47f32018-09-30 16:47:30 +02007912 .name = "IS25LP064",
7913 .bustype = BUS_SPI,
7914 .manufacture_id = ISSI_ID_SPI,
7915 .model_id = ISSI_IS25LP064,
7916 .total_size = 8192,
7917 .page_size = 256,
7918 /* OTP: 1024B total; read 0x48; write 0x42 */
7919 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Simon Buhrow9bf829d2021-10-20 17:09:09 +02007920 .tested = TEST_OK_PREW,
Angel Pons2ef47f32018-09-30 16:47:30 +02007921 .probe = probe_spi_rdid,
7922 .probe_timing = TIMING_ZERO,
7923 .block_erasers =
7924 {
7925 {
7926 .eraseblocks = { {4 * 1024, 2048} },
7927 .block_erase = spi_block_erase_20,
7928 }, {
7929 .eraseblocks = { {4 * 1024, 2048} },
7930 .block_erase = spi_block_erase_d7,
7931 }, {
7932 .eraseblocks = { {32 * 1024, 256} },
7933 .block_erase = spi_block_erase_52,
7934 }, {
7935 .eraseblocks = { {64 * 1024, 128} },
7936 .block_erase = spi_block_erase_d8,
7937 }, {
7938 .eraseblocks = { {8 * 1024 * 1024, 1} },
7939 .block_erase = spi_block_erase_60,
7940 }, {
7941 .eraseblocks = { {8 * 1024 * 1024, 1} },
7942 .block_erase = spi_block_erase_c7,
7943 }
7944 },
7945 .unlock = spi_disable_blockprotect,
7946 .write = spi_chip_write_256,
7947 .read = spi_chip_read,
7948 .voltage = {2300, 3600},
7949 },
7950
7951 {
7952 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -07007953 .name = "IS25LP128",
7954 .bustype = BUS_SPI,
7955 .manufacture_id = ISSI_ID_SPI,
7956 .model_id = ISSI_IS25LP128,
7957 .total_size = 16384,
7958 .page_size = 256,
7959 /* OTP: 1024B total; read 0x48; write 0x42 */
7960 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
7961 .tested = TEST_OK_PREW,
7962 .probe = probe_spi_rdid,
7963 .probe_timing = TIMING_ZERO,
7964 .block_erasers =
7965 {
7966 {
7967 .eraseblocks = { {4 * 1024, 4096} },
7968 .block_erase = spi_block_erase_20,
7969 }, {
7970 .eraseblocks = { {4 * 1024, 4096} },
7971 .block_erase = spi_block_erase_d7,
7972 }, {
7973 .eraseblocks = { {32 * 1024, 512} },
7974 .block_erase = spi_block_erase_52,
7975 }, {
7976 .eraseblocks = { {64 * 1024, 256} },
7977 .block_erase = spi_block_erase_d8,
7978 }, {
7979 .eraseblocks = { {16 * 1024 * 1024, 1} },
7980 .block_erase = spi_block_erase_60,
7981 }, {
7982 .eraseblocks = { {16 * 1024 * 1024, 1} },
7983 .block_erase = spi_block_erase_c7,
7984 }
7985 },
7986 .unlock = spi_disable_blockprotect,
7987 .write = spi_chip_write_256,
7988 .read = spi_chip_read,
7989 .voltage = {2300, 3600},
7990 },
7991
7992 {
7993 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +00007994 .name = "IS25LP256",
7995 .bustype = BUS_SPI,
7996 .manufacture_id = ISSI_ID_SPI,
7997 .model_id = ISSI_IS25LP256,
7998 .total_size = 32768,
7999 .page_size = 256,
8000 /* supports SFDP */
8001 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +02008002 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
8003 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +00008004 .tested = TEST_OK_PREW,
8005 .probe = probe_spi_rdid,
8006 .probe_timing = TIMING_ZERO,
8007 .block_erasers =
8008 {
8009 {
8010 .eraseblocks = { {4 * 1024, 8192} },
8011 .block_erase = spi_block_erase_21,
8012 }, {
8013 .eraseblocks = { {4 * 1024, 8192} },
8014 .block_erase = spi_block_erase_20,
8015 /* could also use spi_block_erase_d7 */
8016 }, {
8017 .eraseblocks = { {32 * 1024, 1024} },
8018 .block_erase = spi_block_erase_5c,
8019 }, {
8020 .eraseblocks = { {32 * 1024, 1024} },
8021 .block_erase = spi_block_erase_52,
8022 }, {
8023 .eraseblocks = { {64 * 1024, 512} },
8024 .block_erase = spi_block_erase_dc,
8025 }, {
8026 .eraseblocks = { {64 * 1024, 512} },
8027 .block_erase = spi_block_erase_d8,
8028 }, {
8029 .eraseblocks = { {32 * 1024 * 1024, 1} },
8030 .block_erase = spi_block_erase_60,
8031 }, {
8032 .eraseblocks = { {32 * 1024 * 1024, 1} },
8033 .block_erase = spi_block_erase_c7,
8034 }
8035 },
8036 .unlock = spi_disable_blockprotect,
8037 .write = spi_chip_write_256,
8038 .read = spi_chip_read,
8039 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008040 .prepare_access = spi_prepare_io,
8041 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +00008042 },
8043
8044 {
8045 .vendor = "ISSI",
Nico Huberb27b8d12018-10-02 20:46:21 +02008046 .name = "IS25WP032",
8047 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +10008048 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +02008049 .model_id = ISSI_IS25WP032,
8050 .total_size = 4096,
8051 .page_size = 256,
8052 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008053 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8054 dummy cycles; non-volatile read parameters, so disable for now */
8055 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +02008056 .tested = TEST_UNTESTED,
8057 .probe = probe_spi_rdid,
8058 .probe_timing = TIMING_ZERO,
8059 .block_erasers =
8060 {
8061 {
8062 .eraseblocks = { {4 * 1024, 1024} },
8063 .block_erase = spi_block_erase_20,
8064 }, {
8065 .eraseblocks = { {4 * 1024, 1024} },
8066 .block_erase = spi_block_erase_d7,
8067 }, {
8068 .eraseblocks = { {32 * 1024, 128} },
8069 .block_erase = spi_block_erase_52,
8070 }, {
8071 .eraseblocks = { {64 * 1024, 64} },
8072 .block_erase = spi_block_erase_d8,
8073 }, {
8074 .eraseblocks = { {4 * 1024 * 1024, 1} },
8075 .block_erase = spi_block_erase_60,
8076 }, {
8077 .eraseblocks = { {4 * 1024 * 1024, 1} },
8078 .block_erase = spi_block_erase_c7,
8079 }
8080 },
8081 .unlock = spi_disable_blockprotect,
8082 .write = spi_chip_write_256,
8083 .read = spi_chip_read,
8084 .voltage = {1650, 1950},
8085 },
8086
8087 {
8088 .vendor = "ISSI",
8089 .name = "IS25WP064",
8090 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +10008091 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +02008092 .model_id = ISSI_IS25WP064,
8093 .total_size = 8192,
8094 .page_size = 256,
8095 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008096 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8097 dummy cycles; non-volatile read parameters, so disable for now */
8098 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +02008099 .tested = TEST_OK_PREW,
8100 .probe = probe_spi_rdid,
8101 .probe_timing = TIMING_ZERO,
8102 .block_erasers =
8103 {
8104 {
8105 .eraseblocks = { {4 * 1024, 2048} },
8106 .block_erase = spi_block_erase_20,
8107 }, {
8108 .eraseblocks = { {4 * 1024, 2048} },
8109 .block_erase = spi_block_erase_d7,
8110 }, {
8111 .eraseblocks = { {32 * 1024, 256} },
8112 .block_erase = spi_block_erase_52,
8113 }, {
8114 .eraseblocks = { {64 * 1024, 128} },
8115 .block_erase = spi_block_erase_d8,
8116 }, {
8117 .eraseblocks = { {8 * 1024 * 1024, 1} },
8118 .block_erase = spi_block_erase_60,
8119 }, {
8120 .eraseblocks = { {8 * 1024 * 1024, 1} },
8121 .block_erase = spi_block_erase_c7,
8122 }
8123 },
8124 .unlock = spi_disable_blockprotect,
8125 .write = spi_chip_write_256,
8126 .read = spi_chip_read,
8127 .voltage = {1650, 1950},
8128 },
8129
8130 {
8131 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -07008132 .name = "IS25WP128",
8133 .bustype = BUS_SPI,
8134 .manufacture_id = ISSI_ID_SPI,
8135 .model_id = ISSI_IS25WP128,
8136 .total_size = 16384,
8137 .page_size = 256,
8138 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008139 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8140 dummy cycles; non-volatile read parameters, so disable for now */
8141 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks3083ed92017-05-02 13:25:56 -07008142 .tested = TEST_OK_PREW,
8143 .probe = probe_spi_rdid,
8144 .probe_timing = TIMING_ZERO,
8145 .block_erasers =
8146 {
8147 {
8148 .eraseblocks = { {4 * 1024, 4096} },
8149 .block_erase = spi_block_erase_20,
8150 }, {
8151 .eraseblocks = { {4 * 1024, 4096} },
8152 .block_erase = spi_block_erase_d7,
8153 }, {
8154 .eraseblocks = { {32 * 1024, 512} },
8155 .block_erase = spi_block_erase_52,
8156 }, {
8157 .eraseblocks = { {64 * 1024, 256} },
8158 .block_erase = spi_block_erase_d8,
8159 }, {
8160 .eraseblocks = { {16 * 1024 * 1024, 1} },
8161 .block_erase = spi_block_erase_60,
8162 }, {
8163 .eraseblocks = { {16 * 1024 * 1024, 1} },
8164 .block_erase = spi_block_erase_c7,
8165 }
8166 },
8167 .unlock = spi_disable_blockprotect,
8168 .write = spi_chip_write_256,
8169 .read = spi_chip_read,
8170 .voltage = {1650, 1950},
8171 },
8172
8173 {
8174 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +00008175 .name = "IS25WP256",
8176 .bustype = BUS_SPI,
8177 .manufacture_id = ISSI_ID_SPI,
8178 .model_id = ISSI_IS25WP256,
8179 .total_size = 32768,
8180 .page_size = 256,
8181 /* supports SFDP */
8182 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +02008183 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
8184 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +00008185 .tested = TEST_OK_PREW,
8186 .probe = probe_spi_rdid,
8187 .probe_timing = TIMING_ZERO,
8188 .block_erasers =
8189 {
8190 {
8191 .eraseblocks = { {4 * 1024, 8192} },
8192 .block_erase = spi_block_erase_21,
8193 }, {
8194 .eraseblocks = { {4 * 1024, 8192} },
8195 .block_erase = spi_block_erase_20,
8196 /* could also use spi_block_erase_d7 */
8197 }, {
8198 .eraseblocks = { {32 * 1024, 1024} },
8199 .block_erase = spi_block_erase_5c,
8200 }, {
8201 .eraseblocks = { {32 * 1024, 1024} },
8202 .block_erase = spi_block_erase_52,
8203 }, {
8204 .eraseblocks = { {64 * 1024, 512} },
8205 .block_erase = spi_block_erase_dc,
8206 }, {
8207 .eraseblocks = { {64 * 1024, 512} },
8208 .block_erase = spi_block_erase_d8,
8209 }, {
8210 .eraseblocks = { {32 * 1024 * 1024, 1} },
8211 .block_erase = spi_block_erase_60,
8212 }, {
8213 .eraseblocks = { {32 * 1024 * 1024, 1} },
8214 .block_erase = spi_block_erase_c7,
8215 }
8216 },
8217 .unlock = spi_disable_blockprotect,
8218 .write = spi_chip_write_256,
8219 .read = spi_chip_read,
8220 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02008221 .prepare_access = spi_prepare_io,
8222 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +00008223 },
8224
8225 {
8226 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008227 .name = "IS29GL064B",
8228 .bustype = BUS_PARALLEL,
8229 .manufacture_id = ISSI_ID,
8230 .model_id = ISSI_PMC_IS29GL064B,
8231 .total_size = 8192,
8232 .page_size = 128 * 1024, /* actual page size is 16 */
8233 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8234 .tested = TEST_UNTESTED,
8235 .probe = probe_jedec_29gl,
8236 .probe_timing = TIMING_ZERO,
8237 .block_erasers =
8238 {
8239 {
8240 .eraseblocks = {
8241 {8 * 1024, 8},
8242 {64 * 1024, 127},
8243 },
8244 .block_erase = erase_sector_jedec,
8245 }, {
8246 .eraseblocks = { {8 * 1024 * 1024, 1} },
8247 .block_erase = erase_chip_block_jedec,
8248 },
8249 },
8250 .write = write_jedec_1,
8251 .read = read_memmapped,
8252 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008253 .prepare_access = prepare_memory_access,
8254 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008255 },
8256
8257 {
8258 .vendor = "ISSI",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008259 .name = "IS29GL064H/L",
8260 .bustype = BUS_PARALLEL,
8261 .manufacture_id = ISSI_ID,
8262 .model_id = ISSI_PMC_IS29GL064HL,
8263 .total_size = 8192,
8264 .page_size = 128 * 1024, /* actual page size is 16 */
8265 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8266 .tested = TEST_UNTESTED,
8267 .probe = probe_jedec_29gl,
8268 .probe_timing = TIMING_ZERO,
8269 .block_erasers =
8270 {
8271 {
8272 .eraseblocks = { {64 * 1024, 128} },
8273 .block_erase = erase_sector_jedec,
8274 }, {
8275 .eraseblocks = { {8 * 1024 * 1024, 1} },
8276 .block_erase = erase_chip_block_jedec,
8277 },
8278 },
8279 .write = write_jedec_1,
8280 .read = read_memmapped,
8281 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008282 .prepare_access = prepare_memory_access,
8283 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008284 },
8285
8286 {
8287 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008288 .name = "IS29GL064T",
8289 .bustype = BUS_PARALLEL,
8290 .manufacture_id = ISSI_ID,
8291 .model_id = ISSI_PMC_IS29GL064T,
8292 .total_size = 8192,
8293 .page_size = 128 * 1024, /* actual page size is 16 */
8294 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8295 .tested = TEST_UNTESTED,
8296 .probe = probe_jedec_29gl,
8297 .probe_timing = TIMING_ZERO,
8298 .block_erasers =
8299 {
8300 {
8301 .eraseblocks = {
8302 {64 * 1024, 127},
8303 {8 * 1024, 8},
8304 },
8305 .block_erase = erase_sector_jedec,
8306 }, {
8307 .eraseblocks = { {8 * 1024 * 1024, 1} },
8308 .block_erase = erase_chip_block_jedec,
8309 },
8310 },
8311 .write = write_jedec_1,
8312 .read = read_memmapped,
8313 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008314 .prepare_access = prepare_memory_access,
8315 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008316 },
8317
8318 {
8319 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008320 .name = "IS29GL128H/L",
8321 .bustype = BUS_PARALLEL,
8322 .manufacture_id = ISSI_ID,
8323 .model_id = ISSI_PMC_IS29GL128HL,
8324 .total_size = 16384,
8325 .page_size = 128 * 1024, /* actual page size is 16 */
8326 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8327 .tested = TEST_UNTESTED,
8328 .probe = probe_jedec_29gl,
8329 .probe_timing = TIMING_ZERO,
8330 .block_erasers =
8331 {
8332 {
8333 .eraseblocks = { {128 * 1024, 128} },
8334 .block_erase = erase_sector_jedec,
8335 }, {
8336 .eraseblocks = { {16 * 1024 * 1024, 1} },
8337 .block_erase = erase_chip_block_jedec,
8338 },
8339 },
8340 .write = write_jedec_1,
8341 .read = read_memmapped,
8342 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008343 .prepare_access = prepare_memory_access,
8344 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008345 },
8346
8347 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008348 .vendor = "Intel",
8349 .name = "25F160S33B8",
8350 .bustype = BUS_SPI,
8351 .manufacture_id = INTEL_ID,
8352 .model_id = INTEL_25F160S33B8,
8353 .total_size = 2048,
8354 .page_size = 256,
8355 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8356 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8357 .tested = TEST_UNTESTED,
8358 .probe = probe_spi_rdid,
8359 .probe_timing = TIMING_ZERO,
8360 .block_erasers =
8361 {
8362 {
8363 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8364 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8365 * have no effect on the memory contents, but sets a flag in the SR.
8366 .eraseblocks = {
8367 {8 * 1024, 8},
8368 {64 * 1024, 31} // inaccessible
8369 },
8370 .block_erase = spi_block_erase_40,
8371 }, { */
8372 .eraseblocks = { {64 * 1024, 32} },
8373 .block_erase = spi_block_erase_d8,
8374 }, {
8375 .eraseblocks = { {2 * 1024 * 1024, 1} },
8376 .block_erase = spi_block_erase_c7,
8377 }
8378 },
8379 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8380 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8381 .write = spi_chip_write_256,
8382 .read = spi_chip_read, /* also fast read 0x0B */
8383 .voltage = {2700, 3600},
8384 },
8385
8386 {
8387 .vendor = "Intel",
8388 .name = "25F160S33T8",
8389 .bustype = BUS_SPI,
8390 .manufacture_id = INTEL_ID,
8391 .model_id = INTEL_25F160S33T8,
8392 .total_size = 2048,
8393 .page_size = 256,
8394 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8395 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8396 .tested = TEST_UNTESTED,
8397 .probe = probe_spi_rdid,
8398 .probe_timing = TIMING_ZERO,
8399 .block_erasers =
8400 {
8401 {
8402 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8403 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8404 * have no effect on the memory contents, but sets a flag in the SR.
8405 .eraseblocks = {
8406 {64 * 1024, 31}, // inaccessible
8407 {8 * 1024, 8}
8408 },
8409 .block_erase = spi_block_erase_40,
8410 }, { */
8411 .eraseblocks = { {64 * 1024, 32} },
8412 .block_erase = spi_block_erase_d8,
8413 }, {
8414 .eraseblocks = { {2 * 1024 * 1024, 1} },
8415 .block_erase = spi_block_erase_c7,
8416 }
8417 },
8418 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8419 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8420 .write = spi_chip_write_256,
8421 .read = spi_chip_read, /* also fast read 0x0B */
8422 .voltage = {2700, 3600},
8423 },
8424
8425 {
8426 .vendor = "Intel",
8427 .name = "25F320S33B8",
8428 .bustype = BUS_SPI,
8429 .manufacture_id = INTEL_ID,
8430 .model_id = INTEL_25F320S33B8,
8431 .total_size = 4096,
8432 .page_size = 256,
8433 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8434 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8435 .tested = TEST_UNTESTED,
8436 .probe = probe_spi_rdid,
8437 .probe_timing = TIMING_ZERO,
8438 .block_erasers =
8439 {
8440 {
8441 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8442 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8443 * have no effect on the memory contents, but sets a flag in the SR.
8444 .eraseblocks = {
8445 {8 * 1024, 8},
8446 {64 * 1024, 63} // inaccessible
8447 },
8448 .block_erase = spi_block_erase_40,
8449 }, { */
8450 .eraseblocks = { {64 * 1024, 64} },
8451 .block_erase = spi_block_erase_d8,
8452 }, {
8453 .eraseblocks = { {4 * 1024 * 1024, 1} },
8454 .block_erase = spi_block_erase_c7,
8455 }
8456 },
8457 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8458 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8459 .write = spi_chip_write_256,
8460 .read = spi_chip_read, /* also fast read 0x0B */
8461 .voltage = {2700, 3600},
8462 },
8463
8464 {
8465 .vendor = "Intel",
8466 .name = "25F320S33T8",
8467 .bustype = BUS_SPI,
8468 .manufacture_id = INTEL_ID,
8469 .model_id = INTEL_25F320S33T8,
8470 .total_size = 4096,
8471 .page_size = 256,
8472 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8473 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8474 .tested = TEST_UNTESTED,
8475 .probe = probe_spi_rdid,
8476 .probe_timing = TIMING_ZERO,
8477 .block_erasers =
8478 {
8479 {
8480 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8481 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8482 * have no effect on the memory contents, but sets a flag in the SR.
8483 .eraseblocks = {
8484 {64 * 1024, 63}, // inaccessible
8485 {8 * 1024, 8}
8486 },
8487 .block_erase = spi_block_erase_40,
8488 }, { */
8489 .eraseblocks = { {64 * 1024, 64} },
8490 .block_erase = spi_block_erase_d8,
8491 }, {
8492 .eraseblocks = { {4 * 1024 * 1024, 1} },
8493 .block_erase = spi_block_erase_c7,
8494 }
8495 },
8496 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8497 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8498 .write = spi_chip_write_256,
8499 .read = spi_chip_read, /* also fast read 0x0B */
8500 .voltage = {2700, 3600},
8501 },
8502
8503 {
8504 .vendor = "Intel",
8505 .name = "25F640S33B8",
8506 .bustype = BUS_SPI,
8507 .manufacture_id = INTEL_ID,
8508 .model_id = INTEL_25F640S33B8,
8509 .total_size = 8192,
8510 .page_size = 256,
8511 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8512 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Zoltan HERPAIe0e8b2b2020-08-08 16:04:34 +02008513 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008514 .probe = probe_spi_rdid,
8515 .probe_timing = TIMING_ZERO,
8516 .block_erasers =
8517 {
8518 {
8519 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8520 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8521 * have no effect on the memory contents, but sets a flag in the SR.
8522 .eraseblocks = {
8523 {8 * 1024, 8},
8524 {64 * 1024, 127} // inaccessible
8525 },
8526 .block_erase = spi_block_erase_40,
8527 }, { */
8528 .eraseblocks = { {64 * 1024, 128} },
8529 .block_erase = spi_block_erase_d8,
8530 }, {
8531 .eraseblocks = { {8 * 1024 * 1024, 1} },
8532 .block_erase = spi_block_erase_c7,
8533 }
8534 },
8535 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8536 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8537 .write = spi_chip_write_256,
8538 .read = spi_chip_read, /* also fast read 0x0B */
8539 .voltage = {2700, 3600},
8540 },
8541
8542 {
8543 .vendor = "Intel",
8544 .name = "25F640S33T8",
8545 .bustype = BUS_SPI,
8546 .manufacture_id = INTEL_ID,
8547 .model_id = INTEL_25F640S33T8,
8548 .total_size = 8192,
8549 .page_size = 256,
8550 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8551 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8552 .tested = TEST_UNTESTED,
8553 .probe = probe_spi_rdid,
8554 .probe_timing = TIMING_ZERO,
8555 .block_erasers =
8556 {
8557 {
8558 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8559 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8560 * have no effect on the memory contents, but sets a flag in the SR.
8561 .eraseblocks = {
8562 {64 * 1024, 127}, // inaccessible
8563 {8 * 1024, 8}
8564 },
8565 .block_erase = spi_block_erase_40,
8566 }, { */
8567 .eraseblocks = { {64 * 1024, 128} },
8568 .block_erase = spi_block_erase_d8,
8569 }, {
8570 .eraseblocks = { {8 * 1024 * 1024, 1} },
8571 .block_erase = spi_block_erase_c7,
8572 }
8573 },
8574 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8575 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8576 .write = spi_chip_write_256,
8577 .read = spi_chip_read, /* also fast read 0x0B */
8578 .voltage = {2700, 3600},
8579 },
8580
8581 {
8582 .vendor = "Intel",
8583 .name = "28F001BN/BX-B",
8584 .bustype = BUS_PARALLEL,
8585 .manufacture_id = INTEL_ID,
8586 .model_id = INTEL_28F001B,
8587 .total_size = 128,
8588 .page_size = 128 * 1024, /* 8k + 2x4k + 112k */
8589 .tested = TEST_UNTESTED,
8590 .probe = probe_jedec,
8591 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8592 .block_erasers =
8593 {
8594 {
8595 .eraseblocks = {
8596 {8 * 1024, 1},
8597 {4 * 1024, 2},
8598 {112 * 1024, 1},
8599 },
8600 .block_erase = erase_block_82802ab,
8601 },
8602 },
8603 .write = write_82802ab,
8604 .read = read_memmapped,
8605 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01008606 .prepare_access = prepare_memory_access,
8607 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008608 },
8609
8610 {
8611 .vendor = "Intel",
8612 .name = "28F001BN/BX-T",
8613 .bustype = BUS_PARALLEL,
8614 .manufacture_id = INTEL_ID,
8615 .model_id = INTEL_28F001T,
8616 .total_size = 128,
8617 .page_size = 128 * 1024, /* 112k + 2x4k + 8k */
8618 .tested = TEST_OK_PREW,
8619 .probe = probe_jedec,
8620 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8621 .block_erasers =
8622 {
8623 {
8624 .eraseblocks = {
8625 {112 * 1024, 1},
8626 {4 * 1024, 2},
8627 {8 * 1024, 1},
8628 },
8629 .block_erase = erase_block_82802ab,
8630 },
8631 },
8632 .write = write_82802ab,
8633 .read = read_memmapped,
8634 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01008635 .prepare_access = prepare_memory_access,
8636 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008637 },
8638
8639 {
8640 .vendor = "Intel",
8641 .name = "28F002BC/BL/BV/BX-T",
8642 .bustype = BUS_PARALLEL,
8643 .manufacture_id = INTEL_ID,
8644 .model_id = INTEL_28F002T,
8645 .total_size = 256,
8646 .page_size = 256 * 1024,
8647 .tested = TEST_OK_PRE,
8648 .probe = probe_82802ab,
8649 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8650 .block_erasers =
8651 {
8652 {
8653 .eraseblocks = {
8654 {128 * 1024, 1},
8655 {96 * 1024, 1},
8656 {8 * 1024, 2},
8657 {16 * 1024, 1},
8658 },
8659 .block_erase = erase_block_82802ab,
8660 },
8661 },
8662 .write = write_82802ab,
8663 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008664 .prepare_access = prepare_memory_access,
8665 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008666 },
8667
8668 {
8669 .vendor = "Intel",
8670 .name = "28F004B5/BE/BV/BX-B",
8671 .bustype = BUS_PARALLEL,
8672 .manufacture_id = INTEL_ID,
8673 .model_id = INTEL_28F004B,
8674 .total_size = 512,
8675 .page_size = 128 * 1024, /* maximal block size */
8676 .tested = TEST_UNTESTED,
8677 .probe = probe_82802ab,
8678 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8679 .block_erasers =
8680 {
8681 {
8682 .eraseblocks = {
8683 {16 * 1024, 1},
8684 {8 * 1024, 2},
8685 {96 * 1024, 1},
8686 {128 * 1024, 3},
8687 },
8688 .block_erase = erase_block_82802ab,
8689 },
8690 },
8691 .write = write_82802ab,
8692 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008693 .prepare_access = prepare_memory_access,
8694 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008695 },
8696
8697 {
8698 .vendor = "Intel",
8699 .name = "28F004B5/BE/BV/BX-T",
8700 .bustype = BUS_PARALLEL,
8701 .manufacture_id = INTEL_ID,
8702 .model_id = INTEL_28F004T,
8703 .total_size = 512,
8704 .page_size = 128 * 1024, /* maximal block size */
8705 .tested = TEST_UNTESTED,
8706 .probe = probe_82802ab,
8707 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8708 .block_erasers =
8709 {
8710 {
8711 .eraseblocks = {
8712 {128 * 1024, 3},
8713 {96 * 1024, 1},
8714 {8 * 1024, 2},
8715 {16 * 1024, 1},
8716 },
8717 .block_erase = erase_block_82802ab,
8718 },
8719 },
8720 .write = write_82802ab,
8721 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008722 .prepare_access = prepare_memory_access,
8723 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008724 },
8725
8726 {
8727 .vendor = "Intel",
8728 .name = "28F008S3/S5/SC",
8729 .bustype = BUS_PARALLEL,
8730 .manufacture_id = INTEL_ID,
8731 .model_id = INTEL_28F004S3,
8732 .total_size = 512,
8733 .page_size = 256,
8734 .tested = TEST_UNTESTED,
8735 .probe = probe_82802ab,
8736 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8737 .block_erasers =
8738 {
8739 {
8740 .eraseblocks = { {64 * 1024, 8} },
8741 .block_erase = erase_block_82802ab,
8742 },
8743 },
8744 .unlock = unlock_28f004s5,
8745 .write = write_82802ab,
8746 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008747 .prepare_access = prepare_memory_access,
8748 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008749 },
8750
8751 {
8752 .vendor = "Intel",
8753 .name = "28F400BV/BX/CE/CV-B",
8754 .bustype = BUS_PARALLEL,
8755 .manufacture_id = INTEL_ID,
8756 .model_id = INTEL_28F400B,
8757 .total_size = 512,
8758 .page_size = 128 * 1024, /* maximal block size */
8759 .feature_bits = FEATURE_ADDR_SHIFTED,
8760 .tested = TEST_UNTESTED,
8761 .probe = probe_82802ab,
8762 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8763 .block_erasers =
8764 {
8765 {
8766 .eraseblocks = {
8767 {16 * 1024, 1},
8768 {8 * 1024, 2},
8769 {96 * 1024, 1},
8770 {128 * 1024, 3},
8771 },
8772 .block_erase = erase_block_82802ab,
8773 },
8774 },
8775 .write = write_82802ab,
8776 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008777 .prepare_access = prepare_memory_access,
8778 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008779 },
8780
8781 {
8782 .vendor = "Intel",
8783 .name = "28F400BV/BX/CE/CV-T",
8784 .bustype = BUS_PARALLEL,
8785 .manufacture_id = INTEL_ID,
8786 .model_id = INTEL_28F400T,
8787 .total_size = 512,
8788 .page_size = 128 * 1024, /* maximal block size */
8789 .feature_bits = FEATURE_ADDR_SHIFTED,
8790 .tested = TEST_UNTESTED,
8791 .probe = probe_82802ab,
8792 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8793 .block_erasers =
8794 {
8795 {
8796 .eraseblocks = {
8797 {128 * 1024, 3},
8798 {96 * 1024, 1},
8799 {8 * 1024, 2},
8800 {16 * 1024, 1},
8801 },
8802 .block_erase = erase_block_82802ab,
8803 },
8804 },
8805 .write = write_82802ab,
8806 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008807 .prepare_access = prepare_memory_access,
8808 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008809 },
8810
8811 {
8812 .vendor = "Intel",
8813 .name = "82802AB",
8814 .bustype = BUS_FWH,
8815 .manufacture_id = INTEL_ID,
8816 .model_id = INTEL_82802AB,
8817 .total_size = 512,
8818 .page_size = 64 * 1024,
Alan Green88552572019-07-24 13:56:06 +10008819 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008820 .probe = probe_82802ab,
8821 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
8822 .block_erasers =
8823 {
8824 {
8825 .eraseblocks = { {64 * 1024, 8} },
8826 .block_erase = erase_block_82802ab,
8827 },
8828 },
8829 .unlock = unlock_regspace2_uniform_64k,
8830 .write = write_82802ab,
8831 .read = read_memmapped,
8832 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01008833 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01008834 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008835 },
8836
8837 {
8838 .vendor = "Intel",
8839 .name = "82802AC",
8840 .bustype = BUS_FWH,
8841 .manufacture_id = INTEL_ID,
8842 .model_id = INTEL_82802AC,
8843 .total_size = 1024,
8844 .page_size = 64 * 1024,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008845 .tested = TEST_OK_PR,
8846 .probe = probe_82802ab,
8847 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
8848 .block_erasers =
8849 {
8850 {
8851 .eraseblocks = { {64 * 1024, 16} },
8852 .block_erase = erase_block_82802ab,
8853 },
8854 },
8855 .unlock = unlock_regspace2_uniform_64k,
8856 .write = write_82802ab,
8857 .read = read_memmapped,
8858 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01008859 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01008860 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008861 },
8862
8863 {
8864 .vendor = "Macronix",
8865 .name = "MX23L12854",
8866 .bustype = BUS_SPI,
8867 .manufacture_id = MACRONIX_ID,
8868 .model_id = MACRONIX_MX23L12854,
8869 .total_size = 16384,
8870 .page_size = 256,
8871 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
8872 .probe = probe_spi_rdid,
8873 .probe_timing = TIMING_ZERO,
8874 .write = NULL, /* MX23L12854 is a mask ROM, so it is read-only */
8875 .read = spi_chip_read, /* Fast read (0x0B) supported */
8876 .voltage = {3000, 3600},
8877 },
8878
8879 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008880 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +00008881 .name = "MX23L1654",
8882 .bustype = BUS_SPI,
8883 .manufacture_id = MACRONIX_ID,
8884 .model_id = MACRONIX_MX23L1654,
8885 .total_size = 2048,
8886 .page_size = 256,
8887 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
8888 .probe = probe_spi_rdid,
8889 .probe_timing = TIMING_ZERO,
8890 .write = NULL, /* MX23L1654 is a mask ROM, so it is read-only */
8891 .read = spi_chip_read, /* Fast read (0x0B) supported */
8892 .voltage = {3000, 3600},
8893 },
8894
8895 {
8896 .vendor = "Macronix",
Michael Coppola4e7f36e2014-05-03 23:01:18 +00008897 .name = "MX23L3254",
8898 .bustype = BUS_SPI,
8899 .manufacture_id = MACRONIX_ID,
8900 .model_id = MACRONIX_MX23L3254,
8901 .total_size = 4096,
8902 .page_size = 256,
Stefan Tauner6455dff2014-05-26 00:36:24 +00008903 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola4e7f36e2014-05-03 23:01:18 +00008904 .probe = probe_spi_rdid,
8905 .probe_timing = TIMING_ZERO,
8906 .write = NULL, /* MX23L3254 is a mask ROM, so it is read-only */
8907 .read = spi_chip_read, /* Fast read (0x0B) supported */
8908 .voltage = {3000, 3600},
8909 },
8910
8911 {
8912 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +00008913 .name = "MX23L6454",
8914 .bustype = BUS_SPI,
8915 .manufacture_id = MACRONIX_ID,
8916 .model_id = MACRONIX_MX23L6454,
8917 .total_size = 8192,
8918 .page_size = 256,
Stefan Tauner23e10b82016-01-23 16:16:49 +00008919 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola583ea322014-08-20 18:56:35 +00008920 .probe = probe_spi_rdid,
8921 .probe_timing = TIMING_ZERO,
8922 .write = NULL, /* MX23L6454 is a mask ROM, so it is read-only */
8923 .read = spi_chip_read, /* Fast read (0x0B) supported */
8924 .voltage = {3000, 3600},
8925 },
8926
8927 {
8928 .vendor = "Macronix",
Stefan Taunerf656e802013-02-02 15:35:44 +00008929 .name = "MX25L1005(C)/MX25L1006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00008930 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00008931 .manufacture_id = MACRONIX_ID,
8932 .model_id = MACRONIX_MX25L1005,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008933 .total_size = 128,
8934 .page_size = 256,
Stefan Taunerf656e802013-02-02 15:35:44 +00008935 /* MX25L1006E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +01008936 /* FEATURE_FAST_READ_DOUT: MX25L1006E */
8937 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Stefan Taunerd7d423b2012-10-20 09:13:16 +00008938 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008939 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00008940 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008941 .block_erasers =
8942 {
8943 {
8944 .eraseblocks = { {4 * 1024, 32} },
8945 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008946 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008947 .eraseblocks = { {64 * 1024, 2} },
8948 .block_erase = spi_block_erase_d8,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008949 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00008950 .eraseblocks = { {128 * 1024, 1} },
8951 .block_erase = spi_block_erase_60,
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_c7,
8955 },
8956 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00008957 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00008958 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00008959 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01008960 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00008961 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008962 .prepare_access = spi_prepare_io,
8963 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00008964 },
8965
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008966 {
8967 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008968 .name = "MX25L12805D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00008969 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00008970 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008971 .model_id = MACRONIX_MX25L12805D,
8972 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008973 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008974 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01008975 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00008976 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00008977 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00008978 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008979 .block_erasers =
8980 {
8981 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008982 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008983 .block_erase = spi_block_erase_20,
8984 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008985 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008986 .block_erase = spi_block_erase_d8,
8987 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008988 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008989 .block_erase = spi_block_erase_60,
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_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008993 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00008994 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10008995 .printlock = spi_prettyprint_status_register_bp3_srwd,
8996 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00008997 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01008998 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00008999 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00009000 },
9001
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009002 {
9003 .vendor = "Macronix",
Tao Xia571f6ad2021-07-21 16:41:53 +08009004 .name = "MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009005 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009006 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009007 .model_id = MACRONIX_MX25L12805D,
9008 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009009 .page_size = 256,
Tao Xia571f6ad2021-07-21 16:41:53 +08009010 /* OTP: MX25L12833F has 1KB total, others have 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009011 /* *F versions: FEATURE_QPI_35 + DC bits (6, 4, 8, 10) in configuration register */
9012 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9013 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stefan Tauner8179be52011-06-04 13:13:34 +00009014 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009015 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009016 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009017 .block_erasers =
9018 {
9019 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009020 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009021 .block_erase = spi_block_erase_20,
9022 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009023 .eraseblocks = { {32 * 1024, 512} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009024 .block_erase = spi_block_erase_52,
9025 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009026 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009027 .block_erase = spi_block_erase_d8,
9028 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009029 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009030 .block_erase = spi_block_erase_60,
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_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009034 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009035 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009036 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +01009037 .reg_bits =
9038 {
9039 .qe = {STATUS1, 6, RW},
9040 },
9041 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009042 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009043 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009044 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009045 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009046 .prepare_access = spi_prepare_io,
9047 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009048 },
9049
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009050 {
9051 .vendor = "Macronix",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009052 .name = "MX25L1605",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009053 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009054 .manufacture_id = MACRONIX_ID,
9055 .model_id = MACRONIX_MX25L1605,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009056 .total_size = 2048,
9057 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009058 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Sven Schnelle4bd8a402011-03-07 10:59:06 +00009059 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009060 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009061 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009062 .block_erasers =
9063 {
9064 {
Stefan Tauner226037d2013-03-16 01:22:12 +00009065 .eraseblocks = { {64 * 1024, 32} },
9066 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009067 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +00009068 .eraseblocks = { {64 * 1024, 32} },
9069 .block_erase = spi_block_erase_d8,
9070 }, {
9071 .eraseblocks = { {2 * 1024 * 1024, 1} },
9072 .block_erase = spi_block_erase_60,
9073 }, {
9074 .eraseblocks = { {2 * 1024 * 1024, 1} },
9075 .block_erase = spi_block_erase_c7,
9076 },
9077 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009078 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Stefan Tauner226037d2013-03-16 01:22:12 +00009079 .unlock = spi_disable_blockprotect,
9080 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009081 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009082 .voltage = {2700, 3600},
9083 },
9084
9085 {
9086 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009087 .name = "MX25L1605A/MX25L1606E/MX25L1608E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009088 .bustype = BUS_SPI,
9089 .manufacture_id = MACRONIX_ID,
9090 .model_id = MACRONIX_MX25L1605,
9091 .total_size = 2048,
9092 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009093 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L1606E and MX25L1608E only) */
Nico Huber46552c82024-03-27 01:18:12 +01009094 /* FEATURE_FAST_READ_DOUT: MX25L1606E & MX25L1608E */
9095 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +00009096 .tested = TEST_OK_PREW,
9097 .probe = probe_spi_rdid,
9098 .probe_timing = TIMING_ZERO,
9099 .block_erasers =
9100 {
9101 {
9102 .eraseblocks = { {4 * 1024, 512} },
9103 .block_erase = spi_block_erase_20,
9104 }, {
9105 .eraseblocks = { {64 * 1024, 32} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009106 .block_erase = spi_block_erase_52,
9107 }, {
9108 .eraseblocks = { {64 * 1024, 32} },
9109 .block_erase = spi_block_erase_d8,
9110 }, {
9111 .eraseblocks = { {2 * 1024 * 1024, 1} },
9112 .block_erase = spi_block_erase_60,
9113 }, {
9114 .eraseblocks = { {2 * 1024 * 1024, 1} },
9115 .block_erase = spi_block_erase_c7,
9116 },
9117 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009118 .printlock = spi_prettyprint_status_register_bp3_srwd, /* MX25L1605A bp2 only */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009119 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009120 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009121 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009122 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009123 .prepare_access = spi_prepare_io,
9124 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009125 },
9126
9127 {
9128 .vendor = "Macronix",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009129 .name = "MX25L1605D/MX25L1608D/MX25L1673E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009130 .bustype = BUS_SPI,
9131 .manufacture_id = MACRONIX_ID,
9132 .model_id = MACRONIX_MX25L1605,
9133 .total_size = 2048,
9134 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009135 /* FEATURE_QIO: MX25L1673E */
9136 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009137 .tested = TEST_OK_PREW,
9138 .probe = probe_spi_rdid,
9139 .probe_timing = TIMING_ZERO,
9140 .block_erasers =
9141 {
9142 {
9143 .eraseblocks = { {4 * 1024, 512} },
9144 .block_erase = spi_block_erase_20,
9145 }, {
9146 .eraseblocks = { {64 * 1024, 32} },
9147 .block_erase = spi_block_erase_d8,
9148 }, {
9149 .eraseblocks = { {2 * 1024 * 1024, 1} },
9150 .block_erase = spi_block_erase_60,
9151 }, {
9152 .eraseblocks = { {2 * 1024 * 1024, 1} },
9153 .block_erase = spi_block_erase_c7,
9154 },
9155 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009156 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: Continuously Program (CP) mode, for 73E is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009157 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009158 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009159 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009160 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009161 .prepare_access = spi_prepare_io,
9162 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009163 },
9164
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009165 {
9166 .vendor = "Macronix",
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009167 .name = "MX25L1635D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009168 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009169 .manufacture_id = MACRONIX_ID,
9170 .model_id = MACRONIX_MX25L1635D,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009171 .total_size = 2048,
9172 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +00009173 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009174 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9175 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Angel Ponsc2054872021-01-15 18:57:32 +01009176 .tested = TEST_OK_PREW,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009177 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009178 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009179 .block_erasers =
9180 {
9181 {
9182 .eraseblocks = { {4 * 1024, 512} },
9183 .block_erase = spi_block_erase_20,
9184 }, {
9185 .eraseblocks = { {64 * 1024, 32} },
9186 .block_erase = spi_block_erase_d8,
9187 }, {
9188 .eraseblocks = { {2 * 1024 * 1024, 1} },
9189 .block_erase = spi_block_erase_60,
9190 }, {
9191 .eraseblocks = { {2 * 1024 * 1024, 1} },
9192 .block_erase = spi_block_erase_c7,
9193 }
9194 },
Nico Huber46552c82024-03-27 01:18:12 +01009195 .reg_bits =
9196 {
9197 .qe = {STATUS1, 6, RW},
9198 },
9199 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009200 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009201 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009202 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009203 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009204 .prepare_access = spi_prepare_io,
9205 .finish_access = spi_finish_io,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009206 },
Stephan Guillouxfd315502009-04-20 22:54:13 +00009207
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009208 {
9209 .vendor = "Macronix",
Stephan Guilloux3611b802010-09-13 19:59:28 +00009210 .name = "MX25L1635E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009211 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009212 .manufacture_id = MACRONIX_ID,
9213 .model_id = MACRONIX_MX25L1635E,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009214 .total_size = 2048,
9215 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +00009216 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009217 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9218 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009219 .tested = TEST_UNTESTED,
9220 .probe = probe_spi_rdid,
9221 .probe_timing = TIMING_ZERO,
9222 .block_erasers =
9223 {
9224 {
9225 .eraseblocks = { {4 * 1024, 512} },
9226 .block_erase = spi_block_erase_20,
9227 }, {
9228 .eraseblocks = { {64 * 1024, 32} },
9229 .block_erase = spi_block_erase_d8,
9230 }, {
9231 .eraseblocks = { {2 * 1024 * 1024, 1} },
9232 .block_erase = spi_block_erase_60,
9233 }, {
9234 .eraseblocks = { {2 * 1024 * 1024, 1} },
9235 .block_erase = spi_block_erase_c7,
9236 }
9237 },
Nico Huber46552c82024-03-27 01:18:12 +01009238 .reg_bits =
9239 {
9240 .qe = {STATUS1, 6, RW},
9241 },
9242 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009243 .unlock = spi_disable_blockprotect_bp3_srwd,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009244 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009245 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +00009246 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009247 .prepare_access = spi_prepare_io,
9248 .finish_access = spi_finish_io,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009249 },
9250
9251 {
9252 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009253 .name = "MX25L2005(C)/MX25L2006E",
9254 .bustype = BUS_SPI,
9255 .manufacture_id = MACRONIX_ID,
9256 .model_id = MACRONIX_MX25L2005,
9257 .total_size = 256,
9258 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009259 /* FEATURE_FAST_READ_DOUT: MX25L2006E */
9260 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009261 .tested = TEST_OK_PREW,
9262 .probe = probe_spi_rdid,
9263 .probe_timing = TIMING_ZERO,
9264 .block_erasers =
9265 {
9266 {
9267 .eraseblocks = { {4 * 1024, 64} },
9268 .block_erase = spi_block_erase_20,
9269 }, {
9270 .eraseblocks = { {64 * 1024, 4} },
9271 .block_erase = spi_block_erase_52,
9272 }, {
9273 .eraseblocks = { {64 * 1024, 4} },
9274 .block_erase = spi_block_erase_d8,
9275 }, {
9276 .eraseblocks = { {256 * 1024, 1} },
9277 .block_erase = spi_block_erase_60,
9278 }, {
9279 .eraseblocks = { {256 * 1024, 1} },
9280 .block_erase = spi_block_erase_c7,
9281 },
9282 },
9283 .printlock = spi_prettyprint_status_register_bp1_srwd,
9284 .unlock = spi_disable_blockprotect,
9285 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009286 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009287 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009288 .prepare_access = spi_prepare_io,
9289 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009290 },
9291
9292 {
9293 .vendor = "Macronix",
Alan Green03707302019-08-26 12:50:43 +10009294 .name = "MX25L25635F/MX25L25645G",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009295 .bustype = BUS_SPI,
9296 .manufacture_id = MACRONIX_ID,
9297 .model_id = MACRONIX_MX25L25635F,
9298 .total_size = 32768,
9299 .page_size = 256,
9300 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009301 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
9302 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
9303 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009304 .tested = TEST_OK_PREW,
9305 .probe = probe_spi_rdid,
9306 .probe_timing = TIMING_ZERO,
9307 .block_erasers =
9308 {
9309 {
9310 .eraseblocks = { {4 * 1024, 8192} },
9311 .block_erase = spi_block_erase_21,
9312 }, {
9313 .eraseblocks = { {4 * 1024, 8192} },
9314 .block_erase = spi_block_erase_20,
9315 }, {
9316 .eraseblocks = { {32 * 1024, 1024} },
9317 .block_erase = spi_block_erase_5c,
9318 }, {
9319 .eraseblocks = { {32 * 1024, 1024} },
9320 .block_erase = spi_block_erase_52,
9321 }, {
9322 .eraseblocks = { {64 * 1024, 512} },
9323 .block_erase = spi_block_erase_dc,
9324 }, {
9325 .eraseblocks = { {64 * 1024, 512} },
9326 .block_erase = spi_block_erase_d8,
9327 }, {
9328 .eraseblocks = { {32 * 1024 * 1024, 1} },
9329 .block_erase = spi_block_erase_60,
9330 }, {
9331 .eraseblocks = { {32 * 1024 * 1024, 1} },
9332 .block_erase = spi_block_erase_c7,
9333 }
9334 },
9335 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +01009336 .reg_bits = {
9337 .qe = {STATUS1, 6, RW},
9338 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
9339 },
9340 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009341 .unlock = spi_disable_blockprotect_bp3_srwd,
9342 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009343 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009344 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009345 .prepare_access = spi_prepare_io,
9346 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009347 },
9348
9349 {
9350 .vendor = "Macronix",
Stefan Tauner226037d2013-03-16 01:22:12 +00009351 .name = "MX25L3205(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009352 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009353 .manufacture_id = MACRONIX_ID,
9354 .model_id = MACRONIX_MX25L3205,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009355 .total_size = 4096,
9356 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009357 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
David Hendricks22e05322010-12-13 23:54:59 +00009358 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009359 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009360 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +00009361 .block_erasers =
9362 {
9363 {
Stefan Tauner226037d2013-03-16 01:22:12 +00009364 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +00009365 .block_erase = spi_block_erase_20,
9366 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +00009367 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +00009368 .block_erase = spi_block_erase_d8,
9369 }, {
9370 .eraseblocks = { {4 * 1024 * 1024, 1} },
9371 .block_erase = spi_block_erase_60,
9372 }, {
9373 .eraseblocks = { {4 * 1024 * 1024, 1} },
9374 .block_erase = spi_block_erase_c7,
9375 },
9376 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009377 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00009378 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009379 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009380 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009381 .voltage = {2700, 3600},
9382 },
9383
9384 {
9385 .vendor = "Macronix",
9386 .name = "MX25L3205D/MX25L3208D",
9387 .bustype = BUS_SPI,
9388 .manufacture_id = MACRONIX_ID,
9389 .model_id = MACRONIX_MX25L3205,
9390 .total_size = 4096,
9391 .page_size = 256,
9392 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009393 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009394 .tested = TEST_OK_PREW,
9395 .probe = probe_spi_rdid,
9396 .probe_timing = TIMING_ZERO,
9397 .block_erasers =
9398 {
9399 {
9400 .eraseblocks = { {4 * 1024, 1024} },
9401 .block_erase = spi_block_erase_20,
9402 }, {
9403 .eraseblocks = { {64 * 1024, 64} },
9404 .block_erase = spi_block_erase_d8,
9405 }, {
9406 .eraseblocks = { {4 * 1024 * 1024, 1} },
9407 .block_erase = spi_block_erase_60,
9408 }, {
9409 .eraseblocks = { {4 * 1024 * 1024, 1} },
9410 .block_erase = spi_block_erase_c7,
9411 },
9412 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009413 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009414 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009415 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009416 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009417 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009418 .prepare_access = spi_prepare_io,
9419 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009420 },
9421
9422 {
9423 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009424 .name = "MX25L3206E/MX25L3208E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009425 .bustype = BUS_SPI,
9426 .manufacture_id = MACRONIX_ID,
9427 .model_id = MACRONIX_MX25L3205,
9428 .total_size = 4096,
9429 .page_size = 256,
9430 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009431 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner226037d2013-03-16 01:22:12 +00009432 .tested = TEST_OK_PREW,
9433 .probe = probe_spi_rdid,
9434 .probe_timing = TIMING_ZERO,
9435 .block_erasers =
9436 {
9437 {
9438 .eraseblocks = { {4 * 1024, 1024} },
9439 .block_erase = spi_block_erase_20,
9440 }, {
9441 .eraseblocks = { {64 * 1024, 64} },
9442 .block_erase = spi_block_erase_d8,
9443 }, {
9444 .eraseblocks = { {64 * 1024, 64} },
9445 .block_erase = spi_block_erase_52,
9446 }, {
9447 .eraseblocks = { {4 * 1024 * 1024, 1} },
9448 .block_erase = spi_block_erase_60,
9449 }, {
9450 .eraseblocks = { {4 * 1024 * 1024, 1} },
9451 .block_erase = spi_block_erase_c7,
9452 },
9453 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009454 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009455 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009456 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009457 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009458 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009459 .prepare_access = spi_prepare_io,
9460 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009461 },
9462
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009463 {
9464 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009465 .name = "MX25L3235D",
9466 .bustype = BUS_SPI,
9467 .manufacture_id = MACRONIX_ID,
9468 .model_id = MACRONIX_MX25L3235D,
9469 .total_size = 4096,
9470 .page_size = 256,
9471 /* OTP: 256B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009472 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9473 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009474 .tested = TEST_UNTESTED,
9475 .probe = probe_spi_rdid,
9476 .probe_timing = TIMING_ZERO,
9477 .block_erasers =
9478 {
9479 {
9480 .eraseblocks = { {4 * 1024, 1024} },
9481 .block_erase = spi_block_erase_20,
9482 }, {
9483 .eraseblocks = { {64 * 1024, 64} },
9484 .block_erase = spi_block_erase_d8,
9485 }, {
9486 .eraseblocks = { {4 * 1024 * 1024, 1} },
9487 .block_erase = spi_block_erase_60,
9488 }, {
9489 .eraseblocks = { {4 * 1024 * 1024, 1} },
9490 .block_erase = spi_block_erase_c7,
9491 }
9492 },
Nico Huber46552c82024-03-27 01:18:12 +01009493 .reg_bits =
9494 {
9495 .qe = {STATUS1, 6, RW},
9496 },
9497 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009498 .unlock = spi_disable_blockprotect_bp3_srwd,
9499 .write = spi_chip_write_256,
9500 .read = spi_chip_read,
9501 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009502 .prepare_access = spi_prepare_io,
9503 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009504 },
9505
9506 {
9507 .vendor = "Macronix",
Nico Huberb6683e02021-04-21 13:04:29 +02009508 .name = "MX25L3233F/MX25L3273E",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009509 .bustype = BUS_SPI,
9510 .manufacture_id = MACRONIX_ID,
9511 .model_id = MACRONIX_MX25L3205,
9512 .total_size = 4096,
9513 .page_size = 256,
Nico Huber6e69e2b2021-04-21 13:03:13 +02009514 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009515 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Stefan Tauner23e10b82016-01-23 16:16:49 +00009516 .tested = TEST_OK_PREW,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009517 .probe = probe_spi_rdid,
9518 .probe_timing = TIMING_ZERO,
9519 .block_erasers =
9520 {
9521 {
9522 .eraseblocks = { {4 * 1024, 1024} },
9523 .block_erase = spi_block_erase_20,
9524 }, {
9525 .eraseblocks = { {32 * 1024, 128} },
9526 .block_erase = spi_block_erase_52,
9527 }, {
9528 .eraseblocks = { {64 * 1024, 64} },
9529 .block_erase = spi_block_erase_d8,
9530 }, {
9531 .eraseblocks = { {4 * 1024 * 1024, 1} },
9532 .block_erase = spi_block_erase_60,
9533 }, {
9534 .eraseblocks = { {4 * 1024 * 1024, 1} },
9535 .block_erase = spi_block_erase_c7,
9536 },
9537 },
Nico Huber46552c82024-03-27 01:18:12 +01009538 .reg_bits =
9539 {
9540 .qe = {STATUS1, 6, RW},
9541 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009542 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009543 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009544 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009545 .read = spi_chip_read,
Nico Huberb6683e02021-04-21 13:04:29 +02009546 .voltage = {2700, 3600}, /* 33F 2.65V..3.6V */
Nico Huber930d4212024-05-04 18:59:15 +02009547 .prepare_access = spi_prepare_io,
9548 .finish_access = spi_finish_io,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009549 },
9550
9551 {
9552 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009553 .name = "MX25L4005(A/C)/MX25L4006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009554 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009555 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009556 .model_id = MACRONIX_MX25L4005,
9557 .total_size = 512,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009558 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009559 /* FEATURE_FAST_READ_DOUT: MX25L4006E */
9560 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009561 .tested = TEST_OK_PREW,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009562 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009563 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009564 .block_erasers =
9565 {
9566 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009567 .eraseblocks = { {4 * 1024, 128} },
Sean Nelson54596372010-01-09 05:30:14 +00009568 .block_erase = spi_block_erase_20,
9569 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009570 .eraseblocks = { {64 * 1024, 8} },
9571 .block_erase = spi_block_erase_52,
9572 }, {
9573 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson54596372010-01-09 05:30:14 +00009574 .block_erase = spi_block_erase_d8,
9575 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009576 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009577 .block_erase = spi_block_erase_60,
9578 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009579 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009580 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009581 },
Sean Nelson54596372010-01-09 05:30:14 +00009582 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009583 .printlock = spi_prettyprint_status_register_bp2_srwd,
9584 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009585 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009586 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009587 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009588 .prepare_access = spi_prepare_io,
9589 .finish_access = spi_finish_io,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009590 },
9591
9592 {
9593 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009594 .name = "MX25L512(E)/MX25V512(C)",
9595 .bustype = BUS_SPI,
9596 .manufacture_id = MACRONIX_ID,
9597 .model_id = MACRONIX_MX25L512,
9598 .total_size = 64,
9599 .page_size = 256,
9600 /* MX25L512E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +01009601 /* FEATURE_FAST_READ_DOUT: MX25L512E */
9602 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009603 .tested = TEST_OK_PREW,
9604 .probe = probe_spi_rdid,
9605 .probe_timing = TIMING_ZERO,
9606 .block_erasers =
9607 {
9608 {
9609 .eraseblocks = { {4 * 1024, 16} },
9610 .block_erase = spi_block_erase_20,
9611 }, {
9612 .eraseblocks = { {64 * 1024, 1} },
9613 .block_erase = spi_block_erase_52,
9614 }, {
9615 .eraseblocks = { {64 * 1024, 1} },
9616 .block_erase = spi_block_erase_d8,
9617 }, {
9618 .eraseblocks = { {64 * 1024, 1} },
9619 .block_erase = spi_block_erase_60,
9620 }, {
9621 .eraseblocks = { {64 * 1024, 1} },
9622 .block_erase = spi_block_erase_c7,
9623 },
9624 },
9625 .printlock = spi_prettyprint_status_register_bp1_srwd,
9626 .unlock = spi_disable_blockprotect,
9627 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009628 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009629 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V512(C) */
9630 },
9631
9632 {
9633 .vendor = "Macronix",
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009634 .name = "MX25L5121E",
9635 .bustype = BUS_SPI,
9636 .manufacture_id = MACRONIX_ID,
9637 .model_id = MACRONIX_MX25L5121E,
9638 .total_size = 64,
9639 .page_size = 32,
Nico Huber46552c82024-03-27 01:18:12 +01009640 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009641 .tested = TEST_OK_PREW,
9642 .probe = probe_spi_rdid,
9643 .probe_timing = TIMING_ZERO,
9644 .block_erasers =
9645 {
9646 {
9647 .eraseblocks = { {4 * 1024, 16} },
9648 .block_erase = spi_block_erase_20,
9649 }, {
9650 .eraseblocks = { {64 * 1024, 1} },
9651 .block_erase = spi_block_erase_52,
9652 }, {
9653 .eraseblocks = { {64 * 1024, 1} },
9654 .block_erase = spi_block_erase_d8,
9655 }, {
9656 .eraseblocks = { {64 * 1024, 1} },
9657 .block_erase = spi_block_erase_60,
9658 }, {
9659 .eraseblocks = { {64 * 1024, 1} },
9660 .block_erase = spi_block_erase_c7,
9661 },
9662 },
9663 .printlock = spi_prettyprint_status_register_bp1_srwd,
9664 .unlock = spi_disable_blockprotect,
9665 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009666 .read = spi_chip_read,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009667 .voltage = {2700, 3600},
9668 },
9669
9670 {
9671 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009672 .name = "MX25L6405",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009673 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009674 .manufacture_id = MACRONIX_ID,
9675 .model_id = MACRONIX_MX25L6405,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009676 .total_size = 8192,
9677 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009678 /* Has an additional 512B EEPROM sector */
9679 .feature_bits = FEATURE_WRSR_WREN,
Paul Menzelac427b22012-02-16 21:07:07 +00009680 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009681 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009682 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009683 .block_erasers =
9684 {
9685 {
9686 .eraseblocks = { {64 * 1024, 128} },
9687 .block_erase = spi_block_erase_20,
9688 }, {
9689 .eraseblocks = { {64 * 1024, 128} },
9690 .block_erase = spi_block_erase_d8,
9691 }, {
9692 .eraseblocks = { {8 * 1024 * 1024, 1} },
9693 .block_erase = spi_block_erase_60,
9694 }, {
9695 .eraseblocks = { {8 * 1024 * 1024, 1} },
9696 .block_erase = spi_block_erase_c7,
9697 }
9698 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009699 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: error flag */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009700 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009701 .write = spi_chip_write_256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009702 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009703 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00009704 },
9705
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009706 {
9707 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009708 .name = "MX25L6405D",
Stefan Tauner226037d2013-03-16 01:22:12 +00009709 .bustype = BUS_SPI,
9710 .manufacture_id = MACRONIX_ID,
9711 .model_id = MACRONIX_MX25L6405,
9712 .total_size = 8192,
9713 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009714 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009715 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009716 .tested = TEST_OK_PREW,
9717 .probe = probe_spi_rdid,
9718 .probe_timing = TIMING_ZERO,
9719 .block_erasers =
9720 {
9721 {
9722 .eraseblocks = { {4 * 1024, 2048} },
9723 .block_erase = spi_block_erase_20,
9724 }, {
9725 .eraseblocks = { {64 * 1024, 128} },
9726 .block_erase = spi_block_erase_d8,
9727 }, {
9728 .eraseblocks = { {8 * 1024 * 1024, 1} },
9729 .block_erase = spi_block_erase_60,
9730 }, {
9731 .eraseblocks = { {8 * 1024 * 1024, 1} },
9732 .block_erase = spi_block_erase_c7,
9733 }
9734 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009735 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009736 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009737 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009738 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009739 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009740 .prepare_access = spi_prepare_io,
9741 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009742 },
9743
9744 {
9745 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009746 .name = "MX25L6406E/MX25L6408E",
9747 .bustype = BUS_SPI,
9748 .manufacture_id = MACRONIX_ID,
9749 .model_id = MACRONIX_MX25L6405,
9750 .total_size = 8192,
9751 .page_size = 256,
9752 /* MX25L6406E supports SFDP */
9753 /* OTP: 06E 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009754 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009755 .tested = TEST_OK_PREW,
9756 .probe = probe_spi_rdid,
9757 .probe_timing = TIMING_ZERO,
9758 .block_erasers =
9759 {
9760 {
9761 .eraseblocks = { {4 * 1024, 2048} },
9762 .block_erase = spi_block_erase_20,
9763 }, {
9764 .eraseblocks = { {64 * 1024, 128} },
9765 .block_erase = spi_block_erase_52,
9766 }, {
9767 .eraseblocks = { {64 * 1024, 128} },
9768 .block_erase = spi_block_erase_d8,
9769 }, {
9770 .eraseblocks = { {8 * 1024 * 1024, 1} },
9771 .block_erase = spi_block_erase_60,
9772 }, {
9773 .eraseblocks = { {8 * 1024 * 1024, 1} },
9774 .block_erase = spi_block_erase_c7,
9775 }
9776 },
9777 .printlock = spi_prettyprint_status_register_bp3_srwd,
9778 .unlock = spi_disable_blockprotect_bp3_srwd,
9779 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009780 .read = spi_chip_read,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009781 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009782 .prepare_access = spi_prepare_io,
9783 .finish_access = spi_finish_io,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009784 },
9785
9786 {
9787 .vendor = "Macronix",
Nico Huberb0072782017-12-06 21:02:57 +01009788 .name = "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F",
Stefan Tauner226037d2013-03-16 01:22:12 +00009789 .bustype = BUS_SPI,
9790 .manufacture_id = MACRONIX_ID,
9791 .model_id = MACRONIX_MX25L6405,
9792 .total_size = 8192,
9793 .page_size = 256,
9794 /* supports SFDP */
9795 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009796 /* FEATURE_QIO: MX25L6473E, MX25L6473F */
9797 /* FEATURE_FAST_READ_DOUT, _QOUT: MX25L6436E */
9798 /* FEATURE_FAST_READ_DIO, _QIO: MX25L6445E, MX25L6465E */
9799 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +00009800 .tested = TEST_OK_PREW,
9801 .probe = probe_spi_rdid,
9802 .probe_timing = TIMING_ZERO,
9803 .block_erasers =
9804 {
9805 {
9806 .eraseblocks = { {4 * 1024, 2048} },
9807 .block_erase = spi_block_erase_20,
9808 }, {
9809 .eraseblocks = { {32 * 1024, 256} },
9810 .block_erase = spi_block_erase_52,
9811 }, {
9812 .eraseblocks = { {64 * 1024, 128} },
9813 .block_erase = spi_block_erase_d8,
9814 }, {
9815 .eraseblocks = { {8 * 1024 * 1024, 1} },
9816 .block_erase = spi_block_erase_60,
9817 }, {
9818 .eraseblocks = { {8 * 1024 * 1024, 1} },
9819 .block_erase = spi_block_erase_c7,
9820 }
9821 },
Nico Huber46552c82024-03-27 01:18:12 +01009822 .reg_bits =
9823 {
9824 .qe = {STATUS1, 6, RW},
9825 },
9826 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009827 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009828 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009829 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009830 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009831 .prepare_access = spi_prepare_io,
9832 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009833 },
9834
9835 {
9836 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009837 .name = "MX25L6495F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009838 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009839 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009840 .model_id = MACRONIX_MX25L6495F,
9841 .total_size = 8192,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +00009842 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009843 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Stefan Tauner226037d2013-03-16 01:22:12 +00009844 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner0554ca52013-07-25 22:54:25 +00009845 .tested = TEST_OK_PREW,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +00009846 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009847 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009848 .block_erasers =
9849 {
9850 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009851 .eraseblocks = { {4 * 1024, 2048} },
Sean Nelson54596372010-01-09 05:30:14 +00009852 .block_erase = spi_block_erase_20,
9853 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009854 .eraseblocks = { {32 * 1024, 256} },
9855 .block_erase = spi_block_erase_52,
9856 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05309857 .eraseblocks = { {64 * 1024, 128} },
9858 .block_erase = spi_block_erase_d8,
9859 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009860 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009861 .block_erase = spi_block_erase_60,
9862 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009863 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009864 .block_erase = spi_block_erase_c7,
9865 }
9866 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009867 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009868 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009869 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009870 .voltage = {2700, 3600},
9871 },
9872
9873 {
9874 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009875 .name = "MX25L8005/MX25L8006E/MX25L8008E/MX25V8005",
Stefan Tauner5c316f92015-02-08 21:57:52 +00009876 .bustype = BUS_SPI,
9877 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009878 .model_id = MACRONIX_MX25L8005,
9879 .total_size = 1024,
9880 .page_size = 256,
9881 /* MX25L8006E, MX25L8008E support SFDP */
9882 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L8006E, MX25L8008E only) */
Nico Huber46552c82024-03-27 01:18:12 +01009883 /* FEATURE_FAST_READ_DOUT: MX25L8006E, MX25L8008E */
9884 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009885 .tested = TEST_OK_PREW,
9886 .probe = probe_spi_rdid,
9887 .probe_timing = TIMING_ZERO,
9888 .block_erasers =
9889 {
9890 {
9891 .eraseblocks = { {4 * 1024, 256} },
9892 .block_erase = spi_block_erase_20,
9893 }, {
9894 .eraseblocks = { {64 * 1024, 16} },
9895 .block_erase = spi_block_erase_52,
9896 }, {
9897 .eraseblocks = { {64 * 1024, 16} },
9898 .block_erase = spi_block_erase_d8,
9899 }, {
9900 .eraseblocks = { {1024 * 1024, 1} },
9901 .block_erase = spi_block_erase_60,
9902 }, {
9903 .eraseblocks = { {1024 * 1024, 1} },
9904 .block_erase = spi_block_erase_c7,
9905 },
9906 },
9907 .printlock = spi_prettyprint_status_register_bp2_srwd,
9908 .unlock = spi_disable_blockprotect,
9909 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009910 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009911 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V8005 */
9912 },
9913
9914 {
9915 .vendor = "Macronix",
sibradzicf62623c2020-03-14 17:21:34 +09009916 .name = "MX25R3235F",
9917 .bustype = BUS_SPI,
9918 .manufacture_id = MACRONIX_ID,
9919 .model_id = MACRONIX_MX25R3235F,
9920 .total_size = 4096,
9921 .page_size = 256,
9922 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +01009923 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
sibradzicf62623c2020-03-14 17:21:34 +09009924 .tested = TEST_OK_PREW,
9925 .probe = probe_spi_rdid,
9926 .probe_timing = TIMING_ZERO,
9927 .block_erasers =
9928 {
9929 {
9930 .eraseblocks = { {4 * 1024, 1024} },
9931 .block_erase = spi_block_erase_20,
9932 }, {
sibradzicf62623c2020-03-14 17:21:34 +09009933 .eraseblocks = { {32 * 1024, 128} },
9934 .block_erase = spi_block_erase_52,
9935 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05309936 .eraseblocks = { {64 * 1024, 64} },
9937 .block_erase = spi_block_erase_d8,
9938 }, {
sibradzicf62623c2020-03-14 17:21:34 +09009939 .eraseblocks = { {4 * 1024 * 1024, 1} },
9940 .block_erase = spi_block_erase_60,
9941 }, {
9942 .eraseblocks = { {4 * 1024 * 1024, 1} },
9943 .block_erase = spi_block_erase_c7,
9944 }
9945 },
Nico Huber5f509992024-03-27 01:18:12 +01009946 .reg_bits =
9947 {
9948 .qe = {STATUS1, 6, RW},
9949 },
9950 .printlock = spi_prettyprint_status_register_bp3_srwd,
sibradzicf62623c2020-03-14 17:21:34 +09009951 .unlock = spi_disable_blockprotect_bp3_srwd,
9952 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +01009953 .read = spi_chip_read,
sibradzicf62623c2020-03-14 17:21:34 +09009954 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009955 .prepare_access = spi_prepare_io,
9956 .finish_access = spi_finish_io,
sibradzicf62623c2020-03-14 17:21:34 +09009957 },
9958
9959 {
9960 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009961 .name = "MX25R6435F",
9962 .bustype = BUS_SPI,
9963 .manufacture_id = MACRONIX_ID,
9964 .model_id = MACRONIX_MX25R6435F,
9965 .total_size = 8192,
9966 .page_size = 256,
9967 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +01009968 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009969 .tested = TEST_OK_PREW,
9970 .probe = probe_spi_rdid,
9971 .probe_timing = TIMING_ZERO,
9972 .block_erasers =
9973 {
9974 {
9975 .eraseblocks = { {4 * 1024, 2048} },
9976 .block_erase = spi_block_erase_20,
9977 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009978 .eraseblocks = { {32 * 1024, 256} },
9979 .block_erase = spi_block_erase_52,
9980 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05309981 .eraseblocks = { {64 * 1024, 128} },
9982 .block_erase = spi_block_erase_d8,
9983 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009984 .eraseblocks = { {8 * 1024 * 1024, 1} },
9985 .block_erase = spi_block_erase_60,
9986 }, {
9987 .eraseblocks = { {8 * 1024 * 1024, 1} },
9988 .block_erase = spi_block_erase_c7,
9989 }
9990 },
Nico Huber5f509992024-03-27 01:18:12 +01009991 .reg_bits =
9992 {
9993 .qe = {STATUS1, 6, RW},
9994 },
9995 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009996 .unlock = spi_disable_blockprotect_bp3_srwd,
9997 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +01009998 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009999 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010000 .prepare_access = spi_prepare_io,
10001 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010002 },
10003
10004 {
10005 .vendor = "Macronix",
10006 .name = "MX25U12835F",
10007 .bustype = BUS_SPI,
10008 .manufacture_id = MACRONIX_ID,
10009 .model_id = MACRONIX_MX25U12835E,
Stefan Tauner5c316f92015-02-08 21:57:52 +000010010 .total_size = 16384,
10011 .page_size = 256,
10012 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010013 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_35,
10014 .dummy_cycles =
10015 {
10016 /* 133MHz version has configuration register
10017 bit to toggle 8 dummy cycles for QIO, defaults: */
10018 .qpi_fast_read = 4,
10019 .qpi_fast_read_qio = 6,
10020 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000010021 .tested = TEST_OK_PREW,
10022 .probe = probe_spi_rdid,
10023 .probe_timing = TIMING_ZERO,
10024 .block_erasers =
10025 {
10026 {
10027 .eraseblocks = { {4 * 1024, 4096} },
10028 .block_erase = spi_block_erase_20,
10029 }, {
10030 .eraseblocks = { {32 * 1024, 512} },
10031 .block_erase = spi_block_erase_52,
10032 }, {
10033 .eraseblocks = { {64 * 1024, 256} },
10034 .block_erase = spi_block_erase_d8,
10035 }, {
10036 .eraseblocks = { {16 * 1024 * 1024, 1} },
10037 .block_erase = spi_block_erase_60,
10038 }, {
10039 .eraseblocks = { {16 * 1024 * 1024, 1} },
10040 .block_erase = spi_block_erase_c7,
10041 }
10042 },
Angel Ponsf112e242018-09-30 20:14:17 +020010043 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010044 .reg_bits =
10045 {
10046 .qe = {STATUS1, 6, RW},
10047 },
10048 .printlock = spi_prettyprint_status_register_bp3_srwd,
Angel Ponsf112e242018-09-30 20:14:17 +020010049 .unlock = spi_disable_blockprotect_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010050 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010051 .read = spi_chip_read,
Angel Ponsf112e242018-09-30 20:14:17 +020010052 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010053 .prepare_access = spi_prepare_io,
10054 .finish_access = spi_finish_io,
Angel Ponsf112e242018-09-30 20:14:17 +020010055 },
10056
10057 {
10058 .vendor = "Macronix",
Vincent Palatinf800f552013-03-15 02:03:16 +000010059 .name = "MX25U1635E",
10060 .bustype = BUS_SPI,
10061 .manufacture_id = MACRONIX_ID,
10062 .model_id = MACRONIX_MX25U1635E,
10063 .total_size = 2048,
10064 .page_size = 256,
10065 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010066 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10067 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10068 .dummy_cycles =
10069 {
10070 .qpi_fast_read = 4,
10071 .qpi_fast_read_qio = 6,
10072 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000010073 .tested = TEST_OK_PR,
Vincent Palatinf800f552013-03-15 02:03:16 +000010074 .probe = probe_spi_rdid,
10075 .probe_timing = TIMING_ZERO,
10076 .block_erasers =
10077 {
10078 {
10079 .eraseblocks = { {4 * 1024, 512} },
10080 .block_erase = spi_block_erase_20,
10081 }, {
10082 .eraseblocks = { {32 * 1024, 64} },
10083 .block_erase = spi_block_erase_52,
10084 }, {
10085 .eraseblocks = { {64 * 1024, 32} },
10086 .block_erase = spi_block_erase_d8,
10087 }, {
10088 .eraseblocks = { {2 * 1024 * 1024, 1} },
10089 .block_erase = spi_block_erase_60,
10090 }, {
10091 .eraseblocks = { {2 * 1024 * 1024, 1} },
10092 .block_erase = spi_block_erase_c7,
10093 }
10094 },
10095 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010096 .reg_bits =
10097 {
10098 .qe = {STATUS1, 6, RW},
10099 },
10100 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000010101 .unlock = spi_disable_blockprotect_bp3_srwd,
Vincent Palatinf800f552013-03-15 02:03:16 +000010102 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010103 .read = spi_chip_read,
Vincent Palatinf800f552013-03-15 02:03:16 +000010104 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010105 .prepare_access = spi_prepare_io,
10106 .finish_access = spi_finish_io,
Vincent Palatinf800f552013-03-15 02:03:16 +000010107 },
10108
10109 {
10110 .vendor = "Macronix",
David Tomaschikf75d8c52019-06-20 09:49:01 -070010111 .name = "MX25U25635F",
10112 .bustype = BUS_SPI,
10113 .manufacture_id = MACRONIX_ID,
10114 .model_id = MACRONIX_MX25U25635F,
10115 .total_size = 32768,
10116 .page_size = 256,
10117 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010118 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
10119 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
10120 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Nikolai Artemiev148254b2021-03-23 17:21:10 +110010121 .tested = TEST_OK_PREW,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010122 .probe = probe_spi_rdid,
10123 .probe_timing = TIMING_ZERO,
10124 .block_erasers =
10125 {
10126 {
10127 .eraseblocks = { {4 * 1024, 8192} },
10128 .block_erase = spi_block_erase_21,
10129 }, {
10130 .eraseblocks = { {4 * 1024, 8192} },
10131 .block_erase = spi_block_erase_20,
10132 }, {
10133 .eraseblocks = { {32 * 1024, 1024} },
10134 .block_erase = spi_block_erase_5c,
10135 }, {
10136 .eraseblocks = { {32 * 1024, 1024} },
10137 .block_erase = spi_block_erase_52,
10138 }, {
10139 .eraseblocks = { {64 * 1024, 512} },
10140 .block_erase = spi_block_erase_dc,
10141 }, {
10142 .eraseblocks = { {64 * 1024, 512} },
10143 .block_erase = spi_block_erase_d8,
10144 }, {
10145 .eraseblocks = { {32 * 1024 * 1024, 1} },
10146 .block_erase = spi_block_erase_60,
10147 }, {
10148 .eraseblocks = { {32 * 1024 * 1024, 1} },
10149 .block_erase = spi_block_erase_c7,
10150 }
10151 },
10152 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010010153 .reg_bits =
10154 {
Nico Huber4fa39c52024-03-27 01:18:12 +010010155 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010010156 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
10157 },
Nico Huber4fa39c52024-03-27 01:18:12 +010010158 .printlock = spi_prettyprint_status_register_bp3_srwd,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010159 .unlock = spi_disable_blockprotect_bp3_srwd,
10160 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010161 .read = spi_chip_read,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010162 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010163 .prepare_access = spi_prepare_io,
10164 .finish_access = spi_finish_io,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010165 },
10166
10167 {
10168 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010169 .name = "MX25U3235E/F",
10170 .bustype = BUS_SPI,
10171 .manufacture_id = MACRONIX_ID,
10172 .model_id = MACRONIX_MX25U3235E,
10173 .total_size = 4096,
10174 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010175 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100010176 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010177 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10178 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10179 .dummy_cycles =
10180 {
10181 .qpi_fast_read = 4,
10182 .qpi_fast_read_qio = 6,
10183 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010184 .tested = TEST_OK_PREW,
10185 .probe = probe_spi_rdid,
10186 .probe_timing = TIMING_ZERO,
10187 .block_erasers =
10188 {
10189 {
10190 .eraseblocks = { {4 * 1024, 1024} },
10191 .block_erase = spi_block_erase_20,
10192 }, {
10193 .eraseblocks = { {32 * 1024, 128} },
10194 .block_erase = spi_block_erase_52,
10195 }, {
10196 .eraseblocks = { {64 * 1024, 64} },
10197 .block_erase = spi_block_erase_d8,
10198 }, {
10199 .eraseblocks = { {4 * 1024 * 1024, 1} },
10200 .block_erase = spi_block_erase_60,
10201 }, {
10202 .eraseblocks = { {4 * 1024 * 1024, 1} },
10203 .block_erase = spi_block_erase_c7,
10204 }
10205 },
10206 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010207 .reg_bits =
10208 {
10209 .qe = {STATUS1, 6, RW},
10210 },
10211 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010212 .unlock = spi_disable_blockprotect_bp3_srwd,
10213 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010214 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010215 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010216 .prepare_access = spi_prepare_io,
10217 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010218 },
10219
10220 {
10221 .vendor = "Macronix",
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010222 .name = "MX25U51245G",
10223 .bustype = BUS_SPI,
10224 .manufacture_id = MACRONIX_ID,
10225 .model_id = MACRONIX_MX25U51245G,
10226 .total_size = 65536,
10227 .page_size = 256,
10228 /* OTP: 512B factory programmed and 512B customer programmed; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010229 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
10230 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
10231 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010232 .tested = TEST_OK_PREW,
10233 .probe = probe_spi_rdid,
10234 .probe_timing = TIMING_ZERO,
10235 .block_erasers =
10236 {
10237 {
10238 .eraseblocks = { {4 * 1024, 16384} },
10239 .block_erase = spi_block_erase_21,
10240 }, {
10241 .eraseblocks = { {4 * 1024, 16384} },
10242 .block_erase = spi_block_erase_20,
10243 }, {
10244 .eraseblocks = { {32 * 1024, 2048} },
10245 .block_erase = spi_block_erase_5c,
10246 }, {
10247 .eraseblocks = { {32 * 1024, 2048} },
10248 .block_erase = spi_block_erase_52,
10249 }, {
10250 .eraseblocks = { {64 * 1024, 1024} },
10251 .block_erase = spi_block_erase_dc,
10252 }, {
10253 .eraseblocks = { {64 * 1024, 1024} },
10254 .block_erase = spi_block_erase_d8,
10255 }, {
10256 .eraseblocks = { {64 * 1024 * 1024, 1} },
10257 .block_erase = spi_block_erase_60,
10258 }, {
10259 .eraseblocks = { {64 * 1024 * 1024, 1} },
10260 .block_erase = spi_block_erase_c7,
10261 }
10262 },
10263 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010010264 .reg_bits =
10265 {
Nico Huber4fa39c52024-03-27 01:18:12 +010010266 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010010267 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
10268 },
Nico Huber4fa39c52024-03-27 01:18:12 +010010269 .printlock = spi_prettyprint_status_register_bp3_srwd,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010270 .unlock = spi_disable_blockprotect_bp3_srwd,
10271 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010272 .read = spi_chip_read,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010273 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010274 .prepare_access = spi_prepare_io,
10275 .finish_access = spi_finish_io,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010276 },
10277
10278 {
10279 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010280 .name = "MX25U6435E/F",
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010281 .bustype = BUS_SPI,
10282 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010283 .model_id = MACRONIX_MX25U6435E,
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010284 .total_size = 8192,
10285 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010286 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100010287 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010288 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10289 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10290 .dummy_cycles =
10291 {
10292 .qpi_fast_read = 4,
10293 .qpi_fast_read_qio = 6,
10294 },
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010295 .tested = TEST_OK_PREW,
10296 .probe = probe_spi_rdid,
10297 .probe_timing = TIMING_ZERO,
10298 .block_erasers =
10299 {
10300 {
10301 .eraseblocks = { {4 * 1024, 2048} },
10302 .block_erase = spi_block_erase_20,
10303 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010304 .eraseblocks = { {32 * 1024, 256} },
10305 .block_erase = spi_block_erase_52,
10306 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010307 .eraseblocks = { {64 * 1024, 128} },
10308 .block_erase = spi_block_erase_d8,
10309 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010310 .eraseblocks = { {8 * 1024 * 1024, 1} },
10311 .block_erase = spi_block_erase_60,
10312 }, {
10313 .eraseblocks = { {8 * 1024 * 1024, 1} },
10314 .block_erase = spi_block_erase_c7,
10315 }
10316 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010317 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010318 .reg_bits =
10319 {
10320 .qe = {STATUS1, 6, RW},
10321 },
10322 .printlock = spi_prettyprint_status_register_bp3_srwd,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010010323 .unlock = spi_disable_blockprotect_bp3_srwd,
10324 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010325 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010326 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010327 .prepare_access = spi_prepare_io,
10328 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010329 },
10330
10331 {
10332 .vendor = "Macronix",
10333 .name = "MX25U8032E",
10334 .bustype = BUS_SPI,
10335 .manufacture_id = MACRONIX_ID,
10336 .model_id = MACRONIX_MX25U8032E,
10337 .total_size = 1024,
10338 .page_size = 256,
10339 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber4fa39c52024-03-27 01:18:12 +010010340 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
10341 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010342 .tested = TEST_OK_PREW,
10343 .probe = probe_spi_rdid,
10344 .probe_timing = TIMING_ZERO,
10345 .block_erasers =
10346 {
10347 {
10348 .eraseblocks = { {4 * 1024, 256} },
10349 .block_erase = spi_block_erase_20,
10350 }, {
10351 .eraseblocks = { {32 * 1024, 32} },
10352 .block_erase = spi_block_erase_52,
10353 }, {
10354 .eraseblocks = { {64 * 1024, 16} },
10355 .block_erase = spi_block_erase_d8,
10356 }, {
10357 .eraseblocks = { {1024 * 1024, 1} },
10358 .block_erase = spi_block_erase_60,
10359 }, {
10360 .eraseblocks = { {1024 * 1024, 1} },
10361 .block_erase = spi_block_erase_c7,
10362 }
10363 },
10364 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010365 .reg_bits =
10366 {
10367 .qe = {STATUS1, 6, RW},
10368 },
10369 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010370 .unlock = spi_disable_blockprotect_bp3_srwd,
10371 .write = spi_chip_write_256,
Nico Huber4fa39c52024-03-27 01:18:12 +010010372 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010373 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010374 .prepare_access = spi_prepare_io,
10375 .finish_access = spi_finish_io,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010010376 },
10377
10378 {
10379 .vendor = "Macronix",
Mark Panajotovic502a9132009-08-24 01:42:24 +000010380 .name = "MX29F001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010381 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010382 .manufacture_id = MACRONIX_ID,
10383 .model_id = MACRONIX_MX29F001B,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010384 .total_size = 128,
10385 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010386 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10387 .tested = TEST_UNTESTED,
10388 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010389 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010390 .block_erasers =
10391 {
10392 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000010393 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000010394 {8 * 1024, 1},
10395 {4 * 1024, 2},
10396 {8 * 1024, 2},
10397 {32 * 1024, 1},
10398 {64 * 1024, 1},
10399 },
Sean Nelson35727f72010-01-28 23:55:12 +000010400 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010401 }, {
10402 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010403 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010404 }
10405 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010406 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010407 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010408 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010409 .prepare_access = prepare_memory_access,
10410 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010411 },
10412
10413 {
10414 .vendor = "Macronix",
10415 .name = "MX29F001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010416 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010417 .manufacture_id = MACRONIX_ID,
10418 .model_id = MACRONIX_MX29F001T,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010419 .total_size = 128,
10420 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010421 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stefan Tauner74c6ec62011-05-18 01:31:46 +000010422 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000010423 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010424 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010425 .block_erasers =
10426 {
10427 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000010428 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000010429 {64 * 1024, 1},
10430 {32 * 1024, 1},
10431 {8 * 1024, 2},
10432 {4 * 1024, 2},
10433 {8 * 1024, 1},
10434 },
Sean Nelson35727f72010-01-28 23:55:12 +000010435 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010436 }, {
10437 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010438 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010439 }
10440 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010441 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010442 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010443 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010444 .prepare_access = prepare_memory_access,
10445 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010446 },
10447
10448 {
10449 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000010450 .name = "MX29F002(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010451 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010452 .manufacture_id = MACRONIX_ID,
10453 .model_id = MACRONIX_MX29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010454 .total_size = 256,
10455 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010456 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010457 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000010458 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010459 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010460 .block_erasers =
10461 {
10462 {
10463 .eraseblocks = {
10464 {16 * 1024, 1},
10465 {8 * 1024, 2},
10466 {32 * 1024, 1},
10467 {64 * 1024, 3},
10468 },
Sean Nelson35727f72010-01-28 23:55:12 +000010469 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010470 }, {
10471 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010472 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010473 },
10474 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010475 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010476 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010477 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010478 .prepare_access = prepare_memory_access,
10479 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000010480 },
10481
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010482 {
10483 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000010484 .name = "MX29F002(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010485 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010486 .manufacture_id = MACRONIX_ID,
10487 .model_id = MACRONIX_MX29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010488 .total_size = 256,
10489 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010490 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000010491 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000010492 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010493 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010494 .block_erasers =
10495 {
10496 {
10497 .eraseblocks = {
10498 {64 * 1024, 3},
10499 {32 * 1024, 1},
10500 {8 * 1024, 2},
10501 {16 * 1024, 1},
10502 },
Sean Nelson35727f72010-01-28 23:55:12 +000010503 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010504 }, {
10505 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010506 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010507 },
10508 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010509 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010510 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010511 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010512 .prepare_access = prepare_memory_access,
10513 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000010514 },
10515
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010516 {
10517 .vendor = "Macronix",
Daniele Forsi6a18a932014-07-13 14:53:45 +000010518 .name = "MX29F022(N)B",
10519 .bustype = BUS_PARALLEL,
10520 .manufacture_id = MACRONIX_ID,
10521 .model_id = MACRONIX_MX29F022B,
10522 .total_size = 256,
10523 .page_size = 0, /* unused */
10524 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10525 .tested = TEST_UNTESTED,
10526 .probe = probe_jedec,
10527 .probe_timing = TIMING_ZERO,
10528 .block_erasers =
10529 {
10530 {
10531 .eraseblocks = {
10532 {16 * 1024, 1},
10533 {8 * 1024, 2},
10534 {32 * 1024, 1},
10535 {64 * 1024, 3},
10536 },
10537 .block_erase = erase_sector_jedec,
10538 }, {
10539 .eraseblocks = { {256 * 1024, 1} },
10540 .block_erase = erase_chip_block_jedec,
10541 }
10542 },
10543 .write = write_jedec_1,
10544 .read = read_memmapped,
10545 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010546 .prepare_access = prepare_memory_access,
10547 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000010548 },
10549
10550 {
10551 .vendor = "Macronix",
10552 .name = "MX29F022(N)T",
10553 .bustype = BUS_PARALLEL,
10554 .manufacture_id = MACRONIX_ID,
10555 .model_id = MACRONIX_MX29F022T,
10556 .total_size = 256,
10557 .page_size = 0, /* unused */
10558 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10559 .tested = TEST_OK_PREW,
10560 .probe = probe_jedec,
10561 .probe_timing = TIMING_ZERO,
10562 .block_erasers =
10563 {
10564 {
10565 .eraseblocks = {
10566 {64 * 1024, 3},
10567 {32 * 1024, 1},
10568 {8 * 1024, 2},
10569 {16 * 1024, 1},
10570 },
10571 .block_erase = erase_sector_jedec,
10572 }, {
10573 .eraseblocks = { {256 * 1024, 1} },
10574 .block_erase = erase_chip_block_jedec,
10575 }
10576 },
10577 .write = write_jedec_1,
10578 .read = read_memmapped,
10579 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010580 .prepare_access = prepare_memory_access,
10581 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000010582 },
10583
10584 {
10585 .vendor = "Macronix",
Joshua Roysf1324e02010-09-16 00:51:51 +000010586 .name = "MX29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010587 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +000010588 .manufacture_id = MACRONIX_ID,
10589 .model_id = MACRONIX_MX29F040,
10590 .total_size = 512,
10591 .page_size = 64 * 1024,
10592 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10593 .tested = TEST_UNTESTED,
10594 .probe = probe_jedec,
10595 .probe_timing = TIMING_ZERO,
10596 .block_erasers =
10597 {
10598 {
10599 .eraseblocks = { {64 * 1024, 8} },
10600 .block_erase = erase_sector_jedec,
10601 }, {
10602 .eraseblocks = { {512 * 1024, 1} },
10603 .block_erase = erase_chip_block_jedec,
10604 },
10605 },
10606 .write = write_jedec_1,
10607 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000010608 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010609 .prepare_access = prepare_memory_access,
10610 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +000010611 },
10612
10613 {
10614 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010615 .name = "MX29GL128F",
10616 .bustype = BUS_PARALLEL,
10617 .manufacture_id = MACRONIX_ID,
10618 .model_id = MACRONIX_MX29GL128F,
10619 .total_size = 16384,
10620 .page_size = 128 * 1024, /* actual page size is 16 */
10621 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10622 .tested = TEST_UNTESTED,
10623 .probe = probe_jedec_29gl,
10624 .probe_timing = TIMING_ZERO,
10625 .block_erasers =
10626 {
10627 {
10628 .eraseblocks = { {128 * 1024, 128} },
10629 .block_erase = erase_sector_jedec,
10630 }, {
10631 .eraseblocks = { {16 * 1024 * 1024, 1} },
10632 .block_erase = erase_chip_block_jedec,
10633 },
10634 },
10635 .write = write_jedec_1,
10636 .read = read_memmapped,
10637 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010638 .prepare_access = prepare_memory_access,
10639 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010640 },
10641
10642 {
10643 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010644 .name = "MX29GL320EB",
10645 .bustype = BUS_PARALLEL,
10646 .manufacture_id = MACRONIX_ID,
10647 .model_id = MACRONIX_MX29GL320EB,
10648 .total_size = 4096,
10649 .page_size = 128 * 1024, /* actual page size is 16 */
10650 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10651 .tested = TEST_UNTESTED,
10652 .probe = probe_jedec_29gl,
10653 .probe_timing = TIMING_ZERO,
10654 .block_erasers =
10655 {
10656 {
10657 .eraseblocks = {
10658 {8 * 1024, 8},
10659 {64 * 1024, 63},
10660 },
10661 .block_erase = erase_sector_jedec,
10662 }, {
10663 .eraseblocks = { {4 * 1024 * 1024, 1} },
10664 .block_erase = erase_chip_block_jedec,
10665 },
10666 },
10667 .write = write_jedec_1,
10668 .read = read_memmapped,
10669 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010670 .prepare_access = prepare_memory_access,
10671 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010672 },
10673
10674 {
10675 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010676 .name = "MX29GL320EH/L",
10677 .bustype = BUS_PARALLEL,
10678 .manufacture_id = MACRONIX_ID,
10679 .model_id = MACRONIX_MX29GL320EHL,
10680 .total_size = 4096,
10681 .page_size = 128 * 1024, /* actual page size is 16 */
10682 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10683 .tested = TEST_UNTESTED,
10684 .probe = probe_jedec_29gl,
10685 .probe_timing = TIMING_ZERO,
10686 .block_erasers =
10687 {
10688 {
10689 .eraseblocks = { {64 * 1024, 64} },
10690 .block_erase = erase_sector_jedec,
10691 }, {
10692 .eraseblocks = { {4 * 1024 * 1024, 1} },
10693 .block_erase = erase_chip_block_jedec,
10694 },
10695 },
10696 .write = write_jedec_1,
10697 .read = read_memmapped,
10698 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010699 .prepare_access = prepare_memory_access,
10700 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010701 },
10702
10703 {
10704 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010705 .name = "MX29GL320ET",
10706 .bustype = BUS_PARALLEL,
10707 .manufacture_id = MACRONIX_ID,
10708 .model_id = MACRONIX_MX29GL320ET,
10709 .total_size = 4096,
10710 .page_size = 128 * 1024, /* actual page size is 16 */
10711 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10712 .tested = TEST_UNTESTED,
10713 .probe = probe_jedec_29gl,
10714 .probe_timing = TIMING_ZERO,
10715 .block_erasers =
10716 {
10717 {
10718 .eraseblocks = {
10719 {64 * 1024, 63},
10720 {8 * 1024, 8},
10721 },
10722 .block_erase = erase_sector_jedec,
10723 }, {
10724 .eraseblocks = { {4 * 1024 * 1024, 1} },
10725 .block_erase = erase_chip_block_jedec,
10726 },
10727 },
10728 .write = write_jedec_1,
10729 .read = read_memmapped,
10730 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010731 .prepare_access = prepare_memory_access,
10732 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010733 },
10734
10735 {
10736 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010737 .name = "MX29GL640EB",
10738 .bustype = BUS_PARALLEL,
10739 .manufacture_id = MACRONIX_ID,
10740 .model_id = MACRONIX_MX29GL640EB,
10741 .total_size = 8192,
10742 .page_size = 128 * 1024, /* actual page size is 16 */
10743 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10744 .tested = TEST_UNTESTED,
10745 .probe = probe_jedec_29gl,
10746 .probe_timing = TIMING_ZERO,
10747 .block_erasers =
10748 {
10749 {
10750 .eraseblocks = {
10751 {8 * 1024, 8},
10752 {64 * 1024, 127},
10753 },
10754 .block_erase = erase_sector_jedec,
10755 }, {
10756 .eraseblocks = { {8 * 1024 * 1024, 1} },
10757 .block_erase = erase_chip_block_jedec,
10758 },
10759 },
10760 .write = write_jedec_1,
10761 .read = read_memmapped,
10762 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010763 .prepare_access = prepare_memory_access,
10764 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010765 },
10766
10767 {
10768 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010769 .name = "MX29GL640EH/L",
10770 .bustype = BUS_PARALLEL,
10771 .manufacture_id = MACRONIX_ID,
10772 .model_id = MACRONIX_MX29GL640EHL,
10773 .total_size = 8192,
10774 .page_size = 128 * 1024, /* actual page size is 16 */
10775 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10776 .tested = TEST_UNTESTED,
10777 .probe = probe_jedec_29gl,
10778 .probe_timing = TIMING_ZERO,
10779 .block_erasers =
10780 {
10781 {
10782 .eraseblocks = { {64 * 1024, 128} },
10783 .block_erase = erase_sector_jedec,
10784 }, {
10785 .eraseblocks = { {8 * 1024 * 1024, 1} },
10786 .block_erase = erase_chip_block_jedec,
10787 },
10788 },
10789 .write = write_jedec_1,
10790 .read = read_memmapped,
10791 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010792 .prepare_access = prepare_memory_access,
10793 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010794 },
10795
10796 {
10797 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010798 .name = "MX29GL640ET",
10799 .bustype = BUS_PARALLEL,
10800 .manufacture_id = MACRONIX_ID,
10801 .model_id = MACRONIX_MX29GL640ET,
10802 .total_size = 8192,
10803 .page_size = 128 * 1024, /* actual page size is 16 */
10804 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10805 .tested = TEST_UNTESTED,
10806 .probe = probe_jedec_29gl,
10807 .probe_timing = TIMING_ZERO,
10808 .block_erasers =
10809 {
10810 {
10811 .eraseblocks = {
10812 {64 * 1024, 127},
10813 {8 * 1024, 8},
10814 },
10815 .block_erase = erase_sector_jedec,
10816 }, {
10817 .eraseblocks = { {8 * 1024 * 1024, 1} },
10818 .block_erase = erase_chip_block_jedec,
10819 },
10820 },
10821 .write = write_jedec_1,
10822 .read = read_memmapped,
10823 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010824 .prepare_access = prepare_memory_access,
10825 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010826 },
10827
10828 {
10829 .vendor = "Macronix",
Carl-Daniel Hailfinger350a0c32009-07-24 13:59:27 +000010830 .name = "MX29LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010831 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010832 .manufacture_id = MACRONIX_ID,
10833 .model_id = MACRONIX_MX29LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010834 .total_size = 512,
10835 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010836 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10837 .tested = TEST_UNTESTED,
10838 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010839 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010840 .block_erasers =
10841 {
10842 {
Stefan Tauner6697f712014-08-06 15:09:15 +000010843 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000010844 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010845 }, {
10846 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010847 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010848 },
10849 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010850 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010851 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010852 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010853 .prepare_access = prepare_memory_access,
10854 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger7de86392008-12-10 10:32:05 +000010855 },
10856
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010857 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010858 .vendor = "Macronix",
Hemanth Guruva Reddya136d422019-07-11 11:08:27 +020010859 .name = "MX66L51235F/MX25L51245G",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010860 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010861 .manufacture_id = MACRONIX_ID,
10862 .model_id = MACRONIX_MX66L51235F,
10863 .total_size = 65536,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010864 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010865 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
10866 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010867 .tested = TEST_OK_PREW,
10868 .probe = probe_spi_rdid,
10869 .probe_timing = TIMING_ZERO,
10870 .block_erasers =
10871 {
10872 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010873 .eraseblocks = { {4 * 1024, 16384} },
10874 .block_erase = spi_block_erase_21,
10875 }, {
10876 .eraseblocks = { {4 * 1024, 16384} },
10877 .block_erase = spi_block_erase_20,
10878 }, {
10879 .eraseblocks = { {32 * 1024, 2048} },
10880 .block_erase = spi_block_erase_5c,
10881 }, {
10882 .eraseblocks = { {32 * 1024, 2048} },
10883 .block_erase = spi_block_erase_52,
10884 }, {
10885 .eraseblocks = { {64 * 1024, 1024} },
10886 .block_erase = spi_block_erase_dc,
10887 }, {
10888 .eraseblocks = { {64 * 1024, 1024} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010889 .block_erase = spi_block_erase_d8,
10890 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010891 .eraseblocks = { {64 * 1024 * 1024, 1} },
10892 .block_erase = spi_block_erase_60,
10893 }, {
10894 .eraseblocks = { {64 * 1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010895 .block_erase = spi_block_erase_c7,
10896 }
10897 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010898 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
10899 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +000010900 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010901 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010902 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010903 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010904 .prepare_access = spi_prepare_io,
10905 .finish_access = spi_finish_io,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010906 },
10907
Patrick Rudolph3ba83152021-06-08 10:52:19 +020010908 {
10909 .vendor = "Macronix",
10910 .name = "MX66L1G45G",
10911 .bustype = BUS_SPI,
10912 .manufacture_id = MACRONIX_ID,
10913 .model_id = MACRONIX_MX66L1G45G,
10914 .total_size = 131072,
10915 .page_size = 256,
10916 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
10917 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
10918 .tested = TEST_OK_PREW,
10919 .probe = probe_spi_rdid,
10920 .probe_timing = TIMING_ZERO,
10921 .block_erasers =
10922 {
10923 {
10924 .eraseblocks = { {4 * 1024, 32768} },
10925 .block_erase = spi_block_erase_21,
10926 }, {
10927 .eraseblocks = { {4 * 1024, 32768} },
10928 .block_erase = spi_block_erase_20,
10929 }, {
10930 .eraseblocks = { {32 * 1024, 4096} },
10931 .block_erase = spi_block_erase_5c,
10932 }, {
10933 .eraseblocks = { {32 * 1024, 4096} },
10934 .block_erase = spi_block_erase_52,
10935 }, {
10936 .eraseblocks = { {64 * 1024, 2048} },
10937 .block_erase = spi_block_erase_dc,
10938 }, {
10939 .eraseblocks = { {64 * 1024, 2048} },
10940 .block_erase = spi_block_erase_d8,
10941 }, {
10942 .eraseblocks = { {128 * 1024 * 1024, 1} },
10943 .block_erase = spi_block_erase_60,
10944 }, {
10945 .eraseblocks = { {128 * 1024 * 1024, 1} },
10946 .block_erase = spi_block_erase_c7,
10947 }
10948 },
10949 /* TODO: security register and SBLK/SBULK, configuration register */
10950 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
10951 .unlock = spi_disable_blockprotect_bp3_srwd,
10952 .write = spi_chip_write_256,
10953 .read = spi_chip_read, /* Fast read (0x0B) supported */
10954 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010955 .prepare_access = spi_prepare_io,
10956 .finish_access = spi_finish_io,
Patrick Rudolph3ba83152021-06-08 10:52:19 +020010957 },
10958
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010959 /* The ST M25P05 is a bit of a problem. It has the same ID as the
10960 * ST M25P05-A in RES mode, but supports only 128 byte writes instead
10961 * of 256 byte writes. We rely heavily on the fact that probe_spi_res1
10962 * only is successful if RDID does not work.
10963 */
10964 {
10965 .vendor = "Micron/Numonyx/ST",
10966 .name = "M25P05",
10967 .bustype = BUS_SPI,
10968 .manufacture_id = 0, /* Not used. */
10969 .model_id = ST_M25P05_RES,
10970 .total_size = 64,
10971 .page_size = 256,
10972 .feature_bits = FEATURE_WRSR_WREN,
10973 .tested = TEST_UNTESTED,
10974 .probe = probe_spi_res1,
10975 .probe_timing = TIMING_ZERO,
10976 .block_erasers =
10977 {
10978 {
10979 .eraseblocks = { {32 * 1024, 2} },
10980 .block_erase = spi_block_erase_d8,
10981 }, {
10982 .eraseblocks = { {64 * 1024, 1} },
10983 .block_erase = spi_block_erase_c7,
10984 }
10985 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000010986 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000010987 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010988 .write = spi_chip_write_1, /* 128 */
10989 .read = spi_chip_read,
10990 .voltage = {2700, 3600},
10991 },
10992
10993 {
10994 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010995 .name = "M25P05-A",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000010996 .bustype = BUS_SPI,
10997 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010998 .model_id = ST_M25P05A,
10999 .total_size = 64,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011000 .page_size = 256,
11001 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011002 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011003 .probe = probe_spi_rdid,
11004 .probe_timing = TIMING_ZERO,
11005 .block_erasers =
11006 {
11007 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011008 .eraseblocks = { {32 * 1024, 2} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011009 .block_erase = spi_block_erase_d8,
11010 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011011 .eraseblocks = { {64 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011012 .block_erase = spi_block_erase_c7,
11013 }
11014 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011015 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011016 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011017 .write = spi_chip_write_256,
11018 .read = spi_chip_read,
11019 .voltage = {2700, 3600},
11020 },
11021
11022 /* The ST M25P10 has the same problem as the M25P05. */
11023 {
11024 .vendor = "Micron/Numonyx/ST",
11025 .name = "M25P10",
11026 .bustype = BUS_SPI,
11027 .manufacture_id = 0, /* Not used. */
11028 .model_id = ST_M25P10_RES,
11029 .total_size = 128,
11030 .page_size = 256,
11031 .feature_bits = FEATURE_WRSR_WREN,
11032 .tested = TEST_UNTESTED,
11033 .probe = probe_spi_res1,
11034 .probe_timing = TIMING_ZERO,
11035 .block_erasers =
11036 {
11037 {
11038 .eraseblocks = { {32 * 1024, 4} },
11039 .block_erase = spi_block_erase_d8,
11040 }, {
11041 .eraseblocks = { {128 * 1024, 1} },
11042 .block_erase = spi_block_erase_c7,
11043 }
11044 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011045 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011046 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011047 .write = spi_chip_write_1, /* 128 */
11048 .read = spi_chip_read,
11049 .voltage = {2700, 3600},
11050 },
11051
11052 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011053 .vendor = "Micron/Numonyx/ST",
11054 .name = "M25P10-A",
11055 .bustype = BUS_SPI,
11056 .manufacture_id = ST_ID,
11057 .model_id = ST_M25P10A,
11058 .total_size = 128,
11059 .page_size = 256,
11060 .feature_bits = FEATURE_WRSR_WREN,
11061 .tested = TEST_OK_PREW,
11062 .probe = probe_spi_rdid,
11063 .probe_timing = TIMING_ZERO,
11064 .block_erasers =
11065 {
11066 {
11067 .eraseblocks = { {32 * 1024, 4} },
11068 .block_erase = spi_block_erase_d8,
11069 }, {
11070 .eraseblocks = { {128 * 1024, 1} },
11071 .block_erase = spi_block_erase_c7,
11072 }
11073 },
11074 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11075 .unlock = spi_disable_blockprotect_bp3_srwd,
11076 .write = spi_chip_write_256,
11077 .read = spi_chip_read,
11078 .voltage = {2700, 3600},
11079 },
11080
11081 {
11082 .vendor = "Micron/Numonyx/ST",
11083 .name = "M25P128",
11084 .bustype = BUS_SPI,
11085 .manufacture_id = ST_ID,
11086 .model_id = ST_M25P128,
11087 .total_size = 16384,
11088 .page_size = 256,
11089 .feature_bits = FEATURE_WRSR_WREN,
11090 .tested = TEST_OK_PREW,
11091 .probe = probe_spi_rdid,
11092 .probe_timing = TIMING_ZERO,
11093 .block_erasers =
11094 {
11095 {
11096 .eraseblocks = { {256 * 1024, 64} },
11097 .block_erase = spi_block_erase_d8,
11098 }, {
11099 .eraseblocks = { {16 * 1024 * 1024, 1} },
11100 .block_erase = spi_block_erase_c7,
11101 }
11102 },
11103 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11104 .unlock = spi_disable_blockprotect_bp3_srwd,
11105 .write = spi_chip_write_256,
11106 .read = spi_chip_read,
11107 .voltage = {2700, 3600},
11108 },
11109
11110 {
11111 .vendor = "Micron/Numonyx/ST",
11112 .name = "M25P16",
11113 .bustype = BUS_SPI,
11114 .manufacture_id = ST_ID,
11115 .model_id = ST_M25P16,
11116 .total_size = 2048,
11117 .page_size = 256,
11118 .feature_bits = FEATURE_WRSR_WREN,
11119 .tested = TEST_OK_PREW,
11120 .probe = probe_spi_rdid,
11121 .probe_timing = TIMING_ZERO,
11122 .block_erasers =
11123 {
11124 {
11125 .eraseblocks = { {64 * 1024, 32} },
11126 .block_erase = spi_block_erase_d8,
11127 }, {
11128 .eraseblocks = { {2 * 1024 * 1024, 1} },
11129 .block_erase = spi_block_erase_c7,
11130 }
11131 },
11132 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11133 .unlock = spi_disable_blockprotect_bp3_srwd,
11134 .write = spi_chip_write_256,
11135 .read = spi_chip_read,
11136 .voltage = {2700, 3600},
11137 },
11138
11139 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011140 .vendor = "Micron/Numonyx/ST", /* Numonyx */
11141 .name = "M25P20",
11142 .bustype = BUS_SPI,
11143 .manufacture_id = ST_ID,
11144 .model_id = ST_M25P20,
11145 .total_size = 256,
11146 .page_size = 256,
11147 .feature_bits = FEATURE_WRSR_WREN,
11148 .tested = TEST_UNTESTED,
11149 .probe = probe_spi_rdid,
11150 .probe_timing = TIMING_ZERO,
11151 .block_erasers =
11152 {
11153 {
11154 .eraseblocks = { {64 * 1024, 4} },
11155 .block_erase = spi_block_erase_d8,
11156 }, {
11157 .eraseblocks = { {256 * 1024, 1} },
11158 .block_erase = spi_block_erase_c7,
11159 }
11160 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011161 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011162 .unlock = spi_disable_blockprotect,
11163 .write = spi_chip_write_256,
11164 .read = spi_chip_read, /* Fast read (0x0B) supported */
11165 .voltage = {2700, 3600},
11166 },
11167
11168 {
11169 .vendor = "Micron/Numonyx/ST",
11170 .name = "M25P20-old",
11171 .bustype = BUS_SPI,
11172 .manufacture_id = 0, /* Not used. */
11173 .model_id = ST_M25P20_RES,
11174 .total_size = 256,
11175 .page_size = 256,
11176 .feature_bits = FEATURE_WRSR_WREN,
11177 .tested = TEST_OK_PREW,
11178 .probe = probe_spi_res1,
11179 .probe_timing = TIMING_ZERO,
11180 .block_erasers =
11181 {
11182 {
11183 .eraseblocks = { {64 * 1024, 4} },
11184 .block_erase = spi_block_erase_d8,
11185 }, {
11186 .eraseblocks = { {256 * 1024, 1} },
11187 .block_erase = spi_block_erase_c7,
11188 }
11189 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011190 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011191 .unlock = spi_disable_blockprotect,
11192 .write = spi_chip_write_256,
11193 .read = spi_chip_read, /* Fast read (0x0B) supported */
11194 .voltage = {2700, 3600},
11195 },
11196
11197 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011198 .vendor = "Micron/Numonyx/ST",
11199 .name = "M25P32",
11200 .bustype = BUS_SPI,
11201 .manufacture_id = ST_ID,
11202 .model_id = ST_M25P32,
11203 .total_size = 4096,
11204 .page_size = 256,
11205 .feature_bits = FEATURE_WRSR_WREN,
11206 .tested = TEST_OK_PREW,
11207 .probe = probe_spi_rdid,
11208 .probe_timing = TIMING_ZERO,
11209 .block_erasers =
11210 {
11211 {
11212 .eraseblocks = { {64 * 1024, 64} },
11213 .block_erase = spi_block_erase_d8,
11214 }, {
11215 .eraseblocks = { {4 * 1024 * 1024, 1} },
11216 .block_erase = spi_block_erase_c7,
11217 }
11218 },
11219 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11220 .unlock = spi_disable_blockprotect_bp3_srwd,
11221 .write = spi_chip_write_256,
11222 .read = spi_chip_read,
11223 .voltage = {2700, 3600},
11224 },
11225
11226 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011227 .vendor = "Micron/Numonyx/ST", /* Numonyx */
11228 .name = "M25P40",
11229 .bustype = BUS_SPI,
11230 .manufacture_id = ST_ID,
11231 .model_id = ST_M25P40,
11232 .total_size = 512,
11233 .page_size = 256,
11234 .feature_bits = FEATURE_WRSR_WREN,
11235 .tested = TEST_OK_PREW,
11236 .probe = probe_spi_rdid,
11237 .probe_timing = TIMING_ZERO,
11238 .block_erasers =
11239 {
11240 {
11241 .eraseblocks = { {64 * 1024, 8} },
11242 .block_erase = spi_block_erase_d8,
11243 }, {
11244 .eraseblocks = { {512 * 1024, 1} },
11245 .block_erase = spi_block_erase_c7,
11246 }
11247 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011248 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011249 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011250 .write = spi_chip_write_256,
11251 .read = spi_chip_read,
11252 .voltage = {2700, 3600},
11253 },
11254
11255 {
11256 .vendor = "Micron/Numonyx/ST",
11257 .name = "M25P40-old",
11258 .bustype = BUS_SPI,
11259 .manufacture_id = 0, /* Not used. */
11260 .model_id = ST_M25P40_RES,
11261 .total_size = 512,
11262 .page_size = 256,
11263 .feature_bits = FEATURE_WRSR_WREN,
11264 .tested = TEST_UNTESTED,
11265 .probe = probe_spi_res1,
11266 .probe_timing = TIMING_ZERO,
11267 .block_erasers =
11268 {
11269 {
11270 .eraseblocks = { {64 * 1024, 8} },
11271 .block_erase = spi_block_erase_d8,
11272 }, {
11273 .eraseblocks = { {512 * 1024, 1} },
11274 .block_erase = spi_block_erase_c7,
11275 }
11276 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011277 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011278 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011279 .write = spi_chip_write_256,
11280 .read = spi_chip_read,
11281 },
11282
11283 {
11284 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011285 .name = "M25P64",
11286 .bustype = BUS_SPI,
11287 .manufacture_id = ST_ID,
11288 .model_id = ST_M25P64,
11289 .total_size = 8192,
11290 .page_size = 256,
11291 .feature_bits = FEATURE_WRSR_WREN,
11292 .tested = TEST_OK_PREW,
11293 .probe = probe_spi_rdid,
11294 .probe_timing = TIMING_ZERO,
11295 .block_erasers =
11296 {
11297 {
11298 .eraseblocks = { {64 * 1024, 128} },
11299 .block_erase = spi_block_erase_d8,
11300 }, {
11301 .eraseblocks = { {8 * 1024 * 1024, 1} },
11302 .block_erase = spi_block_erase_c7,
11303 }
11304 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011305 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011306 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011307 .write = spi_chip_write_256,
11308 .read = spi_chip_read,
11309 .voltage = {2700, 3600},
11310 },
11311
11312 {
11313 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011314 .name = "M25P80",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011315 .bustype = BUS_SPI,
11316 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011317 .model_id = ST_M25P80,
11318 .total_size = 1024,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011319 .page_size = 256,
11320 .feature_bits = FEATURE_WRSR_WREN,
11321 .tested = TEST_OK_PREW,
11322 .probe = probe_spi_rdid,
11323 .probe_timing = TIMING_ZERO,
11324 .block_erasers =
11325 {
11326 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011327 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011328 .block_erase = spi_block_erase_d8,
11329 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011330 .eraseblocks = { {1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011331 .block_erase = spi_block_erase_c7,
11332 }
11333 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011334 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011335 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011336 .write = spi_chip_write_256,
11337 .read = spi_chip_read,
11338 .voltage = {2700, 3600},
11339 },
11340
11341 {
11342 .vendor = "Micron/Numonyx/ST",
11343 .name = "M25PE10",
11344 .bustype = BUS_SPI,
11345 .manufacture_id = ST_ID,
11346 .model_id = ST_M25PE10,
11347 .total_size = 128,
11348 .page_size = 256,
11349 .feature_bits = FEATURE_WRSR_WREN,
11350 .tested = TEST_UNTESTED,
11351 .probe = probe_spi_rdid,
11352 .probe_timing = TIMING_ZERO,
11353 .block_erasers =
11354 {
11355 {
11356 .eraseblocks = { {4 * 1024, 32} },
11357 .block_erase = spi_block_erase_20,
11358 }, {
11359 .eraseblocks = { {64 * 1024, 2} },
11360 .block_erase = spi_block_erase_d8,
11361 }, {
11362 .eraseblocks = { {128 * 1024, 1} },
11363 .block_erase = spi_block_erase_c7,
11364 }
11365 },
11366 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11367 .unlock = spi_disable_blockprotect,
11368 .write = spi_chip_write_256,
11369 .read = spi_chip_read,
11370 .voltage = {2700, 3600},
11371 },
11372
11373 {
11374 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011375 .name = "M25PE16",
11376 .bustype = BUS_SPI,
11377 .manufacture_id = ST_ID,
11378 .model_id = ST_M25PE16,
11379 .total_size = 2048,
11380 .page_size = 256,
11381 .feature_bits = FEATURE_WRSR_WREN,
11382 .tested = TEST_UNTESTED,
11383 .probe = probe_spi_rdid,
11384 .probe_timing = TIMING_ZERO,
11385 .block_erasers =
11386 {
11387 {
11388 .eraseblocks = { {4 * 1024, 512} },
11389 .block_erase = spi_block_erase_20,
11390 }, {
11391 .eraseblocks = { {64 * 1024, 32} },
11392 .block_erase = spi_block_erase_d8,
11393 }, {
11394 .eraseblocks = { {2 * 1024 * 1024, 1} },
11395 .block_erase = spi_block_erase_c7,
11396 }
11397 },
11398 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11399 .unlock = spi_disable_blockprotect,
11400 .write = spi_chip_write_256,
11401 .read = spi_chip_read,
11402 .voltage = {2700, 3600},
11403 },
11404
11405 {
11406 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011407 .name = "M25PE20",
11408 .bustype = BUS_SPI,
11409 .manufacture_id = ST_ID,
11410 .model_id = ST_M25PE20,
11411 .total_size = 256,
11412 .page_size = 256,
11413 .feature_bits = FEATURE_WRSR_WREN,
11414 .tested = TEST_UNTESTED,
11415 .probe = probe_spi_rdid,
11416 .probe_timing = TIMING_ZERO,
11417 .block_erasers =
11418 {
11419 {
11420 .eraseblocks = { {4 * 1024, 64} },
11421 .block_erase = spi_block_erase_20,
11422 }, {
11423 .eraseblocks = { {64 * 1024, 4} },
11424 .block_erase = spi_block_erase_d8,
11425 }, {
11426 .eraseblocks = { {256 * 1024, 1} },
11427 .block_erase = spi_block_erase_c7,
11428 }
11429 },
11430 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11431 .unlock = spi_disable_blockprotect,
11432 .write = spi_chip_write_256,
11433 .read = spi_chip_read,
11434 .voltage = {2700, 3600},
11435 },
11436
11437 {
11438 .vendor = "Micron/Numonyx/ST",
11439 .name = "M25PE40",
11440 .bustype = BUS_SPI,
11441 .manufacture_id = ST_ID,
11442 .model_id = ST_M25PE40,
11443 .total_size = 512,
11444 .page_size = 256,
11445 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011446 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011447 .probe = probe_spi_rdid,
11448 .probe_timing = TIMING_ZERO,
11449 .block_erasers =
11450 {
11451 {
11452 .eraseblocks = { {4 * 1024, 128} },
11453 .block_erase = spi_block_erase_20,
11454 }, {
11455 .eraseblocks = { {64 * 1024, 8} },
11456 .block_erase = spi_block_erase_d8,
11457 }, {
11458 .eraseblocks = { {512 * 1024, 1} },
11459 .block_erase = spi_block_erase_c7,
11460 }
11461 },
11462 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11463 .unlock = spi_disable_blockprotect,
11464 .write = spi_chip_write_256,
11465 .read = spi_chip_read,
11466 .voltage = {2700, 3600},
11467 },
11468
11469 {
11470 .vendor = "Micron/Numonyx/ST",
11471 .name = "M25PE80",
11472 .bustype = BUS_SPI,
11473 .manufacture_id = ST_ID,
11474 .model_id = ST_M25PE80,
11475 .total_size = 1024,
11476 .page_size = 256,
11477 .feature_bits = FEATURE_WRSR_WREN,
11478 .tested = TEST_OK_PREW,
11479 .probe = probe_spi_rdid,
11480 .probe_timing = TIMING_ZERO,
11481 .block_erasers =
11482 {
11483 {
11484 .eraseblocks = { {4 * 1024, 256} },
11485 .block_erase = spi_block_erase_20,
11486 }, {
11487 .eraseblocks = { {64 * 1024, 16} },
11488 .block_erase = spi_block_erase_d8,
11489 }, {
11490 .eraseblocks = { {1024 * 1024, 1} },
11491 .block_erase = spi_block_erase_c7,
11492 }
11493 },
11494 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11495 .unlock = spi_disable_blockprotect,
11496 .write = spi_chip_write_256,
11497 .read = spi_chip_read,
11498 .voltage = {2700, 3600},
11499 },
11500
11501 {
11502 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011503 .name = "M25PX16",
11504 .bustype = BUS_SPI,
11505 .manufacture_id = ST_ID,
11506 .model_id = ST_M25PX16,
11507 .total_size = 2048,
11508 .page_size = 256,
11509 /* OTP: 64B total; read 0x4B; write 0x42 */
11510 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11511 .tested = TEST_OK_PREW,
11512 .probe = probe_spi_rdid,
11513 .probe_timing = TIMING_ZERO,
11514 .block_erasers =
11515 {
11516 {
11517 .eraseblocks = { { 4 * 1024, 512 } },
11518 .block_erase = spi_block_erase_20,
11519 }, {
11520 .eraseblocks = { {64 * 1024, 32} },
11521 .block_erase = spi_block_erase_d8,
11522 }, {
11523 .eraseblocks = { {2 * 1024 * 1024, 1} },
11524 .block_erase = spi_block_erase_c7,
11525 }
11526 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011527 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011528 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11529 .write = spi_chip_write_256,
11530 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011531 .voltage = {2300, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011532 },
11533
11534 {
11535 .vendor = "Micron/Numonyx/ST",
11536 .name = "M25PX32",
11537 .bustype = BUS_SPI,
11538 .manufacture_id = ST_ID,
11539 .model_id = ST_M25PX32,
11540 .total_size = 4096,
11541 .page_size = 256,
11542 /* OTP: 64B total; read 0x4B; write 0x42 */
11543 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11544 .tested = TEST_OK_PRE,
11545 .probe = probe_spi_rdid,
11546 .probe_timing = TIMING_ZERO,
11547 .block_erasers =
11548 {
11549 {
11550 .eraseblocks = { { 4 * 1024, 1024 } },
11551 .block_erase = spi_block_erase_20,
11552 }, {
11553 .eraseblocks = { {64 * 1024, 64} },
11554 .block_erase = spi_block_erase_d8,
11555 }, {
11556 .eraseblocks = { {4 * 1024 * 1024, 1} },
11557 .block_erase = spi_block_erase_c7,
11558 }
11559 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011560 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011561 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11562 .write = spi_chip_write_256,
11563 .read = spi_chip_read,
11564 .voltage = {2700, 3600},
11565 },
11566
11567 {
11568 .vendor = "Micron/Numonyx/ST",
11569 .name = "M25PX64",
11570 .bustype = BUS_SPI,
11571 .manufacture_id = ST_ID,
11572 .model_id = ST_M25PX64,
11573 .total_size = 8192,
11574 .page_size = 256,
11575 /* OTP: 64B total; read 0x4B; write 0x42 */
11576 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011577 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011578 .probe = probe_spi_rdid,
11579 .probe_timing = TIMING_ZERO,
11580 .block_erasers =
11581 {
11582 {
11583 .eraseblocks = { { 4 * 1024, 2048 } },
11584 .block_erase = spi_block_erase_20,
11585 }, {
11586 .eraseblocks = { {64 * 1024, 128} },
11587 .block_erase = spi_block_erase_d8,
11588 }, {
11589 .eraseblocks = { {8 * 1024 * 1024, 1} },
11590 .block_erase = spi_block_erase_c7,
11591 }
11592 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011593 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011594 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11595 .write = spi_chip_write_256,
11596 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011597 .voltage = {2700, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011598 },
11599
11600 {
11601 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011602 .name = "M25PX80",
11603 .bustype = BUS_SPI,
11604 .manufacture_id = ST_ID,
11605 .model_id = ST_M25PX80,
11606 .total_size = 1024,
11607 .page_size = 256,
11608 /* OTP: 64B total; read 0x4B, write 0x42 */
11609 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11610 .tested = TEST_OK_PREW,
11611 .probe = probe_spi_rdid,
11612 .probe_timing = TIMING_ZERO,
11613 .block_erasers =
11614 {
11615 {
11616 .eraseblocks = { { 4 * 1024, 256 } },
11617 .block_erase = spi_block_erase_20,
11618 }, {
11619 .eraseblocks = { {64 * 1024, 16} },
11620 .block_erase = spi_block_erase_d8,
11621 }, {
11622 .eraseblocks = { {1024 * 1024, 1} },
11623 .block_erase = spi_block_erase_c7,
11624 }
11625 },
11626 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
11627 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11628 .write = spi_chip_write_256,
11629 .read = spi_chip_read,
11630 .voltage = {2700, 3600},
11631 },
11632
11633 {
11634 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011635 .name = "M45PE10",
11636 .bustype = BUS_SPI,
11637 .manufacture_id = ST_ID,
11638 .model_id = ST_M45PE10,
11639 .total_size = 128,
11640 .page_size = 256,
11641 .tested = TEST_UNTESTED,
11642 .probe = probe_spi_rdid,
11643 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011644 .block_erasers =
11645 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011646 {
11647 .eraseblocks = { {256, 512} },
11648 .block_erase = spi_block_erase_db,
11649 }, {
11650 .eraseblocks = { {64 * 1024, 2} },
11651 .block_erase = spi_block_erase_d8,
11652 }
11653 },
11654 .printlock = spi_prettyprint_status_register_default_welwip,
11655 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11656 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11657 .read = spi_chip_read, /* Fast read (0x0B) supported */
11658 .voltage = {2700, 3600},
11659 },
11660
11661 {
11662 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011663 .name = "M45PE16",
11664 .bustype = BUS_SPI,
11665 .manufacture_id = ST_ID,
11666 .model_id = ST_M45PE16,
11667 .total_size = 2048,
11668 .page_size = 256,
11669 .tested = TEST_UNTESTED,
11670 .probe = probe_spi_rdid,
11671 .probe_timing = TIMING_ZERO,
11672 .block_erasers =
11673 {
11674 {
11675 .eraseblocks = { {256, 8192} },
11676 .block_erase = spi_block_erase_db,
11677 }, {
11678 .eraseblocks = { {64 * 1024, 32} },
11679 .block_erase = spi_block_erase_d8,
11680 }
11681 },
11682 .printlock = spi_prettyprint_status_register_default_welwip,
11683 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11684 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11685 .read = spi_chip_read, /* Fast read (0x0B) supported */
11686 .voltage = {2700, 3600},
11687 },
11688
11689 {
11690 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011691 .name = "M45PE20",
11692 .bustype = BUS_SPI,
11693 .manufacture_id = ST_ID,
11694 .model_id = ST_M45PE20,
11695 .total_size = 256,
11696 .page_size = 256,
11697 .tested = TEST_UNTESTED,
11698 .probe = probe_spi_rdid,
11699 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011700 .block_erasers =
11701 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011702 {
11703 .eraseblocks = { {256, 1024} },
11704 .block_erase = spi_block_erase_db,
11705 }, {
11706 .eraseblocks = { {64 * 1024, 4} },
11707 .block_erase = spi_block_erase_d8,
11708 }
11709 },
11710 .printlock = spi_prettyprint_status_register_default_welwip,
11711 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11712 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11713 .read = spi_chip_read, /* Fast read (0x0B) supported */
11714 .voltage = {2700, 3600},
11715 },
11716
11717 {
11718 .vendor = "Micron/Numonyx/ST",
11719 .name = "M45PE40",
11720 .bustype = BUS_SPI,
11721 .manufacture_id = ST_ID,
11722 .model_id = ST_M45PE40,
11723 .total_size = 512,
11724 .page_size = 256,
11725 .tested = TEST_UNTESTED,
11726 .probe = probe_spi_rdid,
11727 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011728 .block_erasers =
11729 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011730 {
11731 .eraseblocks = { {256, 2048} },
11732 .block_erase = spi_block_erase_db,
11733 }, {
11734 .eraseblocks = { {64 * 1024, 8} },
11735 .block_erase = spi_block_erase_d8,
11736 }
11737 },
11738 .printlock = spi_prettyprint_status_register_default_welwip,
11739 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
Stefan Tauner23e10b82016-01-23 16:16:49 +000011740 .write = spi_chip_write_256, /* Page write supported (similar to PP but allows 0->1 changes) */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011741 .read = spi_chip_read, /* Fast read (0x0B) supported */
11742 .voltage = {2700, 3600},
11743 },
11744
11745 {
11746 .vendor = "Micron/Numonyx/ST",
11747 .name = "M45PE80",
11748 .bustype = BUS_SPI,
11749 .manufacture_id = ST_ID,
11750 .model_id = ST_M45PE80,
11751 .total_size = 1024,
11752 .page_size = 256,
11753 .tested = TEST_UNTESTED,
11754 .probe = probe_spi_rdid,
11755 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011756 .block_erasers =
11757 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011758 {
11759 .eraseblocks = { {256, 4096} },
11760 .block_erase = spi_block_erase_db,
11761 }, {
11762 .eraseblocks = { {64 * 1024, 16} },
11763 .block_erase = spi_block_erase_d8,
11764 }
11765 },
11766 .printlock = spi_prettyprint_status_register_default_welwip,
11767 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11768 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11769 .read = spi_chip_read, /* Fast read (0x0B) supported */
11770 .voltage = {2700, 3600},
11771 },
11772
11773 {
11774 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070011775 .name = "N25Q00A..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
11776 .bustype = BUS_SPI,
11777 .manufacture_id = ST_ID,
11778 .model_id = ST_N25Q00A__1G,
11779 .total_size = 131072,
11780 .page_size = 256,
11781 /* supports SFDP */
11782 /* OTP: 64B total; read 0x4B, write 0x42 */
11783 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
11784 .tested = TEST_UNTESTED,
11785 .probe = probe_spi_rdid,
11786 .probe_timing = TIMING_ZERO,
11787 .block_erasers =
11788 {
11789 {
11790 .eraseblocks = { {4 * 1024, 32768} },
11791 .block_erase = spi_block_erase_21,
11792 }, {
11793 .eraseblocks = { {4 * 1024, 32768} },
11794 .block_erase = spi_block_erase_20,
11795 }, {
11796 .eraseblocks = { {64 * 1024, 2048} },
11797 .block_erase = spi_block_erase_dc,
11798 }, {
11799 .eraseblocks = { {64 * 1024, 2048} },
11800 .block_erase = spi_block_erase_d8,
11801 }, {
11802 .eraseblocks = { {32768 * 1024, 4} },
11803 .block_erase = spi_block_erase_c4,
11804 }
11805 },
11806 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11807 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11808 .write = spi_chip_write_256, /* Multi I/O supported */
11809 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11810 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020011811 .prepare_access = spi_prepare_io,
11812 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070011813 },
11814
11815 {
11816 .vendor = "Micron/Numonyx/ST",
11817 .name = "N25Q00A..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
11818 .bustype = BUS_SPI,
11819 .manufacture_id = ST_ID,
11820 .model_id = ST_N25Q00A__3G,
11821 .total_size = 131072,
11822 .page_size = 256,
11823 /* supports SFDP */
11824 /* OTP: 64B total; read 0x4B, write 0x42 */
11825 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
11826 .tested = TEST_UNTESTED,
11827 .probe = probe_spi_rdid,
11828 .probe_timing = TIMING_ZERO,
11829 .block_erasers =
11830 {
11831 {
11832 .eraseblocks = { {4 * 1024, 32768} },
11833 .block_erase = spi_block_erase_21,
11834 }, {
11835 .eraseblocks = { {4 * 1024, 32768} },
11836 .block_erase = spi_block_erase_20,
11837 }, {
11838 .eraseblocks = { {64 * 1024, 2048} },
11839 .block_erase = spi_block_erase_dc,
11840 }, {
11841 .eraseblocks = { {64 * 1024, 2048} },
11842 .block_erase = spi_block_erase_d8,
11843 }, {
11844 .eraseblocks = { {32768 * 1024, 4} },
11845 .block_erase = spi_block_erase_c4,
11846 }
11847 },
11848 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11849 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11850 .write = spi_chip_write_256, /* Multi I/O supported */
11851 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11852 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011853 .prepare_access = spi_prepare_io,
11854 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070011855 },
11856
11857 {
11858 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011859 .name = "N25Q016",
11860 .bustype = BUS_SPI,
11861 .manufacture_id = ST_ID,
11862 .model_id = ST_N25Q016__1E,
11863 .total_size = 2048,
11864 .page_size = 256,
11865 /* supports SFDP */
11866 /* OTP: 64B total; read 0x4B, write 0x42 */
11867 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11868 .tested = TEST_UNTESTED,
11869 .probe = probe_spi_rdid,
11870 .probe_timing = TIMING_ZERO,
11871 .block_erasers =
11872 {
11873 {
11874 .eraseblocks = { {4 * 1024, 512} },
11875 .block_erase = spi_block_erase_20,
11876 }, {
11877 .eraseblocks = { {32 * 1024, 64} },
11878 .block_erase = spi_block_erase_52,
11879 }, {
11880 .eraseblocks = { {64 * 1024, 32} },
11881 .block_erase = spi_block_erase_d8,
11882 }, {
11883 .eraseblocks = { {2 * 1024 * 1024, 1} },
11884 .block_erase = spi_block_erase_c7,
11885 }
11886 },
11887 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11888 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11889 .write = spi_chip_write_256, /* Multi I/O supported */
11890 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11891 .voltage = {1700, 2000},
11892 },
11893
11894 {
11895 .vendor = "Micron/Numonyx/ST",
11896 .name = "N25Q032..1E",
11897 .bustype = BUS_SPI,
11898 .manufacture_id = ST_ID,
11899 .model_id = ST_N25Q032__1E,
11900 .total_size = 4096,
11901 .page_size = 256,
11902 /* supports SFDP */
11903 /* OTP: 64B total; read 0x4B, write 0x42 */
11904 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11905 .tested = TEST_UNTESTED,
11906 .probe = probe_spi_rdid,
11907 .probe_timing = TIMING_ZERO,
11908 .block_erasers =
11909 {
11910 {
11911 .eraseblocks = { {4 * 1024, 1024} },
11912 .block_erase = spi_block_erase_20,
11913 }, {
11914 .eraseblocks = { {64 * 1024, 64} },
11915 .block_erase = spi_block_erase_d8,
11916 }, {
11917 .eraseblocks = { {4 * 1024 * 1024, 1} },
11918 .block_erase = spi_block_erase_c7,
11919 }
11920 },
11921 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11922 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11923 .write = spi_chip_write_256, /* Multi I/O supported */
11924 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11925 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011926 .reg_bits =
11927 {
11928 /*
11929 * There is also a volatile lock register per 64KiB sector, which is not
11930 * mutually exclusive with BP-based protection.
11931 */
11932 .srp = {STATUS1, 7, RW},
11933 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
11934 .tb = {STATUS1, 5, RW},
11935 },
Nico Huberaabb3e02023-01-13 00:22:30 +010011936 .wp_write_cfg = spi_wp_write_cfg,
11937 .wp_read_cfg = spi_wp_read_cfg,
11938 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011939 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011940 },
11941
11942 {
11943 .vendor = "Micron/Numonyx/ST",
11944 .name = "N25Q032..3E",
11945 .bustype = BUS_SPI,
11946 .manufacture_id = ST_ID,
11947 .model_id = ST_N25Q032__3E,
11948 .total_size = 4096,
11949 .page_size = 256,
11950 /* supports SFDP */
11951 /* OTP: 64B total; read 0x4B, write 0x42 */
11952 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11953 .tested = TEST_OK_PREW,
11954 .probe = probe_spi_rdid,
11955 .probe_timing = TIMING_ZERO,
11956 .block_erasers =
11957 {
11958 {
11959 .eraseblocks = { {4 * 1024, 1024} },
11960 .block_erase = spi_block_erase_20,
11961 }, {
11962 .eraseblocks = { {64 * 1024, 64} },
11963 .block_erase = spi_block_erase_d8,
11964 }, {
11965 .eraseblocks = { {4 * 1024 * 1024, 1} },
11966 .block_erase = spi_block_erase_c7,
11967 }
11968 },
11969 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
11970 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
11971 .write = spi_chip_write_256, /* Multi I/O supported */
11972 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
11973 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011974 .reg_bits =
11975 {
11976 /*
11977 * There is also a volatile lock register per 64KiB sector, which is not
11978 * mutually exclusive with BP-based protection.
11979 */
11980 .srp = {STATUS1, 7, RW},
11981 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
11982 .tb = {STATUS1, 5, RW},
11983 },
Nico Huberaabb3e02023-01-13 00:22:30 +010011984 .wp_write_cfg = spi_wp_write_cfg,
11985 .wp_read_cfg = spi_wp_read_cfg,
11986 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030011987 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011988 },
11989
11990 {
11991 .vendor = "Micron/Numonyx/ST",
11992 .name = "N25Q064..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
11993 .bustype = BUS_SPI,
11994 .manufacture_id = ST_ID,
11995 .model_id = ST_N25Q064__1E,
11996 .total_size = 8192,
11997 .page_size = 256,
11998 /* supports SFDP */
11999 /* OTP: 64B total; read 0x4B, write 0x42 */
12000 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000012001 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012002 .probe = probe_spi_rdid,
12003 .probe_timing = TIMING_ZERO,
12004 .block_erasers =
12005 {
12006 {
12007 .eraseblocks = { {4 * 1024, 2048 } },
12008 .block_erase = spi_block_erase_20,
12009 }, {
12010 .eraseblocks = { {64 * 1024, 128} },
12011 .block_erase = spi_block_erase_d8,
12012 }, {
12013 .eraseblocks = { {8 * 1024 * 1024, 1} },
12014 .block_erase = spi_block_erase_c7,
12015 }
12016 },
12017 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12018 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12019 .write = spi_chip_write_256, /* Multi I/O supported */
12020 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12021 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012022 .reg_bits =
12023 {
12024 /*
12025 * There is also a volatile lock register per 64KiB sector, which is not
12026 * mutually exclusive with BP-based protection.
12027 */
12028 .srp = {STATUS1, 7, RW},
12029 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12030 .tb = {STATUS1, 5, RW},
12031 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012032 .wp_write_cfg = spi_wp_write_cfg,
12033 .wp_read_cfg = spi_wp_read_cfg,
12034 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012035 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012036 },
12037
12038 {
12039 .vendor = "Micron/Numonyx/ST",
12040 .name = "N25Q064..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12041 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012042 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012043 .model_id = ST_N25Q064__3E,
12044 .total_size = 8192,
12045 .page_size = 256,
12046 /* supports SFDP */
12047 /* OTP: 64B total; read 0x4B, write 0x42 */
12048 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12049 .tested = TEST_OK_PREW,
12050 .probe = probe_spi_rdid,
12051 .probe_timing = TIMING_ZERO,
12052 .block_erasers =
12053 {
12054 {
12055 .eraseblocks = { {4 * 1024, 2048 } },
12056 .block_erase = spi_block_erase_20,
12057 }, {
12058 .eraseblocks = { {64 * 1024, 128} },
12059 .block_erase = spi_block_erase_d8,
12060 }, {
12061 .eraseblocks = { {8 * 1024 * 1024, 1} },
12062 .block_erase = spi_block_erase_c7,
12063 }
12064 },
12065 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12066 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12067 .write = spi_chip_write_256, /* Multi I/O supported */
12068 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12069 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012070 .reg_bits =
12071 {
12072 /*
12073 * There is also a volatile lock register per 64KiB sector, which is not
12074 * mutually exclusive with BP-based protection.
12075 */
12076 .srp = {STATUS1, 7, RW},
12077 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12078 .tb = {STATUS1, 5, RW},
12079 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012080 .wp_write_cfg = spi_wp_write_cfg,
12081 .wp_read_cfg = spi_wp_read_cfg,
12082 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012083 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012084 },
12085
12086 {
12087 .vendor = "Micron/Numonyx/ST",
12088 .name = "N25Q128..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
12089 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012090 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012091 .model_id = ST_N25Q128__1E,
12092 .total_size = 16384,
12093 .page_size = 256,
12094 /* supports SFDP */
12095 /* OTP: 64B total; read 0x4B, write 0x42 */
12096 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner23e10b82016-01-23 16:16:49 +000012097 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012098 .probe = probe_spi_rdid,
12099 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012100 .block_erasers =
12101 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012102 {
12103 .eraseblocks = { {4 * 1024, 4096 } },
12104 .block_erase = spi_block_erase_20,
12105 }, {
12106 .eraseblocks = { {64 * 1024, 256} },
12107 .block_erase = spi_block_erase_d8,
12108 }, {
12109 .eraseblocks = { {16384 * 1024, 1} },
12110 .block_erase = spi_block_erase_c7,
12111 }
12112 },
12113 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12114 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12115 .write = spi_chip_write_256, /* Multi I/O supported */
12116 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12117 .voltage = {1700, 2000},
12118 },
12119
12120 {
12121 .vendor = "Micron/Numonyx/ST",
12122 .name = "N25Q128..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12123 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012124 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012125 .model_id = ST_N25Q128__3E,
12126 .total_size = 16384,
12127 .page_size = 256,
12128 /* supports SFDP */
12129 /* OTP: 64B total; read 0x4B, write 0x42 */
12130 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12131 .tested = TEST_OK_PREW,
12132 .probe = probe_spi_rdid,
12133 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012134 .block_erasers =
12135 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012136 {
12137 .eraseblocks = { {4 * 1024, 4096 } },
12138 .block_erase = spi_block_erase_20,
12139 }, {
12140 .eraseblocks = { {64 * 1024, 256} },
12141 .block_erase = spi_block_erase_d8,
12142 }, {
12143 .eraseblocks = { {16384 * 1024, 1} },
12144 .block_erase = spi_block_erase_c7,
12145 }
12146 },
12147 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12148 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12149 .write = spi_chip_write_256, /* Multi I/O supported */
12150 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12151 .voltage = {2700, 3600},
12152 },
12153
12154 {
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012155 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012156 .name = "N25Q256..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
12157 .bustype = BUS_SPI,
12158 .manufacture_id = ST_ID,
12159 .model_id = ST_N25Q256__1E,
12160 .total_size = 32768,
12161 .page_size = 256,
12162 /* supports SFDP */
12163 /* OTP: 64B total; read 0x4B, write 0x42 */
12164 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12165 .tested = TEST_UNTESTED,
12166 .probe = probe_spi_rdid,
12167 .probe_timing = TIMING_ZERO,
12168 .block_erasers =
12169 {
12170 {
12171 .eraseblocks = { {4 * 1024, 8192} },
12172 .block_erase = spi_block_erase_21,
12173 }, {
12174 .eraseblocks = { {4 * 1024, 8192} },
12175 .block_erase = spi_block_erase_20,
12176 }, {
12177 .eraseblocks = { {64 * 1024, 512} },
12178 .block_erase = spi_block_erase_dc,
12179 }, {
12180 .eraseblocks = { {64 * 1024, 512} },
12181 .block_erase = spi_block_erase_d8,
12182 }, {
12183 .eraseblocks = { {32768 * 1024, 1} },
12184 .block_erase = spi_block_erase_c7,
12185 }
12186 },
12187 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12188 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12189 .write = spi_chip_write_256, /* Multi I/O supported */
12190 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12191 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012192 .prepare_access = spi_prepare_io,
12193 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012194 },
12195
12196 {
12197 .vendor = "Micron/Numonyx/ST",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012198 .name = "N25Q256..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12199 .bustype = BUS_SPI,
12200 .manufacture_id = ST_ID,
12201 .model_id = ST_N25Q256__3E,
12202 .total_size = 32768,
12203 .page_size = 256,
12204 /* supports SFDP */
12205 /* OTP: 64B total; read 0x4B, write 0x42 */
12206 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12207 .tested = TEST_UNTESTED,
12208 .probe = probe_spi_rdid,
12209 .probe_timing = TIMING_ZERO,
12210 .block_erasers =
12211 {
12212 {
12213 .eraseblocks = { {4 * 1024, 8192} },
12214 .block_erase = spi_block_erase_21,
12215 }, {
12216 .eraseblocks = { {4 * 1024, 8192} },
12217 .block_erase = spi_block_erase_20,
12218 }, {
12219 .eraseblocks = { {64 * 1024, 512} },
12220 .block_erase = spi_block_erase_dc,
12221 }, {
12222 .eraseblocks = { {64 * 1024, 512} },
12223 .block_erase = spi_block_erase_d8,
12224 }, {
12225 .eraseblocks = { {32768 * 1024, 1} },
12226 .block_erase = spi_block_erase_c7,
12227 }
12228 },
12229 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12230 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12231 .write = spi_chip_write_256, /* Multi I/O supported */
12232 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12233 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012234 .prepare_access = spi_prepare_io,
12235 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012236 },
12237
12238 {
12239 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012240 .name = "N25Q512..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012241 .bustype = BUS_SPI,
12242 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012243 .model_id = ST_N25Q512__1G,
12244 .total_size = 65536,
12245 .page_size = 256,
12246 /* supports SFDP */
12247 /* OTP: 64B total; read 0x4B, write 0x42 */
12248 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12249 .tested = TEST_UNTESTED,
12250 .probe = probe_spi_rdid,
12251 .probe_timing = TIMING_ZERO,
12252 .block_erasers =
12253 {
12254 {
12255 .eraseblocks = { {4 * 1024, 16384} },
12256 .block_erase = spi_block_erase_21,
12257 }, {
12258 .eraseblocks = { {4 * 1024, 16384} },
12259 .block_erase = spi_block_erase_20,
12260 }, {
12261 .eraseblocks = { {64 * 1024, 1024} },
12262 .block_erase = spi_block_erase_dc,
12263 }, {
12264 .eraseblocks = { {64 * 1024, 1024} },
12265 .block_erase = spi_block_erase_d8,
12266 }, {
12267 .eraseblocks = { {32768 * 1024, 2} },
12268 .block_erase = spi_block_erase_c4,
12269 }
12270 },
12271 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12272 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12273 .write = spi_chip_write_256, /* Multi I/O supported */
12274 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12275 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012276 .prepare_access = spi_prepare_io,
12277 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012278 },
12279
12280 {
12281 .vendor = "Micron/Numonyx/ST",
12282 .name = "N25Q512..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
12283 .bustype = BUS_SPI,
12284 .manufacture_id = ST_ID,
12285 .model_id = ST_N25Q512__3G,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012286 .total_size = 65536,
12287 .page_size = 256,
12288 /* supports SFDP */
12289 /* OTP: 64B total; read 0x4B, write 0x42 */
12290 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12291 .tested = TEST_OK_PREW,
12292 .probe = probe_spi_rdid,
12293 .probe_timing = TIMING_ZERO,
12294 .block_erasers =
12295 {
12296 {
12297 .eraseblocks = { {4 * 1024, 16384} },
12298 .block_erase = spi_block_erase_21,
12299 }, {
12300 .eraseblocks = { {4 * 1024, 16384} },
12301 .block_erase = spi_block_erase_20,
12302 }, {
12303 .eraseblocks = { {64 * 1024, 1024} },
12304 .block_erase = spi_block_erase_dc,
12305 }, {
12306 .eraseblocks = { {64 * 1024, 1024} },
12307 .block_erase = spi_block_erase_d8,
12308 }, {
Jacob Creedone8e7b0e2019-07-22 12:21:22 -070012309 .eraseblocks = { {32768 * 1024, 2} },
12310 .block_erase = spi_block_erase_c4,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012311 }
12312 },
12313 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12314 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12315 .write = spi_chip_write_256, /* Multi I/O supported */
12316 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12317 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012318 .prepare_access = spi_prepare_io,
12319 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012320 },
12321
12322 {
Ed Swierk199ab392017-07-03 13:33:44 -070012323 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012324 .name = "MT25QL01G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12325 .bustype = BUS_SPI,
12326 .manufacture_id = ST_ID,
12327 .model_id = ST_N25Q00A__3G,
12328 .total_size = 131072,
12329 .page_size = 256,
12330 /* supports SFDP */
12331 /* OTP: 64B total; read 0x4B, write 0x42 */
12332 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12333 .tested = TEST_OK_PREW,
12334 .probe = probe_spi_rdid,
12335 .probe_timing = TIMING_ZERO,
12336 .block_erasers =
12337 {
12338 {
12339 .eraseblocks = { {4 * 1024, 32768} },
12340 .block_erase = spi_block_erase_21,
12341 }, {
12342 .eraseblocks = { {4 * 1024, 32768} },
12343 .block_erase = spi_block_erase_20,
12344 }, {
12345 .eraseblocks = { {32 * 1024, 4096} },
12346 .block_erase = spi_block_erase_5c,
12347 }, {
12348 .eraseblocks = { {32 * 1024, 4096} },
12349 .block_erase = spi_block_erase_52,
12350 }, {
12351 .eraseblocks = { {64 * 1024, 2048} },
12352 .block_erase = spi_block_erase_dc,
12353 }, {
12354 .eraseblocks = { {64 * 1024, 2048} },
12355 .block_erase = spi_block_erase_d8,
12356 }, {
12357 .eraseblocks = { {65536 * 1024, 2} },
12358 .block_erase = spi_block_erase_c4,
12359 }
12360 },
12361 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12362 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12363 .write = spi_chip_write_256, /* Multi I/O supported */
12364 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12365 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012366 .prepare_access = spi_prepare_io,
12367 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012368 },
12369
12370 {
12371 .vendor = "Micron",
12372 .name = "MT25QU01G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12373 .bustype = BUS_SPI,
12374 .manufacture_id = ST_ID,
12375 .model_id = ST_N25Q00A__1G,
12376 .total_size = 131072,
12377 .page_size = 256,
12378 /* supports SFDP */
12379 /* OTP: 64B total; read 0x4B, write 0x42 */
12380 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12381 .tested = TEST_UNTESTED,
12382 .probe = probe_spi_rdid,
12383 .probe_timing = TIMING_ZERO,
12384 .block_erasers =
12385 {
12386 {
12387 .eraseblocks = { {4 * 1024, 32768} },
12388 .block_erase = spi_block_erase_21,
12389 }, {
12390 .eraseblocks = { {4 * 1024, 32768} },
12391 .block_erase = spi_block_erase_20,
12392 }, {
12393 .eraseblocks = { {32 * 1024, 4096} },
12394 .block_erase = spi_block_erase_5c,
12395 }, {
12396 .eraseblocks = { {32 * 1024, 4096} },
12397 .block_erase = spi_block_erase_52,
12398 }, {
12399 .eraseblocks = { {64 * 1024, 2048} },
12400 .block_erase = spi_block_erase_dc,
12401 }, {
12402 .eraseblocks = { {64 * 1024, 2048} },
12403 .block_erase = spi_block_erase_d8,
12404 }, {
12405 .eraseblocks = { {65536 * 1024, 2} },
12406 .block_erase = spi_block_erase_c4,
12407 }
12408 },
12409 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12410 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12411 .write = spi_chip_write_256, /* Multi I/O supported */
12412 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12413 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012414 .prepare_access = spi_prepare_io,
12415 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012416 },
12417
12418 {
12419 .vendor = "Micron",
12420 .name = "MT25QL02G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12421 .bustype = BUS_SPI,
12422 .manufacture_id = ST_ID,
12423 .model_id = ST_MT25QL02G,
12424 .total_size = 262144,
12425 .page_size = 256,
12426 /* supports SFDP */
12427 /* OTP: 64B total; read 0x4B, write 0x42 */
12428 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12429 .tested = TEST_UNTESTED,
12430 .probe = probe_spi_rdid,
12431 .probe_timing = TIMING_ZERO,
12432 .block_erasers =
12433 {
12434 {
12435 .eraseblocks = { {4 * 1024, 65536} },
12436 .block_erase = spi_block_erase_21,
12437 }, {
12438 .eraseblocks = { {4 * 1024, 65536} },
12439 .block_erase = spi_block_erase_20,
12440 }, {
12441 .eraseblocks = { {32 * 1024, 8192} },
12442 .block_erase = spi_block_erase_5c,
12443 }, {
12444 .eraseblocks = { {32 * 1024, 8192} },
12445 .block_erase = spi_block_erase_52,
12446 }, {
12447 .eraseblocks = { {64 * 1024, 4096} },
12448 .block_erase = spi_block_erase_dc,
12449 }, {
12450 .eraseblocks = { {64 * 1024, 4096} },
12451 .block_erase = spi_block_erase_d8,
12452 }, {
12453 .eraseblocks = { {65536 * 1024, 4} },
12454 .block_erase = spi_block_erase_c4,
12455 }
12456 },
12457 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12458 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12459 .write = spi_chip_write_256, /* Multi I/O supported */
12460 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12461 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012462 .prepare_access = spi_prepare_io,
12463 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012464 },
12465
12466 {
12467 .vendor = "Micron",
12468 .name = "MT25QU02G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12469 .bustype = BUS_SPI,
12470 .manufacture_id = ST_ID,
12471 .model_id = ST_MT25QU02G,
12472 .total_size = 262144,
12473 .page_size = 256,
12474 /* supports SFDP */
12475 /* OTP: 64B total; read 0x4B, write 0x42 */
12476 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12477 .tested = TEST_UNTESTED,
12478 .probe = probe_spi_rdid,
12479 .probe_timing = TIMING_ZERO,
12480 .block_erasers =
12481 {
12482 {
12483 .eraseblocks = { {4 * 1024, 65536} },
12484 .block_erase = spi_block_erase_21,
12485 }, {
12486 .eraseblocks = { {4 * 1024, 65536} },
12487 .block_erase = spi_block_erase_20,
12488 }, {
12489 .eraseblocks = { {32 * 1024, 8192} },
12490 .block_erase = spi_block_erase_5c,
12491 }, {
12492 .eraseblocks = { {32 * 1024, 8192} },
12493 .block_erase = spi_block_erase_52,
12494 }, {
12495 .eraseblocks = { {64 * 1024, 4096} },
12496 .block_erase = spi_block_erase_dc,
12497 }, {
12498 .eraseblocks = { {64 * 1024, 4096} },
12499 .block_erase = spi_block_erase_d8,
12500 }, {
12501 .eraseblocks = { {65536 * 1024, 4} },
12502 .block_erase = spi_block_erase_c4,
12503 }
12504 },
12505 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12506 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12507 .write = spi_chip_write_256, /* Multi I/O supported */
12508 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12509 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012510 .prepare_access = spi_prepare_io,
12511 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012512 },
12513
12514 {
12515 .vendor = "Micron",
12516 .name = "MT25QU128", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12517 .bustype = BUS_SPI,
12518 .manufacture_id = ST_ID,
12519 .model_id = ST_N25Q128__1E,
12520 .total_size = 16384,
12521 .page_size = 256,
12522 /* supports SFDP */
12523 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huber48dc0902023-03-05 17:20:55 +010012524 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012525 .tested = TEST_UNTESTED,
12526 .probe = probe_spi_rdid,
12527 .probe_timing = TIMING_ZERO,
12528 .block_erasers =
12529 {
12530 {
12531 .eraseblocks = { {4 * 1024, 4096} },
12532 .block_erase = spi_block_erase_20,
12533 }, {
12534 .eraseblocks = { {32 * 1024, 512} },
12535 .block_erase = spi_block_erase_52,
12536 }, {
12537 .eraseblocks = { {64 * 1024, 256} },
12538 .block_erase = spi_block_erase_d8,
12539 }, {
12540 .eraseblocks = { {16384 * 1024, 1} },
12541 .block_erase = spi_block_erase_c7,
12542 }, {
12543 .eraseblocks = { {16384 * 1024, 1} },
12544 .block_erase = spi_block_erase_60,
12545 }
12546 },
12547 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12548 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12549 .write = spi_chip_write_256, /* Multi I/O supported */
12550 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12551 .voltage = {1700, 2000},
12552 },
12553
12554 {
12555 .vendor = "Micron",
12556 .name = "MT25QL128", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12557 .bustype = BUS_SPI,
12558 .manufacture_id = ST_ID,
12559 .model_id = ST_N25Q128__3E,
12560 .total_size = 16384,
12561 .page_size = 256,
12562 /* supports SFDP */
12563 /* OTP: 64B total; read 0x4B, write 0x42 */
Rick Altherr1e563602022-12-22 10:25:34 -080012564 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12565 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012566 .probe = probe_spi_rdid,
12567 .probe_timing = TIMING_ZERO,
12568 .block_erasers =
12569 {
12570 {
12571 .eraseblocks = { {4 * 1024, 4096} },
12572 .block_erase = spi_block_erase_20,
12573 }, {
12574 .eraseblocks = { {32 * 1024, 512} },
12575 .block_erase = spi_block_erase_52,
12576 }, {
12577 .eraseblocks = { {64 * 1024, 256} },
12578 .block_erase = spi_block_erase_d8,
12579 }, {
12580 .eraseblocks = { {16384 * 1024, 1} },
12581 .block_erase = spi_block_erase_c7,
12582 }, {
12583 .eraseblocks = { {16384 * 1024, 1} },
12584 .block_erase = spi_block_erase_60,
12585 }
12586 },
12587 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12588 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12589 .write = spi_chip_write_256, /* Multi I/O supported */
12590 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12591 .voltage = {2700, 3600},
12592 },
12593
12594 {
12595 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012596 .name = "MT25QL256", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070012597 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012598 .manufacture_id = ST_ID,
Ed Swierk199ab392017-07-03 13:33:44 -070012599 .model_id = ST_N25Q256__3E,
12600 .total_size = 32768,
12601 .page_size = 256,
12602 /* supports SFDP */
12603 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010012604 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Simon Buhrowb7014f92021-02-15 13:16:57 +010012605 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070012606 .probe = probe_spi_rdid,
12607 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012608 .block_erasers =
12609 {
Ed Swierk199ab392017-07-03 13:33:44 -070012610 {
12611 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012612 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070012613 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012614 .eraseblocks = { {4 * 1024, 8192} },
12615 .block_erase = spi_block_erase_20,
12616 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070012617 .eraseblocks = { {32 * 1024, 1024} },
12618 .block_erase = spi_block_erase_5c,
12619 }, {
12620 .eraseblocks = { {32 * 1024, 1024} },
12621 .block_erase = spi_block_erase_52,
12622 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012623 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012624 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070012625 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012626 .eraseblocks = { {64 * 1024, 512} },
12627 .block_erase = spi_block_erase_d8,
12628 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012629 .eraseblocks = { {32768 * 1024, 1} },
12630 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070012631 }, {
12632 .eraseblocks = { {32768 * 1024, 1} },
12633 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070012634 }
12635 },
12636 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12637 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12638 .write = spi_chip_write_256, /* Multi I/O supported */
12639 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12640 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012641 .prepare_access = spi_prepare_io,
12642 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070012643 },
12644
12645 {
12646 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012647 .name = "MT25QU256", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12648 .bustype = BUS_SPI,
12649 .manufacture_id = ST_ID,
12650 .model_id = ST_N25Q256__1E,
12651 .total_size = 32768,
12652 .page_size = 256,
12653 /* supports SFDP */
12654 /* OTP: 64B total; read 0x4B, write 0x42 */
12655 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons59052582022-03-08 15:23:58 +010012656 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012657 .probe = probe_spi_rdid,
12658 .probe_timing = TIMING_ZERO,
12659 .block_erasers =
12660 {
12661 {
12662 .eraseblocks = { {4 * 1024, 8192} },
12663 .block_erase = spi_block_erase_21,
12664 }, {
12665 .eraseblocks = { {4 * 1024, 8192} },
12666 .block_erase = spi_block_erase_20,
12667 }, {
12668 .eraseblocks = { {32 * 1024, 1024} },
12669 .block_erase = spi_block_erase_5c,
12670 }, {
12671 .eraseblocks = { {32 * 1024, 1024} },
12672 .block_erase = spi_block_erase_52,
12673 }, {
12674 .eraseblocks = { {64 * 1024, 512} },
12675 .block_erase = spi_block_erase_dc,
12676 }, {
12677 .eraseblocks = { {64 * 1024, 512} },
12678 .block_erase = spi_block_erase_d8,
12679 }, {
12680 .eraseblocks = { {32768 * 1024, 1} },
12681 .block_erase = spi_block_erase_c7,
12682 }, {
12683 .eraseblocks = { {32768 * 1024, 1} },
12684 .block_erase = spi_block_erase_60,
12685 }
12686 },
12687 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12688 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12689 .write = spi_chip_write_256, /* Multi I/O supported */
12690 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12691 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012692 .prepare_access = spi_prepare_io,
12693 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012694 },
12695
12696 {
12697 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012698 .name = "MT25QL512", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070012699 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012700 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012701 .model_id = ST_N25Q512__3G,
Ed Swierk199ab392017-07-03 13:33:44 -070012702 .total_size = 65536,
12703 .page_size = 256,
12704 /* supports SFDP */
12705 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010012706 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons3ed5a352018-09-30 16:31:09 +020012707 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070012708 .probe = probe_spi_rdid,
12709 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012710 .block_erasers =
12711 {
Ed Swierk199ab392017-07-03 13:33:44 -070012712 {
12713 .eraseblocks = { {4 * 1024, 16384} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012714 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070012715 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012716 .eraseblocks = { {4 * 1024, 16384} },
12717 .block_erase = spi_block_erase_20,
12718 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070012719 .eraseblocks = { {32 * 1024, 2048} },
12720 .block_erase = spi_block_erase_5c,
12721 }, {
12722 .eraseblocks = { {32 * 1024, 2048} },
12723 .block_erase = spi_block_erase_52,
12724 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012725 .eraseblocks = { {64 * 1024, 1024} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012726 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070012727 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012728 .eraseblocks = { {64 * 1024, 1024} },
12729 .block_erase = spi_block_erase_d8,
12730 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012731 .eraseblocks = { {65536 * 1024, 1} },
12732 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070012733 }, {
12734 .eraseblocks = { {65536 * 1024, 1} },
12735 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070012736 }
12737 },
12738 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12739 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12740 .write = spi_chip_write_256, /* Multi I/O supported */
12741 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12742 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012743 .reg_bits =
12744 {
12745 .srp = {STATUS1, 7, RW},
12746 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12747 .tb = {STATUS1, 5, RW},
12748 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012749 .wp_write_cfg = spi_wp_write_cfg,
12750 .wp_read_cfg = spi_wp_read_cfg,
12751 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012752 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020012753 .prepare_access = spi_prepare_io,
12754 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070012755 },
12756
12757 {
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012758 .vendor = "Micron",
12759 .name = "MT25QU512", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12760 .bustype = BUS_SPI,
12761 .manufacture_id = ST_ID,
12762 .model_id = ST_N25Q512__1G,
12763 .total_size = 65536,
12764 .page_size = 256,
12765 /* supports SFDP */
12766 /* OTP: 64B total; read 0x4B, write 0x42 */
12767 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12768 .tested = TEST_OK_PREW,
12769 .probe = probe_spi_rdid,
12770 .probe_timing = TIMING_ZERO,
12771 .block_erasers =
12772 {
12773 {
12774 .eraseblocks = { {4 * 1024, 16384} },
12775 .block_erase = spi_block_erase_21,
12776 }, {
12777 .eraseblocks = { {4 * 1024, 16384} },
12778 .block_erase = spi_block_erase_20,
12779 }, {
12780 .eraseblocks = { {32 * 1024, 2048} },
12781 .block_erase = spi_block_erase_5c,
12782 }, {
12783 .eraseblocks = { {32 * 1024, 2048} },
12784 .block_erase = spi_block_erase_52,
12785 }, {
12786 .eraseblocks = { {64 * 1024, 1024} },
12787 .block_erase = spi_block_erase_dc,
12788 }, {
12789 .eraseblocks = { {64 * 1024, 1024} },
12790 .block_erase = spi_block_erase_d8,
12791 }, {
12792 .eraseblocks = { {65536 * 1024, 1} },
12793 .block_erase = spi_block_erase_c7,
12794 }, {
12795 .eraseblocks = { {65536 * 1024, 1} },
12796 .block_erase = spi_block_erase_60,
12797 }
12798 },
12799 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12800 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12801 .write = spi_chip_write_256, /* Multi I/O supported */
12802 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12803 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012804 .prepare_access = spi_prepare_io,
12805 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012806 },
12807
12808 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000012809 .vendor = "MoselVitelic",
12810 .name = "V29C51000B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012811 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012812 .manufacture_id = SYNCMOS_MVC_ID,
12813 .model_id = MVC_V29C51000B,
12814 .total_size = 64,
12815 .page_size = 512,
12816 .feature_bits = FEATURE_EITHER_RESET,
12817 .tested = TEST_UNTESTED,
12818 .probe = probe_jedec,
12819 .probe_timing = TIMING_ZERO,
12820 .block_erasers =
12821 {
12822 {
12823 .eraseblocks = { {512, 128} },
12824 .block_erase = erase_sector_jedec,
12825 }, {
12826 .eraseblocks = { {64 * 1024, 1} },
12827 .block_erase = erase_chip_block_jedec,
12828 },
12829 },
12830 .write = write_jedec_1,
12831 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012832 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012833 .prepare_access = prepare_memory_access,
12834 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012835 },
12836
12837 {
12838 .vendor = "MoselVitelic",
12839 .name = "V29C51000T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012840 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012841 .manufacture_id = SYNCMOS_MVC_ID,
12842 .model_id = MVC_V29C51000T,
12843 .total_size = 64,
12844 .page_size = 512,
12845 .feature_bits = FEATURE_EITHER_RESET,
12846 .tested = TEST_UNTESTED,
12847 .probe = probe_jedec,
12848 .probe_timing = TIMING_ZERO,
12849 .block_erasers =
12850 {
12851 {
12852 .eraseblocks = { {512, 128} },
12853 .block_erase = erase_sector_jedec,
12854 }, {
12855 .eraseblocks = { {64 * 1024, 1} },
12856 .block_erase = erase_chip_block_jedec,
12857 },
12858 },
12859 .write = write_jedec_1,
12860 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012861 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012862 .prepare_access = prepare_memory_access,
12863 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012864 },
12865
12866 {
12867 .vendor = "MoselVitelic",
12868 .name = "V29C51400B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012869 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012870 .manufacture_id = SYNCMOS_MVC_ID,
12871 .model_id = MVC_V29C51400B,
12872 .total_size = 512,
12873 .page_size = 1024,
12874 .feature_bits = FEATURE_EITHER_RESET,
12875 .tested = TEST_UNTESTED,
12876 .probe = probe_jedec,
12877 .probe_timing = TIMING_ZERO,
12878 .block_erasers =
12879 {
12880 {
12881 .eraseblocks = { {1024, 512} },
12882 .block_erase = erase_sector_jedec,
12883 }, {
12884 .eraseblocks = { {512 * 1024, 1} },
12885 .block_erase = erase_chip_block_jedec,
12886 },
12887 },
12888 .write = write_jedec_1,
12889 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012890 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012891 .prepare_access = prepare_memory_access,
12892 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012893 },
12894
12895 {
12896 .vendor = "MoselVitelic",
12897 .name = "V29C51400T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012898 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012899 .manufacture_id = SYNCMOS_MVC_ID,
12900 .model_id = MVC_V29C51400T,
12901 .total_size = 512,
12902 .page_size = 1024,
12903 .feature_bits = FEATURE_EITHER_RESET,
12904 .tested = TEST_UNTESTED,
12905 .probe = probe_jedec,
12906 .probe_timing = TIMING_ZERO,
12907 .block_erasers =
12908 {
12909 {
12910 .eraseblocks = { {1024, 512} },
12911 .block_erase = erase_sector_jedec,
12912 }, {
12913 .eraseblocks = { {512 * 1024, 1} },
12914 .block_erase = erase_chip_block_jedec,
12915 },
12916 },
12917 .write = write_jedec_1,
12918 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012919 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012920 .prepare_access = prepare_memory_access,
12921 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012922 },
12923
12924 {
12925 .vendor = "MoselVitelic",
12926 .name = "V29LC51000",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012927 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012928 .manufacture_id = SYNCMOS_MVC_ID,
12929 .model_id = MVC_V29LC51000,
12930 .total_size = 64,
12931 .page_size = 512,
12932 .feature_bits = FEATURE_EITHER_RESET,
12933 .tested = TEST_UNTESTED,
12934 .probe = probe_jedec,
12935 .probe_timing = TIMING_ZERO,
12936 .block_erasers =
12937 {
12938 {
12939 .eraseblocks = { {512, 128} },
12940 .block_erase = erase_sector_jedec,
12941 }, {
12942 .eraseblocks = { {64 * 1024, 1} },
12943 .block_erase = erase_chip_block_jedec,
12944 },
12945 },
12946 .write = write_jedec_1,
12947 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012948 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012949 .prepare_access = prepare_memory_access,
12950 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012951 },
12952
12953 {
12954 .vendor = "MoselVitelic",
12955 .name = "V29LC51001",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012956 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012957 .manufacture_id = SYNCMOS_MVC_ID,
12958 .model_id = MVC_V29LC51001,
12959 .total_size = 128,
12960 .page_size = 512,
12961 .feature_bits = FEATURE_EITHER_RESET,
12962 .tested = TEST_UNTESTED,
12963 .probe = probe_jedec,
12964 .probe_timing = TIMING_ZERO,
12965 .block_erasers =
12966 {
12967 {
12968 .eraseblocks = { {512, 256} },
12969 .block_erase = erase_sector_jedec,
12970 }, {
12971 .eraseblocks = { {128 * 1024, 1} },
12972 .block_erase = erase_chip_block_jedec,
12973 },
12974 },
12975 .write = write_jedec_1,
12976 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012977 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012978 .prepare_access = prepare_memory_access,
12979 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012980 },
12981
12982 {
12983 .vendor = "MoselVitelic",
12984 .name = "V29LC51002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012985 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000012986 .manufacture_id = SYNCMOS_MVC_ID,
12987 .model_id = MVC_V29LC51002,
12988 .total_size = 256,
12989 .page_size = 512,
12990 .feature_bits = FEATURE_EITHER_RESET,
12991 .tested = TEST_UNTESTED,
12992 .probe = probe_jedec,
12993 .probe_timing = TIMING_ZERO,
12994 .block_erasers =
12995 {
12996 {
12997 .eraseblocks = { {512, 512} },
12998 .block_erase = erase_sector_jedec,
12999 }, {
13000 .eraseblocks = { {256 * 1024, 1} },
13001 .block_erase = erase_chip_block_jedec,
13002 },
13003 },
13004 .write = write_jedec_1,
13005 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013006 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013007 .prepare_access = prepare_memory_access,
13008 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013009 },
13010
13011 {
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013012 .vendor = "Nantronics",
13013 .name = "N25S10",
13014 .bustype = BUS_SPI,
13015 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13016 .model_id = NANTRONICS_N25S10,
13017 .total_size = 128,
13018 .page_size = 256,
13019 .feature_bits = FEATURE_WRSR_WREN,
13020 .tested = TEST_UNTESTED,
13021 .probe = probe_spi_rdid,
13022 .probe_timing = TIMING_ZERO,
13023 .block_erasers =
13024 {
13025 {
13026 .eraseblocks = { {4 * 1024, 32} },
13027 .block_erase = spi_block_erase_20,
13028 }, {
13029 .eraseblocks = { {4 * 1024, 32} },
13030 .block_erase = spi_block_erase_d7,
13031 }, {
13032 .eraseblocks = { {32 * 1024, 4} },
13033 .block_erase = spi_block_erase_52,
13034 }, {
13035 .eraseblocks = { {64 * 1024, 2} },
13036 .block_erase = spi_block_erase_d8,
13037 }, {
13038 .eraseblocks = { {128 * 1024, 1} },
13039 .block_erase = spi_block_erase_60,
13040 }, {
13041 .eraseblocks = { {128 * 1024, 1} },
13042 .block_erase = spi_block_erase_c7,
13043 }
13044 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013045 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013046 .unlock = spi_disable_blockprotect_bp3_srwd,
13047 .write = spi_chip_write_256,
13048 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13049 .voltage = {2700, 3600},
13050 },
13051
13052 {
13053 .vendor = "Nantronics",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013054 .name = "N25S16",
13055 .bustype = BUS_SPI,
13056 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13057 .model_id = NANTRONICS_N25S16,
13058 .total_size = 2048,
13059 .page_size = 256,
13060 .feature_bits = FEATURE_WRSR_WREN,
13061 .tested = TEST_UNTESTED,
13062 .probe = probe_spi_rdid,
13063 .probe_timing = TIMING_ZERO,
13064 .block_erasers =
13065 {
13066 {
13067 .eraseblocks = { {4 * 1024, 512} },
13068 .block_erase = spi_block_erase_20,
13069 }, {
13070 .eraseblocks = { {64 * 1024, 32} },
13071 .block_erase = spi_block_erase_d8,
13072 }, {
13073 .eraseblocks = { {2048 * 1024, 1} },
13074 .block_erase = spi_block_erase_60,
13075 }, {
13076 .eraseblocks = { {2048 * 1024, 1} },
13077 .block_erase = spi_block_erase_c7,
13078 }
13079 },
13080 .printlock = spi_prettyprint_status_register_bp3_srwd,
13081 .unlock = spi_disable_blockprotect_bp3_srwd,
13082 .write = spi_chip_write_256,
13083 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13084 .voltage = {2700, 3600},
13085 },
13086
13087 {
13088 .vendor = "Nantronics",
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013089 .name = "N25S20",
13090 .bustype = BUS_SPI,
13091 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13092 .model_id = NANTRONICS_N25S20,
13093 .total_size = 256,
13094 .page_size = 256,
13095 .feature_bits = FEATURE_WRSR_WREN,
13096 .tested = TEST_UNTESTED,
13097 .probe = probe_spi_rdid,
13098 .probe_timing = TIMING_ZERO,
13099 .block_erasers =
13100 {
13101 {
13102 .eraseblocks = { {4 * 1024, 64} },
13103 .block_erase = spi_block_erase_20,
13104 }, {
13105 .eraseblocks = { {4 * 1024, 64} },
13106 .block_erase = spi_block_erase_d7,
13107 }, {
13108 .eraseblocks = { {32 * 1024, 8} },
13109 .block_erase = spi_block_erase_52,
13110 }, {
13111 .eraseblocks = { {64 * 1024, 4} },
13112 .block_erase = spi_block_erase_d8,
13113 }, {
13114 .eraseblocks = { {256 * 1024, 1} },
13115 .block_erase = spi_block_erase_60,
13116 }, {
13117 .eraseblocks = { {256 * 1024, 1} },
13118 .block_erase = spi_block_erase_c7,
13119 }
13120 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013121 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013122 .unlock = spi_disable_blockprotect_bp3_srwd,
13123 .write = spi_chip_write_256,
13124 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13125 .voltage = {2700, 3600},
13126 },
13127
13128 {
13129 .vendor = "Nantronics",
13130 .name = "N25S40",
13131 .bustype = BUS_SPI,
13132 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13133 .model_id = NANTRONICS_N25S40,
13134 .total_size = 512,
13135 .page_size = 256,
13136 .feature_bits = FEATURE_WRSR_WREN,
13137 .tested = TEST_UNTESTED,
13138 .probe = probe_spi_rdid,
13139 .probe_timing = TIMING_ZERO,
13140 .block_erasers =
13141 {
13142 {
13143 .eraseblocks = { {4 * 1024, 128} },
13144 .block_erase = spi_block_erase_20,
13145 }, {
13146 .eraseblocks = { {4 * 1024, 128} },
13147 .block_erase = spi_block_erase_d7,
13148 }, {
13149 .eraseblocks = { {32 * 1024, 16} },
13150 .block_erase = spi_block_erase_52,
13151 }, {
13152 .eraseblocks = { {64 * 1024, 8} },
13153 .block_erase = spi_block_erase_d8,
13154 }, {
13155 .eraseblocks = { {512 * 1024, 1} },
13156 .block_erase = spi_block_erase_60,
13157 }, {
13158 .eraseblocks = { {512 * 1024, 1} },
13159 .block_erase = spi_block_erase_c7,
13160 }
13161 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013162 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013163 .unlock = spi_disable_blockprotect_bp3_srwd,
13164 .write = spi_chip_write_256,
13165 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13166 .voltage = {2700, 3600},
13167 },
13168
13169 {
13170 .vendor = "Nantronics",
13171 .name = "N25S80",
13172 .bustype = BUS_SPI,
13173 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13174 .model_id = NANTRONICS_N25S80,
13175 .total_size = 1024,
13176 .page_size = 256,
13177 .feature_bits = FEATURE_WRSR_WREN,
13178 .tested = TEST_UNTESTED,
13179 .probe = probe_spi_rdid,
13180 .probe_timing = TIMING_ZERO,
13181 .block_erasers =
13182 {
13183 {
13184 .eraseblocks = { {4 * 1024, 256} },
13185 .block_erase = spi_block_erase_20,
13186 }, {
13187 .eraseblocks = { {32 * 1024, 32} },
13188 .block_erase = spi_block_erase_52,
13189 }, {
13190 .eraseblocks = { {64 * 1024, 16} },
13191 .block_erase = spi_block_erase_d8,
13192 }, {
13193 .eraseblocks = { {1024 * 1024, 1} },
13194 .block_erase = spi_block_erase_60,
13195 }, {
13196 .eraseblocks = { {1024 * 1024, 1} },
13197 .block_erase = spi_block_erase_c7,
13198 }
13199 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013200 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013201 .unlock = spi_disable_blockprotect_bp3_srwd,
13202 .write = spi_chip_write_256,
13203 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13204 .voltage = {2700, 3600},
13205 },
13206
13207 {
Stefan Taunerf4451612013-04-19 01:59:15 +000013208 .vendor = "PMC",
13209 .name = "Pm25LD010(C)",
13210 .bustype = BUS_SPI,
13211 .manufacture_id = PMC_ID,
13212 .model_id = PMC_PM25LD010,
13213 .total_size = 128,
13214 .page_size = 256,
13215 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000013216 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013217 .probe = probe_spi_rdid,
13218 .probe_timing = TIMING_ZERO,
13219 .block_erasers =
13220 {
13221 {
13222 .eraseblocks = { {4 * 1024, 32} },
13223 .block_erase = spi_block_erase_20,
13224 }, {
13225 .eraseblocks = { {4 * 1024, 32} },
13226 .block_erase = spi_block_erase_d7,
13227 }, {
13228 .eraseblocks = { {32 * 1024, 4} },
13229 .block_erase = spi_block_erase_d8,
13230 }, {
13231 .eraseblocks = { {128 * 1024, 1} },
13232 .block_erase = spi_block_erase_60,
13233 }, {
13234 .eraseblocks = { {128 * 1024, 1} },
13235 .block_erase = spi_block_erase_c7,
13236 }
13237 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013238 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013239 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13240 .write = spi_chip_write_256,
13241 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13242 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD010 */
13243 },
13244
13245 {
13246 .vendor = "PMC",
13247 .name = "Pm25LD020(C)",
13248 .bustype = BUS_SPI,
13249 .manufacture_id = PMC_ID,
13250 .model_id = PMC_PM25LD020,
13251 .total_size = 256,
13252 .page_size = 256,
13253 .feature_bits = FEATURE_WRSR_WREN,
Angel Ponsf5822a82018-09-30 20:09:58 +020013254 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013255 .probe = probe_spi_rdid,
13256 .probe_timing = TIMING_ZERO,
13257 .block_erasers =
13258 {
13259 {
13260 .eraseblocks = { {4 * 1024, 64} },
13261 .block_erase = spi_block_erase_20,
13262 }, {
13263 .eraseblocks = { {4 * 1024, 64} },
13264 .block_erase = spi_block_erase_d7,
13265 }, {
13266 .eraseblocks = { {64 * 1024, 4} },
13267 .block_erase = spi_block_erase_d8,
13268 }, {
13269 .eraseblocks = { {256 * 1024, 1} },
13270 .block_erase = spi_block_erase_60,
13271 }, {
13272 .eraseblocks = { {256 * 1024, 1} },
13273 .block_erase = spi_block_erase_c7,
13274 }
13275 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013276 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013277 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13278 .write = spi_chip_write_256,
13279 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13280 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD020 */
13281 },
13282
13283 {
13284 .vendor = "PMC",
13285 .name = "Pm25LD040(C)",
13286 .bustype = BUS_SPI,
13287 .manufacture_id = PMC_ID,
13288 .model_id = PMC_PM25LV040,
13289 .total_size = 512,
13290 .page_size = 256,
13291 .feature_bits = FEATURE_WRSR_WREN,
Angel Pons05127bf2018-09-30 20:23:24 +020013292 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013293 .probe = probe_spi_rdid,
13294 .probe_timing = TIMING_ZERO,
13295 .block_erasers =
13296 {
13297 {
13298 .eraseblocks = { {4 * 1024, 128} },
13299 .block_erase = spi_block_erase_20,
13300 }, {
13301 .eraseblocks = { {4 * 1024, 128} },
13302 .block_erase = spi_block_erase_d7,
13303 }, {
13304 .eraseblocks = { {64 * 1024, 8} },
13305 .block_erase = spi_block_erase_d8,
13306 }, {
13307 .eraseblocks = { {512 * 1024, 1} },
13308 .block_erase = spi_block_erase_60,
13309 }, {
13310 .eraseblocks = { {512 * 1024, 1} },
13311 .block_erase = spi_block_erase_c7,
13312 }
13313 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013314 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013315 .unlock = spi_disable_blockprotect,
13316 .write = spi_chip_write_256,
13317 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13318 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD040 */
13319 },
13320
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013321 {
13322 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013323 .name = "Pm25LD256C",
13324 .bustype = BUS_SPI,
13325 .manufacture_id = PMC_ID,
13326 .model_id = PMC_PM25LD256C,
13327 .total_size = 32,
13328 .page_size = 256,
13329 .feature_bits = FEATURE_WRSR_WREN,
13330 .tested = TEST_UNTESTED,
13331 .probe = probe_spi_rdid,
13332 .probe_timing = TIMING_ZERO,
13333 .block_erasers =
13334 {
13335 {
13336 .eraseblocks = { {4 * 1024, 8} },
13337 .block_erase = spi_block_erase_20,
13338 }, {
13339 .eraseblocks = { {4 * 1024, 8} },
13340 .block_erase = spi_block_erase_d7,
13341 }, {
13342 .eraseblocks = { {32 * 1024, 1} },
13343 .block_erase = spi_block_erase_d8,
13344 }, {
13345 .eraseblocks = { {32 * 1024, 1} },
13346 .block_erase = spi_block_erase_60,
13347 }, {
13348 .eraseblocks = { {32 * 1024, 1} },
13349 .block_erase = spi_block_erase_c7,
13350 }
13351 },
13352 .printlock = spi_prettyprint_status_register_bp2_srwd,
13353 .unlock = spi_disable_blockprotect,
13354 .write = spi_chip_write_256,
13355 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13356 .voltage = {2700, 3600},
13357 },
13358
13359 {
13360 .vendor = "PMC",
13361 .name = "Pm25LD512(C)",
13362 .bustype = BUS_SPI,
13363 .manufacture_id = PMC_ID,
13364 .model_id = PMC_PM25LD512,
13365 .total_size = 64,
13366 .page_size = 256,
13367 .feature_bits = FEATURE_WRSR_WREN,
13368 .tested = TEST_OK_PREW,
13369 .probe = probe_spi_rdid,
13370 .probe_timing = TIMING_ZERO,
13371 .block_erasers =
13372 {
13373 {
13374 .eraseblocks = { {4 * 1024, 16} },
13375 .block_erase = spi_block_erase_20,
13376 }, {
13377 .eraseblocks = { {4 * 1024, 16} },
13378 .block_erase = spi_block_erase_d7,
13379 }, {
13380 .eraseblocks = { {32 * 1024, 2} },
13381 .block_erase = spi_block_erase_d8,
13382 }, {
13383 .eraseblocks = { {64 * 1024, 1} },
13384 .block_erase = spi_block_erase_60,
13385 }, {
13386 .eraseblocks = { {64 * 1024, 1} },
13387 .block_erase = spi_block_erase_c7,
13388 }
13389 },
13390 .printlock = spi_prettyprint_status_register_bp2_srwd,
13391 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13392 .write = spi_chip_write_256,
13393 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13394 .voltage = {2300, 3600},
13395 },
13396
13397 {
13398 .vendor = "PMC",
13399 .name = "Pm25LQ016",
13400 .bustype = BUS_SPI,
13401 .manufacture_id = PMC_ID,
13402 .model_id = PMC_PM25LQ016,
13403 .total_size = 2048,
13404 .page_size = 256,
13405 /* OTP: 256B total; read 0x4B, write 0xB1 */
13406 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13407 .tested = TEST_UNTESTED,
13408 .probe = probe_spi_rdid,
13409 .probe_timing = TIMING_ZERO,
13410 .block_erasers =
13411 {
13412 {
13413 .eraseblocks = { {4 * 1024, 512} },
13414 .block_erase = spi_block_erase_20,
13415 }, {
13416 .eraseblocks = { {4 * 1024, 512} },
13417 .block_erase = spi_block_erase_d7,
13418 }, {
13419 .eraseblocks = { {64 * 1024, 32} },
13420 .block_erase = spi_block_erase_d8,
13421 }, {
13422 .eraseblocks = { {2048 * 1024, 1} },
13423 .block_erase = spi_block_erase_60,
13424 }, {
13425 .eraseblocks = { {2048 * 1024, 1} },
13426 .block_erase = spi_block_erase_c7,
13427 }
13428 },
13429 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13430 .unlock = spi_disable_blockprotect_bp3_srwd,
13431 .write = spi_chip_write_256,
13432 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13433 .voltage = {2300, 3600},
13434 },
13435
13436 {
13437 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013438 .name = "Pm25LQ020",
13439 .bustype = BUS_SPI,
13440 .manufacture_id = PMC_ID,
13441 .model_id = PMC_PM25LQ020,
13442 .total_size = 256,
13443 .page_size = 256,
13444 /* OTP: 256B total; read 0x4B, write 0xB1 */
13445 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13446 .tested = TEST_UNTESTED,
13447 .probe = probe_spi_rdid,
13448 .probe_timing = TIMING_ZERO,
13449 .block_erasers =
13450 {
13451 {
13452 .eraseblocks = { {4 * 1024, 64} },
13453 .block_erase = spi_block_erase_20,
13454 }, {
13455 .eraseblocks = { {4 * 1024, 64} },
13456 .block_erase = spi_block_erase_d7,
13457 }, {
13458 .eraseblocks = { {64 * 1024, 4} },
13459 .block_erase = spi_block_erase_d8,
13460 }, {
13461 .eraseblocks = { {256 * 1024, 1} },
13462 .block_erase = spi_block_erase_60,
13463 }, {
13464 .eraseblocks = { {256 * 1024, 1} },
13465 .block_erase = spi_block_erase_c7,
13466 }
13467 },
13468 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13469 .unlock = spi_disable_blockprotect_bp3_srwd,
13470 .write = spi_chip_write_256,
13471 .read = spi_chip_read,
13472 .voltage = {2300, 3600},
13473 },
13474
13475 {
13476 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013477 .name = "Pm25LQ032C",
13478 .bustype = BUS_SPI,
13479 .manufacture_id = PMC_ID,
13480 .model_id = PMC_PM25LQ032C,
13481 .total_size = 4096,
13482 .page_size = 256,
13483 /* OTP: 64B total; read 0x4B, write 0xB1 */
13484 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13485 .tested = TEST_OK_PREW,
13486 .probe = probe_spi_rdid,
13487 .probe_timing = TIMING_ZERO,
13488 .block_erasers =
13489 {
13490 {
13491 .eraseblocks = { {4 * 1024, 1024} },
13492 .block_erase = spi_block_erase_20,
13493 }, {
13494 .eraseblocks = { {4 * 1024, 1024} },
13495 .block_erase = spi_block_erase_d7,
13496 }, {
13497 .eraseblocks = { {64 * 1024, 64} },
13498 .block_erase = spi_block_erase_d8,
13499 }, {
13500 .eraseblocks = { {4096 * 1024, 1} },
13501 .block_erase = spi_block_erase_60,
13502 }, {
13503 .eraseblocks = { {4096 * 1024, 1} },
13504 .block_erase = spi_block_erase_c7,
13505 }
13506 },
13507 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13508 .unlock = spi_disable_blockprotect_bp3_srwd,
13509 .write = spi_chip_write_256,
13510 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13511 .voltage = {2700, 3600},
13512 },
13513
13514 {
13515 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013516 .name = "Pm25LQ040",
13517 .bustype = BUS_SPI,
13518 .manufacture_id = PMC_ID,
13519 .model_id = PMC_PM25LQ040,
13520 .total_size = 512,
13521 .page_size = 256,
13522 /* OTP: 256B total; read 0x4B, write 0xB1 */
13523 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13524 .tested = TEST_UNTESTED,
13525 .probe = probe_spi_rdid,
13526 .probe_timing = TIMING_ZERO,
13527 .block_erasers =
13528 {
13529 {
13530 .eraseblocks = { {4 * 1024, 128} },
13531 .block_erase = spi_block_erase_20,
13532 }, {
13533 .eraseblocks = { {4 * 1024, 128} },
13534 .block_erase = spi_block_erase_d7,
13535 }, {
13536 .eraseblocks = { {64 * 1024, 8} },
13537 .block_erase = spi_block_erase_d8,
13538 }, {
13539 .eraseblocks = { {512 * 1024, 1} },
13540 .block_erase = spi_block_erase_60,
13541 }, {
13542 .eraseblocks = { {512 * 1024, 1} },
13543 .block_erase = spi_block_erase_c7,
13544 }
13545 },
13546 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13547 .unlock = spi_disable_blockprotect_bp3_srwd,
13548 .write = spi_chip_write_256,
13549 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13550 .voltage = {2300, 3600},
13551 },
13552
13553 {
13554 .vendor = "PMC",
13555 .name = "Pm25LQ080",
13556 .bustype = BUS_SPI,
13557 .manufacture_id = PMC_ID,
13558 .model_id = PMC_PM25LQ080,
13559 .total_size = 1024,
13560 .page_size = 256,
13561 /* OTP: 64B total; read 0x4B, write 0xB1 */
13562 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13563 .tested = TEST_UNTESTED,
13564 .probe = probe_spi_rdid,
13565 .probe_timing = TIMING_ZERO,
13566 .block_erasers =
13567 {
13568 {
13569 .eraseblocks = { {4 * 1024, 256} },
13570 .block_erase = spi_block_erase_20,
13571 }, {
13572 .eraseblocks = { {4 * 1024, 256} },
13573 .block_erase = spi_block_erase_d7,
13574 }, {
13575 .eraseblocks = { {64 * 1024, 16} },
13576 .block_erase = spi_block_erase_d8,
13577 }, {
13578 .eraseblocks = { {1024 * 1024, 1} },
13579 .block_erase = spi_block_erase_60,
13580 }, {
13581 .eraseblocks = { {1024 * 1024, 1} },
13582 .block_erase = spi_block_erase_c7,
13583 }
13584 },
13585 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13586 .unlock = spi_disable_blockprotect_bp3_srwd,
13587 .write = spi_chip_write_256,
13588 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13589 .voltage = {2300, 3600},
13590 },
13591
13592 {
13593 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013594 .name = "Pm25LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013595 .bustype = BUS_SPI,
Stefan Taunerbecda742014-05-30 19:34:00 +000013596 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013597 .model_id = PMC_PM25LV010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013598 .total_size = 128,
13599 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013600 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerbecda742014-05-30 19:34:00 +000013601 .tested = TEST_OK_PREW,
13602 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013603 .probe_timing = TIMING_ZERO,
13604 .block_erasers =
13605 {
13606 {
13607 .eraseblocks = { {4 * 1024, 32} },
13608 .block_erase = spi_block_erase_d7,
13609 }, {
13610 .eraseblocks = { {32 * 1024, 4} },
13611 .block_erase = spi_block_erase_d8,
13612 }, {
13613 .eraseblocks = { {128 * 1024, 1} },
13614 .block_erase = spi_block_erase_c7,
13615 }
13616 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013617 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013618 .unlock = spi_disable_blockprotect,
13619 .write = spi_chip_write_256,
13620 .read = spi_chip_read, /* Fast read (0x0B) supported */
13621 .voltage = {2700, 3600},
13622 },
13623
13624 {
13625 .vendor = "PMC",
13626 .name = "Pm25LV010A",
13627 .bustype = BUS_SPI,
13628 .manufacture_id = PMC_ID,
13629 .model_id = PMC_PM25LV010,
13630 .total_size = 128,
13631 .page_size = 256,
13632 .feature_bits = FEATURE_WRSR_WREN,
13633 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013634 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013635 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013636 .block_erasers =
13637 {
13638 {
13639 .eraseblocks = { {4 * 1024, 32} },
13640 .block_erase = spi_block_erase_d7,
13641 }, {
13642 .eraseblocks = { {32 * 1024, 4} },
13643 .block_erase = spi_block_erase_d8,
13644 }, {
13645 .eraseblocks = { {128 * 1024, 1} },
13646 .block_erase = spi_block_erase_c7,
13647 }
13648 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013649 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013650 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013651 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013652 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000013653 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013654 },
13655
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013656 {
13657 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013658 .name = "Pm25LV016B",
13659 .bustype = BUS_SPI,
13660 .manufacture_id = PMC_ID,
13661 .model_id = PMC_PM25LV016B,
13662 .total_size = 2048,
13663 .page_size = 256,
13664 .feature_bits = FEATURE_WRSR_WREN,
13665 .tested = TEST_UNTESTED,
13666 .probe = probe_spi_rdid,
13667 .probe_timing = TIMING_ZERO,
13668 .block_erasers =
13669 {
13670 {
13671 .eraseblocks = { {4 * 1024, 512} },
13672 .block_erase = spi_block_erase_d7,
13673 }, {
13674 .eraseblocks = { {4 * 1024, 512} },
13675 .block_erase = spi_block_erase_20,
13676 }, {
13677 .eraseblocks = { {64 * 1024, 32} },
13678 .block_erase = spi_block_erase_d8,
13679 }, {
13680 .eraseblocks = { {2 * 1024 * 1024, 1} },
13681 .block_erase = spi_block_erase_60,
13682 }, {
13683 .eraseblocks = { {2 * 1024 * 1024, 1} },
13684 .block_erase = spi_block_erase_c7,
13685 }
13686 },
13687 .printlock = spi_prettyprint_status_register_bp2_srwd,
13688 .unlock = spi_disable_blockprotect,
13689 .write = spi_chip_write_256,
13690 .read = spi_chip_read, /* Fast read (0x0B) supported */
13691 .voltage = {2700, 3600},
13692 },
13693
13694 {
13695 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013696 .name = "Pm25LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013697 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013698 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013699 .model_id = PMC_PM25LV020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013700 .total_size = 256,
13701 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013702 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013703 .tested = TEST_UNTESTED,
13704 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013705 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013706 .block_erasers =
13707 {
13708 {
13709 .eraseblocks = { {4 * 1024, 64} },
13710 .block_erase = spi_block_erase_d7,
13711 }, {
13712 .eraseblocks = { {64 * 1024, 4} },
13713 .block_erase = spi_block_erase_d8,
13714 }, {
13715 .eraseblocks = { {256 * 1024, 1} },
13716 .block_erase = spi_block_erase_c7,
13717 }
13718 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013719 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013720 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013721 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013722 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013723 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013724 },
13725
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013726 {
13727 .vendor = "PMC",
13728 .name = "Pm25LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013729 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013730 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013731 .model_id = PMC_PM25LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013732 .total_size = 512,
13733 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013734 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner716e0982011-07-25 20:38:52 +000013735 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013736 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013737 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013738 .block_erasers =
13739 {
13740 {
13741 .eraseblocks = { {4 * 1024, 128} },
13742 .block_erase = spi_block_erase_d7,
13743 }, {
13744 .eraseblocks = { {64 * 1024, 8} },
13745 .block_erase = spi_block_erase_d8,
13746 }, {
13747 .eraseblocks = { {512 * 1024, 1} },
13748 .block_erase = spi_block_erase_c7,
13749 }
13750 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013751 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013752 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013753 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013754 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013755 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013756 },
13757
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013758 {
13759 .vendor = "PMC",
13760 .name = "Pm25LV080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013761 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013762 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013763 .model_id = PMC_PM25LV080B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013764 .total_size = 1024,
13765 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013766 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013767 .tested = TEST_UNTESTED,
13768 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013769 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013770 .block_erasers =
13771 {
13772 {
13773 .eraseblocks = { {4 * 1024, 256} },
13774 .block_erase = spi_block_erase_d7,
13775 }, {
13776 .eraseblocks = { {4 * 1024, 256} },
13777 .block_erase = spi_block_erase_20,
13778 }, {
13779 .eraseblocks = { {64 * 1024, 16} },
13780 .block_erase = spi_block_erase_d8,
13781 }, {
13782 .eraseblocks = { {1024 * 1024, 1} },
13783 .block_erase = spi_block_erase_60,
13784 }, {
13785 .eraseblocks = { {1024 * 1024, 1} },
13786 .block_erase = spi_block_erase_c7,
13787 }
13788 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013789 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013790 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013791 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013792 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013793 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013794 },
13795
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013796 {
13797 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013798 .name = "Pm25LV512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013799 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013800 .manufacture_id = PMC_ID_NOPREFIX,
13801 .model_id = PMC_PM25LV512,
13802 .total_size = 64,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013803 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013804 .feature_bits = FEATURE_WRSR_WREN,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013805 .tested = TEST_OK_PREW,
13806 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013807 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013808 .block_erasers =
13809 {
13810 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013811 .eraseblocks = { {4 * 1024, 16} },
Sean Nelson5643c072010-01-19 03:23:07 +000013812 .block_erase = spi_block_erase_d7,
13813 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013814 .eraseblocks = { {32 * 1024, 2} },
Sean Nelson5643c072010-01-19 03:23:07 +000013815 .block_erase = spi_block_erase_d8,
13816 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013817 .eraseblocks = { {64 * 1024, 1} },
Sean Nelson5643c072010-01-19 03:23:07 +000013818 .block_erase = spi_block_erase_c7,
13819 }
13820 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100013821 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013822 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013823 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013824 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000013825 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013826 },
13827
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013828 {
13829 .vendor = "PMC",
Sean Nelson72a9a022009-12-22 22:15:33 +000013830 .name = "Pm29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013831 .bustype = BUS_PARALLEL,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013832 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013833 .model_id = PMC_PM29F002B,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013834 .total_size = 256,
Sean Nelson72a9a022009-12-22 22:15:33 +000013835 .page_size = 8 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000013836 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013837 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000013838 .probe = probe_jedec,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013839 .probe_timing = TIMING_FIXME,
Sean Nelson72a9a022009-12-22 22:15:33 +000013840 .block_erasers =
13841 {
13842 {
13843 .eraseblocks = {
13844 {16 * 1024, 1},
13845 {8 * 1024, 2},
13846 {96 * 1024, 1},
13847 {128 * 1024, 1},
13848 },
Sean Nelson35727f72010-01-28 23:55:12 +000013849 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000013850 }, {
13851 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000013852 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000013853 },
13854 },
Sean Nelson35727f72010-01-28 23:55:12 +000013855 .write = write_jedec_1,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013856 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013857 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013858 .prepare_access = prepare_memory_access,
13859 .finish_access = finish_memory_access,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000013860 },
13861
13862 {
13863 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013864 .name = "Pm29F002T",
13865 .bustype = BUS_PARALLEL,
13866 .manufacture_id = PMC_ID_NOPREFIX,
13867 .model_id = PMC_PM29F002T,
13868 .total_size = 256,
13869 .page_size = 8 * 1024,
13870 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
13871 .tested = TEST_OK_PREW,
13872 .probe = probe_jedec,
13873 .probe_timing = TIMING_FIXME,
13874 .block_erasers =
13875 {
13876 {
13877 .eraseblocks = {
13878 {128 * 1024, 1},
13879 {96 * 1024, 1},
13880 {8 * 1024, 2},
13881 {16 * 1024, 1},
13882 },
13883 .block_erase = erase_sector_jedec,
13884 }, {
13885 .eraseblocks = { {256 * 1024, 1} },
13886 .block_erase = erase_chip_block_jedec,
13887 },
13888 },
13889 .write = write_jedec_1,
13890 .read = read_memmapped,
13891 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013892 .prepare_access = prepare_memory_access,
13893 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013894 },
13895
13896 {
13897 .vendor = "PMC",
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013898 .name = "Pm39LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013899 .bustype = BUS_PARALLEL,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013900 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013901 .model_id = PMC_PM39F010, /* Pm39LV010 and Pm39F010 have identical IDs but different voltage */
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013902 .total_size = 128,
13903 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000013904 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000013905 .tested = TEST_OK_PREW,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013906 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000013907 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson5643c072010-01-19 03:23:07 +000013908 .block_erasers =
13909 {
13910 {
13911 .eraseblocks = { {4 * 1024, 32} },
13912 .block_erase = erase_sector_jedec,
13913 }, {
13914 .eraseblocks = { {64 * 1024, 2} },
13915 .block_erase = erase_block_jedec,
13916 }, {
13917 .eraseblocks = { {128 * 1024, 1} },
13918 .block_erase = erase_chip_block_jedec,
13919 }
13920 },
Sean Nelson35727f72010-01-28 23:55:12 +000013921 .write = write_jedec_1,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013922 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013923 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013924 .prepare_access = prepare_memory_access,
13925 .finish_access = finish_memory_access,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000013926 },
13927
13928 {
13929 .vendor = "PMC",
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013930 .name = "Pm39LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013931 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013932 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013933 .model_id = PMC_PM39LV020,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013934 .total_size = 256,
13935 .page_size = 4096,
13936 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
13937 .tested = TEST_UNTESTED,
13938 .probe = probe_jedec,
13939 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100013940 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013941 {
13942 {
13943 .eraseblocks = { {4 * 1024, 64} },
13944 .block_erase = erase_sector_jedec,
13945 }, {
13946 .eraseblocks = { {64 * 1024, 4} },
13947 .block_erase = erase_block_jedec,
13948 }, {
13949 .eraseblocks = { {256 * 1024, 1} },
13950 .block_erase = erase_chip_block_jedec,
13951 }
13952 },
13953 .write = write_jedec_1,
13954 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013955 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013956 .prepare_access = prepare_memory_access,
13957 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013958 },
13959
13960 {
13961 .vendor = "PMC",
13962 .name = "Pm39LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013963 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013964 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013965 .model_id = PMC_PM39LV040,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013966 .total_size = 512,
13967 .page_size = 4096,
13968 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000013969 .tested = TEST_OK_PR,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013970 .probe = probe_jedec,
13971 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100013972 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013973 {
13974 {
13975 .eraseblocks = { {4 * 1024, 128} },
13976 .block_erase = erase_sector_jedec,
13977 }, {
13978 .eraseblocks = { {64 * 1024, 8} },
13979 .block_erase = erase_block_jedec,
13980 }, {
13981 .eraseblocks = { {512 * 1024, 1} },
13982 .block_erase = erase_chip_block_jedec,
13983 }
13984 },
13985 .write = write_jedec_1,
13986 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013987 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013988 .prepare_access = prepare_memory_access,
13989 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000013990 },
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000013991
13992 {
13993 .vendor = "PMC",
13994 .name = "Pm39LV512",
13995 .bustype = BUS_PARALLEL,
13996 .manufacture_id = PMC_ID_NOPREFIX,
13997 .model_id = PMC_PM39LV512,
13998 .total_size = 64,
13999 .page_size = 4096,
14000 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
14001 .tested = TEST_OK_PREW,
14002 .probe = probe_jedec,
14003 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
14004 .block_erasers =
14005 {
14006 {
14007 .eraseblocks = { {4 * 1024, 16} },
14008 .block_erase = erase_sector_jedec,
14009 }, {
14010 .eraseblocks = { {64 * 1024, 1} },
14011 .block_erase = erase_block_jedec,
14012 }, {
14013 .eraseblocks = { {64 * 1024, 1} },
14014 .block_erase = erase_chip_block_jedec,
14015 }
14016 },
14017 .write = write_jedec_1,
14018 .read = read_memmapped,
14019 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010014020 .prepare_access = prepare_memory_access,
14021 .finish_access = finish_memory_access,
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000014022 },
14023
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014024 {
14025 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014026 .name = "Pm49FL002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014027 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014028 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014029 .model_id = PMC_PM49FL002,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014030 .total_size = 256,
14031 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010014032 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014033 .tested = TEST_OK_PR,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000014034 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000014035 .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */
Sean Nelson5643c072010-01-19 03:23:07 +000014036 .block_erasers =
14037 {
14038 {
14039 .eraseblocks = { {4 * 1024, 64} },
14040 .block_erase = erase_sector_jedec,
14041 }, {
14042 .eraseblocks = { {16 * 1024, 16} },
14043 .block_erase = erase_block_jedec,
14044 }, {
14045 .eraseblocks = { {256 * 1024, 1} },
14046 .block_erase = erase_chip_block_jedec,
14047 }
14048 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014049 .unlock = unlock_regspace2_uniform_32k,
Sean Nelson36172342010-02-27 18:01:15 +000014050 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000014051 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014052 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010014053 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010014054 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000014055 },
14056
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014057 {
14058 .vendor = "PMC",
14059 .name = "Pm49FL004",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014060 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014061 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014062 .model_id = PMC_PM49FL004,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014063 .total_size = 512,
14064 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010014065 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000014066 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000014067 .probe = probe_jedec,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000014068 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000014069 .block_erasers =
14070 {
14071 {
14072 .eraseblocks = { {4 * 1024, 128} },
14073 .block_erase = erase_sector_jedec,
14074 }, {
14075 .eraseblocks = { {64 * 1024, 8} },
14076 .block_erase = erase_block_jedec,
14077 }, {
14078 .eraseblocks = { {512 * 1024, 1} },
14079 .block_erase = erase_chip_block_jedec,
14080 }
14081 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014082 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson36172342010-02-27 18:01:15 +000014083 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000014084 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014085 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010014086 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010014087 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000014088 },
14089
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014090 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014091 .vendor = "SST",
Idwer Volleringf3607d12014-05-07 15:25:04 +000014092 .name = "SST25LF020A",
14093 .bustype = BUS_SPI,
14094 .manufacture_id = SST_ID,
14095 .model_id = SST_SST25VF020_REMS,
14096 .total_size = 256,
14097 .page_size = 256,
14098 .feature_bits = FEATURE_WRSR_EWSR,
14099 .tested = TEST_OK_PREW,
14100 .probe = probe_spi_rems,
14101 .probe_timing = TIMING_ZERO,
14102 .block_erasers =
14103 {
14104 {
14105 .eraseblocks = { {4 * 1024, 64} },
14106 .block_erase = spi_block_erase_20,
14107 }, {
14108 .eraseblocks = { {32 * 1024, 8} },
14109 .block_erase = spi_block_erase_52,
14110 }, {
14111 .eraseblocks = { {256 * 1024, 1} },
14112 .block_erase = spi_block_erase_60,
14113 },
14114 },
14115 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14116 .unlock = spi_disable_blockprotect,
14117 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14118 .read = spi_chip_read, /* Fast read (0x0B) supported */
14119 .voltage = {2700, 3600},
14120 },
14121
14122 {
14123 .vendor = "SST",
Zeus Castro33670ba2011-08-17 09:50:11 +000014124 .name = "SST25LF040A",
14125 .bustype = BUS_SPI,
14126 .manufacture_id = SST_ID,
14127 .model_id = SST_SST25VF040_REMS,
14128 .total_size = 512,
14129 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000014130 .feature_bits = FEATURE_WRSR_EWSR,
Uwe Hermann4335ec82011-09-07 20:20:25 +000014131 .tested = TEST_OK_PREW,
Zeus Castro33670ba2011-08-17 09:50:11 +000014132 .probe = probe_spi_res2,
14133 .probe_timing = TIMING_ZERO,
14134 .block_erasers =
14135 {
14136 {
14137 .eraseblocks = { {4 * 1024, 128} },
14138 .block_erase = spi_block_erase_20,
14139 }, {
14140 .eraseblocks = { {32 * 1024, 16} },
14141 .block_erase = spi_block_erase_52,
14142 }, {
14143 .eraseblocks = { {512 * 1024, 1} },
14144 .block_erase = spi_block_erase_60,
14145 },
14146 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014147 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000014148 .unlock = spi_disable_blockprotect,
14149 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14150 .read = spi_chip_read,
14151 .voltage = {3000, 3600},
14152 },
14153
14154 {
14155 .vendor = "SST",
Stefan Taunere34e3e82013-01-01 00:06:51 +000014156 .name = "SST25LF080(A)",
Zeus Castro33670ba2011-08-17 09:50:11 +000014157 .bustype = BUS_SPI,
14158 .manufacture_id = SST_ID,
14159 .model_id = SST_SST25VF080_REMS,
14160 .total_size = 1024,
14161 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000014162 .feature_bits = FEATURE_WRSR_EITHER,
Zeus Castro33670ba2011-08-17 09:50:11 +000014163 .tested = TEST_UNTESTED,
14164 .probe = probe_spi_res2,
14165 .probe_timing = TIMING_ZERO,
14166 .block_erasers =
14167 {
14168 {
14169 .eraseblocks = { {4 * 1024, 256} },
14170 .block_erase = spi_block_erase_20,
14171 }, {
14172 .eraseblocks = { {32 * 1024, 32} },
14173 .block_erase = spi_block_erase_52,
14174 }, {
14175 .eraseblocks = { {1024 * 1024, 1} },
14176 .block_erase = spi_block_erase_60,
14177 },
14178 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014179 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000014180 .unlock = spi_disable_blockprotect,
14181 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14182 .read = spi_chip_read,
14183 .voltage = {3000, 3600},
14184 },
14185
14186 {
14187 .vendor = "SST",
Stefan Tauner6697f712014-08-06 15:09:15 +000014188 .name = "SST25VF010(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014189 .bustype = BUS_SPI,
Mark Marshall90021f22010-12-03 14:48:11 +000014190 .manufacture_id = SST_ID,
14191 .model_id = SST_SST25VF010_REMS,
14192 .total_size = 128,
14193 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000014194 .feature_bits = FEATURE_WRSR_EWSR,
Mark Marshall90021f22010-12-03 14:48:11 +000014195 .tested = TEST_OK_PREW,
14196 .probe = probe_spi_rems,
14197 .probe_timing = TIMING_ZERO,
14198 .block_erasers =
14199 {
14200 {
14201 .eraseblocks = { {4 * 1024, 32} },
14202 .block_erase = spi_block_erase_20,
14203 }, {
14204 .eraseblocks = { {32 * 1024, 4} },
14205 .block_erase = spi_block_erase_52,
14206 }, {
Cory Henderson370f5822013-10-19 23:09:16 +000014207 .eraseblocks = { {32 * 1024, 4} },
Stefan Tauner6697f712014-08-06 15:09:15 +000014208 .block_erase = spi_block_erase_d8, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014209 }, {
Mark Marshall90021f22010-12-03 14:48:11 +000014210 .eraseblocks = { {128 * 1024, 1} },
14211 .block_erase = spi_block_erase_60,
Cory Henderson370f5822013-10-19 23:09:16 +000014212 }, {
14213 .eraseblocks = { {128 * 1024, 1} },
Stefan Tauner6697f712014-08-06 15:09:15 +000014214 .block_erase = spi_block_erase_c7, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014215 },
14216 },
14217 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14218 .unlock = spi_disable_blockprotect,
14219 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
Stefan Tauner6697f712014-08-06 15:09:15 +000014220 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014221 .voltage = {2700, 3600},
14222 },
14223
14224 {
14225 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014226 .name = "SST25VF016B",
14227 .bustype = BUS_SPI,
14228 .manufacture_id = SST_ID,
14229 .model_id = SST_SST25VF016B,
14230 .total_size = 2048,
14231 .page_size = 256,
14232 .feature_bits = FEATURE_WRSR_EITHER,
14233 .tested = TEST_OK_PREW,
14234 .probe = probe_spi_rdid,
14235 .probe_timing = TIMING_ZERO,
14236 .block_erasers =
14237 {
14238 {
14239 .eraseblocks = { {4 * 1024, 512} },
14240 .block_erase = spi_block_erase_20,
14241 }, {
14242 .eraseblocks = { {32 * 1024, 64} },
14243 .block_erase = spi_block_erase_52,
14244 }, {
14245 .eraseblocks = { {64 * 1024, 32} },
14246 .block_erase = spi_block_erase_d8,
14247 }, {
14248 .eraseblocks = { {2 * 1024 * 1024, 1} },
14249 .block_erase = spi_block_erase_60,
14250 }, {
14251 .eraseblocks = { {2 * 1024 * 1024, 1} },
14252 .block_erase = spi_block_erase_c7,
14253 },
14254 },
14255 .printlock = spi_prettyprint_status_register_sst25vf016,
14256 .unlock = spi_disable_blockprotect,
14257 .write = spi_aai_write,
14258 .read = spi_chip_read,
14259 .voltage = {2700, 3600},
14260 },
14261
14262 {
14263 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014264 .name = "SST25VF020",
14265 .bustype = BUS_SPI,
14266 .manufacture_id = SST_ID,
14267 .model_id = SST_SST25VF020_REMS,
14268 .total_size = 256,
14269 .page_size = 256,
14270 .feature_bits = FEATURE_WRSR_EWSR,
14271 .tested = TEST_UNTESTED,
14272 .probe = probe_spi_rems,
14273 .probe_timing = TIMING_ZERO,
14274 .block_erasers =
14275 {
14276 {
14277 .eraseblocks = { {4 * 1024, 64} },
14278 .block_erase = spi_block_erase_20,
14279 }, {
14280 .eraseblocks = { {32 * 1024, 8} },
14281 .block_erase = spi_block_erase_52,
14282 }, {
14283 .eraseblocks = { {256 * 1024, 1} },
14284 .block_erase = spi_block_erase_60,
14285 },
14286 },
14287 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14288 .unlock = spi_disable_blockprotect,
14289 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14290 .read = spi_chip_read, /* only */
14291 .voltage = {2700, 3600},
14292 },
14293
14294 {
14295 .vendor = "SST",
14296 .name = "SST25VF020B",
14297 .bustype = BUS_SPI,
14298 .manufacture_id = SST_ID,
14299 .model_id = SST_SST25VF020B,
14300 .total_size = 256,
14301 .page_size = 256,
14302 .feature_bits = FEATURE_WRSR_EWSR,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000014303 .tested = TEST_OK_PREW,
Cory Henderson370f5822013-10-19 23:09:16 +000014304 .probe = probe_spi_rdid,
14305 .probe_timing = TIMING_ZERO,
14306 .block_erasers =
14307 {
14308 {
14309 .eraseblocks = { {4 * 1024, 64} },
14310 .block_erase = spi_block_erase_20,
14311 }, {
14312 .eraseblocks = { {32 * 1024, 8} },
14313 .block_erase = spi_block_erase_52,
14314 }, {
14315 .eraseblocks = { {64 * 1024, 4} },
14316 .block_erase = spi_block_erase_d8,
14317 }, {
14318 .eraseblocks = { {256 * 1024, 1} },
14319 .block_erase = spi_block_erase_60,
14320 }, {
14321 .eraseblocks = { {256 * 1024, 1} },
14322 .block_erase = spi_block_erase_c7,
14323 },
14324 },
14325 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 and 2nd SR */
14326 .unlock = spi_disable_blockprotect, /* FIXME: 2nd SR */
14327 .write = spi_aai_write, /* AAI supported (0xAD) */
14328 .read = spi_chip_read, /* Fast read (0x0B) supported */
14329 .voltage = {2700, 3600},
14330 },
14331
14332 {
14333 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014334 .name = "SST25VF032B",
14335 .bustype = BUS_SPI,
14336 .manufacture_id = SST_ID,
14337 .model_id = SST_SST25VF032B,
14338 .total_size = 4096,
14339 .page_size = 256,
14340 .feature_bits = FEATURE_WRSR_EWSR,
14341 .tested = TEST_OK_PREW,
14342 .probe = probe_spi_rdid,
14343 .probe_timing = TIMING_ZERO,
14344 .block_erasers =
14345 {
14346 {
14347 .eraseblocks = { {4 * 1024, 1024} },
14348 .block_erase = spi_block_erase_20,
14349 }, {
14350 .eraseblocks = { {32 * 1024, 128} },
14351 .block_erase = spi_block_erase_52,
14352 }, {
14353 .eraseblocks = { {64 * 1024, 64} },
14354 .block_erase = spi_block_erase_d8,
14355 }, {
14356 .eraseblocks = { {4 * 1024 * 1024, 1} },
14357 .block_erase = spi_block_erase_60,
14358 }, {
14359 .eraseblocks = { {4 * 1024 * 1024, 1} },
14360 .block_erase = spi_block_erase_c7,
14361 },
14362 },
14363 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14364 .unlock = spi_disable_blockprotect,
14365 .write = spi_aai_write,
14366 .read = spi_chip_read,
14367 .voltage = {2700, 3600},
14368 },
14369
14370 {
14371 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014372 .name = "SST25VF040",
14373 .bustype = BUS_SPI,
14374 .manufacture_id = SST_ID,
14375 .model_id = SST_SST25VF040_REMS,
14376 .total_size = 512,
14377 .page_size = 256,
14378 .feature_bits = FEATURE_WRSR_EWSR,
14379 .tested = TEST_OK_PR,
14380 .probe = probe_spi_rems,
14381 .probe_timing = TIMING_ZERO,
14382 .block_erasers =
14383 {
14384 {
14385 .eraseblocks = { {4 * 1024, 128} },
14386 .block_erase = spi_block_erase_20,
14387 }, {
14388 .eraseblocks = { {32 * 1024, 16} },
14389 .block_erase = spi_block_erase_52,
14390 }, {
14391 .eraseblocks = { {512 * 1024, 1} },
14392 .block_erase = spi_block_erase_60,
Mark Marshall90021f22010-12-03 14:48:11 +000014393 },
14394 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014395 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Mark Marshall90021f22010-12-03 14:48:11 +000014396 .unlock = spi_disable_blockprotect,
Cory Henderson370f5822013-10-19 23:09:16 +000014397 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14398 .read = spi_chip_read,
14399 .voltage = {2700, 3600},
14400 },
14401
14402 {
14403 .vendor = "SST",
14404 .name = "SST25VF040B",
14405 .bustype = BUS_SPI,
14406 .manufacture_id = SST_ID,
14407 .model_id = SST_SST25VF040B,
14408 .total_size = 512,
14409 .page_size = 256,
14410 .feature_bits = FEATURE_WRSR_EWSR,
14411 .tested = TEST_OK_PREW,
14412 .probe = probe_spi_rdid,
14413 .probe_timing = TIMING_ZERO,
14414 .block_erasers =
14415 {
14416 {
14417 .eraseblocks = { {4 * 1024, 128} },
14418 .block_erase = spi_block_erase_20,
14419 }, {
14420 .eraseblocks = { {32 * 1024, 16} },
14421 .block_erase = spi_block_erase_52,
14422 }, {
14423 .eraseblocks = { {64 * 1024, 8} },
14424 .block_erase = spi_block_erase_d8,
14425 }, {
14426 .eraseblocks = { {512 * 1024, 1} },
14427 .block_erase = spi_block_erase_60,
14428 }, {
14429 .eraseblocks = { {512 * 1024, 1} },
14430 .block_erase = spi_block_erase_c7,
14431 },
14432 },
14433 .printlock = spi_prettyprint_status_register_sst25vf040b,
14434 .unlock = spi_disable_blockprotect,
14435 .write = spi_aai_write, /* AAI supported (0xAD) */
14436 .read = spi_chip_read, /* Fast read (0x0B) supported */
14437 .voltage = {2700, 3600},
14438 },
14439
14440 {
14441 .vendor = "SST",
14442 .name = "SST25VF040B.REMS",
14443 .bustype = BUS_SPI,
14444 .manufacture_id = SST_ID,
14445 .model_id = SST_SST25VF040B_REMS,
14446 .total_size = 512,
14447 .page_size = 256,
14448 .feature_bits = FEATURE_WRSR_EWSR,
14449 .tested = TEST_OK_PREW,
14450 .probe = probe_spi_rems,
14451 .probe_timing = TIMING_ZERO,
14452 .block_erasers =
14453 {
14454 {
14455 .eraseblocks = { {4 * 1024, 128} },
14456 .block_erase = spi_block_erase_20,
14457 }, {
14458 .eraseblocks = { {32 * 1024, 16} },
14459 .block_erase = spi_block_erase_52,
14460 }, {
14461 .eraseblocks = { {64 * 1024, 8} },
14462 .block_erase = spi_block_erase_d8,
14463 }, {
14464 .eraseblocks = { {512 * 1024, 1} },
14465 .block_erase = spi_block_erase_60,
14466 }, {
14467 .eraseblocks = { {512 * 1024, 1} },
14468 .block_erase = spi_block_erase_c7,
14469 },
14470 },
14471 .printlock = spi_prettyprint_status_register_sst25vf040b,
14472 .unlock = spi_disable_blockprotect,
14473 .write = spi_aai_write,
14474 .read = spi_chip_read,
14475 .voltage = {2700, 3600},
14476 },
14477
14478 {
14479 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014480 .name = "SST25VF064C",
Ben Gardnerbcf61092015-11-22 02:23:31 +000014481 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014482 .manufacture_id = SST_ID,
14483 .model_id = SST_SST25VF064C,
14484 .total_size = 8192,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014485 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014486 .feature_bits = FEATURE_WRSR_EWSR,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014487 .tested = TEST_OK_PREW,
14488 .probe = probe_spi_rdid,
14489 .probe_timing = TIMING_ZERO,
14490 .block_erasers =
14491 {
14492 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014493 .eraseblocks = { {4 * 1024, 2048} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014494 .block_erase = spi_block_erase_20,
14495 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014496 .eraseblocks = { {32 * 1024, 256} },
14497 .block_erase = spi_block_erase_52,
14498 }, {
14499 .eraseblocks = { {64 * 1024, 128} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014500 .block_erase = spi_block_erase_d8,
14501 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014502 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014503 .block_erase = spi_block_erase_60,
14504 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014505 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014506 .block_erase = spi_block_erase_c7,
14507 },
14508 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014509 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14510 .unlock = spi_disable_blockprotect,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014511 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014512 .read = spi_chip_read,
14513 .voltage = {2700, 3600},
Ben Gardnerbcf61092015-11-22 02:23:31 +000014514 },
14515
14516 {
14517 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014518 .name = "SST25VF080B",
14519 .bustype = BUS_SPI,
14520 .manufacture_id = SST_ID,
14521 .model_id = SST_SST25VF080B,
14522 .total_size = 1024,
14523 .page_size = 256,
14524 .feature_bits = FEATURE_WRSR_EWSR,
14525 .tested = TEST_OK_PREW,
14526 .probe = probe_spi_rdid,
14527 .probe_timing = TIMING_ZERO,
14528 .block_erasers =
14529 {
14530 {
14531 .eraseblocks = { {4 * 1024, 256} },
14532 .block_erase = spi_block_erase_20,
14533 }, {
14534 .eraseblocks = { {32 * 1024, 32} },
14535 .block_erase = spi_block_erase_52,
14536 }, {
14537 .eraseblocks = { {64 * 1024, 16} },
14538 .block_erase = spi_block_erase_d8,
14539 }, {
14540 .eraseblocks = { {1024 * 1024, 1} },
14541 .block_erase = spi_block_erase_60,
14542 }, {
14543 .eraseblocks = { {1024 * 1024, 1} },
14544 .block_erase = spi_block_erase_c7,
14545 },
14546 },
14547 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14548 .unlock = spi_disable_blockprotect,
14549 .write = spi_aai_write,
Mark Marshall90021f22010-12-03 14:48:11 +000014550 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +000014551 .voltage = {2700, 3600},
Mark Marshall90021f22010-12-03 14:48:11 +000014552 },
14553
14554 {
14555 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014556 .name = "SST25VF512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014557 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014558 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014559 .model_id = SST_SST25VF512_REMS,
14560 .total_size = 64,
14561 .page_size = 256,
14562 .feature_bits = FEATURE_WRSR_EWSR,
14563 .tested = TEST_OK_PREW,
14564 .probe = probe_spi_rems,
14565 .probe_timing = TIMING_ZERO,
14566 .block_erasers =
14567 {
14568 {
14569 .eraseblocks = { {4 * 1024, 16} },
14570 .block_erase = spi_block_erase_20,
14571 }, {
14572 .eraseblocks = { {32 * 1024, 2} },
14573 .block_erase = spi_block_erase_52,
14574 }, {
14575 .eraseblocks = { {32 * 1024, 2} },
14576 .block_erase = spi_block_erase_d8, /* Supported by SST25VF512A only */
14577 }, {
14578 .eraseblocks = { {64 * 1024, 1} },
14579 .block_erase = spi_block_erase_60,
14580 }, {
14581 .eraseblocks = { {64 * 1024, 1} },
14582 .block_erase = spi_block_erase_c7, /* Supported by SST25VF512A only */
14583 },
14584 },
14585 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14586 .unlock = spi_disable_blockprotect,
14587 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14588 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF512A only */
14589 .voltage = {2700, 3600},
14590 },
14591
14592 {
14593 .vendor = "SST",
14594 .name = "SST25WF010",
14595 .bustype = BUS_SPI,
14596 .manufacture_id = SST_ID,
14597 .model_id = SST_SST25WF010,
14598 .total_size = 128,
14599 .page_size = 256,
14600 .feature_bits = FEATURE_WRSR_EITHER,
14601 .tested = TEST_UNTESTED,
14602 .probe = probe_spi_rdid,
14603 .probe_timing = TIMING_ZERO,
14604 .block_erasers =
14605 {
14606 {
14607 .eraseblocks = { {4 * 1024, 32} },
14608 .block_erase = spi_block_erase_20,
14609 }, {
14610 .eraseblocks = { {32 * 1024, 4} },
14611 .block_erase = spi_block_erase_52,
14612 }, {
14613 .eraseblocks = { {1024 * 128, 1} },
14614 .block_erase = spi_block_erase_60,
14615 }, {
14616 .eraseblocks = { {1024 * 128, 1} },
14617 .block_erase = spi_block_erase_c7,
14618 },
14619 },
14620 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14621 .unlock = spi_disable_blockprotect_bp2_srwd,
14622 .write = spi_aai_write,
14623 .read = spi_chip_read, /* Fast read (0x0B) supported */
14624 .voltage = {1650, 1950},
14625 },
14626
14627 {
14628 .vendor = "SST",
14629 .name = "SST25WF020",
14630 .bustype = BUS_SPI,
14631 .manufacture_id = SST_ID,
14632 .model_id = SST_SST25WF020,
14633 .total_size = 256,
14634 .page_size = 256,
14635 .feature_bits = FEATURE_WRSR_EITHER,
14636 .tested = TEST_UNTESTED,
14637 .probe = probe_spi_rdid,
14638 .probe_timing = TIMING_ZERO,
14639 .block_erasers =
14640 {
14641 {
14642 .eraseblocks = { {4 * 1024, 64} },
14643 .block_erase = spi_block_erase_20,
14644 }, {
14645 .eraseblocks = { {32 * 1024, 8} },
14646 .block_erase = spi_block_erase_52,
14647 }, {
14648 .eraseblocks = { {64 * 1024, 4} },
14649 .block_erase = spi_block_erase_d8,
14650 }, {
14651 .eraseblocks = { {1024 * 256, 1} },
14652 .block_erase = spi_block_erase_60,
14653 }, {
14654 .eraseblocks = { {1024 * 256, 1} },
14655 .block_erase = spi_block_erase_c7,
14656 },
14657 },
14658 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14659 .unlock = spi_disable_blockprotect_bp2_srwd,
14660 .write = spi_aai_write,
14661 .read = spi_chip_read, /* Fast read (0x0B) supported */
14662 .voltage = {1650, 1950},
14663 },
14664
14665 {
14666 .vendor = "SST",
14667 .name = "SST25WF020A",
14668 .bustype = BUS_SPI,
14669 .manufacture_id = SANYO_ID, /* See flashchips.h */
14670 .model_id = SST_SST25WF020A,
14671 .total_size = 256,
14672 .page_size = 256,
14673 .feature_bits = FEATURE_WRSR_WREN,
14674 .tested = TEST_UNTESTED,
14675 .probe = probe_spi_rdid,
14676 .probe_timing = TIMING_ZERO,
14677 .block_erasers =
14678 {
14679 {
14680 .eraseblocks = { {4 * 1024, 64} },
14681 .block_erase = spi_block_erase_20,
14682 }, {
14683 .eraseblocks = { {64 * 1024, 4} },
14684 .block_erase = spi_block_erase_d8,
14685 }, {
14686 .eraseblocks = { {256 * 1024, 1} },
14687 .block_erase = spi_block_erase_60,
14688 }, {
14689 .eraseblocks = { {256 * 1024, 1} },
14690 .block_erase = spi_block_erase_c7,
14691 },
14692 },
14693 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14694 .unlock = spi_disable_blockprotect_bp2_srwd,
14695 .write = spi_chip_write_256,
14696 .read = spi_chip_read, /* Fast read (0x0B) supported */
14697 .voltage = {1650, 1950},
14698 },
14699
14700 {
14701 .vendor = "SST",
14702 .name = "SST25WF040",
14703 .bustype = BUS_SPI,
14704 .manufacture_id = SST_ID,
14705 .model_id = SST_SST25WF040,
14706 .total_size = 512,
14707 .page_size = 256,
14708 .feature_bits = FEATURE_WRSR_EITHER,
14709 .tested = TEST_UNTESTED,
14710 .probe = probe_spi_rdid,
14711 .probe_timing = TIMING_ZERO,
14712 .block_erasers =
14713 {
14714 {
14715 .eraseblocks = { {4 * 1024, 128} },
14716 .block_erase = spi_block_erase_20,
14717 }, {
14718 .eraseblocks = { {32 * 1024, 16} },
14719 .block_erase = spi_block_erase_52,
14720 }, {
14721 .eraseblocks = { {64 * 1024, 8} },
14722 .block_erase = spi_block_erase_d8,
14723 }, {
14724 .eraseblocks = { {1024 * 512, 1} },
14725 .block_erase = spi_block_erase_60,
14726 }, {
14727 .eraseblocks = { {1024 * 512, 1} },
14728 .block_erase = spi_block_erase_c7,
14729 },
14730 },
14731 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14732 .unlock = spi_disable_blockprotect_bp2_srwd,
14733 .write = spi_aai_write,
14734 .read = spi_chip_read, /* Fast read (0x0B) supported */
14735 .voltage = {1650, 1950},
14736 },
14737
14738 {
14739 .vendor = "SST",
14740 .name = "SST25WF040B",
14741 .bustype = BUS_SPI,
14742 .manufacture_id = SANYO_ID, /* See flashchips.h */
14743 .model_id = SST_SST25WF040B,
14744 .total_size = 512,
14745 .page_size = 256,
14746 .feature_bits = FEATURE_WRSR_WREN,
14747 .tested = TEST_UNTESTED,
14748 .probe = probe_spi_rdid,
14749 .probe_timing = TIMING_ZERO,
14750 .block_erasers =
14751 {
14752 {
14753 .eraseblocks = { {4 * 1024, 128} },
14754 .block_erase = spi_block_erase_20,
14755 }, {
14756 .eraseblocks = { {64 * 1024, 8} },
14757 .block_erase = spi_block_erase_d8,
14758 }, {
14759 .eraseblocks = { {512 * 1024, 1} },
14760 .block_erase = spi_block_erase_60,
14761 }, {
14762 .eraseblocks = { {512 * 1024, 1} },
14763 .block_erase = spi_block_erase_c7,
14764 },
14765 },
14766 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14767 .unlock = spi_disable_blockprotect_bp2_srwd,
14768 .write = spi_chip_write_256,
14769 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
14770 .voltage = {1650, 1950},
14771 },
14772
14773 {
14774 .vendor = "SST",
14775 .name = "SST25WF080",
14776 .bustype = BUS_SPI,
14777 .manufacture_id = SST_ID,
14778 .model_id = SST_SST25WF080,
14779 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014780 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000014781 .feature_bits = FEATURE_WRSR_EITHER,
Mark Marshall90021f22010-12-03 14:48:11 +000014782 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014783 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000014784 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014785 .block_erasers =
14786 {
14787 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014788 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014789 .block_erase = spi_block_erase_20,
14790 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014791 .eraseblocks = { {32 * 1024, 32} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014792 .block_erase = spi_block_erase_52,
14793 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014794 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014795 .block_erase = spi_block_erase_d8,
14796 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014797 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014798 .block_erase = spi_block_erase_60,
14799 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014800 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014801 .block_erase = spi_block_erase_c7,
14802 },
14803 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014804 .printlock = spi_prettyprint_status_register_sst25, /* *does* have a BP3 but it is useless */
14805 .unlock = spi_disable_blockprotect_bp3_srwd,
Joshua Roys87955bf2011-08-01 18:39:28 +000014806 .write = spi_aai_write,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014807 .read = spi_chip_read, /* Fast read (0x0B) supported */
14808 .voltage = {1650, 1950},
FENG yu ningff692fb2008-12-08 18:15:10 +000014809 },
14810
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014811 {
14812 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014813 .name = "SST25WF080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014814 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014815 .manufacture_id = SANYO_ID, /* See flashchips.h */
14816 .model_id = SST_SST25WF080B,
14817 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014818 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014819 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerfcf6a8c2011-05-18 01:32:00 +000014820 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014821 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000014822 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014823 .block_erasers =
14824 {
14825 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014826 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014827 .block_erase = spi_block_erase_20,
14828 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014829 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014830 .block_erase = spi_block_erase_d8,
14831 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014832 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014833 .block_erase = spi_block_erase_60,
14834 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014835 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014836 .block_erase = spi_block_erase_c7,
14837 },
14838 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014839 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14840 .unlock = spi_disable_blockprotect_bp2_srwd,
Helge Wagner1db7a442010-10-05 22:29:08 +000014841 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014842 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
14843 .voltage = {1650, 1950},
14844 },
14845
14846 {
14847 .vendor = "SST",
14848 .name = "SST25WF512",
14849 .bustype = BUS_SPI,
14850 .manufacture_id = SST_ID,
14851 .model_id = SST_SST25WF512,
14852 .total_size = 64,
14853 .page_size = 256,
14854 .feature_bits = FEATURE_WRSR_EITHER,
14855 .tested = TEST_UNTESTED,
14856 .probe = probe_spi_rdid,
14857 .probe_timing = TIMING_ZERO,
14858 .block_erasers =
14859 {
14860 {
14861 .eraseblocks = { {4 * 1024, 16} },
14862 .block_erase = spi_block_erase_20,
14863 }, {
14864 .eraseblocks = { {32 * 1024, 2} },
14865 .block_erase = spi_block_erase_52,
14866 }, {
14867 .eraseblocks = { {1024 * 64, 1} },
14868 .block_erase = spi_block_erase_60,
14869 }, {
14870 .eraseblocks = { {1024 * 64, 1} },
14871 .block_erase = spi_block_erase_c7,
14872 },
14873 },
14874 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14875 .unlock = spi_disable_blockprotect_bp2_srwd,
14876 .write = spi_aai_write,
14877 .read = spi_chip_read, /* Fast read (0x0B) supported */
14878 .voltage = {1650, 1950},
Ed Swierk86f4e6d2010-07-21 15:02:22 +000014879 },
14880
14881 {
14882 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010014883 .name = "SST26VF016",
14884 .bustype = BUS_SPI,
14885 .manufacture_id = SST_ID,
14886 .model_id = SST_SST26VF016,
14887 .total_size = 2048,
14888 .page_size = 256,
14889 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14890 .tested = TEST_UNTESTED,
14891 .probe = probe_spi_rdid,
14892 .probe_timing = TIMING_ZERO,
14893 .block_erasers =
14894 {
14895 {
14896 .eraseblocks = { {4 * 1024, 512} },
14897 .block_erase = spi_block_erase_20,
14898 }, {
14899 .eraseblocks = {
14900 {8 * 1024, 4},
14901 {32 * 1024, 1},
14902 {64 * 1024, 30},
14903 {32 * 1024, 1},
14904 {8 * 1024, 4},
14905 },
14906 .block_erase = spi_block_erase_d8,
14907 }, {
14908 .eraseblocks = { {2 * 1024 * 1024, 1} },
14909 .block_erase = spi_block_erase_c7,
14910 },
14911 },
14912 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
14913 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
14914 .write = spi_chip_write_256, /* Multi I/O supported */
14915 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14916 .voltage = {2700, 3600},
14917 },
14918
14919 {
14920 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070014921 .name = "SST26VF016B(A)",
14922 .bustype = BUS_SPI,
14923 .manufacture_id = SST_ID,
14924 .model_id = SST_SST26VF016B,
14925 .total_size = 2048,
14926 .page_size = 256,
14927 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14928 .tested = TEST_OK_PREW,
14929 .probe = probe_spi_rdid,
14930 .probe_timing = TIMING_ZERO,
14931 .block_erasers =
14932 {
14933 {
14934 .eraseblocks = { {4 * 1024, 512} },
14935 .block_erase = spi_block_erase_20,
14936 }, {
14937 .eraseblocks = {
14938 {8 * 1024, 4},
14939 {32 * 1024, 1},
14940 {64 * 1024, 30},
14941 {32 * 1024, 1},
14942 {8 * 1024, 4},
14943 },
14944 .block_erase = spi_block_erase_d8,
14945 }, {
14946 .eraseblocks = { {2 * 1024 * 1024, 1} },
14947 .block_erase = spi_block_erase_c7,
14948 },
14949 },
14950 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
14951 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
14952 .write = spi_chip_write_256, /* Multi I/O supported */
14953 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14954 .voltage = {2700, 3600},
14955 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100014956
Wei Hu25584de2018-04-30 14:02:08 -070014957 {
14958 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010014959 .name = "SST26VF032",
14960 .bustype = BUS_SPI,
14961 .manufacture_id = SST_ID,
14962 .model_id = SST_SST26VF032,
14963 .total_size = 4096,
14964 .page_size = 256,
14965 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14966 .tested = TEST_UNTESTED,
14967 .probe = probe_spi_rdid,
14968 .probe_timing = TIMING_ZERO,
14969 .block_erasers =
14970 {
14971 {
14972 .eraseblocks = { {4 * 1024, 1024} },
14973 .block_erase = spi_block_erase_20,
14974 }, {
14975 .eraseblocks = {
14976 {8 * 1024, 4},
14977 {32 * 1024, 1},
14978 {64 * 1024, 62},
14979 {32 * 1024, 1},
14980 {8 * 1024, 4},
14981 },
14982 .block_erase = spi_block_erase_d8,
14983 }, {
14984 .eraseblocks = { {4 * 1024 * 1024, 1} },
14985 .block_erase = spi_block_erase_c7,
14986 },
14987 },
14988 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
14989 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
14990 .write = spi_chip_write_256, /* Multi I/O supported */
14991 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14992 .voltage = {2700, 3600},
14993 },
14994
14995 {
14996 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070014997 .name = "SST26VF032B(A)",
14998 .bustype = BUS_SPI,
14999 .manufacture_id = SST_ID,
15000 .model_id = SST_SST26VF032B,
15001 .total_size = 4096,
15002 .page_size = 256,
15003 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15004 .tested = TEST_UNTESTED,
15005 .probe = probe_spi_rdid,
15006 .probe_timing = TIMING_ZERO,
15007 .block_erasers =
15008 {
15009 {
15010 .eraseblocks = { {4 * 1024, 1024} },
15011 .block_erase = spi_block_erase_20,
15012 }, {
15013 .eraseblocks = {
15014 {8 * 1024, 4},
15015 {32 * 1024, 1},
15016 {64 * 1024, 62},
15017 {32 * 1024, 1},
15018 {8 * 1024, 4},
15019 },
15020 .block_erase = spi_block_erase_d8,
15021 }, {
15022 .eraseblocks = { {4 * 1024 * 1024, 1} },
15023 .block_erase = spi_block_erase_c7,
15024 },
15025 },
15026 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
15027 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15028 .write = spi_chip_write_256, /* Multi I/O supported */
15029 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15030 .voltage = {2700, 3600},
15031 },
15032
Wei Hu25584de2018-04-30 14:02:08 -070015033 {
15034 .vendor = "SST",
15035 .name = "SST26VF064B(A)",
15036 .bustype = BUS_SPI,
15037 .manufacture_id = SST_ID,
15038 .model_id = SST_SST26VF064B,
15039 .total_size = 8192,
15040 .page_size = 256,
15041 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15042 .tested = TEST_OK_PREW,
15043 .probe = probe_spi_rdid,
15044 .probe_timing = TIMING_ZERO,
15045 .block_erasers =
15046 {
15047 {
15048 .eraseblocks = { {4 * 1024, 2048} },
15049 .block_erase = spi_block_erase_20,
15050 }, {
15051 .eraseblocks = {
15052 {8 * 1024, 4},
15053 {32 * 1024, 1},
15054 {64 * 1024, 126},
15055 {32 * 1024, 1},
15056 {8 * 1024, 4},
15057 },
15058 .block_erase = spi_block_erase_d8,
15059 }, {
15060 .eraseblocks = { {8 * 1024 * 1024, 1} },
15061 .block_erase = spi_block_erase_c7,
15062 },
15063 },
15064 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
15065 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15066 .write = spi_chip_write_256, /* Multi I/O supported */
15067 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15068 .voltage = {2700, 3600},
15069 },
15070
15071 {
15072 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015073 .name = "SST28SF040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015074 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015075 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015076 .model_id = SST_SST28SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015077 .total_size = 512,
15078 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000015079 .feature_bits = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015080 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015081 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015082 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst28sf040.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015083 .block_erasers =
15084 {
15085 {
15086 .eraseblocks = { {128, 4096} },
15087 .block_erase = erase_sector_28sf040,
15088 }, {
15089 .eraseblocks = { {512 * 1024, 1} },
15090 .block_erase = erase_chip_28sf040,
15091 }
15092 },
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015093 .unlock = unprotect_28sf040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015094 .write = write_28sf040,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015095 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015096 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015097 .prepare_access = prepare_memory_access,
15098 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015099 },
15100
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015101 {
15102 .vendor = "SST",
15103 .name = "SST29EE010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015104 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015105 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015106 .model_id = SST_SST29EE010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015107 .total_size = 128,
15108 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015109 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015110 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015111 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015112 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015113 .block_erasers =
15114 {
15115 {
15116 .eraseblocks = { {128 * 1024, 1} },
15117 .block_erase = erase_chip_block_jedec,
15118 }
15119 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015120 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015121 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015122 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015123 .prepare_access = prepare_memory_access,
15124 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015125 },
15126
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015127 {
15128 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015129 .name = "SST29EE020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015130 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015131 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015132 .model_id = SST_SST29EE020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015133 .total_size = 256,
15134 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015135 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015136 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015137 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000015138 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015139 .block_erasers =
15140 {
15141 {
15142 .eraseblocks = { {256 * 1024, 1} },
15143 .block_erase = erase_chip_block_jedec,
15144 }
15145 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015146 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015147 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015148 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015149 .prepare_access = prepare_memory_access,
15150 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015151 },
15152
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015153 {
15154 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015155 .name = "SST29LE010",
15156 .bustype = BUS_PARALLEL,
15157 .manufacture_id = SST_ID,
15158 .model_id = SST_SST29LE010,
15159 .total_size = 128,
15160 .page_size = 128,
15161 .feature_bits = FEATURE_LONG_RESET,
15162 .tested = TEST_UNTESTED,
15163 .probe = probe_jedec,
15164 .probe_timing = 10,
15165 .block_erasers =
15166 {
15167 {
15168 .eraseblocks = { {128 * 1024, 1} },
15169 .block_erase = erase_chip_block_jedec,
15170 }
15171 },
15172 .write = write_jedec,
15173 .read = read_memmapped,
15174 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015175 .prepare_access = prepare_memory_access,
15176 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015177 },
15178
15179 {
15180 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015181 .name = "SST29LE020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015182 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015183 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015184 .model_id = SST_SST29LE020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015185 .total_size = 256,
15186 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015187 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015188 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015189 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015190 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015191 .block_erasers =
15192 {
15193 {
15194 .eraseblocks = { {256 * 1024, 1} },
15195 .block_erase = erase_chip_block_jedec,
15196 }
15197 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015198 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015199 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015200 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015201 .prepare_access = prepare_memory_access,
15202 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015203 },
15204
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015205 {
15206 .vendor = "SST",
15207 .name = "SST39SF010A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015208 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015209 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015210 .model_id = SST_SST39SF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015211 .total_size = 128,
15212 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015213 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000015214 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015215 .probe = probe_jedec,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000015216 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015217 .block_erasers =
15218 {
15219 {
15220 .eraseblocks = { {4 * 1024, 32} },
15221 .block_erase = erase_sector_jedec,
15222 }, {
15223 .eraseblocks = { {128 * 1024, 1} },
15224 .block_erase = erase_chip_block_jedec,
15225 }
15226 },
Sean Nelson35727f72010-01-28 23:55:12 +000015227 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015228 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015229 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015230 .prepare_access = prepare_memory_access,
15231 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015232 },
15233
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015234 {
15235 .vendor = "SST",
15236 .name = "SST39SF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015237 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015238 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015239 .model_id = SST_SST39SF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015240 .total_size = 256,
15241 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015242 .feature_bits = FEATURE_EITHER_RESET,
Uwe Hermann19f46f22011-06-18 22:56:14 +000015243 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015244 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015245 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015246 .block_erasers =
15247 {
15248 {
15249 .eraseblocks = { {4 * 1024, 64} },
15250 .block_erase = erase_sector_jedec,
15251 }, {
15252 .eraseblocks = { {256 * 1024, 1} },
15253 .block_erase = erase_chip_block_jedec,
15254 }
15255 },
Sean Nelson35727f72010-01-28 23:55:12 +000015256 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015257 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015258 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015259 .prepare_access = prepare_memory_access,
15260 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015261 },
15262
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015263 {
15264 .vendor = "SST",
15265 .name = "SST39SF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015266 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015267 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015268 .model_id = SST_SST39SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015269 .total_size = 512,
15270 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015271 .feature_bits = FEATURE_EITHER_RESET,
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000015272 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015273 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015274 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015275 .block_erasers =
15276 {
15277 {
15278 .eraseblocks = { {4 * 1024, 128} },
15279 .block_erase = erase_sector_jedec,
15280 }, {
15281 .eraseblocks = { {512 * 1024, 1} },
15282 .block_erase = erase_chip_block_jedec,
15283 }
15284 },
Sean Nelson35727f72010-01-28 23:55:12 +000015285 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015286 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015287 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015288 .prepare_access = prepare_memory_access,
15289 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015290 },
15291
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015292 {
15293 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015294 .name = "SST39SF512",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015295 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015296 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015297 .model_id = SST_SST39SF512,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015298 .total_size = 64,
15299 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015300 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd7d423b2012-10-20 09:13:16 +000015301 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015302 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015303 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015304 .block_erasers =
15305 {
15306 {
15307 .eraseblocks = { {4 * 1024, 16} },
15308 .block_erase = erase_sector_jedec,
15309 }, {
15310 .eraseblocks = { {64 * 1024, 1} },
15311 .block_erase = erase_chip_block_jedec,
15312 }
15313 },
Sean Nelson35727f72010-01-28 23:55:12 +000015314 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015315 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015316 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015317 .prepare_access = prepare_memory_access,
15318 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015319 },
15320
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015321 {
15322 .vendor = "SST",
15323 .name = "SST39VF010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015324 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015325 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015326 .model_id = SST_SST39VF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015327 .total_size = 128,
15328 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015329 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd94d25d2012-07-28 03:17:15 +000015330 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015331 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015332 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015333 .block_erasers =
15334 {
15335 {
15336 .eraseblocks = { {4 * 1024, 32} },
15337 .block_erase = erase_sector_jedec,
15338 }, {
15339 .eraseblocks = { {128 * 1024, 1} },
15340 .block_erase = erase_chip_block_jedec,
15341 }
15342 },
Sean Nelson35727f72010-01-28 23:55:12 +000015343 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015344 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015345 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015346 .prepare_access = prepare_memory_access,
15347 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015348 },
15349
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015350 {
15351 .vendor = "SST",
15352 .name = "SST39VF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015353 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015354 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015355 .model_id = SST_SST39VF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015356 .total_size = 256,
15357 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015358 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner5c316f92015-02-08 21:57:52 +000015359 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015360 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015361 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015362 .block_erasers =
15363 {
15364 {
15365 .eraseblocks = { {4 * 1024, 64} },
15366 .block_erase = erase_sector_jedec,
15367 }, {
15368 .eraseblocks = { {256 * 1024, 1} },
15369 .block_erase = erase_chip_block_jedec,
15370 }
15371 },
Sean Nelson35727f72010-01-28 23:55:12 +000015372 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015373 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015374 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015375 .prepare_access = prepare_memory_access,
15376 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015377 },
15378
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015379 {
15380 .vendor = "SST",
15381 .name = "SST39VF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015382 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015383 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015384 .model_id = SST_SST39VF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015385 .total_size = 512,
15386 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015387 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015388 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015389 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015390 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015391 .block_erasers =
15392 {
15393 {
15394 .eraseblocks = { {4 * 1024, 128} },
15395 .block_erase = erase_sector_jedec,
15396 }, {
15397 .eraseblocks = { {512 * 1024, 1} },
15398 .block_erase = erase_chip_block_jedec,
15399 }
15400 },
Sean Nelson35727f72010-01-28 23:55:12 +000015401 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015402 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015403 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015404 .prepare_access = prepare_memory_access,
15405 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger90eff152008-12-08 23:51:45 +000015406 },
FENG yu ningff692fb2008-12-08 18:15:10 +000015407
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015408 {
15409 .vendor = "SST",
Peter Stuge8440cc02009-01-25 23:55:12 +000015410 .name = "SST39VF080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015411 .bustype = BUS_PARALLEL,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000015412 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015413 .model_id = SST_SST39VF080,
Peter Stuge8440cc02009-01-25 23:55:12 +000015414 .total_size = 1024,
15415 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015416 .feature_bits = FEATURE_EITHER_RESET,
Peter Stuge8440cc02009-01-25 23:55:12 +000015417 .tested = TEST_UNTESTED,
15418 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015419 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015420 .block_erasers =
15421 {
15422 {
15423 .eraseblocks = { {4 * 1024, 256} },
15424 .block_erase = erase_sector_jedec,
15425 }, {
15426 .eraseblocks = { {64 * 1024, 16} },
15427 .block_erase = erase_block_jedec,
15428 }, {
15429 .eraseblocks = { {1024 * 1024, 1} },
15430 .block_erase = erase_chip_block_jedec,
15431 }
15432 },
Sean Nelson35727f72010-01-28 23:55:12 +000015433 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015434 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015435 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015436 .prepare_access = prepare_memory_access,
15437 .finish_access = finish_memory_access,
Peter Stuge8440cc02009-01-25 23:55:12 +000015438 },
15439
15440 {
15441 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015442 .name = "SST39VF512",
15443 .bustype = BUS_PARALLEL,
15444 .manufacture_id = SST_ID,
15445 .model_id = SST_SST39VF512,
15446 .total_size = 64,
15447 .page_size = 4096,
15448 .feature_bits = FEATURE_EITHER_RESET,
15449 .tested = TEST_OK_PREW,
15450 .probe = probe_jedec,
15451 .probe_timing = 1, /* 150 ns */
15452 .block_erasers =
15453 {
15454 {
15455 .eraseblocks = { {4 * 1024, 16} },
15456 .block_erase = erase_sector_jedec,
15457 }, {
15458 .eraseblocks = { {64 * 1024, 1} },
15459 .block_erase = erase_chip_block_jedec,
15460 }
15461 },
15462 .write = write_jedec_1,
15463 .read = read_memmapped,
15464 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015465 .prepare_access = prepare_memory_access,
15466 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015467 },
15468
15469 {
15470 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015471 .name = "SST49LF002A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015472 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015473 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015474 .model_id = SST_SST49LF002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015475 .total_size = 256,
15476 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015477 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000015478 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015479 .probe = probe_jedec,
15480 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015481 .block_erasers =
15482 {
15483 {
15484 .eraseblocks = { {4 * 1024, 64} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015485 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015486 }, {
15487 .eraseblocks = { {16 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015488 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015489 }, {
15490 .eraseblocks = { {256 * 1024, 1} },
15491 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15492 }
15493 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015494 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015495 .unlock = unlock_sst_fwhub,
15496 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015497 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015498 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015499 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015500 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015501 },
15502
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015503 {
15504 .vendor = "SST",
15505 .name = "SST49LF003A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015506 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015507 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015508 .model_id = SST_SST49LF003A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015509 .total_size = 384,
15510 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015511 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000015512 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015513 .probe = probe_jedec,
15514 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015515 .block_erasers =
15516 {
15517 {
15518 .eraseblocks = { {4 * 1024, 96} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015519 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015520 }, {
15521 .eraseblocks = { {64 * 1024, 6} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015522 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015523 }, {
15524 .eraseblocks = { {384 * 1024, 1} },
15525 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15526 }
15527 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015528 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015529 .unlock = unlock_sst_fwhub,
15530 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015531 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015532 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015533 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015534 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015535 },
15536
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015537 {
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015538 /* Contrary to the data sheet, TBL# on the SST49LF004B affects the top 128kB (instead of 64kB)
15539 * and is only honored for 64k block erase, but not 4k sector erase.
15540 */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015541 .vendor = "SST",
15542 .name = "SST49LF004A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015543 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015544 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015545 .model_id = SST_SST49LF004A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015546 .total_size = 512,
15547 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015548 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000015549 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015550 .probe = probe_jedec,
15551 .probe_timing = 1, /* 150 ns */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015552 .block_erasers =
15553 {
15554 {
15555 .eraseblocks = { {4 * 1024, 128} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015556 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015557 }, {
15558 .eraseblocks = { {64 * 1024, 8} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015559 .block_erase = erase_block_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015560 }, {
15561 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson51c83fb2010-01-20 20:55:53 +000015562 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015563 },
15564 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015565 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015566 .unlock = unlock_sst_fwhub,
15567 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015568 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015569 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015570 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015571 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015572 },
15573
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015574 {
15575 .vendor = "SST",
15576 .name = "SST49LF004C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015577 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015578 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015579 .model_id = SST_SST49LF004C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015580 .total_size = 512,
15581 .page_size = 4 * 1024,
15582 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015583 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015584 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015585 .block_erasers =
15586 {
15587 {
15588 .eraseblocks = { {4 * 1024, 128} },
15589 .block_erase = erase_sector_49lfxxxc,
15590 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015591 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015592 {64 * 1024, 7},
15593 {32 * 1024, 1},
15594 {8 * 1024, 2},
15595 {16 * 1024, 1},
15596 },
Sean Nelson69e58112010-03-23 17:10:28 +000015597 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015598 }
15599 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015600 .printlock = printlock_regspace2_block_eraser_1,
15601 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015602 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015603 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015604 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015605 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015606 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015607 },
15608
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015609 {
15610 .vendor = "SST",
15611 .name = "SST49LF008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015612 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015613 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015614 .model_id = SST_SST49LF008A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015615 .total_size = 1024,
15616 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015617 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000015618 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015619 .probe = probe_jedec,
15620 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015621 .block_erasers =
15622 {
15623 {
15624 .eraseblocks = { {4 * 1024, 256} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015625 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015626 }, {
15627 .eraseblocks = { {64 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015628 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015629 }, {
15630 .eraseblocks = { {1024 * 1024, 1} },
15631 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15632 }
15633 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015634 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015635 .unlock = unlock_sst_fwhub,
15636 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015637 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015638 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015639 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015640 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015641 },
15642
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015643 {
15644 .vendor = "SST",
15645 .name = "SST49LF008C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015646 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015647 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015648 .model_id = SST_SST49LF008C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015649 .total_size = 1024,
15650 .page_size = 4 * 1024,
15651 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015652 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015653 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015654 .block_erasers =
15655 {
15656 {
15657 .eraseblocks = { {4 * 1024, 256} },
15658 .block_erase = erase_sector_49lfxxxc,
15659 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015660 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015661 {64 * 1024, 15},
15662 {32 * 1024, 1},
15663 {8 * 1024, 2},
15664 {16 * 1024, 1},
15665 },
Sean Nelson69e58112010-03-23 17:10:28 +000015666 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015667 }
15668 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015669 .printlock = printlock_regspace2_block_eraser_1,
15670 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015671 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015672 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015673 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015674 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015675 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015676 },
15677
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015678 {
15679 .vendor = "SST",
15680 .name = "SST49LF016C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015681 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015682 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015683 .model_id = SST_SST49LF016C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015684 .total_size = 2048,
15685 .page_size = 4 * 1024,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015686 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015687 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015688 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015689 .block_erasers =
15690 {
15691 {
15692 .eraseblocks = { {4 * 1024, 512} },
15693 .block_erase = erase_sector_49lfxxxc,
15694 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015695 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015696 {64 * 1024, 31},
15697 {32 * 1024, 1},
15698 {8 * 1024, 2},
15699 {16 * 1024, 1},
15700 },
Sean Nelson69e58112010-03-23 17:10:28 +000015701 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015702 }
15703 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015704 .printlock = printlock_regspace2_block_eraser_1,
15705 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015706 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015707 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015708 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015709 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015710 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015711 },
15712
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015713 {
15714 .vendor = "SST",
15715 .name = "SST49LF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015716 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015717 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015718 .model_id = SST_SST49LF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015719 .total_size = 256,
15720 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015721 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner8179be52011-06-04 13:13:34 +000015722 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015723 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015724 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015725 .block_erasers =
15726 {
15727 {
15728 .eraseblocks = { {4 * 1024, 64} },
15729 .block_erase = erase_sector_jedec,
15730 }, {
15731 .eraseblocks = { {16 * 1024, 16} },
15732 .block_erase = erase_block_jedec,
15733 }, {
15734 .eraseblocks = { {256 * 1024, 1} },
15735 .block_erase = NULL,
15736 }
15737 },
Sean Nelson35727f72010-01-28 23:55:12 +000015738 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015739 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015740 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015741 .prepare_access = prepare_memory_access,
15742 .finish_access = finish_memory_access,
Sven Schnellec208dfb2009-01-07 12:35:09 +000015743 },
15744
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015745 {
15746 .vendor = "SST",
15747 .name = "SST49LF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015748 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015749 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015750 .model_id = SST_SST49LF020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015751 .total_size = 256,
Carl-Daniel Hailfingerda654322009-07-23 01:44:38 +000015752 .page_size = 4 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015753 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015754 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015755 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015756 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015757 .block_erasers =
15758 {
15759 {
15760 .eraseblocks = { {4 * 1024, 64} },
15761 .block_erase = erase_sector_jedec,
15762 }, {
15763 .eraseblocks = { {16 * 1024, 16} },
15764 .block_erase = erase_block_jedec,
15765 }, {
15766 .eraseblocks = { {256 * 1024, 1} },
15767 .block_erase = NULL,
15768 }
15769 },
Sean Nelson35727f72010-01-28 23:55:12 +000015770 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015771 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015772 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015773 .prepare_access = prepare_memory_access,
15774 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015775 },
15776
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015777 {
15778 .vendor = "SST",
15779 .name = "SST49LF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015780 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015781 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015782 .model_id = SST_SST49LF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015783 .total_size = 512,
15784 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015785 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000015786 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015787 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015788 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015789 .block_erasers =
15790 {
15791 {
15792 .eraseblocks = { {4 * 1024, 128} },
15793 .block_erase = erase_sector_jedec,
15794 }, {
15795 .eraseblocks = { {64 * 1024, 8} },
15796 .block_erase = erase_block_jedec,
15797 }, {
15798 .eraseblocks = { {512 * 1024, 1} },
15799 .block_erase = NULL,
15800 }
15801 },
Sean Nelson35727f72010-01-28 23:55:12 +000015802 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015803 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015804 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015805 .prepare_access = prepare_memory_access,
15806 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015807 },
15808
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015809 {
15810 .vendor = "SST",
15811 .name = "SST49LF040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015812 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015813 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015814 .model_id = SST_SST49LF040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015815 .total_size = 512,
15816 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015817 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015818 .tested = TEST_OK_PREW,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015819 .probe = probe_jedec,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015820 .probe_timing = 1, /* 150ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015821 .block_erasers =
15822 {
15823 {
15824 .eraseblocks = { {4 * 1024, 128} },
15825 .block_erase = erase_sector_jedec,
15826 }, {
15827 .eraseblocks = { {64 * 1024, 8} },
15828 .block_erase = erase_block_jedec,
15829 }, {
15830 .eraseblocks = { {512 * 1024, 1} },
15831 .block_erase = NULL,
15832 }
15833 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015834 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000015835 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015836 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015837 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015838 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015839 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015840 },
15841
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015842 {
15843 .vendor = "SST",
15844 .name = "SST49LF080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015845 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015846 .manufacture_id = SST_ID,
Elyes HAOUAS124ef382018-03-27 12:15:09 +020015847 .model_id = SST_SST49LF080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015848 .total_size = 1024,
15849 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015850 .feature_bits = FEATURE_EITHER_RESET,
Brandon Dowdyf07bf322011-03-06 18:31:11 +000015851 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015852 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015853 .probe_timing = TIMING_FIXME,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015854 .block_erasers =
15855 {
15856 {
15857 .eraseblocks = { {4 * 1024, 256} },
15858 .block_erase = erase_sector_jedec,
15859 }, {
15860 .eraseblocks = { {64 * 1024, 16} },
15861 .block_erase = erase_block_jedec,
15862 }, {
15863 .eraseblocks = { {1024 * 1024, 1} },
15864 .block_erase = NULL,
15865 }
15866 },
Sean Nelson35727f72010-01-28 23:55:12 +000015867 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015868 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015869 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015870 .prepare_access = prepare_memory_access,
15871 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015872 },
15873
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015874 {
15875 .vendor = "SST",
15876 .name = "SST49LF160C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015877 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015878 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015879 .model_id = SST_SST49LF160C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015880 .total_size = 2048,
15881 .page_size = 4 * 1024,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015882 .tested = TEST_OK_PR,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015883 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015884 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015885 .block_erasers =
15886 {
15887 {
15888 .eraseblocks = { {4 * 1024, 512} },
15889 .block_erase = erase_sector_49lfxxxc,
15890 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015891 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015892 {64 * 1024, 31},
15893 {32 * 1024, 1},
15894 {8 * 1024, 2},
15895 {16 * 1024, 1},
15896 },
Sean Nelson69e58112010-03-23 17:10:28 +000015897 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015898 }
15899 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015900 .printlock = printlock_regspace2_block_eraser_1,
15901 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015902 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015903 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015904 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015905 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015906 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015907 },
15908
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015909 {
15910 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015911 .name = "M29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015912 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015913 .manufacture_id = ST_ID,
15914 .model_id = ST_M29F002B,
15915 .total_size = 256,
15916 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015917 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015918 .tested = TEST_UNTESTED,
15919 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000015920 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000015921 .block_erasers =
15922 {
15923 {
15924 .eraseblocks = {
15925 {16 * 1024, 1},
15926 {8 * 1024, 2},
15927 {32 * 1024, 1},
15928 {64 * 1024, 3},
15929 },
15930 .block_erase = erase_sector_jedec,
15931 }, {
15932 .eraseblocks = { {256 * 1024, 1} },
15933 .block_erase = erase_chip_block_jedec,
15934 }
15935 },
Sean Nelson35727f72010-01-28 23:55:12 +000015936 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015937 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000015938 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010015939 .prepare_access = prepare_memory_access,
15940 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015941 },
15942
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015943 {
15944 .vendor = "ST",
15945 .name = "M29F002T/NT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015946 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015947 .manufacture_id = ST_ID,
15948 .model_id = ST_M29F002T,
15949 .total_size = 256,
15950 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015951 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stefan Taunere34e3e82013-01-01 00:06:51 +000015952 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015953 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000015954 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000015955 .block_erasers =
15956 {
15957 {
15958 .eraseblocks = {
15959 {64 * 1024, 3},
15960 {32 * 1024, 1},
15961 {8 * 1024, 2},
15962 {16 * 1024, 1},
15963 },
15964 .block_erase = erase_sector_jedec,
15965 }, {
15966 .eraseblocks = { {256 * 1024, 1} },
15967 .block_erase = erase_chip_block_jedec,
15968 }
15969 },
Sean Nelson35727f72010-01-28 23:55:12 +000015970 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015971 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000015972 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010015973 .prepare_access = prepare_memory_access,
15974 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015975 },
15976
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015977 {
15978 .vendor = "ST",
15979 .name = "M29F040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015980 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015981 .manufacture_id = ST_ID,
15982 .model_id = ST_M29F040B,
15983 .total_size = 512,
15984 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015985 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
15986 .tested = TEST_UNTESTED,
15987 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000015988 .probe_timing = TIMING_ZERO, /* datasheet specifies no timing */
Sean Nelson56358aa2010-01-19 16:08:51 +000015989 .block_erasers =
15990 {
15991 {
Stefan Tauner6697f712014-08-06 15:09:15 +000015992 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000015993 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000015994 }, {
15995 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000015996 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000015997 }
15998 },
Sean Nelson35727f72010-01-28 23:55:12 +000015999 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016000 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016001 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016002 .prepare_access = prepare_memory_access,
16003 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016004 },
16005
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016006 {
Sean Nelson35727f72010-01-28 23:55:12 +000016007 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016008 .vendor = "ST",
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016009 .name = "M29F400BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016010 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016011 .manufacture_id = ST_ID,
16012 .model_id = ST_M29F400BB,
16013 .total_size = 512,
16014 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016015 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000016016 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016017 .probe = probe_jedec,
16018 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016019 .block_erasers =
16020 {
16021 {
16022 .eraseblocks = {
16023 {16 * 1024, 1},
16024 {8 * 1024, 2},
16025 {32 * 1024, 1},
16026 {64 * 1024, 7},
16027 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016028 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016029 }, {
16030 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016031 .block_erase = erase_chip_block_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016032 }
16033 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016034 .write = write_jedec_1,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016035 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016036 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016037 .prepare_access = prepare_memory_access,
16038 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016039 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100016040
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016041 {
16042 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
16043 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016044 .name = "M29F400BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016045 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016046 .manufacture_id = ST_ID,
16047 .model_id = ST_M29F400BT,
16048 .total_size = 512,
16049 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016050 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016051 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016052 .probe = probe_jedec,
16053 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson56358aa2010-01-19 16:08:51 +000016054 .block_erasers =
16055 {
16056 {
16057 .eraseblocks = {
16058 {64 * 1024, 7},
16059 {32 * 1024, 1},
16060 {8 * 1024, 2},
16061 {16 * 1024, 1},
16062 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016063 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016064 }, {
16065 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016066 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016067 }
16068 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016069 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016070 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016071 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016072 .prepare_access = prepare_memory_access,
16073 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016074 },
16075
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016076 {
16077 .vendor = "ST",
16078 .name = "M29W010B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016079 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016080 .manufacture_id = ST_ID,
16081 .model_id = ST_M29W010B,
16082 .total_size = 128,
16083 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016084 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016085 .tested = TEST_UNTESTED,
16086 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016087 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016088 .block_erasers =
16089 {
16090 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016091 .eraseblocks = { {16 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000016092 .block_erase = erase_sector_jedec,
16093 }, {
16094 .eraseblocks = { {128 * 1024, 1} },
16095 .block_erase = erase_chip_block_jedec,
16096 }
16097 },
Sean Nelson35727f72010-01-28 23:55:12 +000016098 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016099 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016100 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016101 .prepare_access = prepare_memory_access,
16102 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016103 },
16104
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016105 {
16106 .vendor = "ST",
16107 .name = "M29W040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016108 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016109 .manufacture_id = ST_ID,
16110 .model_id = ST_M29W040B,
16111 .total_size = 512,
16112 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016113 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016114 .tested = TEST_UNTESTED,
16115 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016116 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016117 .block_erasers =
16118 {
16119 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016120 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000016121 .block_erase = erase_sector_jedec,
16122 }, {
16123 .eraseblocks = { {512 * 1024, 1} },
16124 .block_erase = erase_chip_block_jedec,
16125 }
16126 },
Sean Nelson35727f72010-01-28 23:55:12 +000016127 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016128 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016129 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016130 .prepare_access = prepare_memory_access,
16131 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016132 },
16133
Stefan Taunereb582572012-09-21 12:52:50 +000016134 {
16135 .vendor = "ST",
16136 .name = "M29W512B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016137 .bustype = BUS_PARALLEL,
Alan Greenfa3fcd32019-06-27 15:41:50 +100016138 .manufacture_id = ST_ID,
Stefan Taunereb582572012-09-21 12:52:50 +000016139 .model_id = ST_M29W512B,
16140 .total_size = 64,
16141 .page_size = 64 * 1024,
16142 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stefan Tauner0554ca52013-07-25 22:54:25 +000016143 .tested = TEST_OK_PREW,
Stefan Taunereb582572012-09-21 12:52:50 +000016144 .probe = probe_jedec,
16145 .probe_timing = TIMING_ZERO,
16146 .block_erasers =
16147 {
16148 {
16149 .eraseblocks = { {64 * 1024, 1} },
16150 .block_erase = erase_chip_block_jedec,
16151 }
16152 },
16153 .write = write_jedec_1,
16154 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016155 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016156 .prepare_access = prepare_memory_access,
16157 .finish_access = finish_memory_access,
Stefan Taunereb582572012-09-21 12:52:50 +000016158 },
Jeffrey A. Kentba7c9222010-02-01 05:49:46 +000016159
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016160 {
16161 .vendor = "ST",
16162 .name = "M50FLW040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016163 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016164 .manufacture_id = ST_ID,
16165 .model_id = ST_M50FLW040A,
16166 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016167 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016168 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016169 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016170 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016171 .block_erasers =
16172 {
16173 {
Sean Nelson329bde72010-01-19 16:39:19 +000016174 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016175 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016176 {64 * 1024, 5}, /* block */
16177 {4 * 1024, 16}, /* sector */
16178 {4 * 1024, 16}, /* sector */
16179 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016180 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016181 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016182 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016183 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016184 }
16185 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016186 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100016187 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016188 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016189 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016190 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016191 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016192 },
16193
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016194 {
16195 .vendor = "ST",
16196 .name = "M50FLW040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016197 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016198 .manufacture_id = ST_ID,
16199 .model_id = ST_M50FLW040B,
16200 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016201 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016202 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016203 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016204 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016205 .block_erasers =
16206 {
16207 {
Sean Nelson329bde72010-01-19 16:39:19 +000016208 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016209 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016210 {4 * 1024, 16}, /* sector */
16211 {64 * 1024, 5}, /* block */
16212 {4 * 1024, 16}, /* sector */
16213 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016214 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016215 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016216 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016217 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016218 }
16219 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016220 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100016221 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016222 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016223 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016224 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016225 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016226 },
16227
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016228 {
16229 .vendor = "ST",
16230 .name = "M50FLW080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016231 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016232 .manufacture_id = ST_ID,
16233 .model_id = ST_M50FLW080A,
16234 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016235 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016236 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000016237 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016238 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016239 .block_erasers =
16240 {
16241 {
Sean Nelson329bde72010-01-19 16:39:19 +000016242 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016243 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016244 {64 * 1024, 13}, /* block */
16245 {4 * 1024, 16}, /* sector */
16246 {4 * 1024, 16}, /* sector */
16247 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016248 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016249 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016250 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016251 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016252 }
16253 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016254 .printlock = printlock_regspace2_block_eraser_0,
16255 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016256 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016257 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016258 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016259 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016260 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016261 },
16262
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016263 {
16264 .vendor = "ST",
16265 .name = "M50FLW080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016266 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016267 .manufacture_id = ST_ID,
16268 .model_id = ST_M50FLW080B,
16269 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016270 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016271 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016272 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016273 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016274 .block_erasers =
16275 {
16276 {
Sean Nelson329bde72010-01-19 16:39:19 +000016277 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016278 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016279 {4 * 1024, 16}, /* sector */
16280 {64 * 1024, 13}, /* block */
16281 {4 * 1024, 16}, /* sector */
16282 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016283 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016284 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016285 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016286 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016287 }
16288 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016289 .printlock = printlock_regspace2_block_eraser_0,
16290 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016291 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016292 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016293 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016294 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016295 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016296 },
16297
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016298 {
16299 .vendor = "ST",
16300 .name = "M50FW002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016301 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016302 .manufacture_id = ST_ID,
16303 .model_id = ST_M50FW002,
16304 .total_size = 256,
Stefan Tauner4404f732013-09-12 08:28:56 +000016305 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016306 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000016307 .probe = probe_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016308 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016309 .block_erasers =
16310 {
16311 {
16312 .eraseblocks = {
16313 {64 * 1024, 3},
16314 {32 * 1024, 1},
16315 {8 * 1024, 2},
16316 {16 * 1024, 1},
16317 },
Sean Nelson28accc22010-03-19 18:47:06 +000016318 .block_erase = erase_block_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016319 }, {
Stefan Tauner5c316f92015-02-08 21:57:52 +000016320 .eraseblocks = { {256 * 1024, 1} },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016321 .block_erase = NULL, /* Only in A/A mux mode */
Sean Nelson56358aa2010-01-19 16:08:51 +000016322 }
16323 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016324 .printlock = printlock_regspace2_block_eraser_0,
16325 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016326 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016327 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016328 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016329 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016330 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016331 },
16332
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016333 {
16334 .vendor = "ST",
16335 .name = "M50FW016",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016336 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016337 .manufacture_id = ST_ID,
16338 .model_id = ST_M50FW016,
16339 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000016340 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016341 .tested = TEST_UNTESTED,
16342 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016343 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016344 .block_erasers =
16345 {
16346 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016347 .eraseblocks = { {64 * 1024, 32} },
Sean Nelson28accc22010-03-19 18:47:06 +000016348 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016349 }
16350 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016351 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016352 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016353 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016354 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016355 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016356 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016357 },
16358
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016359 {
16360 .vendor = "ST",
16361 .name = "M50FW040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016362 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016363 .manufacture_id = ST_ID,
16364 .model_id = ST_M50FW040,
16365 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016366 .page_size = 0,
Sean Nelson28accc22010-03-19 18:47:06 +000016367 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016368 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016369 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016370 .block_erasers =
16371 {
16372 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016373 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016374 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016375 }
16376 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016377 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016378 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016379 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016380 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016381 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016382 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016383 },
16384
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016385 {
16386 .vendor = "ST",
16387 .name = "M50FW080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016388 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016389 .manufacture_id = ST_ID,
16390 .model_id = ST_M50FW080,
16391 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016392 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016393 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016394 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016395 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016396 .block_erasers =
16397 {
16398 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016399 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016400 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016401 }
16402 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016403 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016404 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016405 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016406 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016407 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016408 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016409 },
16410
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016411 {
16412 .vendor = "ST",
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016413 .name = "M50LPW080",
16414 .bustype = BUS_LPC, /* A/A Mux */
16415 .manufacture_id = ST_ID,
16416 .model_id = ST_M50LPW080,
16417 .total_size = 1024,
16418 .page_size = 0,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016419 .tested = TEST_UNTESTED,
16420 .probe = probe_82802ab,
16421 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
16422 .block_erasers =
16423 {
16424 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016425 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016426 .block_erase = erase_block_82802ab,
16427 }
16428 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016429 .unlock = unlock_regspace2_uniform_64k,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016430 .write = write_82802ab,
16431 .read = read_memmapped,
16432 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016433 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016434 .finish_access = finish_memory_access,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016435 },
16436
16437 {
16438 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016439 .name = "M50LPW116",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016440 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016441 .manufacture_id = ST_ID,
16442 .model_id = ST_M50LPW116,
16443 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000016444 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016445 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016446 .probe = probe_82802ab,
Udu Ogahc04ee222009-09-05 01:31:32 +000016447 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016448 .block_erasers =
16449 {
16450 {
16451 .eraseblocks = {
16452 {4 * 1024, 16},
16453 {64 * 1024, 30},
16454 {32 * 1024, 1},
16455 {8 * 1024, 2},
16456 {16 * 1024, 1},
16457 },
Sean Nelson28accc22010-03-19 18:47:06 +000016458 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016459 }
16460 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016461 .printlock = printlock_regspace2_block_eraser_0,
16462 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016463 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016464 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016465 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016466 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016467 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016468 },
16469
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016470 {
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030016471 .vendor = "ST",
16472 .name = "M95M02",
16473 .bustype = BUS_SPI,
16474 .manufacture_id = ST_ID,
16475 .model_id = ST_M95M02,
16476 .total_size = 256,
16477 .page_size = 256,
16478 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
16479 .tested = TEST_OK_PREW,
Nico Huber54557862023-05-15 12:01:04 +020016480 .spi_cmd_set = SPI95,
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030016481 .probe = probe_spi_st95,
16482 .probe_timing = TIMING_ZERO,
16483 .block_erasers =
16484 {
16485 {
16486 .eraseblocks = { {256 * 1024, 1} },
16487 .block_erase = spi_block_erase_emulation,
16488 }
16489 },
16490
16491 .printlock = spi_prettyprint_status_register_bp1_srwd,
16492 .unlock = spi_disable_blockprotect_bp1_srwd,
16493 .write = spi_chip_write_256,
16494 .read = spi_chip_read,
16495 .voltage = {2500, 5500},
16496 },
16497
16498 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100016499 .vendor = "Sanyo",
16500 .name = "LE25FU106B",
16501 .bustype = BUS_SPI,
16502 .manufacture_id = SANYO_ID,
16503 .model_id = SANYO_LE25FU106B,
16504 .total_size = 128,
16505 .page_size = 256,
16506 .feature_bits = FEATURE_WRSR_WREN,
16507 .tested = TEST_UNTESTED,
16508 .probe = probe_spi_res2,
16509 .probe_timing = TIMING_ZERO,
16510 .block_erasers =
16511 {
16512 /* FIXME: Is this correct?
16513 {
16514 .eraseblocks = { {2 * 1024, 64} },
16515 .block_erase = spi_block_erase_d7,
16516 },*/
16517 {
16518 .eraseblocks = { {32 * 1024, 4} },
16519 .block_erase = spi_block_erase_d8,
16520 }, {
16521 .eraseblocks = { {128 * 1024, 1} },
16522 .block_erase = spi_block_erase_c7,
16523 }
16524 },
16525 .printlock = spi_prettyprint_status_register_bp1_srwd,
16526 .unlock = spi_disable_blockprotect_bp1_srwd,
16527 .write = spi_chip_write_256,
16528 .read = spi_chip_read,
16529 .voltage = {2300, 3600},
16530 },
16531
16532 {
16533 .vendor = "Sanyo",
16534 .name = "LE25FU206",
16535 .bustype = BUS_SPI,
16536 .manufacture_id = SANYO_ID,
16537 .model_id = SANYO_LE25FU206,
16538 .total_size = 256,
16539 .page_size = 256,
16540 .feature_bits = FEATURE_WRSR_WREN,
16541 .tested = TEST_UNTESTED,
16542 .probe = probe_spi_res2,
16543 .probe_timing = TIMING_ZERO,
16544 .block_erasers =
16545 {
16546 {
16547 .eraseblocks = { {4 * 1024, 64} },
16548 .block_erase = spi_block_erase_d7,
16549 }, {
16550 .eraseblocks = { {64 * 1024, 4} },
16551 .block_erase = spi_block_erase_d8,
16552 }, {
16553 .eraseblocks = { {256 * 1024, 1} },
16554 .block_erase = spi_block_erase_c7,
16555 }
16556 },
16557 .printlock = spi_prettyprint_status_register_bp1_srwd,
16558 .unlock = spi_disable_blockprotect_bp1_srwd,
16559 .write = spi_chip_write_256,
16560 .read = spi_chip_read,
16561 .voltage = {2300, 3600},
16562 },
16563
16564 {
16565 .vendor = "Sanyo",
16566 .name = "LE25FU206A",
16567 .bustype = BUS_SPI,
16568 .manufacture_id = SANYO_ID,
16569 .model_id = SANYO_LE25FU206A,
16570 .total_size = 256,
16571 .page_size = 256,
16572 .tested = TEST_UNTESTED,
16573 .probe = probe_spi_rdid,
16574 .probe_timing = TIMING_ZERO,
16575 .block_erasers =
16576 {
16577 {
16578 .eraseblocks = { {4 * 1024, 64} },
16579 .block_erase = spi_block_erase_20,
16580 }, {
16581 .eraseblocks = { {4 * 1024, 64} },
16582 .block_erase = spi_block_erase_d7,
16583 }, {
16584 .eraseblocks = { {64 * 1024, 4} },
16585 .block_erase = spi_block_erase_d8,
16586 }, {
16587 .eraseblocks = { {256 * 1024, 1} },
16588 .block_erase = spi_block_erase_60,
16589 }, {
16590 .eraseblocks = { {256 * 1024, 1} },
16591 .block_erase = spi_block_erase_c7,
16592 }
16593 },
16594 .printlock = spi_prettyprint_status_register_bp2_srwd,
16595 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16596 .write = spi_chip_write_256,
16597 .read = spi_chip_read,
16598 .voltage = {2300, 3600},
16599 },
16600
16601 {
16602 .vendor = "Sanyo",
16603 .name = "LE25FU406B",
16604 .bustype = BUS_SPI,
16605 .manufacture_id = SANYO_ID,
16606 .model_id = SANYO_LE25FU406B,
16607 .total_size = 512,
16608 .page_size = 256,
16609 .feature_bits = FEATURE_WRSR_WREN,
16610 .tested = TEST_OK_PREW,
16611 .probe = probe_spi_res2,
16612 .probe_timing = TIMING_ZERO,
16613 .block_erasers =
16614 {
16615 {
16616 .eraseblocks = { {4 * 1024, 128} },
16617 .block_erase = spi_block_erase_d7,
16618 }, {
16619 .eraseblocks = { {64 * 1024, 8} },
16620 .block_erase = spi_block_erase_d8,
16621 }, {
16622 .eraseblocks = { {512 * 1024, 1} },
16623 .block_erase = spi_block_erase_c7,
16624 }
16625 },
16626 .printlock = spi_prettyprint_status_register_bp2_srwd,
16627 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16628 .write = spi_chip_write_256,
16629 .read = spi_chip_read,
16630 .voltage = {2300, 3600},
16631 },
16632
16633 {
16634 .vendor = "Sanyo",
16635 .name = "LE25FU406C/LE25U40CMC",
16636 .bustype = BUS_SPI,
16637 .manufacture_id = SANYO_ID,
16638 .model_id = SANYO_LE25FU406C,
16639 .total_size = 512,
16640 .page_size = 256,
16641 .feature_bits = FEATURE_WRSR_WREN,
16642 .tested = TEST_OK_PREW,
16643 .probe = probe_spi_rdid,
16644 .probe_timing = TIMING_ZERO,
16645 .block_erasers =
16646 {
16647 {
16648 .eraseblocks = { {4 * 1024, 128} },
16649 .block_erase = spi_block_erase_20,
16650 }, {
16651 .eraseblocks = { {4 * 1024, 128} },
16652 .block_erase = spi_block_erase_d7,
16653 }, {
16654 .eraseblocks = { {64 * 1024, 8} },
16655 .block_erase = spi_block_erase_d8,
16656 }, {
16657 .eraseblocks = { {512 * 1024, 1} },
16658 .block_erase = spi_block_erase_60,
16659 }, {
16660 .eraseblocks = { {512 * 1024, 1} },
16661 .block_erase = spi_block_erase_c7,
16662 }
16663 },
16664 .printlock = spi_prettyprint_status_register_bp2_srwd,
16665 .unlock = spi_disable_blockprotect_bp2_srwd,
16666 .write = spi_chip_write_256,
16667 .read = spi_chip_read, /* Fast read (0x0B), dual read (0x3B) and dual I/O (0xBB) supported */
16668 .voltage = {2300, 3600},
16669 },
16670
16671 {
16672 .vendor = "Sanyo",
16673 .name = "LE25FW106",
16674 .bustype = BUS_SPI,
16675 .manufacture_id = SANYO_ID,
16676 .model_id = SANYO_LE25FW106,
16677 .total_size = 128,
16678 .page_size = 256,
16679 .feature_bits = FEATURE_WRSR_WREN,
16680 .tested = TEST_OK_PREW,
16681 .probe = probe_spi_res2,
16682 .probe_timing = TIMING_ZERO,
16683 .block_erasers =
16684 {
16685 {
16686 .eraseblocks = { {2 * 1024, 64} },
16687 .block_erase = spi_block_erase_d7,
16688 }, {
16689 .eraseblocks = { {32 * 1024, 4} },
16690 .block_erase = spi_block_erase_d8,
16691 }, {
16692 .eraseblocks = { {128 * 1024, 1} },
16693 .block_erase = spi_block_erase_c7,
16694 }
16695 },
16696 .printlock = spi_prettyprint_status_register_bp1_srwd, /* FIXME: Add ERSER error flag. */
16697 .unlock = spi_disable_blockprotect_bp1_srwd,
16698 .write = spi_chip_write_256,
16699 .read = spi_chip_read,
16700 .voltage = {2700, 3600},
16701 },
16702
16703 {
16704 .vendor = "Sanyo",
16705 .name = "LE25FW203A",
16706 .bustype = BUS_SPI,
16707 .manufacture_id = SANYO_ID,
16708 .model_id = SANYO_LE25FW203A,
16709 .total_size = 256,
16710 .page_size = 256,
16711 .tested = TEST_UNTESTED,
16712 .probe = probe_spi_rdid,
16713 .probe_timing = TIMING_ZERO,
16714 .block_erasers =
16715 {
16716 {
16717 .eraseblocks = { {256, 1024} },
16718 .block_erase = spi_block_erase_db,
16719 }, {
16720 .eraseblocks = { {64 * 1024, 4} },
16721 .block_erase = spi_block_erase_d8,
16722 }, {
16723 .eraseblocks = { {256 * 1024, 1} },
16724 .block_erase = spi_block_erase_c7,
16725 }
16726 },
16727 .printlock = spi_prettyprint_status_register_default_welwip,
16728 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
16729 .write = spi_chip_write_256,
16730 .read = spi_chip_read,
16731 .voltage = {2700, 3600},
16732 },
16733
16734 {
16735 .vendor = "Sanyo",
16736 .name = "LE25FW403A",
16737 .bustype = BUS_SPI,
16738 .manufacture_id = SANYO_ID,
16739 .model_id = SANYO_LE25FW403A,
16740 .total_size = 512,
16741 .page_size = 256,
16742 .tested = TEST_UNTESTED,
16743 .probe = probe_spi_rdid,
16744 .probe_timing = TIMING_ZERO,
16745 .block_erasers =
16746 {
16747 {
16748 .eraseblocks = { {256, 2 * 1024} },
16749 .block_erase = spi_block_erase_db,
16750 }, {
16751 .eraseblocks = { {64 * 1024, 8} },
16752 .block_erase = spi_block_erase_d8,
16753 }, {
16754 .eraseblocks = { {512 * 1024, 1} },
16755 .block_erase = spi_block_erase_c7,
16756 }
16757 },
16758 .printlock = spi_prettyprint_status_register_default_welwip,
16759 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
16760 .write = spi_chip_write_256,
16761 .read = spi_chip_read,
16762 .voltage = {2700, 3600},
16763 },
16764
16765 {
16766 .vendor = "Sanyo",
16767 .name = "LE25FW406A",
16768 .bustype = BUS_SPI,
16769 .manufacture_id = SANYO_ID,
16770 .model_id = SANYO_LE25FW406A,
16771 .total_size = 512,
16772 .page_size = 256,
16773 .feature_bits = FEATURE_WRSR_WREN,
16774 .tested = TEST_OK_PREW,
16775 .probe = probe_spi_res2,
16776 .probe_timing = TIMING_ZERO,
16777 .block_erasers =
16778 {
16779 {
16780 .eraseblocks = { {4 * 1024, 128} },
16781 .block_erase = spi_block_erase_d7,
16782 }, {
16783 .eraseblocks = { {64 * 1024, 8} },
16784 .block_erase = spi_block_erase_d8,
16785 }, {
16786 .eraseblocks = { {512 * 1024, 1} },
16787 .block_erase = spi_block_erase_c7,
16788 }
16789 },
16790 .printlock = spi_prettyprint_status_register_plain,
16791 .unlock = spi_disable_blockprotect,
16792 .write = spi_chip_write_256,
16793 .read = spi_chip_read,
16794 .voltage = {2700, 3600},
16795 },
16796
16797 {
16798 .vendor = "Sanyo",
16799 .name = "LE25FW418A",
16800 .bustype = BUS_SPI,
16801 .manufacture_id = SANYO_ID,
16802 .model_id = SANYO_LE25FW418A,
16803 .total_size = 512,
16804 .page_size = 256,
16805 .feature_bits = FEATURE_WRSR_WREN,
16806 .tested = TEST_UNTESTED,
16807 .probe = probe_spi_res2,
16808 .probe_timing = TIMING_ZERO,
16809 .block_erasers =
16810 {
16811 {
16812 .eraseblocks = { {4 * 1024, 128} },
16813 .block_erase = spi_block_erase_d7,
16814 }, {
16815 .eraseblocks = { {64 * 1024, 8} },
16816 .block_erase = spi_block_erase_d8,
16817 }, {
16818 .eraseblocks = { {512 * 1024, 1} },
16819 .block_erase = spi_block_erase_c7,
16820 }
16821 },
16822 .printlock = spi_prettyprint_status_register_bp2_srwd,
16823 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16824 .write = spi_chip_write_256,
16825 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
16826 .voltage = {2700, 3600},
16827 },
16828
16829 {
16830 .vendor = "Sanyo",
16831 .name = "LE25FW806",
16832 .bustype = BUS_SPI,
16833 .manufacture_id = SANYO_ID,
16834 .model_id = SANYO_LE25FW806,
16835 .total_size = 1024,
16836 .page_size = 256,
16837 .feature_bits = FEATURE_WRSR_WREN,
16838 .tested = TEST_UNTESTED,
16839 .probe = probe_spi_res2,
16840 .probe_timing = TIMING_ZERO,
16841 .block_erasers =
16842 {
16843 {
16844 .eraseblocks = { {4 * 1024, 256} },
16845 .block_erase = spi_block_erase_20,
16846 }, {
16847 .eraseblocks = { {4 * 1024, 256} },
16848 .block_erase = spi_block_erase_d7,
16849 }, {
16850 .eraseblocks = { {64 * 1024, 16} },
16851 .block_erase = spi_block_erase_d8,
16852 }, {
16853 .eraseblocks = { {1024 * 1024, 1} },
16854 .block_erase = spi_block_erase_c7,
16855 }
16856 },
16857 .printlock = spi_prettyprint_status_register_bp2_srwd,
16858 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16859 .write = spi_chip_write_256,
16860 .read = spi_chip_read,
16861 .voltage = {2700, 3600},
16862 },
16863
16864 {
16865 .vendor = "Sanyo",
16866 .name = "LE25FW808",
16867 .bustype = BUS_SPI,
16868 .manufacture_id = SANYO_ID,
16869 .model_id = SANYO_LE25FW808,
16870 .total_size = 1024,
16871 .page_size = 256,
16872 .feature_bits = FEATURE_WRSR_WREN,
16873 .tested = TEST_UNTESTED,
16874 .probe = probe_spi_res2,
16875 .probe_timing = TIMING_ZERO,
16876 .block_erasers =
16877 {
16878 {
16879 .eraseblocks = { {8 * 1024, 128} },
16880 .block_erase = spi_block_erase_d7,
16881 }, {
16882 .eraseblocks = { {64 * 1024, 16} },
16883 .block_erase = spi_block_erase_d8,
16884 }, {
16885 .eraseblocks = { {1024 * 1024, 1} },
16886 .block_erase = spi_block_erase_c7,
16887 }
16888 },
16889 .printlock = spi_prettyprint_status_register_bp2_srwd,
16890 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16891 .write = spi_chip_write_256,
16892 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
16893 .voltage = {2700, 3600},
16894 },
16895
16896 {
16897 .vendor = "Sharp",
16898 .name = "LH28F008BJT-BTLZ1",
16899 .bustype = BUS_PARALLEL,
16900 .manufacture_id = SHARP_ID,
16901 .model_id = SHARP_LH28F008BJ__PB,
16902 .total_size = 1024,
16903 .page_size = 64 * 1024,
16904 .tested = TEST_OK_PREW,
16905 .probe = probe_82802ab,
16906 .probe_timing = TIMING_ZERO,
16907 .block_erasers =
16908 {
16909 {
16910 .eraseblocks = {
16911 {8 * 1024, 8},
16912 {64 * 1024, 15}
16913 },
16914 .block_erase = erase_block_82802ab,
16915 }, {
16916 .eraseblocks = { {1024 * 1024, 1} },
16917 .block_erase = erase_sector_49lfxxxc,
16918 }
16919 },
16920 .unlock = unlock_lh28f008bjt,
16921 .write = write_82802ab,
16922 .read = read_memmapped,
16923 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016924 .prepare_access = prepare_memory_access,
16925 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016926 },
16927
16928 {
16929 .vendor = "Sharp",
16930 .name = "LHF00L04",
16931 .bustype = BUS_FWH, /* A/A Mux */
16932 .manufacture_id = SHARP_ID,
16933 .model_id = SHARP_LHF00L04,
16934 .total_size = 1024,
16935 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010016936 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016937 .tested = TEST_UNTESTED,
16938 .probe = probe_82802ab,
16939 .probe_timing = TIMING_ZERO,
16940 .block_erasers =
16941 {
16942 {
16943 .eraseblocks = {
16944 {64 * 1024, 15},
16945 {8 * 1024, 8}
16946 },
16947 .block_erase = erase_block_82802ab,
16948 }, {
16949 .eraseblocks = {
16950 {1024 * 1024, 1}
16951 },
16952 .block_erase = NULL, /* 30 D0, only in A/A mux mode */
16953 },
16954 },
16955 .unlock = unlock_regspace2_uniform_64k,
16956 .write = write_82802ab,
16957 .read = read_memmapped,
16958 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010016959 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016960 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016961 },
16962
16963 {
16964 .vendor = "Spansion",
16965 .name = "S25FL004A",
16966 .bustype = BUS_SPI,
16967 .manufacture_id = SPANSION_ID,
16968 .model_id = SPANSION_S25FL004A,
16969 .total_size = 512,
16970 .page_size = 256,
16971 .feature_bits = FEATURE_WRSR_WREN,
16972 .tested = TEST_UNTESTED,
16973 .probe = probe_spi_rdid,
16974 .probe_timing = TIMING_ZERO,
16975 .block_erasers =
16976 {
16977 {
16978 .eraseblocks = { {64 * 1024, 8} },
16979 .block_erase = spi_block_erase_d8,
16980 }, {
16981 .eraseblocks = { {512 * 1024, 1} },
16982 .block_erase = spi_block_erase_c7,
16983 }
16984 },
16985 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
16986 .unlock = spi_disable_blockprotect,
16987 .write = spi_chip_write_256,
16988 .read = spi_chip_read,
16989 .voltage = {2700, 3600},
16990 },
16991
16992 {
16993 .vendor = "Spansion",
16994 .name = "S25FL008A",
16995 .bustype = BUS_SPI,
16996 .manufacture_id = SPANSION_ID,
16997 .model_id = SPANSION_S25FL008A,
16998 .total_size = 1024,
16999 .page_size = 256,
17000 .feature_bits = FEATURE_WRSR_WREN,
17001 .tested = TEST_OK_PRE,
17002 .probe = probe_spi_rdid,
17003 .probe_timing = TIMING_ZERO,
17004 .block_erasers =
17005 {
17006 {
17007 .eraseblocks = { {64 * 1024, 16} },
17008 .block_erase = spi_block_erase_d8,
17009 }, {
17010 .eraseblocks = { {1024 * 1024, 1} },
17011 .block_erase = spi_block_erase_c7,
17012 }
17013 },
17014 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17015 .unlock = spi_disable_blockprotect,
17016 .write = spi_chip_write_256,
17017 .read = spi_chip_read,
17018 .voltage = {2700, 3600},
17019 },
17020
17021 {
17022 .vendor = "Spansion",
17023 .name = "S25FL016A",
17024 .bustype = BUS_SPI,
17025 .manufacture_id = SPANSION_ID,
17026 .model_id = SPANSION_S25FL016A,
17027 .total_size = 2048,
17028 .page_size = 256,
17029 .feature_bits = FEATURE_WRSR_WREN,
17030 .tested = TEST_OK_PREW,
17031 .probe = probe_spi_rdid,
17032 .probe_timing = TIMING_ZERO,
17033 .block_erasers =
17034 {
17035 {
17036 .eraseblocks = { {64 * 1024, 32} },
17037 .block_erase = spi_block_erase_d8,
17038 }, {
17039 .eraseblocks = { {2 * 1024 * 1024, 1} },
17040 .block_erase = spi_block_erase_c7,
17041 }
17042 },
17043 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17044 .unlock = spi_disable_blockprotect,
17045 .write = spi_chip_write_256,
17046 .read = spi_chip_read,
17047 .voltage = {2700, 3600},
17048 },
17049
17050 {
17051 .vendor = "Spansion",
17052 .name = "S25FL032A/P",
17053 .bustype = BUS_SPI,
17054 .manufacture_id = SPANSION_ID,
17055 .model_id = SPANSION_S25FL032A,
17056 .total_size = 4096,
17057 .page_size = 256,
17058 .feature_bits = FEATURE_WRSR_WREN,
17059 .tested = TEST_OK_PREW,
17060 .probe = probe_spi_rdid,
17061 .probe_timing = TIMING_ZERO,
17062 .block_erasers =
17063 {
17064 {
17065 .eraseblocks = { {64 * 1024, 64} },
17066 .block_erase = spi_block_erase_d8,
17067 }, {
17068 .eraseblocks = { {4 * 1024 * 1024, 1} },
17069 .block_erase = spi_block_erase_c7,
17070 }
17071 },
17072 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17073 .unlock = spi_disable_blockprotect,
17074 .write = spi_chip_write_256,
17075 .read = spi_chip_read,
17076 .voltage = {2700, 3600},
17077 },
17078
17079 {
17080 .vendor = "Spansion",
17081 .name = "S25FL064A/P",
17082 .bustype = BUS_SPI,
17083 .manufacture_id = SPANSION_ID,
17084 .model_id = SPANSION_S25FL064A,
17085 .total_size = 8192,
17086 .page_size = 256,
17087 .feature_bits = FEATURE_WRSR_WREN,
17088 .tested = TEST_OK_PREW,
17089 .probe = probe_spi_rdid,
17090 .probe_timing = TIMING_ZERO,
17091 .block_erasers =
17092 {
17093 {
17094 .eraseblocks = { {64 * 1024, 128} },
17095 .block_erase = spi_block_erase_d8,
17096 }, {
17097 .eraseblocks = { {8 * 1024 * 1024, 1} },
17098 .block_erase = spi_block_erase_c7,
17099 }
17100 },
17101 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17102 .unlock = spi_disable_blockprotect,
17103 .write = spi_chip_write_256,
17104 .read = spi_chip_read,
17105 .voltage = {2700, 3600},
17106 },
17107
17108 {
17109 .vendor = "Spansion",
17110 .name = "S25FL116K/S25FL216K", /* FIXME: separate them */
17111 .bustype = BUS_SPI,
17112 .manufacture_id = SPANSION_ID,
17113 .model_id = SPANSION_S25FL216,
17114 .total_size = 2048,
17115 .page_size = 256,
17116 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (S25FL116K only) */
17117 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17118 .tested = TEST_UNTESTED,
17119 .probe = probe_spi_rdid,
17120 .probe_timing = TIMING_ZERO,
17121 .block_erasers =
17122 {
17123 {
17124 .eraseblocks = { {4 * 1024, 512} },
17125 .block_erase = spi_block_erase_20,
17126 }, {
17127 .eraseblocks = { {64 * 1024, 32} },
17128 .block_erase = spi_block_erase_d8,
17129 }, {
17130 .eraseblocks = { { 2048 * 1024, 1} },
17131 .block_erase = spi_block_erase_60,
17132 }, {
17133 .eraseblocks = { { 2048 * 1024, 1} },
17134 .block_erase = spi_block_erase_c7,
17135 }
17136 },
17137 .printlock = spi_prettyprint_status_register_bp3_srwd,
17138 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17139 .write = spi_chip_write_256,
17140 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17141 .voltage = {2700, 3600},
17142 },
17143
17144 {
17145 .vendor = "Spansion",
17146 .name = "S25FL127S-256kB", /* uniform 256kB sectors */
17147 .bustype = BUS_SPI,
17148 .manufacture_id = SPANSION_ID,
17149 .model_id = SPANSION_S25FL128,
17150 .total_size = 16384,
17151 .page_size = 512,
17152 /* supports 4B addressing */
17153 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17154 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17155 .tested = TEST_UNTESTED,
17156 .probe = probe_spi_rdid,
17157 .probe_timing = TIMING_ZERO,
17158 .block_erasers =
17159 {
17160 {
17161 .eraseblocks = { {256 * 1024, 64} },
17162 .block_erase = spi_block_erase_d8,
17163 }, {
17164 .eraseblocks = { { 16384 * 1024, 1} },
17165 .block_erase = spi_block_erase_60,
17166 }, {
17167 .eraseblocks = { { 16384 * 1024, 1} },
17168 .block_erase = spi_block_erase_c7,
17169 }
17170 },
17171 .printlock = spi_prettyprint_status_register_bp2_srwd,
17172 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17173 .write = spi_chip_write_256, /* Multi I/O supported */
17174 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17175 .voltage = {2700, 3600},
17176 },
17177
17178 {
17179 .vendor = "Spansion",
17180 .name = "S25FL127S-64kB", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17181 .bustype = BUS_SPI,
17182 .manufacture_id = SPANSION_ID,
17183 .model_id = SPANSION_S25FL128,
17184 .total_size = 16384,
17185 .page_size = 256,
17186 /* supports 4B addressing */
17187 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17188 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17189 .tested = TEST_OK_PREW,
17190 /* FIXME: we should distinguish the configuration on probing time like we do for AT45DB chips */
17191 .probe = probe_spi_rdid,
17192 .probe_timing = TIMING_ZERO,
17193 .block_erasers =
17194 {
17195 {
17196 /* This chip supports erasing of 32 so-called "parameter sectors" with
17197 * opcode 0x20 which may be configured to be on top or bottom of the address
17198 * space. Trying to access an address outside these 4kB blocks does have no
17199 * effect on the memory contents, e.g.
17200 .eraseblocks = {
17201 {4 * 1024, 32},
17202 {64 * 1024, 254} // inaccessible
17203 },
17204 .block_erase = spi_block_erase_20,
17205 }, { */
17206 .eraseblocks = { { 64 * 1024, 256} },
17207 .block_erase = spi_block_erase_d8,
17208 }, {
17209 .eraseblocks = { { 16384 * 1024, 1} },
17210 .block_erase = spi_block_erase_60,
17211 }, {
17212 .eraseblocks = { { 16384 * 1024, 1} },
17213 .block_erase = spi_block_erase_c7,
17214 }
17215 },
17216 .printlock = spi_prettyprint_status_register_bp2_srwd,
17217 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17218 .write = spi_chip_write_256, /* Multi I/O supported */
17219 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17220 .voltage = {2700, 3600},
17221 },
17222
17223 {
17224 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020017225 .name = "S25FL128L",
17226 .bustype = BUS_SPI,
17227 .manufacture_id = SPANSION_ID,
17228 .model_id = SPANSION_S25FL128L,
17229 .total_size = 16384,
17230 .page_size = 256,
17231 /* 4 x 256B Security Region (OTP) */
17232 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP,
17233 .tested = TEST_UNTESTED,
17234 .probe = probe_spi_rdid,
17235 .probe_timing = TIMING_ZERO,
17236 .block_erasers =
17237 {
17238 {
17239 .eraseblocks = { {4 * 1024, 4096} },
17240 .block_erase = spi_block_erase_20,
17241 }, {
17242 .eraseblocks = { {32 * 1024, 512} },
17243 .block_erase = spi_block_erase_52,
17244 }, {
17245 .eraseblocks = { {64 * 1024, 256} },
17246 .block_erase = spi_block_erase_d8,
17247 }, {
17248 .eraseblocks = { {16384 * 1024, 1} },
17249 .block_erase = spi_block_erase_60,
17250 }, {
17251 .eraseblocks = { {16384 * 1024, 1} },
17252 .block_erase = spi_block_erase_c7,
17253 }
17254 },
17255 .printlock = spi_prettyprint_status_register_bp2_srwd,
17256 .unlock = spi_disable_blockprotect_bp2_srwd,
17257 .write = spi_chip_write_256,
17258 .read = spi_chip_read, /* Fast read (0x0B) supported */
17259 .voltage = {2700, 3600},
17260 .reg_bits =
17261 {
17262 /*
17263 * Note: This chip has a read-only Status Register 2 that is not
17264 * counted here. Registers are mapped as follows:
17265 * STATUS1 ... Status Register 1
17266 * STATUS2 ... Configuration Register 1
17267 * STATUS3 ... Configuration Register 2
17268 */
17269 .srp = {STATUS1, 7, RW},
17270 .srl = {STATUS2, 0, RW},
17271 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17272 .tb = {STATUS1, 5, RW},
17273 .sec = {STATUS1, 6, RW},
17274 .cmp = {STATUS2, 6, RW},
17275 .wps = {STATUS3, 2, RW},
17276 },
Nico Huberaabb3e02023-01-13 00:22:30 +010017277 .wp_write_cfg = spi_wp_write_cfg,
17278 .wp_read_cfg = spi_wp_read_cfg,
17279 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020017280 .decode_range = decode_range_spi25,
17281 },
17282
17283 {
17284 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100017285 .name = "S25FL128P......0", /* uniform 64 kB sectors */
17286 .bustype = BUS_SPI,
17287 .manufacture_id = SPANSION_ID,
17288 .model_id = SPANSION_S25FL128,
17289 .total_size = 16384,
17290 .page_size = 256,
17291 .feature_bits = FEATURE_WRSR_WREN,
17292 .tested = TEST_OK_PREW,
17293 .probe = probe_spi_rdid,
17294 .probe_timing = TIMING_ZERO,
17295 .block_erasers =
17296 {
17297 {
17298 .eraseblocks = { {64 * 1024, 256} },
17299 .block_erase = spi_block_erase_20,
17300 }, {
17301 .eraseblocks = { {64 * 1024, 256} },
17302 .block_erase = spi_block_erase_d8,
17303 }, {
17304 .eraseblocks = { { 16384 * 1024, 1} },
17305 .block_erase = spi_block_erase_60,
17306 }, {
17307 .eraseblocks = { { 16384 * 1024, 1} },
17308 .block_erase = spi_block_erase_c7,
17309 }
17310 },
17311 .printlock = spi_prettyprint_status_register_bp3_srwd,
17312 .unlock = spi_disable_blockprotect_bp3_srwd,
17313 .write = spi_chip_write_256,
17314 .read = spi_chip_read, /* Fast read (0x0B) supported */
17315 .voltage = {2700, 3600},
17316 },
17317
17318 {
17319 .vendor = "Spansion",
17320 .name = "S25FL128P......1", /* uniform 256kB sectors */
17321 .bustype = BUS_SPI,
17322 .manufacture_id = SPANSION_ID,
17323 .model_id = SPANSION_S25FL128,
17324 .total_size = 16384,
17325 .page_size = 256,
17326 .feature_bits = FEATURE_WRSR_WREN,
17327 .tested = TEST_UNTESTED,
17328 .probe = probe_spi_rdid,
17329 .probe_timing = TIMING_ZERO,
17330 .block_erasers =
17331 {
17332 {
17333 .eraseblocks = { {256 * 1024, 64} },
17334 .block_erase = spi_block_erase_d8,
17335 }, {
17336 .eraseblocks = { { 16384 * 1024, 1} },
17337 .block_erase = spi_block_erase_c7,
17338 }
17339 },
17340 .printlock = spi_prettyprint_status_register_bp2_srwd,
17341 .unlock = spi_disable_blockprotect_bp2_srwd,
17342 .write = spi_chip_write_256,
17343 .read = spi_chip_read, /* Fast read (0x0B) supported */
17344 .voltage = {2700, 3600},
17345 },
17346
17347 {
17348 .vendor = "Spansion",
17349 .name = "S25FL128S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17350 .bustype = BUS_SPI,
17351 .manufacture_id = SPANSION_ID,
17352 .model_id = SPANSION_S25FL128,
17353 .total_size = 16384,
17354 .page_size = 256,
17355 /* supports 4B addressing */
17356 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17357 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17358 .tested = TEST_OK_PREW,
17359 .probe = probe_spi_rdid,
17360 .probe_timing = TIMING_ZERO,
17361 .block_erasers =
17362 {
17363 {
17364 /* This chip supports erasing of the 32 so-called "parameter sectors" with
17365 * opcode 0x20. Trying to access an address outside these 4kB blocks does
17366 * have no effect on the memory contents, but sets a flag in the SR.
17367 .eraseblocks = {
17368 {4 * 1024, 32},
17369 {64 * 1024, 254} // inaccessible
17370 },
17371 .block_erase = spi_block_erase_20,
17372 }, { */
17373 .eraseblocks = { { 64 * 1024, 256} },
17374 .block_erase = spi_block_erase_d8,
17375 }, {
17376 .eraseblocks = { { 16384 * 1024, 1} },
17377 .block_erase = spi_block_erase_60,
17378 }, {
17379 .eraseblocks = { { 16384 * 1024, 1} },
17380 .block_erase = spi_block_erase_c7,
17381 }
17382 },
17383 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17384 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17385 .write = spi_chip_write_256, /* Multi I/O supported */
17386 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17387 .voltage = {2700, 3600},
17388 },
17389
17390 {
17391 .vendor = "Spansion",
17392 .name = "S25FL128S......1", /* uniform 256 kB sectors */
17393 .bustype = BUS_SPI,
17394 .manufacture_id = SPANSION_ID,
17395 .model_id = SPANSION_S25FL128,
17396 .total_size = 16384,
17397 .page_size = 512,
17398 /* supports 4B addressing */
17399 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17400 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17401 .tested = TEST_UNTESTED,
17402 .probe = probe_spi_rdid,
17403 .probe_timing = TIMING_ZERO,
17404 .block_erasers =
17405 {
17406 {
17407 .eraseblocks = { {256 * 1024, 64} },
17408 .block_erase = spi_block_erase_d8,
17409 }, {
17410 .eraseblocks = { { 16384 * 1024, 1} },
17411 .block_erase = spi_block_erase_60,
17412 }, {
17413 .eraseblocks = { { 16384 * 1024, 1} },
17414 .block_erase = spi_block_erase_c7,
17415 }
17416 },
17417 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17418 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17419 .write = spi_chip_write_256, /* Multi I/O supported */
17420 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17421 .voltage = {2700, 3600},
17422 },
17423
17424 {
17425 .vendor = "Spansion",
17426 .name = "S25FL129P......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17427 .bustype = BUS_SPI,
17428 .manufacture_id = SPANSION_ID,
17429 .model_id = SPANSION_S25FL128,
17430 .total_size = 16384,
17431 .page_size = 256,
17432 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
17433 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17434 .tested = TEST_OK_PREW,
17435 .probe = probe_spi_rdid,
17436 .probe_timing = TIMING_ZERO,
17437 .block_erasers =
17438 {
17439 {
17440 /* FIXME: This chip supports erasing of the 32 so-called "parameter sectors" with
17441 * opcode 0x20. Trying to access an address outside these 4kB blocks does have no
17442 * effect on the memory contents, but sets a flag in the SR.
17443 .eraseblocks = {
17444 {4 * 1024, 32},
17445 {64 * 1024, 254} // inaccessible
17446 },
17447 .block_erase = spi_block_erase_20,
17448 }, { */
17449 /* FIXME: Additionally it also supports erase opcode 40h for the respective 2*4 kB pairs
17450 .eraseblocks = {
17451 {8 * 1024, 16},
17452 {64 * 1024, 254} // inaccessible
17453 },
17454 .block_erase = spi_block_erase_40,
17455 }, { */
17456 .eraseblocks = { { 64 * 1024, 256} },
17457 .block_erase = spi_block_erase_d8,
17458 }, {
17459 .eraseblocks = { { 16384 * 1024, 1} },
17460 .block_erase = spi_block_erase_60,
17461 }, {
17462 .eraseblocks = { { 16384 * 1024, 1} },
17463 .block_erase = spi_block_erase_c7,
17464 }
17465 },
17466 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
17467 .unlock = spi_disable_blockprotect_bp2_srwd,
17468 .write = spi_chip_write_256, /* Multi I/O supported */
17469 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17470 .voltage = {2700, 3600},
17471 },
17472
17473 {
17474 .vendor = "Spansion",
17475 .name = "S25FL129P......1", /* uniform 256 kB sectors */
17476 .bustype = BUS_SPI,
17477 .manufacture_id = SPANSION_ID,
17478 .model_id = SPANSION_S25FL128,
17479 .total_size = 16384,
17480 .page_size = 256,
17481 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
17482 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17483 .tested = TEST_UNTESTED,
17484 .probe = probe_spi_rdid,
17485 .probe_timing = TIMING_ZERO,
17486 .block_erasers =
17487 {
17488 {
17489 .eraseblocks = { {256 * 1024, 64} },
17490 .block_erase = spi_block_erase_d8,
17491 }, {
17492 .eraseblocks = { { 16384 * 1024, 1} },
17493 .block_erase = spi_block_erase_60,
17494 }, {
17495 .eraseblocks = { { 16384 * 1024, 1} },
17496 .block_erase = spi_block_erase_c7,
17497 }
17498 },
17499 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
17500 .unlock = spi_disable_blockprotect_bp2_srwd,
17501 .write = spi_chip_write_256, /* Multi I/O supported */
17502 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17503 .voltage = {2700, 3600},
17504 },
17505
17506 {
17507 .vendor = "Spansion",
17508 .name = "S25FL132K",
17509 .bustype = BUS_SPI,
17510 .manufacture_id = SPANSION_ID,
17511 .model_id = SPANSION_S25FL132K,
17512 .total_size = 4096,
17513 .page_size = 256,
17514 /* OTP: 768B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
17515 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17516 .tested = TEST_UNTESTED,
17517 .probe = probe_spi_rdid,
17518 .probe_timing = TIMING_ZERO,
17519 .block_erasers =
17520 {
17521 {
17522 .eraseblocks = { {4 * 1024, 1024} },
17523 .block_erase = spi_block_erase_20,
17524 }, {
17525 .eraseblocks = { {64 * 1024, 64} },
17526 .block_erase = spi_block_erase_d8,
17527 }, {
17528 .eraseblocks = { { 4096 * 1024, 1} },
17529 .block_erase = spi_block_erase_60,
17530 }, {
17531 .eraseblocks = { { 4096 * 1024, 1} },
17532 .block_erase = spi_block_erase_c7,
17533 }
17534 },
17535 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
17536 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17537 .write = spi_chip_write_256,
17538 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17539 .voltage = {2700, 3600},
17540 },
17541
17542 {
17543 .vendor = "Spansion",
17544 .name = "S25FL164K",
17545 .bustype = BUS_SPI,
17546 .manufacture_id = SPANSION_ID,
17547 .model_id = SPANSION_S25FL164K,
17548 .total_size = 8192,
17549 .page_size = 256,
17550 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
17551 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17552 .tested = TEST_OK_PREW,
17553 .probe = probe_spi_rdid,
17554 .probe_timing = TIMING_ZERO,
17555 .block_erasers =
17556 {
17557 {
17558 .eraseblocks = { {4 * 1024, 2048} },
17559 .block_erase = spi_block_erase_20,
17560 }, {
17561 .eraseblocks = { {64 * 1024, 128} },
17562 .block_erase = spi_block_erase_d8,
17563 }, {
17564 .eraseblocks = { { 8192 * 1024, 1} },
17565 .block_erase = spi_block_erase_60,
17566 }, {
17567 .eraseblocks = { { 8192 * 1024, 1} },
17568 .block_erase = spi_block_erase_c7,
17569 }
17570 },
17571 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
17572 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17573 .write = spi_chip_write_256,
17574 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17575 .voltage = {2700, 3600},
17576 },
17577
17578 {
17579 .vendor = "Spansion",
17580 .name = "S25FL204K",
17581 .bustype = BUS_SPI,
17582 .manufacture_id = SPANSION_ID,
17583 .model_id = SPANSION_S25FL204,
17584 .total_size = 512,
17585 .page_size = 256,
17586 .feature_bits = FEATURE_WRSR_WREN,
17587 .tested = TEST_OK_PR,
17588 .probe = probe_spi_rdid,
17589 .probe_timing = TIMING_ZERO,
17590 .block_erasers =
17591 {
17592 {
17593 .eraseblocks = { {4 * 1024, 128} },
17594 .block_erase = spi_block_erase_20,
17595 }, {
17596 .eraseblocks = { {64 * 1024, 8} },
17597 .block_erase = spi_block_erase_d8,
17598 }, {
17599 .eraseblocks = { { 512 * 1024, 1} },
17600 .block_erase = spi_block_erase_60,
17601 }, {
17602 .eraseblocks = { { 512 * 1024, 1} },
17603 .block_erase = spi_block_erase_c7,
17604 }
17605 },
17606 .printlock = spi_prettyprint_status_register_bp3_srwd,
17607 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17608 .write = spi_chip_write_256,
17609 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17610 .voltage = {2700, 3600},
17611 },
17612
17613 {
17614 .vendor = "Spansion",
17615 .name = "S25FL208K",
17616 .bustype = BUS_SPI,
17617 .manufacture_id = SPANSION_ID,
17618 .model_id = SPANSION_S25FL208,
17619 .total_size = 1024,
17620 .page_size = 256,
17621 .feature_bits = FEATURE_WRSR_WREN,
17622 .tested = TEST_OK_PREW,
17623 .probe = probe_spi_rdid,
17624 .probe_timing = TIMING_ZERO,
17625 .block_erasers =
17626 {
17627 {
17628 .eraseblocks = { {4 * 1024, 256} },
17629 .block_erase = spi_block_erase_20,
17630 }, {
17631 .eraseblocks = { {64 * 1024, 16} },
17632 .block_erase = spi_block_erase_d8,
17633 }, {
17634 .eraseblocks = { { 1024 * 1024, 1} },
17635 .block_erase = spi_block_erase_60,
17636 }, {
17637 .eraseblocks = { { 1024 * 1024, 1} },
17638 .block_erase = spi_block_erase_c7,
17639 }
17640 },
17641 .printlock = spi_prettyprint_status_register_bp3_srwd,
17642 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17643 .write = spi_chip_write_256,
17644 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17645 .voltage = {2700, 3600},
17646 },
17647
17648 {
17649 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020017650 .name = "S25FL256L",
17651 .bustype = BUS_SPI,
17652 .manufacture_id = SPANSION_ID,
17653 .model_id = SPANSION_S25FL256L,
17654 .total_size = 32768,
17655 .page_size = 256,
17656 /* 4 x 256B Security Region (OTP) */
17657 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP |
17658 FEATURE_4BA_ENTER | FEATURE_4BA_NATIVE,
17659 .tested = TEST_UNTESTED,
17660 .probe = probe_spi_rdid,
17661 .probe_timing = TIMING_ZERO,
17662 .block_erasers =
17663 {
17664 {
17665 .eraseblocks = { {4 * 1024, 8192} },
17666 .block_erase = spi_block_erase_21,
17667 }, {
17668 .eraseblocks = { {4 * 1024, 8192} },
17669 .block_erase = spi_block_erase_20,
17670 }, {
17671 .eraseblocks = { {32 * 1024, 1024} },
17672 .block_erase = spi_block_erase_53,
17673 }, {
17674 .eraseblocks = { {32 * 1024, 1024} },
17675 .block_erase = spi_block_erase_52,
17676 }, {
17677 .eraseblocks = { {64 * 1024, 512} },
17678 .block_erase = spi_block_erase_dc,
17679 }, {
17680 .eraseblocks = { {64 * 1024, 512} },
17681 .block_erase = spi_block_erase_d8,
17682 }, {
17683 .eraseblocks = { {32768 * 1024, 1} },
17684 .block_erase = spi_block_erase_60,
17685 }, {
17686 .eraseblocks = { {32768 * 1024, 1} },
17687 .block_erase = spi_block_erase_c7,
17688 }
17689 },
17690 .printlock = spi_prettyprint_status_register_bp3_srwd,
17691 .unlock = spi_disable_blockprotect_bp3_srwd,
17692 .write = spi_chip_write_256,
17693 .read = spi_chip_read, /* Fast read (0x0B) supported */
17694 .voltage = {2700, 3600},
17695 .reg_bits =
17696 {
17697 /*
17698 * Note: This chip has a read-only Status Register 2 that is not
17699 * counted here. Registers are mapped as follows:
17700 * STATUS1 ... Status Register 1
17701 * STATUS2 ... Configuration Register 1
17702 * STATUS3 ... Configuration Register 2
17703 */
17704 .srp = {STATUS1, 7, RW},
17705 .srl = {STATUS2, 0, RW},
17706 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
17707 .tb = {STATUS1, 6, RW},
17708 .cmp = {STATUS2, 6, RW},
17709 .wps = {STATUS3, 2, RW},
17710 },
Nico Huberaabb3e02023-01-13 00:22:30 +010017711 .wp_write_cfg = spi_wp_write_cfg,
17712 .wp_read_cfg = spi_wp_read_cfg,
17713 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020017714 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020017715 .prepare_access = spi_prepare_io,
17716 .finish_access = spi_finish_io,
Nico Huberfffc48d2022-05-28 14:26:06 +020017717 },
17718
17719 {
17720 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100017721 .name = "S25FL256S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17722 .bustype = BUS_SPI,
17723 .manufacture_id = SPANSION_ID,
17724 .model_id = SPANSION_S25FL256,
17725 .total_size = 32768,
17726 .page_size = 256,
17727 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber9bb8a322022-05-24 15:07:34 +020017728 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
17729 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017730 .tested = TEST_OK_PREW,
17731 .probe = probe_spi_rdid,
17732 .probe_timing = TIMING_ZERO,
17733 .block_erasers =
17734 {
17735 {
17736 /* This chip supports erasing of the 32 so-called "parameter sectors" with
17737 * opcode 0x20. Trying to access an address outside these 4kB blocks does
17738 * have no effect on the memory contents, but sets a flag in the SR.
17739 .eraseblocks = {
17740 {4 * 1024, 32},
17741 {64 * 1024, 254} // inaccessible
17742 },
17743 .block_erase = spi_block_erase_20,
17744 }, { */
17745 .eraseblocks = { { 64 * 1024, 512} },
17746 .block_erase = spi_block_erase_dc,
17747 }, {
17748 .eraseblocks = { { 64 * 1024, 512} },
17749 .block_erase = spi_block_erase_d8,
17750 }, {
17751 .eraseblocks = { { 32768 * 1024, 1} },
17752 .block_erase = spi_block_erase_60,
17753 }, {
17754 .eraseblocks = { { 32768 * 1024, 1} },
17755 .block_erase = spi_block_erase_c7,
17756 }
17757 },
17758 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17759 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17760 .write = spi_chip_write_256, /* Multi I/O supported */
17761 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17762 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020017763 .prepare_access = spi_prepare_io,
17764 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017765 },
17766
17767 {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017768 .vendor = "Spansion",
17769 .name = "S25FL512S",
17770 .bustype = BUS_SPI,
17771 .manufacture_id = SPANSION_ID,
17772 .model_id = SPANSION_S25FL512,
17773 .total_size = 65536, /* 512 Mb (=> 64 MB)) */
17774 .page_size = 256,
17775 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber26237922022-06-20 19:37:37 +020017776 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
17777 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
17778 .tested = TEST_UNTESTED,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017779 .probe = probe_spi_rdid,
17780 .probe_timing = TIMING_ZERO,
17781 .block_erasers =
17782 {
17783 {
17784 .eraseblocks = { { 256 * 1024, 256} },
17785 .block_erase = spi_block_erase_dc,
17786 }, {
Nico Huberbb608ff2022-05-24 15:33:26 +020017787 .eraseblocks = { { 256 * 1024, 256} },
17788 .block_erase = spi_block_erase_d8,
17789 }, {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017790 .eraseblocks = { { 65536 * 1024, 1} },
17791 .block_erase = spi_block_erase_60,
17792 }, {
17793 .eraseblocks = { { 65536 * 1024, 1} },
17794 .block_erase = spi_block_erase_c7,
17795 }
17796 },
17797 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17798 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17799 .write = spi_chip_write_256, /* Multi I/O supported, IGNORE for now */
17800 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17801 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020017802 .prepare_access = spi_prepare_io,
17803 .finish_access = spi_finish_io,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010017804 },
17805
17806 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017807 .vendor = "SyncMOS/MoselVitelic",
17808 .name = "{F,S,V}29C51001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017809 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017810 .manufacture_id = SYNCMOS_MVC_ID,
17811 .model_id = SM_MVC_29C51001B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017812 .total_size = 128,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017813 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000017814 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017815 .tested = TEST_UNTESTED,
17816 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000017817 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000017818 .block_erasers =
17819 {
17820 {
17821 .eraseblocks = { {512, 256} },
17822 .block_erase = erase_sector_jedec,
17823 }, {
17824 .eraseblocks = { {128 * 1024, 1} },
17825 .block_erase = erase_chip_block_jedec,
17826 },
17827 },
Sean Nelson35727f72010-01-28 23:55:12 +000017828 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000017829 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017830 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017831 .prepare_access = prepare_memory_access,
17832 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000017833 },
17834
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017835 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017836 .vendor = "SyncMOS/MoselVitelic",
17837 .name = "{F,S,V}29C51001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017838 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017839 .manufacture_id = SYNCMOS_MVC_ID,
17840 .model_id = SM_MVC_29C51001T,
17841 .total_size = 128,
17842 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000017843 .feature_bits = FEATURE_EITHER_RESET,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017844 .tested = TEST_UNTESTED,
17845 .probe = probe_jedec,
17846 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
17847 .block_erasers =
17848 {
17849 {
17850 .eraseblocks = { {512, 256} },
17851 .block_erase = erase_sector_jedec,
17852 }, {
17853 .eraseblocks = { {128 * 1024, 1} },
17854 .block_erase = erase_chip_block_jedec,
17855 },
17856 },
17857 .write = write_jedec_1,
17858 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017859 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017860 .prepare_access = prepare_memory_access,
17861 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017862 },
17863
17864 {
17865 .vendor = "SyncMOS/MoselVitelic",
17866 .name = "{F,S,V}29C51002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017867 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017868 .manufacture_id = SYNCMOS_MVC_ID,
17869 .model_id = SM_MVC_29C51002B,
17870 .total_size = 256,
17871 .page_size = 512,
17872 .feature_bits = FEATURE_EITHER_RESET,
17873 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017874 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000017875 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000017876 .block_erasers =
17877 {
17878 {
17879 .eraseblocks = { {512, 512} },
17880 .block_erase = erase_sector_jedec,
17881 }, {
17882 .eraseblocks = { {256 * 1024, 1} },
17883 .block_erase = erase_chip_block_jedec,
17884 },
17885 },
Sean Nelson35727f72010-01-28 23:55:12 +000017886 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000017887 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010017888 .prepare_access = prepare_memory_access,
17889 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000017890 },
17891
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017892 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017893 .vendor = "SyncMOS/MoselVitelic",
17894 .name = "{F,S,V}29C51002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017895 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017896 .manufacture_id = SYNCMOS_MVC_ID,
17897 .model_id = SM_MVC_29C51002T,
17898 .total_size = 256,
17899 .page_size = 512,
17900 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000017901 .tested = TEST_OK_PREW,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017902 .probe = probe_jedec,
17903 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
17904 .block_erasers =
17905 {
17906 {
17907 .eraseblocks = { {512, 512} },
17908 .block_erase = erase_sector_jedec,
17909 }, {
17910 .eraseblocks = { {256 * 1024, 1} },
17911 .block_erase = erase_chip_block_jedec,
17912 },
17913 },
17914 .write = write_jedec_1,
17915 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010017916 .prepare_access = prepare_memory_access,
17917 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017918 },
17919
17920 {
17921 .vendor = "SyncMOS/MoselVitelic",
17922 .name = "{F,S,V}29C51004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017923 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017924 .manufacture_id = SYNCMOS_MVC_ID,
17925 .model_id = SM_MVC_29C51004B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017926 .total_size = 512,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017927 .page_size = 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000017928 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000017929 .tested = TEST_UNTESTED,
17930 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000017931 .probe_timing = TIMING_ZERO,
Sean Nelson56358aa2010-01-19 16:08:51 +000017932 .block_erasers =
17933 {
17934 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000017935 .eraseblocks = { {1024, 512} },
17936 .block_erase = erase_sector_jedec,
17937 }, {
17938 .eraseblocks = { {512 * 1024, 1} },
17939 .block_erase = erase_chip_block_jedec,
17940 },
17941 },
17942 .write = write_jedec_1,
17943 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017944 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017945 .prepare_access = prepare_memory_access,
17946 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017947 },
17948
17949 {
17950 .vendor = "SyncMOS/MoselVitelic",
17951 .name = "{F,S,V}29C51004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017952 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017953 .manufacture_id = SYNCMOS_MVC_ID,
17954 .model_id = SM_MVC_29C51004T,
17955 .total_size = 512,
17956 .page_size = 1024,
17957 .feature_bits = FEATURE_EITHER_RESET,
17958 .tested = TEST_UNTESTED,
17959 .probe = probe_jedec,
17960 .probe_timing = TIMING_ZERO,
17961 .block_erasers =
17962 {
17963 {
17964 .eraseblocks = { {1024, 512} },
17965 .block_erase = erase_sector_jedec,
17966 }, {
17967 .eraseblocks = { {512 * 1024, 1} },
17968 .block_erase = erase_chip_block_jedec,
17969 },
17970 },
17971 .write = write_jedec_1,
17972 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000017973 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010017974 .prepare_access = prepare_memory_access,
17975 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017976 },
17977
17978 {
17979 .vendor = "SyncMOS/MoselVitelic",
17980 .name = "{S,V}29C31004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000017981 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000017982 .manufacture_id = SYNCMOS_MVC_ID,
17983 .model_id = SM_MVC_29C31004B,
17984 .total_size = 512,
17985 .page_size = 1024,
17986 .feature_bits = FEATURE_EITHER_RESET,
17987 .tested = TEST_UNTESTED,
17988 .probe = probe_jedec,
17989 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
17990 .block_erasers =
17991 {
17992 {
17993 .eraseblocks = { {1024, 512} },
17994 .block_erase = erase_sector_jedec,
17995 }, {
17996 .eraseblocks = { {512 * 1024, 1} },
17997 .block_erase = erase_chip_block_jedec,
17998 },
17999 },
18000 .write = write_jedec_1,
18001 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018002 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010018003 .prepare_access = prepare_memory_access,
18004 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018005 },
18006
18007 {
18008 .vendor = "SyncMOS/MoselVitelic",
18009 .name = "{S,V}29C31004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018010 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018011 .manufacture_id = SYNCMOS_MVC_ID,
18012 .model_id = SM_MVC_29C31004T,
18013 .total_size = 512,
18014 .page_size = 1024,
18015 .feature_bits = FEATURE_EITHER_RESET,
18016 .tested = TEST_UNTESTED,
18017 .probe = probe_jedec,
18018 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
18019 .block_erasers =
18020 {
18021 {
18022 .eraseblocks = { {1024, 512} },
Sean Nelson56358aa2010-01-19 16:08:51 +000018023 .block_erase = erase_sector_jedec,
18024 }, {
18025 .eraseblocks = { {512 * 1024, 1} },
18026 .block_erase = erase_chip_block_jedec,
18027 },
18028 },
Sean Nelson35727f72010-01-28 23:55:12 +000018029 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000018030 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018031 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010018032 .prepare_access = prepare_memory_access,
18033 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000018034 },
18035
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018036 {
Uwe Hermanna106d152009-05-27 23:17:40 +000018037 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018038 .name = "TMS29F002RB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018039 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018040 .manufacture_id = TI_OLD_ID,
18041 .model_id = TI_TMS29F002RB,
18042 .total_size = 256,
18043 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000018044 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018045 .tested = TEST_UNTESTED,
18046 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000018047 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000018048 .block_erasers =
18049 {
18050 {
18051 .eraseblocks = {
18052 {16 * 1024, 1},
18053 {8 * 1024, 2},
18054 {32 * 1024, 1},
18055 {64 * 1024, 3},
18056 },
18057 .block_erase = erase_sector_jedec,
18058 }, {
18059 .eraseblocks = { {256 * 1024, 1} },
18060 .block_erase = erase_chip_block_jedec,
18061 },
18062 },
Sean Nelson35727f72010-01-28 23:55:12 +000018063 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018064 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018065 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018066 .prepare_access = prepare_memory_access,
18067 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018068 },
18069
18070 {
Uwe Hermanna106d152009-05-27 23:17:40 +000018071 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018072 .name = "TMS29F002RT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018073 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018074 .manufacture_id = TI_OLD_ID,
18075 .model_id = TI_TMS29F002RT,
18076 .total_size = 256,
18077 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000018078 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018079 .tested = TEST_UNTESTED,
18080 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000018081 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000018082 .block_erasers =
18083 {
18084 {
18085 .eraseblocks = {
18086 {64 * 1024, 3},
18087 {32 * 1024, 1},
18088 {8 * 1024, 2},
18089 {16 * 1024, 1},
18090 },
18091 .block_erase = erase_sector_jedec,
18092 }, {
18093 .eraseblocks = { {256 * 1024, 1} },
18094 .block_erase = erase_chip_block_jedec,
18095 },
18096 },
Sean Nelson35727f72010-01-28 23:55:12 +000018097 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018098 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018099 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018100 .prepare_access = prepare_memory_access,
18101 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018102 },
18103
18104 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018105 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018106 .name = "W25P16",
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018107 .bustype = BUS_SPI,
18108 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018109 .model_id = WINBOND_NEX_W25P16,
18110 .total_size = 2048,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018111 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018112 .feature_bits = FEATURE_WRSR_WREN,
18113 .tested = TEST_UNTESTED,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018114 .probe = probe_spi_rdid,
18115 .probe_timing = TIMING_ZERO,
18116 .block_erasers =
18117 {
18118 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018119 .eraseblocks = { {64 * 1024, 32} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018120 .block_erase = spi_block_erase_d8,
18121 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018122 .eraseblocks = { {2048 * 1024, 1} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018123 .block_erase = spi_block_erase_c7,
18124 }
18125 },
18126 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18127 .unlock = spi_disable_blockprotect,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018128 .write = spi_chip_write_256,
18129 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018130 .voltage = {2700, 3600},
18131 },
18132
18133 {
18134 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018135 .name = "W25P32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018136 .bustype = BUS_SPI,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018137 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018138 .model_id = WINBOND_NEX_W25P32,
18139 .total_size = 4096,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018140 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018141 .feature_bits = FEATURE_WRSR_WREN,
18142 .tested = TEST_UNTESTED,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018143 .probe = probe_spi_rdid,
18144 .probe_timing = TIMING_ZERO,
18145 .block_erasers =
18146 {
18147 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018148 .eraseblocks = { {64 * 1024, 64} },
18149 .block_erase = spi_block_erase_d8,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018150 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018151 .eraseblocks = { {4096 * 1024, 1} },
18152 .block_erase = spi_block_erase_c7,
18153 }
18154 },
18155 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18156 .unlock = spi_disable_blockprotect,
18157 .write = spi_chip_write_256,
18158 .read = spi_chip_read, /* Fast read (0x0B) supported */
18159 .voltage = {2700, 3600},
18160 },
18161
18162 {
18163 .vendor = "Winbond",
18164 .name = "W25P80",
18165 .bustype = BUS_SPI,
18166 .manufacture_id = WINBOND_NEX_ID,
18167 .model_id = WINBOND_NEX_W25P80,
18168 .total_size = 1024,
18169 .page_size = 256,
18170 .feature_bits = FEATURE_WRSR_WREN,
18171 .tested = TEST_UNTESTED,
18172 .probe = probe_spi_rdid,
18173 .probe_timing = TIMING_ZERO,
18174 .block_erasers =
18175 {
18176 {
Rudolf Marekce1c7982010-04-20 19:34:31 +000018177 .eraseblocks = { {64 * 1024, 16} },
18178 .block_erase = spi_block_erase_d8,
18179 }, {
18180 .eraseblocks = { {1024 * 1024, 1} },
Rudolf Marekce1c7982010-04-20 19:34:31 +000018181 .block_erase = spi_block_erase_c7,
18182 }
18183 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018184 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000018185 .unlock = spi_disable_blockprotect,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018186 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018187 .read = spi_chip_read, /* Fast read (0x0B) supported */
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018188 .voltage = {2700, 3600},
David Hendricksc4acec92010-06-24 11:39:57 +000018189 },
18190
18191 {
18192 .vendor = "Winbond",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018193 .name = "W25Q128.V",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018194 .bustype = BUS_SPI,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018195 .manufacture_id = WINBOND_NEX_ID,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018196 .model_id = WINBOND_NEX_W25Q128_V,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018197 .total_size = 16384,
18198 .page_size = 256,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018199 /* supports SFDP */
18200 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018201 /* QPI: only FV & JV..M versions */
18202 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020018203 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Edward O'Callaghana97e3532022-12-16 15:41:05 +110018204 .tested = TEST_OK_PREWB,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018205 .probe = probe_spi_rdid,
18206 .probe_timing = TIMING_ZERO,
18207 .block_erasers =
18208 {
18209 {
18210 .eraseblocks = { {4 * 1024, 4096} },
18211 .block_erase = spi_block_erase_20,
18212 }, {
18213 .eraseblocks = { {32 * 1024, 512} },
18214 .block_erase = spi_block_erase_52,
18215 }, {
18216 .eraseblocks = { {64 * 1024, 256} },
18217 .block_erase = spi_block_erase_d8,
18218 }, {
18219 .eraseblocks = { {16 * 1024 * 1024, 1} },
18220 .block_erase = spi_block_erase_60,
18221 }, {
18222 .eraseblocks = { {16 * 1024 * 1024, 1} },
18223 .block_erase = spi_block_erase_c7,
18224 }
18225 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018226 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Antony Rheneus0fbba982011-05-26 14:28:51 +000018227 .unlock = spi_disable_blockprotect,
18228 .write = spi_chip_write_256,
18229 .read = spi_chip_read,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018230 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018231 /* FIXME: Older versions (e.g. 25Q128BV) use WRSR_EXT and have no WPS. */
18232 .reg_bits =
18233 {
Nico Huber2133f592024-01-06 18:30:01 +010018234 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018235 .srp = {STATUS1, 7, RW},
18236 .srl = {STATUS2, 0, RW},
18237 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18238 .tb = {STATUS1, 5, RW},
18239 .sec = {STATUS1, 6, RW},
18240 .cmp = {STATUS2, 6, RW},
18241 .wps = {STATUS3, 2, RW},
18242 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018243 .wp_write_cfg = spi_wp_write_cfg,
18244 .wp_read_cfg = spi_wp_read_cfg,
18245 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018246 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018247 .prepare_access = spi_prepare_io,
18248 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018249 },
18250
18251 {
18252 .vendor = "Winbond",
Patrick Rudolph34323492018-10-04 14:59:40 +020018253 .name = "W25Q128.V..M",
18254 .bustype = BUS_SPI,
18255 .manufacture_id = WINBOND_NEX_ID,
18256 .model_id = WINBOND_NEX_W25Q128_V_M,
18257 .total_size = 16384,
18258 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010018259 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
18260 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030018261 .tested = TEST_OK_PREWB,
Patrick Rudolph34323492018-10-04 14:59:40 +020018262 .probe = probe_spi_rdid,
18263 .probe_timing = TIMING_ZERO,
18264 .block_erasers =
18265 {
18266 {
18267 .eraseblocks = { {4 * 1024, 4096} },
18268 .block_erase = spi_block_erase_20,
18269 }, {
18270 .eraseblocks = { {32 * 1024, 512} },
18271 .block_erase = spi_block_erase_52,
18272 }, {
18273 .eraseblocks = { {64 * 1024, 256} },
18274 .block_erase = spi_block_erase_d8,
18275 }, {
18276 .eraseblocks = { {16 * 1024 * 1024, 1} },
18277 .block_erase = spi_block_erase_60,
18278 }, {
18279 .eraseblocks = { {16 * 1024 * 1024, 1} },
18280 .block_erase = spi_block_erase_c7,
18281 }
18282 },
Alan Greena1fc01d2019-09-23 17:12:44 +100018283 .printlock = spi_prettyprint_status_register_plain,
Patrick Rudolph34323492018-10-04 14:59:40 +020018284 .unlock = spi_disable_blockprotect,
18285 .write = spi_chip_write_256,
18286 .read = spi_chip_read,
18287 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018288 .reg_bits =
18289 {
Nico Huber2133f592024-01-06 18:30:01 +010018290 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018291 .srp = {STATUS1, 7, RW},
18292 .srl = {STATUS2, 0, RW},
18293 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18294 .tb = {STATUS1, 5, RW},
18295 .sec = {STATUS1, 6, RW},
18296 .cmp = {STATUS2, 6, RW},
18297 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018298 .wp_write_cfg = spi_wp_write_cfg,
18299 .wp_read_cfg = spi_wp_read_cfg,
18300 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018301 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018302 .prepare_access = spi_prepare_io,
18303 .finish_access = spi_finish_io,
Patrick Rudolph34323492018-10-04 14:59:40 +020018304 },
18305
18306 {
18307 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018308 .name = "W25Q128.W",
18309 .bustype = BUS_SPI,
18310 .manufacture_id = WINBOND_NEX_ID,
18311 .model_id = WINBOND_NEX_W25Q128_W,
18312 .total_size = 16384,
18313 .page_size = 256,
18314 /* supports SFDP */
18315 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018316 /* QPI: only FW & JW..M versions */
18317 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018318 .tested = TEST_OK_PREW,
18319 .probe = probe_spi_rdid,
18320 .probe_timing = TIMING_ZERO,
18321 .block_erasers =
18322 {
18323 {
18324 .eraseblocks = { {4 * 1024, 4096} },
18325 .block_erase = spi_block_erase_20,
18326 }, {
18327 .eraseblocks = { {32 * 1024, 512} },
18328 .block_erase = spi_block_erase_52,
18329 }, {
18330 .eraseblocks = { {64 * 1024, 256} },
18331 .block_erase = spi_block_erase_d8,
18332 }, {
18333 .eraseblocks = { {16 * 1024 * 1024, 1} },
18334 .block_erase = spi_block_erase_60,
18335 }, {
18336 .eraseblocks = { {16 * 1024 * 1024, 1} },
18337 .block_erase = spi_block_erase_c7,
18338 }
18339 },
18340 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18341 .unlock = spi_disable_blockprotect,
18342 .write = spi_chip_write_256,
18343 .read = spi_chip_read,
18344 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018345 .reg_bits =
18346 {
Nico Huber2133f592024-01-06 18:30:01 +010018347 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018348 .srp = {STATUS1, 7, RW},
18349 .srl = {STATUS2, 0, RW},
18350 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18351 .tb = {STATUS1, 5, RW},
18352 .sec = {STATUS1, 6, RW},
18353 .cmp = {STATUS2, 6, RW},
18354 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018355 .wp_write_cfg = spi_wp_write_cfg,
18356 .wp_read_cfg = spi_wp_read_cfg,
18357 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018358 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018359 .prepare_access = spi_prepare_io,
18360 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018361 },
18362
18363 {
18364 .vendor = "Winbond",
Peichao Wang1a119492019-11-11 15:26:41 +080018365 .name = "W25Q128.JW.DTR",
18366 .bustype = BUS_SPI,
18367 .manufacture_id = WINBOND_NEX_ID,
18368 .model_id = WINBOND_NEX_W25Q128_DTR,
18369 .total_size = 16384,
18370 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010018371 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
18372 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Peichao Wang1a119492019-11-11 15:26:41 +080018373 .tested = TEST_OK_PREW,
18374 .probe = probe_spi_rdid,
18375 .probe_timing = TIMING_ZERO,
18376 .block_erasers =
18377 {
18378 {
18379 .eraseblocks = { {4 * 1024, 4096} },
18380 .block_erase = spi_block_erase_20,
18381 }, {
18382 .eraseblocks = { {32 * 1024, 512} },
18383 .block_erase = spi_block_erase_52,
18384 }, {
18385 .eraseblocks = { {64 * 1024, 256} },
18386 .block_erase = spi_block_erase_d8,
18387 }, {
18388 .eraseblocks = { {16 * 1024 * 1024, 1} },
18389 .block_erase = spi_block_erase_60,
18390 }, {
18391 .eraseblocks = { {16 * 1024 * 1024, 1} },
18392 .block_erase = spi_block_erase_c7,
18393 }
18394 },
18395 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18396 .unlock = spi_disable_blockprotect,
18397 .write = spi_chip_write_256,
18398 .read = spi_chip_read,
18399 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018400 .reg_bits =
18401 {
Nico Huber2133f592024-01-06 18:30:01 +010018402 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018403 .srp = {STATUS1, 7, RW},
18404 .srl = {STATUS2, 0, RW},
18405 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18406 .tb = {STATUS1, 5, RW},
18407 .sec = {STATUS1, 6, RW},
18408 .cmp = {STATUS2, 6, RW},
18409 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018410 .wp_write_cfg = spi_wp_write_cfg,
18411 .wp_read_cfg = spi_wp_read_cfg,
18412 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018413 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018414 .prepare_access = spi_prepare_io,
18415 .finish_access = spi_finish_io,
Peichao Wang1a119492019-11-11 15:26:41 +080018416 },
18417
18418 {
18419 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018420 .name = "W25Q16.V",
18421 .bustype = BUS_SPI,
18422 .manufacture_id = WINBOND_NEX_ID,
18423 .model_id = WINBOND_NEX_W25Q16_V,
18424 .total_size = 2048,
18425 .page_size = 256,
18426 /* supports SFDP */
18427 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018428 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018429 .tested = TEST_OK_PREW,
18430 .probe = probe_spi_rdid,
18431 .probe_timing = TIMING_ZERO,
18432 .block_erasers =
18433 {
18434 {
18435 .eraseblocks = { {4 * 1024, 512} },
18436 .block_erase = spi_block_erase_20,
18437 }, {
18438 .eraseblocks = { {32 * 1024, 64} },
18439 .block_erase = spi_block_erase_52,
18440 }, {
18441 .eraseblocks = { {64 * 1024, 32} },
18442 .block_erase = spi_block_erase_d8,
18443 }, {
18444 .eraseblocks = { {2 * 1024 * 1024, 1} },
18445 .block_erase = spi_block_erase_60,
18446 }, {
18447 .eraseblocks = { {2 * 1024 * 1024, 1} },
18448 .block_erase = spi_block_erase_c7,
18449 }
18450 },
Nico Huber2133f592024-01-06 18:30:01 +010018451 .reg_bits =
18452 {
18453 .qe = {STATUS2, 1, RW},
18454 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018455 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18456 .unlock = spi_disable_blockprotect,
18457 .write = spi_chip_write_256,
18458 .read = spi_chip_read,
18459 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020018460 .prepare_access = spi_prepare_io,
18461 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018462 },
18463
18464 {
18465 .vendor = "Winbond",
18466 .name = "W25Q16.W",
18467 .bustype = BUS_SPI,
18468 .manufacture_id = WINBOND_NEX_ID,
18469 .model_id = WINBOND_NEX_W25Q16_W,
18470 .total_size = 2048,
18471 .page_size = 256,
18472 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018473 /* QPI: only FW & JW..M versions .qpi_read_params = { 2, 4, 6, 8 } */
18474 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018475 .tested = TEST_UNTESTED,
18476 .probe = probe_spi_rdid,
18477 .probe_timing = TIMING_ZERO,
18478 .block_erasers =
18479 {
18480 {
18481 .eraseblocks = { {4 * 1024, 512} },
18482 .block_erase = spi_block_erase_20,
18483 }, {
18484 .eraseblocks = { {32 * 1024, 64} },
18485 .block_erase = spi_block_erase_52,
18486 }, {
18487 .eraseblocks = { {64 * 1024, 32} },
18488 .block_erase = spi_block_erase_d8,
18489 }, {
18490 .eraseblocks = { {2 * 1024 * 1024, 1} },
18491 .block_erase = spi_block_erase_60,
18492 }, {
18493 .eraseblocks = { {2 * 1024 * 1024, 1} },
18494 .block_erase = spi_block_erase_c7,
18495 }
18496 },
Nico Huber2133f592024-01-06 18:30:01 +010018497 .reg_bits =
18498 {
18499 .qe = {STATUS2, 1, RW},
18500 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018501 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18502 .unlock = spi_disable_blockprotect,
18503 .write = spi_chip_write_256,
18504 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010018505 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018506 .prepare_access = spi_prepare_io,
18507 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018508 },
18509
18510 {
18511 .vendor = "Winbond",
18512 .name = "W25Q20.W",
18513 .bustype = BUS_SPI,
18514 .manufacture_id = WINBOND_NEX_ID,
18515 .model_id = WINBOND_NEX_W25Q20_W,
18516 .total_size = 256,
18517 .page_size = 256,
18518 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018519 /* W25Q20EW: FEATURE_WRSR2 */
18520 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018521 .tested = TEST_UNTESTED,
18522 .probe = probe_spi_rdid,
18523 .probe_timing = TIMING_ZERO,
18524 .block_erasers =
18525 {
18526 {
18527 .eraseblocks = { {4 * 1024, 64} },
18528 .block_erase = spi_block_erase_20,
18529 }, {
18530 .eraseblocks = { {32 * 1024, 8} },
18531 .block_erase = spi_block_erase_52,
18532 }, {
18533 .eraseblocks = { {64 * 1024, 4} },
18534 .block_erase = spi_block_erase_d8,
18535 }, {
18536 .eraseblocks = { {256 * 1024, 1} },
18537 .block_erase = spi_block_erase_60,
18538 }, {
18539 .eraseblocks = { {256 * 1024, 1} },
18540 .block_erase = spi_block_erase_c7,
18541 }
18542 },
Nico Huber2133f592024-01-06 18:30:01 +010018543 .reg_bits =
18544 {
18545 .qe = {STATUS2, 1, RW},
18546 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018547 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18548 .unlock = spi_disable_blockprotect,
18549 .write = spi_chip_write_256,
18550 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010018551 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018552 .prepare_access = spi_prepare_io,
18553 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018554 },
18555
18556 {
18557 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020018558 .name = "W25Q256FV",
Boris Baykovaa6c3742016-06-11 18:29:01 +020018559 .bustype = BUS_SPI,
18560 .manufacture_id = WINBOND_NEX_ID,
18561 .model_id = WINBOND_NEX_W25Q256_V,
18562 .total_size = 32768,
18563 .page_size = 256,
18564 /* supports SFDP */
18565 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018566 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
18567 FEATURE_4BA_ENTER_WREN | FEATURE_4BA_EAR_C5C8 |
18568 FEATURE_4BA_READ | FEATURE_4BA_FAST_READ |
18569 FEATURE_QPI_SRP,
18570 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons3130cbd2018-09-30 19:32:30 +020018571 .tested = TEST_OK_PREW,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018572 .probe = probe_spi_rdid,
18573 .probe_timing = TIMING_ZERO,
18574 .block_erasers =
18575 {
18576 {
18577 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7a077222017-10-14 18:18:30 +020018578 .block_erase = spi_block_erase_20,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018579 }, {
18580 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber7a077222017-10-14 18:18:30 +020018581 .block_erase = spi_block_erase_52,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018582 }, {
18583 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7a077222017-10-14 18:18:30 +020018584 .block_erase = spi_block_erase_d8,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018585 }, {
18586 .eraseblocks = { {32 * 1024 * 1024, 1} },
18587 .block_erase = spi_block_erase_60,
18588 }, {
18589 .eraseblocks = { {32 * 1024 * 1024, 1} },
18590 .block_erase = spi_block_erase_c7,
18591 }
18592 },
18593 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18594 .unlock = spi_disable_blockprotect,
18595 .write = spi_chip_write_256,
18596 .read = spi_chip_read,
18597 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018598 .reg_bits =
18599 {
Nico Huber2133f592024-01-06 18:30:01 +010018600 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018601 .srp = {STATUS1, 7, RW},
18602 .srl = {STATUS2, 0, RW},
18603 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18604 .tb = {STATUS1, 6, RW},
18605 .cmp = {STATUS2, 6, RW},
18606 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018607 .wp_write_cfg = spi_wp_write_cfg,
18608 .wp_read_cfg = spi_wp_read_cfg,
18609 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018610 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018611 .prepare_access = spi_prepare_io,
18612 .finish_access = spi_finish_io,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018613 },
18614
18615 {
18616 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020018617 .name = "W25Q256JV_Q",
18618 .bustype = BUS_SPI,
18619 .manufacture_id = WINBOND_NEX_ID,
18620 .model_id = WINBOND_NEX_W25Q256_V,
18621 .total_size = 32768,
18622 .page_size = 256,
18623 /* supports SFDP */
18624 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018625 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Nico Huberddfbbe82023-12-21 16:31:27 +010018626 .tested = TEST_OK_PREW,
Nico Huber5215eab2022-05-23 15:13:07 +020018627 .probe = probe_spi_rdid,
18628 .probe_timing = TIMING_ZERO,
18629 .block_erasers =
18630 {
18631 {
18632 .eraseblocks = { {4 * 1024, 8192} },
18633 .block_erase = spi_block_erase_21,
18634 }, {
18635 .eraseblocks = { {4 * 1024, 8192} },
18636 .block_erase = spi_block_erase_20,
18637 }, {
18638 .eraseblocks = { {32 * 1024, 1024} },
18639 .block_erase = spi_block_erase_52,
18640 }, {
18641 .eraseblocks = { {64 * 1024, 512} },
18642 .block_erase = spi_block_erase_dc,
18643 }, {
18644 .eraseblocks = { {64 * 1024, 512} },
18645 .block_erase = spi_block_erase_d8,
18646 }, {
18647 .eraseblocks = { {32 * 1024 * 1024, 1} },
18648 .block_erase = spi_block_erase_60,
18649 }, {
18650 .eraseblocks = { {32 * 1024 * 1024, 1} },
18651 .block_erase = spi_block_erase_c7,
18652 }
18653 },
18654 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18655 .unlock = spi_disable_blockprotect,
18656 .write = spi_chip_write_256,
18657 .read = spi_chip_read,
18658 .voltage = {2700, 3600},
18659 .reg_bits =
18660 {
Nico Huber2133f592024-01-06 18:30:01 +010018661 .qe = {STATUS2, 1, RW},
Nico Huber5215eab2022-05-23 15:13:07 +020018662 .srp = {STATUS1, 7, RW},
18663 .srl = {STATUS2, 0, RW},
18664 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18665 .tb = {STATUS1, 6, RW},
18666 .cmp = {STATUS2, 6, RW},
18667 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018668 .wp_write_cfg = spi_wp_write_cfg,
18669 .wp_read_cfg = spi_wp_read_cfg,
18670 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber5215eab2022-05-23 15:13:07 +020018671 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018672 .prepare_access = spi_prepare_io,
18673 .finish_access = spi_finish_io,
Nico Huber5215eab2022-05-23 15:13:07 +020018674 },
18675
18676 {
18677 .vendor = "Winbond",
David Hendricks49876792018-10-27 20:19:42 +000018678 .name = "W25Q256JV_M",
18679 .bustype = BUS_SPI,
18680 .manufacture_id = WINBOND_NEX_ID,
18681 .model_id = WINBOND_NEX_W25Q256JV_M,
18682 .total_size = 32768,
18683 .page_size = 256,
18684 /* supports SFDP */
18685 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018686 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
18687 FEATURE_4BA | FEATURE_QPI_SRP,
18688 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
David Hendricks49876792018-10-27 20:19:42 +000018689 .tested = TEST_OK_PREW,
18690 .probe = probe_spi_rdid,
18691 .probe_timing = TIMING_ZERO,
18692 .block_erasers =
18693 {
18694 {
18695 .eraseblocks = { {4 * 1024, 8192} },
18696 .block_erase = spi_block_erase_21,
18697 }, {
18698 .eraseblocks = { {4 * 1024, 8192} },
18699 .block_erase = spi_block_erase_20,
18700 }, {
18701 .eraseblocks = { {32 * 1024, 1024} },
18702 .block_erase = spi_block_erase_52,
18703 }, {
18704 .eraseblocks = { {64 * 1024, 512} },
18705 .block_erase = spi_block_erase_dc,
18706 }, {
18707 .eraseblocks = { {64 * 1024, 512} },
18708 .block_erase = spi_block_erase_d8,
18709 }, {
18710 .eraseblocks = { {32 * 1024 * 1024, 1} },
18711 .block_erase = spi_block_erase_60,
18712 }, {
18713 .eraseblocks = { {32 * 1024 * 1024, 1} },
18714 .block_erase = spi_block_erase_c7,
18715 }
18716 },
18717 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18718 .unlock = spi_disable_blockprotect,
18719 .write = spi_chip_write_256,
18720 .read = spi_chip_read,
18721 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018722 .reg_bits =
18723 {
Nico Huber2133f592024-01-06 18:30:01 +010018724 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018725 .srp = {STATUS1, 7, RW},
18726 .srl = {STATUS2, 0, RW},
18727 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18728 .tb = {STATUS1, 6, RW},
18729 .cmp = {STATUS2, 6, RW},
18730 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018731 .wp_write_cfg = spi_wp_write_cfg,
18732 .wp_read_cfg = spi_wp_read_cfg,
18733 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018734 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018735 .prepare_access = spi_prepare_io,
18736 .finish_access = spi_finish_io,
David Hendricks49876792018-10-27 20:19:42 +000018737 },
18738
18739 {
18740 .vendor = "Winbond",
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020018741 .name = "W25Q256JW",
el-coderon01209852020-04-29 12:12:53 +020018742 .bustype = BUS_SPI,
18743 .manufacture_id = WINBOND_NEX_ID,
18744 .model_id = WINBOND_NEX_W25Q256_W,
18745 .total_size = 32768,
18746 .page_size = 256,
18747 /* supports SFDP */
18748 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018749 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
18750 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
el-coderon01209852020-04-29 12:12:53 +020018751 .tested = TEST_OK_PREW,
18752 .probe = probe_spi_rdid,
18753 .probe_timing = TIMING_ZERO,
18754 .block_erasers =
18755 {
18756 {
18757 .eraseblocks = { {4 * 1024, 8192} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020018758 .block_erase = spi_block_erase_21,
18759 }, {
18760 .eraseblocks = { {4 * 1024, 8192} },
el-coderon01209852020-04-29 12:12:53 +020018761 .block_erase = spi_block_erase_20,
18762 }, {
18763 .eraseblocks = { {32 * 1024, 1024} },
18764 .block_erase = spi_block_erase_52,
18765 }, {
18766 .eraseblocks = { {64 * 1024, 512} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020018767 .block_erase = spi_block_erase_dc,
18768 }, {
18769 .eraseblocks = { {64 * 1024, 512} },
el-coderon01209852020-04-29 12:12:53 +020018770 .block_erase = spi_block_erase_d8,
18771 }, {
18772 .eraseblocks = { {32 * 1024 * 1024, 1} },
18773 .block_erase = spi_block_erase_60,
18774 }, {
18775 .eraseblocks = { {32 * 1024 * 1024, 1} },
18776 .block_erase = spi_block_erase_c7,
18777 }
18778 },
Nico Huber2133f592024-01-06 18:30:01 +010018779 .reg_bits =
18780 {
18781 .qe = {STATUS2, 1, RW},
18782 },
el-coderon01209852020-04-29 12:12:53 +020018783 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18784 .unlock = spi_disable_blockprotect,
18785 .write = spi_chip_write_256,
18786 .read = spi_chip_read,
18787 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018788 .prepare_access = spi_prepare_io,
18789 .finish_access = spi_finish_io,
el-coderon01209852020-04-29 12:12:53 +020018790 },
18791
18792 {
18793 .vendor = "Winbond",
David Hendricks31532602020-08-16 17:14:56 -070018794 .name = "W25Q256JW_DTR",
18795 .bustype = BUS_SPI,
18796 .manufacture_id = WINBOND_NEX_ID,
18797 .model_id = WINBOND_NEX_W25Q256_DTR,
18798 .total_size = 32768,
18799 .page_size = 256,
18800 /* supports SFDP */
18801 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018802 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
18803 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
18804 .dummy_cycles =
18805 {
18806 .qpi_read_params = {
18807 2, /* Datasheet Rev.K says 4 is the default, though.
18808 Will assume that the text is wrong, if not,
18809 we'll know why it doesn't work. */
18810 4, 6, 8
18811 },
18812 },
Kapil Porwal111c3802022-12-09 19:41:27 +053018813 .tested = TEST_OK_PREWB,
David Hendricks31532602020-08-16 17:14:56 -070018814 .probe = probe_spi_rdid,
18815 .probe_timing = TIMING_ZERO,
18816 .block_erasers =
18817 {
18818 {
18819 .eraseblocks = { {4 * 1024, 8192} },
18820 .block_erase = spi_block_erase_21,
18821 }, {
18822 .eraseblocks = { {4 * 1024, 8192} },
18823 .block_erase = spi_block_erase_20,
18824 }, {
18825 .eraseblocks = { {32 * 1024, 1024} },
18826 .block_erase = spi_block_erase_52,
18827 }, {
18828 .eraseblocks = { {64 * 1024, 512} },
18829 .block_erase = spi_block_erase_dc,
18830 }, {
18831 .eraseblocks = { {64 * 1024, 512} },
18832 .block_erase = spi_block_erase_d8,
18833 }, {
18834 .eraseblocks = { {32 * 1024 * 1024, 1} },
18835 .block_erase = spi_block_erase_60,
18836 }, {
18837 .eraseblocks = { {32 * 1024 * 1024, 1} },
18838 .block_erase = spi_block_erase_c7,
18839 }
18840 },
18841 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18842 .unlock = spi_disable_blockprotect,
18843 .write = spi_chip_write_256,
18844 .read = spi_chip_read,
18845 .voltage = {1700, 1950},
Kapil Porwal111c3802022-12-09 19:41:27 +053018846 .reg_bits =
18847 {
Nico Huber2133f592024-01-06 18:30:01 +010018848 .qe = {STATUS2, 1, RW},
Kapil Porwal111c3802022-12-09 19:41:27 +053018849 .srp = {STATUS1, 7, RW},
18850 .srl = {STATUS2, 0, RW},
18851 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18852 .tb = {STATUS1, 6, RW},
18853 .cmp = {STATUS2, 6, RW},
18854 .wps = {STATUS3, 2, RW},
18855 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018856 .wp_write_cfg = spi_wp_write_cfg,
18857 .wp_read_cfg = spi_wp_read_cfg,
18858 .wp_get_ranges = spi_wp_get_available_ranges,
Kapil Porwal111c3802022-12-09 19:41:27 +053018859 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018860 .prepare_access = spi_prepare_io,
18861 .finish_access = spi_finish_io,
David Hendricks31532602020-08-16 17:14:56 -070018862 },
18863
18864 {
18865 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018866 .name = "W25Q32BV/W25Q32CV/W25Q32DV",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018867 .bustype = BUS_SPI,
18868 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018869 .model_id = WINBOND_NEX_W25Q32_V,
18870 .total_size = 4096,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018871 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018872 /* supports SFDP */
18873 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018874 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018875 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018876 .probe = probe_spi_rdid,
18877 .probe_timing = TIMING_ZERO,
18878 .block_erasers =
18879 {
18880 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018881 .eraseblocks = { {4 * 1024, 1024} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018882 .block_erase = spi_block_erase_20,
18883 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018884 .eraseblocks = { {32 * 1024, 128} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018885 .block_erase = spi_block_erase_52,
18886 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018887 .eraseblocks = { {64 * 1024, 64} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018888 .block_erase = spi_block_erase_d8,
18889 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018890 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018891 .block_erase = spi_block_erase_60,
18892 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018893 .eraseblocks = { {4 * 1024 * 1024, 1} },
18894 .block_erase = spi_block_erase_c7,
18895 }
18896 },
18897 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18898 .unlock = spi_disable_blockprotect,
18899 .write = spi_chip_write_256,
18900 .read = spi_chip_read,
18901 .voltage = {2700, 3600},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018902 .reg_bits =
18903 {
Nico Huber2133f592024-01-06 18:30:01 +010018904 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018905 .srp = {STATUS1, 7, RW},
18906 .srl = {STATUS2, 0, RW},
18907 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18908 .tb = {STATUS1, 5, RW},
18909 .sec = {STATUS1, 6, RW},
18910 .cmp = {STATUS2, 6, RW},
18911 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018912 .wp_write_cfg = spi_wp_write_cfg,
18913 .wp_read_cfg = spi_wp_read_cfg,
18914 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018915 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018916 .prepare_access = spi_prepare_io,
18917 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018918 },
18919
18920 {
18921 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018922 .name = "W25Q32FV",
18923 .bustype = BUS_SPI,
18924 .manufacture_id = WINBOND_NEX_ID,
18925 .model_id = WINBOND_NEX_W25Q32_V,
18926 .total_size = 4096,
18927 .page_size = 256,
18928 /* supports SFDP */
18929 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018930 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018931 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010018932 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018933 .tested = TEST_OK_PREW,
18934 .probe = probe_spi_rdid,
18935 .probe_timing = TIMING_ZERO,
18936 .block_erasers =
18937 {
18938 {
18939 .eraseblocks = { {4 * 1024, 1024} },
18940 .block_erase = spi_block_erase_20,
18941 }, {
18942 .eraseblocks = { {32 * 1024, 128} },
18943 .block_erase = spi_block_erase_52,
18944 }, {
18945 .eraseblocks = { {64 * 1024, 64} },
18946 .block_erase = spi_block_erase_d8,
18947 }, {
18948 .eraseblocks = { {4 * 1024 * 1024, 1} },
18949 .block_erase = spi_block_erase_60,
18950 }, {
18951 .eraseblocks = { {4 * 1024 * 1024, 1} },
18952 .block_erase = spi_block_erase_c7,
18953 }
18954 },
18955 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18956 .unlock = spi_disable_blockprotect,
18957 .write = spi_chip_write_256,
18958 .read = spi_chip_read,
18959 .voltage = {2700, 3600},
18960 .reg_bits =
18961 {
Nico Huber2133f592024-01-06 18:30:01 +010018962 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018963 .srp = {STATUS1, 7, RW},
18964 .srl = {STATUS2, 0, RW},
18965 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18966 .tb = {STATUS1, 5, RW},
18967 .sec = {STATUS1, 6, RW},
18968 .cmp = {STATUS2, 6, RW},
18969 .wps = {STATUS3, 2, RW},
18970 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018971 .wp_write_cfg = spi_wp_write_cfg,
18972 .wp_read_cfg = spi_wp_read_cfg,
18973 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018974 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018975 .prepare_access = spi_prepare_io,
18976 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018977 },
18978
18979 {
18980 .vendor = "Winbond",
18981 .name = "W25Q32JV",
18982 .bustype = BUS_SPI,
18983 .manufacture_id = WINBOND_NEX_ID,
18984 .model_id = WINBOND_NEX_W25Q32_V,
18985 .total_size = 4096,
18986 .page_size = 256,
18987 /* supports SFDP */
18988 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018989 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030018990 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
18991 .tested = TEST_OK_PREW,
18992 .probe = probe_spi_rdid,
18993 .probe_timing = TIMING_ZERO,
18994 .block_erasers =
18995 {
18996 {
18997 .eraseblocks = { {4 * 1024, 1024} },
18998 .block_erase = spi_block_erase_20,
18999 }, {
19000 .eraseblocks = { {32 * 1024, 128} },
19001 .block_erase = spi_block_erase_52,
19002 }, {
19003 .eraseblocks = { {64 * 1024, 64} },
19004 .block_erase = spi_block_erase_d8,
19005 }, {
19006 .eraseblocks = { {4 * 1024 * 1024, 1} },
19007 .block_erase = spi_block_erase_60,
19008 }, {
19009 .eraseblocks = { {4 * 1024 * 1024, 1} },
19010 .block_erase = spi_block_erase_c7,
19011 }
19012 },
19013 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19014 .unlock = spi_disable_blockprotect,
19015 .write = spi_chip_write_256,
19016 .read = spi_chip_read,
19017 .voltage = {2700, 3600},
19018 .reg_bits =
19019 {
Nico Huber2133f592024-01-06 18:30:01 +010019020 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019021 .srp = {STATUS1, 7, RW},
19022 .srl = {STATUS2, 0, RW},
19023 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19024 .tb = {STATUS1, 5, RW},
19025 .sec = {STATUS1, 6, RW},
19026 .cmp = {STATUS2, 6, RW},
19027 .wps = {STATUS3, 2, RW},
19028 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019029 .wp_write_cfg = spi_wp_write_cfg,
19030 .wp_read_cfg = spi_wp_read_cfg,
19031 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019032 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019033 .prepare_access = spi_prepare_io,
19034 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019035 },
19036
19037 {
19038 .vendor = "Winbond",
Angel Pons0d4354e2024-05-26 16:33:51 +020019039 .name = "W25Q32JV-.M",
19040 .bustype = BUS_SPI,
19041 .manufacture_id = WINBOND_NEX_ID,
19042 .model_id = WINBOND_NEX_W25Q32JV,
19043 .total_size = 4096,
19044 .page_size = 256,
19045 /* supports SFDP */
Nico Huber1412d9f2024-01-06 18:25:49 +010019046 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Angel Pons0d4354e2024-05-26 16:33:51 +020019047 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010019048 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons0d4354e2024-05-26 16:33:51 +020019049 .tested = TEST_OK_PREW,
19050 .probe = probe_spi_rdid,
19051 .probe_timing = TIMING_ZERO,
19052 .block_erasers =
19053 {
19054 {
19055 .eraseblocks = { {4 * 1024, 1024} },
19056 .block_erase = spi_block_erase_20,
19057 }, {
19058 .eraseblocks = { {32 * 1024, 128} },
19059 .block_erase = spi_block_erase_52,
19060 }, {
19061 .eraseblocks = { {64 * 1024, 64} },
19062 .block_erase = spi_block_erase_d8,
19063 }, {
19064 .eraseblocks = { {4 * 1024 * 1024, 1} },
19065 .block_erase = spi_block_erase_60,
19066 }, {
19067 .eraseblocks = { {4 * 1024 * 1024, 1} },
19068 .block_erase = spi_block_erase_c7,
19069 }
19070 },
19071 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19072 .unlock = spi_disable_blockprotect_bp2_srwd,
19073 .write = spi_chip_write_256,
19074 .read = spi_chip_read,
19075 .voltage = {2700, 3600},
19076 .reg_bits =
19077 {
Nico Huber2133f592024-01-06 18:30:01 +010019078 .qe = {STATUS2, 1, RW},
Angel Pons0d4354e2024-05-26 16:33:51 +020019079 .srp = {STATUS1, 7, RW},
19080 .srl = {STATUS2, 0, RW},
19081 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19082 .tb = {STATUS1, 5, RW},
19083 .sec = {STATUS1, 6, RW},
19084 .cmp = {STATUS2, 6, RW},
19085 .wps = {STATUS3, 2, RW},
19086 },
19087 .wp_write_cfg = spi_wp_write_cfg,
19088 .wp_read_cfg = spi_wp_read_cfg,
19089 .wp_get_ranges = spi_wp_get_available_ranges,
19090 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019091 .prepare_access = spi_prepare_io,
19092 .finish_access = spi_finish_io,
Angel Pons0d4354e2024-05-26 16:33:51 +020019093 },
19094
19095 {
19096 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019097 .name = "W25Q32BW/W25Q32CW/W25Q32DW",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019098 .bustype = BUS_SPI,
19099 .manufacture_id = WINBOND_NEX_ID,
19100 .model_id = WINBOND_NEX_W25Q32_W,
19101 .total_size = 4096,
19102 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019103 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019104 /* QPI: only DW version */
19105 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019106 .tested = TEST_OK_PREW,
19107 .probe = probe_spi_rdid,
19108 .probe_timing = TIMING_ZERO,
19109 .block_erasers =
19110 {
19111 {
19112 .eraseblocks = { {4 * 1024, 1024} },
19113 .block_erase = spi_block_erase_20,
19114 }, {
19115 .eraseblocks = { {32 * 1024, 128} },
19116 .block_erase = spi_block_erase_52,
19117 }, {
19118 .eraseblocks = { {64 * 1024, 64} },
19119 .block_erase = spi_block_erase_d8,
19120 }, {
19121 .eraseblocks = { {4 * 1024 * 1024, 1} },
19122 .block_erase = spi_block_erase_60,
19123 }, {
19124 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019125 .block_erase = spi_block_erase_c7,
19126 }
19127 },
19128 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19129 .unlock = spi_disable_blockprotect,
19130 .write = spi_chip_write_256,
19131 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019132 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019133 .reg_bits =
19134 {
Nico Huber2133f592024-01-06 18:30:01 +010019135 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019136 .srp = {STATUS1, 7, RW},
19137 .srl = {STATUS2, 0, RW},
19138 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19139 .tb = {STATUS1, 5, RW},
19140 .sec = {STATUS1, 6, RW},
19141 .cmp = {STATUS2, 6, RW},
19142 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019143 .wp_write_cfg = spi_wp_write_cfg,
19144 .wp_read_cfg = spi_wp_read_cfg,
19145 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019146 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019147 .prepare_access = spi_prepare_io,
19148 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019149 },
19150
19151 {
19152 .vendor = "Winbond",
19153 .name = "W25Q32FW",
19154 .bustype = BUS_SPI,
19155 .manufacture_id = WINBOND_NEX_ID,
19156 .model_id = WINBOND_NEX_W25Q32_W,
19157 .total_size = 4096,
19158 .page_size = 256,
19159 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019160 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019161 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010019162 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019163 .tested = TEST_OK_PREW,
19164 .probe = probe_spi_rdid,
19165 .probe_timing = TIMING_ZERO,
19166 .block_erasers =
19167 {
19168 {
19169 .eraseblocks = { {4 * 1024, 1024} },
19170 .block_erase = spi_block_erase_20,
19171 }, {
19172 .eraseblocks = { {32 * 1024, 128} },
19173 .block_erase = spi_block_erase_52,
19174 }, {
19175 .eraseblocks = { {64 * 1024, 64} },
19176 .block_erase = spi_block_erase_d8,
19177 }, {
19178 .eraseblocks = { {4 * 1024 * 1024, 1} },
19179 .block_erase = spi_block_erase_60,
19180 }, {
19181 .eraseblocks = { {4 * 1024 * 1024, 1} },
19182 .block_erase = spi_block_erase_c7,
19183 }
19184 },
19185 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19186 .unlock = spi_disable_blockprotect,
19187 .write = spi_chip_write_256,
19188 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019189 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019190 .reg_bits =
19191 {
Nico Huber2133f592024-01-06 18:30:01 +010019192 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019193 .srp = {STATUS1, 7, RW},
19194 .srl = {STATUS2, 0, RW},
19195 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19196 .tb = {STATUS1, 5, RW},
19197 .sec = {STATUS1, 6, RW},
19198 .cmp = {STATUS2, 6, RW},
19199 .wps = {STATUS3, 2, RW},
19200 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019201 .wp_write_cfg = spi_wp_write_cfg,
19202 .wp_read_cfg = spi_wp_read_cfg,
19203 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019204 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019205 .prepare_access = spi_prepare_io,
19206 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019207 },
19208
19209 {
19210 .vendor = "Winbond",
19211 .name = "W25Q32JW...Q",
19212 .bustype = BUS_SPI,
19213 .manufacture_id = WINBOND_NEX_ID,
19214 .model_id = WINBOND_NEX_W25Q32_W,
19215 .total_size = 4096,
19216 .page_size = 256,
19217 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19218 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010019219 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019220 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
19221 .tested = TEST_OK_PREW,
19222 .probe = probe_spi_rdid,
19223 .probe_timing = TIMING_ZERO,
19224 .block_erasers =
19225 {
19226 {
19227 .eraseblocks = { {4 * 1024, 1024} },
19228 .block_erase = spi_block_erase_20,
19229 }, {
19230 .eraseblocks = { {32 * 1024, 128} },
19231 .block_erase = spi_block_erase_52,
19232 }, {
19233 .eraseblocks = { {64 * 1024, 64} },
19234 .block_erase = spi_block_erase_d8,
19235 }, {
19236 .eraseblocks = { {4 * 1024 * 1024, 1} },
19237 .block_erase = spi_block_erase_60,
19238 }, {
19239 .eraseblocks = { {4 * 1024 * 1024, 1} },
19240 .block_erase = spi_block_erase_c7,
19241 }
19242 },
19243 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19244 .unlock = spi_disable_blockprotect,
19245 .write = spi_chip_write_256,
19246 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019247 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019248 .reg_bits =
19249 {
19250 .srp = {STATUS1, 7, RW},
19251 .srl = {STATUS2, 0, RW},
19252 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19253 .tb = {STATUS1, 5, RW},
19254 .sec = {STATUS1, 6, RW},
19255 .cmp = {STATUS2, 6, RW},
19256 .wps = {STATUS3, 2, RW},
19257 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019258 .wp_write_cfg = spi_wp_write_cfg,
19259 .wp_read_cfg = spi_wp_read_cfg,
19260 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019261 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019262 .prepare_access = spi_prepare_io,
19263 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019264 },
19265
19266 {
19267 .vendor = "Winbond",
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019268 .name = "W25Q32JW...M",
19269 .bustype = BUS_SPI,
19270 .manufacture_id = WINBOND_NEX_ID,
19271 .model_id = WINBOND_NEX_W25Q32JW_M,
19272 .total_size = 4096,
19273 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019274 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19275 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010019276 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019277 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_WRSR_EXT2,
Nico Huber2133f592024-01-06 18:30:01 +010019278 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019279 .tested = TEST_OK_PREW,
19280 .probe = probe_spi_rdid,
19281 .probe_timing = TIMING_ZERO,
19282 .block_erasers =
19283 {
19284 {
19285 .eraseblocks = { {4 * 1024, 1024} },
19286 .block_erase = spi_block_erase_20,
19287 }, {
19288 .eraseblocks = { {32 * 1024, 128} },
19289 .block_erase = spi_block_erase_52,
19290 }, {
19291 .eraseblocks = { {64 * 1024, 64} },
19292 .block_erase = spi_block_erase_d8,
19293 }, {
19294 .eraseblocks = { {4 * 1024 * 1024, 1} },
19295 .block_erase = spi_block_erase_60,
19296 }, {
19297 .eraseblocks = { {4 * 1024 * 1024, 1} },
19298 .block_erase = spi_block_erase_c7,
19299 }
19300 },
19301 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19302 .unlock = spi_disable_blockprotect_bp2_srwd,
19303 .write = spi_chip_write_256,
19304 .read = spi_chip_read,
19305 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019306 .reg_bits =
19307 {
Nico Huber2133f592024-01-06 18:30:01 +010019308 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019309 .srp = {STATUS1, 7, RW},
19310 .srl = {STATUS2, 0, RW},
19311 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19312 .tb = {STATUS1, 5, RW},
19313 .sec = {STATUS1, 6, RW},
19314 .cmp = {STATUS2, 6, RW},
19315 .wps = {STATUS3, 2, RW},
19316 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019317 .wp_write_cfg = spi_wp_write_cfg,
19318 .wp_read_cfg = spi_wp_read_cfg,
19319 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019320 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019321 .prepare_access = spi_prepare_io,
19322 .finish_access = spi_finish_io,
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019323 },
19324
19325 {
19326 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019327 .name = "W25Q40.V",
19328 .bustype = BUS_SPI,
19329 .manufacture_id = WINBOND_NEX_ID,
19330 .model_id = WINBOND_NEX_W25Q40_V,
19331 .total_size = 512,
19332 .page_size = 256,
19333 /* supports SFDP */
19334 /* OTP: 756B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019335 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019336 .tested = TEST_OK_PREW,
19337 .probe = probe_spi_rdid,
19338 .probe_timing = TIMING_ZERO,
19339 .block_erasers =
19340 {
19341 {
19342 .eraseblocks = { {4 * 1024, 128} },
19343 .block_erase = spi_block_erase_20,
19344 }, {
19345 .eraseblocks = { {32 * 1024, 16} },
19346 .block_erase = spi_block_erase_52,
19347 }, {
19348 .eraseblocks = { {64 * 1024, 8} },
19349 .block_erase = spi_block_erase_d8,
19350 }, {
19351 .eraseblocks = { {512 * 1024, 1} },
19352 .block_erase = spi_block_erase_60,
19353 }, {
19354 .eraseblocks = { {512 * 1024, 1} },
19355 .block_erase = spi_block_erase_c7,
19356 }
19357 },
Nico Huber2133f592024-01-06 18:30:01 +010019358 .reg_bits =
19359 {
19360 .qe = {STATUS2, 1, RW},
19361 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019362 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19363 .unlock = spi_disable_blockprotect,
19364 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber2133f592024-01-06 18:30:01 +010019365 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019366 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019367 .prepare_access = spi_prepare_io,
19368 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019369 },
19370
19371 {
19372 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020019373 .name = "W25Q40BW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019374 .bustype = BUS_SPI,
19375 .manufacture_id = WINBOND_NEX_ID,
Nico Huber25683572018-03-30 13:50:13 +020019376 .model_id = WINBOND_NEX_W25Q40BW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019377 .total_size = 512,
19378 .page_size = 256,
19379 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019380 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Angel Pons3164a0c2018-09-30 20:26:06 +020019381 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019382 .probe = probe_spi_rdid,
19383 .probe_timing = TIMING_ZERO,
19384 .block_erasers =
19385 {
19386 {
19387 .eraseblocks = { {4 * 1024, 128} },
19388 .block_erase = spi_block_erase_20,
19389 }, {
19390 .eraseblocks = { {32 * 1024, 16} },
19391 .block_erase = spi_block_erase_52,
19392 }, {
19393 .eraseblocks = { {64 * 1024, 8} },
19394 .block_erase = spi_block_erase_d8,
19395 }, {
19396 .eraseblocks = { {512 * 1024, 1} },
19397 .block_erase = spi_block_erase_60,
19398 }, {
19399 .eraseblocks = { {512 * 1024, 1} },
19400 .block_erase = spi_block_erase_c7,
19401 }
19402 },
Nico Huber2133f592024-01-06 18:30:01 +010019403 .reg_bits =
19404 {
19405 .qe = {STATUS2, 1, RW},
19406 },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019407 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19408 .unlock = spi_disable_blockprotect,
19409 .write = spi_chip_write_256,
19410 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019411 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019412 .prepare_access = spi_prepare_io,
19413 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019414 },
19415
19416 {
19417 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020019418 .name = "W25Q40EW",
19419 .bustype = BUS_SPI,
19420 .manufacture_id = WINBOND_NEX_ID,
19421 .model_id = WINBOND_NEX_W25Q40EW,
19422 .total_size = 512,
19423 .page_size = 256,
19424 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019425 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
19426 FEATURE_OTP | FEATURE_QPI_SRP,
19427 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green07b8a172019-09-23 16:47:05 +100019428 .tested = TEST_OK_PREW,
Nico Huber25683572018-03-30 13:50:13 +020019429 .probe = probe_spi_rdid,
19430 .probe_timing = TIMING_ZERO,
19431 .block_erasers =
19432 {
19433 {
19434 .eraseblocks = { {4 * 1024, 128} },
19435 .block_erase = spi_block_erase_20,
19436 }, {
19437 .eraseblocks = { {32 * 1024, 16} },
19438 .block_erase = spi_block_erase_52,
19439 }, {
19440 .eraseblocks = { {64 * 1024, 8} },
19441 .block_erase = spi_block_erase_d8,
19442 }, {
19443 .eraseblocks = { {512 * 1024, 1} },
19444 .block_erase = spi_block_erase_60,
19445 }, {
19446 .eraseblocks = { {512 * 1024, 1} },
19447 .block_erase = spi_block_erase_c7,
19448 }
19449 },
Nico Huber2133f592024-01-06 18:30:01 +010019450 .reg_bits =
19451 {
19452 .qe = {STATUS2, 1, RW},
19453 },
Nico Huber25683572018-03-30 13:50:13 +020019454 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19455 .unlock = spi_disable_blockprotect,
19456 .write = spi_chip_write_256,
19457 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019458 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019459 .prepare_access = spi_prepare_io,
19460 .finish_access = spi_finish_io,
Nico Huber25683572018-03-30 13:50:13 +020019461 },
19462
Stanislav Sedovf5775442018-03-07 14:16:51 -080019463 {
19464 .vendor = "Winbond",
Joel Stanley55439612019-07-27 19:25:35 +093019465 .name = "W25Q512JV",
19466 .bustype = BUS_SPI,
19467 .manufacture_id = WINBOND_NEX_ID,
19468 .model_id = WINBOND_NEX_W25Q512JV,
19469 .total_size = 64 * 1024,
19470 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010019471 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
19472 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Joel Stanley55439612019-07-27 19:25:35 +093019473 .tested = TEST_OK_PREW,
19474 .probe = probe_spi_rdid,
19475 .probe_timing = TIMING_ZERO,
19476 .block_erasers =
19477 {
19478 {
19479 .eraseblocks = { {4 * 1024, 16384} },
19480 .block_erase = spi_block_erase_21,
19481 }, {
19482 .eraseblocks = { {4 * 1024, 16384} },
19483 .block_erase = spi_block_erase_20,
19484 }, {
19485 .eraseblocks = { {32 * 1024, 2048} },
19486 .block_erase = spi_block_erase_52,
19487 }, {
19488 .eraseblocks = { {64 * 1024, 1024} },
19489 .block_erase = spi_block_erase_dc,
19490 }, {
19491 .eraseblocks = { {64 * 1024, 1024} },
19492 .block_erase = spi_block_erase_d8,
19493 }, {
19494 .eraseblocks = { {64 * 1024 * 1024, 1} },
19495 .block_erase = spi_block_erase_60,
19496 }, {
19497 .eraseblocks = { {64 * 1024 * 1024, 1} },
19498 .block_erase = spi_block_erase_c7,
19499 }
19500 },
Nico Huber2133f592024-01-06 18:30:01 +010019501 .reg_bits =
19502 {
19503 .qe = {STATUS2, 1, RW},
19504 },
Joel Stanley55439612019-07-27 19:25:35 +093019505 .printlock = spi_prettyprint_status_register_plain,
19506 .unlock = spi_disable_blockprotect,
19507 .write = spi_chip_write_256,
19508 .read = spi_chip_read,
19509 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019510 .prepare_access = spi_prepare_io,
19511 .finish_access = spi_finish_io,
Joel Stanley55439612019-07-27 19:25:35 +093019512 },
19513
19514 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010019515 .vendor = "Winbond",
19516 .name = "W25Q512NW-IM",
19517 .bustype = BUS_SPI,
19518 .manufacture_id = WINBOND_NEX_ID,
19519 .model_id = WINBOND_NEX_W25Q512NW_IM,
19520 .total_size = 64 * 1024,
19521 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010019522 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
19523 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
19524 .dummy_cycles =
19525 {
19526 /* Actually has 3 parameter bits, but higher values only help with DTR. */
19527 .qpi_read_params = { 2, 4, 6, 8 },
19528 },
Subrata Banikf5bffd92022-12-14 12:30:43 +053019529 .tested = TEST_OK_PREWB,
Felix Singer3c9bdb92022-12-15 23:30:16 +010019530 .probe = probe_spi_rdid,
19531 .probe_timing = TIMING_ZERO,
19532 .block_erasers =
Atul Dhudase2502dbd2021-09-21 10:02:20 +053019533 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010019534 {
19535 .eraseblocks = { {4 * 1024, 16384} },
19536 .block_erase = spi_block_erase_21,
19537 }, {
19538 .eraseblocks = { {4 * 1024, 16384} },
19539 .block_erase = spi_block_erase_20,
19540 }, {
19541 .eraseblocks = { {32 * 1024, 2048} },
19542 .block_erase = spi_block_erase_52,
19543 }, {
19544 .eraseblocks = { {64 * 1024, 1024} },
19545 .block_erase = spi_block_erase_dc,
19546 }, {
19547 .eraseblocks = { {64 * 1024, 1024} },
19548 .block_erase = spi_block_erase_d8,
19549 }, {
19550 .eraseblocks = { {64 * 1024 * 1024, 1} },
19551 .block_erase = spi_block_erase_60,
19552 }, {
19553 .eraseblocks = { {64 * 1024 * 1024, 1} },
19554 .block_erase = spi_block_erase_c7,
19555 }
19556 },
19557 .unlock = spi_disable_blockprotect,
19558 .write = spi_chip_write_256,
19559 .read = spi_chip_read,
19560 .voltage = {1650, 1950},
Subrata Banikf5bffd92022-12-14 12:30:43 +053019561 .reg_bits =
19562 {
Nico Huber2133f592024-01-06 18:30:01 +010019563 .qe = {STATUS2, 1, RW},
Subrata Banikf5bffd92022-12-14 12:30:43 +053019564 .srp = {STATUS1, 7, RW},
19565 .srl = {STATUS2, 0, RW},
19566 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
19567 .tb = {STATUS1, 6, RW},
19568 .cmp = {STATUS2, 6, RW},
19569 .wps = {STATUS3, 2, RW},
19570 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019571 .wp_write_cfg = spi_wp_write_cfg,
19572 .wp_read_cfg = spi_wp_read_cfg,
19573 .wp_get_ranges = spi_wp_get_available_ranges,
Subrata Banikf5bffd92022-12-14 12:30:43 +053019574 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019575 .prepare_access = spi_prepare_io,
19576 .finish_access = spi_finish_io,
Atul Dhudase2502dbd2021-09-21 10:02:20 +053019577 },
19578
19579 {
Joel Stanley55439612019-07-27 19:25:35 +093019580 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019581 .name = "W25Q64BV/W25Q64CV/W25Q64FV",
Stanislav Sedovf5775442018-03-07 14:16:51 -080019582 .bustype = BUS_SPI,
19583 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019584 .model_id = WINBOND_NEX_W25Q64_V,
19585 .total_size = 8192,
Stanislav Sedovf5775442018-03-07 14:16:51 -080019586 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019587 /* supports SFDP */
19588 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019589 /* QPI: only FV version */
19590 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030019591 .tested = TEST_OK_PREWB,
Stanislav Sedovf5775442018-03-07 14:16:51 -080019592 .probe = probe_spi_rdid,
19593 .probe_timing = TIMING_ZERO,
19594 .block_erasers =
19595 {
19596 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019597 .eraseblocks = { {4 * 1024, 2048} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019598 .block_erase = spi_block_erase_20,
19599 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019600 .eraseblocks = { {32 * 1024, 256} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019601 .block_erase = spi_block_erase_52,
19602 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019603 .eraseblocks = { {64 * 1024, 128} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019604 .block_erase = spi_block_erase_d8,
19605 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019606 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019607 .block_erase = spi_block_erase_60,
19608 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019609 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019610 .block_erase = spi_block_erase_c7,
19611 }
19612 },
19613 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19614 .unlock = spi_disable_blockprotect,
19615 .write = spi_chip_write_256,
19616 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019617 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019618 .reg_bits =
19619 {
Nico Huber2133f592024-01-06 18:30:01 +010019620 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019621 .srp = {STATUS1, 7, RW},
19622 .srl = {STATUS2, 0, RW},
19623 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19624 .tb = {STATUS1, 5, RW},
19625 .sec = {STATUS1, 6, RW},
19626 .cmp = {STATUS2, 6, RW},
19627 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019628 .wp_write_cfg = spi_wp_write_cfg,
19629 .wp_read_cfg = spi_wp_read_cfg,
19630 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019631 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019632 .prepare_access = spi_prepare_io,
19633 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019634 },
19635
19636 {
19637 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019638 .name = "W25Q64JV-.Q",
19639 .bustype = BUS_SPI,
19640 .manufacture_id = WINBOND_NEX_ID,
19641 .model_id = WINBOND_NEX_W25Q64_V,
19642 .total_size = 8192,
19643 .page_size = 256,
19644 /* supports SFDP */
19645 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019646 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020019647 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019648 .tested = TEST_OK_PREW,
19649 .probe = probe_spi_rdid,
19650 .probe_timing = TIMING_ZERO,
19651 .block_erasers =
19652 {
19653 {
19654 .eraseblocks = { {4 * 1024, 2048} },
19655 .block_erase = spi_block_erase_20,
19656 }, {
19657 .eraseblocks = { {32 * 1024, 256} },
19658 .block_erase = spi_block_erase_52,
19659 }, {
19660 .eraseblocks = { {64 * 1024, 128} },
19661 .block_erase = spi_block_erase_d8,
19662 }, {
19663 .eraseblocks = { {8 * 1024 * 1024, 1} },
19664 .block_erase = spi_block_erase_60,
19665 }, {
19666 .eraseblocks = { {8 * 1024 * 1024, 1} },
19667 .block_erase = spi_block_erase_c7,
19668 }
19669 },
19670 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19671 .unlock = spi_disable_blockprotect,
19672 .write = spi_chip_write_256,
19673 .read = spi_chip_read,
19674 .voltage = {2700, 3600},
19675 .reg_bits =
19676 {
Nico Huber2133f592024-01-06 18:30:01 +010019677 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019678 .srp = {STATUS1, 7, RW},
19679 .srl = {STATUS2, 0, RW},
19680 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19681 .tb = {STATUS1, 5, RW},
19682 .sec = {STATUS1, 6, RW},
19683 .cmp = {STATUS2, 6, RW},
19684 .wps = {STATUS3, 2, RW},
19685 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019686 .wp_write_cfg = spi_wp_write_cfg,
19687 .wp_read_cfg = spi_wp_read_cfg,
19688 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019689 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019690 .prepare_access = spi_prepare_io,
19691 .finish_access = spi_finish_io,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019692 },
19693
19694 {
19695 .vendor = "Winbond",
19696 .name = "W25Q64JV-.M",
Simon Buhrow236a38c2021-11-05 11:48:30 +010019697 .bustype = BUS_SPI,
19698 .manufacture_id = WINBOND_NEX_ID,
19699 .model_id = WINBOND_NEX_W25Q64JV,
19700 .total_size = 8192,
19701 .page_size = 256,
19702 /* supports SFDP */
Nico Huber2133f592024-01-06 18:30:01 +010019703 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
19704 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010019705 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Simon Buhrow236a38c2021-11-05 11:48:30 +010019706 .tested = TEST_OK_PREW,
19707 .probe = probe_spi_rdid,
19708 .probe_timing = TIMING_ZERO,
19709 .block_erasers =
19710 {
19711 {
19712 .eraseblocks = { {4 * 1024, 2048} },
19713 .block_erase = spi_block_erase_20,
19714 }, {
19715 .eraseblocks = { {32 * 1024, 256} },
19716 .block_erase = spi_block_erase_52,
19717 }, {
19718 .eraseblocks = { {64 * 1024, 128} },
19719 .block_erase = spi_block_erase_d8,
19720 }, {
19721 .eraseblocks = { {8 * 1024 * 1024, 1} },
19722 .block_erase = spi_block_erase_60,
19723 }, {
19724 .eraseblocks = { {8 * 1024 * 1024, 1} },
19725 .block_erase = spi_block_erase_c7,
19726 }
19727 },
Nico Huber2133f592024-01-06 18:30:01 +010019728 .reg_bits =
19729 {
19730 .qe = {STATUS2, 1, RW},
19731 },
Simon Buhrow236a38c2021-11-05 11:48:30 +010019732 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19733 .unlock = spi_disable_blockprotect_bp2_srwd,
19734 .write = spi_chip_write_256,
19735 .read = spi_chip_read,
19736 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019737 .prepare_access = spi_prepare_io,
19738 .finish_access = spi_finish_io,
Simon Buhrow236a38c2021-11-05 11:48:30 +010019739 },
19740
19741 {
19742 .vendor = "Winbond",
Nico Hubera358b142024-04-14 18:29:06 +020019743 .name = "W25Q64DW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019744 .bustype = BUS_SPI,
19745 .manufacture_id = WINBOND_NEX_ID,
19746 .model_id = WINBOND_NEX_W25Q64_W,
19747 .total_size = 8192,
19748 .page_size = 256,
19749 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019750 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
19751 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nico Hubera358b142024-04-14 18:29:06 +020019752 .tested = TEST_OK_PREW,
19753 .probe = probe_spi_rdid,
19754 .probe_timing = TIMING_ZERO,
19755 .block_erasers =
19756 {
19757 {
19758 .eraseblocks = { {4 * 1024, 2048} },
19759 .block_erase = spi_block_erase_20,
19760 }, {
19761 .eraseblocks = { {32 * 1024, 256} },
19762 .block_erase = spi_block_erase_52,
19763 }, {
19764 .eraseblocks = { {64 * 1024, 128} },
19765 .block_erase = spi_block_erase_d8,
19766 }, {
19767 .eraseblocks = { {8 * 1024 * 1024, 1} },
19768 .block_erase = spi_block_erase_60,
19769 }, {
19770 .eraseblocks = { {8 * 1024 * 1024, 1} },
19771 .block_erase = spi_block_erase_c7,
19772 }
19773 },
19774 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19775 .unlock = spi_disable_blockprotect,
19776 .write = spi_chip_write_256,
19777 .read = spi_chip_read,
19778 .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
19779 .reg_bits =
19780 {
19781 .srp = {STATUS1, 7, RW},
19782 .srl = {STATUS2, 0, RW},
19783 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19784 .tb = {STATUS1, 5, RW},
19785 .sec = {STATUS1, 6, RW},
19786 .cmp = {STATUS2, 6, RW},
19787 },
19788 .wp_write_cfg = spi_wp_write_cfg,
19789 .wp_read_cfg = spi_wp_read_cfg,
19790 .wp_get_ranges = spi_wp_get_available_ranges,
19791 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019792 .prepare_access = spi_prepare_io,
19793 .finish_access = spi_finish_io,
Nico Hubera358b142024-04-14 18:29:06 +020019794 },
19795
19796 {
19797 .vendor = "Winbond",
19798 .name = "W25Q64FW/W25Q64JW...Q",
19799 .bustype = BUS_SPI,
19800 .manufacture_id = WINBOND_NEX_ID,
19801 .model_id = WINBOND_NEX_W25Q64_W,
19802 .total_size = 8192,
19803 .page_size = 256,
19804 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019805 /* FEATURE_QPI_SRP (2, 4, 6, 8): only FW version */
Nico Hubera358b142024-04-14 18:29:06 +020019806 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
Nico Huber1412d9f2024-01-06 18:25:49 +010019807 FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030019808 .tested = TEST_OK_PREWB,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019809 .probe = probe_spi_rdid,
19810 .probe_timing = TIMING_ZERO,
19811 .block_erasers =
19812 {
19813 {
19814 .eraseblocks = { {4 * 1024, 2048} },
19815 .block_erase = spi_block_erase_20,
19816 }, {
19817 .eraseblocks = { {32 * 1024, 256} },
19818 .block_erase = spi_block_erase_52,
19819 }, {
19820 .eraseblocks = { {64 * 1024, 128} },
19821 .block_erase = spi_block_erase_d8,
19822 }, {
19823 .eraseblocks = { {8 * 1024 * 1024, 1} },
19824 .block_erase = spi_block_erase_60,
19825 }, {
19826 .eraseblocks = { {8 * 1024 * 1024, 1} },
19827 .block_erase = spi_block_erase_c7,
19828 }
19829 },
19830 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19831 .unlock = spi_disable_blockprotect,
19832 .write = spi_chip_write_256,
19833 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019834 .voltage = {1700, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110019835 .reg_bits =
19836 {
Nico Huber2133f592024-01-06 18:30:01 +010019837 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110019838 .srp = {STATUS1, 7, RW},
19839 .srl = {STATUS2, 0, RW},
19840 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19841 .tb = {STATUS1, 5, RW},
19842 .sec = {STATUS1, 6, RW},
19843 .cmp = {STATUS2, 6, RW},
19844 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019845 .wp_write_cfg = spi_wp_write_cfg,
19846 .wp_read_cfg = spi_wp_read_cfg,
19847 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110019848 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019849 .prepare_access = spi_prepare_io,
19850 .finish_access = spi_finish_io,
Antony Rheneus0fbba982011-05-26 14:28:51 +000019851 },
19852
19853 {
19854 .vendor = "Winbond",
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100019855 .name = "W25Q64JW...M",
Scott Chao1bbc5012020-04-08 22:10:50 +080019856 .bustype = BUS_SPI,
19857 .manufacture_id = WINBOND_NEX_ID,
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100019858 .model_id = WINBOND_NEX_W25Q64JW_M,
Scott Chao1bbc5012020-04-08 22:10:50 +080019859 .total_size = 8192,
19860 .page_size = 256,
19861 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19862 /* QPI enable 0x38, disable 0xFF */
Nico Huber1412d9f2024-01-06 18:25:49 +010019863 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
19864 FEATURE_OTP | FEATURE_QPI_SRP,
19865 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Scott Chao1bbc5012020-04-08 22:10:50 +080019866 .tested = TEST_OK_PREW,
19867 .probe = probe_spi_rdid,
19868 .probe_timing = TIMING_ZERO,
19869 .block_erasers =
19870 {
19871 {
19872 .eraseblocks = { {4 * 1024, 2048} },
19873 .block_erase = spi_block_erase_20,
19874 }, {
19875 .eraseblocks = { {32 * 1024, 256} },
19876 .block_erase = spi_block_erase_52,
19877 }, {
19878 .eraseblocks = { {64 * 1024, 128} },
19879 .block_erase = spi_block_erase_d8,
19880 }, {
19881 .eraseblocks = { {8 * 1024 * 1024, 1} },
19882 .block_erase = spi_block_erase_60,
19883 }, {
19884 .eraseblocks = { {8 * 1024 * 1024, 1} },
19885 .block_erase = spi_block_erase_c7,
19886 }
19887 },
19888 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19889 .unlock = spi_disable_blockprotect,
19890 .write = spi_chip_write_256,
19891 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019892 .voltage = {1700, 1950},
Evan Benn29c8b5d2022-09-13 16:01:10 +100019893 .reg_bits =
19894 {
Nico Huber2133f592024-01-06 18:30:01 +010019895 .qe = {STATUS2, 1, RW},
Evan Benn29c8b5d2022-09-13 16:01:10 +100019896 .srp = {STATUS1, 7, RW},
19897 .srl = {STATUS2, 0, RW},
19898 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19899 .tb = {STATUS1, 5, RW},
19900 .sec = {STATUS1, 6, RW},
19901 .cmp = {STATUS2, 6, RW},
19902 .wps = {STATUS3, 2, RW},
19903 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019904 .wp_write_cfg = spi_wp_write_cfg,
19905 .wp_read_cfg = spi_wp_read_cfg,
19906 .wp_get_ranges = spi_wp_get_available_ranges,
Evan Benn29c8b5d2022-09-13 16:01:10 +100019907 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019908 .prepare_access = spi_prepare_io,
19909 .finish_access = spi_finish_io,
Scott Chao1bbc5012020-04-08 22:10:50 +080019910 },
19911
19912 {
19913 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019914 .name = "W25Q80.V",
Nico Huber70eed9f2017-04-24 22:19:27 +020019915 .bustype = BUS_SPI,
19916 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019917 .model_id = WINBOND_NEX_W25Q80_V,
19918 .total_size = 1024,
Nico Huber70eed9f2017-04-24 22:19:27 +020019919 .page_size = 256,
19920 /* supports SFDP */
19921 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019922 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
David Hendricks48729d32017-12-08 14:44:07 -080019923 .tested = TEST_OK_PREW,
Nico Huber70eed9f2017-04-24 22:19:27 +020019924 .probe = probe_spi_rdid,
19925 .probe_timing = TIMING_ZERO,
19926 .block_erasers =
19927 {
19928 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019929 .eraseblocks = { {4 * 1024, 256} },
Nico Huber70eed9f2017-04-24 22:19:27 +020019930 .block_erase = spi_block_erase_20,
19931 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019932 .eraseblocks = { {32 * 1024, 32} },
Nico Huber70eed9f2017-04-24 22:19:27 +020019933 .block_erase = spi_block_erase_52,
19934 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019935 .eraseblocks = { {64 * 1024, 16} },
Nico Huber70eed9f2017-04-24 22:19:27 +020019936 .block_erase = spi_block_erase_d8,
19937 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019938 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020019939 .block_erase = spi_block_erase_60,
19940 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019941 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020019942 .block_erase = spi_block_erase_c7,
19943 }
19944 },
Nico Huber2133f592024-01-06 18:30:01 +010019945 .reg_bits =
19946 {
19947 .qe = {STATUS2, 1, RW},
19948 },
Nico Huber70eed9f2017-04-24 22:19:27 +020019949 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19950 .unlock = spi_disable_blockprotect,
19951 .write = spi_chip_write_256,
19952 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019953 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019954 .prepare_access = spi_prepare_io,
19955 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019956 },
19957
19958 {
19959 .vendor = "Winbond",
19960 .name = "W25Q80BW",
19961 .bustype = BUS_SPI,
19962 .manufacture_id = WINBOND_NEX_ID,
19963 .model_id = WINBOND_NEX_W25Q80BW,
19964 .total_size = 1024,
19965 .page_size = 256,
19966 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019967 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019968 .tested = TEST_OK_PREW,
19969 .probe = probe_spi_rdid,
19970 .probe_timing = TIMING_ZERO,
19971 .block_erasers =
19972 {
19973 {
19974 .eraseblocks = { {4 * 1024, 256} },
19975 .block_erase = spi_block_erase_20,
19976 }, {
19977 .eraseblocks = { {32 * 1024, 32} },
19978 .block_erase = spi_block_erase_52,
19979 }, {
19980 .eraseblocks = { {64 * 1024, 16} },
19981 .block_erase = spi_block_erase_d8,
19982 }, {
19983 .eraseblocks = { {1 * 1024 * 1024, 1} },
19984 .block_erase = spi_block_erase_60,
19985 }, {
19986 .eraseblocks = { {1 * 1024 * 1024, 1} },
19987 .block_erase = spi_block_erase_c7,
19988 }
19989 },
Nico Huber2133f592024-01-06 18:30:01 +010019990 .reg_bits =
19991 {
19992 .qe = {STATUS2, 1, RW},
19993 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019994 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19995 .unlock = spi_disable_blockprotect,
19996 .write = spi_chip_write_256,
19997 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019998 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019999 .prepare_access = spi_prepare_io,
20000 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020001 },
20002
20003 {
20004 .vendor = "Winbond",
20005 .name = "W25Q80EW",
20006 .bustype = BUS_SPI,
20007 .manufacture_id = WINBOND_NEX_ID,
20008 .model_id = WINBOND_NEX_W25Q80EW,
20009 .total_size = 1024,
20010 .page_size = 256,
20011 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010020012 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
20013 FEATURE_OTP | FEATURE_QPI_SRP,
20014 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green1f9cc7d2019-07-01 11:10:45 +100020015 .tested = TEST_OK_PREW,
20016 .probe = probe_spi_rdid,
20017 .probe_timing = TIMING_ZERO,
20018 .block_erasers =
20019 {
20020 {
20021 .eraseblocks = { {4 * 1024, 256} },
20022 .block_erase = spi_block_erase_20,
20023 }, {
20024 .eraseblocks = { {32 * 1024, 32} },
20025 .block_erase = spi_block_erase_52,
20026 }, {
20027 .eraseblocks = { {64 * 1024, 16} },
20028 .block_erase = spi_block_erase_d8,
20029 }, {
20030 .eraseblocks = { {1 * 1024 * 1024, 1} },
20031 .block_erase = spi_block_erase_60,
20032 }, {
20033 .eraseblocks = { {1 * 1024 * 1024, 1} },
20034 .block_erase = spi_block_erase_c7,
20035 }
20036 },
Nico Huber2133f592024-01-06 18:30:01 +010020037 .reg_bits =
20038 {
20039 .qe = {STATUS2, 1, RW},
20040 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100020041 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20042 .unlock = spi_disable_blockprotect,
20043 .write = spi_chip_write_256,
20044 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010020045 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020020046 .prepare_access = spi_prepare_io,
20047 .finish_access = spi_finish_io,
Nico Huber70eed9f2017-04-24 22:19:27 +020020048 },
20049
20050 {
20051 .vendor = "Winbond",
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020052 .name = "W25X05",
20053 .bustype = BUS_SPI,
20054 .manufacture_id = WINBOND_NEX_ID,
20055 .model_id = WINBOND_NEX_W25X05,
20056 .total_size = 64,
20057 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020058 /* FEATURE_FAST_READ_DIO since W25X05B */
20059 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020060 .tested = TEST_OK_PREW,
20061 .probe = probe_spi_rdid,
20062 .probe_timing = TIMING_ZERO,
20063 .block_erasers =
20064 {
20065 {
20066 .eraseblocks = { {4 * 1024, 16} },
20067 .block_erase = spi_block_erase_20,
20068 }, {
20069 .eraseblocks = { {32 * 1024, 2} },
20070 .block_erase = spi_block_erase_52,
20071 }, {
20072 .eraseblocks = { {64 * 1024, 1} },
20073 .block_erase = spi_block_erase_d8,
20074 }
20075 },
20076 .printlock = spi_prettyprint_status_register_plain,
20077 .unlock = spi_disable_blockprotect,
20078 .write = spi_chip_write_256,
20079 .read = spi_chip_read,
20080 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020081 .prepare_access = spi_prepare_io,
20082 .finish_access = spi_finish_io,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020083 },
20084
20085 {
20086 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020087 .name = "W25X10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020088 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020089 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020090 .model_id = WINBOND_NEX_W25X10,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020091 .total_size = 128,
20092 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020093 /* FEATURE_FAST_READ_DIO since W25X10B */
20094 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunere34e3e82013-01-01 00:06:51 +000020095 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020096 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000020097 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020098 .block_erasers =
20099 {
20100 {
20101 .eraseblocks = { {4 * 1024, 32} },
20102 .block_erase = spi_block_erase_20,
20103 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020104 .eraseblocks = { {64 * 1024, 2} },
20105 .block_erase = spi_block_erase_d8,
20106 }, {
20107 .eraseblocks = { {128 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020108 .block_erase = spi_block_erase_c7,
20109 }
20110 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020111 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020112 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000020113 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020114 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020115 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020116 .prepare_access = spi_prepare_io,
20117 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000020118 },
20119
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020120 {
20121 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020122 .name = "W25X16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020123 .bustype = BUS_SPI,
Hector Martina721ae22009-07-11 19:39:11 +000020124 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020125 .model_id = WINBOND_NEX_W25X16,
Hector Martina721ae22009-07-11 19:39:11 +000020126 .total_size = 2048,
20127 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020128 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner8179be52011-06-04 13:13:34 +000020129 .tested = TEST_OK_PREW,
Hector Martina721ae22009-07-11 19:39:11 +000020130 .probe = probe_spi_rdid,
20131 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020132 .block_erasers =
20133 {
20134 {
20135 .eraseblocks = { {4 * 1024, 512} },
20136 .block_erase = spi_block_erase_20,
20137 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020138 .eraseblocks = { {64 * 1024, 32} },
20139 .block_erase = spi_block_erase_d8,
20140 }, {
20141 .eraseblocks = { {2 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020142 .block_erase = spi_block_erase_c7,
20143 }
20144 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020145 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020146 .unlock = spi_disable_blockprotect,
Hector Martina721ae22009-07-11 19:39:11 +000020147 .write = spi_chip_write_256,
20148 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020149 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020150 .prepare_access = spi_prepare_io,
20151 .finish_access = spi_finish_io,
Hector Martina721ae22009-07-11 19:39:11 +000020152 },
20153
20154 {
20155 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020156 .name = "W25X20",
20157 .bustype = BUS_SPI,
20158 .manufacture_id = WINBOND_NEX_ID,
20159 .model_id = WINBOND_NEX_W25X20,
20160 .total_size = 256,
20161 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020162 /* FEATURE_FAST_READ_DIO since W25X20B */
20163 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020164 .tested = TEST_OK_PREW,
20165 .probe = probe_spi_rdid,
20166 .probe_timing = TIMING_ZERO,
20167 .block_erasers =
20168 {
20169 {
20170 .eraseblocks = { {4 * 1024, 64} },
20171 .block_erase = spi_block_erase_20,
20172 }, {
20173 .eraseblocks = { {64 * 1024, 4} },
20174 .block_erase = spi_block_erase_d8,
20175 }, {
20176 .eraseblocks = { {256 * 1024, 1} },
20177 .block_erase = spi_block_erase_c7,
20178 }
20179 },
20180 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20181 .unlock = spi_disable_blockprotect,
20182 .write = spi_chip_write_256,
20183 .read = spi_chip_read,
20184 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020185 .prepare_access = spi_prepare_io,
20186 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020187 },
20188
20189 {
20190 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020191 .name = "W25X32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020192 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000020193 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020194 .model_id = WINBOND_NEX_W25X32,
Zheng Bao1db2b752009-11-26 11:05:01 +000020195 .total_size = 4096,
20196 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020197 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000020198 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000020199 .probe = probe_spi_rdid,
20200 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020201 .block_erasers =
20202 {
20203 {
20204 .eraseblocks = { {4 * 1024, 1024} },
20205 .block_erase = spi_block_erase_20,
20206 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020207 .eraseblocks = { {64 * 1024, 64} },
20208 .block_erase = spi_block_erase_d8,
20209 }, {
20210 .eraseblocks = { {4 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020211 .block_erase = spi_block_erase_c7,
20212 }
20213 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020214 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020215 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000020216 .write = spi_chip_write_256,
20217 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020218 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020219 .prepare_access = spi_prepare_io,
20220 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000020221 },
20222
20223 {
20224 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020225 .name = "W25X40",
20226 .bustype = BUS_SPI,
20227 .manufacture_id = WINBOND_NEX_ID,
20228 .model_id = WINBOND_NEX_W25X40,
20229 .total_size = 512,
20230 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020231 /* FEATURE_FAST_READ_DIO since W25X40B */
20232 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020233 .tested = TEST_OK_PREW,
20234 .probe = probe_spi_rdid,
20235 .probe_timing = TIMING_ZERO,
20236 .block_erasers =
20237 {
20238 {
20239 .eraseblocks = { {4 * 1024, 128} },
20240 .block_erase = spi_block_erase_20,
20241 }, {
20242 .eraseblocks = { {64 * 1024, 8} },
20243 .block_erase = spi_block_erase_d8,
20244 }, {
20245 .eraseblocks = { {512 * 1024, 1} },
20246 .block_erase = spi_block_erase_c7,
20247 }
20248 },
20249 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20250 .unlock = spi_disable_blockprotect,
20251 .write = spi_chip_write_256,
20252 .read = spi_chip_read,
20253 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020254 .prepare_access = spi_prepare_io,
20255 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020256 },
20257
20258 {
20259 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020260 .name = "W25X64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020261 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000020262 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020263 .model_id = WINBOND_NEX_W25X64,
Zheng Bao1db2b752009-11-26 11:05:01 +000020264 .total_size = 8192,
20265 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020266 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner23e10b82016-01-23 16:16:49 +000020267 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000020268 .probe = probe_spi_rdid,
20269 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020270 .block_erasers =
20271 {
20272 {
20273 .eraseblocks = { {4 * 1024, 2048} },
20274 .block_erase = spi_block_erase_20,
20275 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020276 .eraseblocks = { {64 * 1024, 128} },
20277 .block_erase = spi_block_erase_d8,
20278 }, {
20279 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020280 .block_erase = spi_block_erase_c7,
20281 }
20282 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020283 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020284 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000020285 .write = spi_chip_write_256,
20286 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020287 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020288 .prepare_access = spi_prepare_io,
20289 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000020290 },
20291
20292 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100020293 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020294 .name = "W25X80",
Alan Greenfa3fcd32019-06-27 15:41:50 +100020295 .bustype = BUS_SPI,
20296 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020297 .model_id = WINBOND_NEX_W25X80,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020298 .total_size = 1024,
20299 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020300 /* FEATURE_FAST_READ_DIO since W25X80B */
20301 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020302 .tested = TEST_OK_PREW,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020303 .probe = probe_spi_rdid,
20304 .probe_timing = TIMING_ZERO,
20305 .block_erasers =
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020306 {
20307 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020308 .eraseblocks = { {4 * 1024, 256} },
20309 .block_erase = spi_block_erase_20,
20310 }, {
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020311 .eraseblocks = { {64 * 1024, 16} },
20312 .block_erase = spi_block_erase_d8,
20313 }, {
20314 .eraseblocks = { {1024 * 1024, 1} },
20315 .block_erase = spi_block_erase_c7,
20316 }
20317 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100020318 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20319 .unlock = spi_disable_blockprotect,
20320 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020321 .read = spi_chip_read,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020322 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020323 .prepare_access = spi_prepare_io,
20324 .finish_access = spi_finish_io,
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020325 },
20326
Alan Greenf29ea362019-06-27 17:14:02 +100020327 /* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
20328 {
Carl-Daniel Hailfinger2e88a9f2011-07-26 14:18:52 +000020329 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020330 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020331 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020332 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020333 .model_id = WINBOND_W29C010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020334 .total_size = 128,
20335 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000020336 .feature_bits = FEATURE_LONG_RESET,
David Hendricks567b7b82011-05-18 01:31:03 +000020337 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020338 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020339 .probe_timing = 10, /* used datasheet for the W29C011A */
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020340 .block_erasers =
20341 {
20342 {
20343 .eraseblocks = { {128 * 1024, 1} },
20344 .block_erase = erase_chip_block_jedec,
20345 }
20346 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020347 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020348 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010020349 .prepare_access = prepare_memory_access,
20350 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020351 },
20352
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020353 {
20354 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020355 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012-old",
20356 .bustype = BUS_PARALLEL,
20357 .manufacture_id = WINBOND_ID,
20358 .model_id = WINBOND_W29C010,
20359 .total_size = 128,
20360 .page_size = 128,
20361 .feature_bits = FEATURE_LONG_RESET,
20362 .tested = TEST_OK_PREW,
20363 .probe = probe_w29ee011,
20364 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (w29ee011.c) */
20365 .block_erasers =
20366 {
20367 {
20368 .eraseblocks = { {128 * 1024, 1} },
20369 .block_erase = erase_chip_block_jedec,
20370 }
20371 },
20372 .write = write_jedec,
20373 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010020374 .prepare_access = prepare_memory_access,
20375 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020376 },
20377
20378 {
20379 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020380 .name = "W29C020(C)/W29C022",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020381 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020382 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020383 .model_id = WINBOND_W29C020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020384 .total_size = 256,
20385 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000020386 .feature_bits = FEATURE_LONG_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020387 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020388 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020389 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020390 .block_erasers =
20391 {
20392 {
20393 .eraseblocks = { {256 * 1024, 1} },
20394 .block_erase = erase_chip_block_jedec,
20395 }
20396 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020397 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020398 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020399 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020400 .prepare_access = prepare_memory_access,
20401 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020402 },
20403
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020404 {
20405 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020406 .name = "W29C040/P",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020407 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020408 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020409 .model_id = WINBOND_W29C040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020410 .total_size = 512,
20411 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000020412 .feature_bits = FEATURE_LONG_RESET,
20413 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020414 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000020415 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020416 .block_erasers =
20417 {
20418 {
20419 .eraseblocks = { {512 * 1024, 1} },
20420 .block_erase = erase_chip_block_jedec,
20421 }
20422 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020423 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020424 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020425 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020426 .prepare_access = prepare_memory_access,
20427 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020428 },
20429
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020430 {
20431 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020432 .name = "W29C512A/W29EE512",
20433 .bustype = BUS_PARALLEL,
20434 .manufacture_id = WINBOND_ID,
20435 .model_id = WINBOND_W29C512A,
20436 .total_size = 64,
20437 .page_size = 128,
20438 .feature_bits = FEATURE_LONG_RESET,
20439 .tested = TEST_OK_PREW,
20440 .probe = probe_jedec,
20441 .probe_timing = 10,
20442 .block_erasers =
20443 {
20444 {
20445 .eraseblocks = { {64 * 1024, 1} },
20446 .block_erase = erase_chip_block_jedec,
20447 }
20448 },
20449 .write = write_jedec,
20450 .read = read_memmapped,
20451 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020452 .prepare_access = prepare_memory_access,
20453 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020454 },
20455
20456 {
20457 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020458 .name = "W29GL032CB",
20459 .bustype = BUS_PARALLEL,
20460 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20461 .model_id = WINBOND_W29GL032CB,
20462 .total_size = 4096,
20463 .page_size = 128 * 1024, /* actual page size is 16 */
20464 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20465 .tested = TEST_UNTESTED,
20466 .probe = probe_jedec_29gl,
20467 .probe_timing = TIMING_ZERO,
20468 .block_erasers =
20469 {
20470 {
20471 .eraseblocks = {
20472 {8 * 1024, 8},
20473 {64 * 1024, 63},
20474 },
20475 .block_erase = erase_sector_jedec,
20476 }, {
20477 .eraseblocks = { {4 * 1024 * 1024, 1} },
20478 .block_erase = erase_chip_block_jedec,
20479 },
20480 },
20481 .write = write_jedec_1,
20482 .read = read_memmapped,
20483 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020484 .prepare_access = prepare_memory_access,
20485 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020486 },
20487
20488 {
20489 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020490 .name = "W29GL032CH/L",
20491 .bustype = BUS_PARALLEL,
20492 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20493 .model_id = WINBOND_W29GL032CHL,
20494 .total_size = 4096,
20495 .page_size = 128 * 1024, /* actual page size is 16 */
20496 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20497 .tested = TEST_UNTESTED,
20498 .probe = probe_jedec_29gl,
20499 .probe_timing = TIMING_ZERO,
20500 .block_erasers =
20501 {
20502 {
20503 .eraseblocks = { {64 * 1024, 64} },
20504 .block_erase = erase_sector_jedec,
20505 }, {
20506 .eraseblocks = { {4 * 1024 * 1024, 1} },
20507 .block_erase = erase_chip_block_jedec,
20508 },
20509 },
20510 .write = write_jedec_1,
20511 .read = read_memmapped,
20512 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020513 .prepare_access = prepare_memory_access,
20514 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020515 },
20516
20517 {
20518 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020519 .name = "W29GL032CT",
20520 .bustype = BUS_PARALLEL,
20521 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20522 .model_id = WINBOND_W29GL032CT,
20523 .total_size = 4096,
20524 .page_size = 128 * 1024, /* actual page size is 16 */
20525 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20526 .tested = TEST_UNTESTED,
20527 .probe = probe_jedec_29gl,
20528 .probe_timing = TIMING_ZERO,
20529 .block_erasers =
20530 {
20531 {
20532 .eraseblocks = {
20533 {64 * 1024, 63},
20534 {8 * 1024, 8},
20535 },
20536 .block_erase = erase_sector_jedec,
20537 }, {
20538 .eraseblocks = { {4 * 1024 * 1024, 1} },
20539 .block_erase = erase_chip_block_jedec,
20540 },
20541 },
20542 .write = write_jedec_1,
20543 .read = read_memmapped,
20544 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020545 .prepare_access = prepare_memory_access,
20546 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020547 },
20548
20549 {
20550 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020551 .name = "W29GL064CB",
20552 .bustype = BUS_PARALLEL,
20553 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20554 .model_id = WINBOND_W29GL064CB,
20555 .total_size = 8192,
20556 .page_size = 128 * 1024, /* actual page size is 16 */
20557 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20558 .tested = TEST_UNTESTED,
20559 .probe = probe_jedec_29gl,
20560 .probe_timing = TIMING_ZERO,
20561 .block_erasers =
20562 {
20563 {
20564 .eraseblocks = {
20565 {8 * 1024, 8},
20566 {64 * 1024, 127},
20567 },
20568 .block_erase = erase_sector_jedec,
20569 }, {
20570 .eraseblocks = { {8 * 1024 * 1024, 1} },
20571 .block_erase = erase_chip_block_jedec,
20572 },
20573 },
20574 .write = write_jedec_1,
20575 .read = read_memmapped,
20576 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020577 .prepare_access = prepare_memory_access,
20578 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020579 },
20580
20581 {
20582 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020583 .name = "W29GL064CH/L",
20584 .bustype = BUS_PARALLEL,
20585 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20586 .model_id = WINBOND_W29GL064CHL,
20587 .total_size = 8192,
20588 .page_size = 128 * 1024, /* actual page size is 16 */
20589 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20590 .tested = TEST_UNTESTED,
20591 .probe = probe_jedec_29gl,
20592 .probe_timing = TIMING_ZERO,
20593 .block_erasers =
20594 {
20595 {
20596 .eraseblocks = { {64 * 1024, 128} },
20597 .block_erase = erase_sector_jedec,
20598 }, {
20599 .eraseblocks = { {8 * 1024 * 1024, 1} },
20600 .block_erase = erase_chip_block_jedec,
20601 },
20602 },
20603 .write = write_jedec_1,
20604 .read = read_memmapped,
20605 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020606 .prepare_access = prepare_memory_access,
20607 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020608 },
20609
20610 {
20611 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020612 .name = "W29GL064CT",
20613 .bustype = BUS_PARALLEL,
20614 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20615 .model_id = WINBOND_W29GL064CT,
20616 .total_size = 8192,
20617 .page_size = 128 * 1024, /* actual page size is 16 */
20618 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20619 .tested = TEST_UNTESTED,
20620 .probe = probe_jedec_29gl,
20621 .probe_timing = TIMING_ZERO,
20622 .block_erasers =
20623 {
20624 {
20625 .eraseblocks = {
20626 {64 * 1024, 127},
20627 {8 * 1024, 8},
20628 },
20629 .block_erase = erase_sector_jedec,
20630 }, {
20631 .eraseblocks = { {8 * 1024 * 1024, 1} },
20632 .block_erase = erase_chip_block_jedec,
20633 },
20634 },
20635 .write = write_jedec_1,
20636 .read = read_memmapped,
20637 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020638 .prepare_access = prepare_memory_access,
20639 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020640 },
20641
20642 {
20643 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020644 .name = "W29GL128C",
20645 .bustype = BUS_PARALLEL,
20646 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20647 .model_id = WINBOND_W29GL128CHL,
20648 .total_size = 16384,
20649 .page_size = 128 * 1024, /* actual page size is 16 */
20650 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20651 .tested = TEST_UNTESTED,
20652 .probe = probe_jedec_29gl,
20653 .probe_timing = TIMING_ZERO,
20654 .block_erasers =
20655 {
20656 {
20657 .eraseblocks = { {128 * 1024, 128} },
20658 .block_erase = erase_sector_jedec,
20659 }, {
20660 .eraseblocks = { {16 * 1024 * 1024, 1} },
20661 .block_erase = erase_chip_block_jedec,
20662 },
20663 },
20664 .write = write_jedec_1,
20665 .read = read_memmapped,
20666 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020667 .prepare_access = prepare_memory_access,
20668 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020669 },
20670
20671 {
20672 .vendor = "Winbond",
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020673 .name = "W39F010",
20674 .bustype = BUS_PARALLEL,
20675 .manufacture_id = WINBOND_ID,
20676 .model_id = WINBOND_W39F010,
20677 .total_size = 128,
20678 .page_size = 4 * 1024,
20679 .feature_bits = FEATURE_EITHER_RESET,
20680 .tested = TEST_OK_PREW,
20681 .probe = probe_jedec,
20682 .probe_timing = 10,
20683 .block_erasers =
20684 {
20685 {
20686 .eraseblocks = { {4 * 1024, 32} },
20687 .block_erase = erase_block_jedec,
20688 }, {
20689 .eraseblocks = { {128 * 1024, 1} },
20690 .block_erase = erase_chip_block_jedec,
20691 }
20692 },
20693 .printlock = printlock_w39f010,
20694 .write = write_jedec_1,
20695 .read = read_memmapped,
20696 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020697 .prepare_access = prepare_memory_access,
20698 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020699 },
20700
20701 {
20702 .vendor = "Winbond",
20703 .name = "W39L010",
20704 .bustype = BUS_PARALLEL,
20705 .manufacture_id = WINBOND_ID,
20706 .model_id = WINBOND_W39L010,
20707 .total_size = 128,
20708 .page_size = 4 * 1024,
20709 .feature_bits = FEATURE_EITHER_RESET,
20710 .tested = TEST_UNTESTED,
20711 .probe = probe_jedec,
20712 .probe_timing = 10,
20713 .block_erasers =
20714 {
20715 {
20716 .eraseblocks = { {4 * 1024, 32} },
20717 .block_erase = erase_block_jedec,
20718 }, {
20719 .eraseblocks = { {128 * 1024, 1} },
20720 .block_erase = erase_chip_block_jedec,
20721 }
20722 },
20723 .printlock = printlock_w39l010,
20724 .write = write_jedec_1,
20725 .read = read_memmapped,
20726 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020727 .prepare_access = prepare_memory_access,
20728 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020729 },
20730
20731 {
20732 .vendor = "Winbond",
20733 .name = "W39L020",
20734 .bustype = BUS_PARALLEL,
20735 .manufacture_id = WINBOND_ID,
20736 .model_id = WINBOND_W39L020,
20737 .total_size = 256,
20738 .page_size = 4 * 1024,
20739 .feature_bits = FEATURE_EITHER_RESET,
20740 .tested = TEST_UNTESTED,
20741 .probe = probe_jedec,
20742 .probe_timing = 10,
20743 .block_erasers =
20744 {
20745 {
20746 .eraseblocks = { {4 * 1024, 64} },
20747 .block_erase = erase_block_jedec,
20748 }, {
20749 .eraseblocks = { {64 * 1024, 4} },
20750 .block_erase = erase_sector_jedec,
20751 }, {
20752 .eraseblocks = { {256 * 1024, 1} },
20753 .block_erase = erase_chip_block_jedec,
20754 }
20755 },
20756 .printlock = printlock_w39l020,
20757 .write = write_jedec_1,
20758 .read = read_memmapped,
20759 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020760 .prepare_access = prepare_memory_access,
20761 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020762 },
20763
20764 {
20765 .vendor = "Winbond",
Michael Karcher19e0aac2011-03-06 17:58:05 +000020766 .name = "W39L040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020767 .bustype = BUS_PARALLEL,
Michael Karcher19e0aac2011-03-06 17:58:05 +000020768 .manufacture_id = WINBOND_ID,
20769 .model_id = WINBOND_W39L040,
20770 .total_size = 512,
20771 .page_size = 64 * 1024,
20772 .feature_bits = FEATURE_EITHER_RESET,
20773 .tested = TEST_OK_PR,
20774 .probe = probe_jedec,
20775 .probe_timing = 10,
20776 .block_erasers =
20777 {
20778 {
20779 .eraseblocks = { {4 * 1024, 128} },
20780 .block_erase = erase_block_jedec,
20781 }, {
20782 .eraseblocks = { {64 * 1024, 8} },
20783 .block_erase = erase_sector_jedec,
20784 }, {
20785 .eraseblocks = { {512 * 1024, 1} },
20786 .block_erase = erase_chip_block_jedec,
20787 }
20788 },
20789 .printlock = printlock_w39l040,
20790 .write = write_jedec_1,
20791 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020792 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020793 .prepare_access = prepare_memory_access,
20794 .finish_access = finish_memory_access,
Michael Karcher19e0aac2011-03-06 17:58:05 +000020795 },
20796
20797 {
20798 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020799 .name = "W39V040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020800 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020801 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020802 .model_id = WINBOND_W39V040A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020803 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020804 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020805 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000020806 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020807 .probe = probe_jedec,
Stefan Tauner716e0982011-07-25 20:38:52 +000020808 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020809 .block_erasers =
20810 {
20811 {
20812 .eraseblocks = { {64 * 1024, 8} },
20813 .block_erase = erase_sector_jedec,
20814 }, {
20815 .eraseblocks = { {512 * 1024, 1} },
20816 .block_erase = erase_chip_block_jedec,
20817 }
20818 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020819 .printlock = printlock_w39v040a,
Sean Nelson35727f72010-01-28 23:55:12 +000020820 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020821 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020822 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020823 .prepare_access = prepare_memory_access,
20824 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020825 },
20826
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020827 {
20828 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020829 .name = "W39V040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020830 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020831 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020832 .model_id = WINBOND_W39V040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020833 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020834 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020835 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000020836 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020837 .probe = probe_jedec,
Paul Menzel018d4822011-10-21 12:33:07 +000020838 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020839 .block_erasers =
20840 {
20841 {
20842 .eraseblocks = { {64 * 1024, 8} },
20843 .block_erase = erase_sector_jedec,
20844 }, {
20845 .eraseblocks = { {512 * 1024, 1} },
20846 .block_erase = erase_chip_block_jedec,
20847 }
20848 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020849 .printlock = printlock_w39v040b,
Sean Nelson35727f72010-01-28 23:55:12 +000020850 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020851 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020852 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020853 .prepare_access = prepare_memory_access,
20854 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020855 },
20856
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020857 {
20858 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020859 .name = "W39V040C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020860 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020861 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020862 .model_id = WINBOND_W39V040C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020863 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020864 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020865 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000020866 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000020867 .probe = probe_jedec,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020868 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020869 .block_erasers =
20870 {
20871 {
20872 .eraseblocks = { {64 * 1024, 8} },
20873 .block_erase = erase_sector_jedec,
20874 }, {
20875 .eraseblocks = { {512 * 1024, 1} },
20876 .block_erase = erase_chip_block_jedec,
20877 }
20878 },
Sean Nelson6e0b9122010-02-19 00:52:10 +000020879 .printlock = printlock_w39v040c,
Sean Nelson35727f72010-01-28 23:55:12 +000020880 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020881 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020882 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020883 .prepare_access = prepare_memory_access,
20884 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020885 },
20886
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020887 {
20888 .vendor = "Winbond",
20889 .name = "W39V040FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020890 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020891 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020892 .model_id = WINBOND_W39V040FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020893 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000020894 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010020895 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000020896 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020897 .probe = probe_jedec,
Antony Rheneus0fbba982011-05-26 14:28:51 +000020898 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020899 .block_erasers =
20900 {
20901 {
20902 .eraseblocks = { {4 * 1024, 128} },
20903 .block_erase = erase_block_jedec,
20904 }, {
20905 .eraseblocks = { {64 * 1024, 8} },
20906 .block_erase = erase_sector_jedec,
20907 }, {
20908 .eraseblocks = { {512 * 1024, 1} },
20909 .block_erase = erase_chip_block_jedec,
20910 }
20911 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020912 .printlock = printlock_w39v040fa,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020913 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000020914 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020915 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020916 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010020917 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020918 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020919 },
20920
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020921 {
20922 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020923 .name = "W39V040FB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020924 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020925 .manufacture_id = WINBOND_ID,
20926 .model_id = WINBOND_W39V040B,
20927 .total_size = 512,
20928 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010020929 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner0be072c2016-03-13 15:16:30 +000020930 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020931 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000020932 .probe_timing = 10,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020933 .block_erasers =
20934 {
20935 {
20936 .eraseblocks = { {64 * 1024, 8} },
20937 .block_erase = erase_sector_jedec,
20938 }, {
20939 .eraseblocks = { {512 * 1024, 1} },
20940 .block_erase = erase_chip_block_jedec,
20941 }
20942 },
20943 .printlock = printlock_w39v040fb,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020944 .unlock = unlock_regspace2_uniform_64k,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020945 .write = write_jedec_1,
20946 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020947 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010020948 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020949 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020950 },
20951
20952 {
20953 .vendor = "Winbond",
20954 .name = "W39V040FC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020955 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020956 .manufacture_id = WINBOND_ID,
20957 .model_id = WINBOND_W39V040C,
20958 .total_size = 512,
20959 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010020960 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauneraf2db612011-12-02 21:48:17 +000020961 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020962 .probe = probe_jedec,
20963 .probe_timing = 10,
20964 .block_erasers =
20965 {
20966 {
20967 .eraseblocks = { {64 * 1024, 8} },
20968 .block_erase = erase_sector_jedec,
20969 }, {
20970 .eraseblocks = { {512 * 1024, 1} },
20971 .block_erase = erase_chip_block_jedec,
20972 }
20973 },
20974 .printlock = printlock_w39v040fc,
20975 .write = write_jedec_1,
20976 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020977 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010020978 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020979 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000020980 },
20981
20982 {
20983 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020984 .name = "W39V080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020985 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020986 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020987 .model_id = WINBOND_W39V080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020988 .total_size = 1024,
Sean Nelson72a9a022009-12-22 22:15:33 +000020989 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020990 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzelac427b22012-02-16 21:07:07 +000020991 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020992 .probe = probe_jedec,
Paul Menzelac427b22012-02-16 21:07:07 +000020993 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020994 .block_erasers =
20995 {
20996 {
20997 .eraseblocks = { {64 * 1024, 16} },
20998 .block_erase = erase_sector_jedec,
20999 }, {
21000 .eraseblocks = { {1024 * 1024, 1} },
21001 .block_erase = erase_chip_block_jedec,
21002 }
21003 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021004 .printlock = printlock_w39v080a,
Sean Nelson35727f72010-01-28 23:55:12 +000021005 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021006 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021007 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021008 .prepare_access = prepare_memory_access,
21009 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021010 },
21011
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021012 {
21013 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100021014 .name = "W39V080FA",
21015 .bustype = BUS_FWH,
21016 .manufacture_id = WINBOND_ID,
21017 .model_id = WINBOND_W39V080FA,
21018 .total_size = 1024,
21019 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021020 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021021 .tested = TEST_OK_PREW,
21022 .probe = probe_jedec,
21023 .probe_timing = 10,
21024 .block_erasers =
21025 {
21026 {
21027 .eraseblocks = { {64 * 1024, 16} },
21028 .block_erase = erase_sector_jedec,
21029 }, {
21030 .eraseblocks = { {1024 * 1024, 1} },
21031 .block_erase = erase_chip_block_jedec,
21032 }
21033 },
21034 .printlock = printlock_w39v080fa,
21035 .unlock = unlock_regspace2_uniform_64k,
21036 .write = write_jedec_1,
21037 .read = read_memmapped,
21038 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021039 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021040 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021041 },
21042
21043 {
21044 .vendor = "Winbond",
21045 .name = "W39V080FA (dual mode)",
21046 .bustype = BUS_FWH,
21047 .manufacture_id = WINBOND_ID,
21048 .model_id = WINBOND_W39V080FA_DM,
21049 .total_size = 512,
21050 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021051 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021052 .tested = TEST_UNTESTED,
21053 .probe = probe_jedec,
21054 .probe_timing = 10,
21055 .block_erasers =
21056 {
21057 {
21058 .eraseblocks = { {64 * 1024, 8} },
21059 .block_erase = erase_sector_jedec,
21060 }, {
21061 .eraseblocks = { {512 * 1024, 1} },
21062 .block_erase = erase_chip_block_jedec,
21063 }
21064 },
21065 .printlock = printlock_w39v080fa_dual,
21066 .write = write_jedec_1,
21067 .read = read_memmapped,
21068 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021069 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021070 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021071 },
21072
21073 {
21074 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000021075 .name = "W49F002U/N",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021076 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021077 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021078 .model_id = WINBOND_W49F002U,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021079 .total_size = 256,
21080 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021081 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000021082 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021083 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000021084 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021085 .block_erasers =
21086 {
21087 {
21088 .eraseblocks = {
21089 {128 * 1024, 1},
21090 {96 * 1024, 1},
21091 {8 * 1024, 2},
21092 {16 * 1024, 1},
21093 },
21094 .block_erase = erase_sector_jedec,
21095 }, {
21096 .eraseblocks = { {256 * 1024, 1} },
21097 .block_erase = erase_chip_block_jedec,
21098 }
21099 },
Sean Nelson35727f72010-01-28 23:55:12 +000021100 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021101 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021102 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010021103 .prepare_access = prepare_memory_access,
21104 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021105 },
21106
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021107 {
21108 .vendor = "Winbond",
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021109 .name = "W49F020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021110 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021111 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021112 .model_id = WINBOND_W49F020,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021113 .total_size = 256,
21114 .page_size = 128,
21115 .feature_bits = FEATURE_EITHER_RESET,
21116 .tested = TEST_OK_PROBE,
21117 .probe = probe_jedec,
21118 .probe_timing = 10,
21119 .block_erasers =
21120 {
21121 {
21122 .eraseblocks = { {256 * 1024, 1} },
21123 .block_erase = erase_chip_block_jedec,
21124 }
21125 },
21126 .write = write_jedec_1,
21127 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021128 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010021129 .prepare_access = prepare_memory_access,
21130 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021131 },
21132
21133 {
21134 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021135 .name = "W49V002A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021136 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021137 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021138 .model_id = WINBOND_W49V002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021139 .total_size = 256,
21140 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021141 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000021142 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021143 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000021144 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021145 .block_erasers =
21146 {
21147 {
21148 .eraseblocks = {
21149 {64 * 1024, 3},
21150 {32 * 1024, 1},
21151 {8 * 1024, 2},
21152 {16 * 1024, 1},
21153 },
21154 .block_erase = erase_sector_jedec,
21155 }, {
21156 .eraseblocks = { {256 * 1024, 1} },
21157 .block_erase = erase_chip_block_jedec,
21158 }
21159 },
Sean Nelson35727f72010-01-28 23:55:12 +000021160 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021161 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021162 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021163 .prepare_access = prepare_memory_access,
21164 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021165 },
21166
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021167 {
21168 .vendor = "Winbond",
21169 .name = "W49V002FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021170 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021171 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021172 .model_id = WINBOND_W49V002FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021173 .total_size = 256,
21174 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021175 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000021176 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021177 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000021178 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021179 .block_erasers =
21180 {
21181 {
21182 .eraseblocks = {
21183 {64 * 1024, 3},
21184 {32 * 1024, 1},
21185 {8 * 1024, 2},
21186 {16 * 1024, 1},
21187 },
21188 .block_erase = erase_sector_jedec,
21189 }, {
21190 .eraseblocks = { {256 * 1024, 1} },
21191 .block_erase = erase_chip_block_jedec,
21192 }
21193 },
Sean Nelson35727f72010-01-28 23:55:12 +000021194 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021195 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021196 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021197 .prepare_access = prepare_memory_access,
21198 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021199 },
21200
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021201 {
luke heef884232020-12-28 18:22:21 +080021202 .vendor = "XMC",
21203 .name = "XM25QH128C",
21204 .bustype = BUS_SPI,
21205 .manufacture_id = ST_ID,
21206 .model_id = XMC_XM25QH128C,
21207 .total_size = 16384,
21208 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010021209 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
21210 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021211 .tested = TEST_UNTESTED,
21212 .probe = probe_spi_rdid,
21213 .probe_timing = TIMING_ZERO,
21214 .block_erasers =
21215 {
21216 {
21217 .eraseblocks = { {4 * 1024, 4096} },
21218 .block_erase = spi_block_erase_20,
21219 }, {
21220 .eraseblocks = { {32 * 1024, 512} },
21221 .block_erase = spi_block_erase_52,
21222 }, {
21223 .eraseblocks = { {64 * 1024, 256} },
21224 .block_erase = spi_block_erase_d8,
21225 }, {
21226 .eraseblocks = { {16 * 1024 * 1024, 1} },
21227 .block_erase = spi_block_erase_60,
21228 }, {
21229 .eraseblocks = { {16 * 1024 * 1024, 1} },
21230 .block_erase = spi_block_erase_c7,
21231 }
21232 },
21233 .printlock = spi_prettyprint_status_register_plain,
21234 .unlock = spi_disable_blockprotect,
21235 .write = spi_chip_write_256,
21236 .read = spi_chip_read,
21237 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021238 .reg_bits =
21239 {
Nico Huber96786d02024-01-06 18:30:15 +010021240 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021241 .srp = {STATUS1, 7, RW},
21242 .srl = {STATUS2, 0, RW},
21243 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
21244 .tb = {STATUS1, 5, RW},
21245 .sec = {STATUS1, 6, RW},
21246 .cmp = {STATUS2, 6, RW},
21247 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021248 .wp_write_cfg = spi_wp_write_cfg,
21249 .wp_read_cfg = spi_wp_read_cfg,
21250 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021251 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020021252 .prepare_access = spi_prepare_io,
21253 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021254 },
21255
21256 {
21257 .vendor = "XMC",
21258 .name = "XM25QH256C",
21259 .bustype = BUS_SPI,
21260 .manufacture_id = ST_ID,
21261 .model_id = XMC_XM25QH256C,
21262 .total_size = 32768,
21263 .page_size = 256,
21264 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021265 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
21266 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
21267 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021268 .tested = TEST_UNTESTED,
21269 .probe = probe_spi_rdid,
21270 .probe_timing = TIMING_ZERO,
21271 .block_erasers =
21272 {
21273 {
21274 .eraseblocks = { {4 * 1024, 8192} },
21275 .block_erase = spi_block_erase_21,
21276 }, {
21277 .eraseblocks = { {4 * 1024, 8192} },
21278 .block_erase = spi_block_erase_20,
21279 }, {
21280 .eraseblocks = { {32 * 1024, 1024} },
21281 .block_erase = spi_block_erase_52,
21282 }, {
21283 .eraseblocks = { {64 * 1024, 512} },
21284 .block_erase = spi_block_erase_dc,
21285 }, {
21286 .eraseblocks = { {64 * 1024, 512} },
21287 .block_erase = spi_block_erase_d8,
21288 }, {
21289 .eraseblocks = { {32 * 1024 * 1024, 1} },
21290 .block_erase = spi_block_erase_60,
21291 }, {
21292 .eraseblocks = { {32 * 1024 * 1024, 1} },
21293 .block_erase = spi_block_erase_c7,
21294 }
21295 },
21296 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21297 .unlock = spi_disable_blockprotect,
21298 .write = spi_chip_write_256,
21299 .read = spi_chip_read,
21300 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021301 .reg_bits =
21302 {
Nico Huber96786d02024-01-06 18:30:15 +010021303 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021304 .srp = {STATUS1, 7, RW},
21305 .srl = {STATUS2, 0, RW},
21306 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
21307 .tb = {STATUS1, 6, RW},
21308 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021309 .wp_write_cfg = spi_wp_write_cfg,
21310 .wp_read_cfg = spi_wp_read_cfg,
21311 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021312 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020021313 .prepare_access = spi_prepare_io,
21314 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021315 },
21316
21317 {
21318 .vendor = "XMC",
21319 .name = "XM25QH64C",
21320 .bustype = BUS_SPI,
21321 .manufacture_id = ST_ID,
21322 .model_id = XMC_XM25QH64C,
21323 .total_size = 8192,
21324 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010021325 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021326 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021327 .tested = TEST_UNTESTED,
21328 .probe = probe_spi_rdid,
21329 .probe_timing = TIMING_ZERO,
21330 .block_erasers =
21331 {
21332 {
21333 .eraseblocks = { {4 * 1024, 2048} },
21334 .block_erase = spi_block_erase_20,
21335 }, {
21336 .eraseblocks = { {32 * 1024, 256} },
21337 .block_erase = spi_block_erase_52,
21338 }, {
21339 .eraseblocks = { {64 * 1024, 128} },
21340 .block_erase = spi_block_erase_d8,
21341 }, {
21342 .eraseblocks = { {8 * 1024 * 1024, 1} },
21343 .block_erase = spi_block_erase_60,
21344 }, {
21345 .eraseblocks = { {8 * 1024 * 1024, 1} },
21346 .block_erase = spi_block_erase_c7,
21347 }
21348 },
Nico Huber96786d02024-01-06 18:30:15 +010021349 .reg_bits =
21350 {
21351 .qe = {STATUS2, 1, RW},
21352 },
luke heef884232020-12-28 18:22:21 +080021353 .printlock = spi_prettyprint_status_register_plain,
21354 .unlock = spi_disable_blockprotect,
21355 .write = spi_chip_write_256,
21356 .read = spi_chip_read,
21357 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020021358 .prepare_access = spi_prepare_io,
21359 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021360 },
21361
21362 {
21363 .vendor = "XMC",
21364 .name = "XM25QU128C",
21365 .bustype = BUS_SPI,
21366 .manufacture_id = ST_ID,
21367 .model_id = XMC_XM25QU128C,
21368 .total_size = 16384,
21369 .page_size = 256,
21370 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021371 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021372 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021373 .tested = TEST_UNTESTED,
21374 .probe = probe_spi_rdid,
21375 .probe_timing = TIMING_ZERO,
21376 .block_erasers =
21377 {
21378 {
21379 .eraseblocks = { {4 * 1024, 4096} },
21380 .block_erase = spi_block_erase_20,
21381 }, {
21382 .eraseblocks = { {32 * 1024, 512} },
21383 .block_erase = spi_block_erase_52,
21384 }, {
21385 .eraseblocks = { {64 * 1024, 256} },
21386 .block_erase = spi_block_erase_d8,
21387 }, {
21388 .eraseblocks = { {16 * 1024 * 1024, 1} },
21389 .block_erase = spi_block_erase_60,
21390 }, {
21391 .eraseblocks = { {16 * 1024 * 1024, 1} },
21392 .block_erase = spi_block_erase_c7,
21393 }
21394 },
Nico Huber96786d02024-01-06 18:30:15 +010021395 .reg_bits =
21396 {
21397 .qe = {STATUS2, 1, RW},
21398 },
luke heef884232020-12-28 18:22:21 +080021399 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21400 .unlock = spi_disable_blockprotect,
21401 .write = spi_chip_write_256,
21402 .read = spi_chip_read,
21403 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021404 .prepare_access = spi_prepare_io,
21405 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021406 },
21407
21408 {
21409 .vendor = "XMC",
21410 .name = "XM25QU256C",
21411 .bustype = BUS_SPI,
21412 .manufacture_id = ST_ID,
21413 .model_id = XMC_XM25QU256C,
21414 .total_size = 32768,
21415 .page_size = 256,
21416 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021417 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
21418 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
21419 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021420 .tested = TEST_UNTESTED,
21421 .probe = probe_spi_rdid,
21422 .probe_timing = TIMING_ZERO,
21423 .block_erasers =
21424 {
21425 {
21426 .eraseblocks = { {4 * 1024, 8192} },
21427 .block_erase = spi_block_erase_21,
21428 }, {
21429 .eraseblocks = { {4 * 1024, 8192} },
21430 .block_erase = spi_block_erase_20,
21431 }, {
21432 .eraseblocks = { {32 * 1024, 1024} },
21433 .block_erase = spi_block_erase_52,
21434 }, {
21435 .eraseblocks = { {64 * 1024, 512} },
21436 .block_erase = spi_block_erase_dc,
21437 }, {
21438 .eraseblocks = { {64 * 1024, 512} },
21439 .block_erase = spi_block_erase_d8,
21440 }, {
21441 .eraseblocks = { {32 * 1024 * 1024, 1} },
21442 .block_erase = spi_block_erase_60,
21443 }, {
21444 .eraseblocks = { {32 * 1024 * 1024, 1} },
21445 .block_erase = spi_block_erase_c7,
21446 }
21447 },
Nico Huber96786d02024-01-06 18:30:15 +010021448 .reg_bits =
21449 {
21450 .qe = {STATUS2, 1, RW},
21451 },
luke heef884232020-12-28 18:22:21 +080021452 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21453 .unlock = spi_disable_blockprotect,
21454 .write = spi_chip_write_256,
21455 .read = spi_chip_read,
21456 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021457 .prepare_access = spi_prepare_io,
21458 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021459 },
21460
21461 {
21462 .vendor = "XMC",
21463 .name = "XM25QU64C",
21464 .bustype = BUS_SPI,
21465 .manufacture_id = ST_ID,
21466 .model_id = XMC_XM25QU64C,
21467 .total_size = 8192,
21468 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010021469 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021470 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021471 .tested = TEST_UNTESTED,
21472 .probe = probe_spi_rdid,
21473 .probe_timing = TIMING_ZERO,
21474 .block_erasers =
21475 {
21476 {
21477 .eraseblocks = { {4 * 1024, 2048} },
21478 .block_erase = spi_block_erase_20,
21479 }, {
21480 .eraseblocks = { {32 * 1024, 256} },
21481 .block_erase = spi_block_erase_52,
21482 }, {
21483 .eraseblocks = { {64 * 1024, 128} },
21484 .block_erase = spi_block_erase_d8,
21485 }, {
21486 .eraseblocks = { {8 * 1024 * 1024, 1} },
21487 .block_erase = spi_block_erase_60,
21488 }, {
21489 .eraseblocks = { {8 * 1024 * 1024, 1} },
21490 .block_erase = spi_block_erase_c7,
21491 }
21492 },
Nico Huber96786d02024-01-06 18:30:15 +010021493 .reg_bits =
21494 {
21495 .qe = {STATUS2, 1, RW},
21496 },
luke heef884232020-12-28 18:22:21 +080021497 .printlock = spi_prettyprint_status_register_plain,
21498 .unlock = spi_disable_blockprotect,
21499 .write = spi_chip_write_256,
21500 .read = spi_chip_read,
21501 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021502 .prepare_access = spi_prepare_io,
21503 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021504 },
21505
21506 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100021507 .vendor = "Zetta Device",
21508 .name = "ZD25D20",
21509 .bustype = BUS_SPI,
21510 .manufacture_id = ZETTADEVICE_ID,
21511 .model_id = ZETTADEVICE_ZD25D20,
21512 .total_size = 256,
21513 .page_size = 256,
21514 .feature_bits = FEATURE_WRSR_WREN,
21515 .tested = TEST_UNTESTED,
21516 .probe = probe_spi_rdid,
21517 .probe_timing = TIMING_ZERO,
21518 .block_erasers =
David Hendricksa72d5a92018-02-11 17:58:44 -080021519 {
21520 {
21521 .eraseblocks = { {4 * 1024, 64} },
21522 .block_erase = spi_block_erase_20,
21523 }, {
21524 .eraseblocks = { {32 * 1024, 8} },
21525 .block_erase = spi_block_erase_52,
21526 }, {
21527 .eraseblocks = { {64 * 1024, 4} },
21528 .block_erase = spi_block_erase_d8,
21529 }, {
21530 .eraseblocks = { {256 * 1024, 1} },
21531 .block_erase = spi_block_erase_60,
21532 }, {
21533 .eraseblocks = { {256 * 1024, 1} },
21534 .block_erase = spi_block_erase_c7,
21535 }
21536 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100021537 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21538 .unlock = spi_disable_blockprotect,
21539 .write = spi_chip_write_256,
21540 .read = spi_chip_read,
21541 .voltage = {2700, 3600},
David Hendricksa72d5a92018-02-11 17:58:44 -080021542 },
21543
21544 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100021545 .vendor = "Zetta Device",
21546 .name = "ZD25D40",
21547 .bustype = BUS_SPI,
21548 .manufacture_id = ZETTADEVICE_ID,
21549 .model_id = ZETTADEVICE_ZD25D40,
21550 .total_size = 512,
21551 .page_size = 256,
21552 .feature_bits = FEATURE_WRSR_WREN,
21553 .tested = TEST_UNTESTED,
21554 .probe = probe_spi_rdid,
21555 .probe_timing = TIMING_ZERO,
21556 .block_erasers =
nybashcbb46e22018-02-11 17:53:49 -080021557 {
21558 {
21559 .eraseblocks = { {4 * 1024, 128} },
21560 .block_erase = spi_block_erase_20,
21561 }, {
21562 .eraseblocks = { {32 * 1024, 16} },
21563 .block_erase = spi_block_erase_52,
21564 }, {
21565 .eraseblocks = { {64 * 1024, 8} },
21566 .block_erase = spi_block_erase_d8,
21567 }, {
21568 .eraseblocks = { {512 * 1024, 1} },
21569 .block_erase = spi_block_erase_60,
21570 }, {
21571 .eraseblocks = { {512 * 1024, 1} },
21572 .block_erase = spi_block_erase_c7,
21573 }
21574 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100021575 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21576 .unlock = spi_disable_blockprotect,
21577 .write = spi_chip_write_256,
21578 .read = spi_chip_read,
21579 .voltage = {2700, 3600},
nybashcbb46e22018-02-11 17:53:49 -080021580 },
21581
Stefan Taunerac1b4c82012-02-17 14:51:04 +000021582 {
Alan Greendd592202019-08-23 10:11:37 +100021583 .vendor = "Unknown",
21584 .name = "SFDP-capable chip",
21585 .bustype = BUS_SPI,
21586 .manufacture_id = GENERIC_MANUF_ID,
21587 .model_id = SFDP_DEVICE_ID,
21588 .total_size = 0, /* set by probing function */
21589 .page_size = 0, /* set by probing function */
21590 .feature_bits = 0, /* set by probing function */
21591 /* We present our own "report this" text hence we do not */
21592 /* want the default "This flash part has status UNTESTED..." */
21593 /* text to be printed. */
21594 .tested = TEST_OK_PREW,
21595 .probe = probe_spi_sfdp,
21596 .block_erasers = {}, /* set by probing function */
21597 .unlock = spi_disable_blockprotect, /* is this safe? */
21598 .write = NULL, /* set by probing function */
21599 .read = spi_chip_read,
21600 /* FIXME: some vendor extensions define this */
21601 .voltage = {0},
21602 },
21603
21604 {
Carl-Daniel Hailfinger532c7172011-11-04 21:35:26 +000021605 .vendor = "Programmer",
21606 .name = "Opaque flash chip",
21607 .bustype = BUS_PROG,
21608 .manufacture_id = PROGMANUF_ID,
21609 .model_id = PROGDEV_ID,
21610 .total_size = 0,
21611 .page_size = 256,
21612 /* probe is assumed to work, rest will be filled in by probe */
21613 .tested = TEST_OK_PROBE,
21614 .probe = probe_opaque,
21615 /* eraseblock sizes will be set by the probing function */
21616 .block_erasers =
21617 {
21618 {
21619 .block_erase = erase_opaque,
21620 }
21621 },
21622 .write = write_opaque,
21623 .read = read_opaque,
21624 },
21625
21626 {
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000021627 .vendor = "AMIC",
21628 .name = "unknown AMIC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021629 .bustype = BUS_SPI,
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000021630 .manufacture_id = AMIC_ID,
21631 .model_id = GENERIC_DEVICE_ID,
21632 .total_size = 0,
21633 .page_size = 256,
21634 .tested = TEST_BAD_PREW,
21635 .probe = probe_spi_rdid4,
21636 .probe_timing = TIMING_ZERO,
21637 .write = NULL,
21638 .read = NULL,
21639 },
21640
21641 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021642 .vendor = "Atmel",
21643 .name = "unknown Atmel SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021644 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021645 .manufacture_id = ATMEL_ID,
21646 .model_id = GENERIC_DEVICE_ID,
21647 .total_size = 0,
21648 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021649 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021650 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021651 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021652 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021653 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021654 },
21655
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021656 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +000021657 .vendor = "Eon",
21658 .name = "unknown Eon SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021659 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021660 .manufacture_id = EON_ID_NOPREFIX,
21661 .model_id = GENERIC_DEVICE_ID,
21662 .total_size = 0,
21663 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021664 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021665 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021666 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021667 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021668 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021669 },
21670
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021671 {
21672 .vendor = "Macronix",
21673 .name = "unknown Macronix SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021674 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000021675 .manufacture_id = MACRONIX_ID,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021676 .model_id = GENERIC_DEVICE_ID,
21677 .total_size = 0,
21678 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021679 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021680 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021681 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021682 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021683 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021684 },
21685
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021686 {
21687 .vendor = "PMC",
21688 .name = "unknown PMC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021689 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021690 .manufacture_id = PMC_ID,
21691 .model_id = GENERIC_DEVICE_ID,
21692 .total_size = 0,
21693 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021694 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021695 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021696 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021697 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021698 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021699 },
21700
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021701 {
21702 .vendor = "SST",
21703 .name = "unknown SST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021704 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021705 .manufacture_id = SST_ID,
21706 .model_id = GENERIC_DEVICE_ID,
21707 .total_size = 0,
21708 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021709 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021710 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021711 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021712 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021713 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021714 },
21715
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021716 {
21717 .vendor = "ST",
21718 .name = "unknown ST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021719 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021720 .manufacture_id = ST_ID,
21721 .model_id = GENERIC_DEVICE_ID,
21722 .total_size = 0,
21723 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000021724 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021725 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000021726 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021727 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021728 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000021729 },
Uwe Hermannfc425e82008-03-16 02:06:25 +000021730
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021731 {
Sean Nelson118e1d62009-11-24 02:08:11 +000021732 .vendor = "Sanyo",
21733 .name = "unknown Sanyo SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021734 .bustype = BUS_SPI,
Sean Nelson118e1d62009-11-24 02:08:11 +000021735 .manufacture_id = SANYO_ID,
21736 .model_id = GENERIC_DEVICE_ID,
21737 .total_size = 0,
21738 .page_size = 256,
21739 .tested = TEST_BAD_PREW,
21740 .probe = probe_spi_rdid,
21741 .probe_timing = TIMING_ZERO,
Sean Nelson118e1d62009-11-24 02:08:11 +000021742 .write = NULL,
21743 .read = NULL,
21744 },
21745
21746 {
Stefan Taunereb582572012-09-21 12:52:50 +000021747 .vendor = "Winbond",
21748 .name = "unknown Winbond (ex Nexcom) SPI chip",
21749 .bustype = BUS_SPI,
21750 .manufacture_id = WINBOND_NEX_ID,
21751 .model_id = GENERIC_DEVICE_ID,
21752 .total_size = 0,
21753 .page_size = 256,
21754 .tested = TEST_BAD_PREW,
21755 .probe = probe_spi_rdid,
21756 .probe_timing = TIMING_ZERO,
21757 .write = NULL,
21758 .read = NULL,
21759 },
21760
21761 {
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021762 .vendor = "Generic",
21763 .name = "unknown SPI chip (RDID)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021764 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021765 .manufacture_id = GENERIC_MANUF_ID,
21766 .model_id = GENERIC_DEVICE_ID,
21767 .total_size = 0,
21768 .page_size = 256,
21769 .tested = TEST_BAD_PREW,
21770 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021771 .write = NULL,
21772 },
Stefan Tauneraf2db612011-12-02 21:48:17 +000021773
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021774 {
21775 .vendor = "Generic",
21776 .name = "unknown SPI chip (REMS)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021777 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021778 .manufacture_id = GENERIC_MANUF_ID,
21779 .model_id = GENERIC_DEVICE_ID,
21780 .total_size = 0,
21781 .page_size = 256,
21782 .tested = TEST_BAD_PREW,
21783 .probe = probe_spi_rems,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000021784 .write = NULL,
21785 },
21786
Stefan Tauner96658be2014-05-26 22:05:31 +000021787 {0}
Stephan Guilloux72cf5652009-04-21 01:46:07 +000021788};
Stefan Tauner96658be2014-05-26 22:05:31 +000021789
21790const unsigned int flashchips_size = ARRAY_SIZE(flashchips);