blob: 013674947cb2c0f303cb1d3bbee3e3b00b04f00b [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",
Nico Huber3cddff42024-10-20 15:18:53 +02003547 .name = "B.25D05AS",
Christian Kudera475a7ee2021-04-20 22:50:01 +02003548 .bustype = BUS_SPI,
3549 .manufacture_id = BOYA_BOHONG_ID,
Nico Huber3cddff42024-10-20 15:18:53 +02003550 .model_id = BOYA_BOHONG_B_25D05AS,
3551 .total_size = 64,
3552 .page_size = 256,
3553 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3554 .tested = TEST_UNTESTED,
3555 .probe = probe_spi_rdid,
3556 .probe_timing = TIMING_ZERO,
3557 .block_erasers =
3558 {
3559 {
3560 .eraseblocks = { {4 * 1024, 16} },
3561 .block_erase = spi_block_erase_20,
3562 }, {
3563 .eraseblocks = { {32 * 1024, 2} },
3564 .block_erase = spi_block_erase_52,
3565 }, {
3566 .eraseblocks = { {64 * 1024, 1} },
3567 .block_erase = spi_block_erase_d8,
3568 }, {
3569 .eraseblocks = { {64 * 1024, 1} },
3570 .block_erase = spi_block_erase_60,
3571 }, {
3572 .eraseblocks = { {64 * 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 .prepare_access = spi_prepare_io,
3582 .finish_access = spi_finish_io,
3583 },
3584
3585 {
3586 .vendor = "Boya/BoHong Microelectronics",
3587 .name = "B.25D10AS",
3588 .bustype = BUS_SPI,
3589 .manufacture_id = BOYA_BOHONG_ID,
3590 .model_id = BOYA_BOHONG_B_25D10AS,
3591 .total_size = 128,
3592 .page_size = 256,
3593 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3594 .tested = TEST_UNTESTED,
3595 .probe = probe_spi_rdid,
3596 .probe_timing = TIMING_ZERO,
3597 .block_erasers =
3598 {
3599 {
3600 .eraseblocks = { {4 * 1024, 32} },
3601 .block_erase = spi_block_erase_20,
3602 }, {
3603 .eraseblocks = { {32 * 1024, 4} },
3604 .block_erase = spi_block_erase_52,
3605 }, {
3606 .eraseblocks = { {64 * 1024, 2} },
3607 .block_erase = spi_block_erase_d8,
3608 }, {
3609 .eraseblocks = { {128 * 1024, 1} },
3610 .block_erase = spi_block_erase_60,
3611 }, {
3612 .eraseblocks = { {128 * 1024, 1} },
3613 .block_erase = spi_block_erase_c7,
3614 },
3615 },
3616 .printlock = spi_prettyprint_status_register_bp2_srwd,
3617 .unlock = spi_disable_blockprotect_bp2_srwd,
3618 .write = spi_chip_write_256,
3619 .read = spi_chip_read,
3620 .voltage = {2700, 3600},
3621 .prepare_access = spi_prepare_io,
3622 .finish_access = spi_finish_io,
3623 },
3624
3625 {
3626 .vendor = "Boya/BoHong Microelectronics",
3627 .name = "B.25D20AS",
3628 .bustype = BUS_SPI,
3629 .manufacture_id = BOYA_BOHONG_ID,
3630 .model_id = BOYA_BOHONG_B_25D20AS,
3631 .total_size = 256,
3632 .page_size = 256,
3633 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3634 .tested = TEST_UNTESTED,
3635 .probe = probe_spi_rdid,
3636 .probe_timing = TIMING_ZERO,
3637 .block_erasers =
3638 {
3639 {
3640 .eraseblocks = { {4 * 1024, 64} },
3641 .block_erase = spi_block_erase_20,
3642 }, {
3643 .eraseblocks = { {32 * 1024, 8} },
3644 .block_erase = spi_block_erase_52,
3645 }, {
3646 .eraseblocks = { {64 * 1024, 4} },
3647 .block_erase = spi_block_erase_d8,
3648 }, {
3649 .eraseblocks = { {256 * 1024, 1} },
3650 .block_erase = spi_block_erase_60,
3651 }, {
3652 .eraseblocks = { {256 * 1024, 1} },
3653 .block_erase = spi_block_erase_c7,
3654 },
3655 },
3656 .printlock = spi_prettyprint_status_register_bp2_srwd,
3657 .unlock = spi_disable_blockprotect_bp2_srwd,
3658 .write = spi_chip_write_256,
3659 .read = spi_chip_read,
3660 .voltage = {2700, 3600},
3661 .prepare_access = spi_prepare_io,
3662 .finish_access = spi_finish_io,
3663 },
3664
3665 {
3666 .vendor = "Boya/BoHong Microelectronics",
3667 .name = "B.25D40AS/BY25D40ES",
3668 .bustype = BUS_SPI,
3669 .manufacture_id = BOYA_BOHONG_ID,
3670 .model_id = BOYA_BOHONG_B_25D40AS,
3671 .total_size = 512,
3672 .page_size = 256,
3673 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3674 .tested = TEST_UNTESTED,
3675 .probe = probe_spi_rdid,
3676 .probe_timing = TIMING_ZERO,
3677 .block_erasers =
3678 {
3679 {
3680 .eraseblocks = { {4 * 1024, 128} },
3681 .block_erase = spi_block_erase_20,
3682 }, {
3683 .eraseblocks = { {32 * 1024, 16} },
3684 .block_erase = spi_block_erase_52,
3685 }, {
3686 .eraseblocks = { {64 * 1024, 8} },
3687 .block_erase = spi_block_erase_d8,
3688 }, {
3689 .eraseblocks = { {512 * 1024, 1} },
3690 .block_erase = spi_block_erase_60,
3691 }, {
3692 .eraseblocks = { {512 * 1024, 1} },
3693 .block_erase = spi_block_erase_c7,
3694 },
3695 },
3696 .printlock = spi_prettyprint_status_register_bp2_srwd,
3697 .unlock = spi_disable_blockprotect_bp2_srwd,
3698 .write = spi_chip_write_256,
3699 .read = spi_chip_read,
3700 .voltage = {2700, 3600},
3701 .prepare_access = spi_prepare_io,
3702 .finish_access = spi_finish_io,
3703 },
3704
3705 {
3706 .vendor = "Boya/BoHong Microelectronics",
3707 .name = "B.25D80AS/BY25Q80BS/BY25Q80ES",
3708 .bustype = BUS_SPI,
3709 .manufacture_id = BOYA_BOHONG_ID,
3710 .model_id = BOYA_BOHONG_B_25D80AS,
3711 .total_size = 1024,
3712 .page_size = 256,
3713 /* BY25Q80BS: QPI, BY25Q80ES: QIO */
3714 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
3715 .tested = TEST_UNTESTED,
3716 .probe = probe_spi_rdid,
3717 .probe_timing = TIMING_ZERO,
3718 .block_erasers =
3719 {
3720 {
3721 .eraseblocks = { {4 * 1024, 256} },
3722 .block_erase = spi_block_erase_20,
3723 }, {
3724 .eraseblocks = { {32 * 1024, 32} },
3725 .block_erase = spi_block_erase_52,
3726 }, {
3727 .eraseblocks = { {64 * 1024, 16} },
3728 .block_erase = spi_block_erase_d8,
3729 }, {
3730 .eraseblocks = { {1024 * 1024, 1} },
3731 .block_erase = spi_block_erase_60,
3732 }, {
3733 .eraseblocks = { {1024 * 1024, 1} },
3734 .block_erase = spi_block_erase_c7,
3735 },
3736 },
3737 .printlock = spi_prettyprint_status_register_bp2_srwd,
3738 .unlock = spi_disable_blockprotect_bp2_srwd,
3739 .write = spi_chip_write_256,
3740 .read = spi_chip_read,
3741 .voltage = {2700, 3600},
3742 .prepare_access = spi_prepare_io,
3743 .finish_access = spi_finish_io,
3744 },
3745
3746 {
3747 .vendor = "Boya/BoHong Microelectronics",
3748 .name = "B.25D16AS/BY25Q16BS/BY25Q16ES",
3749 .bustype = BUS_SPI,
3750 .manufacture_id = BOYA_BOHONG_ID,
3751 .model_id = BOYA_BOHONG_B_25D16AS,
Christian Kudera475a7ee2021-04-20 22:50:01 +02003752 .total_size = 2048,
3753 .page_size = 256,
Nico Huber3cddff42024-10-20 15:18:53 +02003754 /* B25Q16BS/ES: QPI */
3755 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Christian Kudera475a7ee2021-04-20 22:50:01 +02003756 .tested = TEST_OK_PR,
3757 .probe = probe_spi_rdid,
3758 .probe_timing = TIMING_ZERO,
3759 .block_erasers =
3760 {
3761 {
3762 .eraseblocks = { {4 * 1024, 512} },
3763 .block_erase = spi_block_erase_20,
3764 }, {
3765 .eraseblocks = { {32 * 1024, 64} },
3766 .block_erase = spi_block_erase_52,
3767 }, {
3768 .eraseblocks = { {64 * 1024, 32} },
3769 .block_erase = spi_block_erase_d8,
3770 }, {
3771 .eraseblocks = { {2 * 1024 * 1024, 1} },
3772 .block_erase = spi_block_erase_60,
3773 }, {
3774 .eraseblocks = { {2 * 1024 * 1024, 1} },
3775 .block_erase = spi_block_erase_c7,
3776 }
3777 },
3778 .printlock = spi_prettyprint_status_register_bp2_srwd,
3779 .unlock = spi_disable_blockprotect_bp2_srwd,
3780 .write = spi_chip_write_256,
3781 .read = spi_chip_read,
3782 .voltage = {2700, 3600},
Nico Huber3cddff42024-10-20 15:18:53 +02003783 .prepare_access = spi_prepare_io,
3784 .finish_access = spi_finish_io,
Christian Kudera475a7ee2021-04-20 22:50:01 +02003785 },
3786
3787 {
3788 .vendor = "Boya/BoHong Microelectronics",
Angel Pons1ebda782021-04-20 21:39:11 +02003789 .name = "B.25Q128AS",
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003790 .bustype = BUS_SPI,
Angel Pons1ebda782021-04-20 21:39:11 +02003791 .manufacture_id = BOYA_BOHONG_ID,
3792 .model_id = BOYA_BOHONG_B_25Q128AS,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003793 .total_size = 16384,
3794 .page_size = 256,
Nico Huber226bb872024-04-09 23:30:34 +02003795 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
3796 FEATURE_OTP | FEATURE_QIO,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003797 .tested = TEST_OK_PREW,
3798 .probe = probe_spi_rdid,
3799 .probe_timing = TIMING_ZERO,
3800 .block_erasers =
3801 {
3802 {
3803 .eraseblocks = { {4 * 1024, 4096} },
3804 .block_erase = spi_block_erase_20,
3805 }, {
3806 .eraseblocks = { {32 * 1024, 512} },
3807 .block_erase = spi_block_erase_52,
3808 }, {
3809 .eraseblocks = { {64 * 1024, 256} },
3810 .block_erase = spi_block_erase_d8,
3811 }, {
3812 .eraseblocks = { {16 * 1024 * 1024, 1} },
3813 .block_erase = spi_block_erase_60,
3814 }, {
3815 .eraseblocks = { {16 * 1024 * 1024, 1} },
3816 .block_erase = spi_block_erase_c7,
3817 }
3818 },
Nico Huber226bb872024-04-09 23:30:34 +02003819 .reg_bits =
3820 {
3821 .qe = {STATUS2, 1, RW},
3822 },
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003823 .printlock = spi_prettyprint_status_register_plain,
3824 .unlock = spi_disable_blockprotect_at25fs040,
3825 .write = spi_chip_write_256,
3826 .read = spi_chip_read,
3827 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02003828 .prepare_access = spi_prepare_io,
3829 .finish_access = spi_finish_io,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003830 },
3831
3832 {
Joshua Roysf1324e02010-09-16 00:51:51 +00003833 .vendor = "Bright",
3834 .name = "BM29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00003835 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +00003836 .manufacture_id = BRIGHT_ID,
3837 .model_id = BRIGHT_BM29F040,
3838 .total_size = 512,
3839 .page_size = 64 * 1024,
3840 .feature_bits = FEATURE_EITHER_RESET,
3841 .tested = TEST_OK_PR,
3842 .probe = probe_jedec,
3843 .probe_timing = TIMING_ZERO,
3844 .block_erasers =
3845 {
3846 {
3847 .eraseblocks = { {64 * 1024, 8} },
3848 .block_erase = erase_sector_jedec,
3849 }, {
3850 .eraseblocks = { {512 * 1024, 1} },
3851 .block_erase = erase_chip_block_jedec,
3852 },
3853 },
3854 .write = write_jedec_1,
3855 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00003856 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003857 .prepare_access = prepare_memory_access,
3858 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +00003859 },
3860
3861 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003862 .vendor = "Catalyst",
3863 .name = "CAT28F512",
3864 .bustype = BUS_PARALLEL,
3865 .manufacture_id = CATALYST_ID,
3866 .model_id = CATALYST_CAT28F512,
3867 .total_size = 64,
3868 .page_size = 0, /* unused */
3869 .feature_bits = 0,
Alan Green908adf42019-07-03 15:34:06 +10003870 .tested = {.probe = OK, .read = OK, .erase = BAD, .write = BAD},
Alan Green1f9cc7d2019-07-01 11:10:45 +10003871 .probe = probe_jedec, /* FIXME! */
3872 .probe_timing = TIMING_ZERO,
3873 .block_erasers =
3874 {
3875 {
3876 .eraseblocks = { {64 * 1024, 1} },
3877 .block_erase = NULL, /* TODO */
3878 },
3879 },
3880 .write = NULL, /* TODO */
3881 .read = read_memmapped,
3882 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01003883 .prepare_access = prepare_memory_access,
3884 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003885 },
3886
3887 {
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03003888 .vendor = "ENE",
3889 .name = "KB9012 (EDI)",
3890 .bustype = BUS_SPI,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03003891 .total_size = 128,
3892 .page_size = 128,
3893 .feature_bits = FEATURE_ERASED_ZERO,
3894 .tested = TEST_OK_PREW,
Alan Greenc1863ca2019-06-27 15:08:03 +10003895 .spi_cmd_set = SPI_EDI,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03003896 .probe = edi_probe_kb9012,
3897 .probe_timing = TIMING_ZERO,
3898 .block_erasers =
3899 {
3900 {
3901 .eraseblocks = { {128, 1024} },
3902 .block_erase = edi_chip_block_erase,
3903 },
3904 },
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03003905 .write = edi_chip_write,
3906 .read = edi_chip_read,
3907 .voltage = {2700, 3600},
Alan Greenc1863ca2019-06-27 15:08:03 +10003908 .gran = write_gran_128bytes,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03003909 },
3910
3911 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003912 .vendor = "ESI",
3913 .name = "ES25P16",
3914 .bustype = BUS_SPI,
3915 .manufacture_id = EXCEL_ID_NOPREFIX,
3916 .model_id = EXCEL_ES25P16,
3917 .total_size = 2 * 1024,
3918 .page_size = 256,
3919 /* 256-byte parameter page separate from memory array:
3920 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
3921 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00003922 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10003923 .probe = probe_spi_rdid,
3924 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00003925 .block_erasers =
3926 {
3927 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003928 .eraseblocks = { {64 * 1024, 32} },
3929 .block_erase = spi_block_erase_d8,
Sean Nelson54596372010-01-09 05:30:14 +00003930 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10003931 .eraseblocks = { {2 * 1024 * 1024, 1} },
3932 .block_erase = spi_block_erase_c7,
Sean Nelson54596372010-01-09 05:30:14 +00003933 }
3934 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10003935 .printlock = spi_prettyprint_status_register_bp2_srwd,
3936 .unlock = spi_disable_blockprotect_bp2_srwd,
3937 .write = spi_chip_write_256,
3938 .read = spi_chip_read, /* Fast Read (0x0B) supported */
3939 .voltage = {2700, 3600},
3940 },
3941
3942 {
3943 .vendor = "ESI",
3944 .name = "ES25P40",
3945 .bustype = BUS_SPI,
3946 .manufacture_id = EXCEL_ID_NOPREFIX,
3947 .model_id = EXCEL_ES25P40,
3948 .total_size = 512,
3949 .page_size = 256,
3950 /* 256-byte parameter page separate from memory array:
3951 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
3952 .feature_bits = FEATURE_WRSR_WREN,
3953 .tested = TEST_UNTESTED,
3954 .probe = probe_spi_rdid,
3955 .probe_timing = TIMING_ZERO,
3956 .block_erasers =
3957 {
3958 {
3959 .eraseblocks = { {64 * 1024, 8} },
3960 .block_erase = spi_block_erase_d8,
3961 }, {
3962 .eraseblocks = { {512 * 1024, 1} },
3963 .block_erase = spi_block_erase_c7,
3964 }
3965 },
3966 .printlock = spi_prettyprint_status_register_bp2_srwd,
3967 .unlock = spi_disable_blockprotect_bp2_srwd,
3968 .write = spi_chip_write_256,
3969 .read = spi_chip_read, /* Fast Read (0x0B) supported */
3970 .voltage = {2700, 3600},
3971 },
3972
3973 {
3974 .vendor = "ESI",
3975 .name = "ES25P80",
3976 .bustype = BUS_SPI,
3977 .manufacture_id = EXCEL_ID_NOPREFIX,
3978 .model_id = EXCEL_ES25P80,
3979 .total_size = 1024,
3980 .page_size = 256,
3981 /* 256-byte parameter page separate from memory array:
3982 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
3983 .feature_bits = FEATURE_WRSR_WREN,
3984 .tested = TEST_UNTESTED,
3985 .probe = probe_spi_rdid,
3986 .probe_timing = TIMING_ZERO,
3987 .block_erasers =
3988 {
3989 {
3990 .eraseblocks = { {64 * 1024, 16} },
3991 .block_erase = spi_block_erase_d8,
3992 }, {
3993 .eraseblocks = { {1024 * 1024, 1} },
3994 .block_erase = spi_block_erase_c7,
3995 }
3996 },
3997 .printlock = spi_prettyprint_status_register_bp2_srwd,
3998 .unlock = spi_disable_blockprotect_bp2_srwd,
3999 .write = spi_chip_write_256,
4000 .read = spi_chip_read, /* Fast Read (0x0B) supported */
4001 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00004002 },
4003
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00004004 {
Stefan Tauner352e50b2013-02-22 15:58:45 +00004005 .vendor = "ESMT",
Michael Karcher80a59ea2010-06-19 22:06:35 +00004006 .name = "F25L008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004007 .bustype = BUS_SPI,
Stefan Tauner352e50b2013-02-22 15:58:45 +00004008 .manufacture_id = ESMT_ID,
4009 .model_id = ESMT_F25L008A,
Michael Karcher80a59ea2010-06-19 22:06:35 +00004010 .total_size = 1024,
4011 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004012 .feature_bits = FEATURE_WRSR_EITHER,
Stefan Taunereb582572012-09-21 12:52:50 +00004013 .tested = TEST_OK_PREW,
Michael Karcher80a59ea2010-06-19 22:06:35 +00004014 .probe = probe_spi_rdid,
4015 .probe_timing = TIMING_ZERO,
4016 .block_erasers =
4017 {
4018 {
4019 .eraseblocks = { {4 * 1024, 256} },
4020 .block_erase = spi_block_erase_20,
4021 }, {
4022 .eraseblocks = { {64 * 1024, 16} },
4023 .block_erase = spi_block_erase_d8,
4024 }, {
4025 .eraseblocks = { {1024 * 1024, 1} },
4026 .block_erase = spi_block_erase_60,
4027 }, {
4028 .eraseblocks = { {1024 * 1024, 1} },
4029 .block_erase = spi_block_erase_c7,
4030 }
4031 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004032 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004033 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger9a795d82010-07-14 16:19:05 +00004034 .write = spi_chip_write_1,
Michael Karcher4497e862010-07-10 19:34:15 +00004035 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004036 .voltage = {2700, 3600},
Michael Karcher80a59ea2010-06-19 22:06:35 +00004037 },
4038
4039 {
Stefan Tauner85f09f72014-05-27 21:27:14 +00004040 .vendor = "ESMT",
4041 .name = "F25L32PA",
4042 .bustype = BUS_SPI,
4043 .manufacture_id = ESMT_ID,
4044 .model_id = ESMT_F25L32PA,
4045 .total_size = 4096,
4046 .page_size = 256,
4047 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP,
4048 .tested = TEST_UNTESTED,
4049 .probe = probe_spi_rdid,
4050 .probe_timing = TIMING_ZERO,
4051 .block_erasers =
4052 {
4053 {
4054 .eraseblocks = { {4 * 1024, 1024} },
4055 .block_erase = spi_block_erase_20,
4056 }, {
4057 .eraseblocks = { {64 * 1024, 64} },
4058 .block_erase = spi_block_erase_d8,
4059 }, {
4060 .eraseblocks = { {4 * 1024 * 1024, 1} },
4061 .block_erase = spi_block_erase_60,
4062 }, {
4063 .eraseblocks = { {4 * 1024 * 1024, 1} },
4064 .block_erase = spi_block_erase_c7,
4065 }
4066 },
4067 .printlock = spi_prettyprint_status_register_bp2_bpl,
4068 .unlock = spi_disable_blockprotect,
4069 .write = spi_chip_write_256,
4070 .read = spi_chip_read,
4071 .voltage = {2700, 3600},
4072 },
4073
4074 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004075 .vendor = "ESMT",
4076 .name = "F49B002UA",
4077 .bustype = BUS_PARALLEL,
4078 .manufacture_id = ESMT_ID,
4079 .model_id = ESMT_F49B002UA,
4080 .total_size = 256,
4081 .page_size = 4096,
4082 .feature_bits = FEATURE_EITHER_RESET,
4083 .tested = TEST_UNTESTED,
4084 .probe = probe_jedec,
4085 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
4086 .block_erasers =
4087 {
4088 {
4089 .eraseblocks = {
4090 {128 * 1024, 1},
4091 {96 * 1024, 1},
4092 {8 * 1024, 2},
4093 {16 * 1024, 1},
4094 },
4095 .block_erase = erase_sector_jedec,
4096 }, {
4097 .eraseblocks = { {256 * 1024, 1} },
4098 .block_erase = erase_chip_block_jedec,
4099 }
4100 },
4101 .write = write_jedec_1,
4102 .read = read_memmapped,
4103 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01004104 .prepare_access = prepare_memory_access,
4105 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004106 },
4107
4108 {
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004109 .vendor = "Eon",
4110 .name = "EN25B05",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004111 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004112 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004113 .model_id = EON_EN25B05,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004114 .total_size = 64,
4115 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004116 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004117 .tested = TEST_UNTESTED,
4118 .probe = probe_spi_rdid,
4119 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004120 .block_erasers =
4121 {
4122 {
4123 .eraseblocks = {
4124 {4 * 1024, 2},
4125 {8 * 1024, 1},
4126 {16 * 1024, 1},
4127 {32 * 1024, 1},
4128 },
4129 .block_erase = spi_block_erase_d8,
4130 }, {
4131 .eraseblocks = { {64 * 1024, 1} },
4132 .block_erase = spi_block_erase_c7,
4133 }
4134 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004135 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004136 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004137 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004138 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004139 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004140 },
4141
4142 {
4143 .vendor = "Eon",
4144 .name = "EN25B05T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004145 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004146 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004147 .model_id = EON_EN25B05,
Sean Nelson54596372010-01-09 05:30:14 +00004148 .total_size = 64,
4149 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004150 .feature_bits = FEATURE_WRSR_WREN,
Sean Nelson54596372010-01-09 05:30:14 +00004151 .tested = TEST_UNTESTED,
4152 .probe = probe_spi_rdid,
4153 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004154 .block_erasers =
4155 {
4156 {
4157 .eraseblocks = {
4158 {32 * 1024, 1},
4159 {16 * 1024, 1},
4160 {8 * 1024, 1},
4161 {4 * 1024, 2},
4162 },
4163 .block_erase = spi_block_erase_d8,
4164 }, {
4165 .eraseblocks = { {64 * 1024, 1} },
4166 .block_erase = spi_block_erase_c7,
4167 }
4168 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004169 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004170 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004171 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004172 .read = spi_chip_read, /* Fast read (0x0B) supported */
4173 .voltage = {2700, 3600},
4174 },
4175
4176 {
4177 .vendor = "Eon",
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004178 .name = "EN25B10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004179 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004180 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004181 .model_id = EON_EN25B10,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004182 .total_size = 128,
4183 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004184 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004185 .tested = TEST_UNTESTED,
4186 .probe = probe_spi_rdid,
4187 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004188 .block_erasers =
4189 {
4190 {
4191 .eraseblocks = {
4192 {4 * 1024, 2},
4193 {8 * 1024, 1},
4194 {16 * 1024, 1},
4195 {32 * 1024, 3},
4196 },
4197 .block_erase = spi_block_erase_d8,
4198 }, {
4199 .eraseblocks = { {128 * 1024, 1} },
4200 .block_erase = spi_block_erase_c7,
4201 }
4202 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004203 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004204 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004205 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004206 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004207 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004208 },
4209
4210 {
4211 .vendor = "Eon",
4212 .name = "EN25B10T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004213 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004214 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004215 .model_id = EON_EN25B10,
Sean Nelson54596372010-01-09 05:30:14 +00004216 .total_size = 128,
4217 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004218 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00004219 .tested = TEST_OK_PREW,
Sean Nelson54596372010-01-09 05:30:14 +00004220 .probe = probe_spi_rdid,
4221 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004222 .block_erasers =
4223 {
4224 {
4225 .eraseblocks = {
4226 {32 * 1024, 3},
4227 {16 * 1024, 1},
4228 {8 * 1024, 1},
4229 {4 * 1024, 2},
4230 },
4231 .block_erase = spi_block_erase_d8,
4232 }, {
4233 .eraseblocks = { {128 * 1024, 1} },
4234 .block_erase = spi_block_erase_c7,
4235 }
4236 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004237 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004238 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004239 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004240 .read = spi_chip_read, /* Fast read (0x0B) supported */
4241 .voltage = {2700, 3600},
4242 },
4243
4244 {
4245 .vendor = "Eon",
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004246 .name = "EN25B16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004247 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004248 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004249 .model_id = EON_EN25B16,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004250 .total_size = 2048,
4251 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004252 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004253 .tested = TEST_UNTESTED,
4254 .probe = probe_spi_rdid,
4255 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004256 .block_erasers =
4257 {
4258 {
4259 .eraseblocks = {
4260 {4 * 1024, 2},
4261 {8 * 1024, 1},
4262 {16 * 1024, 1},
4263 {32 * 1024, 1},
4264 {64 * 1024, 31},
4265 },
4266 .block_erase = spi_block_erase_d8,
4267 }, {
4268 .eraseblocks = { {2 * 1024 * 1024, 1} },
4269 .block_erase = spi_block_erase_c7,
4270 }
4271 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004272 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004273 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004274 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004275 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004276 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004277 },
4278
4279 {
4280 .vendor = "Eon",
4281 .name = "EN25B16T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004282 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004283 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004284 .model_id = EON_EN25B16,
Sean Nelson54596372010-01-09 05:30:14 +00004285 .total_size = 2048,
4286 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004287 .feature_bits = FEATURE_WRSR_WREN,
Sean Nelson54596372010-01-09 05:30:14 +00004288 .tested = TEST_UNTESTED,
4289 .probe = probe_spi_rdid,
4290 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004291 .block_erasers =
4292 {
4293 {
4294 .eraseblocks = {
4295 {64 * 1024, 31},
4296 {32 * 1024, 1},
4297 {16 * 1024, 1},
4298 {8 * 1024, 1},
4299 {4 * 1024, 2},
4300 },
4301 .block_erase = spi_block_erase_d8,
4302 }, {
4303 .eraseblocks = { {2 * 1024 * 1024, 1} },
4304 .block_erase = spi_block_erase_c7,
4305 }
4306 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004307 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004308 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004309 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004310 .read = spi_chip_read, /* Fast read (0x0B) supported */
4311 .voltage = {2700, 3600},
4312 },
4313
4314 {
4315 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004316 .name = "EN25B20",
Stefan Taunerb175af52015-01-24 15:06:27 +00004317 .bustype = BUS_SPI,
4318 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004319 .model_id = EON_EN25B20,
4320 .total_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004321 .page_size = 256,
4322 .feature_bits = FEATURE_WRSR_WREN,
4323 .tested = TEST_UNTESTED,
4324 .probe = probe_spi_rdid,
4325 .probe_timing = TIMING_ZERO,
4326 .block_erasers =
4327 {
4328 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004329 .eraseblocks = {
4330 {4 * 1024, 2},
4331 {8 * 1024, 1},
4332 {16 * 1024, 1},
4333 {32 * 1024, 1},
4334 {64 * 1024, 3}
4335 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004336 .block_erase = spi_block_erase_d8,
4337 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004338 .eraseblocks = { {256 * 1024, 1} },
4339 .block_erase = spi_block_erase_c7,
4340 }
4341 },
4342 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4343 .unlock = spi_disable_blockprotect,
4344 .write = spi_chip_write_256,
4345 .read = spi_chip_read, /* Fast read (0x0B) supported */
4346 .voltage = {2700, 3600},
4347 },
4348
4349 {
4350 .vendor = "Eon",
4351 .name = "EN25B20T",
4352 .bustype = BUS_SPI,
4353 .manufacture_id = EON_ID_NOPREFIX,
4354 .model_id = EON_EN25B20,
4355 .total_size = 256,
4356 .page_size = 256,
4357 .feature_bits = FEATURE_WRSR_WREN,
4358 .tested = TEST_UNTESTED,
4359 .probe = probe_spi_rdid,
4360 .probe_timing = TIMING_ZERO,
4361 .block_erasers =
4362 {
4363 {
4364 .eraseblocks = {
4365 {64 * 1024, 3},
4366 {32 * 1024, 1},
4367 {16 * 1024, 1},
4368 {8 * 1024, 1},
4369 {4 * 1024, 2},
4370 },
4371 .block_erase = spi_block_erase_d8,
4372 }, {
4373 .eraseblocks = { {256 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004374 .block_erase = spi_block_erase_c7,
4375 }
4376 },
4377 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4378 .unlock = spi_disable_blockprotect,
4379 .write = spi_chip_write_256,
4380 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004381 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004382 },
4383
4384 {
4385 .vendor = "Eon",
4386 .name = "EN25B32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004387 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004388 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004389 .model_id = EON_EN25B32,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004390 .total_size = 4096,
4391 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004392 /* OTP: 512B total; enter 0x3A */
4393 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004394 .tested = TEST_UNTESTED,
4395 .probe = probe_spi_rdid,
4396 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004397 .block_erasers =
4398 {
4399 {
4400 .eraseblocks = {
4401 {4 * 1024, 2},
4402 {8 * 1024, 1},
4403 {16 * 1024, 1},
4404 {32 * 1024, 1},
4405 {64 * 1024, 63},
4406 },
4407 .block_erase = spi_block_erase_d8,
4408 }, {
4409 .eraseblocks = { {4 * 1024 * 1024, 1} },
4410 .block_erase = spi_block_erase_c7,
4411 }
4412 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004413 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004414 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004415 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004416 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004417 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004418 },
4419
4420 {
4421 .vendor = "Eon",
4422 .name = "EN25B32T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004423 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004424 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004425 .model_id = EON_EN25B32,
Sean Nelson54596372010-01-09 05:30:14 +00004426 .total_size = 4096,
4427 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004428 /* OTP: 512B total; enter 0x3A */
4429 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Sean Nelson54596372010-01-09 05:30:14 +00004430 .tested = TEST_UNTESTED,
4431 .probe = probe_spi_rdid,
4432 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004433 .block_erasers =
4434 {
4435 {
4436 .eraseblocks = {
4437 {64 * 1024, 63},
4438 {32 * 1024, 1},
4439 {16 * 1024, 1},
4440 {8 * 1024, 1},
4441 {4 * 1024, 2},
4442 },
4443 .block_erase = spi_block_erase_d8,
4444 }, {
4445 .eraseblocks = { {4 * 1024 * 1024, 1} },
4446 .block_erase = spi_block_erase_c7,
4447 }
4448 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004449 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004450 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004451 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004452 .read = spi_chip_read, /* Fast read (0x0B) supported */
4453 .voltage = {2700, 3600},
4454 },
4455
4456 {
4457 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004458 .name = "EN25B40",
Stefan Taunerb175af52015-01-24 15:06:27 +00004459 .bustype = BUS_SPI,
4460 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004461 .model_id = EON_EN25B40,
4462 .total_size = 512,
Stefan Taunerb175af52015-01-24 15:06:27 +00004463 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004464 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerb175af52015-01-24 15:06:27 +00004465 .tested = TEST_UNTESTED,
4466 .probe = probe_spi_rdid,
4467 .probe_timing = TIMING_ZERO,
4468 .block_erasers =
4469 {
4470 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004471 .eraseblocks = {
4472 {4 * 1024, 2},
4473 {8 * 1024, 1},
4474 {16 * 1024, 1},
4475 {32 * 1024, 1},
4476 {64 * 1024, 7}
4477 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004478 .block_erase = spi_block_erase_d8,
4479 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004480 .eraseblocks = { {512 * 1024, 1} },
4481 .block_erase = spi_block_erase_c7,
4482 }
4483 },
4484 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4485 .unlock = spi_disable_blockprotect,
4486 .write = spi_chip_write_256,
4487 .read = spi_chip_read, /* Fast read (0x0B) supported */
4488 .voltage = {2700, 3600},
4489 },
4490
4491 {
4492 .vendor = "Eon",
4493 .name = "EN25B40T",
4494 .bustype = BUS_SPI,
4495 .manufacture_id = EON_ID_NOPREFIX,
4496 .model_id = EON_EN25B40,
4497 .total_size = 512,
4498 .page_size = 256,
4499 .feature_bits = FEATURE_WRSR_WREN,
4500 .tested = TEST_UNTESTED,
4501 .probe = probe_spi_rdid,
4502 .probe_timing = TIMING_ZERO,
4503 .block_erasers =
4504 {
4505 {
4506 .eraseblocks = {
4507 {64 * 1024, 7},
4508 {32 * 1024, 1},
4509 {16 * 1024, 1},
4510 {8 * 1024, 1},
4511 {4 * 1024, 2},
4512 },
4513 .block_erase = spi_block_erase_d8,
4514 }, {
4515 .eraseblocks = { {512 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004516 .block_erase = spi_block_erase_c7,
4517 }
4518 },
4519 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4520 .unlock = spi_disable_blockprotect,
4521 .write = spi_chip_write_256,
4522 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004523 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004524 },
4525
4526 {
4527 .vendor = "Eon",
4528 .name = "EN25B64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004529 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004530 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004531 .model_id = EON_EN25B64,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004532 .total_size = 8192,
4533 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004534 /* OTP: 512B total; enter 0x3A */
4535 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004536 .tested = TEST_UNTESTED,
4537 .probe = probe_spi_rdid,
4538 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004539 .block_erasers =
4540 {
4541 {
4542 .eraseblocks = {
4543 {4 * 1024, 2},
4544 {8 * 1024, 1},
4545 {16 * 1024, 1},
4546 {32 * 1024, 1},
4547 {64 * 1024, 127},
4548 },
4549 .block_erase = spi_block_erase_d8,
4550 }, {
4551 .eraseblocks = { {8 * 1024 * 1024, 1} },
4552 .block_erase = spi_block_erase_c7,
4553 }
4554 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004555 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004556 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004557 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004558 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004559 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004560 },
4561
4562 {
4563 .vendor = "Eon",
4564 .name = "EN25B64T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004565 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004566 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004567 .model_id = EON_EN25B64,
Sean Nelson54596372010-01-09 05:30:14 +00004568 .total_size = 8192,
4569 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004570 /* OTP: 512B total; enter 0x3A */
4571 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Sean Nelson54596372010-01-09 05:30:14 +00004572 .tested = TEST_UNTESTED,
4573 .probe = probe_spi_rdid,
4574 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004575 .block_erasers =
4576 {
4577 {
4578 .eraseblocks = {
4579 {64 * 1024, 127},
4580 {32 * 1024, 1},
4581 {16 * 1024, 1},
4582 {8 * 1024, 1},
4583 {4 * 1024, 2},
4584 },
4585 .block_erase = spi_block_erase_d8,
4586 }, {
4587 .eraseblocks = { {8 * 1024 * 1024, 1} },
4588 .block_erase = spi_block_erase_c7,
4589 }
4590 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004591 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004592 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004593 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004594 .read = spi_chip_read, /* Fast read (0x0B) supported */
4595 .voltage = {2700, 3600},
4596 },
4597
4598 {
4599 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004600 .name = "EN25B80",
Stefan Taunerb175af52015-01-24 15:06:27 +00004601 .bustype = BUS_SPI,
4602 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004603 .model_id = EON_EN25B80,
4604 .total_size = 1024,
Stefan Taunerb175af52015-01-24 15:06:27 +00004605 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004606 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerb175af52015-01-24 15:06:27 +00004607 .tested = TEST_UNTESTED,
4608 .probe = probe_spi_rdid,
4609 .probe_timing = TIMING_ZERO,
4610 .block_erasers =
4611 {
4612 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004613 .eraseblocks = {
4614 {4 * 1024, 2},
4615 {8 * 1024, 1},
4616 {16 * 1024, 1},
4617 {32 * 1024, 1},
4618 {64 * 1024, 15}
4619 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004620 .block_erase = spi_block_erase_d8,
4621 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004622 .eraseblocks = { {1024 * 1024, 1} },
4623 .block_erase = spi_block_erase_c7,
4624 }
4625 },
4626 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4627 .unlock = spi_disable_blockprotect,
4628 .write = spi_chip_write_256,
4629 .read = spi_chip_read, /* Fast read (0x0B) supported */
4630 .voltage = {2700, 3600},
4631 },
4632
4633 {
4634 .vendor = "Eon",
4635 .name = "EN25B80T",
4636 .bustype = BUS_SPI,
4637 .manufacture_id = EON_ID_NOPREFIX,
4638 .model_id = EON_EN25B80,
4639 .total_size = 1024,
4640 .page_size = 256,
4641 .feature_bits = FEATURE_WRSR_WREN,
4642 .tested = TEST_UNTESTED,
4643 .probe = probe_spi_rdid,
4644 .probe_timing = TIMING_ZERO,
4645 .block_erasers =
4646 {
4647 {
4648 .eraseblocks = {
4649 {64 * 1024, 15},
4650 {32 * 1024, 1},
4651 {16 * 1024, 1},
4652 {8 * 1024, 1},
4653 {4 * 1024, 2},
4654 },
4655 .block_erase = spi_block_erase_d8,
4656 }, {
4657 .eraseblocks = { {1024 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004658 .block_erase = spi_block_erase_c7,
4659 }
4660 },
4661 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4662 .unlock = spi_disable_blockprotect,
4663 .write = spi_chip_write_256,
4664 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004665 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004666 },
4667
4668 {
4669 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004670 .name = "EN25F05",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004671 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004672 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004673 .model_id = EON_EN25F05,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004674 .total_size = 64,
4675 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004676 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00004677 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004678 .probe = probe_spi_rdid,
4679 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004680 .block_erasers =
4681 {
4682 {
4683 .eraseblocks = { {4 * 1024, 16} },
4684 .block_erase = spi_block_erase_20,
4685 }, {
4686 .eraseblocks = { {32 * 1024, 2} },
4687 .block_erase = spi_block_erase_d8,
4688 }, {
4689 .eraseblocks = { {32 * 1024, 2} },
4690 .block_erase = spi_block_erase_52,
4691 }, {
4692 .eraseblocks = { {64 * 1024, 1} },
4693 .block_erase = spi_block_erase_60,
4694 }, {
4695 .eraseblocks = { {64 * 1024, 1} },
4696 .block_erase = spi_block_erase_c7,
4697 }
4698 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004699 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004700 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004701 .write = spi_chip_write_256,
4702 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004703 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004704 },
4705
4706 {
4707 .vendor = "Eon",
4708 .name = "EN25F10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004709 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004710 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004711 .model_id = EON_EN25F10,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004712 .total_size = 128,
4713 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004714 .feature_bits = FEATURE_WRSR_WREN,
Simon Buhrowd173ed42021-09-29 09:28:07 +02004715 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004716 .probe = probe_spi_rdid,
4717 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004718 .block_erasers =
4719 {
4720 {
4721 .eraseblocks = { {4 * 1024, 32} },
4722 .block_erase = spi_block_erase_20,
4723 }, {
4724 .eraseblocks = { {32 * 1024, 4} },
4725 .block_erase = spi_block_erase_d8,
4726 }, {
4727 .eraseblocks = { {32 * 1024, 4} },
4728 .block_erase = spi_block_erase_52,
4729 }, {
4730 .eraseblocks = { {128 * 1024, 1} },
4731 .block_erase = spi_block_erase_60,
4732 }, {
4733 .eraseblocks = { {128 * 1024, 1} },
4734 .block_erase = spi_block_erase_c7,
4735 }
4736 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004737 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004738 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004739 .write = spi_chip_write_256,
4740 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004741 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004742 },
4743
4744 {
4745 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004746 .name = "EN25F16",
4747 .bustype = BUS_SPI,
4748 .manufacture_id = EON_ID_NOPREFIX,
4749 .model_id = EON_EN25F16,
4750 .total_size = 2048,
4751 .page_size = 256,
4752 .feature_bits = FEATURE_WRSR_WREN,
4753 .tested = TEST_OK_PREW,
4754 .probe = probe_spi_rdid,
4755 .probe_timing = TIMING_ZERO,
4756 .block_erasers =
4757 {
4758 {
4759 .eraseblocks = { {4 * 1024, 512} },
4760 .block_erase = spi_block_erase_20,
4761 }, {
4762 .eraseblocks = { {64 * 1024, 32} },
4763 .block_erase = spi_block_erase_d8,
4764 }, {
4765 .eraseblocks = { {2 * 1024 * 1024, 1} },
4766 .block_erase = spi_block_erase_60,
4767 }, {
4768 .eraseblocks = { {2 * 1024 * 1024, 1} },
4769 .block_erase = spi_block_erase_c7,
4770 }
4771 },
4772 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4773 .unlock = spi_disable_blockprotect,
4774 .write = spi_chip_write_256,
4775 .read = spi_chip_read,
4776 .voltage = {2700, 3600},
4777 },
4778
4779 {
4780 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004781 .name = "EN25F20",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004782 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004783 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004784 .model_id = EON_EN25F20,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004785 .total_size = 256,
4786 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004787 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004788 .tested = TEST_UNTESTED,
4789 .probe = probe_spi_rdid,
4790 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004791 .block_erasers =
4792 {
4793 {
4794 .eraseblocks = { {4 * 1024, 64} },
4795 .block_erase = spi_block_erase_20,
4796 }, {
4797 .eraseblocks = { {64 * 1024, 4} },
4798 .block_erase = spi_block_erase_d8,
4799 }, {
4800 .eraseblocks = { {64 * 1024, 4} },
4801 .block_erase = spi_block_erase_52,
4802 }, {
4803 .eraseblocks = { {256 * 1024, 1} },
4804 .block_erase = spi_block_erase_60,
4805 }, {
4806 .eraseblocks = { {256 * 1024, 1} },
4807 .block_erase = spi_block_erase_c7,
4808 }
4809 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004810 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004811 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004812 .write = spi_chip_write_256,
4813 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004814 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004815 },
4816
4817 {
4818 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004819 .name = "EN25F32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004820 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004821 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004822 .model_id = EON_EN25F32,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004823 .total_size = 4096,
4824 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004825 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner5c316f92015-02-08 21:57:52 +00004826 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004827 .probe = probe_spi_rdid,
4828 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004829 .block_erasers =
4830 {
4831 {
4832 .eraseblocks = { {4 * 1024, 1024} },
4833 .block_erase = spi_block_erase_20,
4834 }, {
4835 .eraseblocks = { {64 * 1024, 64} },
4836 .block_erase = spi_block_erase_d8,
4837 }, {
4838 .eraseblocks = { {4 * 1024 * 1024, 1} },
4839 .block_erase = spi_block_erase_60,
4840 }, {
4841 .eraseblocks = { {4 * 1024 * 1024, 1} },
4842 .block_erase = spi_block_erase_c7,
4843 }
4844 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004845 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004846 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004847 .write = spi_chip_write_256,
4848 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004849 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004850 },
4851
4852 {
Russ Dill3cd5a122010-03-05 08:44:11 +00004853 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004854 .name = "EN25F40",
4855 .bustype = BUS_SPI,
4856 .manufacture_id = EON_ID_NOPREFIX,
4857 .model_id = EON_EN25F40,
4858 .total_size = 512,
4859 .page_size = 256,
4860 .feature_bits = FEATURE_WRSR_WREN,
4861 .tested = TEST_OK_PREW,
4862 .probe = probe_spi_rdid,
4863 .probe_timing = TIMING_ZERO,
4864 .block_erasers =
4865 {
4866 {
4867 .eraseblocks = { {4 * 1024, 128} },
4868 .block_erase = spi_block_erase_20,
4869 }, {
4870 .eraseblocks = { {64 * 1024, 8} },
4871 .block_erase = spi_block_erase_d8,
4872 }, {
4873 .eraseblocks = { {512 * 1024, 1} },
4874 .block_erase = spi_block_erase_60,
4875 }, {
4876 .eraseblocks = { {512 * 1024, 1} },
4877 .block_erase = spi_block_erase_c7,
4878 },
4879 },
4880 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4881 .unlock = spi_disable_blockprotect,
4882 .write = spi_chip_write_256,
4883 .read = spi_chip_read,
4884 .voltage = {2700, 3600},
4885 },
4886
4887 {
4888 .vendor = "Eon",
Stefan Taunerd932fd02012-09-06 17:37:16 +00004889 .name = "EN25F64",
4890 .bustype = BUS_SPI,
4891 .manufacture_id = EON_ID_NOPREFIX,
Stefan Taunerd7d423b2012-10-20 09:13:16 +00004892 .model_id = EON_EN25F64,
Stefan Taunerd932fd02012-09-06 17:37:16 +00004893 .total_size = 8192,
4894 .page_size = 256,
4895 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunere34e3e82013-01-01 00:06:51 +00004896 .tested = TEST_OK_PREW,
Stefan Taunerd932fd02012-09-06 17:37:16 +00004897 .probe = probe_spi_rdid,
4898 .probe_timing = TIMING_ZERO,
4899 .block_erasers =
4900 {
4901 {
4902 .eraseblocks = { {4 * 1024, 2048} },
4903 .block_erase = spi_block_erase_20,
4904 }, {
4905 .eraseblocks = { {64 * 1024, 128} },
4906 .block_erase = spi_block_erase_d8,
4907 }, {
4908 .eraseblocks = { {8 * 1024 * 1024, 1} },
4909 .block_erase = spi_block_erase_60,
4910 }, {
4911 .eraseblocks = { {8 * 1024 * 1024, 1} },
4912 .block_erase = spi_block_erase_c7,
4913 }
4914 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004915 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Stefan Taunerd932fd02012-09-06 17:37:16 +00004916 .unlock = spi_disable_blockprotect,
4917 .write = spi_chip_write_256,
4918 .read = spi_chip_read,
4919 .voltage = {2700, 3600},
4920 },
4921
4922 {
4923 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004924 .name = "EN25F80",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004925 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00004926 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004927 .model_id = EON_EN25F80,
David Hendricks6d715302011-07-24 22:21:57 +00004928 .total_size = 1024,
4929 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004930 .feature_bits = FEATURE_WRSR_WREN,
4931 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00004932 .probe = probe_spi_rdid,
4933 .probe_timing = TIMING_ZERO,
4934 .block_erasers =
4935 {
4936 {
4937 .eraseblocks = { {4 * 1024, 256} },
4938 .block_erase = spi_block_erase_20,
4939 }, {
4940 .eraseblocks = { {64 * 1024, 16} },
4941 .block_erase = spi_block_erase_d8,
4942 }, {
4943 .eraseblocks = { {1024 * 1024, 1} },
4944 .block_erase = spi_block_erase_60,
4945 }, {
4946 .eraseblocks = { {1024 * 1024, 1} },
4947 .block_erase = spi_block_erase_c7,
4948 }
4949 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004950 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00004951 .unlock = spi_disable_blockprotect,
4952 .write = spi_chip_write_256,
4953 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00004954 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00004955 },
4956
4957 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004958 .vendor = "Eon",
4959 .name = "EN25P05",
4960 .bustype = BUS_SPI,
4961 .manufacture_id = EON_ID_NOPREFIX,
4962 .model_id = EON_EN25B05,
4963 .total_size = 64,
4964 .page_size = 256,
4965 .feature_bits = FEATURE_WRSR_WREN,
4966 .tested = TEST_UNTESTED,
4967 .probe = probe_spi_rdid,
4968 .probe_timing = TIMING_ZERO,
4969 .block_erasers =
4970 {
4971 {
4972 .eraseblocks = {
4973 {32 * 1024, 2} },
4974 .block_erase = spi_block_erase_d8,
4975 }, {
4976 .eraseblocks = { {64 * 1024, 1} },
4977 .block_erase = spi_block_erase_c7,
4978 }
4979 },
4980 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4981 .unlock = spi_disable_blockprotect,
4982 .write = spi_chip_write_256,
4983 .read = spi_chip_read, /* Fast read (0x0B) supported */
4984 .voltage = {2700, 3600},
4985 },
4986
4987 {
4988 .vendor = "Eon",
4989 .name = "EN25P10",
4990 .bustype = BUS_SPI,
4991 .manufacture_id = EON_ID_NOPREFIX,
4992 .model_id = EON_EN25B10,
4993 .total_size = 128,
4994 .page_size = 256,
4995 .feature_bits = FEATURE_WRSR_WREN,
4996 .tested = TEST_UNTESTED,
4997 .probe = probe_spi_rdid,
4998 .probe_timing = TIMING_ZERO,
4999 .block_erasers =
5000 {
5001 {
5002 .eraseblocks = { {32 * 1024, 4} },
5003 .block_erase = spi_block_erase_d8,
5004 }, {
5005 .eraseblocks = { {128 * 1024, 1} },
5006 .block_erase = spi_block_erase_c7,
5007 }
5008 },
5009 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5010 .unlock = spi_disable_blockprotect,
5011 .write = spi_chip_write_256,
5012 .read = spi_chip_read, /* Fast read (0x0B) supported */
5013 .voltage = {2700, 3600},
5014 },
5015
5016 {
5017 .vendor = "Eon",
5018 .name = "EN25P16",
5019 .bustype = BUS_SPI,
5020 .manufacture_id = EON_ID_NOPREFIX,
5021 .model_id = EON_EN25B16,
5022 .total_size = 2048,
5023 .page_size = 256,
5024 .feature_bits = FEATURE_WRSR_WREN,
5025 .tested = TEST_UNTESTED,
5026 .probe = probe_spi_rdid,
5027 .probe_timing = TIMING_ZERO,
5028 .block_erasers =
5029 {
5030 {
5031 .eraseblocks = { {64 * 1024, 32} },
5032 .block_erase = spi_block_erase_d8,
5033 }, {
5034 .eraseblocks = { {2 * 1024 * 1024, 1} },
5035 .block_erase = spi_block_erase_c7,
5036 }
5037 },
5038 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5039 .unlock = spi_disable_blockprotect,
5040 .write = spi_chip_write_256,
5041 .read = spi_chip_read, /* Fast read (0x0B) supported */
5042 .voltage = {2700, 3600},
5043 },
5044
5045 {
5046 .vendor = "Eon",
5047 .name = "EN25P20",
5048 .bustype = BUS_SPI,
5049 .manufacture_id = EON_ID_NOPREFIX,
5050 .model_id = EON_EN25B20,
5051 .total_size = 256,
5052 .page_size = 256,
5053 .feature_bits = FEATURE_WRSR_WREN,
5054 .tested = TEST_UNTESTED,
5055 .probe = probe_spi_rdid,
5056 .probe_timing = TIMING_ZERO,
5057 .block_erasers =
5058 {
5059 {
5060 .eraseblocks = { {64 * 1024, 4} },
5061 .block_erase = spi_block_erase_d8,
5062 }, {
5063 .eraseblocks = { {256 * 1024, 1} },
5064 .block_erase = spi_block_erase_c7,
5065 }
5066 },
5067 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5068 .unlock = spi_disable_blockprotect,
5069 .write = spi_chip_write_256,
5070 .read = spi_chip_read, /* Fast read (0x0B) supported */
5071 .voltage = {2700, 3600},
5072 },
5073
5074 {
5075 .vendor = "Eon",
5076 .name = "EN25P32", /* Uniform version of EN25B32 */
5077 .bustype = BUS_SPI,
5078 .manufacture_id = EON_ID_NOPREFIX,
5079 .model_id = EON_EN25B32,
5080 .total_size = 4096,
5081 .page_size = 256,
5082 /* OTP: 512B total; enter 0x3A */
5083 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5084 .tested = TEST_UNTESTED,
5085 .probe = probe_spi_rdid,
5086 .probe_timing = TIMING_ZERO,
5087 .block_erasers =
5088 {
5089 {
5090 .eraseblocks = { {64 * 1024, 64} },
5091 .block_erase = spi_block_erase_d8,
5092 }, {
5093 .eraseblocks = { {4 * 1024 * 1024, 1} },
5094 .block_erase = spi_block_erase_c7,
5095 }
5096 },
5097 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5098 .unlock = spi_disable_blockprotect,
5099 .write = spi_chip_write_256,
5100 .read = spi_chip_read, /* Fast read (0x0B) supported */
5101 .voltage = {2700, 3600},
5102 },
5103
5104 {
5105 .vendor = "Eon",
5106 .name = "EN25P40",
5107 .bustype = BUS_SPI,
5108 .manufacture_id = EON_ID_NOPREFIX,
5109 .model_id = EON_EN25B40,
5110 .total_size = 512,
5111 .page_size = 256,
5112 .feature_bits = FEATURE_WRSR_WREN,
5113 .tested = TEST_UNTESTED,
5114 .probe = probe_spi_rdid,
5115 .probe_timing = TIMING_ZERO,
5116 .block_erasers =
5117 {
5118 {
5119 .eraseblocks = { {64 * 1024, 8} },
5120 .block_erase = spi_block_erase_d8,
5121 }, {
5122 .eraseblocks = { {512 * 1024, 1} },
5123 .block_erase = spi_block_erase_c7,
5124 }
5125 },
5126 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5127 .unlock = spi_disable_blockprotect,
5128 .write = spi_chip_write_256,
5129 .read = spi_chip_read, /* Fast read (0x0B) supported */
5130 .voltage = {2700, 3600},
5131 },
5132
5133 {
5134 .vendor = "Eon",
5135 .name = "EN25P64",
5136 .bustype = BUS_SPI,
5137 .manufacture_id = EON_ID_NOPREFIX,
5138 .model_id = EON_EN25B64,
5139 .total_size = 8192,
5140 .page_size = 256,
5141 /* OTP: 512B total; enter 0x3A */
5142 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5143 .tested = TEST_UNTESTED,
5144 .probe = probe_spi_rdid,
5145 .probe_timing = TIMING_ZERO,
5146 .block_erasers =
5147 {
5148 {
5149 .eraseblocks = { {64 * 1024, 128} },
5150 .block_erase = spi_block_erase_d8,
5151 }, {
5152 .eraseblocks = { {8 * 1024 * 1024, 1} },
5153 .block_erase = spi_block_erase_c7,
5154 }
5155 },
5156 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5157 .unlock = spi_disable_blockprotect,
5158 .write = spi_chip_write_256,
5159 .read = spi_chip_read, /* Fast read (0x0B) supported */
5160 .voltage = {2700, 3600},
5161 },
5162
5163 {
5164 .vendor = "Eon",
5165 .name = "EN25P80",
5166 .bustype = BUS_SPI,
5167 .manufacture_id = EON_ID_NOPREFIX,
5168 .model_id = EON_EN25B80,
5169 .total_size = 1024,
5170 .page_size = 256,
5171 .feature_bits = FEATURE_WRSR_WREN,
5172 .tested = TEST_UNTESTED,
5173 .probe = probe_spi_rdid,
5174 .probe_timing = TIMING_ZERO,
5175 .block_erasers =
5176 {
5177 {
5178 .eraseblocks = { {64 * 1024, 16} },
5179 .block_erase = spi_block_erase_d8,
5180 }, {
5181 .eraseblocks = { {1024 * 1024, 1} },
5182 .block_erase = spi_block_erase_c7,
5183 }
5184 },
5185 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5186 .unlock = spi_disable_blockprotect,
5187 .write = spi_chip_write_256,
5188 .read = spi_chip_read, /* Fast read (0x0B) supported */
5189 .voltage = {2700, 3600},
5190 },
5191
5192 {
5193 .vendor = "Eon",
5194 .name = "EN25Q128",
5195 .bustype = BUS_SPI,
5196 .manufacture_id = EON_ID_NOPREFIX,
5197 .model_id = EON_EN25Q128,
5198 .total_size = 16384,
5199 .page_size = 256,
5200 /* OTP: 512B total; enter 0x3A */
5201 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5202 .tested = TEST_OK_PREW,
5203 .probe = probe_spi_rdid,
5204 .probe_timing = TIMING_ZERO,
5205 .block_erasers =
5206 {
5207 {
5208 .eraseblocks = { {4 * 1024, 4096} },
5209 .block_erase = spi_block_erase_20,
5210 }, {
5211 .eraseblocks = { {64 * 1024, 256} },
5212 .block_erase = spi_block_erase_d8,
5213 }, {
5214 .eraseblocks = { {16 * 1024 * 1024, 1} },
5215 .block_erase = spi_block_erase_60,
5216 }, {
5217 .eraseblocks = { {16 * 1024 * 1024, 1} },
5218 .block_erase = spi_block_erase_c7,
5219 }
5220 },
5221 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5222 .unlock = spi_disable_blockprotect,
5223 .write = spi_chip_write_256,
5224 .read = spi_chip_read,
5225 },
5226
5227 {
David Hendricks6d715302011-07-24 22:21:57 +00005228 /* Note: EN25D16 is an evil twin which shares the model ID
5229 but has different write protection capabilities */
5230 .vendor = "Eon",
5231 .name = "EN25Q16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005232 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005233 .manufacture_id = EON_ID_NOPREFIX,
5234 .model_id = EON_EN25Q16,
5235 .total_size = 2048,
5236 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005237 /* OTP: D16 512B/Q16 128B total; enter 0x3A */
5238 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks6d715302011-07-24 22:21:57 +00005239 .tested = TEST_UNTESTED,
5240 .probe = probe_spi_rdid,
5241 .probe_timing = TIMING_ZERO,
5242 .block_erasers =
5243 {
5244 {
5245 .eraseblocks = { {4 * 1024, 512} },
5246 .block_erase = spi_block_erase_20,
5247 }, {
5248 .eraseblocks = { {64 * 1024, 32} },
5249 .block_erase = spi_block_erase_d8,
5250 }, {
5251 /* not supported by Q16 version */
5252 .eraseblocks = { {64 * 1024, 32} },
5253 .block_erase = spi_block_erase_52,
5254 }, {
5255 .eraseblocks = { {2 * 1024 * 1024, 1} },
5256 .block_erase = spi_block_erase_60,
5257 }, {
5258 .eraseblocks = { {2 * 1024 * 1024, 1} },
5259 .block_erase = spi_block_erase_c7,
5260 }
5261 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005262 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005263 .unlock = spi_disable_blockprotect,
5264 .write = spi_chip_write_256,
5265 .read = spi_chip_read,
5266 .voltage = {2700, 3600},
5267 },
5268
5269 {
5270 .vendor = "Eon",
5271 .name = "EN25Q32(A/B)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005272 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005273 .manufacture_id = EON_ID_NOPREFIX,
5274 .model_id = EON_EN25Q32,
5275 .total_size = 4096,
5276 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005277 /* OTP: 512B total; enter 0x3A */
5278 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner352e50b2013-02-22 15:58:45 +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, 1024} },
5286 .block_erase = spi_block_erase_20,
5287 }, {
5288 .eraseblocks = { {64 * 1024, 64} },
5289 .block_erase = spi_block_erase_d8,
5290 }, {
5291 .eraseblocks = { {4 * 1024 * 1024, 1} },
5292 .block_erase = spi_block_erase_60,
5293 }, {
5294 .eraseblocks = { {4 * 1024 * 1024, 1} },
5295 .block_erase = spi_block_erase_c7,
5296 }
5297 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005298 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005299 .unlock = spi_disable_blockprotect,
5300 .write = spi_chip_write_256,
5301 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005302 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005303 },
5304
5305 {
5306 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005307 .name = "EN25Q40",
5308 .bustype = BUS_SPI,
5309 .manufacture_id = EON_ID_NOPREFIX,
5310 .model_id = EON_EN25Q40,
5311 .total_size = 512,
5312 .page_size = 256,
5313 /* OTP: 256B total; enter 0x3A */
5314 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5315 .tested = TEST_UNTESTED,
5316 .probe = probe_spi_rdid,
5317 .probe_timing = TIMING_ZERO,
5318 .block_erasers =
5319 {
5320 {
5321 .eraseblocks = { {4 * 1024, 128} },
5322 .block_erase = spi_block_erase_20,
5323 }, {
5324 .eraseblocks = { {64 * 1024, 8} },
5325 .block_erase = spi_block_erase_d8,
5326 }, {
5327 .eraseblocks = { {512 * 1024, 1} },
5328 .block_erase = spi_block_erase_60,
5329 }, {
5330 .eraseblocks = { {512 * 1024, 1} },
5331 .block_erase = spi_block_erase_c7,
5332 }
5333 },
5334 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5335 .unlock = spi_disable_blockprotect,
5336 .write = spi_chip_write_256,
5337 .read = spi_chip_read,
5338 .voltage = {2700, 3600},
5339 },
5340
5341 {
5342 .vendor = "Eon",
David Hendricks6d715302011-07-24 22:21:57 +00005343 .name = "EN25Q64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005344 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005345 .manufacture_id = EON_ID_NOPREFIX,
5346 .model_id = EON_EN25Q64,
5347 .total_size = 8192,
5348 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005349 /* OTP: 512B total; enter 0x3A */
5350 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner352e50b2013-02-22 15:58:45 +00005351 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005352 .probe = probe_spi_rdid,
5353 .probe_timing = TIMING_ZERO,
5354 .block_erasers =
5355 {
5356 {
5357 .eraseblocks = { {4 * 1024, 2048} },
5358 .block_erase = spi_block_erase_20,
5359 }, {
5360 .eraseblocks = { {64 * 1024, 128} },
5361 .block_erase = spi_block_erase_d8,
5362 }, {
5363 .eraseblocks = { {8 * 1024 * 1024, 1} },
5364 .block_erase = spi_block_erase_60,
5365 }, {
5366 .eraseblocks = { {8 * 1024 * 1024, 1} },
5367 .block_erase = spi_block_erase_c7,
5368 }
5369 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005370 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005371 .unlock = spi_disable_blockprotect,
5372 .write = spi_chip_write_256,
5373 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005374 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005375 },
5376
5377 {
5378 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005379 .name = "EN25Q80(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005380 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005381 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005382 .model_id = EON_EN25Q80,
5383 .total_size = 1024,
5384 .page_size = 256,
5385 /* OTP: 256B total; enter 0x3A */
5386 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5387 .tested = TEST_UNTESTED,
5388 .probe = probe_spi_rdid,
5389 .probe_timing = TIMING_ZERO,
5390 .block_erasers =
5391 {
5392 {
5393 .eraseblocks = { {4 * 1024, 256} },
5394 .block_erase = spi_block_erase_20,
5395 }, {
5396 .eraseblocks = { {64 * 1024, 16} },
5397 .block_erase = spi_block_erase_d8,
5398 }, {
5399 .eraseblocks = { {1024 * 1024, 1} },
5400 .block_erase = spi_block_erase_60,
5401 }, {
5402 .eraseblocks = { {1024 * 1024, 1} },
5403 .block_erase = spi_block_erase_c7,
5404 }
5405 },
5406 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5407 .unlock = spi_disable_blockprotect,
5408 .write = spi_chip_write_256,
5409 .read = spi_chip_read,
5410 .voltage = {2700, 3600},
5411 },
5412
5413 {
5414 .vendor = "Eon",
5415 .name = "EN25QH128",
5416 .bustype = BUS_SPI,
5417 .manufacture_id = EON_ID_NOPREFIX,
5418 .model_id = EON_EN25QH128,
David Hendricks6d715302011-07-24 22:21:57 +00005419 .total_size = 16384,
5420 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005421 /* supports SFDP */
Daniel Lenski65922a32012-02-15 23:40:23 +00005422 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005423 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5424 .dummy_cycles =
5425 {
5426 .qpi_fast_read = 6,
5427 .qpi_fast_read_qio = 6,
5428 },
Tim Chenbfe149a2020-07-06 14:59:21 +08005429 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005430 .probe = probe_spi_rdid,
5431 .probe_timing = TIMING_ZERO,
5432 .block_erasers =
5433 {
5434 {
5435 .eraseblocks = { {4 * 1024, 4096} },
5436 .block_erase = spi_block_erase_20,
5437 }, {
5438 .eraseblocks = { {64 * 1024, 256} },
5439 .block_erase = spi_block_erase_d8,
5440 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005441 .eraseblocks = { { 16384 * 1024, 1} },
David Hendricks6d715302011-07-24 22:21:57 +00005442 .block_erase = spi_block_erase_60,
5443 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005444 .eraseblocks = { { 16384 * 1024, 1} },
David Hendricks6d715302011-07-24 22:21:57 +00005445 .block_erase = spi_block_erase_c7,
5446 }
5447 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10005448 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5449 .unlock = spi_disable_blockprotect_bp3_srwd,
David Hendricks6d715302011-07-24 22:21:57 +00005450 .write = spi_chip_write_256,
5451 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005452 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11005453 .reg_bits =
5454 {
5455 .srp = {STATUS1, 7, RW},
5456 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5457 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5458 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005459 .wp_write_cfg = spi_wp_write_cfg,
5460 .wp_read_cfg = spi_wp_read_cfg,
5461 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11005462 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02005463 .prepare_access = spi_prepare_io,
5464 .finish_access = spi_finish_io,
David Hendricks6d715302011-07-24 22:21:57 +00005465 },
5466
5467 {
5468 .vendor = "Eon",
5469 .name = "EN25QH16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005470 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005471 .manufacture_id = EON_ID_NOPREFIX,
5472 .model_id = EON_EN25QH16,
5473 .total_size = 2048,
5474 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005475 /* supports SFDP */
5476 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005477 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5478 .dummy_cycles =
5479 {
5480 .qpi_fast_read = 6,
5481 .qpi_fast_read_qio = 6,
5482 },
Stefan Tauner5c316f92015-02-08 21:57:52 +00005483 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005484 .probe = probe_spi_rdid,
5485 .probe_timing = TIMING_ZERO,
5486 .block_erasers =
5487 {
5488 {
5489 .eraseblocks = { {4 * 1024, 512} },
5490 .block_erase = spi_block_erase_20,
5491 }, {
5492 .eraseblocks = { {64 * 1024, 32} },
5493 .block_erase = spi_block_erase_d8,
5494 }, {
5495 .eraseblocks = { {1024 * 2048, 1} },
5496 .block_erase = spi_block_erase_60,
5497 }, {
5498 .eraseblocks = { {1024 * 2048, 1} },
5499 .block_erase = spi_block_erase_c7,
5500 }
5501 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005502 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005503 .unlock = spi_disable_blockprotect_bp3_srwd,
David Hendricks6d715302011-07-24 22:21:57 +00005504 .write = spi_chip_write_256,
5505 .read = spi_chip_read,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005506 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005507 .prepare_access = spi_prepare_io,
5508 .finish_access = spi_finish_io,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005509 },
5510
5511 {
5512 .vendor = "Eon",
5513 .name = "EN25QH32",
5514 .bustype = BUS_SPI,
5515 .manufacture_id = EON_ID_NOPREFIX,
5516 .model_id = EON_EN25QH32,
5517 .total_size = 4096,
5518 .page_size = 256,
5519 /* supports SFDP */
5520 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005521 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5522 .dummy_cycles =
5523 {
5524 .qpi_fast_read = 6,
5525 .qpi_fast_read_qio = 6,
5526 },
Stefan Tauner23e10b82016-01-23 16:16:49 +00005527 .tested = TEST_OK_PREW,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005528 .probe = probe_spi_rdid,
5529 .probe_timing = TIMING_ZERO,
5530 .block_erasers =
5531 {
5532 {
5533 .eraseblocks = { {4 * 1024, 1024} },
5534 .block_erase = spi_block_erase_20,
5535 }, {
5536 .eraseblocks = { {64 * 1024, 64} },
5537 .block_erase = spi_block_erase_d8,
5538 }, {
5539 .eraseblocks = { {1024 * 4096, 1} },
5540 .block_erase = spi_block_erase_60,
5541 }, {
5542 .eraseblocks = { {1024 * 4096, 1} },
5543 .block_erase = spi_block_erase_c7,
5544 }
5545 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005546 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005547 .unlock = spi_disable_blockprotect_bp3_srwd,
5548 .write = spi_chip_write_256,
5549 .read = spi_chip_read,
5550 .voltage = {2700, 3600},
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005551 .reg_bits =
5552 {
5553 .srp = {STATUS1, 7, RW},
5554 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5555 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5556 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005557 .wp_write_cfg = spi_wp_write_cfg,
5558 .wp_read_cfg = spi_wp_read_cfg,
5559 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005560 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02005561 .prepare_access = spi_prepare_io,
5562 .finish_access = spi_finish_io,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005563 },
5564
5565 {
5566 .vendor = "Eon",
5567 .name = "EN25QH32B",
5568 .bustype = BUS_SPI,
5569 .manufacture_id = EON_ID_NOPREFIX,
5570 .model_id = EON_EN25QH32,
5571 .total_size = 4096,
5572 .page_size = 256,
5573 /* supports SFDP */
5574 /* OTP: 1536B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005575 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_38,
5576 .dummy_cycles =
5577 {
5578 .qpi_fast_read = 6,
5579 .qpi_fast_read_qio = 6,
5580 },
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005581 .tested = TEST_OK_PREW,
5582 .probe = probe_spi_rdid,
5583 .probe_timing = TIMING_ZERO,
5584 .block_erasers =
5585 {
5586 {
5587 .eraseblocks = { {4 * 1024, 1024} },
5588 .block_erase = spi_block_erase_20,
5589 }, {
5590 .eraseblocks = { {32 * 1024, 128} },
5591 .block_erase = spi_block_erase_52,
5592 }, {
5593 .eraseblocks = { {64 * 1024, 64} },
5594 .block_erase = spi_block_erase_d8,
5595 }, {
5596 .eraseblocks = { {1024 * 4096, 1} },
5597 .block_erase = spi_block_erase_60,
5598 }, {
5599 .eraseblocks = { {1024 * 4096, 1} },
5600 .block_erase = spi_block_erase_c7,
5601 }
5602 },
5603 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5604 .unlock = spi_disable_blockprotect_bp3_srwd,
5605 .write = spi_chip_write_256,
5606 .read = spi_chip_read,
5607 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005608 .prepare_access = spi_prepare_io,
5609 .finish_access = spi_finish_io,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005610 },
5611
5612 {
5613 .vendor = "Eon",
5614 .name = "EN25QH64",
5615 .bustype = BUS_SPI,
5616 .manufacture_id = EON_ID_NOPREFIX,
5617 .model_id = EON_EN25QH64,
5618 .total_size = 8192,
5619 .page_size = 256,
5620 /* supports SFDP */
5621 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005622 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5623 .dummy_cycles =
5624 {
5625 .qpi_fast_read = 6,
5626 .qpi_fast_read_qio = 6,
5627 },
Stefan Tauner23e10b82016-01-23 16:16:49 +00005628 .tested = TEST_OK_PREW,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005629 .probe = probe_spi_rdid,
5630 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005631 .block_erasers =
5632 {
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005633 {
5634 .eraseblocks = { {4 * 1024, 2048} },
5635 .block_erase = spi_block_erase_20,
5636 }, {
5637 .eraseblocks = { {64 * 1024, 128} },
5638 .block_erase = spi_block_erase_d8,
5639 }, {
5640 .eraseblocks = { { 8192 * 1024, 1} },
5641 .block_erase = spi_block_erase_60,
5642 }, {
5643 .eraseblocks = { { 8192 * 1024, 1} },
5644 .block_erase = spi_block_erase_c7,
5645 }
5646 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005647 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005648 .unlock = spi_disable_blockprotect_bp3_srwd,
5649 .write = spi_chip_write_256,
5650 .read = spi_chip_read,
5651 .voltage = {2700, 3600},
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005652 .reg_bits =
5653 {
5654 .srp = {STATUS1, 7, RW},
5655 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5656 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5657 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005658 .wp_write_cfg = spi_wp_write_cfg,
5659 .wp_read_cfg = spi_wp_read_cfg,
5660 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005661 .decode_range = decode_range_spi25_64k_block,
Nico Huber930d4212024-05-04 18:59:15 +02005662 .prepare_access = spi_prepare_io,
5663 .finish_access = spi_finish_io,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005664 },
5665
5666 {
5667 .vendor = "Eon",
5668 .name = "EN25QH64A",
5669 .bustype = BUS_SPI,
5670 .manufacture_id = EON_ID_NOPREFIX,
5671 .model_id = EON_EN25QH64,
5672 .total_size = 8192,
5673 .page_size = 256,
5674 /* supports SFDP */
5675 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005676 /* Has a special, volatile status register 3 that is written with
5677 0xc0 like Set Read Parameters. Hence treating as QPI_SRP. */
5678 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP,
5679 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005680 .tested = TEST_OK_PREW,
5681 .probe = probe_spi_rdid,
5682 .probe_timing = TIMING_ZERO,
5683 .block_erasers =
5684 {
5685 {
5686 .eraseblocks = { {4 * 1024, 2048} },
5687 .block_erase = spi_block_erase_20,
5688 }, {
5689 .eraseblocks = { {32 * 1024, 256} },
5690 .block_erase = spi_block_erase_52,
5691 }, {
5692 .eraseblocks = { {64 * 1024, 128} },
5693 .block_erase = spi_block_erase_d8,
5694 }, {
5695 .eraseblocks = { { 8192 * 1024, 1} },
5696 .block_erase = spi_block_erase_60,
5697 }, {
5698 .eraseblocks = { { 8192 * 1024, 1} },
5699 .block_erase = spi_block_erase_c7,
5700 }
5701 },
5702 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5703 .unlock = spi_disable_blockprotect_bp3_srwd,
5704 .write = spi_chip_write_256,
5705 .read = spi_chip_read,
5706 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005707 .prepare_access = spi_prepare_io,
5708 .finish_access = spi_finish_io,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005709 },
5710
5711 {
5712 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005713 .name = "EN25S10",
5714 .bustype = BUS_SPI,
5715 .manufacture_id = EON_ID_NOPREFIX,
5716 .model_id = EON_EN25S10,
5717 .total_size = 128,
5718 .page_size = 256,
5719 /* OTP: 256B total; enter 0x3A */
5720 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5721 .tested = TEST_UNTESTED,
5722 .probe = probe_spi_rdid,
5723 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005724 .block_erasers =
5725 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005726 {
5727 .eraseblocks = { {4 * 1024, 32} },
5728 .block_erase = spi_block_erase_20,
5729 }, {
5730 .eraseblocks = { {32 * 1024, 4} },
5731 .block_erase = spi_block_erase_52,
5732 }, {
5733 .eraseblocks = { {128 * 1024, 1} },
5734 .block_erase = spi_block_erase_60,
5735 }, {
5736 .eraseblocks = { {128 * 1024, 1} },
5737 .block_erase = spi_block_erase_c7,
5738 }
5739 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005740 .printlock = spi_prettyprint_status_register_bp2_srwd,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005741 .unlock = spi_disable_blockprotect,
5742 .write = spi_chip_write_256,
5743 .read = spi_chip_read,
5744 .voltage = {1650, 1950},
5745 },
5746
5747 {
5748 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005749 .name = "EN25S16",
5750 .bustype = BUS_SPI,
5751 .manufacture_id = EON_ID_NOPREFIX,
5752 .model_id = EON_EN25S16,
5753 .total_size = 2048,
5754 .page_size = 256,
5755 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005756 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5757 .dummy_cycles =
5758 {
5759 .qpi_fast_read = 6,
5760 .qpi_fast_read_qio = 6,
5761 },
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005762 .tested = TEST_UNTESTED,
5763 .probe = probe_spi_rdid,
5764 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005765 .block_erasers =
5766 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005767 {
5768 .eraseblocks = { {4 * 1024, 512} },
5769 .block_erase = spi_block_erase_20,
5770 }, {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005771 .eraseblocks = { {32 * 1024, 64} },
5772 .block_erase = spi_block_erase_d8,
5773 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05305774 .eraseblocks = { {64 * 1024, 32} },
5775 .block_erase = spi_block_erase_52,
5776 }, {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005777 .eraseblocks = { {2048 * 1024, 1} },
5778 .block_erase = spi_block_erase_60,
5779 }, {
5780 .eraseblocks = { {2048 * 1024, 1} },
5781 .block_erase = spi_block_erase_c7,
5782 }
5783 },
5784 .printlock = spi_prettyprint_status_register_en25s_wp,
5785 .unlock = spi_disable_blockprotect_bp3_srwd,
5786 .write = spi_chip_write_256,
5787 .read = spi_chip_read,
5788 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02005789 .prepare_access = spi_prepare_io,
5790 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005791 },
5792
5793 {
5794 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005795 .name = "EN25S20",
5796 .bustype = BUS_SPI,
5797 .manufacture_id = EON_ID_NOPREFIX,
5798 .model_id = EON_EN25S20,
5799 .total_size = 256,
5800 .page_size = 256,
5801 /* OTP: 256B total; enter 0x3A */
5802 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5803 .tested = TEST_UNTESTED,
5804 .probe = probe_spi_rdid,
5805 .probe_timing = TIMING_ZERO,
5806 .block_erasers =
5807 {
5808 {
5809 .eraseblocks = { {4 * 1024, 64} },
5810 .block_erase = spi_block_erase_20,
5811 }, {
5812 .eraseblocks = { {64 * 1024, 4} },
5813 .block_erase = spi_block_erase_d8,
5814 }, {
5815 .eraseblocks = { {256 * 1024, 1} },
5816 .block_erase = spi_block_erase_60,
5817 }, {
5818 .eraseblocks = { {256 * 1024, 1} },
5819 .block_erase = spi_block_erase_c7,
5820 }
5821 },
5822 .printlock = spi_prettyprint_status_register_bp2_srwd,
5823 .unlock = spi_disable_blockprotect,
5824 .write = spi_chip_write_256,
5825 .read = spi_chip_read,
5826 .voltage = {1650, 1950},
5827 },
5828
5829 {
5830 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005831 .name = "EN25S32",
5832 .bustype = BUS_SPI,
5833 .manufacture_id = EON_ID_NOPREFIX,
5834 .model_id = EON_EN25S32,
5835 .total_size = 4096,
5836 .page_size = 256,
5837 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005838 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5839 .dummy_cycles =
5840 {
5841 .qpi_fast_read = 6,
5842 .qpi_fast_read_qio = 6,
5843 },
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005844 .tested = TEST_UNTESTED,
5845 .probe = probe_spi_rdid,
5846 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005847 .block_erasers =
5848 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005849 {
5850 .eraseblocks = { {4 * 1024, 1024} },
5851 .block_erase = spi_block_erase_20,
5852 }, {
5853 .eraseblocks = { {32 * 1024, 128} },
5854 .block_erase = spi_block_erase_52,
5855 }, {
5856 .eraseblocks = { {64 * 1024, 64} },
5857 .block_erase = spi_block_erase_d8,
5858 }, {
5859 .eraseblocks = { {4096 * 1024, 1} },
5860 .block_erase = spi_block_erase_60,
5861 }, {
5862 .eraseblocks = { {4096 * 1024, 1} },
5863 .block_erase = spi_block_erase_c7,
5864 }
5865 },
5866 .printlock = spi_prettyprint_status_register_en25s_wp,
5867 .unlock = spi_disable_blockprotect_bp3_srwd,
5868 .write = spi_chip_write_256,
5869 .read = spi_chip_read,
5870 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02005871 .prepare_access = spi_prepare_io,
5872 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005873 },
5874
5875 {
5876 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005877 .name = "EN25S40",
5878 .bustype = BUS_SPI,
5879 .manufacture_id = EON_ID_NOPREFIX,
5880 .model_id = EON_EN25S40,
5881 .total_size = 512,
5882 .page_size = 256,
5883 /* OTP: 256B total; enter 0x3A */
5884 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5885 .tested = TEST_OK_PREW,
5886 .probe = probe_spi_rdid,
5887 .probe_timing = TIMING_ZERO,
5888 .block_erasers =
5889 {
5890 {
5891 .eraseblocks = { {4 * 1024, 128} },
5892 .block_erase = spi_block_erase_20,
5893 }, {
5894 .eraseblocks = { {64 * 1024, 8} },
5895 .block_erase = spi_block_erase_d8,
5896 }, {
5897 .eraseblocks = { {512 * 1024, 1} },
5898 .block_erase = spi_block_erase_60,
5899 }, {
5900 .eraseblocks = { {512 * 1024, 1} },
5901 .block_erase = spi_block_erase_c7,
5902 }
5903 },
5904 .printlock = spi_prettyprint_status_register_bp2_srwd,
5905 .unlock = spi_disable_blockprotect,
5906 .write = spi_chip_write_256,
5907 .read = spi_chip_read,
5908 .voltage = {1650, 1950},
5909 },
5910
5911 {
5912 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005913 .name = "EN25S64",
5914 .bustype = BUS_SPI,
5915 .manufacture_id = EON_ID_NOPREFIX,
5916 .model_id = EON_EN25S64,
5917 .total_size = 8192,
5918 .page_size = 256,
5919 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005920 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5921 .dummy_cycles =
5922 {
5923 .qpi_fast_read = 6,
5924 .qpi_fast_read_qio = 6,
5925 },
Nikolai Artemievdf889fa2021-03-23 17:10:45 +11005926 .tested = TEST_OK_PREW,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005927 .probe = probe_spi_rdid,
5928 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005929 .block_erasers =
5930 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005931 {
5932 .eraseblocks = { {4 * 1024, 2048} },
5933 .block_erase = spi_block_erase_20,
5934 }, {
5935 .eraseblocks = { {64 * 1024, 128} },
5936 .block_erase = spi_block_erase_d8,
5937 }, {
5938 .eraseblocks = { {8192 * 1024, 1} },
5939 .block_erase = spi_block_erase_60,
5940 }, {
5941 .eraseblocks = { {8192 * 1024, 1} },
5942 .block_erase = spi_block_erase_c7,
5943 }
5944 },
5945 .printlock = spi_prettyprint_status_register_en25s_wp,
5946 .unlock = spi_disable_blockprotect_bp3_srwd,
5947 .write = spi_chip_write_256,
5948 .read = spi_chip_read,
5949 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02005950 .prepare_access = spi_prepare_io,
5951 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005952 },
5953
5954 {
5955 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005956 .name = "EN25S80",
5957 .bustype = BUS_SPI,
5958 .manufacture_id = EON_ID_NOPREFIX,
5959 .model_id = EON_EN25S80,
5960 .total_size = 1024,
5961 .page_size = 256,
5962 /* OTP: 256B total; enter 0x3A */
5963 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5964 .tested = TEST_UNTESTED,
5965 .probe = probe_spi_rdid,
5966 .probe_timing = TIMING_ZERO,
Russ Dill3cd5a122010-03-05 08:44:11 +00005967 .block_erasers =
5968 {
5969 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005970 .eraseblocks = { {4 * 1024, 256} },
5971 .block_erase = spi_block_erase_20,
5972 }, {
5973 .eraseblocks = { {64 * 1024, 16} },
5974 .block_erase = spi_block_erase_d8,
5975 }, {
5976 .eraseblocks = { {1024 * 1024, 1} },
5977 .block_erase = spi_block_erase_60,
5978 }, {
5979 .eraseblocks = { {1024 * 1024, 1} },
5980 .block_erase = spi_block_erase_c7,
5981 }
Russ Dill3cd5a122010-03-05 08:44:11 +00005982 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10005983 .printlock = spi_prettyprint_status_register_bp2_srwd,
5984 .unlock = spi_disable_blockprotect,
5985 .write = spi_chip_write_256,
5986 .read = spi_chip_read,
5987 .voltage = {1650, 1950},
Russ Dill3cd5a122010-03-05 08:44:11 +00005988 },
5989
5990 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00005991 .vendor = "Eon",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005992 .name = "EN29F002(A)(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005993 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005994 .manufacture_id = EON_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00005995 .model_id = EON_EN29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00005996 .total_size = 256,
5997 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00005998 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Alan Green4362e622019-08-26 15:02:12 +10005999 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006000 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00006001 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006002 .block_erasers =
6003 {
6004 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006005 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006006 {16 * 1024, 1},
Michael Karchere3cb0a12010-03-13 23:47:09 +00006007 {8 * 1024, 2},
6008 {32 * 1024, 1},
6009 {64 * 1024, 3},
Sean Nelson6b11ad22009-12-23 17:05:59 +00006010 },
6011 .block_erase = erase_sector_jedec,
6012 }, {
6013 .eraseblocks = { {256 * 1024, 1} },
6014 .block_erase = erase_chip_block_jedec,
6015 },
6016 },
Michael Karcher1c296ca2009-11-27 17:49:42 +00006017 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006018 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006019 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006020 .prepare_access = prepare_memory_access,
6021 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006022 },
6023
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006024 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00006025 .vendor = "Eon",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006026 .name = "EN29F002(A)(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006027 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006028 .manufacture_id = EON_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006029 .model_id = EON_EN29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006030 .total_size = 256,
6031 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00006032 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +00006033 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006034 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00006035 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006036 .block_erasers =
6037 {
6038 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006039 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006040 {64 * 1024, 3},
Michael Karchere3cb0a12010-03-13 23:47:09 +00006041 {32 * 1024, 1},
6042 {8 * 1024, 2},
6043 {16 * 1024, 1},
Sean Nelson6b11ad22009-12-23 17:05:59 +00006044 },
6045 .block_erase = erase_sector_jedec,
6046 }, {
6047 .eraseblocks = { {256 * 1024, 1} },
6048 .block_erase = erase_chip_block_jedec,
6049 },
6050 },
Michael Karcher1c296ca2009-11-27 17:49:42 +00006051 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006052 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006053 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006054 .prepare_access = prepare_memory_access,
6055 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006056 },
6057
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006058 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006059 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006060 .name = "EN29F010",
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006061 .bustype = BUS_PARALLEL,
6062 .manufacture_id = EON_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006063 .model_id = EON_EN29F010,
6064 .total_size = 128,
6065 .page_size = 128,
6066 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
6067 .tested = TEST_OK_PRE,
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006068 .probe = probe_jedec,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006069 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006070 .block_erasers =
6071 {
6072 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006073 .eraseblocks = { {16 * 1024, 8} },
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006074 .block_erase = erase_sector_jedec,
6075 },
6076 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006077 .eraseblocks = { {128 * 1024, 1} },
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006078 .block_erase = erase_chip_block_jedec,
6079 },
6080 },
6081 .write = write_jedec_1,
6082 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006083 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006084 .prepare_access = prepare_memory_access,
6085 .finish_access = finish_memory_access,
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006086 },
6087
6088 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006089 .vendor = "Eon",
6090 .name = "EN29GL064(A)B",
6091 .bustype = BUS_PARALLEL,
6092 .manufacture_id = EON_ID,
6093 .model_id = EON_EN29GL064B,
6094 .total_size = 8192,
6095 .page_size = 128 * 1024, /* actual page size is 16 */
6096 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6097 .tested = TEST_UNTESTED,
6098 .probe = probe_jedec_29gl,
6099 .probe_timing = TIMING_ZERO,
6100 .block_erasers =
6101 {
6102 {
6103 .eraseblocks = {
6104 {8 * 1024, 8},
6105 {64 * 1024, 127},
6106 },
6107 .block_erase = erase_sector_jedec,
6108 }, {
6109 .eraseblocks = { {8 * 1024 * 1024, 1} },
6110 .block_erase = erase_chip_block_jedec,
6111 },
6112 },
6113 .write = write_jedec_1,
6114 .read = read_memmapped,
6115 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006116 .prepare_access = prepare_memory_access,
6117 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006118 },
6119
6120 {
6121 .vendor = "Eon",
6122 .name = "EN29GL064(A)T",
6123 .bustype = BUS_PARALLEL,
6124 .manufacture_id = EON_ID,
6125 .model_id = EON_EN29GL064T,
6126 .total_size = 8192,
6127 .page_size = 128 * 1024, /* actual page size is 16 */
6128 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6129 .tested = TEST_UNTESTED,
6130 .probe = probe_jedec_29gl,
6131 .probe_timing = TIMING_ZERO,
6132 .block_erasers =
6133 {
6134 {
6135 .eraseblocks = {
6136 {64 * 1024, 127},
6137 {8 * 1024, 8},
6138 },
6139 .block_erase = erase_sector_jedec,
6140 }, {
6141 .eraseblocks = { {8 * 1024 * 1024, 1} },
6142 .block_erase = erase_chip_block_jedec,
6143 },
6144 },
6145 .write = write_jedec_1,
6146 .read = read_memmapped,
6147 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006148 .prepare_access = prepare_memory_access,
6149 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006150 },
6151
6152 {
6153 .vendor = "Eon",
6154 .name = "EN29GL064H/L",
6155 .bustype = BUS_PARALLEL,
6156 .manufacture_id = EON_ID,
6157 .model_id = EON_EN29GL064HL,
6158 .total_size = 8192,
6159 .page_size = 128 * 1024, /* actual page size is 16 */
6160 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6161 .tested = TEST_UNTESTED,
6162 .probe = probe_jedec_29gl,
6163 .probe_timing = TIMING_ZERO,
6164 .block_erasers =
6165 {
6166 {
6167 .eraseblocks = { {64 * 1024, 128} },
6168 .block_erase = erase_sector_jedec,
6169 }, {
6170 .eraseblocks = { {8 * 1024 * 1024, 1} },
6171 .block_erase = erase_chip_block_jedec,
6172 },
6173 },
6174 .write = write_jedec_1,
6175 .read = read_memmapped,
6176 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006177 .prepare_access = prepare_memory_access,
6178 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006179 },
6180
6181 {
6182 .vendor = "Eon",
6183 .name = "EN29GL128",
6184 .bustype = BUS_PARALLEL,
6185 .manufacture_id = EON_ID,
6186 .model_id = EON_EN29GL128HL,
6187 .total_size = 16384,
6188 .page_size = 128 * 1024, /* actual page size is 16 */
6189 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6190 .tested = TEST_UNTESTED,
6191 .probe = probe_jedec_29gl,
6192 .probe_timing = TIMING_ZERO,
6193 .block_erasers =
6194 {
6195 {
6196 .eraseblocks = { {128 * 1024, 128} },
6197 .block_erase = erase_sector_jedec,
6198 }, {
6199 .eraseblocks = { {16 * 1024 * 1024, 1} },
6200 .block_erase = erase_chip_block_jedec,
6201 },
6202 },
6203 .write = write_jedec_1,
6204 .read = read_memmapped,
6205 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006206 .prepare_access = prepare_memory_access,
6207 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006208 },
6209
6210 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006211 .vendor = "Eon",
6212 .name = "EN29LV040(A)",
6213 .bustype = BUS_PARALLEL,
6214 .manufacture_id = EON_ID,
6215 .model_id = EON_EN29LV040,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006216 .total_size = 512,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006217 .page_size = 4 * 1024,
6218 .tested = TEST_OK_PREW,
6219 .probe = probe_jedec,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006220 .probe_timing = TIMING_ZERO,
6221 .block_erasers =
6222 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006223 {
6224 .eraseblocks = { {64 * 1024, 8} },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006225 .block_erase = erase_sector_jedec,
6226 },
6227 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006228 .eraseblocks = { {512 * 1024, 1} },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006229 .block_erase = erase_chip_block_jedec,
6230 },
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006231 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006232 .write = write_jedec_1,
6233 .read = read_memmapped,
6234 .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R and 55R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01006235 .prepare_access = prepare_memory_access,
6236 .finish_access = finish_memory_access,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006237 },
6238
6239 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006240 .vendor = "Eon",
6241 .name = "EN29LV640B",
6242 .bustype = BUS_PARALLEL,
6243 .manufacture_id = EON_ID,
6244 .model_id = EON_EN29LV640B,
6245 .total_size = 8192,
6246 .page_size = 8192,
6247 .feature_bits = FEATURE_ADDR_SHIFTED,
6248 .tested = TEST_OK_PREW,
6249 .probe = probe_en29lv640b,
6250 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006251 .block_erasers =
6252 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006253 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006254 .eraseblocks = {
6255 {8 * 1024, 8},
6256 {64 * 1024, 127},
6257 },
6258 .block_erase = erase_block_jedec,
Stefan Tauner0be072c2016-03-13 15:16:30 +00006259 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006260 .eraseblocks = { {8 * 1024 * 1024, 1} },
6261 .block_erase = erase_chip_block_jedec,
6262 },
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006263 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006264 .write = write_en29lv640b,
6265 .read = read_memmapped,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006266 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006267 .prepare_access = prepare_memory_access,
6268 .finish_access = finish_memory_access,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006269 },
6270
6271 {
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006272 .vendor = "Fudan",
6273 .name = "FM25F005",
6274 .bustype = BUS_SPI,
6275 .manufacture_id = FUDAN_ID_NOPREFIX,
6276 .model_id = FUDAN_FM25F005,
6277 .total_size = 64,
6278 .page_size = 256,
6279 /* OTP: 256B total; enter 0x3A */
6280 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6281 .tested = TEST_UNTESTED,
6282 .probe = probe_spi_rdid,
6283 .probe_timing = TIMING_ZERO,
6284 .block_erasers = {
6285 {
6286 .eraseblocks = { {4 * 1024, 16} },
6287 .block_erase = spi_block_erase_20,
6288 }, {
6289 .eraseblocks = { {32 * 1024, 2} },
6290 .block_erase = spi_block_erase_52,
6291 }, {
6292 .eraseblocks = { {64 * 1024, 1} },
6293 .block_erase = spi_block_erase_d8,
6294 }, {
6295 .eraseblocks = { {64 * 1024, 1} },
6296 .block_erase = spi_block_erase_60,
6297 }, {
6298 .eraseblocks = { {64 * 1024, 1} },
6299 .block_erase = spi_block_erase_c7,
6300 }
6301 },
6302 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6303 .unlock = spi_disable_blockprotect_bp2_srwd,
6304 .write = spi_chip_write_256,
6305 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6306 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6307 },
6308
6309 {
6310 .vendor = "Fudan",
6311 .name = "FM25F01",
6312 .bustype = BUS_SPI,
6313 .manufacture_id = FUDAN_ID_NOPREFIX,
6314 .model_id = FUDAN_FM25F01,
6315 .total_size = 128,
6316 .page_size = 256,
6317 /* OTP: 256B total; enter 0x3A */
6318 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6319 .tested = TEST_UNTESTED,
6320 .probe = probe_spi_rdid,
6321 .probe_timing = TIMING_ZERO,
6322 .block_erasers = {
6323 {
6324 .eraseblocks = { {4 * 1024, 32} },
6325 .block_erase = spi_block_erase_20,
6326 }, {
6327 .eraseblocks = { {32 * 1024, 4} },
6328 .block_erase = spi_block_erase_52,
6329 }, {
6330 .eraseblocks = { {64 * 1024, 2} },
6331 .block_erase = spi_block_erase_d8,
6332 }, {
6333 .eraseblocks = { {128 * 1024, 1} },
6334 .block_erase = spi_block_erase_60,
6335 }, {
6336 .eraseblocks = { {128 * 1024, 1} },
6337 .block_erase = spi_block_erase_c7,
6338 }
6339 },
6340 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6341 .unlock = spi_disable_blockprotect_bp2_srwd,
6342 .write = spi_chip_write_256,
6343 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6344 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6345 },
6346
6347 {
6348 .vendor = "Fudan",
6349 .name = "FM25F02(A)",
6350 .bustype = BUS_SPI,
6351 .manufacture_id = FUDAN_ID_NOPREFIX,
6352 .model_id = FUDAN_FM25F02,
6353 .total_size = 256,
6354 .page_size = 256,
6355 /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */
6356 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6357 .tested = TEST_UNTESTED,
6358 .probe = probe_spi_rdid,
6359 .probe_timing = TIMING_ZERO,
6360 .block_erasers = {
6361 {
6362 .eraseblocks = { {4 * 1024, 64} },
6363 .block_erase = spi_block_erase_20,
6364 }, {
6365 .eraseblocks = { {32 * 1024, 8} },
6366 .block_erase = spi_block_erase_52,
6367 }, {
6368 .eraseblocks = { {64 * 1024, 4} },
6369 .block_erase = spi_block_erase_d8,
6370 }, {
6371 .eraseblocks = { {1024 * 256, 1} },
6372 .block_erase = spi_block_erase_60,
6373 }, {
6374 .eraseblocks = { {1024 * 256, 1} },
6375 .block_erase = spi_block_erase_c7,
6376 },
6377 },
6378 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6379 .unlock = spi_disable_blockprotect_bp2_srwd,
6380 .write = spi_chip_write_256,
6381 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6382 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6383 },
6384
6385 {
6386 .vendor = "Fudan",
6387 .name = "FM25F04(A)",
6388 .bustype = BUS_SPI,
6389 .manufacture_id = FUDAN_ID_NOPREFIX,
6390 .model_id = FUDAN_FM25F04,
6391 .total_size = 512,
6392 .page_size = 256,
6393 /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */
6394 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6395 .tested = TEST_UNTESTED,
6396 .probe = probe_spi_rdid,
6397 .probe_timing = TIMING_ZERO,
6398 .block_erasers = {
6399 {
6400 .eraseblocks = { {4 * 1024, 128} },
6401 .block_erase = spi_block_erase_20,
6402 }, {
6403 .eraseblocks = { {32 * 1024, 16} },
6404 .block_erase = spi_block_erase_52,
6405 }, {
6406 .eraseblocks = { {64 * 1024, 8} },
6407 .block_erase = spi_block_erase_d8,
6408 }, {
6409 .eraseblocks = { {1024 * 512, 1} },
6410 .block_erase = spi_block_erase_60,
6411 }, {
6412 .eraseblocks = { {1024 * 512, 1} },
6413 .block_erase = spi_block_erase_c7,
6414 },
6415 },
6416 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6417 .unlock = spi_disable_blockprotect_bp2_srwd,
6418 .write = spi_chip_write_256,
6419 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6420 .voltage = {2700, 3600},
6421 },
6422
6423 {
6424 .vendor = "Fudan",
6425 .name = "FM25Q08",
6426 .bustype = BUS_SPI,
6427 .manufacture_id = FUDAN_ID_NOPREFIX,
6428 .model_id = FUDAN_FM25Q08,
6429 .total_size = 1024,
6430 .page_size = 256,
6431 /* supports SFDP */
6432 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber226bb872024-04-09 23:30:34 +02006433 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 |
6434 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006435 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006436 .tested = TEST_UNTESTED,
6437 .probe = probe_spi_rdid,
6438 .probe_timing = TIMING_ZERO,
6439 .block_erasers = {
6440 {
6441 .eraseblocks = { {4 * 1024, 256} },
6442 .block_erase = spi_block_erase_20,
6443 }, {
6444 .eraseblocks = { {32 * 1024, 32} },
6445 .block_erase = spi_block_erase_52,
6446 }, {
6447 .eraseblocks = { {64 * 1024, 16} },
6448 .block_erase = spi_block_erase_d8,
6449 }, {
6450 .eraseblocks = { {1024 * 1024, 1} },
6451 .block_erase = spi_block_erase_60,
6452 }, {
6453 .eraseblocks = { {1024 * 1024, 1} },
6454 .block_erase = spi_block_erase_c7,
6455 },
6456 },
Nico Huber226bb872024-04-09 23:30:34 +02006457 .reg_bits =
6458 {
6459 .qe = {STATUS2, 1, RW},
6460 },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006461 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6462 .unlock = spi_disable_blockprotect_bp2_srwd,
6463 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006464 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006465 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006466 .prepare_access = spi_prepare_io,
6467 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006468 },
6469
6470 {
6471 .vendor = "Fudan",
6472 .name = "FM25Q16",
6473 .bustype = BUS_SPI,
6474 .manufacture_id = FUDAN_ID_NOPREFIX,
6475 .model_id = FUDAN_FM25Q16,
6476 .total_size = 2048,
6477 .page_size = 256,
6478 /* supports SFDP */
6479 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber226bb872024-04-09 23:30:34 +02006480 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 |
6481 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006482 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006483 .tested = TEST_UNTESTED,
6484 .probe = probe_spi_rdid,
6485 .probe_timing = TIMING_ZERO,
6486 .block_erasers = {
6487 {
6488 .eraseblocks = { {4 * 1024, 512} },
6489 .block_erase = spi_block_erase_20,
6490 }, {
6491 .eraseblocks = { {32 * 1024, 64} },
6492 .block_erase = spi_block_erase_52,
6493 }, {
6494 .eraseblocks = { {64 * 1024, 32} },
6495 .block_erase = spi_block_erase_d8,
6496 }, {
6497 .eraseblocks = { {2 * 1024 * 1024, 1} },
6498 .block_erase = spi_block_erase_60,
6499 }, {
6500 .eraseblocks = { {2 * 1024 * 1024, 1} },
6501 .block_erase = spi_block_erase_c7,
6502 }
6503 },
Nico Huber226bb872024-04-09 23:30:34 +02006504 .reg_bits =
6505 {
6506 .qe = {STATUS2, 1, RW},
6507 },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006508 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6509 .unlock = spi_disable_blockprotect_bp2_srwd,
6510 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006511 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006512 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006513 .prepare_access = spi_prepare_io,
6514 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006515 },
6516
6517 {
6518 .vendor = "Fudan",
6519 .name = "FM25Q32",
6520 .bustype = BUS_SPI,
6521 .manufacture_id = FUDAN_ID_NOPREFIX,
6522 .model_id = FUDAN_FM25Q32,
6523 .total_size = 4096,
6524 .page_size = 256,
6525 /* supports SFDP */
6526 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber226bb872024-04-09 23:30:34 +02006527 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 |
6528 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006529 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006530 .tested = TEST_UNTESTED,
6531 .probe = probe_spi_rdid,
6532 .probe_timing = TIMING_ZERO,
6533 .block_erasers = {
6534 {
6535 .eraseblocks = { {4 * 1024, 1024} },
6536 .block_erase = spi_block_erase_20,
6537 }, {
6538 .eraseblocks = { {32 * 1024, 128} },
6539 .block_erase = spi_block_erase_52,
6540 }, {
6541 .eraseblocks = { {64 * 1024, 64} },
6542 .block_erase = spi_block_erase_d8,
6543 }, {
6544 .eraseblocks = { {4 * 1024 * 1024, 1} },
6545 .block_erase = spi_block_erase_60,
6546 }, {
6547 .eraseblocks = { {4 * 1024 * 1024, 1} },
6548 .block_erase = spi_block_erase_c7,
6549 },
6550 },
Nico Huber226bb872024-04-09 23:30:34 +02006551 .reg_bits =
6552 {
6553 .qe = {STATUS2, 1, RW},
6554 },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006555 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6556 .unlock = spi_disable_blockprotect_bp2_srwd,
6557 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006558 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006559 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006560 .prepare_access = spi_prepare_io,
6561 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006562 },
6563
6564 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006565 .vendor = "Fujitsu",
6566 .name = "MBM29F004BC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006567 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006568 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006569 .model_id = FUJITSU_MBM29F004BC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006570 .total_size = 512,
6571 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +00006572 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006573 .tested = TEST_UNTESTED,
6574 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00006575 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006576 .block_erasers =
6577 {
6578 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00006579 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006580 {16 * 1024, 1},
6581 {8 * 1024, 2},
6582 {32 * 1024, 1},
6583 {64 * 1024, 7},
6584 },
Sean Nelson35727f72010-01-28 23:55:12 +00006585 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006586 }, {
6587 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +00006588 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006589 },
6590 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006591 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006592 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006593 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006594 .prepare_access = prepare_memory_access,
6595 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006596 },
6597
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006598 {
6599 .vendor = "Fujitsu",
6600 .name = "MBM29F004TC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006601 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006602 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006603 .model_id = FUJITSU_MBM29F004TC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006604 .total_size = 512,
6605 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +00006606 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006607 .tested = TEST_UNTESTED,
6608 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00006609 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006610 .block_erasers =
6611 {
6612 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00006613 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006614 {64 * 1024, 7},
6615 {32 * 1024, 1},
6616 {8 * 1024, 2},
6617 {16 * 1024, 1},
6618 },
Sean Nelson35727f72010-01-28 23:55:12 +00006619 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006620 }, {
6621 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +00006622 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006623 },
6624 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006625 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006626 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006627 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006628 .prepare_access = prepare_memory_access,
6629 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006630 },
6631
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006632 {
Sean Nelson35727f72010-01-28 23:55:12 +00006633 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006634 .vendor = "Fujitsu",
6635 .name = "MBM29F400BC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006636 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006637 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006638 .model_id = FUJITSU_MBM29F400BC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006639 .total_size = 512,
6640 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006641 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +00006642 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006643 .probe = probe_jedec,
6644 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson6b11ad22009-12-23 17:05:59 +00006645 .block_erasers =
6646 {
6647 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00006648 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006649 {16 * 1024, 1},
6650 {8 * 1024, 2},
6651 {32 * 1024, 1},
6652 {64 * 1024, 7},
6653 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006654 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006655 }, {
6656 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006657 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006658 },
6659 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006660 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006661 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00006662 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01006663 .prepare_access = prepare_memory_access,
6664 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006665 },
6666
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006667 {
6668 .vendor = "Fujitsu",
6669 .name = "MBM29F400TC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006670 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006671 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006672 .model_id = FUJITSU_MBM29F400TC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006673 .total_size = 512,
6674 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006675 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006676 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006677 .probe = probe_jedec,
6678 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson6b11ad22009-12-23 17:05:59 +00006679 .block_erasers =
6680 {
6681 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00006682 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006683 {64 * 1024, 7},
6684 {32 * 1024, 1},
6685 {8 * 1024, 2},
6686 {16 * 1024, 1},
6687 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006688 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006689 }, {
6690 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006691 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00006692 },
6693 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006694 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006695 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00006696 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01006697 .prepare_access = prepare_memory_access,
6698 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006699 },
6700
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006701 {
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006702 .vendor = "Fujitsu",
6703 .name = "MBM29LV160BE",
6704 .bustype = BUS_PARALLEL,
6705 .manufacture_id = FUJITSU_ID,
6706 .model_id = FUJITSU_MBM29LV160BE,
6707 .total_size = 2 * 1024,
6708 .page_size = 0,
6709 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_SHORT_RESET,
6710 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006711 .probe = probe_jedec,
6712 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006713 .block_erasers =
6714 {
6715 {
6716 .eraseblocks = {
6717 {16 * 1024, 1},
6718 {8 * 1024, 2},
6719 {32 * 1024, 1},
6720 {64 * 1024, 31},
6721 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006722 .block_erase = erase_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006723 }, {
6724 .eraseblocks = { {2048 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006725 .block_erase = erase_chip_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006726 },
6727 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006728 .write = write_jedec_1, /* Supports a fast mode too */
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006729 .read = read_memmapped,
6730 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01006731 .prepare_access = prepare_memory_access,
6732 .finish_access = finish_memory_access,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006733 },
6734
6735 {
6736 .vendor = "Fujitsu",
6737 .name = "MBM29LV160TE",
6738 .bustype = BUS_PARALLEL,
6739 .manufacture_id = FUJITSU_ID,
6740 .model_id = FUJITSU_MBM29LV160TE,
6741 .total_size = 2 * 1024,
6742 .page_size = 0,
6743 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_SHORT_RESET,
6744 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006745 .probe = probe_jedec,
6746 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006747 .block_erasers =
6748 {
6749 {
6750 .eraseblocks = {
6751 {64 * 1024, 31},
6752 {32 * 1024, 1},
6753 {8 * 1024, 2},
6754 {16 * 1024, 1},
6755 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006756 .block_erase = erase_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006757 }, {
6758 .eraseblocks = { {2048 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006759 .block_erase = erase_chip_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006760 },
6761 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00006762 .write = write_jedec_1, /* Supports a fast mode too */
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006763 .read = read_memmapped,
6764 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01006765 .prepare_access = prepare_memory_access,
6766 .finish_access = finish_memory_access,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00006767 },
6768
6769 {
Justin Chevrier1525b2a2012-04-14 21:59:23 +00006770 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006771 .name = "GD25B128B/GD25Q128B",
Roman Titov95edc892015-04-03 21:29:04 +00006772 .bustype = BUS_SPI,
6773 .manufacture_id = GIGADEVICE_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006774 .model_id = GIGADEVICE_GD25Q128,
6775 .total_size = 16384,
Roman Titov95edc892015-04-03 21:29:04 +00006776 .page_size = 256,
6777 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006778 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006779 .tested = TEST_OK_PREW,
Roman Titov95edc892015-04-03 21:29:04 +00006780 .probe = probe_spi_rdid,
6781 .probe_timing = TIMING_ZERO,
6782 .block_erasers =
6783 {
6784 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006785 .eraseblocks = { {4 * 1024, 4096} },
Roman Titov95edc892015-04-03 21:29:04 +00006786 .block_erase = spi_block_erase_20,
6787 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006788 .eraseblocks = { {32 * 1024, 512} },
Roman Titov95edc892015-04-03 21:29:04 +00006789 .block_erase = spi_block_erase_52,
6790 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006791 .eraseblocks = { {64 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00006792 .block_erase = spi_block_erase_d8,
6793 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006794 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00006795 .block_erase = spi_block_erase_60,
6796 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006797 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00006798 .block_erase = spi_block_erase_c7,
6799 }
6800 },
Nico Huber4da971f2024-03-27 01:18:12 +01006801 .reg_bits =
6802 {
6803 .qe = {STATUS2, 1, RW}, /* RO 1 in GD25B128B case */
6804 },
Roman Titov95edc892015-04-03 21:29:04 +00006805 .printlock = spi_prettyprint_status_register_bp4_srwd,
6806 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6807 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006808 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006809 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006810 .prepare_access = spi_prepare_io,
6811 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00006812 },
6813
6814 {
6815 .vendor = "GigaDevice",
Edward O'Callaghan981a3442021-06-22 11:16:55 +10006816 .name = "GD25LQ128C/GD25LQ128D/GD25LQ128E",
Roman Titov95edc892015-04-03 21:29:04 +00006817 .bustype = BUS_SPI,
6818 .manufacture_id = GIGADEVICE_ID,
Alan Green188127e2019-08-06 16:10:34 +10006819 .model_id = GIGADEVICE_GD25LQ128CD,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006820 .total_size = 16384,
Roman Titov95edc892015-04-03 21:29:04 +00006821 .page_size = 256,
6822 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006823 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
6824 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03006825 .tested = TEST_OK_PREWB,
Roman Titov95edc892015-04-03 21:29:04 +00006826 .probe = probe_spi_rdid,
6827 .probe_timing = TIMING_ZERO,
6828 .block_erasers =
6829 {
6830 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006831 .eraseblocks = { {4 * 1024, 4096} },
Roman Titov95edc892015-04-03 21:29:04 +00006832 .block_erase = spi_block_erase_20,
6833 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006834 .eraseblocks = { {32 * 1024, 512} },
Roman Titov95edc892015-04-03 21:29:04 +00006835 .block_erase = spi_block_erase_52,
6836 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006837 .eraseblocks = { {64 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00006838 .block_erase = spi_block_erase_d8,
6839 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006840 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00006841 .block_erase = spi_block_erase_60,
6842 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006843 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00006844 .block_erase = spi_block_erase_c7,
6845 }
6846 },
6847 .printlock = spi_prettyprint_status_register_bp4_srwd,
6848 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6849 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006850 .read = spi_chip_read,
Roman Titov95edc892015-04-03 21:29:04 +00006851 .voltage = {1695, 1950},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11006852 .reg_bits =
6853 {
Nico Huber4da971f2024-03-27 01:18:12 +01006854 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11006855 .srp = {STATUS1, 7, RW},
6856 .srl = {STATUS2, 0, RW},
6857 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6858 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
6859 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
6860 .cmp = {STATUS2, 6, RW},
6861 },
Nico Huberaabb3e02023-01-13 00:22:30 +01006862 .wp_write_cfg = spi_wp_write_cfg,
6863 .wp_read_cfg = spi_wp_read_cfg,
6864 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11006865 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02006866 .prepare_access = spi_prepare_io,
6867 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00006868 },
6869
6870 {
6871 .vendor = "GigaDevice",
6872 .name = "GD25LQ16",
6873 .bustype = BUS_SPI,
6874 .manufacture_id = GIGADEVICE_ID,
6875 .model_id = GIGADEVICE_GD25LQ16,
6876 .total_size = 2048,
6877 .page_size = 256,
6878 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006879 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ16C */
6880 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Roman Titov95edc892015-04-03 21:29:04 +00006881 .tested = TEST_UNTESTED,
6882 .probe = probe_spi_rdid,
6883 .probe_timing = TIMING_ZERO,
6884 .block_erasers =
6885 {
6886 {
6887 .eraseblocks = { {4 * 1024, 512} },
6888 .block_erase = spi_block_erase_20,
6889 }, {
6890 .eraseblocks = { {32 * 1024, 64} },
6891 .block_erase = spi_block_erase_52,
6892 }, {
6893 .eraseblocks = { {64 * 1024, 32} },
6894 .block_erase = spi_block_erase_d8,
6895 }, {
6896 .eraseblocks = { {2 * 1024 * 1024, 1} },
6897 .block_erase = spi_block_erase_60,
6898 }, {
6899 .eraseblocks = { {2 * 1024 * 1024, 1} },
6900 .block_erase = spi_block_erase_c7,
6901 }
6902 },
Nico Huber4da971f2024-03-27 01:18:12 +01006903 .reg_bits =
6904 {
6905 .qe = {STATUS2, 1, RW},
6906 },
Roman Titov95edc892015-04-03 21:29:04 +00006907 .printlock = spi_prettyprint_status_register_bp4_srwd,
6908 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6909 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006910 .read = spi_chip_read,
Roman Titov95edc892015-04-03 21:29:04 +00006911 .voltage = {1695, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006912 .prepare_access = spi_prepare_io,
6913 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00006914 },
6915
6916 {
6917 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006918 .name = "GD25LQ32",
6919 .bustype = BUS_SPI,
6920 .manufacture_id = GIGADEVICE_ID,
6921 .model_id = GIGADEVICE_GD25LQ32,
6922 .total_size = 4096,
6923 .page_size = 256,
6924 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006925 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
6926 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006927 .tested = TEST_OK_PREW,
6928 .probe = probe_spi_rdid,
6929 .probe_timing = TIMING_ZERO,
6930 .block_erasers =
6931 {
6932 {
6933 .eraseblocks = { {4 * 1024, 1024} },
6934 .block_erase = spi_block_erase_20,
6935 }, {
6936 .eraseblocks = { {32 * 1024, 128} },
6937 .block_erase = spi_block_erase_52,
6938 }, {
6939 .eraseblocks = { {64 * 1024, 64} },
6940 .block_erase = spi_block_erase_d8,
6941 }, {
6942 .eraseblocks = { {4 * 1024 * 1024, 1} },
6943 .block_erase = spi_block_erase_60,
6944 }, {
6945 .eraseblocks = { {4 * 1024 * 1024, 1} },
6946 .block_erase = spi_block_erase_c7,
6947 }
6948 },
Nico Huber4da971f2024-03-27 01:18:12 +01006949 .reg_bits =
6950 {
6951 .qe = {STATUS2, 1, RW},
6952 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00006953 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00006954 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
6955 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01006956 .read = spi_chip_read,
Roman Titov95edc892015-04-03 21:29:04 +00006957 .voltage = {1695, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006958 .prepare_access = spi_prepare_io,
6959 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00006960 },
6961
6962 {
6963 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006964 .name = "GD25LQ40",
6965 .bustype = BUS_SPI,
6966 .manufacture_id = GIGADEVICE_ID,
6967 .model_id = GIGADEVICE_GD25LQ40,
6968 .total_size = 512,
6969 .page_size = 256,
6970 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01006971 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ40B, LQ40C */
6972 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006973 .tested = TEST_UNTESTED,
6974 .probe = probe_spi_rdid,
6975 .probe_timing = TIMING_ZERO,
6976 .block_erasers =
6977 {
6978 {
6979 .eraseblocks = { {4 * 1024, 128} },
6980 .block_erase = spi_block_erase_20,
6981 }, {
6982 .eraseblocks = { {32 * 1024, 16} },
6983 .block_erase = spi_block_erase_52,
6984 }, {
6985 .eraseblocks = { {64 * 1024, 8} },
6986 .block_erase = spi_block_erase_d8,
6987 }, {
6988 .eraseblocks = { {512 * 1024, 1} },
6989 .block_erase = spi_block_erase_60,
6990 }, {
6991 .eraseblocks = { {512 * 1024, 1} },
6992 .block_erase = spi_block_erase_c7,
6993 }
6994 },
Nico Huber4da971f2024-03-27 01:18:12 +01006995 .reg_bits =
6996 {
6997 .qe = {STATUS2, 1, RW},
6998 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006999 .printlock = spi_prettyprint_status_register_bp4_srwd,
7000 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7001 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007002 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007003 .voltage = {1695, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02007004 .prepare_access = spi_prepare_io,
7005 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007006 },
7007
7008 {
7009 .vendor = "GigaDevice",
Roman Titov95edc892015-04-03 21:29:04 +00007010 .name = "GD25LQ64(B)",
7011 .bustype = BUS_SPI,
7012 .manufacture_id = GIGADEVICE_ID,
7013 .model_id = GIGADEVICE_GD25LQ64,
7014 .total_size = 8192,
7015 .page_size = 256,
7016 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007017 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
7018 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007019 .tested = TEST_OK_PREWB,
Roman Titov95edc892015-04-03 21:29:04 +00007020 .probe = probe_spi_rdid,
7021 .probe_timing = TIMING_ZERO,
7022 .block_erasers =
7023 {
7024 {
7025 .eraseblocks = { {4 * 1024, 2048} },
7026 .block_erase = spi_block_erase_20,
7027 }, {
7028 .eraseblocks = { {32 * 1024, 256} },
7029 .block_erase = spi_block_erase_52,
7030 }, {
7031 .eraseblocks = { {64 * 1024, 128} },
7032 .block_erase = spi_block_erase_d8,
7033 }, {
7034 .eraseblocks = { {8 * 1024 * 1024, 1} },
7035 .block_erase = spi_block_erase_60,
7036 }, {
7037 .eraseblocks = { {8 * 1024 * 1024, 1} },
7038 .block_erase = spi_block_erase_c7,
7039 }
7040 },
7041 .printlock = spi_prettyprint_status_register_bp4_srwd,
7042 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7043 .write = spi_chip_write_256,
7044 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
7045 .voltage = {1695, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007046 .reg_bits =
7047 {
Nico Huber4da971f2024-03-27 01:18:12 +01007048 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007049 .srp = {STATUS1, 7, RW},
7050 .srl = {STATUS2, 0, RW},
7051 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7052 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7053 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7054 .cmp = {STATUS2, 6, RW},
7055 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007056 .wp_write_cfg = spi_wp_write_cfg,
7057 .wp_read_cfg = spi_wp_read_cfg,
7058 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007059 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007060 .prepare_access = spi_prepare_io,
7061 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00007062 },
7063
7064 {
7065 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007066 .name = "GD25LQ80",
Roman Titov95edc892015-04-03 21:29:04 +00007067 .bustype = BUS_SPI,
7068 .manufacture_id = GIGADEVICE_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007069 .model_id = GIGADEVICE_GD25LQ80,
7070 .total_size = 1024,
Roman Titov95edc892015-04-03 21:29:04 +00007071 .page_size = 256,
7072 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007073 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ80B, LQ80C */
7074 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Roman Titov95edc892015-04-03 21:29:04 +00007075 .tested = TEST_UNTESTED,
7076 .probe = probe_spi_rdid,
7077 .probe_timing = TIMING_ZERO,
7078 .block_erasers =
7079 {
7080 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007081 .eraseblocks = { {4 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00007082 .block_erase = spi_block_erase_20,
7083 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007084 .eraseblocks = { {32 * 1024, 32} },
Roman Titov95edc892015-04-03 21:29:04 +00007085 .block_erase = spi_block_erase_52,
7086 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007087 .eraseblocks = { {64 * 1024, 16} },
Roman Titov95edc892015-04-03 21:29:04 +00007088 .block_erase = spi_block_erase_d8,
7089 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007090 .eraseblocks = { {1 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00007091 .block_erase = spi_block_erase_60,
7092 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007093 .eraseblocks = { {1 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00007094 .block_erase = spi_block_erase_c7,
7095 }
7096 },
Nico Huber4da971f2024-03-27 01:18:12 +01007097 .reg_bits =
7098 {
7099 .qe = {STATUS2, 1, RW},
7100 },
Roman Titov95edc892015-04-03 21:29:04 +00007101 .printlock = spi_prettyprint_status_register_bp4_srwd,
7102 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7103 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007104 .read = spi_chip_read,
Roman Titov95edc892015-04-03 21:29:04 +00007105 .voltage = {1695, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02007106 .prepare_access = spi_prepare_io,
7107 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007108 },
7109
7110 {
7111 .vendor = "GigaDevice",
Naresh Solanki768cfc42024-10-04 20:17:34 +05307112 .name = "GD25LR512ME",
7113 .bustype = BUS_SPI,
7114 .manufacture_id = GIGADEVICE_ID,
7115 .model_id = GIGADEVICE_GD25LR512ME,
7116 .total_size = 65536,
7117 .page_size = 256,
7118 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
7119 .tested = TEST_OK_PREW,
7120 .probe = probe_spi_rdid,
7121 .probe_timing = TIMING_ZERO,
7122 .block_erasers =
7123 {
7124 {
7125 .eraseblocks = { {4 * 1024, 16384} },
7126 .block_erase = spi_block_erase_21,
7127 }, {
7128 .eraseblocks = { {4 * 1024, 16384} },
7129 .block_erase = spi_block_erase_20,
7130 }, {
7131 .eraseblocks = { {32 * 1024, 2048} },
7132 .block_erase = spi_block_erase_52,
7133 }, {
7134 .eraseblocks = { {32 * 1024, 2048} },
7135 .block_erase = spi_block_erase_5c,
7136 }, {
7137 .eraseblocks = { {64 * 1024, 1024} },
7138 .block_erase = spi_block_erase_dc,
7139 }, {
7140 .eraseblocks = { {64 * 1024, 1024} },
7141 .block_erase = spi_block_erase_d8,
7142 }, {
7143 .eraseblocks = { {64 * 1024 * 1024, 1} },
7144 .block_erase = spi_block_erase_60,
7145 }, {
7146 .eraseblocks = { {64 * 1024 * 1024, 1} },
7147 .block_erase = spi_block_erase_c7,
7148 }
7149 },
7150 .printlock = spi_prettyprint_status_register_bp4_srwd,
7151 .unlock = spi_disable_blockprotect_bp4_srwd,
7152 .write = spi_chip_write_256,
7153 .read = spi_chip_read,
7154 .voltage = {1650, 2000},
7155 .prepare_access = spi_prepare_io,
7156 .finish_access = spi_finish_io,
7157 },
7158
7159 {
7160 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007161 .name = "GD25Q10",
7162 .bustype = BUS_SPI,
7163 .manufacture_id = GIGADEVICE_ID,
7164 .model_id = GIGADEVICE_GD25Q10,
7165 .total_size = 128,
7166 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007167 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007168 .tested = TEST_UNTESTED,
7169 .probe = probe_spi_rdid,
7170 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10007171 .block_erasers =
7172 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007173 {
7174 .eraseblocks = { {4 * 1024, 32} },
7175 .block_erase = spi_block_erase_20,
7176 }, {
7177 .eraseblocks = { {32 * 1024, 4} },
7178 .block_erase = spi_block_erase_52,
7179 }, {
7180 .eraseblocks = { {64 * 1024, 2} },
7181 .block_erase = spi_block_erase_d8,
7182 }, {
7183 .eraseblocks = { {128 * 1024, 1} },
7184 .block_erase = spi_block_erase_60,
7185 }, {
7186 .eraseblocks = { {128 * 1024, 1} },
7187 .block_erase = spi_block_erase_c7,
7188 }
7189 },
Nico Huber4da971f2024-03-27 01:18:12 +01007190 .reg_bits =
7191 {
7192 .qe = {STATUS2, 1, RW},
7193 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00007194 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007195 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7196 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007197 .read = spi_chip_read,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007198 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007199 .prepare_access = spi_prepare_io,
7200 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007201 },
7202
7203 {
7204 .vendor = "GigaDevice",
Nico Huber68573af2024-01-06 18:28:22 +01007205 .name = "GD25Q127C",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007206 .bustype = BUS_SPI,
7207 .manufacture_id = GIGADEVICE_ID,
7208 .model_id = GIGADEVICE_GD25Q128,
7209 .total_size = 16384,
7210 .page_size = 256,
7211 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
Nico Huber1412d9f2024-01-06 18:25:49 +01007212 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007213 .tested = TEST_OK_PREWB,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007214 .probe = probe_spi_rdid,
7215 .probe_timing = TIMING_ZERO,
7216 .block_erasers =
7217 {
7218 {
7219 .eraseblocks = { {4 * 1024, 4096} },
7220 .block_erase = spi_block_erase_20,
7221 }, {
7222 .eraseblocks = { {32 * 1024, 512} },
7223 .block_erase = spi_block_erase_52,
7224 }, {
7225 .eraseblocks = { {64 * 1024, 256} },
7226 .block_erase = spi_block_erase_d8,
7227 }, {
7228 .eraseblocks = { {16 * 1024 * 1024, 1} },
7229 .block_erase = spi_block_erase_60,
7230 }, {
7231 .eraseblocks = { {16 * 1024 * 1024, 1} },
7232 .block_erase = spi_block_erase_c7,
7233 }
7234 },
7235 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
7236 .printlock = spi_prettyprint_status_register_bp4_srwd,
7237 .unlock = spi_disable_blockprotect_bp4_srwd,
7238 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007239 .read = spi_chip_read,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007240 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007241 .reg_bits =
7242 {
Nico Huber4da971f2024-03-27 01:18:12 +01007243 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007244 .srp = {STATUS1, 7, RW},
7245 .srl = {STATUS2, 0, RW},
7246 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7247 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7248 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7249 .cmp = {STATUS2, 6, RW},
7250 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007251 .wp_write_cfg = spi_wp_write_cfg,
7252 .wp_read_cfg = spi_wp_read_cfg,
7253 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007254 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007255 .prepare_access = spi_prepare_io,
7256 .finish_access = spi_finish_io,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007257 },
7258
7259 {
7260 .vendor = "GigaDevice",
Nico Huber68573af2024-01-06 18:28:22 +01007261 .name = "GD25Q128C",
7262 .bustype = BUS_SPI,
7263 .manufacture_id = GIGADEVICE_ID,
7264 .model_id = GIGADEVICE_GD25Q128,
7265 .total_size = 16384,
7266 .page_size = 256,
7267 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
7268 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
7269 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
7270 .tested = TEST_OK_PREWB,
7271 .probe = probe_spi_rdid,
7272 .probe_timing = TIMING_ZERO,
7273 .block_erasers =
7274 {
7275 {
7276 .eraseblocks = { {4 * 1024, 4096} },
7277 .block_erase = spi_block_erase_20,
7278 }, {
7279 .eraseblocks = { {32 * 1024, 512} },
7280 .block_erase = spi_block_erase_52,
7281 }, {
7282 .eraseblocks = { {64 * 1024, 256} },
7283 .block_erase = spi_block_erase_d8,
7284 }, {
7285 .eraseblocks = { {16 * 1024 * 1024, 1} },
7286 .block_erase = spi_block_erase_60,
7287 }, {
7288 .eraseblocks = { {16 * 1024 * 1024, 1} },
7289 .block_erase = spi_block_erase_c7,
7290 }
7291 },
7292 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
7293 .printlock = spi_prettyprint_status_register_bp4_srwd,
7294 .unlock = spi_disable_blockprotect_bp4_srwd,
7295 .write = spi_chip_write_256,
7296 .read = spi_chip_read,
7297 .voltage = {2700, 3600},
7298 .reg_bits =
7299 {
7300 .qe = {STATUS2, 1, RW},
7301 .srp = {STATUS1, 7, RW},
7302 .srl = {STATUS2, 0, RW},
7303 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7304 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7305 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7306 .cmp = {STATUS2, 6, RW},
7307 },
Nico Huber2a1036b2024-10-20 23:19:49 +02007308 .wp_write_cfg = spi_wp_write_cfg,
7309 .wp_read_cfg = spi_wp_read_cfg,
7310 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber68573af2024-01-06 18:28:22 +01007311 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007312 .prepare_access = spi_prepare_io,
7313 .finish_access = spi_finish_io,
Nico Huber68573af2024-01-06 18:28:22 +01007314 },
7315
7316 {
7317 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007318 .name = "GD25Q16(B)",
7319 .bustype = BUS_SPI,
7320 .manufacture_id = GIGADEVICE_ID,
7321 .model_id = GIGADEVICE_GD25Q16,
7322 .total_size = 2048,
7323 .page_size = 256,
7324 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01007325 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007326 .tested = TEST_OK_PREW,
7327 .probe = probe_spi_rdid,
7328 .probe_timing = TIMING_ZERO,
7329 .block_erasers =
7330 {
7331 {
7332 .eraseblocks = { {4 * 1024, 512} },
7333 .block_erase = spi_block_erase_20,
7334 }, {
7335 .eraseblocks = { {32 * 1024, 64} },
7336 .block_erase = spi_block_erase_52,
7337 }, {
7338 .eraseblocks = { {64 * 1024, 32} },
7339 .block_erase = spi_block_erase_d8,
7340 }, {
7341 .eraseblocks = { {2 * 1024 * 1024, 1} },
7342 .block_erase = spi_block_erase_60,
7343 }, {
7344 .eraseblocks = { {2 * 1024 * 1024, 1} },
7345 .block_erase = spi_block_erase_c7,
7346 }
7347 },
Nico Huber4da971f2024-03-27 01:18:12 +01007348 .reg_bits =
7349 {
7350 .qe = {STATUS2, 1, RW},
7351 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007352 .printlock = spi_prettyprint_status_register_bp4_srwd,
7353 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7354 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007355 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007356 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007357 .prepare_access = spi_prepare_io,
7358 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007359 },
7360
7361 {
7362 .vendor = "GigaDevice",
7363 .name = "GD25Q20(B)",
7364 .bustype = BUS_SPI,
7365 .manufacture_id = GIGADEVICE_ID,
7366 .model_id = GIGADEVICE_GD25Q20,
7367 .total_size = 256,
7368 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007369 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007370 .tested = TEST_OK_PREW,
7371 .probe = probe_spi_rdid,
7372 .probe_timing = TIMING_ZERO,
7373 .block_erasers =
7374 {
7375 {
7376 .eraseblocks = { {4 * 1024, 64} },
7377 .block_erase = spi_block_erase_20,
7378 }, {
7379 .eraseblocks = { {32 * 1024, 8} },
7380 .block_erase = spi_block_erase_52,
7381 }, {
7382 .eraseblocks = { {64 * 1024, 4} },
7383 .block_erase = spi_block_erase_d8,
7384 }, {
7385 .eraseblocks = { {256 * 1024, 1} },
7386 .block_erase = spi_block_erase_60,
7387 }, {
7388 .eraseblocks = { {256 * 1024, 1} },
7389 .block_erase = spi_block_erase_c7,
7390 }
7391 },
Nico Huber4da971f2024-03-27 01:18:12 +01007392 .reg_bits = {
7393 .qe = {STATUS2, 1, RW},
7394 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007395 .printlock = spi_prettyprint_status_register_bp4_srwd,
7396 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7397 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007398 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007399 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007400 .prepare_access = spi_prepare_io,
7401 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007402 },
7403
7404 {
7405 .vendor = "GigaDevice",
Nikolai Artemiev3ca0af02022-06-17 15:10:18 +10007406 .name = "GD25Q256D/GD25Q256E",
Alan Green86fc9cf2019-08-26 15:02:12 +10007407 .bustype = BUS_SPI,
7408 .manufacture_id = GIGADEVICE_ID,
7409 .model_id = GIGADEVICE_GD25Q256D,
7410 .total_size = 32768,
7411 .page_size = 256,
Nikolai Artemievb931e7a2022-12-05 13:06:14 +11007412 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA |
Nico Huber4da971f2024-03-27 01:18:12 +01007413 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
7414 FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007415 .tested = TEST_OK_PREWB,
Alan Green86fc9cf2019-08-26 15:02:12 +10007416 .probe = probe_spi_rdid,
7417 .probe_timing = TIMING_ZERO,
7418 .block_erasers =
7419 {
7420 {
7421 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber5374dc32019-10-04 16:16:15 +02007422 .block_erase = spi_block_erase_21,
7423 }, {
7424 .eraseblocks = { {4 * 1024, 8192} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007425 .block_erase = spi_block_erase_20,
7426 }, {
7427 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber5374dc32019-10-04 16:16:15 +02007428 .block_erase = spi_block_erase_5c,
7429 }, {
7430 .eraseblocks = { {32 * 1024, 1024} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007431 .block_erase = spi_block_erase_52,
7432 }, {
7433 .eraseblocks = { {64 * 1024, 512} },
Nico Huber5374dc32019-10-04 16:16:15 +02007434 .block_erase = spi_block_erase_dc,
7435 }, {
7436 .eraseblocks = { {64 * 1024, 512} },
Alan Green86fc9cf2019-08-26 15:02:12 +10007437 .block_erase = spi_block_erase_d8,
7438 }, {
7439 .eraseblocks = { {32 * 1024 * 1024, 1} },
7440 .block_erase = spi_block_erase_60,
7441 }, {
7442 .eraseblocks = { {32 * 1024 * 1024, 1} },
7443 .block_erase = spi_block_erase_c7,
7444 }
7445 },
7446 .printlock = spi_prettyprint_status_register_bp3_srwd,
7447 .unlock = spi_disable_blockprotect,
7448 .write = spi_chip_write_256,
7449 .read = spi_chip_read,
7450 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007451 .reg_bits =
7452 {
Nico Huber4da971f2024-03-27 01:18:12 +01007453 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007454 .srp = {STATUS1, 7, RW},
7455 .srl = {STATUS2, 6, RW},
7456 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
7457 .tb = {STATUS1, 6, RW},
7458 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007459 .wp_write_cfg = spi_wp_write_cfg,
7460 .wp_read_cfg = spi_wp_read_cfg,
7461 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007462 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007463 .prepare_access = spi_prepare_io,
7464 .finish_access = spi_finish_io,
Alan Green86fc9cf2019-08-26 15:02:12 +10007465 },
7466
7467 {
7468 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007469 .name = "GD25Q32(B)",
7470 .bustype = BUS_SPI,
7471 .manufacture_id = GIGADEVICE_ID,
7472 .model_id = GIGADEVICE_GD25Q32,
7473 .total_size = 4096,
7474 .page_size = 256,
7475 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007476 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007477 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007478 .probe = probe_spi_rdid,
7479 .probe_timing = TIMING_ZERO,
7480 .block_erasers =
7481 {
7482 {
7483 .eraseblocks = { {4 * 1024, 1024} },
7484 .block_erase = spi_block_erase_20,
7485 }, {
7486 .eraseblocks = { {32 * 1024, 128} },
7487 .block_erase = spi_block_erase_52,
7488 }, {
7489 .eraseblocks = { {64 * 1024, 64} },
7490 .block_erase = spi_block_erase_d8,
7491 }, {
7492 .eraseblocks = { {4 * 1024 * 1024, 1} },
7493 .block_erase = spi_block_erase_60,
7494 }, {
7495 .eraseblocks = { {4 * 1024 * 1024, 1} },
7496 .block_erase = spi_block_erase_c7,
7497 }
7498 },
7499 .printlock = spi_prettyprint_status_register_bp4_srwd,
7500 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7501 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007502 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007503 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007504 .reg_bits =
7505 {
Nico Huber4da971f2024-03-27 01:18:12 +01007506 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007507 .srp = {STATUS1, 7, RW},
7508 .srl = {STATUS2, 0, RW},
7509 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7510 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7511 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7512 .cmp = {STATUS2, 6, RW},
7513 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007514 .wp_write_cfg = spi_wp_write_cfg,
7515 .wp_read_cfg = spi_wp_read_cfg,
7516 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007517 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007518 .prepare_access = spi_prepare_io,
7519 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007520 },
7521
7522 {
7523 .vendor = "GigaDevice",
7524 .name = "GD25Q40(B)",
7525 .bustype = BUS_SPI,
7526 .manufacture_id = GIGADEVICE_ID,
7527 .model_id = GIGADEVICE_GD25Q40,
7528 .total_size = 512,
7529 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007530 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Simon Buhrow551664c2022-03-09 16:09:08 +01007531 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007532 .probe = probe_spi_rdid,
7533 .probe_timing = TIMING_ZERO,
7534 .block_erasers =
7535 {
7536 {
7537 .eraseblocks = { {4 * 1024, 128} },
7538 .block_erase = spi_block_erase_20,
7539 }, {
7540 .eraseblocks = { {32 * 1024, 16} },
7541 .block_erase = spi_block_erase_52,
7542 }, {
7543 .eraseblocks = { {64 * 1024, 8} },
7544 .block_erase = spi_block_erase_d8,
7545 }, {
7546 .eraseblocks = { {512 * 1024, 1} },
7547 .block_erase = spi_block_erase_60,
7548 }, {
7549 .eraseblocks = { {512 * 1024, 1} },
7550 .block_erase = spi_block_erase_c7,
7551 }
7552 },
Nico Huber4da971f2024-03-27 01:18:12 +01007553 .reg_bits =
7554 {
7555 .qe = {STATUS2, 1, RW},
7556 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007557 .printlock = spi_prettyprint_status_register_bp4_srwd,
7558 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7559 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007560 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007561 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007562 .prepare_access = spi_prepare_io,
7563 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007564 },
7565
7566 {
7567 .vendor = "GigaDevice",
7568 .name = "GD25Q512",
7569 .bustype = BUS_SPI,
7570 .manufacture_id = GIGADEVICE_ID,
7571 .model_id = GIGADEVICE_GD25Q512,
7572 .total_size = 64,
7573 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007574 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007575 .tested = TEST_OK_PREW,
7576 .probe = probe_spi_rdid,
7577 .probe_timing = TIMING_ZERO,
7578 .block_erasers =
7579 {
7580 {
7581 .eraseblocks = { {4 * 1024, 16} },
7582 .block_erase = spi_block_erase_20,
7583 }, {
7584 .eraseblocks = { {32 * 1024, 2} },
7585 .block_erase = spi_block_erase_52,
7586 }, {
7587 .eraseblocks = { {64 * 1024, 1} },
7588 .block_erase = spi_block_erase_60,
7589 }, {
7590 .eraseblocks = { {64 * 1024, 1} },
7591 .block_erase = spi_block_erase_c7,
7592 }
7593 },
Nico Huber4da971f2024-03-27 01:18:12 +01007594 .reg_bits =
7595 {
7596 .qe = {STATUS2, 1, RW},
7597 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007598 .printlock = spi_prettyprint_status_register_bp4_srwd,
7599 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7600 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007601 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007602 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007603 .prepare_access = spi_prepare_io,
7604 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007605 },
7606
7607 {
7608 .vendor = "GigaDevice",
7609 .name = "GD25Q64(B)",
7610 .bustype = BUS_SPI,
7611 .manufacture_id = GIGADEVICE_ID,
7612 .model_id = GIGADEVICE_GD25Q64,
7613 .total_size = 8192,
7614 .page_size = 256,
7615 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007616 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007617 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007618 .probe = probe_spi_rdid,
7619 .probe_timing = TIMING_ZERO,
7620 .block_erasers =
7621 {
7622 {
7623 .eraseblocks = { {4 * 1024, 2048} },
7624 .block_erase = spi_block_erase_20,
7625 }, {
7626 .eraseblocks = { {32 * 1024, 256} },
7627 .block_erase = spi_block_erase_52,
7628 }, {
7629 .eraseblocks = { {64 * 1024, 128} },
7630 .block_erase = spi_block_erase_d8,
7631 }, {
7632 .eraseblocks = { {8 * 1024 * 1024, 1} },
7633 .block_erase = spi_block_erase_60,
7634 }, {
7635 .eraseblocks = { {8 * 1024 * 1024, 1} },
7636 .block_erase = spi_block_erase_c7,
7637 }
7638 },
7639 .printlock = spi_prettyprint_status_register_bp4_srwd,
7640 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7641 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007642 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007643 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007644 .reg_bits =
7645 {
Nico Huber4da971f2024-03-27 01:18:12 +01007646 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007647 .srp = {STATUS1, 7, RW},
7648 .srl = {STATUS2, 0, RW},
7649 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7650 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7651 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7652 .cmp = {STATUS2, 6, RW},
7653 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007654 .wp_write_cfg = spi_wp_write_cfg,
7655 .wp_read_cfg = spi_wp_read_cfg,
7656 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11007657 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007658 .prepare_access = spi_prepare_io,
7659 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007660 },
7661
7662 {
7663 .vendor = "GigaDevice",
7664 .name = "GD25Q80(B)",
7665 .bustype = BUS_SPI,
7666 .manufacture_id = GIGADEVICE_ID,
7667 .model_id = GIGADEVICE_GD25Q80,
7668 .total_size = 1024,
7669 .page_size = 256,
7670 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01007671 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007672 .tested = TEST_OK_PREW,
7673 .probe = probe_spi_rdid,
7674 .probe_timing = TIMING_ZERO,
7675 .block_erasers =
7676 {
7677 {
7678 .eraseblocks = { {4 * 1024, 256} },
7679 .block_erase = spi_block_erase_20,
7680 }, {
7681 .eraseblocks = { {32 * 1024, 32} },
7682 .block_erase = spi_block_erase_52,
7683 }, {
7684 .eraseblocks = { {64 * 1024, 16} },
7685 .block_erase = spi_block_erase_d8,
7686 }, {
7687 .eraseblocks = { {1024 * 1024, 1} },
7688 .block_erase = spi_block_erase_60,
7689 }, {
7690 .eraseblocks = { {1024 * 1024, 1} },
7691 .block_erase = spi_block_erase_c7,
7692 }
7693 },
Nico Huber4da971f2024-03-27 01:18:12 +01007694 .reg_bits =
7695 {
7696 .qe = {STATUS2, 1, RW},
7697 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007698 .printlock = spi_prettyprint_status_register_bp4_srwd,
7699 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7700 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007701 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007702 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007703 .prepare_access = spi_prepare_io,
7704 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007705 },
7706
7707 {
7708 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007709 .name = "GD25T80",
7710 .bustype = BUS_SPI,
7711 .manufacture_id = GIGADEVICE_ID,
7712 .model_id = GIGADEVICE_GD25T80,
7713 .total_size = 1024,
7714 .page_size = 256,
7715 /* OTP: 256B total; enter 0x3A */
7716 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
7717 .tested = TEST_UNTESTED,
7718 .probe = probe_spi_rdid,
7719 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10007720 .block_erasers =
7721 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007722 {
7723 .eraseblocks = { {4 * 1024, 256} },
7724 .block_erase = spi_block_erase_20,
7725 }, {
7726 .eraseblocks = { {64 * 1024, 16} },
7727 .block_erase = spi_block_erase_52,
7728 }, {
7729 .eraseblocks = { {64 * 1024, 16} },
7730 .block_erase = spi_block_erase_d8,
7731 }, {
7732 .eraseblocks = { {1024 * 1024, 1} },
7733 .block_erase = spi_block_erase_60,
7734 }, {
7735 .eraseblocks = { {1024 * 1024, 1} },
7736 .block_erase = spi_block_erase_c7,
7737 }
7738 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00007739 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007740 .unlock = spi_disable_blockprotect,
7741 .write = spi_chip_write_256,
7742 .read = spi_chip_read,
Stefan Tauner352e50b2013-02-22 15:58:45 +00007743 .voltage = {2700, 3600},
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007744 },
7745
7746 {
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007747 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10007748 .name = "GD25VQ16C",
7749 .bustype = BUS_SPI,
7750 .manufacture_id = GIGADEVICE_ID,
7751 .model_id = GIGADEVICE_GD25VQ16C,
7752 .total_size = 2 * 1024,
7753 .page_size = 256,
7754 /* Supports SFDP */
7755 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007756 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007757 .tested = TEST_UNTESTED,
7758 .probe = probe_spi_rdid,
7759 .probe_timing = TIMING_ZERO,
7760 .block_erasers =
7761 {
7762 {
7763 .eraseblocks = { { 4 * 1024, 512} },
7764 .block_erase = spi_block_erase_20,
7765 }, {
7766 .eraseblocks = { { 32 * 1024, 64} },
7767 .block_erase = spi_block_erase_52,
7768 }, {
7769 .eraseblocks = { { 64 * 1024, 32} },
7770 .block_erase = spi_block_erase_d8,
7771 }, {
7772 .eraseblocks = { {2 * 1024 * 1024, 1} },
7773 .block_erase = spi_block_erase_60,
7774 }, {
7775 .eraseblocks = { {2 * 1024 * 1024, 1} },
7776 .block_erase = spi_block_erase_c7,
7777 }
7778 },
Nico Huber4da971f2024-03-27 01:18:12 +01007779 .reg_bits =
7780 {
7781 .qe = {STATUS2, 1, RW},
7782 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10007783 .printlock = spi_prettyprint_status_register_bp4_srwd,
7784 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7785 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007786 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007787 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007788 .prepare_access = spi_prepare_io,
7789 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007790 },
7791
7792 {
7793 .vendor = "GigaDevice",
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007794 .name = "GD25VQ21B",
7795 .bustype = BUS_SPI,
7796 .manufacture_id = GIGADEVICE_ID,
7797 .model_id = GIGADEVICE_GD25VQ21B,
7798 .total_size = 256,
7799 .page_size = 256,
7800 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007801 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
7802 FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007803 .tested = TEST_UNTESTED,
7804 .probe = probe_spi_rdid,
7805 .probe_timing = TIMING_ZERO,
7806 .block_erasers =
7807 {
7808 {
7809 .eraseblocks = { { 4 * 1024, 64} },
7810 .block_erase = spi_block_erase_20,
7811 }, {
7812 .eraseblocks = { { 32 * 1024, 8} },
7813 .block_erase = spi_block_erase_52,
7814 }, {
7815 .eraseblocks = { { 64 * 1024, 4} },
7816 .block_erase = spi_block_erase_d8,
7817 }, {
7818 .eraseblocks = { {256 * 1024, 1} },
7819 .block_erase = spi_block_erase_60,
7820 }, {
7821 .eraseblocks = { {256 * 1024, 1} },
7822 .block_erase = spi_block_erase_c7,
7823 }
7824 },
Nico Huber4da971f2024-03-27 01:18:12 +01007825 .reg_bits =
7826 {
7827 .qe = {STATUS2, 1, RW},
7828 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007829 .printlock = spi_prettyprint_status_register_bp4_srwd,
7830 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7831 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007832 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007833 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007834 .prepare_access = spi_prepare_io,
7835 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007836 },
7837
7838 {
7839 .vendor = "GigaDevice",
7840 .name = "GD25VQ40C",
7841 .bustype = BUS_SPI,
7842 .manufacture_id = GIGADEVICE_ID,
7843 .model_id = GIGADEVICE_GD25VQ41B,
7844 .total_size = 512,
7845 .page_size = 256,
7846 /* Supports SFDP */
7847 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007848 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007849 .tested = TEST_UNTESTED,
7850 .probe = probe_spi_rdid,
7851 .probe_timing = TIMING_ZERO,
7852 .block_erasers =
7853 {
7854 {
7855 .eraseblocks = { { 4 * 1024, 128} },
7856 .block_erase = spi_block_erase_20,
7857 }, {
7858 .eraseblocks = { { 32 * 1024, 16} },
7859 .block_erase = spi_block_erase_52,
7860 }, {
7861 .eraseblocks = { { 64 * 1024, 8} },
7862 .block_erase = spi_block_erase_d8,
7863 }, {
7864 .eraseblocks = { {512 * 1024, 1} },
7865 .block_erase = spi_block_erase_60,
7866 }, {
7867 .eraseblocks = { {512 * 1024, 1} },
7868 .block_erase = spi_block_erase_c7,
7869 }
7870 },
Nico Huber4da971f2024-03-27 01:18:12 +01007871 .reg_bits =
7872 {
7873 .qe = {STATUS2, 1, RW},
7874 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007875 .printlock = spi_prettyprint_status_register_bp4_srwd,
7876 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7877 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007878 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007879 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007880 .prepare_access = spi_prepare_io,
7881 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007882 },
7883
7884 {
7885 .vendor = "GigaDevice",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007886 .name = "GD25VQ41B",
7887 .bustype = BUS_SPI,
7888 .manufacture_id = GIGADEVICE_ID,
7889 .model_id = GIGADEVICE_GD25VQ41B,
7890 .total_size = 512,
7891 .page_size = 256,
7892 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007893 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
7894 FEATURE_OTP | FEATURE_QIO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00007895 .tested = TEST_OK_PREW,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007896 .probe = probe_spi_rdid,
7897 .probe_timing = TIMING_ZERO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00007898 .block_erasers =
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007899 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00007900 {
7901 .eraseblocks = { { 4 * 1024, 128} },
7902 .block_erase = spi_block_erase_20,
7903 }, {
7904 .eraseblocks = { { 32 * 1024, 16} },
7905 .block_erase = spi_block_erase_52,
7906 }, {
7907 .eraseblocks = { { 64 * 1024, 8} },
7908 .block_erase = spi_block_erase_d8,
7909 }, {
7910 .eraseblocks = { {512 * 1024, 1} },
7911 .block_erase = spi_block_erase_60,
7912 }, {
7913 .eraseblocks = { {512 * 1024, 1} },
7914 .block_erase = spi_block_erase_c7,
7915 }
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007916 },
Nico Huber4da971f2024-03-27 01:18:12 +01007917 .reg_bits =
7918 {
7919 .qe = {STATUS2, 1, RW},
7920 },
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00007921 .printlock = spi_prettyprint_status_register_bp4_srwd,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007922 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7923 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007924 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007925 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007926 .prepare_access = spi_prepare_io,
7927 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007928 },
7929
7930 {
7931 .vendor = "GigaDevice",
7932 .name = "GD25VQ80C",
7933 .bustype = BUS_SPI,
7934 .manufacture_id = GIGADEVICE_ID,
7935 .model_id = GIGADEVICE_GD25VQ80C,
7936 .total_size = 1024,
7937 .page_size = 256,
7938 /* Supports SFDP */
7939 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01007940 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007941 .tested = TEST_UNTESTED,
7942 .probe = probe_spi_rdid,
7943 .probe_timing = TIMING_ZERO,
7944 .block_erasers =
7945 {
7946 {
7947 .eraseblocks = { { 4 * 1024, 256} },
7948 .block_erase = spi_block_erase_20,
7949 }, {
7950 .eraseblocks = { { 32 * 1024, 32} },
7951 .block_erase = spi_block_erase_52,
7952 }, {
7953 .eraseblocks = { { 64 * 1024, 16} },
7954 .block_erase = spi_block_erase_d8,
7955 }, {
7956 .eraseblocks = { {1024 * 1024, 1} },
7957 .block_erase = spi_block_erase_60,
7958 }, {
7959 .eraseblocks = { {1024 * 1024, 1} },
7960 .block_erase = spi_block_erase_c7,
7961 }
7962 },
Nico Huber4da971f2024-03-27 01:18:12 +01007963 .reg_bits =
7964 {
7965 .qe = {STATUS2, 1, RW},
7966 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007967 .printlock = spi_prettyprint_status_register_bp4_srwd,
7968 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7969 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01007970 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007971 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02007972 .prepare_access = spi_prepare_io,
7973 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00007974 },
7975
7976 {
Dino Li3214f582020-03-25 17:39:53 +08007977 .vendor = "GigaDevice",
7978 .name = "GD25WQ80E",
7979 .bustype = BUS_SPI,
7980 .manufacture_id = GIGADEVICE_ID,
7981 .model_id = GIGADEVICE_GD25WQ80E,
7982 .total_size = 1024,
7983 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01007984 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Dino Li3214f582020-03-25 17:39:53 +08007985 .tested = TEST_OK_PREW,
7986 .probe = probe_spi_rdid,
7987 .probe_timing = TIMING_ZERO,
7988 .block_erasers =
7989 {
7990 {
7991 .eraseblocks = { {4 * 1024, 256} },
7992 .block_erase = spi_block_erase_20,
7993 }, {
7994 .eraseblocks = { {32 * 1024, 32} },
7995 .block_erase = spi_block_erase_52,
7996 }, {
7997 .eraseblocks = { {64 * 1024, 16} },
7998 .block_erase = spi_block_erase_d8,
7999 }, {
8000 .eraseblocks = { {1 * 1024 * 1024, 1} },
8001 .block_erase = spi_block_erase_60,
8002 }, {
8003 .eraseblocks = { {1 * 1024 * 1024, 1} },
8004 .block_erase = spi_block_erase_c7,
8005 }
8006 },
Nico Huber4da971f2024-03-27 01:18:12 +01008007 .reg_bits =
8008 {
8009 .qe = {STATUS2, 1, RW},
8010 },
Dino Li3214f582020-03-25 17:39:53 +08008011 .printlock = spi_prettyprint_status_register_bp4_srwd,
8012 .unlock = spi_disable_blockprotect_bp4_srwd,
8013 .write = spi_chip_write_256,
8014 .read = spi_chip_read,
8015 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008016 .prepare_access = spi_prepare_io,
8017 .finish_access = spi_finish_io,
Dino Li3214f582020-03-25 17:39:53 +08008018 },
8019
8020 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008021 .vendor = "Hyundai",
8022 .name = "HY29F002B",
8023 .bustype = BUS_PARALLEL,
8024 .manufacture_id = HYUNDAI_ID,
8025 .model_id = HYUNDAI_HY29F002B,
8026 .total_size = 256,
8027 .page_size = 256 * 1024,
8028 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Hatim Kanchwalad0595352016-03-06 14:33:49 +00008029 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008030 .probe = probe_jedec,
8031 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Hatim Kanchwalad0595352016-03-06 14:33:49 +00008032 .block_erasers =
8033 {
8034 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008035 .eraseblocks = {
8036 {16 * 1024, 1},
8037 {8 * 1024, 2},
8038 {32 * 1024, 1},
8039 {64 * 1024, 3},
8040 },
8041 .block_erase = erase_sector_jedec,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00008042 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008043 .eraseblocks = { {256 * 1024, 1} },
8044 .block_erase = erase_chip_block_jedec,
8045 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00008046 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10008047 .write = write_jedec_1,
8048 .read = read_memmapped,
8049 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01008050 .prepare_access = prepare_memory_access,
8051 .finish_access = finish_memory_access,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008052 },
8053
8054 {
David Borgc96a8bd2010-06-21 16:12:22 +00008055 .vendor = "Hyundai",
8056 .name = "HY29F002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00008057 .bustype = BUS_PARALLEL,
David Borgc96a8bd2010-06-21 16:12:22 +00008058 .manufacture_id = HYUNDAI_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00008059 .model_id = HYUNDAI_HY29F002T,
David Borgc96a8bd2010-06-21 16:12:22 +00008060 .total_size = 256,
8061 .page_size = 256 * 1024,
8062 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +00008063 .tested = TEST_OK_PRE,
David Borgc96a8bd2010-06-21 16:12:22 +00008064 .probe = probe_jedec,
8065 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8066 .block_erasers =
8067 {
8068 {
8069 .eraseblocks = {
8070 {64 * 1024, 3},
8071 {32 * 1024, 1},
8072 {8 * 1024, 2},
8073 {16 * 1024, 1},
8074 },
8075 .block_erase = erase_sector_jedec,
8076 }, {
8077 .eraseblocks = { {256 * 1024, 1} },
8078 .block_erase = erase_chip_block_jedec,
8079 },
8080 },
8081 .write = write_jedec_1,
8082 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00008083 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01008084 .prepare_access = prepare_memory_access,
8085 .finish_access = finish_memory_access,
David Borgc96a8bd2010-06-21 16:12:22 +00008086 },
8087
8088 {
8089 .vendor = "Hyundai",
Joshua Roysf1324e02010-09-16 00:51:51 +00008090 .name = "HY29F040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00008091 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +00008092 .manufacture_id = HYUNDAI_ID,
8093 .model_id = HYUNDAI_HY29F040A,
8094 .total_size = 512,
8095 .page_size = 64 * 1024,
8096 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
8097 .tested = TEST_UNTESTED,
8098 .probe = probe_jedec,
8099 .probe_timing = TIMING_ZERO,
8100 .block_erasers =
8101 {
8102 {
8103 .eraseblocks = { {64 * 1024, 8} },
8104 .block_erase = erase_sector_jedec,
8105 }, {
8106 .eraseblocks = { {512 * 1024, 1} },
8107 .block_erase = erase_chip_block_jedec,
8108 },
8109 },
8110 .write = write_jedec_1,
8111 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00008112 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01008113 .prepare_access = prepare_memory_access,
8114 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +00008115 },
8116
8117 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008118 .vendor = "ISSI",
Angel Pons2ef47f32018-09-30 16:47:30 +02008119 .name = "IS25LP064",
8120 .bustype = BUS_SPI,
8121 .manufacture_id = ISSI_ID_SPI,
8122 .model_id = ISSI_IS25LP064,
8123 .total_size = 8192,
8124 .page_size = 256,
8125 /* OTP: 1024B total; read 0x48; write 0x42 */
8126 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Simon Buhrow9bf829d2021-10-20 17:09:09 +02008127 .tested = TEST_OK_PREW,
Angel Pons2ef47f32018-09-30 16:47:30 +02008128 .probe = probe_spi_rdid,
8129 .probe_timing = TIMING_ZERO,
8130 .block_erasers =
8131 {
8132 {
8133 .eraseblocks = { {4 * 1024, 2048} },
8134 .block_erase = spi_block_erase_20,
8135 }, {
8136 .eraseblocks = { {4 * 1024, 2048} },
8137 .block_erase = spi_block_erase_d7,
8138 }, {
8139 .eraseblocks = { {32 * 1024, 256} },
8140 .block_erase = spi_block_erase_52,
8141 }, {
8142 .eraseblocks = { {64 * 1024, 128} },
8143 .block_erase = spi_block_erase_d8,
8144 }, {
8145 .eraseblocks = { {8 * 1024 * 1024, 1} },
8146 .block_erase = spi_block_erase_60,
8147 }, {
8148 .eraseblocks = { {8 * 1024 * 1024, 1} },
8149 .block_erase = spi_block_erase_c7,
8150 }
8151 },
8152 .unlock = spi_disable_blockprotect,
8153 .write = spi_chip_write_256,
8154 .read = spi_chip_read,
8155 .voltage = {2300, 3600},
8156 },
8157
8158 {
8159 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -07008160 .name = "IS25LP128",
8161 .bustype = BUS_SPI,
8162 .manufacture_id = ISSI_ID_SPI,
8163 .model_id = ISSI_IS25LP128,
8164 .total_size = 16384,
8165 .page_size = 256,
8166 /* OTP: 1024B total; read 0x48; write 0x42 */
8167 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8168 .tested = TEST_OK_PREW,
8169 .probe = probe_spi_rdid,
8170 .probe_timing = TIMING_ZERO,
8171 .block_erasers =
8172 {
8173 {
8174 .eraseblocks = { {4 * 1024, 4096} },
8175 .block_erase = spi_block_erase_20,
8176 }, {
8177 .eraseblocks = { {4 * 1024, 4096} },
8178 .block_erase = spi_block_erase_d7,
8179 }, {
8180 .eraseblocks = { {32 * 1024, 512} },
8181 .block_erase = spi_block_erase_52,
8182 }, {
8183 .eraseblocks = { {64 * 1024, 256} },
8184 .block_erase = spi_block_erase_d8,
8185 }, {
8186 .eraseblocks = { {16 * 1024 * 1024, 1} },
8187 .block_erase = spi_block_erase_60,
8188 }, {
8189 .eraseblocks = { {16 * 1024 * 1024, 1} },
8190 .block_erase = spi_block_erase_c7,
8191 }
8192 },
8193 .unlock = spi_disable_blockprotect,
8194 .write = spi_chip_write_256,
8195 .read = spi_chip_read,
8196 .voltage = {2300, 3600},
8197 },
8198
8199 {
8200 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +00008201 .name = "IS25LP256",
8202 .bustype = BUS_SPI,
8203 .manufacture_id = ISSI_ID_SPI,
8204 .model_id = ISSI_IS25LP256,
8205 .total_size = 32768,
8206 .page_size = 256,
8207 /* supports SFDP */
8208 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +02008209 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
8210 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +00008211 .tested = TEST_OK_PREW,
8212 .probe = probe_spi_rdid,
8213 .probe_timing = TIMING_ZERO,
8214 .block_erasers =
8215 {
8216 {
8217 .eraseblocks = { {4 * 1024, 8192} },
8218 .block_erase = spi_block_erase_21,
8219 }, {
8220 .eraseblocks = { {4 * 1024, 8192} },
8221 .block_erase = spi_block_erase_20,
8222 /* could also use spi_block_erase_d7 */
8223 }, {
8224 .eraseblocks = { {32 * 1024, 1024} },
8225 .block_erase = spi_block_erase_5c,
8226 }, {
8227 .eraseblocks = { {32 * 1024, 1024} },
8228 .block_erase = spi_block_erase_52,
8229 }, {
8230 .eraseblocks = { {64 * 1024, 512} },
8231 .block_erase = spi_block_erase_dc,
8232 }, {
8233 .eraseblocks = { {64 * 1024, 512} },
8234 .block_erase = spi_block_erase_d8,
8235 }, {
8236 .eraseblocks = { {32 * 1024 * 1024, 1} },
8237 .block_erase = spi_block_erase_60,
8238 }, {
8239 .eraseblocks = { {32 * 1024 * 1024, 1} },
8240 .block_erase = spi_block_erase_c7,
8241 }
8242 },
8243 .unlock = spi_disable_blockprotect,
8244 .write = spi_chip_write_256,
8245 .read = spi_chip_read,
8246 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008247 .prepare_access = spi_prepare_io,
8248 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +00008249 },
8250
8251 {
8252 .vendor = "ISSI",
Nico Huberb27b8d12018-10-02 20:46:21 +02008253 .name = "IS25WP032",
8254 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +10008255 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +02008256 .model_id = ISSI_IS25WP032,
8257 .total_size = 4096,
8258 .page_size = 256,
8259 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008260 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8261 dummy cycles; non-volatile read parameters, so disable for now */
8262 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +02008263 .tested = TEST_UNTESTED,
8264 .probe = probe_spi_rdid,
8265 .probe_timing = TIMING_ZERO,
8266 .block_erasers =
8267 {
8268 {
8269 .eraseblocks = { {4 * 1024, 1024} },
8270 .block_erase = spi_block_erase_20,
8271 }, {
8272 .eraseblocks = { {4 * 1024, 1024} },
8273 .block_erase = spi_block_erase_d7,
8274 }, {
8275 .eraseblocks = { {32 * 1024, 128} },
8276 .block_erase = spi_block_erase_52,
8277 }, {
8278 .eraseblocks = { {64 * 1024, 64} },
8279 .block_erase = spi_block_erase_d8,
8280 }, {
8281 .eraseblocks = { {4 * 1024 * 1024, 1} },
8282 .block_erase = spi_block_erase_60,
8283 }, {
8284 .eraseblocks = { {4 * 1024 * 1024, 1} },
8285 .block_erase = spi_block_erase_c7,
8286 }
8287 },
8288 .unlock = spi_disable_blockprotect,
8289 .write = spi_chip_write_256,
8290 .read = spi_chip_read,
8291 .voltage = {1650, 1950},
8292 },
8293
8294 {
8295 .vendor = "ISSI",
8296 .name = "IS25WP064",
8297 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +10008298 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +02008299 .model_id = ISSI_IS25WP064,
8300 .total_size = 8192,
8301 .page_size = 256,
8302 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008303 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8304 dummy cycles; non-volatile read parameters, so disable for now */
8305 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +02008306 .tested = TEST_OK_PREW,
8307 .probe = probe_spi_rdid,
8308 .probe_timing = TIMING_ZERO,
8309 .block_erasers =
8310 {
8311 {
8312 .eraseblocks = { {4 * 1024, 2048} },
8313 .block_erase = spi_block_erase_20,
8314 }, {
8315 .eraseblocks = { {4 * 1024, 2048} },
8316 .block_erase = spi_block_erase_d7,
8317 }, {
8318 .eraseblocks = { {32 * 1024, 256} },
8319 .block_erase = spi_block_erase_52,
8320 }, {
8321 .eraseblocks = { {64 * 1024, 128} },
8322 .block_erase = spi_block_erase_d8,
8323 }, {
8324 .eraseblocks = { {8 * 1024 * 1024, 1} },
8325 .block_erase = spi_block_erase_60,
8326 }, {
8327 .eraseblocks = { {8 * 1024 * 1024, 1} },
8328 .block_erase = spi_block_erase_c7,
8329 }
8330 },
8331 .unlock = spi_disable_blockprotect,
8332 .write = spi_chip_write_256,
8333 .read = spi_chip_read,
8334 .voltage = {1650, 1950},
8335 },
8336
8337 {
8338 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -07008339 .name = "IS25WP128",
8340 .bustype = BUS_SPI,
8341 .manufacture_id = ISSI_ID_SPI,
8342 .model_id = ISSI_IS25WP128,
8343 .total_size = 16384,
8344 .page_size = 256,
8345 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +01008346 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
8347 dummy cycles; non-volatile read parameters, so disable for now */
8348 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks3083ed92017-05-02 13:25:56 -07008349 .tested = TEST_OK_PREW,
8350 .probe = probe_spi_rdid,
8351 .probe_timing = TIMING_ZERO,
8352 .block_erasers =
8353 {
8354 {
8355 .eraseblocks = { {4 * 1024, 4096} },
8356 .block_erase = spi_block_erase_20,
8357 }, {
8358 .eraseblocks = { {4 * 1024, 4096} },
8359 .block_erase = spi_block_erase_d7,
8360 }, {
8361 .eraseblocks = { {32 * 1024, 512} },
8362 .block_erase = spi_block_erase_52,
8363 }, {
8364 .eraseblocks = { {64 * 1024, 256} },
8365 .block_erase = spi_block_erase_d8,
8366 }, {
8367 .eraseblocks = { {16 * 1024 * 1024, 1} },
8368 .block_erase = spi_block_erase_60,
8369 }, {
8370 .eraseblocks = { {16 * 1024 * 1024, 1} },
8371 .block_erase = spi_block_erase_c7,
8372 }
8373 },
8374 .unlock = spi_disable_blockprotect,
8375 .write = spi_chip_write_256,
8376 .read = spi_chip_read,
8377 .voltage = {1650, 1950},
8378 },
8379
8380 {
8381 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +00008382 .name = "IS25WP256",
8383 .bustype = BUS_SPI,
8384 .manufacture_id = ISSI_ID_SPI,
8385 .model_id = ISSI_IS25WP256,
8386 .total_size = 32768,
8387 .page_size = 256,
8388 /* supports SFDP */
8389 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +02008390 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
8391 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +00008392 .tested = TEST_OK_PREW,
8393 .probe = probe_spi_rdid,
8394 .probe_timing = TIMING_ZERO,
8395 .block_erasers =
8396 {
8397 {
8398 .eraseblocks = { {4 * 1024, 8192} },
8399 .block_erase = spi_block_erase_21,
8400 }, {
8401 .eraseblocks = { {4 * 1024, 8192} },
8402 .block_erase = spi_block_erase_20,
8403 /* could also use spi_block_erase_d7 */
8404 }, {
8405 .eraseblocks = { {32 * 1024, 1024} },
8406 .block_erase = spi_block_erase_5c,
8407 }, {
8408 .eraseblocks = { {32 * 1024, 1024} },
8409 .block_erase = spi_block_erase_52,
8410 }, {
8411 .eraseblocks = { {64 * 1024, 512} },
8412 .block_erase = spi_block_erase_dc,
8413 }, {
8414 .eraseblocks = { {64 * 1024, 512} },
8415 .block_erase = spi_block_erase_d8,
8416 }, {
8417 .eraseblocks = { {32 * 1024 * 1024, 1} },
8418 .block_erase = spi_block_erase_60,
8419 }, {
8420 .eraseblocks = { {32 * 1024 * 1024, 1} },
8421 .block_erase = spi_block_erase_c7,
8422 }
8423 },
8424 .unlock = spi_disable_blockprotect,
8425 .write = spi_chip_write_256,
8426 .read = spi_chip_read,
8427 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02008428 .prepare_access = spi_prepare_io,
8429 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +00008430 },
8431
8432 {
8433 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008434 .name = "IS29GL064B",
8435 .bustype = BUS_PARALLEL,
8436 .manufacture_id = ISSI_ID,
8437 .model_id = ISSI_PMC_IS29GL064B,
8438 .total_size = 8192,
8439 .page_size = 128 * 1024, /* actual page size is 16 */
8440 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8441 .tested = TEST_UNTESTED,
8442 .probe = probe_jedec_29gl,
8443 .probe_timing = TIMING_ZERO,
8444 .block_erasers =
8445 {
8446 {
8447 .eraseblocks = {
8448 {8 * 1024, 8},
8449 {64 * 1024, 127},
8450 },
8451 .block_erase = erase_sector_jedec,
8452 }, {
8453 .eraseblocks = { {8 * 1024 * 1024, 1} },
8454 .block_erase = erase_chip_block_jedec,
8455 },
8456 },
8457 .write = write_jedec_1,
8458 .read = read_memmapped,
8459 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008460 .prepare_access = prepare_memory_access,
8461 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008462 },
8463
8464 {
8465 .vendor = "ISSI",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008466 .name = "IS29GL064H/L",
8467 .bustype = BUS_PARALLEL,
8468 .manufacture_id = ISSI_ID,
8469 .model_id = ISSI_PMC_IS29GL064HL,
8470 .total_size = 8192,
8471 .page_size = 128 * 1024, /* actual page size is 16 */
8472 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8473 .tested = TEST_UNTESTED,
8474 .probe = probe_jedec_29gl,
8475 .probe_timing = TIMING_ZERO,
8476 .block_erasers =
8477 {
8478 {
8479 .eraseblocks = { {64 * 1024, 128} },
8480 .block_erase = erase_sector_jedec,
8481 }, {
8482 .eraseblocks = { {8 * 1024 * 1024, 1} },
8483 .block_erase = erase_chip_block_jedec,
8484 },
8485 },
8486 .write = write_jedec_1,
8487 .read = read_memmapped,
8488 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008489 .prepare_access = prepare_memory_access,
8490 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008491 },
8492
8493 {
8494 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008495 .name = "IS29GL064T",
8496 .bustype = BUS_PARALLEL,
8497 .manufacture_id = ISSI_ID,
8498 .model_id = ISSI_PMC_IS29GL064T,
8499 .total_size = 8192,
8500 .page_size = 128 * 1024, /* actual page size is 16 */
8501 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8502 .tested = TEST_UNTESTED,
8503 .probe = probe_jedec_29gl,
8504 .probe_timing = TIMING_ZERO,
8505 .block_erasers =
8506 {
8507 {
8508 .eraseblocks = {
8509 {64 * 1024, 127},
8510 {8 * 1024, 8},
8511 },
8512 .block_erase = erase_sector_jedec,
8513 }, {
8514 .eraseblocks = { {8 * 1024 * 1024, 1} },
8515 .block_erase = erase_chip_block_jedec,
8516 },
8517 },
8518 .write = write_jedec_1,
8519 .read = read_memmapped,
8520 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008521 .prepare_access = prepare_memory_access,
8522 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008523 },
8524
8525 {
8526 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008527 .name = "IS29GL128H/L",
8528 .bustype = BUS_PARALLEL,
8529 .manufacture_id = ISSI_ID,
8530 .model_id = ISSI_PMC_IS29GL128HL,
8531 .total_size = 16384,
8532 .page_size = 128 * 1024, /* actual page size is 16 */
8533 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
8534 .tested = TEST_UNTESTED,
8535 .probe = probe_jedec_29gl,
8536 .probe_timing = TIMING_ZERO,
8537 .block_erasers =
8538 {
8539 {
8540 .eraseblocks = { {128 * 1024, 128} },
8541 .block_erase = erase_sector_jedec,
8542 }, {
8543 .eraseblocks = { {16 * 1024 * 1024, 1} },
8544 .block_erase = erase_chip_block_jedec,
8545 },
8546 },
8547 .write = write_jedec_1,
8548 .read = read_memmapped,
8549 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01008550 .prepare_access = prepare_memory_access,
8551 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00008552 },
8553
8554 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008555 .vendor = "Intel",
8556 .name = "25F160S33B8",
8557 .bustype = BUS_SPI,
8558 .manufacture_id = INTEL_ID,
8559 .model_id = INTEL_25F160S33B8,
8560 .total_size = 2048,
8561 .page_size = 256,
8562 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8563 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8564 .tested = TEST_UNTESTED,
8565 .probe = probe_spi_rdid,
8566 .probe_timing = TIMING_ZERO,
8567 .block_erasers =
8568 {
8569 {
8570 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8571 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8572 * have no effect on the memory contents, but sets a flag in the SR.
8573 .eraseblocks = {
8574 {8 * 1024, 8},
8575 {64 * 1024, 31} // inaccessible
8576 },
8577 .block_erase = spi_block_erase_40,
8578 }, { */
8579 .eraseblocks = { {64 * 1024, 32} },
8580 .block_erase = spi_block_erase_d8,
8581 }, {
8582 .eraseblocks = { {2 * 1024 * 1024, 1} },
8583 .block_erase = spi_block_erase_c7,
8584 }
8585 },
8586 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8587 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8588 .write = spi_chip_write_256,
8589 .read = spi_chip_read, /* also fast read 0x0B */
8590 .voltage = {2700, 3600},
8591 },
8592
8593 {
8594 .vendor = "Intel",
8595 .name = "25F160S33T8",
8596 .bustype = BUS_SPI,
8597 .manufacture_id = INTEL_ID,
8598 .model_id = INTEL_25F160S33T8,
8599 .total_size = 2048,
8600 .page_size = 256,
8601 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8602 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8603 .tested = TEST_UNTESTED,
8604 .probe = probe_spi_rdid,
8605 .probe_timing = TIMING_ZERO,
8606 .block_erasers =
8607 {
8608 {
8609 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8610 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8611 * have no effect on the memory contents, but sets a flag in the SR.
8612 .eraseblocks = {
8613 {64 * 1024, 31}, // inaccessible
8614 {8 * 1024, 8}
8615 },
8616 .block_erase = spi_block_erase_40,
8617 }, { */
8618 .eraseblocks = { {64 * 1024, 32} },
8619 .block_erase = spi_block_erase_d8,
8620 }, {
8621 .eraseblocks = { {2 * 1024 * 1024, 1} },
8622 .block_erase = spi_block_erase_c7,
8623 }
8624 },
8625 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8626 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8627 .write = spi_chip_write_256,
8628 .read = spi_chip_read, /* also fast read 0x0B */
8629 .voltage = {2700, 3600},
8630 },
8631
8632 {
8633 .vendor = "Intel",
8634 .name = "25F320S33B8",
8635 .bustype = BUS_SPI,
8636 .manufacture_id = INTEL_ID,
8637 .model_id = INTEL_25F320S33B8,
8638 .total_size = 4096,
8639 .page_size = 256,
8640 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8641 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8642 .tested = TEST_UNTESTED,
8643 .probe = probe_spi_rdid,
8644 .probe_timing = TIMING_ZERO,
8645 .block_erasers =
8646 {
8647 {
8648 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8649 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8650 * have no effect on the memory contents, but sets a flag in the SR.
8651 .eraseblocks = {
8652 {8 * 1024, 8},
8653 {64 * 1024, 63} // inaccessible
8654 },
8655 .block_erase = spi_block_erase_40,
8656 }, { */
8657 .eraseblocks = { {64 * 1024, 64} },
8658 .block_erase = spi_block_erase_d8,
8659 }, {
8660 .eraseblocks = { {4 * 1024 * 1024, 1} },
8661 .block_erase = spi_block_erase_c7,
8662 }
8663 },
8664 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8665 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8666 .write = spi_chip_write_256,
8667 .read = spi_chip_read, /* also fast read 0x0B */
8668 .voltage = {2700, 3600},
8669 },
8670
8671 {
8672 .vendor = "Intel",
8673 .name = "25F320S33T8",
8674 .bustype = BUS_SPI,
8675 .manufacture_id = INTEL_ID,
8676 .model_id = INTEL_25F320S33T8,
8677 .total_size = 4096,
8678 .page_size = 256,
8679 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8680 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8681 .tested = TEST_UNTESTED,
8682 .probe = probe_spi_rdid,
8683 .probe_timing = TIMING_ZERO,
8684 .block_erasers =
8685 {
8686 {
8687 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8688 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8689 * have no effect on the memory contents, but sets a flag in the SR.
8690 .eraseblocks = {
8691 {64 * 1024, 63}, // inaccessible
8692 {8 * 1024, 8}
8693 },
8694 .block_erase = spi_block_erase_40,
8695 }, { */
8696 .eraseblocks = { {64 * 1024, 64} },
8697 .block_erase = spi_block_erase_d8,
8698 }, {
8699 .eraseblocks = { {4 * 1024 * 1024, 1} },
8700 .block_erase = spi_block_erase_c7,
8701 }
8702 },
8703 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8704 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8705 .write = spi_chip_write_256,
8706 .read = spi_chip_read, /* also fast read 0x0B */
8707 .voltage = {2700, 3600},
8708 },
8709
8710 {
8711 .vendor = "Intel",
8712 .name = "25F640S33B8",
8713 .bustype = BUS_SPI,
8714 .manufacture_id = INTEL_ID,
8715 .model_id = INTEL_25F640S33B8,
8716 .total_size = 8192,
8717 .page_size = 256,
8718 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8719 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Zoltan HERPAIe0e8b2b2020-08-08 16:04:34 +02008720 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008721 .probe = probe_spi_rdid,
8722 .probe_timing = TIMING_ZERO,
8723 .block_erasers =
8724 {
8725 {
8726 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8727 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8728 * have no effect on the memory contents, but sets a flag in the SR.
8729 .eraseblocks = {
8730 {8 * 1024, 8},
8731 {64 * 1024, 127} // inaccessible
8732 },
8733 .block_erase = spi_block_erase_40,
8734 }, { */
8735 .eraseblocks = { {64 * 1024, 128} },
8736 .block_erase = spi_block_erase_d8,
8737 }, {
8738 .eraseblocks = { {8 * 1024 * 1024, 1} },
8739 .block_erase = spi_block_erase_c7,
8740 }
8741 },
8742 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8743 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8744 .write = spi_chip_write_256,
8745 .read = spi_chip_read, /* also fast read 0x0B */
8746 .voltage = {2700, 3600},
8747 },
8748
8749 {
8750 .vendor = "Intel",
8751 .name = "25F640S33T8",
8752 .bustype = BUS_SPI,
8753 .manufacture_id = INTEL_ID,
8754 .model_id = INTEL_25F640S33T8,
8755 .total_size = 8192,
8756 .page_size = 256,
8757 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
8758 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
8759 .tested = TEST_UNTESTED,
8760 .probe = probe_spi_rdid,
8761 .probe_timing = TIMING_ZERO,
8762 .block_erasers =
8763 {
8764 {
8765 /* This chip supports erasing of the 8 so-called "parameter blocks" with
8766 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
8767 * have no effect on the memory contents, but sets a flag in the SR.
8768 .eraseblocks = {
8769 {64 * 1024, 127}, // inaccessible
8770 {8 * 1024, 8}
8771 },
8772 .block_erase = spi_block_erase_40,
8773 }, { */
8774 .eraseblocks = { {64 * 1024, 128} },
8775 .block_erase = spi_block_erase_d8,
8776 }, {
8777 .eraseblocks = { {8 * 1024 * 1024, 1} },
8778 .block_erase = spi_block_erase_c7,
8779 }
8780 },
8781 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
8782 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
8783 .write = spi_chip_write_256,
8784 .read = spi_chip_read, /* also fast read 0x0B */
8785 .voltage = {2700, 3600},
8786 },
8787
8788 {
8789 .vendor = "Intel",
8790 .name = "28F001BN/BX-B",
8791 .bustype = BUS_PARALLEL,
8792 .manufacture_id = INTEL_ID,
8793 .model_id = INTEL_28F001B,
8794 .total_size = 128,
8795 .page_size = 128 * 1024, /* 8k + 2x4k + 112k */
8796 .tested = TEST_UNTESTED,
8797 .probe = probe_jedec,
8798 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8799 .block_erasers =
8800 {
8801 {
8802 .eraseblocks = {
8803 {8 * 1024, 1},
8804 {4 * 1024, 2},
8805 {112 * 1024, 1},
8806 },
8807 .block_erase = erase_block_82802ab,
8808 },
8809 },
8810 .write = write_82802ab,
8811 .read = read_memmapped,
8812 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01008813 .prepare_access = prepare_memory_access,
8814 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008815 },
8816
8817 {
8818 .vendor = "Intel",
8819 .name = "28F001BN/BX-T",
8820 .bustype = BUS_PARALLEL,
8821 .manufacture_id = INTEL_ID,
8822 .model_id = INTEL_28F001T,
8823 .total_size = 128,
8824 .page_size = 128 * 1024, /* 112k + 2x4k + 8k */
8825 .tested = TEST_OK_PREW,
8826 .probe = probe_jedec,
8827 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8828 .block_erasers =
8829 {
8830 {
8831 .eraseblocks = {
8832 {112 * 1024, 1},
8833 {4 * 1024, 2},
8834 {8 * 1024, 1},
8835 },
8836 .block_erase = erase_block_82802ab,
8837 },
8838 },
8839 .write = write_82802ab,
8840 .read = read_memmapped,
8841 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01008842 .prepare_access = prepare_memory_access,
8843 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008844 },
8845
8846 {
8847 .vendor = "Intel",
8848 .name = "28F002BC/BL/BV/BX-T",
8849 .bustype = BUS_PARALLEL,
8850 .manufacture_id = INTEL_ID,
8851 .model_id = INTEL_28F002T,
8852 .total_size = 256,
8853 .page_size = 256 * 1024,
8854 .tested = TEST_OK_PRE,
8855 .probe = probe_82802ab,
8856 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8857 .block_erasers =
8858 {
8859 {
8860 .eraseblocks = {
8861 {128 * 1024, 1},
8862 {96 * 1024, 1},
8863 {8 * 1024, 2},
8864 {16 * 1024, 1},
8865 },
8866 .block_erase = erase_block_82802ab,
8867 },
8868 },
8869 .write = write_82802ab,
8870 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008871 .prepare_access = prepare_memory_access,
8872 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008873 },
8874
8875 {
8876 .vendor = "Intel",
8877 .name = "28F004B5/BE/BV/BX-B",
8878 .bustype = BUS_PARALLEL,
8879 .manufacture_id = INTEL_ID,
8880 .model_id = INTEL_28F004B,
8881 .total_size = 512,
8882 .page_size = 128 * 1024, /* maximal block size */
8883 .tested = TEST_UNTESTED,
8884 .probe = probe_82802ab,
8885 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8886 .block_erasers =
8887 {
8888 {
8889 .eraseblocks = {
8890 {16 * 1024, 1},
8891 {8 * 1024, 2},
8892 {96 * 1024, 1},
8893 {128 * 1024, 3},
8894 },
8895 .block_erase = erase_block_82802ab,
8896 },
8897 },
8898 .write = write_82802ab,
8899 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008900 .prepare_access = prepare_memory_access,
8901 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008902 },
8903
8904 {
8905 .vendor = "Intel",
8906 .name = "28F004B5/BE/BV/BX-T",
8907 .bustype = BUS_PARALLEL,
8908 .manufacture_id = INTEL_ID,
8909 .model_id = INTEL_28F004T,
8910 .total_size = 512,
8911 .page_size = 128 * 1024, /* maximal block size */
8912 .tested = TEST_UNTESTED,
8913 .probe = probe_82802ab,
8914 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8915 .block_erasers =
8916 {
8917 {
8918 .eraseblocks = {
8919 {128 * 1024, 3},
8920 {96 * 1024, 1},
8921 {8 * 1024, 2},
8922 {16 * 1024, 1},
8923 },
8924 .block_erase = erase_block_82802ab,
8925 },
8926 },
8927 .write = write_82802ab,
8928 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008929 .prepare_access = prepare_memory_access,
8930 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008931 },
8932
8933 {
8934 .vendor = "Intel",
8935 .name = "28F008S3/S5/SC",
8936 .bustype = BUS_PARALLEL,
8937 .manufacture_id = INTEL_ID,
8938 .model_id = INTEL_28F004S3,
8939 .total_size = 512,
8940 .page_size = 256,
8941 .tested = TEST_UNTESTED,
8942 .probe = probe_82802ab,
8943 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8944 .block_erasers =
8945 {
8946 {
8947 .eraseblocks = { {64 * 1024, 8} },
8948 .block_erase = erase_block_82802ab,
8949 },
8950 },
8951 .unlock = unlock_28f004s5,
8952 .write = write_82802ab,
8953 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008954 .prepare_access = prepare_memory_access,
8955 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008956 },
8957
8958 {
8959 .vendor = "Intel",
8960 .name = "28F400BV/BX/CE/CV-B",
8961 .bustype = BUS_PARALLEL,
8962 .manufacture_id = INTEL_ID,
8963 .model_id = INTEL_28F400B,
8964 .total_size = 512,
8965 .page_size = 128 * 1024, /* maximal block size */
8966 .feature_bits = FEATURE_ADDR_SHIFTED,
8967 .tested = TEST_UNTESTED,
8968 .probe = probe_82802ab,
8969 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
8970 .block_erasers =
8971 {
8972 {
8973 .eraseblocks = {
8974 {16 * 1024, 1},
8975 {8 * 1024, 2},
8976 {96 * 1024, 1},
8977 {128 * 1024, 3},
8978 },
8979 .block_erase = erase_block_82802ab,
8980 },
8981 },
8982 .write = write_82802ab,
8983 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01008984 .prepare_access = prepare_memory_access,
8985 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008986 },
8987
8988 {
8989 .vendor = "Intel",
8990 .name = "28F400BV/BX/CE/CV-T",
8991 .bustype = BUS_PARALLEL,
8992 .manufacture_id = INTEL_ID,
8993 .model_id = INTEL_28F400T,
8994 .total_size = 512,
8995 .page_size = 128 * 1024, /* maximal block size */
8996 .feature_bits = FEATURE_ADDR_SHIFTED,
8997 .tested = TEST_UNTESTED,
8998 .probe = probe_82802ab,
8999 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
9000 .block_erasers =
9001 {
9002 {
9003 .eraseblocks = {
9004 {128 * 1024, 3},
9005 {96 * 1024, 1},
9006 {8 * 1024, 2},
9007 {16 * 1024, 1},
9008 },
9009 .block_erase = erase_block_82802ab,
9010 },
9011 },
9012 .write = write_82802ab,
9013 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +01009014 .prepare_access = prepare_memory_access,
9015 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009016 },
9017
9018 {
9019 .vendor = "Intel",
9020 .name = "82802AB",
9021 .bustype = BUS_FWH,
9022 .manufacture_id = INTEL_ID,
9023 .model_id = INTEL_82802AB,
9024 .total_size = 512,
9025 .page_size = 64 * 1024,
Alan Green88552572019-07-24 13:56:06 +10009026 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009027 .probe = probe_82802ab,
9028 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
9029 .block_erasers =
9030 {
9031 {
9032 .eraseblocks = { {64 * 1024, 8} },
9033 .block_erase = erase_block_82802ab,
9034 },
9035 },
9036 .unlock = unlock_regspace2_uniform_64k,
9037 .write = write_82802ab,
9038 .read = read_memmapped,
9039 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01009040 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01009041 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009042 },
9043
9044 {
9045 .vendor = "Intel",
9046 .name = "82802AC",
9047 .bustype = BUS_FWH,
9048 .manufacture_id = INTEL_ID,
9049 .model_id = INTEL_82802AC,
9050 .total_size = 1024,
9051 .page_size = 64 * 1024,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009052 .tested = TEST_OK_PR,
9053 .probe = probe_82802ab,
9054 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
9055 .block_erasers =
9056 {
9057 {
9058 .eraseblocks = { {64 * 1024, 16} },
9059 .block_erase = erase_block_82802ab,
9060 },
9061 },
9062 .unlock = unlock_regspace2_uniform_64k,
9063 .write = write_82802ab,
9064 .read = read_memmapped,
9065 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +01009066 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +01009067 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009068 },
9069
9070 {
9071 .vendor = "Macronix",
9072 .name = "MX23L12854",
9073 .bustype = BUS_SPI,
9074 .manufacture_id = MACRONIX_ID,
9075 .model_id = MACRONIX_MX23L12854,
9076 .total_size = 16384,
9077 .page_size = 256,
9078 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
9079 .probe = probe_spi_rdid,
9080 .probe_timing = TIMING_ZERO,
9081 .write = NULL, /* MX23L12854 is a mask ROM, so it is read-only */
9082 .read = spi_chip_read, /* Fast read (0x0B) supported */
9083 .voltage = {3000, 3600},
9084 },
9085
9086 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009087 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +00009088 .name = "MX23L1654",
9089 .bustype = BUS_SPI,
9090 .manufacture_id = MACRONIX_ID,
9091 .model_id = MACRONIX_MX23L1654,
9092 .total_size = 2048,
9093 .page_size = 256,
9094 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
9095 .probe = probe_spi_rdid,
9096 .probe_timing = TIMING_ZERO,
9097 .write = NULL, /* MX23L1654 is a mask ROM, so it is read-only */
9098 .read = spi_chip_read, /* Fast read (0x0B) supported */
9099 .voltage = {3000, 3600},
9100 },
9101
9102 {
9103 .vendor = "Macronix",
Michael Coppola4e7f36e2014-05-03 23:01:18 +00009104 .name = "MX23L3254",
9105 .bustype = BUS_SPI,
9106 .manufacture_id = MACRONIX_ID,
9107 .model_id = MACRONIX_MX23L3254,
9108 .total_size = 4096,
9109 .page_size = 256,
Stefan Tauner6455dff2014-05-26 00:36:24 +00009110 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola4e7f36e2014-05-03 23:01:18 +00009111 .probe = probe_spi_rdid,
9112 .probe_timing = TIMING_ZERO,
9113 .write = NULL, /* MX23L3254 is a mask ROM, so it is read-only */
9114 .read = spi_chip_read, /* Fast read (0x0B) supported */
9115 .voltage = {3000, 3600},
9116 },
9117
9118 {
9119 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +00009120 .name = "MX23L6454",
9121 .bustype = BUS_SPI,
9122 .manufacture_id = MACRONIX_ID,
9123 .model_id = MACRONIX_MX23L6454,
9124 .total_size = 8192,
9125 .page_size = 256,
Stefan Tauner23e10b82016-01-23 16:16:49 +00009126 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola583ea322014-08-20 18:56:35 +00009127 .probe = probe_spi_rdid,
9128 .probe_timing = TIMING_ZERO,
9129 .write = NULL, /* MX23L6454 is a mask ROM, so it is read-only */
9130 .read = spi_chip_read, /* Fast read (0x0B) supported */
9131 .voltage = {3000, 3600},
9132 },
9133
9134 {
9135 .vendor = "Macronix",
Stefan Taunerf656e802013-02-02 15:35:44 +00009136 .name = "MX25L1005(C)/MX25L1006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009137 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009138 .manufacture_id = MACRONIX_ID,
9139 .model_id = MACRONIX_MX25L1005,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009140 .total_size = 128,
9141 .page_size = 256,
Stefan Taunerf656e802013-02-02 15:35:44 +00009142 /* MX25L1006E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +01009143 /* FEATURE_FAST_READ_DOUT: MX25L1006E */
9144 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Stefan Taunerd7d423b2012-10-20 09:13:16 +00009145 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009146 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009147 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00009148 .block_erasers =
9149 {
9150 {
9151 .eraseblocks = { {4 * 1024, 32} },
9152 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009153 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00009154 .eraseblocks = { {64 * 1024, 2} },
9155 .block_erase = spi_block_erase_d8,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009156 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00009157 .eraseblocks = { {128 * 1024, 1} },
9158 .block_erase = spi_block_erase_60,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009159 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +00009160 .eraseblocks = { {128 * 1024, 1} },
9161 .block_erase = spi_block_erase_c7,
9162 },
9163 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009164 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00009165 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009166 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009167 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009168 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009169 .prepare_access = spi_prepare_io,
9170 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009171 },
9172
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009173 {
9174 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009175 .name = "MX25L12805D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009176 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009177 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009178 .model_id = MACRONIX_MX25L12805D,
9179 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009180 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009181 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009182 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009183 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009184 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009185 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009186 .block_erasers =
9187 {
9188 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009189 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009190 .block_erase = spi_block_erase_20,
9191 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009192 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009193 .block_erase = spi_block_erase_d8,
9194 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009195 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009196 .block_erase = spi_block_erase_60,
9197 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009198 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009199 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009200 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009201 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009202 .printlock = spi_prettyprint_status_register_bp3_srwd,
9203 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009204 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009205 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009206 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00009207 },
9208
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009209 {
9210 .vendor = "Macronix",
Tao Xia571f6ad2021-07-21 16:41:53 +08009211 .name = "MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009212 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009213 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009214 .model_id = MACRONIX_MX25L12805D,
9215 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009216 .page_size = 256,
Tao Xia571f6ad2021-07-21 16:41:53 +08009217 /* OTP: MX25L12833F has 1KB total, others have 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009218 /* *F versions: FEATURE_QPI_35 + DC bits (6, 4, 8, 10) in configuration register */
9219 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9220 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stefan Tauner8179be52011-06-04 13:13:34 +00009221 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009222 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009223 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009224 .block_erasers =
9225 {
9226 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009227 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009228 .block_erase = spi_block_erase_20,
9229 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009230 .eraseblocks = { {32 * 1024, 512} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009231 .block_erase = spi_block_erase_52,
9232 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009233 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009234 .block_erase = spi_block_erase_d8,
9235 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009236 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009237 .block_erase = spi_block_erase_60,
9238 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009239 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009240 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009241 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009242 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009243 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +01009244 .reg_bits =
9245 {
9246 .qe = {STATUS1, 6, RW},
9247 },
9248 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009249 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009250 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009251 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009252 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009253 .prepare_access = spi_prepare_io,
9254 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009255 },
9256
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009257 {
9258 .vendor = "Macronix",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009259 .name = "MX25L1605",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009260 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009261 .manufacture_id = MACRONIX_ID,
9262 .model_id = MACRONIX_MX25L1605,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009263 .total_size = 2048,
9264 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009265 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Sven Schnelle4bd8a402011-03-07 10:59:06 +00009266 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009267 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009268 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009269 .block_erasers =
9270 {
9271 {
Stefan Tauner226037d2013-03-16 01:22:12 +00009272 .eraseblocks = { {64 * 1024, 32} },
9273 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009274 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +00009275 .eraseblocks = { {64 * 1024, 32} },
9276 .block_erase = spi_block_erase_d8,
9277 }, {
9278 .eraseblocks = { {2 * 1024 * 1024, 1} },
9279 .block_erase = spi_block_erase_60,
9280 }, {
9281 .eraseblocks = { {2 * 1024 * 1024, 1} },
9282 .block_erase = spi_block_erase_c7,
9283 },
9284 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009285 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Stefan Tauner226037d2013-03-16 01:22:12 +00009286 .unlock = spi_disable_blockprotect,
9287 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009288 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009289 .voltage = {2700, 3600},
9290 },
9291
9292 {
9293 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009294 .name = "MX25L1605A/MX25L1606E/MX25L1608E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009295 .bustype = BUS_SPI,
9296 .manufacture_id = MACRONIX_ID,
9297 .model_id = MACRONIX_MX25L1605,
9298 .total_size = 2048,
9299 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009300 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L1606E and MX25L1608E only) */
Nico Huber46552c82024-03-27 01:18:12 +01009301 /* FEATURE_FAST_READ_DOUT: MX25L1606E & MX25L1608E */
9302 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +00009303 .tested = TEST_OK_PREW,
9304 .probe = probe_spi_rdid,
9305 .probe_timing = TIMING_ZERO,
9306 .block_erasers =
9307 {
9308 {
9309 .eraseblocks = { {4 * 1024, 512} },
9310 .block_erase = spi_block_erase_20,
9311 }, {
9312 .eraseblocks = { {64 * 1024, 32} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +00009313 .block_erase = spi_block_erase_52,
9314 }, {
9315 .eraseblocks = { {64 * 1024, 32} },
9316 .block_erase = spi_block_erase_d8,
9317 }, {
9318 .eraseblocks = { {2 * 1024 * 1024, 1} },
9319 .block_erase = spi_block_erase_60,
9320 }, {
9321 .eraseblocks = { {2 * 1024 * 1024, 1} },
9322 .block_erase = spi_block_erase_c7,
9323 },
9324 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009325 .printlock = spi_prettyprint_status_register_bp3_srwd, /* MX25L1605A bp2 only */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009326 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009327 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009328 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009329 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009330 .prepare_access = spi_prepare_io,
9331 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009332 },
9333
9334 {
9335 .vendor = "Macronix",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009336 .name = "MX25L1605D/MX25L1608D/MX25L1673E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009337 .bustype = BUS_SPI,
9338 .manufacture_id = MACRONIX_ID,
9339 .model_id = MACRONIX_MX25L1605,
9340 .total_size = 2048,
9341 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009342 /* FEATURE_QIO: MX25L1673E */
9343 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009344 .tested = TEST_OK_PREW,
9345 .probe = probe_spi_rdid,
9346 .probe_timing = TIMING_ZERO,
9347 .block_erasers =
9348 {
9349 {
9350 .eraseblocks = { {4 * 1024, 512} },
9351 .block_erase = spi_block_erase_20,
9352 }, {
9353 .eraseblocks = { {64 * 1024, 32} },
9354 .block_erase = spi_block_erase_d8,
9355 }, {
9356 .eraseblocks = { {2 * 1024 * 1024, 1} },
9357 .block_erase = spi_block_erase_60,
9358 }, {
9359 .eraseblocks = { {2 * 1024 * 1024, 1} },
9360 .block_erase = spi_block_erase_c7,
9361 },
9362 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009363 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: Continuously Program (CP) mode, for 73E is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009364 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009365 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009366 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009367 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009368 .prepare_access = spi_prepare_io,
9369 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009370 },
9371
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009372 {
9373 .vendor = "Macronix",
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009374 .name = "MX25L1635D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009375 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009376 .manufacture_id = MACRONIX_ID,
9377 .model_id = MACRONIX_MX25L1635D,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009378 .total_size = 2048,
9379 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +00009380 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009381 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9382 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Angel Ponsc2054872021-01-15 18:57:32 +01009383 .tested = TEST_OK_PREW,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009384 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009385 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009386 .block_erasers =
9387 {
9388 {
9389 .eraseblocks = { {4 * 1024, 512} },
9390 .block_erase = spi_block_erase_20,
9391 }, {
9392 .eraseblocks = { {64 * 1024, 32} },
9393 .block_erase = spi_block_erase_d8,
9394 }, {
9395 .eraseblocks = { {2 * 1024 * 1024, 1} },
9396 .block_erase = spi_block_erase_60,
9397 }, {
9398 .eraseblocks = { {2 * 1024 * 1024, 1} },
9399 .block_erase = spi_block_erase_c7,
9400 }
9401 },
Nico Huber46552c82024-03-27 01:18:12 +01009402 .reg_bits =
9403 {
9404 .qe = {STATUS1, 6, RW},
9405 },
9406 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009407 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009408 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009409 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009410 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009411 .prepare_access = spi_prepare_io,
9412 .finish_access = spi_finish_io,
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009413 },
Stephan Guillouxfd315502009-04-20 22:54:13 +00009414
Stephan Guillouxf5c70902009-04-19 23:04:00 +00009415 {
9416 .vendor = "Macronix",
Stephan Guilloux3611b802010-09-13 19:59:28 +00009417 .name = "MX25L1635E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009418 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009419 .manufacture_id = MACRONIX_ID,
9420 .model_id = MACRONIX_MX25L1635E,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009421 .total_size = 2048,
9422 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +00009423 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009424 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9425 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009426 .tested = TEST_UNTESTED,
9427 .probe = probe_spi_rdid,
9428 .probe_timing = TIMING_ZERO,
9429 .block_erasers =
9430 {
9431 {
9432 .eraseblocks = { {4 * 1024, 512} },
9433 .block_erase = spi_block_erase_20,
9434 }, {
9435 .eraseblocks = { {64 * 1024, 32} },
9436 .block_erase = spi_block_erase_d8,
9437 }, {
9438 .eraseblocks = { {2 * 1024 * 1024, 1} },
9439 .block_erase = spi_block_erase_60,
9440 }, {
9441 .eraseblocks = { {2 * 1024 * 1024, 1} },
9442 .block_erase = spi_block_erase_c7,
9443 }
9444 },
Nico Huber46552c82024-03-27 01:18:12 +01009445 .reg_bits =
9446 {
9447 .qe = {STATUS1, 6, RW},
9448 },
9449 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009450 .unlock = spi_disable_blockprotect_bp3_srwd,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009451 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009452 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +00009453 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009454 .prepare_access = spi_prepare_io,
9455 .finish_access = spi_finish_io,
Stephan Guilloux3611b802010-09-13 19:59:28 +00009456 },
9457
9458 {
9459 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009460 .name = "MX25L2005(C)/MX25L2006E",
9461 .bustype = BUS_SPI,
9462 .manufacture_id = MACRONIX_ID,
9463 .model_id = MACRONIX_MX25L2005,
9464 .total_size = 256,
9465 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009466 /* FEATURE_FAST_READ_DOUT: MX25L2006E */
9467 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009468 .tested = TEST_OK_PREW,
9469 .probe = probe_spi_rdid,
9470 .probe_timing = TIMING_ZERO,
9471 .block_erasers =
9472 {
9473 {
9474 .eraseblocks = { {4 * 1024, 64} },
9475 .block_erase = spi_block_erase_20,
9476 }, {
9477 .eraseblocks = { {64 * 1024, 4} },
9478 .block_erase = spi_block_erase_52,
9479 }, {
9480 .eraseblocks = { {64 * 1024, 4} },
9481 .block_erase = spi_block_erase_d8,
9482 }, {
9483 .eraseblocks = { {256 * 1024, 1} },
9484 .block_erase = spi_block_erase_60,
9485 }, {
9486 .eraseblocks = { {256 * 1024, 1} },
9487 .block_erase = spi_block_erase_c7,
9488 },
9489 },
9490 .printlock = spi_prettyprint_status_register_bp1_srwd,
9491 .unlock = spi_disable_blockprotect,
9492 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009493 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009494 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009495 .prepare_access = spi_prepare_io,
9496 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009497 },
9498
9499 {
9500 .vendor = "Macronix",
Alan Green03707302019-08-26 12:50:43 +10009501 .name = "MX25L25635F/MX25L25645G",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009502 .bustype = BUS_SPI,
9503 .manufacture_id = MACRONIX_ID,
9504 .model_id = MACRONIX_MX25L25635F,
9505 .total_size = 32768,
9506 .page_size = 256,
9507 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009508 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
9509 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
9510 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Nico Huberc972aed2024-08-30 02:06:41 +02009511 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009512 .probe = probe_spi_rdid,
9513 .probe_timing = TIMING_ZERO,
9514 .block_erasers =
9515 {
9516 {
9517 .eraseblocks = { {4 * 1024, 8192} },
9518 .block_erase = spi_block_erase_21,
9519 }, {
9520 .eraseblocks = { {4 * 1024, 8192} },
9521 .block_erase = spi_block_erase_20,
9522 }, {
9523 .eraseblocks = { {32 * 1024, 1024} },
9524 .block_erase = spi_block_erase_5c,
9525 }, {
9526 .eraseblocks = { {32 * 1024, 1024} },
9527 .block_erase = spi_block_erase_52,
9528 }, {
9529 .eraseblocks = { {64 * 1024, 512} },
9530 .block_erase = spi_block_erase_dc,
9531 }, {
9532 .eraseblocks = { {64 * 1024, 512} },
9533 .block_erase = spi_block_erase_d8,
9534 }, {
9535 .eraseblocks = { {32 * 1024 * 1024, 1} },
9536 .block_erase = spi_block_erase_60,
9537 }, {
9538 .eraseblocks = { {32 * 1024 * 1024, 1} },
9539 .block_erase = spi_block_erase_c7,
9540 }
9541 },
9542 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +01009543 .reg_bits = {
9544 .qe = {STATUS1, 6, RW},
9545 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
Nico Huberc972aed2024-08-30 02:06:41 +02009546 .srp = {STATUS1, 7, RW},
9547 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9548 .tb = {CONFIG, 3, OTP},
Nico Huber46552c82024-03-27 01:18:12 +01009549 },
Nico Huberc972aed2024-08-30 02:06:41 +02009550 .wp_write_cfg = spi_wp_write_cfg,
9551 .wp_read_cfg = spi_wp_read_cfg,
9552 .wp_get_ranges = spi_wp_get_available_ranges,
9553 .decode_range = decode_range_spi25,
Nico Huber46552c82024-03-27 01:18:12 +01009554 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009555 .unlock = spi_disable_blockprotect_bp3_srwd,
9556 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009557 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009558 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009559 .prepare_access = spi_prepare_io,
9560 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009561 },
9562
9563 {
9564 .vendor = "Macronix",
Stefan Tauner226037d2013-03-16 01:22:12 +00009565 .name = "MX25L3205(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009566 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009567 .manufacture_id = MACRONIX_ID,
9568 .model_id = MACRONIX_MX25L3205,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009569 .total_size = 4096,
9570 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009571 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
David Hendricks22e05322010-12-13 23:54:59 +00009572 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009573 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009574 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +00009575 .block_erasers =
9576 {
9577 {
Stefan Tauner226037d2013-03-16 01:22:12 +00009578 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +00009579 .block_erase = spi_block_erase_20,
9580 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +00009581 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +00009582 .block_erase = spi_block_erase_d8,
9583 }, {
9584 .eraseblocks = { {4 * 1024 * 1024, 1} },
9585 .block_erase = spi_block_erase_60,
9586 }, {
9587 .eraseblocks = { {4 * 1024 * 1024, 1} },
9588 .block_erase = spi_block_erase_c7,
9589 },
9590 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009591 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00009592 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009593 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009594 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009595 .voltage = {2700, 3600},
9596 },
9597
9598 {
9599 .vendor = "Macronix",
9600 .name = "MX25L3205D/MX25L3208D",
9601 .bustype = BUS_SPI,
9602 .manufacture_id = MACRONIX_ID,
9603 .model_id = MACRONIX_MX25L3205,
9604 .total_size = 4096,
9605 .page_size = 256,
9606 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009607 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009608 .tested = TEST_OK_PREW,
9609 .probe = probe_spi_rdid,
9610 .probe_timing = TIMING_ZERO,
9611 .block_erasers =
9612 {
9613 {
9614 .eraseblocks = { {4 * 1024, 1024} },
9615 .block_erase = spi_block_erase_20,
9616 }, {
9617 .eraseblocks = { {64 * 1024, 64} },
9618 .block_erase = spi_block_erase_d8,
9619 }, {
9620 .eraseblocks = { {4 * 1024 * 1024, 1} },
9621 .block_erase = spi_block_erase_60,
9622 }, {
9623 .eraseblocks = { {4 * 1024 * 1024, 1} },
9624 .block_erase = spi_block_erase_c7,
9625 },
9626 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009627 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009628 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009629 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009630 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009631 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009632 .prepare_access = spi_prepare_io,
9633 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009634 },
9635
9636 {
9637 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009638 .name = "MX25L3206E/MX25L3208E",
Stefan Tauner226037d2013-03-16 01:22:12 +00009639 .bustype = BUS_SPI,
9640 .manufacture_id = MACRONIX_ID,
9641 .model_id = MACRONIX_MX25L3205,
9642 .total_size = 4096,
9643 .page_size = 256,
9644 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009645 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner226037d2013-03-16 01:22:12 +00009646 .tested = TEST_OK_PREW,
9647 .probe = probe_spi_rdid,
9648 .probe_timing = TIMING_ZERO,
9649 .block_erasers =
9650 {
9651 {
9652 .eraseblocks = { {4 * 1024, 1024} },
9653 .block_erase = spi_block_erase_20,
9654 }, {
9655 .eraseblocks = { {64 * 1024, 64} },
9656 .block_erase = spi_block_erase_d8,
9657 }, {
9658 .eraseblocks = { {64 * 1024, 64} },
9659 .block_erase = spi_block_erase_52,
9660 }, {
9661 .eraseblocks = { {4 * 1024 * 1024, 1} },
9662 .block_erase = spi_block_erase_60,
9663 }, {
9664 .eraseblocks = { {4 * 1024 * 1024, 1} },
9665 .block_erase = spi_block_erase_c7,
9666 },
9667 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009668 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009669 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009670 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009671 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009672 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009673 .prepare_access = spi_prepare_io,
9674 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +00009675 },
9676
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009677 {
9678 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009679 .name = "MX25L3235D",
9680 .bustype = BUS_SPI,
9681 .manufacture_id = MACRONIX_ID,
9682 .model_id = MACRONIX_MX25L3235D,
9683 .total_size = 4096,
9684 .page_size = 256,
9685 /* OTP: 256B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009686 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
9687 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009688 .tested = TEST_UNTESTED,
9689 .probe = probe_spi_rdid,
9690 .probe_timing = TIMING_ZERO,
9691 .block_erasers =
9692 {
9693 {
9694 .eraseblocks = { {4 * 1024, 1024} },
9695 .block_erase = spi_block_erase_20,
9696 }, {
9697 .eraseblocks = { {64 * 1024, 64} },
9698 .block_erase = spi_block_erase_d8,
9699 }, {
9700 .eraseblocks = { {4 * 1024 * 1024, 1} },
9701 .block_erase = spi_block_erase_60,
9702 }, {
9703 .eraseblocks = { {4 * 1024 * 1024, 1} },
9704 .block_erase = spi_block_erase_c7,
9705 }
9706 },
Nico Huber46552c82024-03-27 01:18:12 +01009707 .reg_bits =
9708 {
9709 .qe = {STATUS1, 6, RW},
9710 },
9711 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009712 .unlock = spi_disable_blockprotect_bp3_srwd,
9713 .write = spi_chip_write_256,
9714 .read = spi_chip_read,
9715 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009716 .prepare_access = spi_prepare_io,
9717 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009718 },
9719
9720 {
9721 .vendor = "Macronix",
Nico Huberb6683e02021-04-21 13:04:29 +02009722 .name = "MX25L3233F/MX25L3273E",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009723 .bustype = BUS_SPI,
9724 .manufacture_id = MACRONIX_ID,
9725 .model_id = MACRONIX_MX25L3205,
9726 .total_size = 4096,
9727 .page_size = 256,
Nico Huber6e69e2b2021-04-21 13:03:13 +02009728 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009729 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Stefan Tauner23e10b82016-01-23 16:16:49 +00009730 .tested = TEST_OK_PREW,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009731 .probe = probe_spi_rdid,
9732 .probe_timing = TIMING_ZERO,
9733 .block_erasers =
9734 {
9735 {
9736 .eraseblocks = { {4 * 1024, 1024} },
9737 .block_erase = spi_block_erase_20,
9738 }, {
9739 .eraseblocks = { {32 * 1024, 128} },
9740 .block_erase = spi_block_erase_52,
9741 }, {
9742 .eraseblocks = { {64 * 1024, 64} },
9743 .block_erase = spi_block_erase_d8,
9744 }, {
9745 .eraseblocks = { {4 * 1024 * 1024, 1} },
9746 .block_erase = spi_block_erase_60,
9747 }, {
9748 .eraseblocks = { {4 * 1024 * 1024, 1} },
9749 .block_erase = spi_block_erase_c7,
9750 },
9751 },
Nico Huber46552c82024-03-27 01:18:12 +01009752 .reg_bits =
9753 {
9754 .qe = {STATUS1, 6, RW},
9755 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00009756 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +00009757 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009758 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009759 .read = spi_chip_read,
Nico Huberb6683e02021-04-21 13:04:29 +02009760 .voltage = {2700, 3600}, /* 33F 2.65V..3.6V */
Nico Huber930d4212024-05-04 18:59:15 +02009761 .prepare_access = spi_prepare_io,
9762 .finish_access = spi_finish_io,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00009763 },
9764
9765 {
9766 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009767 .name = "MX25L4005(A/C)/MX25L4006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009768 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009769 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009770 .model_id = MACRONIX_MX25L4005,
9771 .total_size = 512,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009772 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +01009773 /* FEATURE_FAST_READ_DOUT: MX25L4006E */
9774 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009775 .tested = TEST_OK_PREW,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009776 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009777 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009778 .block_erasers =
9779 {
9780 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009781 .eraseblocks = { {4 * 1024, 128} },
Sean Nelson54596372010-01-09 05:30:14 +00009782 .block_erase = spi_block_erase_20,
9783 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009784 .eraseblocks = { {64 * 1024, 8} },
9785 .block_erase = spi_block_erase_52,
9786 }, {
9787 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson54596372010-01-09 05:30:14 +00009788 .block_erase = spi_block_erase_d8,
9789 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009790 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009791 .block_erase = spi_block_erase_60,
9792 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10009793 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +00009794 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009795 },
Sean Nelson54596372010-01-09 05:30:14 +00009796 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009797 .printlock = spi_prettyprint_status_register_bp2_srwd,
9798 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009799 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009800 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009801 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009802 .prepare_access = spi_prepare_io,
9803 .finish_access = spi_finish_io,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +00009804 },
9805
9806 {
9807 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009808 .name = "MX25L512(E)/MX25V512(C)",
9809 .bustype = BUS_SPI,
9810 .manufacture_id = MACRONIX_ID,
9811 .model_id = MACRONIX_MX25L512,
9812 .total_size = 64,
9813 .page_size = 256,
9814 /* MX25L512E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +01009815 /* FEATURE_FAST_READ_DOUT: MX25L512E */
9816 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009817 .tested = TEST_OK_PREW,
9818 .probe = probe_spi_rdid,
9819 .probe_timing = TIMING_ZERO,
9820 .block_erasers =
9821 {
9822 {
9823 .eraseblocks = { {4 * 1024, 16} },
9824 .block_erase = spi_block_erase_20,
9825 }, {
9826 .eraseblocks = { {64 * 1024, 1} },
9827 .block_erase = spi_block_erase_52,
9828 }, {
9829 .eraseblocks = { {64 * 1024, 1} },
9830 .block_erase = spi_block_erase_d8,
9831 }, {
9832 .eraseblocks = { {64 * 1024, 1} },
9833 .block_erase = spi_block_erase_60,
9834 }, {
9835 .eraseblocks = { {64 * 1024, 1} },
9836 .block_erase = spi_block_erase_c7,
9837 },
9838 },
9839 .printlock = spi_prettyprint_status_register_bp1_srwd,
9840 .unlock = spi_disable_blockprotect,
9841 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009842 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009843 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V512(C) */
9844 },
9845
9846 {
9847 .vendor = "Macronix",
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009848 .name = "MX25L5121E",
9849 .bustype = BUS_SPI,
9850 .manufacture_id = MACRONIX_ID,
9851 .model_id = MACRONIX_MX25L5121E,
9852 .total_size = 64,
9853 .page_size = 32,
Nico Huber46552c82024-03-27 01:18:12 +01009854 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009855 .tested = TEST_OK_PREW,
9856 .probe = probe_spi_rdid,
9857 .probe_timing = TIMING_ZERO,
9858 .block_erasers =
9859 {
9860 {
9861 .eraseblocks = { {4 * 1024, 16} },
9862 .block_erase = spi_block_erase_20,
9863 }, {
9864 .eraseblocks = { {64 * 1024, 1} },
9865 .block_erase = spi_block_erase_52,
9866 }, {
9867 .eraseblocks = { {64 * 1024, 1} },
9868 .block_erase = spi_block_erase_d8,
9869 }, {
9870 .eraseblocks = { {64 * 1024, 1} },
9871 .block_erase = spi_block_erase_60,
9872 }, {
9873 .eraseblocks = { {64 * 1024, 1} },
9874 .block_erase = spi_block_erase_c7,
9875 },
9876 },
9877 .printlock = spi_prettyprint_status_register_bp1_srwd,
9878 .unlock = spi_disable_blockprotect,
9879 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009880 .read = spi_chip_read,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +02009881 .voltage = {2700, 3600},
9882 },
9883
9884 {
9885 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009886 .name = "MX25L6405",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00009887 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00009888 .manufacture_id = MACRONIX_ID,
9889 .model_id = MACRONIX_MX25L6405,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009890 .total_size = 8192,
9891 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009892 /* Has an additional 512B EEPROM sector */
9893 .feature_bits = FEATURE_WRSR_WREN,
Paul Menzelac427b22012-02-16 21:07:07 +00009894 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009895 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +00009896 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00009897 .block_erasers =
9898 {
9899 {
9900 .eraseblocks = { {64 * 1024, 128} },
9901 .block_erase = spi_block_erase_20,
9902 }, {
9903 .eraseblocks = { {64 * 1024, 128} },
9904 .block_erase = spi_block_erase_d8,
9905 }, {
9906 .eraseblocks = { {8 * 1024 * 1024, 1} },
9907 .block_erase = spi_block_erase_60,
9908 }, {
9909 .eraseblocks = { {8 * 1024 * 1024, 1} },
9910 .block_erase = spi_block_erase_c7,
9911 }
9912 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009913 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: error flag */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009914 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +00009915 .write = spi_chip_write_256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009916 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00009917 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00009918 },
9919
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00009920 {
9921 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009922 .name = "MX25L6405D",
Stefan Tauner226037d2013-03-16 01:22:12 +00009923 .bustype = BUS_SPI,
9924 .manufacture_id = MACRONIX_ID,
9925 .model_id = MACRONIX_MX25L6405,
9926 .total_size = 8192,
9927 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009928 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009929 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +00009930 .tested = TEST_OK_PREW,
9931 .probe = probe_spi_rdid,
9932 .probe_timing = TIMING_ZERO,
9933 .block_erasers =
9934 {
9935 {
9936 .eraseblocks = { {4 * 1024, 2048} },
9937 .block_erase = spi_block_erase_20,
9938 }, {
9939 .eraseblocks = { {64 * 1024, 128} },
9940 .block_erase = spi_block_erase_d8,
9941 }, {
9942 .eraseblocks = { {8 * 1024 * 1024, 1} },
9943 .block_erase = spi_block_erase_60,
9944 }, {
9945 .eraseblocks = { {8 * 1024 * 1024, 1} },
9946 .block_erase = spi_block_erase_c7,
9947 }
9948 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009949 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +00009950 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +00009951 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009952 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +00009953 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009954 .prepare_access = spi_prepare_io,
9955 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +00009956 },
9957
9958 {
9959 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009960 .name = "MX25L6406E/MX25L6408E",
9961 .bustype = BUS_SPI,
9962 .manufacture_id = MACRONIX_ID,
9963 .model_id = MACRONIX_MX25L6405,
9964 .total_size = 8192,
9965 .page_size = 256,
9966 /* MX25L6406E supports SFDP */
9967 /* OTP: 06E 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +01009968 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009969 .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 }, {
9978 .eraseblocks = { {64 * 1024, 128} },
9979 .block_erase = spi_block_erase_52,
9980 }, {
9981 .eraseblocks = { {64 * 1024, 128} },
9982 .block_erase = spi_block_erase_d8,
9983 }, {
9984 .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 },
9991 .printlock = spi_prettyprint_status_register_bp3_srwd,
9992 .unlock = spi_disable_blockprotect_bp3_srwd,
9993 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +01009994 .read = spi_chip_read,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009995 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009996 .prepare_access = spi_prepare_io,
9997 .finish_access = spi_finish_io,
Stefan Tauner74dc73f2015-03-01 22:04:38 +00009998 },
9999
10000 {
10001 .vendor = "Macronix",
Nico Huberb0072782017-12-06 21:02:57 +010010002 .name = "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F",
Stefan Tauner226037d2013-03-16 01:22:12 +000010003 .bustype = BUS_SPI,
10004 .manufacture_id = MACRONIX_ID,
10005 .model_id = MACRONIX_MX25L6405,
10006 .total_size = 8192,
10007 .page_size = 256,
10008 /* supports SFDP */
10009 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010010010 /* FEATURE_QIO: MX25L6473E, MX25L6473F */
10011 /* FEATURE_FAST_READ_DOUT, _QOUT: MX25L6436E */
10012 /* FEATURE_FAST_READ_DIO, _QIO: MX25L6445E, MX25L6465E */
10013 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +000010014 .tested = TEST_OK_PREW,
10015 .probe = probe_spi_rdid,
10016 .probe_timing = TIMING_ZERO,
10017 .block_erasers =
10018 {
10019 {
10020 .eraseblocks = { {4 * 1024, 2048} },
10021 .block_erase = spi_block_erase_20,
10022 }, {
10023 .eraseblocks = { {32 * 1024, 256} },
10024 .block_erase = spi_block_erase_52,
10025 }, {
10026 .eraseblocks = { {64 * 1024, 128} },
10027 .block_erase = spi_block_erase_d8,
10028 }, {
10029 .eraseblocks = { {8 * 1024 * 1024, 1} },
10030 .block_erase = spi_block_erase_60,
10031 }, {
10032 .eraseblocks = { {8 * 1024 * 1024, 1} },
10033 .block_erase = spi_block_erase_c7,
10034 }
10035 },
Nico Huber46552c82024-03-27 01:18:12 +010010036 .reg_bits =
10037 {
10038 .qe = {STATUS1, 6, RW},
10039 },
10040 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000010041 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000010042 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010010043 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000010044 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010045 .prepare_access = spi_prepare_io,
10046 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +000010047 },
10048
10049 {
10050 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010051 .name = "MX25L6495F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010052 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010053 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010054 .model_id = MACRONIX_MX25L6495F,
10055 .total_size = 8192,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +000010056 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010057 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Stefan Tauner226037d2013-03-16 01:22:12 +000010058 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner0554ca52013-07-25 22:54:25 +000010059 .tested = TEST_OK_PREW,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +000010060 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000010061 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010062 .block_erasers =
10063 {
10064 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010065 .eraseblocks = { {4 * 1024, 2048} },
Sean Nelson54596372010-01-09 05:30:14 +000010066 .block_erase = spi_block_erase_20,
10067 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010068 .eraseblocks = { {32 * 1024, 256} },
10069 .block_erase = spi_block_erase_52,
10070 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +053010071 .eraseblocks = { {64 * 1024, 128} },
10072 .block_erase = spi_block_erase_d8,
10073 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010074 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +000010075 .block_erase = spi_block_erase_60,
10076 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010077 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +000010078 .block_erase = spi_block_erase_c7,
10079 }
10080 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010081 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000010082 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010083 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
Stefan Tauner5c316f92015-02-08 21:57:52 +000010084 .voltage = {2700, 3600},
10085 },
10086
10087 {
10088 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010089 .name = "MX25L8005/MX25L8006E/MX25L8008E/MX25V8005",
Stefan Tauner5c316f92015-02-08 21:57:52 +000010090 .bustype = BUS_SPI,
10091 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010092 .model_id = MACRONIX_MX25L8005,
10093 .total_size = 1024,
10094 .page_size = 256,
10095 /* MX25L8006E, MX25L8008E support SFDP */
10096 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L8006E, MX25L8008E only) */
Nico Huber46552c82024-03-27 01:18:12 +010010097 /* FEATURE_FAST_READ_DOUT: MX25L8006E, MX25L8008E */
10098 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010099 .tested = TEST_OK_PREW,
10100 .probe = probe_spi_rdid,
10101 .probe_timing = TIMING_ZERO,
10102 .block_erasers =
10103 {
10104 {
10105 .eraseblocks = { {4 * 1024, 256} },
10106 .block_erase = spi_block_erase_20,
10107 }, {
10108 .eraseblocks = { {64 * 1024, 16} },
10109 .block_erase = spi_block_erase_52,
10110 }, {
10111 .eraseblocks = { {64 * 1024, 16} },
10112 .block_erase = spi_block_erase_d8,
10113 }, {
10114 .eraseblocks = { {1024 * 1024, 1} },
10115 .block_erase = spi_block_erase_60,
10116 }, {
10117 .eraseblocks = { {1024 * 1024, 1} },
10118 .block_erase = spi_block_erase_c7,
10119 },
10120 },
10121 .printlock = spi_prettyprint_status_register_bp2_srwd,
10122 .unlock = spi_disable_blockprotect,
10123 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010010124 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010125 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V8005 */
10126 },
10127
10128 {
10129 .vendor = "Macronix",
sibradzicf62623c2020-03-14 17:21:34 +090010130 .name = "MX25R3235F",
10131 .bustype = BUS_SPI,
10132 .manufacture_id = MACRONIX_ID,
10133 .model_id = MACRONIX_MX25R3235F,
10134 .total_size = 4096,
10135 .page_size = 256,
10136 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +010010137 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
sibradzicf62623c2020-03-14 17:21:34 +090010138 .tested = TEST_OK_PREW,
10139 .probe = probe_spi_rdid,
10140 .probe_timing = TIMING_ZERO,
10141 .block_erasers =
10142 {
10143 {
10144 .eraseblocks = { {4 * 1024, 1024} },
10145 .block_erase = spi_block_erase_20,
10146 }, {
sibradzicf62623c2020-03-14 17:21:34 +090010147 .eraseblocks = { {32 * 1024, 128} },
10148 .block_erase = spi_block_erase_52,
10149 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +053010150 .eraseblocks = { {64 * 1024, 64} },
10151 .block_erase = spi_block_erase_d8,
10152 }, {
sibradzicf62623c2020-03-14 17:21:34 +090010153 .eraseblocks = { {4 * 1024 * 1024, 1} },
10154 .block_erase = spi_block_erase_60,
10155 }, {
10156 .eraseblocks = { {4 * 1024 * 1024, 1} },
10157 .block_erase = spi_block_erase_c7,
10158 }
10159 },
Nico Huber5f509992024-03-27 01:18:12 +010010160 .reg_bits =
10161 {
10162 .qe = {STATUS1, 6, RW},
10163 },
10164 .printlock = spi_prettyprint_status_register_bp3_srwd,
sibradzicf62623c2020-03-14 17:21:34 +090010165 .unlock = spi_disable_blockprotect_bp3_srwd,
10166 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +010010167 .read = spi_chip_read,
sibradzicf62623c2020-03-14 17:21:34 +090010168 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010169 .prepare_access = spi_prepare_io,
10170 .finish_access = spi_finish_io,
sibradzicf62623c2020-03-14 17:21:34 +090010171 },
10172
10173 {
10174 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010175 .name = "MX25R6435F",
10176 .bustype = BUS_SPI,
10177 .manufacture_id = MACRONIX_ID,
10178 .model_id = MACRONIX_MX25R6435F,
10179 .total_size = 8192,
10180 .page_size = 256,
10181 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +010010182 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010183 .tested = TEST_OK_PREW,
10184 .probe = probe_spi_rdid,
10185 .probe_timing = TIMING_ZERO,
10186 .block_erasers =
10187 {
10188 {
10189 .eraseblocks = { {4 * 1024, 2048} },
10190 .block_erase = spi_block_erase_20,
10191 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010192 .eraseblocks = { {32 * 1024, 256} },
10193 .block_erase = spi_block_erase_52,
10194 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +053010195 .eraseblocks = { {64 * 1024, 128} },
10196 .block_erase = spi_block_erase_d8,
10197 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010198 .eraseblocks = { {8 * 1024 * 1024, 1} },
10199 .block_erase = spi_block_erase_60,
10200 }, {
10201 .eraseblocks = { {8 * 1024 * 1024, 1} },
10202 .block_erase = spi_block_erase_c7,
10203 }
10204 },
Nico Huber5f509992024-03-27 01:18:12 +010010205 .reg_bits =
10206 {
10207 .qe = {STATUS1, 6, RW},
10208 },
10209 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010210 .unlock = spi_disable_blockprotect_bp3_srwd,
10211 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +010010212 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010213 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010214 .prepare_access = spi_prepare_io,
10215 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010216 },
10217
10218 {
10219 .vendor = "Macronix",
10220 .name = "MX25U12835F",
10221 .bustype = BUS_SPI,
10222 .manufacture_id = MACRONIX_ID,
10223 .model_id = MACRONIX_MX25U12835E,
Stefan Tauner5c316f92015-02-08 21:57:52 +000010224 .total_size = 16384,
10225 .page_size = 256,
10226 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010227 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_35,
10228 .dummy_cycles =
10229 {
10230 /* 133MHz version has configuration register
10231 bit to toggle 8 dummy cycles for QIO, defaults: */
10232 .qpi_fast_read = 4,
10233 .qpi_fast_read_qio = 6,
10234 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000010235 .tested = TEST_OK_PREW,
10236 .probe = probe_spi_rdid,
10237 .probe_timing = TIMING_ZERO,
10238 .block_erasers =
10239 {
10240 {
10241 .eraseblocks = { {4 * 1024, 4096} },
10242 .block_erase = spi_block_erase_20,
10243 }, {
10244 .eraseblocks = { {32 * 1024, 512} },
10245 .block_erase = spi_block_erase_52,
10246 }, {
10247 .eraseblocks = { {64 * 1024, 256} },
10248 .block_erase = spi_block_erase_d8,
10249 }, {
10250 .eraseblocks = { {16 * 1024 * 1024, 1} },
10251 .block_erase = spi_block_erase_60,
10252 }, {
10253 .eraseblocks = { {16 * 1024 * 1024, 1} },
10254 .block_erase = spi_block_erase_c7,
10255 }
10256 },
Angel Ponsf112e242018-09-30 20:14:17 +020010257 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010258 .reg_bits =
10259 {
10260 .qe = {STATUS1, 6, RW},
10261 },
10262 .printlock = spi_prettyprint_status_register_bp3_srwd,
Angel Ponsf112e242018-09-30 20:14:17 +020010263 .unlock = spi_disable_blockprotect_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010264 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010265 .read = spi_chip_read,
Angel Ponsf112e242018-09-30 20:14:17 +020010266 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010267 .prepare_access = spi_prepare_io,
10268 .finish_access = spi_finish_io,
Angel Ponsf112e242018-09-30 20:14:17 +020010269 },
10270
10271 {
10272 .vendor = "Macronix",
Vincent Palatinf800f552013-03-15 02:03:16 +000010273 .name = "MX25U1635E",
10274 .bustype = BUS_SPI,
10275 .manufacture_id = MACRONIX_ID,
10276 .model_id = MACRONIX_MX25U1635E,
10277 .total_size = 2048,
10278 .page_size = 256,
10279 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010280 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10281 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10282 .dummy_cycles =
10283 {
10284 .qpi_fast_read = 4,
10285 .qpi_fast_read_qio = 6,
10286 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000010287 .tested = TEST_OK_PR,
Vincent Palatinf800f552013-03-15 02:03:16 +000010288 .probe = probe_spi_rdid,
10289 .probe_timing = TIMING_ZERO,
10290 .block_erasers =
10291 {
10292 {
10293 .eraseblocks = { {4 * 1024, 512} },
10294 .block_erase = spi_block_erase_20,
10295 }, {
10296 .eraseblocks = { {32 * 1024, 64} },
10297 .block_erase = spi_block_erase_52,
10298 }, {
10299 .eraseblocks = { {64 * 1024, 32} },
10300 .block_erase = spi_block_erase_d8,
10301 }, {
10302 .eraseblocks = { {2 * 1024 * 1024, 1} },
10303 .block_erase = spi_block_erase_60,
10304 }, {
10305 .eraseblocks = { {2 * 1024 * 1024, 1} },
10306 .block_erase = spi_block_erase_c7,
10307 }
10308 },
10309 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010310 .reg_bits =
10311 {
10312 .qe = {STATUS1, 6, RW},
10313 },
10314 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000010315 .unlock = spi_disable_blockprotect_bp3_srwd,
Vincent Palatinf800f552013-03-15 02:03:16 +000010316 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010317 .read = spi_chip_read,
Vincent Palatinf800f552013-03-15 02:03:16 +000010318 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010319 .prepare_access = spi_prepare_io,
10320 .finish_access = spi_finish_io,
Vincent Palatinf800f552013-03-15 02:03:16 +000010321 },
10322
10323 {
10324 .vendor = "Macronix",
David Tomaschikf75d8c52019-06-20 09:49:01 -070010325 .name = "MX25U25635F",
10326 .bustype = BUS_SPI,
10327 .manufacture_id = MACRONIX_ID,
10328 .model_id = MACRONIX_MX25U25635F,
10329 .total_size = 32768,
10330 .page_size = 256,
10331 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010332 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
10333 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
10334 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Nikolai Artemiev148254b2021-03-23 17:21:10 +110010335 .tested = TEST_OK_PREW,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010336 .probe = probe_spi_rdid,
10337 .probe_timing = TIMING_ZERO,
10338 .block_erasers =
10339 {
10340 {
10341 .eraseblocks = { {4 * 1024, 8192} },
10342 .block_erase = spi_block_erase_21,
10343 }, {
10344 .eraseblocks = { {4 * 1024, 8192} },
10345 .block_erase = spi_block_erase_20,
10346 }, {
10347 .eraseblocks = { {32 * 1024, 1024} },
10348 .block_erase = spi_block_erase_5c,
10349 }, {
10350 .eraseblocks = { {32 * 1024, 1024} },
10351 .block_erase = spi_block_erase_52,
10352 }, {
10353 .eraseblocks = { {64 * 1024, 512} },
10354 .block_erase = spi_block_erase_dc,
10355 }, {
10356 .eraseblocks = { {64 * 1024, 512} },
10357 .block_erase = spi_block_erase_d8,
10358 }, {
10359 .eraseblocks = { {32 * 1024 * 1024, 1} },
10360 .block_erase = spi_block_erase_60,
10361 }, {
10362 .eraseblocks = { {32 * 1024 * 1024, 1} },
10363 .block_erase = spi_block_erase_c7,
10364 }
10365 },
10366 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010010367 .reg_bits =
10368 {
Nico Huber4fa39c52024-03-27 01:18:12 +010010369 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010010370 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
10371 },
Nico Huber4fa39c52024-03-27 01:18:12 +010010372 .printlock = spi_prettyprint_status_register_bp3_srwd,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010373 .unlock = spi_disable_blockprotect_bp3_srwd,
10374 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010375 .read = spi_chip_read,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010376 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010377 .prepare_access = spi_prepare_io,
10378 .finish_access = spi_finish_io,
David Tomaschikf75d8c52019-06-20 09:49:01 -070010379 },
10380
10381 {
10382 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010383 .name = "MX25U3235E/F",
10384 .bustype = BUS_SPI,
10385 .manufacture_id = MACRONIX_ID,
10386 .model_id = MACRONIX_MX25U3235E,
10387 .total_size = 4096,
10388 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010389 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100010390 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010391 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10392 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10393 .dummy_cycles =
10394 {
10395 .qpi_fast_read = 4,
10396 .qpi_fast_read_qio = 6,
10397 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010398 .tested = TEST_OK_PREW,
10399 .probe = probe_spi_rdid,
10400 .probe_timing = TIMING_ZERO,
10401 .block_erasers =
10402 {
10403 {
10404 .eraseblocks = { {4 * 1024, 1024} },
10405 .block_erase = spi_block_erase_20,
10406 }, {
10407 .eraseblocks = { {32 * 1024, 128} },
10408 .block_erase = spi_block_erase_52,
10409 }, {
10410 .eraseblocks = { {64 * 1024, 64} },
10411 .block_erase = spi_block_erase_d8,
10412 }, {
10413 .eraseblocks = { {4 * 1024 * 1024, 1} },
10414 .block_erase = spi_block_erase_60,
10415 }, {
10416 .eraseblocks = { {4 * 1024 * 1024, 1} },
10417 .block_erase = spi_block_erase_c7,
10418 }
10419 },
10420 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010421 .reg_bits =
10422 {
10423 .qe = {STATUS1, 6, RW},
10424 },
10425 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010426 .unlock = spi_disable_blockprotect_bp3_srwd,
10427 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010428 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010429 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010430 .prepare_access = spi_prepare_io,
10431 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010432 },
10433
10434 {
10435 .vendor = "Macronix",
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010436 .name = "MX25U51245G",
10437 .bustype = BUS_SPI,
10438 .manufacture_id = MACRONIX_ID,
10439 .model_id = MACRONIX_MX25U51245G,
10440 .total_size = 65536,
10441 .page_size = 256,
10442 /* OTP: 512B factory programmed and 512B customer programmed; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010443 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
10444 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
10445 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010446 .tested = TEST_OK_PREW,
10447 .probe = probe_spi_rdid,
10448 .probe_timing = TIMING_ZERO,
10449 .block_erasers =
10450 {
10451 {
10452 .eraseblocks = { {4 * 1024, 16384} },
10453 .block_erase = spi_block_erase_21,
10454 }, {
10455 .eraseblocks = { {4 * 1024, 16384} },
10456 .block_erase = spi_block_erase_20,
10457 }, {
10458 .eraseblocks = { {32 * 1024, 2048} },
10459 .block_erase = spi_block_erase_5c,
10460 }, {
10461 .eraseblocks = { {32 * 1024, 2048} },
10462 .block_erase = spi_block_erase_52,
10463 }, {
10464 .eraseblocks = { {64 * 1024, 1024} },
10465 .block_erase = spi_block_erase_dc,
10466 }, {
10467 .eraseblocks = { {64 * 1024, 1024} },
10468 .block_erase = spi_block_erase_d8,
10469 }, {
10470 .eraseblocks = { {64 * 1024 * 1024, 1} },
10471 .block_erase = spi_block_erase_60,
10472 }, {
10473 .eraseblocks = { {64 * 1024 * 1024, 1} },
10474 .block_erase = spi_block_erase_c7,
10475 }
10476 },
10477 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010010478 .reg_bits =
10479 {
Nico Huber4fa39c52024-03-27 01:18:12 +010010480 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010010481 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
10482 },
Nico Huber4fa39c52024-03-27 01:18:12 +010010483 .printlock = spi_prettyprint_status_register_bp3_srwd,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010484 .unlock = spi_disable_blockprotect_bp3_srwd,
10485 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010010486 .read = spi_chip_read,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010487 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010488 .prepare_access = spi_prepare_io,
10489 .finish_access = spi_finish_io,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010010490 },
10491
10492 {
10493 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010494 .name = "MX25U6435E/F",
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010495 .bustype = BUS_SPI,
10496 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010497 .model_id = MACRONIX_MX25U6435E,
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010498 .total_size = 8192,
10499 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010500 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100010501 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010502 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
10503 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
10504 .dummy_cycles =
10505 {
10506 .qpi_fast_read = 4,
10507 .qpi_fast_read_qio = 6,
10508 },
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010509 .tested = TEST_OK_PREW,
10510 .probe = probe_spi_rdid,
10511 .probe_timing = TIMING_ZERO,
10512 .block_erasers =
10513 {
10514 {
10515 .eraseblocks = { {4 * 1024, 2048} },
10516 .block_erase = spi_block_erase_20,
10517 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010518 .eraseblocks = { {32 * 1024, 256} },
10519 .block_erase = spi_block_erase_52,
10520 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010521 .eraseblocks = { {64 * 1024, 128} },
10522 .block_erase = spi_block_erase_d8,
10523 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000010524 .eraseblocks = { {8 * 1024 * 1024, 1} },
10525 .block_erase = spi_block_erase_60,
10526 }, {
10527 .eraseblocks = { {8 * 1024 * 1024, 1} },
10528 .block_erase = spi_block_erase_c7,
10529 }
10530 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010531 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010532 .reg_bits =
10533 {
10534 .qe = {STATUS1, 6, RW},
10535 },
10536 .printlock = spi_prettyprint_status_register_bp3_srwd,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010010537 .unlock = spi_disable_blockprotect_bp3_srwd,
10538 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010010539 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010540 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010541 .prepare_access = spi_prepare_io,
10542 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010543 },
10544
10545 {
10546 .vendor = "Macronix",
10547 .name = "MX25U8032E",
10548 .bustype = BUS_SPI,
10549 .manufacture_id = MACRONIX_ID,
10550 .model_id = MACRONIX_MX25U8032E,
10551 .total_size = 1024,
10552 .page_size = 256,
10553 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber4fa39c52024-03-27 01:18:12 +010010554 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
10555 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010556 .tested = TEST_OK_PREW,
10557 .probe = probe_spi_rdid,
10558 .probe_timing = TIMING_ZERO,
10559 .block_erasers =
10560 {
10561 {
10562 .eraseblocks = { {4 * 1024, 256} },
10563 .block_erase = spi_block_erase_20,
10564 }, {
10565 .eraseblocks = { {32 * 1024, 32} },
10566 .block_erase = spi_block_erase_52,
10567 }, {
10568 .eraseblocks = { {64 * 1024, 16} },
10569 .block_erase = spi_block_erase_d8,
10570 }, {
10571 .eraseblocks = { {1024 * 1024, 1} },
10572 .block_erase = spi_block_erase_60,
10573 }, {
10574 .eraseblocks = { {1024 * 1024, 1} },
10575 .block_erase = spi_block_erase_c7,
10576 }
10577 },
10578 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010010579 .reg_bits =
10580 {
10581 .qe = {STATUS1, 6, RW},
10582 },
10583 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010584 .unlock = spi_disable_blockprotect_bp3_srwd,
10585 .write = spi_chip_write_256,
Nico Huber4fa39c52024-03-27 01:18:12 +010010586 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010587 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020010588 .prepare_access = spi_prepare_io,
10589 .finish_access = spi_finish_io,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010010590 },
10591
10592 {
10593 .vendor = "Macronix",
Mark Panajotovic502a9132009-08-24 01:42:24 +000010594 .name = "MX29F001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010595 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010596 .manufacture_id = MACRONIX_ID,
10597 .model_id = MACRONIX_MX29F001B,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010598 .total_size = 128,
10599 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010600 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10601 .tested = TEST_UNTESTED,
10602 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010603 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010604 .block_erasers =
10605 {
10606 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000010607 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000010608 {8 * 1024, 1},
10609 {4 * 1024, 2},
10610 {8 * 1024, 2},
10611 {32 * 1024, 1},
10612 {64 * 1024, 1},
10613 },
Sean Nelson35727f72010-01-28 23:55:12 +000010614 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010615 }, {
10616 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010617 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010618 }
10619 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010620 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010621 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010622 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010623 .prepare_access = prepare_memory_access,
10624 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010625 },
10626
10627 {
10628 .vendor = "Macronix",
10629 .name = "MX29F001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010630 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010631 .manufacture_id = MACRONIX_ID,
10632 .model_id = MACRONIX_MX29F001T,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010633 .total_size = 128,
10634 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010635 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stefan Tauner74c6ec62011-05-18 01:31:46 +000010636 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000010637 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010638 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000010639 .block_erasers =
10640 {
10641 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000010642 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000010643 {64 * 1024, 1},
10644 {32 * 1024, 1},
10645 {8 * 1024, 2},
10646 {4 * 1024, 2},
10647 {8 * 1024, 1},
10648 },
Sean Nelson35727f72010-01-28 23:55:12 +000010649 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010650 }, {
10651 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010652 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000010653 }
10654 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010655 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010656 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010657 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010658 .prepare_access = prepare_memory_access,
10659 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000010660 },
10661
10662 {
10663 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000010664 .name = "MX29F002(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010665 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010666 .manufacture_id = MACRONIX_ID,
10667 .model_id = MACRONIX_MX29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010668 .total_size = 256,
10669 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010670 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010671 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000010672 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010673 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010674 .block_erasers =
10675 {
10676 {
10677 .eraseblocks = {
10678 {16 * 1024, 1},
10679 {8 * 1024, 2},
10680 {32 * 1024, 1},
10681 {64 * 1024, 3},
10682 },
Sean Nelson35727f72010-01-28 23:55:12 +000010683 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010684 }, {
10685 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010686 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010687 },
10688 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010689 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010690 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010691 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010692 .prepare_access = prepare_memory_access,
10693 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000010694 },
10695
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010696 {
10697 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000010698 .name = "MX29F002(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010699 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010700 .manufacture_id = MACRONIX_ID,
10701 .model_id = MACRONIX_MX29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010702 .total_size = 256,
10703 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000010704 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000010705 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000010706 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000010707 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010708 .block_erasers =
10709 {
10710 {
10711 .eraseblocks = {
10712 {64 * 1024, 3},
10713 {32 * 1024, 1},
10714 {8 * 1024, 2},
10715 {16 * 1024, 1},
10716 },
Sean Nelson35727f72010-01-28 23:55:12 +000010717 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010718 }, {
10719 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000010720 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000010721 },
10722 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000010723 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000010724 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000010725 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010726 .prepare_access = prepare_memory_access,
10727 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000010728 },
10729
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000010730 {
10731 .vendor = "Macronix",
Daniele Forsi6a18a932014-07-13 14:53:45 +000010732 .name = "MX29F022(N)B",
10733 .bustype = BUS_PARALLEL,
10734 .manufacture_id = MACRONIX_ID,
10735 .model_id = MACRONIX_MX29F022B,
10736 .total_size = 256,
10737 .page_size = 0, /* unused */
10738 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10739 .tested = TEST_UNTESTED,
10740 .probe = probe_jedec,
10741 .probe_timing = TIMING_ZERO,
10742 .block_erasers =
10743 {
10744 {
10745 .eraseblocks = {
10746 {16 * 1024, 1},
10747 {8 * 1024, 2},
10748 {32 * 1024, 1},
10749 {64 * 1024, 3},
10750 },
10751 .block_erase = erase_sector_jedec,
10752 }, {
10753 .eraseblocks = { {256 * 1024, 1} },
10754 .block_erase = erase_chip_block_jedec,
10755 }
10756 },
10757 .write = write_jedec_1,
10758 .read = read_memmapped,
10759 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010760 .prepare_access = prepare_memory_access,
10761 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000010762 },
10763
10764 {
10765 .vendor = "Macronix",
10766 .name = "MX29F022(N)T",
10767 .bustype = BUS_PARALLEL,
10768 .manufacture_id = MACRONIX_ID,
10769 .model_id = MACRONIX_MX29F022T,
10770 .total_size = 256,
10771 .page_size = 0, /* unused */
10772 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10773 .tested = TEST_OK_PREW,
10774 .probe = probe_jedec,
10775 .probe_timing = TIMING_ZERO,
10776 .block_erasers =
10777 {
10778 {
10779 .eraseblocks = {
10780 {64 * 1024, 3},
10781 {32 * 1024, 1},
10782 {8 * 1024, 2},
10783 {16 * 1024, 1},
10784 },
10785 .block_erase = erase_sector_jedec,
10786 }, {
10787 .eraseblocks = { {256 * 1024, 1} },
10788 .block_erase = erase_chip_block_jedec,
10789 }
10790 },
10791 .write = write_jedec_1,
10792 .read = read_memmapped,
10793 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010794 .prepare_access = prepare_memory_access,
10795 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000010796 },
10797
10798 {
10799 .vendor = "Macronix",
Joshua Roysf1324e02010-09-16 00:51:51 +000010800 .name = "MX29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010801 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +000010802 .manufacture_id = MACRONIX_ID,
10803 .model_id = MACRONIX_MX29F040,
10804 .total_size = 512,
10805 .page_size = 64 * 1024,
10806 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10807 .tested = TEST_UNTESTED,
10808 .probe = probe_jedec,
10809 .probe_timing = TIMING_ZERO,
10810 .block_erasers =
10811 {
10812 {
10813 .eraseblocks = { {64 * 1024, 8} },
10814 .block_erase = erase_sector_jedec,
10815 }, {
10816 .eraseblocks = { {512 * 1024, 1} },
10817 .block_erase = erase_chip_block_jedec,
10818 },
10819 },
10820 .write = write_jedec_1,
10821 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000010822 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010823 .prepare_access = prepare_memory_access,
10824 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +000010825 },
10826
10827 {
10828 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010829 .name = "MX29GL128F",
10830 .bustype = BUS_PARALLEL,
10831 .manufacture_id = MACRONIX_ID,
10832 .model_id = MACRONIX_MX29GL128F,
10833 .total_size = 16384,
10834 .page_size = 128 * 1024, /* actual page size is 16 */
10835 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10836 .tested = TEST_UNTESTED,
10837 .probe = probe_jedec_29gl,
10838 .probe_timing = TIMING_ZERO,
10839 .block_erasers =
10840 {
10841 {
10842 .eraseblocks = { {128 * 1024, 128} },
10843 .block_erase = erase_sector_jedec,
10844 }, {
10845 .eraseblocks = { {16 * 1024 * 1024, 1} },
10846 .block_erase = erase_chip_block_jedec,
10847 },
10848 },
10849 .write = write_jedec_1,
10850 .read = read_memmapped,
10851 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010852 .prepare_access = prepare_memory_access,
10853 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010854 },
10855
10856 {
10857 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010858 .name = "MX29GL320EB",
10859 .bustype = BUS_PARALLEL,
10860 .manufacture_id = MACRONIX_ID,
10861 .model_id = MACRONIX_MX29GL320EB,
10862 .total_size = 4096,
10863 .page_size = 128 * 1024, /* actual page size is 16 */
10864 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10865 .tested = TEST_UNTESTED,
10866 .probe = probe_jedec_29gl,
10867 .probe_timing = TIMING_ZERO,
10868 .block_erasers =
10869 {
10870 {
10871 .eraseblocks = {
10872 {8 * 1024, 8},
10873 {64 * 1024, 63},
10874 },
10875 .block_erase = erase_sector_jedec,
10876 }, {
10877 .eraseblocks = { {4 * 1024 * 1024, 1} },
10878 .block_erase = erase_chip_block_jedec,
10879 },
10880 },
10881 .write = write_jedec_1,
10882 .read = read_memmapped,
10883 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010884 .prepare_access = prepare_memory_access,
10885 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010886 },
10887
10888 {
10889 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010890 .name = "MX29GL320EH/L",
10891 .bustype = BUS_PARALLEL,
10892 .manufacture_id = MACRONIX_ID,
10893 .model_id = MACRONIX_MX29GL320EHL,
10894 .total_size = 4096,
10895 .page_size = 128 * 1024, /* actual page size is 16 */
10896 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10897 .tested = TEST_UNTESTED,
10898 .probe = probe_jedec_29gl,
10899 .probe_timing = TIMING_ZERO,
10900 .block_erasers =
10901 {
10902 {
10903 .eraseblocks = { {64 * 1024, 64} },
10904 .block_erase = erase_sector_jedec,
10905 }, {
10906 .eraseblocks = { {4 * 1024 * 1024, 1} },
10907 .block_erase = erase_chip_block_jedec,
10908 },
10909 },
10910 .write = write_jedec_1,
10911 .read = read_memmapped,
10912 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010913 .prepare_access = prepare_memory_access,
10914 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010915 },
10916
10917 {
10918 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010919 .name = "MX29GL320ET",
10920 .bustype = BUS_PARALLEL,
10921 .manufacture_id = MACRONIX_ID,
10922 .model_id = MACRONIX_MX29GL320ET,
10923 .total_size = 4096,
10924 .page_size = 128 * 1024, /* actual page size is 16 */
10925 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10926 .tested = TEST_UNTESTED,
10927 .probe = probe_jedec_29gl,
10928 .probe_timing = TIMING_ZERO,
10929 .block_erasers =
10930 {
10931 {
10932 .eraseblocks = {
10933 {64 * 1024, 63},
10934 {8 * 1024, 8},
10935 },
10936 .block_erase = erase_sector_jedec,
10937 }, {
10938 .eraseblocks = { {4 * 1024 * 1024, 1} },
10939 .block_erase = erase_chip_block_jedec,
10940 },
10941 },
10942 .write = write_jedec_1,
10943 .read = read_memmapped,
10944 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010945 .prepare_access = prepare_memory_access,
10946 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010947 },
10948
10949 {
10950 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010951 .name = "MX29GL640EB",
10952 .bustype = BUS_PARALLEL,
10953 .manufacture_id = MACRONIX_ID,
10954 .model_id = MACRONIX_MX29GL640EB,
10955 .total_size = 8192,
10956 .page_size = 128 * 1024, /* actual page size is 16 */
10957 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10958 .tested = TEST_UNTESTED,
10959 .probe = probe_jedec_29gl,
10960 .probe_timing = TIMING_ZERO,
10961 .block_erasers =
10962 {
10963 {
10964 .eraseblocks = {
10965 {8 * 1024, 8},
10966 {64 * 1024, 127},
10967 },
10968 .block_erase = erase_sector_jedec,
10969 }, {
10970 .eraseblocks = { {8 * 1024 * 1024, 1} },
10971 .block_erase = erase_chip_block_jedec,
10972 },
10973 },
10974 .write = write_jedec_1,
10975 .read = read_memmapped,
10976 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010977 .prepare_access = prepare_memory_access,
10978 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010979 },
10980
10981 {
10982 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010983 .name = "MX29GL640EH/L",
10984 .bustype = BUS_PARALLEL,
10985 .manufacture_id = MACRONIX_ID,
10986 .model_id = MACRONIX_MX29GL640EHL,
10987 .total_size = 8192,
10988 .page_size = 128 * 1024, /* actual page size is 16 */
10989 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10990 .tested = TEST_UNTESTED,
10991 .probe = probe_jedec_29gl,
10992 .probe_timing = TIMING_ZERO,
10993 .block_erasers =
10994 {
10995 {
10996 .eraseblocks = { {64 * 1024, 128} },
10997 .block_erase = erase_sector_jedec,
10998 }, {
10999 .eraseblocks = { {8 * 1024 * 1024, 1} },
11000 .block_erase = erase_chip_block_jedec,
11001 },
11002 },
11003 .write = write_jedec_1,
11004 .read = read_memmapped,
11005 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010011006 .prepare_access = prepare_memory_access,
11007 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011008 },
11009
11010 {
11011 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000011012 .name = "MX29GL640ET",
11013 .bustype = BUS_PARALLEL,
11014 .manufacture_id = MACRONIX_ID,
11015 .model_id = MACRONIX_MX29GL640ET,
11016 .total_size = 8192,
11017 .page_size = 128 * 1024, /* actual page size is 16 */
11018 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
11019 .tested = TEST_UNTESTED,
11020 .probe = probe_jedec_29gl,
11021 .probe_timing = TIMING_ZERO,
11022 .block_erasers =
11023 {
11024 {
11025 .eraseblocks = {
11026 {64 * 1024, 127},
11027 {8 * 1024, 8},
11028 },
11029 .block_erase = erase_sector_jedec,
11030 }, {
11031 .eraseblocks = { {8 * 1024 * 1024, 1} },
11032 .block_erase = erase_chip_block_jedec,
11033 },
11034 },
11035 .write = write_jedec_1,
11036 .read = read_memmapped,
11037 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010011038 .prepare_access = prepare_memory_access,
11039 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000011040 },
11041
11042 {
11043 .vendor = "Macronix",
Carl-Daniel Hailfinger350a0c32009-07-24 13:59:27 +000011044 .name = "MX29LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011045 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011046 .manufacture_id = MACRONIX_ID,
11047 .model_id = MACRONIX_MX29LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011048 .total_size = 512,
11049 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000011050 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
11051 .tested = TEST_UNTESTED,
11052 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000011053 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000011054 .block_erasers =
11055 {
11056 {
Stefan Tauner6697f712014-08-06 15:09:15 +000011057 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000011058 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000011059 }, {
11060 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000011061 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000011062 },
11063 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000011064 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000011065 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011066 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010011067 .prepare_access = prepare_memory_access,
11068 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger7de86392008-12-10 10:32:05 +000011069 },
11070
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011071 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011072 .vendor = "Macronix",
Hemanth Guruva Reddya136d422019-07-11 11:08:27 +020011073 .name = "MX66L51235F/MX25L51245G",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011074 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011075 .manufacture_id = MACRONIX_ID,
11076 .model_id = MACRONIX_MX66L51235F,
11077 .total_size = 65536,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011078 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011079 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
11080 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011081 .tested = TEST_OK_PREW,
11082 .probe = probe_spi_rdid,
11083 .probe_timing = TIMING_ZERO,
11084 .block_erasers =
11085 {
11086 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011087 .eraseblocks = { {4 * 1024, 16384} },
11088 .block_erase = spi_block_erase_21,
11089 }, {
11090 .eraseblocks = { {4 * 1024, 16384} },
11091 .block_erase = spi_block_erase_20,
11092 }, {
11093 .eraseblocks = { {32 * 1024, 2048} },
11094 .block_erase = spi_block_erase_5c,
11095 }, {
11096 .eraseblocks = { {32 * 1024, 2048} },
11097 .block_erase = spi_block_erase_52,
11098 }, {
11099 .eraseblocks = { {64 * 1024, 1024} },
11100 .block_erase = spi_block_erase_dc,
11101 }, {
11102 .eraseblocks = { {64 * 1024, 1024} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011103 .block_erase = spi_block_erase_d8,
11104 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011105 .eraseblocks = { {64 * 1024 * 1024, 1} },
11106 .block_erase = spi_block_erase_60,
11107 }, {
11108 .eraseblocks = { {64 * 1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011109 .block_erase = spi_block_erase_c7,
11110 }
11111 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100011112 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
11113 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011114 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011115 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011116 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011117 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011118 .prepare_access = spi_prepare_io,
11119 .finish_access = spi_finish_io,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011120 },
11121
Patrick Rudolph3ba83152021-06-08 10:52:19 +020011122 {
11123 .vendor = "Macronix",
11124 .name = "MX66L1G45G",
11125 .bustype = BUS_SPI,
11126 .manufacture_id = MACRONIX_ID,
11127 .model_id = MACRONIX_MX66L1G45G,
11128 .total_size = 131072,
11129 .page_size = 256,
11130 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
11131 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
11132 .tested = TEST_OK_PREW,
11133 .probe = probe_spi_rdid,
11134 .probe_timing = TIMING_ZERO,
11135 .block_erasers =
11136 {
11137 {
11138 .eraseblocks = { {4 * 1024, 32768} },
11139 .block_erase = spi_block_erase_21,
11140 }, {
11141 .eraseblocks = { {4 * 1024, 32768} },
11142 .block_erase = spi_block_erase_20,
11143 }, {
11144 .eraseblocks = { {32 * 1024, 4096} },
11145 .block_erase = spi_block_erase_5c,
11146 }, {
11147 .eraseblocks = { {32 * 1024, 4096} },
11148 .block_erase = spi_block_erase_52,
11149 }, {
11150 .eraseblocks = { {64 * 1024, 2048} },
11151 .block_erase = spi_block_erase_dc,
11152 }, {
11153 .eraseblocks = { {64 * 1024, 2048} },
11154 .block_erase = spi_block_erase_d8,
11155 }, {
11156 .eraseblocks = { {128 * 1024 * 1024, 1} },
11157 .block_erase = spi_block_erase_60,
11158 }, {
11159 .eraseblocks = { {128 * 1024 * 1024, 1} },
11160 .block_erase = spi_block_erase_c7,
11161 }
11162 },
11163 /* TODO: security register and SBLK/SBULK, configuration register */
11164 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
11165 .unlock = spi_disable_blockprotect_bp3_srwd,
11166 .write = spi_chip_write_256,
11167 .read = spi_chip_read, /* Fast read (0x0B) supported */
11168 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011169 .prepare_access = spi_prepare_io,
11170 .finish_access = spi_finish_io,
Patrick Rudolph3ba83152021-06-08 10:52:19 +020011171 },
11172
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011173 /* The ST M25P05 is a bit of a problem. It has the same ID as the
11174 * ST M25P05-A in RES mode, but supports only 128 byte writes instead
11175 * of 256 byte writes. We rely heavily on the fact that probe_spi_res1
11176 * only is successful if RDID does not work.
11177 */
11178 {
11179 .vendor = "Micron/Numonyx/ST",
11180 .name = "M25P05",
11181 .bustype = BUS_SPI,
11182 .manufacture_id = 0, /* Not used. */
11183 .model_id = ST_M25P05_RES,
11184 .total_size = 64,
11185 .page_size = 256,
11186 .feature_bits = FEATURE_WRSR_WREN,
11187 .tested = TEST_UNTESTED,
11188 .probe = probe_spi_res1,
11189 .probe_timing = TIMING_ZERO,
11190 .block_erasers =
11191 {
11192 {
11193 .eraseblocks = { {32 * 1024, 2} },
11194 .block_erase = spi_block_erase_d8,
11195 }, {
11196 .eraseblocks = { {64 * 1024, 1} },
11197 .block_erase = spi_block_erase_c7,
11198 }
11199 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011200 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011201 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011202 .write = spi_chip_write_1, /* 128 */
11203 .read = spi_chip_read,
11204 .voltage = {2700, 3600},
11205 },
11206
11207 {
11208 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011209 .name = "M25P05-A",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011210 .bustype = BUS_SPI,
11211 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011212 .model_id = ST_M25P05A,
11213 .total_size = 64,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011214 .page_size = 256,
11215 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011216 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011217 .probe = probe_spi_rdid,
11218 .probe_timing = TIMING_ZERO,
11219 .block_erasers =
11220 {
11221 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011222 .eraseblocks = { {32 * 1024, 2} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011223 .block_erase = spi_block_erase_d8,
11224 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011225 .eraseblocks = { {64 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011226 .block_erase = spi_block_erase_c7,
11227 }
11228 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011229 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011230 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011231 .write = spi_chip_write_256,
11232 .read = spi_chip_read,
11233 .voltage = {2700, 3600},
11234 },
11235
11236 /* The ST M25P10 has the same problem as the M25P05. */
11237 {
11238 .vendor = "Micron/Numonyx/ST",
11239 .name = "M25P10",
11240 .bustype = BUS_SPI,
11241 .manufacture_id = 0, /* Not used. */
11242 .model_id = ST_M25P10_RES,
11243 .total_size = 128,
11244 .page_size = 256,
11245 .feature_bits = FEATURE_WRSR_WREN,
11246 .tested = TEST_UNTESTED,
11247 .probe = probe_spi_res1,
11248 .probe_timing = TIMING_ZERO,
11249 .block_erasers =
11250 {
11251 {
11252 .eraseblocks = { {32 * 1024, 4} },
11253 .block_erase = spi_block_erase_d8,
11254 }, {
11255 .eraseblocks = { {128 * 1024, 1} },
11256 .block_erase = spi_block_erase_c7,
11257 }
11258 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011259 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011260 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011261 .write = spi_chip_write_1, /* 128 */
11262 .read = spi_chip_read,
11263 .voltage = {2700, 3600},
11264 },
11265
11266 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011267 .vendor = "Micron/Numonyx/ST",
11268 .name = "M25P10-A",
11269 .bustype = BUS_SPI,
11270 .manufacture_id = ST_ID,
11271 .model_id = ST_M25P10A,
11272 .total_size = 128,
11273 .page_size = 256,
11274 .feature_bits = FEATURE_WRSR_WREN,
11275 .tested = TEST_OK_PREW,
11276 .probe = probe_spi_rdid,
11277 .probe_timing = TIMING_ZERO,
11278 .block_erasers =
11279 {
11280 {
11281 .eraseblocks = { {32 * 1024, 4} },
11282 .block_erase = spi_block_erase_d8,
11283 }, {
11284 .eraseblocks = { {128 * 1024, 1} },
11285 .block_erase = spi_block_erase_c7,
11286 }
11287 },
11288 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11289 .unlock = spi_disable_blockprotect_bp3_srwd,
11290 .write = spi_chip_write_256,
11291 .read = spi_chip_read,
11292 .voltage = {2700, 3600},
11293 },
11294
11295 {
11296 .vendor = "Micron/Numonyx/ST",
11297 .name = "M25P128",
11298 .bustype = BUS_SPI,
11299 .manufacture_id = ST_ID,
11300 .model_id = ST_M25P128,
11301 .total_size = 16384,
11302 .page_size = 256,
11303 .feature_bits = FEATURE_WRSR_WREN,
11304 .tested = TEST_OK_PREW,
11305 .probe = probe_spi_rdid,
11306 .probe_timing = TIMING_ZERO,
11307 .block_erasers =
11308 {
11309 {
11310 .eraseblocks = { {256 * 1024, 64} },
11311 .block_erase = spi_block_erase_d8,
11312 }, {
11313 .eraseblocks = { {16 * 1024 * 1024, 1} },
11314 .block_erase = spi_block_erase_c7,
11315 }
11316 },
11317 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11318 .unlock = spi_disable_blockprotect_bp3_srwd,
11319 .write = spi_chip_write_256,
11320 .read = spi_chip_read,
11321 .voltage = {2700, 3600},
11322 },
11323
11324 {
11325 .vendor = "Micron/Numonyx/ST",
11326 .name = "M25P16",
11327 .bustype = BUS_SPI,
11328 .manufacture_id = ST_ID,
11329 .model_id = ST_M25P16,
11330 .total_size = 2048,
11331 .page_size = 256,
11332 .feature_bits = FEATURE_WRSR_WREN,
11333 .tested = TEST_OK_PREW,
11334 .probe = probe_spi_rdid,
11335 .probe_timing = TIMING_ZERO,
11336 .block_erasers =
11337 {
11338 {
11339 .eraseblocks = { {64 * 1024, 32} },
11340 .block_erase = spi_block_erase_d8,
11341 }, {
11342 .eraseblocks = { {2 * 1024 * 1024, 1} },
11343 .block_erase = spi_block_erase_c7,
11344 }
11345 },
11346 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11347 .unlock = spi_disable_blockprotect_bp3_srwd,
11348 .write = spi_chip_write_256,
11349 .read = spi_chip_read,
11350 .voltage = {2700, 3600},
11351 },
11352
11353 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011354 .vendor = "Micron/Numonyx/ST", /* Numonyx */
11355 .name = "M25P20",
11356 .bustype = BUS_SPI,
11357 .manufacture_id = ST_ID,
11358 .model_id = ST_M25P20,
11359 .total_size = 256,
11360 .page_size = 256,
11361 .feature_bits = FEATURE_WRSR_WREN,
11362 .tested = TEST_UNTESTED,
11363 .probe = probe_spi_rdid,
11364 .probe_timing = TIMING_ZERO,
11365 .block_erasers =
11366 {
11367 {
11368 .eraseblocks = { {64 * 1024, 4} },
11369 .block_erase = spi_block_erase_d8,
11370 }, {
11371 .eraseblocks = { {256 * 1024, 1} },
11372 .block_erase = spi_block_erase_c7,
11373 }
11374 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011375 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011376 .unlock = spi_disable_blockprotect,
11377 .write = spi_chip_write_256,
11378 .read = spi_chip_read, /* Fast read (0x0B) supported */
11379 .voltage = {2700, 3600},
11380 },
11381
11382 {
11383 .vendor = "Micron/Numonyx/ST",
11384 .name = "M25P20-old",
11385 .bustype = BUS_SPI,
11386 .manufacture_id = 0, /* Not used. */
11387 .model_id = ST_M25P20_RES,
11388 .total_size = 256,
11389 .page_size = 256,
11390 .feature_bits = FEATURE_WRSR_WREN,
11391 .tested = TEST_OK_PREW,
11392 .probe = probe_spi_res1,
11393 .probe_timing = TIMING_ZERO,
11394 .block_erasers =
11395 {
11396 {
11397 .eraseblocks = { {64 * 1024, 4} },
11398 .block_erase = spi_block_erase_d8,
11399 }, {
11400 .eraseblocks = { {256 * 1024, 1} },
11401 .block_erase = spi_block_erase_c7,
11402 }
11403 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011404 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011405 .unlock = spi_disable_blockprotect,
11406 .write = spi_chip_write_256,
11407 .read = spi_chip_read, /* Fast read (0x0B) supported */
11408 .voltage = {2700, 3600},
11409 },
11410
11411 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011412 .vendor = "Micron/Numonyx/ST",
11413 .name = "M25P32",
11414 .bustype = BUS_SPI,
11415 .manufacture_id = ST_ID,
11416 .model_id = ST_M25P32,
11417 .total_size = 4096,
11418 .page_size = 256,
11419 .feature_bits = FEATURE_WRSR_WREN,
11420 .tested = TEST_OK_PREW,
11421 .probe = probe_spi_rdid,
11422 .probe_timing = TIMING_ZERO,
11423 .block_erasers =
11424 {
11425 {
11426 .eraseblocks = { {64 * 1024, 64} },
11427 .block_erase = spi_block_erase_d8,
11428 }, {
11429 .eraseblocks = { {4 * 1024 * 1024, 1} },
11430 .block_erase = spi_block_erase_c7,
11431 }
11432 },
11433 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
11434 .unlock = spi_disable_blockprotect_bp3_srwd,
11435 .write = spi_chip_write_256,
11436 .read = spi_chip_read,
11437 .voltage = {2700, 3600},
11438 },
11439
11440 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011441 .vendor = "Micron/Numonyx/ST", /* Numonyx */
11442 .name = "M25P40",
11443 .bustype = BUS_SPI,
11444 .manufacture_id = ST_ID,
11445 .model_id = ST_M25P40,
11446 .total_size = 512,
11447 .page_size = 256,
11448 .feature_bits = FEATURE_WRSR_WREN,
11449 .tested = TEST_OK_PREW,
11450 .probe = probe_spi_rdid,
11451 .probe_timing = TIMING_ZERO,
11452 .block_erasers =
11453 {
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 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011462 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011463 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011464 .write = spi_chip_write_256,
11465 .read = spi_chip_read,
11466 .voltage = {2700, 3600},
11467 },
11468
11469 {
11470 .vendor = "Micron/Numonyx/ST",
11471 .name = "M25P40-old",
11472 .bustype = BUS_SPI,
11473 .manufacture_id = 0, /* Not used. */
11474 .model_id = ST_M25P40_RES,
11475 .total_size = 512,
11476 .page_size = 256,
11477 .feature_bits = FEATURE_WRSR_WREN,
11478 .tested = TEST_UNTESTED,
11479 .probe = probe_spi_res1,
11480 .probe_timing = TIMING_ZERO,
11481 .block_erasers =
11482 {
11483 {
11484 .eraseblocks = { {64 * 1024, 8} },
11485 .block_erase = spi_block_erase_d8,
11486 }, {
11487 .eraseblocks = { {512 * 1024, 1} },
11488 .block_erase = spi_block_erase_c7,
11489 }
11490 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011491 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011492 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011493 .write = spi_chip_write_256,
11494 .read = spi_chip_read,
11495 },
11496
11497 {
11498 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011499 .name = "M25P64",
11500 .bustype = BUS_SPI,
11501 .manufacture_id = ST_ID,
11502 .model_id = ST_M25P64,
11503 .total_size = 8192,
11504 .page_size = 256,
11505 .feature_bits = FEATURE_WRSR_WREN,
11506 .tested = TEST_OK_PREW,
11507 .probe = probe_spi_rdid,
11508 .probe_timing = TIMING_ZERO,
11509 .block_erasers =
11510 {
11511 {
11512 .eraseblocks = { {64 * 1024, 128} },
11513 .block_erase = spi_block_erase_d8,
11514 }, {
11515 .eraseblocks = { {8 * 1024 * 1024, 1} },
11516 .block_erase = spi_block_erase_c7,
11517 }
11518 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011519 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011520 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011521 .write = spi_chip_write_256,
11522 .read = spi_chip_read,
11523 .voltage = {2700, 3600},
11524 },
11525
11526 {
11527 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011528 .name = "M25P80",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011529 .bustype = BUS_SPI,
11530 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011531 .model_id = ST_M25P80,
11532 .total_size = 1024,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011533 .page_size = 256,
11534 .feature_bits = FEATURE_WRSR_WREN,
11535 .tested = TEST_OK_PREW,
11536 .probe = probe_spi_rdid,
11537 .probe_timing = TIMING_ZERO,
11538 .block_erasers =
11539 {
11540 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011541 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011542 .block_erase = spi_block_erase_d8,
11543 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011544 .eraseblocks = { {1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011545 .block_erase = spi_block_erase_c7,
11546 }
11547 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011548 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011549 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011550 .write = spi_chip_write_256,
11551 .read = spi_chip_read,
11552 .voltage = {2700, 3600},
11553 },
11554
11555 {
11556 .vendor = "Micron/Numonyx/ST",
11557 .name = "M25PE10",
11558 .bustype = BUS_SPI,
11559 .manufacture_id = ST_ID,
11560 .model_id = ST_M25PE10,
11561 .total_size = 128,
11562 .page_size = 256,
11563 .feature_bits = FEATURE_WRSR_WREN,
11564 .tested = TEST_UNTESTED,
11565 .probe = probe_spi_rdid,
11566 .probe_timing = TIMING_ZERO,
11567 .block_erasers =
11568 {
11569 {
11570 .eraseblocks = { {4 * 1024, 32} },
11571 .block_erase = spi_block_erase_20,
11572 }, {
11573 .eraseblocks = { {64 * 1024, 2} },
11574 .block_erase = spi_block_erase_d8,
11575 }, {
11576 .eraseblocks = { {128 * 1024, 1} },
11577 .block_erase = spi_block_erase_c7,
11578 }
11579 },
11580 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11581 .unlock = spi_disable_blockprotect,
11582 .write = spi_chip_write_256,
11583 .read = spi_chip_read,
11584 .voltage = {2700, 3600},
11585 },
11586
11587 {
11588 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011589 .name = "M25PE16",
11590 .bustype = BUS_SPI,
11591 .manufacture_id = ST_ID,
11592 .model_id = ST_M25PE16,
11593 .total_size = 2048,
11594 .page_size = 256,
11595 .feature_bits = FEATURE_WRSR_WREN,
11596 .tested = TEST_UNTESTED,
11597 .probe = probe_spi_rdid,
11598 .probe_timing = TIMING_ZERO,
11599 .block_erasers =
11600 {
11601 {
11602 .eraseblocks = { {4 * 1024, 512} },
11603 .block_erase = spi_block_erase_20,
11604 }, {
11605 .eraseblocks = { {64 * 1024, 32} },
11606 .block_erase = spi_block_erase_d8,
11607 }, {
11608 .eraseblocks = { {2 * 1024 * 1024, 1} },
11609 .block_erase = spi_block_erase_c7,
11610 }
11611 },
11612 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11613 .unlock = spi_disable_blockprotect,
11614 .write = spi_chip_write_256,
11615 .read = spi_chip_read,
11616 .voltage = {2700, 3600},
11617 },
11618
11619 {
11620 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011621 .name = "M25PE20",
11622 .bustype = BUS_SPI,
11623 .manufacture_id = ST_ID,
11624 .model_id = ST_M25PE20,
11625 .total_size = 256,
11626 .page_size = 256,
11627 .feature_bits = FEATURE_WRSR_WREN,
11628 .tested = TEST_UNTESTED,
11629 .probe = probe_spi_rdid,
11630 .probe_timing = TIMING_ZERO,
11631 .block_erasers =
11632 {
11633 {
11634 .eraseblocks = { {4 * 1024, 64} },
11635 .block_erase = spi_block_erase_20,
11636 }, {
11637 .eraseblocks = { {64 * 1024, 4} },
11638 .block_erase = spi_block_erase_d8,
11639 }, {
11640 .eraseblocks = { {256 * 1024, 1} },
11641 .block_erase = spi_block_erase_c7,
11642 }
11643 },
11644 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11645 .unlock = spi_disable_blockprotect,
11646 .write = spi_chip_write_256,
11647 .read = spi_chip_read,
11648 .voltage = {2700, 3600},
11649 },
11650
11651 {
11652 .vendor = "Micron/Numonyx/ST",
11653 .name = "M25PE40",
11654 .bustype = BUS_SPI,
11655 .manufacture_id = ST_ID,
11656 .model_id = ST_M25PE40,
11657 .total_size = 512,
11658 .page_size = 256,
11659 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011660 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011661 .probe = probe_spi_rdid,
11662 .probe_timing = TIMING_ZERO,
11663 .block_erasers =
11664 {
11665 {
11666 .eraseblocks = { {4 * 1024, 128} },
11667 .block_erase = spi_block_erase_20,
11668 }, {
11669 .eraseblocks = { {64 * 1024, 8} },
11670 .block_erase = spi_block_erase_d8,
11671 }, {
11672 .eraseblocks = { {512 * 1024, 1} },
11673 .block_erase = spi_block_erase_c7,
11674 }
11675 },
11676 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11677 .unlock = spi_disable_blockprotect,
11678 .write = spi_chip_write_256,
11679 .read = spi_chip_read,
11680 .voltage = {2700, 3600},
11681 },
11682
11683 {
11684 .vendor = "Micron/Numonyx/ST",
11685 .name = "M25PE80",
11686 .bustype = BUS_SPI,
11687 .manufacture_id = ST_ID,
11688 .model_id = ST_M25PE80,
11689 .total_size = 1024,
11690 .page_size = 256,
11691 .feature_bits = FEATURE_WRSR_WREN,
11692 .tested = TEST_OK_PREW,
11693 .probe = probe_spi_rdid,
11694 .probe_timing = TIMING_ZERO,
11695 .block_erasers =
11696 {
11697 {
11698 .eraseblocks = { {4 * 1024, 256} },
11699 .block_erase = spi_block_erase_20,
11700 }, {
11701 .eraseblocks = { {64 * 1024, 16} },
11702 .block_erase = spi_block_erase_d8,
11703 }, {
11704 .eraseblocks = { {1024 * 1024, 1} },
11705 .block_erase = spi_block_erase_c7,
11706 }
11707 },
11708 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
11709 .unlock = spi_disable_blockprotect,
11710 .write = spi_chip_write_256,
11711 .read = spi_chip_read,
11712 .voltage = {2700, 3600},
11713 },
11714
11715 {
11716 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011717 .name = "M25PX16",
11718 .bustype = BUS_SPI,
11719 .manufacture_id = ST_ID,
11720 .model_id = ST_M25PX16,
11721 .total_size = 2048,
11722 .page_size = 256,
11723 /* OTP: 64B total; read 0x4B; write 0x42 */
11724 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11725 .tested = TEST_OK_PREW,
11726 .probe = probe_spi_rdid,
11727 .probe_timing = TIMING_ZERO,
11728 .block_erasers =
11729 {
11730 {
11731 .eraseblocks = { { 4 * 1024, 512 } },
11732 .block_erase = spi_block_erase_20,
11733 }, {
11734 .eraseblocks = { {64 * 1024, 32} },
11735 .block_erase = spi_block_erase_d8,
11736 }, {
11737 .eraseblocks = { {2 * 1024 * 1024, 1} },
11738 .block_erase = spi_block_erase_c7,
11739 }
11740 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011741 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011742 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11743 .write = spi_chip_write_256,
11744 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011745 .voltage = {2300, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011746 },
11747
11748 {
11749 .vendor = "Micron/Numonyx/ST",
11750 .name = "M25PX32",
11751 .bustype = BUS_SPI,
11752 .manufacture_id = ST_ID,
11753 .model_id = ST_M25PX32,
11754 .total_size = 4096,
11755 .page_size = 256,
11756 /* OTP: 64B total; read 0x4B; write 0x42 */
11757 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11758 .tested = TEST_OK_PRE,
11759 .probe = probe_spi_rdid,
11760 .probe_timing = TIMING_ZERO,
11761 .block_erasers =
11762 {
11763 {
11764 .eraseblocks = { { 4 * 1024, 1024 } },
11765 .block_erase = spi_block_erase_20,
11766 }, {
11767 .eraseblocks = { {64 * 1024, 64} },
11768 .block_erase = spi_block_erase_d8,
11769 }, {
11770 .eraseblocks = { {4 * 1024 * 1024, 1} },
11771 .block_erase = spi_block_erase_c7,
11772 }
11773 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011774 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011775 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11776 .write = spi_chip_write_256,
11777 .read = spi_chip_read,
11778 .voltage = {2700, 3600},
11779 },
11780
11781 {
11782 .vendor = "Micron/Numonyx/ST",
11783 .name = "M25PX64",
11784 .bustype = BUS_SPI,
11785 .manufacture_id = ST_ID,
11786 .model_id = ST_M25PX64,
11787 .total_size = 8192,
11788 .page_size = 256,
11789 /* OTP: 64B total; read 0x4B; write 0x42 */
11790 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011791 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011792 .probe = probe_spi_rdid,
11793 .probe_timing = TIMING_ZERO,
11794 .block_erasers =
11795 {
11796 {
11797 .eraseblocks = { { 4 * 1024, 2048 } },
11798 .block_erase = spi_block_erase_20,
11799 }, {
11800 .eraseblocks = { {64 * 1024, 128} },
11801 .block_erase = spi_block_erase_d8,
11802 }, {
11803 .eraseblocks = { {8 * 1024 * 1024, 1} },
11804 .block_erase = spi_block_erase_c7,
11805 }
11806 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011807 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011808 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11809 .write = spi_chip_write_256,
11810 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011811 .voltage = {2700, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011812 },
11813
11814 {
11815 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011816 .name = "M25PX80",
11817 .bustype = BUS_SPI,
11818 .manufacture_id = ST_ID,
11819 .model_id = ST_M25PX80,
11820 .total_size = 1024,
11821 .page_size = 256,
11822 /* OTP: 64B total; read 0x4B, write 0x42 */
11823 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
11824 .tested = TEST_OK_PREW,
11825 .probe = probe_spi_rdid,
11826 .probe_timing = TIMING_ZERO,
11827 .block_erasers =
11828 {
11829 {
11830 .eraseblocks = { { 4 * 1024, 256 } },
11831 .block_erase = spi_block_erase_20,
11832 }, {
11833 .eraseblocks = { {64 * 1024, 16} },
11834 .block_erase = spi_block_erase_d8,
11835 }, {
11836 .eraseblocks = { {1024 * 1024, 1} },
11837 .block_erase = spi_block_erase_c7,
11838 }
11839 },
11840 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
11841 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
11842 .write = spi_chip_write_256,
11843 .read = spi_chip_read,
11844 .voltage = {2700, 3600},
11845 },
11846
11847 {
11848 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011849 .name = "M45PE10",
11850 .bustype = BUS_SPI,
11851 .manufacture_id = ST_ID,
11852 .model_id = ST_M45PE10,
11853 .total_size = 128,
11854 .page_size = 256,
11855 .tested = TEST_UNTESTED,
11856 .probe = probe_spi_rdid,
11857 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011858 .block_erasers =
11859 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011860 {
11861 .eraseblocks = { {256, 512} },
11862 .block_erase = spi_block_erase_db,
11863 }, {
11864 .eraseblocks = { {64 * 1024, 2} },
11865 .block_erase = spi_block_erase_d8,
11866 }
11867 },
11868 .printlock = spi_prettyprint_status_register_default_welwip,
11869 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11870 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11871 .read = spi_chip_read, /* Fast read (0x0B) supported */
11872 .voltage = {2700, 3600},
11873 },
11874
11875 {
11876 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011877 .name = "M45PE16",
11878 .bustype = BUS_SPI,
11879 .manufacture_id = ST_ID,
11880 .model_id = ST_M45PE16,
11881 .total_size = 2048,
11882 .page_size = 256,
11883 .tested = TEST_UNTESTED,
11884 .probe = probe_spi_rdid,
11885 .probe_timing = TIMING_ZERO,
11886 .block_erasers =
11887 {
11888 {
11889 .eraseblocks = { {256, 8192} },
11890 .block_erase = spi_block_erase_db,
11891 }, {
11892 .eraseblocks = { {64 * 1024, 32} },
11893 .block_erase = spi_block_erase_d8,
11894 }
11895 },
11896 .printlock = spi_prettyprint_status_register_default_welwip,
11897 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11898 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11899 .read = spi_chip_read, /* Fast read (0x0B) supported */
11900 .voltage = {2700, 3600},
11901 },
11902
11903 {
11904 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011905 .name = "M45PE20",
11906 .bustype = BUS_SPI,
11907 .manufacture_id = ST_ID,
11908 .model_id = ST_M45PE20,
11909 .total_size = 256,
11910 .page_size = 256,
11911 .tested = TEST_UNTESTED,
11912 .probe = probe_spi_rdid,
11913 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011914 .block_erasers =
11915 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011916 {
11917 .eraseblocks = { {256, 1024} },
11918 .block_erase = spi_block_erase_db,
11919 }, {
11920 .eraseblocks = { {64 * 1024, 4} },
11921 .block_erase = spi_block_erase_d8,
11922 }
11923 },
11924 .printlock = spi_prettyprint_status_register_default_welwip,
11925 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11926 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11927 .read = spi_chip_read, /* Fast read (0x0B) supported */
11928 .voltage = {2700, 3600},
11929 },
11930
11931 {
11932 .vendor = "Micron/Numonyx/ST",
11933 .name = "M45PE40",
11934 .bustype = BUS_SPI,
11935 .manufacture_id = ST_ID,
11936 .model_id = ST_M45PE40,
11937 .total_size = 512,
11938 .page_size = 256,
11939 .tested = TEST_UNTESTED,
11940 .probe = probe_spi_rdid,
11941 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011942 .block_erasers =
11943 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011944 {
11945 .eraseblocks = { {256, 2048} },
11946 .block_erase = spi_block_erase_db,
11947 }, {
11948 .eraseblocks = { {64 * 1024, 8} },
11949 .block_erase = spi_block_erase_d8,
11950 }
11951 },
11952 .printlock = spi_prettyprint_status_register_default_welwip,
11953 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
Stefan Tauner23e10b82016-01-23 16:16:49 +000011954 .write = spi_chip_write_256, /* Page write supported (similar to PP but allows 0->1 changes) */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011955 .read = spi_chip_read, /* Fast read (0x0B) supported */
11956 .voltage = {2700, 3600},
11957 },
11958
11959 {
11960 .vendor = "Micron/Numonyx/ST",
11961 .name = "M45PE80",
11962 .bustype = BUS_SPI,
11963 .manufacture_id = ST_ID,
11964 .model_id = ST_M45PE80,
11965 .total_size = 1024,
11966 .page_size = 256,
11967 .tested = TEST_UNTESTED,
11968 .probe = probe_spi_rdid,
11969 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100011970 .block_erasers =
11971 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000011972 {
11973 .eraseblocks = { {256, 4096} },
11974 .block_erase = spi_block_erase_db,
11975 }, {
11976 .eraseblocks = { {64 * 1024, 16} },
11977 .block_erase = spi_block_erase_d8,
11978 }
11979 },
11980 .printlock = spi_prettyprint_status_register_default_welwip,
11981 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
11982 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
11983 .read = spi_chip_read, /* Fast read (0x0B) supported */
11984 .voltage = {2700, 3600},
11985 },
11986
11987 {
11988 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070011989 .name = "N25Q00A..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
11990 .bustype = BUS_SPI,
11991 .manufacture_id = ST_ID,
11992 .model_id = ST_N25Q00A__1G,
11993 .total_size = 131072,
11994 .page_size = 256,
11995 /* supports SFDP */
11996 /* OTP: 64B total; read 0x4B, write 0x42 */
11997 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
11998 .tested = TEST_UNTESTED,
11999 .probe = probe_spi_rdid,
12000 .probe_timing = TIMING_ZERO,
12001 .block_erasers =
12002 {
12003 {
12004 .eraseblocks = { {4 * 1024, 32768} },
12005 .block_erase = spi_block_erase_21,
12006 }, {
12007 .eraseblocks = { {4 * 1024, 32768} },
12008 .block_erase = spi_block_erase_20,
12009 }, {
12010 .eraseblocks = { {64 * 1024, 2048} },
12011 .block_erase = spi_block_erase_dc,
12012 }, {
12013 .eraseblocks = { {64 * 1024, 2048} },
12014 .block_erase = spi_block_erase_d8,
12015 }, {
12016 .eraseblocks = { {32768 * 1024, 4} },
12017 .block_erase = spi_block_erase_c4,
12018 }
12019 },
12020 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12021 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12022 .write = spi_chip_write_256, /* Multi I/O supported */
12023 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12024 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012025 .prepare_access = spi_prepare_io,
12026 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012027 },
12028
12029 {
12030 .vendor = "Micron/Numonyx/ST",
12031 .name = "N25Q00A..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
12032 .bustype = BUS_SPI,
12033 .manufacture_id = ST_ID,
12034 .model_id = ST_N25Q00A__3G,
12035 .total_size = 131072,
12036 .page_size = 256,
12037 /* supports SFDP */
12038 /* OTP: 64B total; read 0x4B, write 0x42 */
12039 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12040 .tested = TEST_UNTESTED,
12041 .probe = probe_spi_rdid,
12042 .probe_timing = TIMING_ZERO,
12043 .block_erasers =
12044 {
12045 {
12046 .eraseblocks = { {4 * 1024, 32768} },
12047 .block_erase = spi_block_erase_21,
12048 }, {
12049 .eraseblocks = { {4 * 1024, 32768} },
12050 .block_erase = spi_block_erase_20,
12051 }, {
12052 .eraseblocks = { {64 * 1024, 2048} },
12053 .block_erase = spi_block_erase_dc,
12054 }, {
12055 .eraseblocks = { {64 * 1024, 2048} },
12056 .block_erase = spi_block_erase_d8,
12057 }, {
12058 .eraseblocks = { {32768 * 1024, 4} },
12059 .block_erase = spi_block_erase_c4,
12060 }
12061 },
12062 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12063 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12064 .write = spi_chip_write_256, /* Multi I/O supported */
12065 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12066 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012067 .prepare_access = spi_prepare_io,
12068 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012069 },
12070
12071 {
12072 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012073 .name = "N25Q016",
12074 .bustype = BUS_SPI,
12075 .manufacture_id = ST_ID,
12076 .model_id = ST_N25Q016__1E,
12077 .total_size = 2048,
12078 .page_size = 256,
12079 /* supports SFDP */
12080 /* OTP: 64B total; read 0x4B, write 0x42 */
12081 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12082 .tested = TEST_UNTESTED,
12083 .probe = probe_spi_rdid,
12084 .probe_timing = TIMING_ZERO,
12085 .block_erasers =
12086 {
12087 {
12088 .eraseblocks = { {4 * 1024, 512} },
12089 .block_erase = spi_block_erase_20,
12090 }, {
12091 .eraseblocks = { {32 * 1024, 64} },
12092 .block_erase = spi_block_erase_52,
12093 }, {
12094 .eraseblocks = { {64 * 1024, 32} },
12095 .block_erase = spi_block_erase_d8,
12096 }, {
12097 .eraseblocks = { {2 * 1024 * 1024, 1} },
12098 .block_erase = spi_block_erase_c7,
12099 }
12100 },
12101 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12102 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12103 .write = spi_chip_write_256, /* Multi I/O supported */
12104 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12105 .voltage = {1700, 2000},
12106 },
12107
12108 {
12109 .vendor = "Micron/Numonyx/ST",
12110 .name = "N25Q032..1E",
12111 .bustype = BUS_SPI,
12112 .manufacture_id = ST_ID,
12113 .model_id = ST_N25Q032__1E,
12114 .total_size = 4096,
12115 .page_size = 256,
12116 /* supports SFDP */
12117 /* OTP: 64B total; read 0x4B, write 0x42 */
12118 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12119 .tested = TEST_UNTESTED,
12120 .probe = probe_spi_rdid,
12121 .probe_timing = TIMING_ZERO,
12122 .block_erasers =
12123 {
12124 {
12125 .eraseblocks = { {4 * 1024, 1024} },
12126 .block_erase = spi_block_erase_20,
12127 }, {
12128 .eraseblocks = { {64 * 1024, 64} },
12129 .block_erase = spi_block_erase_d8,
12130 }, {
12131 .eraseblocks = { {4 * 1024 * 1024, 1} },
12132 .block_erase = spi_block_erase_c7,
12133 }
12134 },
12135 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12136 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12137 .write = spi_chip_write_256, /* Multi I/O supported */
12138 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12139 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012140 .reg_bits =
12141 {
12142 /*
12143 * There is also a volatile lock register per 64KiB sector, which is not
12144 * mutually exclusive with BP-based protection.
12145 */
12146 .srp = {STATUS1, 7, RW},
12147 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
12148 .tb = {STATUS1, 5, RW},
12149 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012150 .wp_write_cfg = spi_wp_write_cfg,
12151 .wp_read_cfg = spi_wp_read_cfg,
12152 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012153 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012154 },
12155
12156 {
12157 .vendor = "Micron/Numonyx/ST",
12158 .name = "N25Q032..3E",
12159 .bustype = BUS_SPI,
12160 .manufacture_id = ST_ID,
12161 .model_id = ST_N25Q032__3E,
12162 .total_size = 4096,
12163 .page_size = 256,
12164 /* supports SFDP */
12165 /* OTP: 64B total; read 0x4B, write 0x42 */
12166 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12167 .tested = TEST_OK_PREW,
12168 .probe = probe_spi_rdid,
12169 .probe_timing = TIMING_ZERO,
12170 .block_erasers =
12171 {
12172 {
12173 .eraseblocks = { {4 * 1024, 1024} },
12174 .block_erase = spi_block_erase_20,
12175 }, {
12176 .eraseblocks = { {64 * 1024, 64} },
12177 .block_erase = spi_block_erase_d8,
12178 }, {
12179 .eraseblocks = { {4 * 1024 * 1024, 1} },
12180 .block_erase = spi_block_erase_c7,
12181 }
12182 },
12183 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12184 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12185 .write = spi_chip_write_256, /* Multi I/O supported */
12186 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12187 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012188 .reg_bits =
12189 {
12190 /*
12191 * There is also a volatile lock register per 64KiB sector, which is not
12192 * mutually exclusive with BP-based protection.
12193 */
12194 .srp = {STATUS1, 7, RW},
12195 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
12196 .tb = {STATUS1, 5, RW},
12197 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012198 .wp_write_cfg = spi_wp_write_cfg,
12199 .wp_read_cfg = spi_wp_read_cfg,
12200 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012201 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012202 },
12203
12204 {
12205 .vendor = "Micron/Numonyx/ST",
12206 .name = "N25Q064..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
12207 .bustype = BUS_SPI,
12208 .manufacture_id = ST_ID,
12209 .model_id = ST_N25Q064__1E,
12210 .total_size = 8192,
12211 .page_size = 256,
12212 /* supports SFDP */
12213 /* OTP: 64B total; read 0x4B, write 0x42 */
12214 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000012215 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012216 .probe = probe_spi_rdid,
12217 .probe_timing = TIMING_ZERO,
12218 .block_erasers =
12219 {
12220 {
12221 .eraseblocks = { {4 * 1024, 2048 } },
12222 .block_erase = spi_block_erase_20,
12223 }, {
12224 .eraseblocks = { {64 * 1024, 128} },
12225 .block_erase = spi_block_erase_d8,
12226 }, {
12227 .eraseblocks = { {8 * 1024 * 1024, 1} },
12228 .block_erase = spi_block_erase_c7,
12229 }
12230 },
12231 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12232 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12233 .write = spi_chip_write_256, /* Multi I/O supported */
12234 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12235 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012236 .reg_bits =
12237 {
12238 /*
12239 * There is also a volatile lock register per 64KiB sector, which is not
12240 * mutually exclusive with BP-based protection.
12241 */
12242 .srp = {STATUS1, 7, RW},
12243 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12244 .tb = {STATUS1, 5, RW},
12245 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012246 .wp_write_cfg = spi_wp_write_cfg,
12247 .wp_read_cfg = spi_wp_read_cfg,
12248 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012249 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012250 },
12251
12252 {
12253 .vendor = "Micron/Numonyx/ST",
12254 .name = "N25Q064..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12255 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012256 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012257 .model_id = ST_N25Q064__3E,
12258 .total_size = 8192,
12259 .page_size = 256,
12260 /* supports SFDP */
12261 /* OTP: 64B total; read 0x4B, write 0x42 */
12262 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12263 .tested = TEST_OK_PREW,
12264 .probe = probe_spi_rdid,
12265 .probe_timing = TIMING_ZERO,
12266 .block_erasers =
12267 {
12268 {
12269 .eraseblocks = { {4 * 1024, 2048 } },
12270 .block_erase = spi_block_erase_20,
12271 }, {
12272 .eraseblocks = { {64 * 1024, 128} },
12273 .block_erase = spi_block_erase_d8,
12274 }, {
12275 .eraseblocks = { {8 * 1024 * 1024, 1} },
12276 .block_erase = spi_block_erase_c7,
12277 }
12278 },
12279 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12280 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12281 .write = spi_chip_write_256, /* Multi I/O supported */
12282 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12283 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012284 .reg_bits =
12285 {
12286 /*
12287 * There is also a volatile lock register per 64KiB sector, which is not
12288 * mutually exclusive with BP-based protection.
12289 */
12290 .srp = {STATUS1, 7, RW},
12291 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12292 .tb = {STATUS1, 5, RW},
12293 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012294 .wp_write_cfg = spi_wp_write_cfg,
12295 .wp_read_cfg = spi_wp_read_cfg,
12296 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012297 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012298 },
12299
12300 {
12301 .vendor = "Micron/Numonyx/ST",
12302 .name = "N25Q128..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
12303 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012304 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012305 .model_id = ST_N25Q128__1E,
12306 .total_size = 16384,
12307 .page_size = 256,
12308 /* supports SFDP */
12309 /* OTP: 64B total; read 0x4B, write 0x42 */
12310 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner23e10b82016-01-23 16:16:49 +000012311 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012312 .probe = probe_spi_rdid,
12313 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012314 .block_erasers =
12315 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012316 {
12317 .eraseblocks = { {4 * 1024, 4096 } },
12318 .block_erase = spi_block_erase_20,
12319 }, {
12320 .eraseblocks = { {64 * 1024, 256} },
12321 .block_erase = spi_block_erase_d8,
12322 }, {
12323 .eraseblocks = { {16384 * 1024, 1} },
12324 .block_erase = spi_block_erase_c7,
12325 }
12326 },
12327 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12328 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12329 .write = spi_chip_write_256, /* Multi I/O supported */
12330 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12331 .voltage = {1700, 2000},
12332 },
12333
12334 {
12335 .vendor = "Micron/Numonyx/ST",
12336 .name = "N25Q128..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12337 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012338 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012339 .model_id = ST_N25Q128__3E,
12340 .total_size = 16384,
12341 .page_size = 256,
12342 /* supports SFDP */
12343 /* OTP: 64B total; read 0x4B, write 0x42 */
12344 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12345 .tested = TEST_OK_PREW,
12346 .probe = probe_spi_rdid,
12347 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012348 .block_erasers =
12349 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000012350 {
12351 .eraseblocks = { {4 * 1024, 4096 } },
12352 .block_erase = spi_block_erase_20,
12353 }, {
12354 .eraseblocks = { {64 * 1024, 256} },
12355 .block_erase = spi_block_erase_d8,
12356 }, {
12357 .eraseblocks = { {16384 * 1024, 1} },
12358 .block_erase = spi_block_erase_c7,
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},
12366 },
12367
12368 {
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012369 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012370 .name = "N25Q256..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
12371 .bustype = BUS_SPI,
12372 .manufacture_id = ST_ID,
12373 .model_id = ST_N25Q256__1E,
12374 .total_size = 32768,
12375 .page_size = 256,
12376 /* supports SFDP */
12377 /* OTP: 64B total; read 0x4B, write 0x42 */
12378 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12379 .tested = TEST_UNTESTED,
12380 .probe = probe_spi_rdid,
12381 .probe_timing = TIMING_ZERO,
12382 .block_erasers =
12383 {
12384 {
12385 .eraseblocks = { {4 * 1024, 8192} },
12386 .block_erase = spi_block_erase_21,
12387 }, {
12388 .eraseblocks = { {4 * 1024, 8192} },
12389 .block_erase = spi_block_erase_20,
12390 }, {
12391 .eraseblocks = { {64 * 1024, 512} },
12392 .block_erase = spi_block_erase_dc,
12393 }, {
12394 .eraseblocks = { {64 * 1024, 512} },
12395 .block_erase = spi_block_erase_d8,
12396 }, {
12397 .eraseblocks = { {32768 * 1024, 1} },
12398 .block_erase = spi_block_erase_c7,
12399 }
12400 },
12401 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12402 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12403 .write = spi_chip_write_256, /* Multi I/O supported */
12404 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12405 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012406 .prepare_access = spi_prepare_io,
12407 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012408 },
12409
12410 {
12411 .vendor = "Micron/Numonyx/ST",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012412 .name = "N25Q256..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
12413 .bustype = BUS_SPI,
12414 .manufacture_id = ST_ID,
12415 .model_id = ST_N25Q256__3E,
12416 .total_size = 32768,
12417 .page_size = 256,
12418 /* supports SFDP */
12419 /* OTP: 64B total; read 0x4B, write 0x42 */
12420 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12421 .tested = TEST_UNTESTED,
12422 .probe = probe_spi_rdid,
12423 .probe_timing = TIMING_ZERO,
12424 .block_erasers =
12425 {
12426 {
12427 .eraseblocks = { {4 * 1024, 8192} },
12428 .block_erase = spi_block_erase_21,
12429 }, {
12430 .eraseblocks = { {4 * 1024, 8192} },
12431 .block_erase = spi_block_erase_20,
12432 }, {
12433 .eraseblocks = { {64 * 1024, 512} },
12434 .block_erase = spi_block_erase_dc,
12435 }, {
12436 .eraseblocks = { {64 * 1024, 512} },
12437 .block_erase = spi_block_erase_d8,
12438 }, {
12439 .eraseblocks = { {32768 * 1024, 1} },
12440 .block_erase = spi_block_erase_c7,
12441 }
12442 },
12443 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12444 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12445 .write = spi_chip_write_256, /* Multi I/O supported */
12446 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12447 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012448 .prepare_access = spi_prepare_io,
12449 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012450 },
12451
12452 {
12453 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012454 .name = "N25Q512..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012455 .bustype = BUS_SPI,
12456 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012457 .model_id = ST_N25Q512__1G,
12458 .total_size = 65536,
12459 .page_size = 256,
12460 /* supports SFDP */
12461 /* OTP: 64B total; read 0x4B, write 0x42 */
12462 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12463 .tested = TEST_UNTESTED,
12464 .probe = probe_spi_rdid,
12465 .probe_timing = TIMING_ZERO,
12466 .block_erasers =
12467 {
12468 {
12469 .eraseblocks = { {4 * 1024, 16384} },
12470 .block_erase = spi_block_erase_21,
12471 }, {
12472 .eraseblocks = { {4 * 1024, 16384} },
12473 .block_erase = spi_block_erase_20,
12474 }, {
12475 .eraseblocks = { {64 * 1024, 1024} },
12476 .block_erase = spi_block_erase_dc,
12477 }, {
12478 .eraseblocks = { {64 * 1024, 1024} },
12479 .block_erase = spi_block_erase_d8,
12480 }, {
12481 .eraseblocks = { {32768 * 1024, 2} },
12482 .block_erase = spi_block_erase_c4,
12483 }
12484 },
12485 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12486 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12487 .write = spi_chip_write_256, /* Multi I/O supported */
12488 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12489 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012490 .prepare_access = spi_prepare_io,
12491 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012492 },
12493
12494 {
12495 .vendor = "Micron/Numonyx/ST",
12496 .name = "N25Q512..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
12497 .bustype = BUS_SPI,
12498 .manufacture_id = ST_ID,
12499 .model_id = ST_N25Q512__3G,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012500 .total_size = 65536,
12501 .page_size = 256,
12502 /* supports SFDP */
12503 /* OTP: 64B total; read 0x4B, write 0x42 */
12504 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12505 .tested = TEST_OK_PREW,
12506 .probe = probe_spi_rdid,
12507 .probe_timing = TIMING_ZERO,
12508 .block_erasers =
12509 {
12510 {
12511 .eraseblocks = { {4 * 1024, 16384} },
12512 .block_erase = spi_block_erase_21,
12513 }, {
12514 .eraseblocks = { {4 * 1024, 16384} },
12515 .block_erase = spi_block_erase_20,
12516 }, {
12517 .eraseblocks = { {64 * 1024, 1024} },
12518 .block_erase = spi_block_erase_dc,
12519 }, {
12520 .eraseblocks = { {64 * 1024, 1024} },
12521 .block_erase = spi_block_erase_d8,
12522 }, {
Jacob Creedone8e7b0e2019-07-22 12:21:22 -070012523 .eraseblocks = { {32768 * 1024, 2} },
12524 .block_erase = spi_block_erase_c4,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012525 }
12526 },
12527 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12528 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12529 .write = spi_chip_write_256, /* Multi I/O supported */
12530 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12531 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012532 .prepare_access = spi_prepare_io,
12533 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012534 },
12535
12536 {
Ed Swierk199ab392017-07-03 13:33:44 -070012537 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012538 .name = "MT25QL01G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12539 .bustype = BUS_SPI,
12540 .manufacture_id = ST_ID,
12541 .model_id = ST_N25Q00A__3G,
12542 .total_size = 131072,
12543 .page_size = 256,
12544 /* supports SFDP */
12545 /* OTP: 64B total; read 0x4B, write 0x42 */
12546 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12547 .tested = TEST_OK_PREW,
12548 .probe = probe_spi_rdid,
12549 .probe_timing = TIMING_ZERO,
12550 .block_erasers =
12551 {
12552 {
12553 .eraseblocks = { {4 * 1024, 32768} },
12554 .block_erase = spi_block_erase_21,
12555 }, {
12556 .eraseblocks = { {4 * 1024, 32768} },
12557 .block_erase = spi_block_erase_20,
12558 }, {
12559 .eraseblocks = { {32 * 1024, 4096} },
12560 .block_erase = spi_block_erase_5c,
12561 }, {
12562 .eraseblocks = { {32 * 1024, 4096} },
12563 .block_erase = spi_block_erase_52,
12564 }, {
12565 .eraseblocks = { {64 * 1024, 2048} },
12566 .block_erase = spi_block_erase_dc,
12567 }, {
12568 .eraseblocks = { {64 * 1024, 2048} },
12569 .block_erase = spi_block_erase_d8,
12570 }, {
12571 .eraseblocks = { {65536 * 1024, 2} },
12572 .block_erase = spi_block_erase_c4,
12573 }
12574 },
12575 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12576 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12577 .write = spi_chip_write_256, /* Multi I/O supported */
12578 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12579 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012580 .prepare_access = spi_prepare_io,
12581 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012582 },
12583
12584 {
12585 .vendor = "Micron",
12586 .name = "MT25QU01G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12587 .bustype = BUS_SPI,
12588 .manufacture_id = ST_ID,
12589 .model_id = ST_N25Q00A__1G,
12590 .total_size = 131072,
12591 .page_size = 256,
12592 /* supports SFDP */
12593 /* OTP: 64B total; read 0x4B, write 0x42 */
12594 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12595 .tested = TEST_UNTESTED,
12596 .probe = probe_spi_rdid,
12597 .probe_timing = TIMING_ZERO,
12598 .block_erasers =
12599 {
12600 {
12601 .eraseblocks = { {4 * 1024, 32768} },
12602 .block_erase = spi_block_erase_21,
12603 }, {
12604 .eraseblocks = { {4 * 1024, 32768} },
12605 .block_erase = spi_block_erase_20,
12606 }, {
12607 .eraseblocks = { {32 * 1024, 4096} },
12608 .block_erase = spi_block_erase_5c,
12609 }, {
12610 .eraseblocks = { {32 * 1024, 4096} },
12611 .block_erase = spi_block_erase_52,
12612 }, {
12613 .eraseblocks = { {64 * 1024, 2048} },
12614 .block_erase = spi_block_erase_dc,
12615 }, {
12616 .eraseblocks = { {64 * 1024, 2048} },
12617 .block_erase = spi_block_erase_d8,
12618 }, {
12619 .eraseblocks = { {65536 * 1024, 2} },
12620 .block_erase = spi_block_erase_c4,
12621 }
12622 },
12623 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12624 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12625 .write = spi_chip_write_256, /* Multi I/O supported */
12626 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12627 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012628 .prepare_access = spi_prepare_io,
12629 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012630 },
12631
12632 {
12633 .vendor = "Micron",
12634 .name = "MT25QL02G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12635 .bustype = BUS_SPI,
12636 .manufacture_id = ST_ID,
12637 .model_id = ST_MT25QL02G,
12638 .total_size = 262144,
12639 .page_size = 256,
12640 /* supports SFDP */
12641 /* OTP: 64B total; read 0x4B, write 0x42 */
12642 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12643 .tested = TEST_UNTESTED,
12644 .probe = probe_spi_rdid,
12645 .probe_timing = TIMING_ZERO,
12646 .block_erasers =
12647 {
12648 {
12649 .eraseblocks = { {4 * 1024, 65536} },
12650 .block_erase = spi_block_erase_21,
12651 }, {
12652 .eraseblocks = { {4 * 1024, 65536} },
12653 .block_erase = spi_block_erase_20,
12654 }, {
12655 .eraseblocks = { {32 * 1024, 8192} },
12656 .block_erase = spi_block_erase_5c,
12657 }, {
12658 .eraseblocks = { {32 * 1024, 8192} },
12659 .block_erase = spi_block_erase_52,
12660 }, {
12661 .eraseblocks = { {64 * 1024, 4096} },
12662 .block_erase = spi_block_erase_dc,
12663 }, {
12664 .eraseblocks = { {64 * 1024, 4096} },
12665 .block_erase = spi_block_erase_d8,
12666 }, {
12667 .eraseblocks = { {65536 * 1024, 4} },
12668 .block_erase = spi_block_erase_c4,
12669 }
12670 },
12671 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12672 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12673 .write = spi_chip_write_256, /* Multi I/O supported */
12674 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12675 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012676 .prepare_access = spi_prepare_io,
12677 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012678 },
12679
12680 {
12681 .vendor = "Micron",
12682 .name = "MT25QU02G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12683 .bustype = BUS_SPI,
12684 .manufacture_id = ST_ID,
12685 .model_id = ST_MT25QU02G,
12686 .total_size = 262144,
12687 .page_size = 256,
12688 /* supports SFDP */
12689 /* OTP: 64B total; read 0x4B, write 0x42 */
12690 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12691 .tested = TEST_UNTESTED,
12692 .probe = probe_spi_rdid,
12693 .probe_timing = TIMING_ZERO,
12694 .block_erasers =
12695 {
12696 {
12697 .eraseblocks = { {4 * 1024, 65536} },
12698 .block_erase = spi_block_erase_21,
12699 }, {
12700 .eraseblocks = { {4 * 1024, 65536} },
12701 .block_erase = spi_block_erase_20,
12702 }, {
12703 .eraseblocks = { {32 * 1024, 8192} },
12704 .block_erase = spi_block_erase_5c,
12705 }, {
12706 .eraseblocks = { {32 * 1024, 8192} },
12707 .block_erase = spi_block_erase_52,
12708 }, {
12709 .eraseblocks = { {64 * 1024, 4096} },
12710 .block_erase = spi_block_erase_dc,
12711 }, {
12712 .eraseblocks = { {64 * 1024, 4096} },
12713 .block_erase = spi_block_erase_d8,
12714 }, {
12715 .eraseblocks = { {65536 * 1024, 4} },
12716 .block_erase = spi_block_erase_c4,
12717 }
12718 },
12719 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12720 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12721 .write = spi_chip_write_256, /* Multi I/O supported */
12722 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12723 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012724 .prepare_access = spi_prepare_io,
12725 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012726 },
12727
12728 {
12729 .vendor = "Micron",
12730 .name = "MT25QU128", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12731 .bustype = BUS_SPI,
12732 .manufacture_id = ST_ID,
12733 .model_id = ST_N25Q128__1E,
12734 .total_size = 16384,
12735 .page_size = 256,
12736 /* supports SFDP */
12737 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huber48dc0902023-03-05 17:20:55 +010012738 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012739 .tested = TEST_UNTESTED,
12740 .probe = probe_spi_rdid,
12741 .probe_timing = TIMING_ZERO,
12742 .block_erasers =
12743 {
12744 {
12745 .eraseblocks = { {4 * 1024, 4096} },
12746 .block_erase = spi_block_erase_20,
12747 }, {
12748 .eraseblocks = { {32 * 1024, 512} },
12749 .block_erase = spi_block_erase_52,
12750 }, {
12751 .eraseblocks = { {64 * 1024, 256} },
12752 .block_erase = spi_block_erase_d8,
12753 }, {
12754 .eraseblocks = { {16384 * 1024, 1} },
12755 .block_erase = spi_block_erase_c7,
12756 }, {
12757 .eraseblocks = { {16384 * 1024, 1} },
12758 .block_erase = spi_block_erase_60,
12759 }
12760 },
12761 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12762 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12763 .write = spi_chip_write_256, /* Multi I/O supported */
12764 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12765 .voltage = {1700, 2000},
12766 },
12767
12768 {
12769 .vendor = "Micron",
12770 .name = "MT25QL128", /* L = 3V, uniform 64KB/4KB blocks/sectors */
12771 .bustype = BUS_SPI,
12772 .manufacture_id = ST_ID,
12773 .model_id = ST_N25Q128__3E,
12774 .total_size = 16384,
12775 .page_size = 256,
12776 /* supports SFDP */
12777 /* OTP: 64B total; read 0x4B, write 0x42 */
Rick Altherr1e563602022-12-22 10:25:34 -080012778 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
12779 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012780 .probe = probe_spi_rdid,
12781 .probe_timing = TIMING_ZERO,
12782 .block_erasers =
12783 {
12784 {
12785 .eraseblocks = { {4 * 1024, 4096} },
12786 .block_erase = spi_block_erase_20,
12787 }, {
12788 .eraseblocks = { {32 * 1024, 512} },
12789 .block_erase = spi_block_erase_52,
12790 }, {
12791 .eraseblocks = { {64 * 1024, 256} },
12792 .block_erase = spi_block_erase_d8,
12793 }, {
12794 .eraseblocks = { {16384 * 1024, 1} },
12795 .block_erase = spi_block_erase_c7,
12796 }, {
12797 .eraseblocks = { {16384 * 1024, 1} },
12798 .block_erase = spi_block_erase_60,
12799 }
12800 },
12801 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12802 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12803 .write = spi_chip_write_256, /* Multi I/O supported */
12804 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12805 .voltage = {2700, 3600},
12806 },
12807
12808 {
12809 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012810 .name = "MT25QL256", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070012811 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012812 .manufacture_id = ST_ID,
Ed Swierk199ab392017-07-03 13:33:44 -070012813 .model_id = ST_N25Q256__3E,
12814 .total_size = 32768,
12815 .page_size = 256,
12816 /* supports SFDP */
12817 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010012818 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Simon Buhrowb7014f92021-02-15 13:16:57 +010012819 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070012820 .probe = probe_spi_rdid,
12821 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012822 .block_erasers =
12823 {
Ed Swierk199ab392017-07-03 13:33:44 -070012824 {
12825 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012826 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070012827 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012828 .eraseblocks = { {4 * 1024, 8192} },
12829 .block_erase = spi_block_erase_20,
12830 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070012831 .eraseblocks = { {32 * 1024, 1024} },
12832 .block_erase = spi_block_erase_5c,
12833 }, {
12834 .eraseblocks = { {32 * 1024, 1024} },
12835 .block_erase = spi_block_erase_52,
12836 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012837 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012838 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070012839 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012840 .eraseblocks = { {64 * 1024, 512} },
12841 .block_erase = spi_block_erase_d8,
12842 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012843 .eraseblocks = { {32768 * 1024, 1} },
12844 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070012845 }, {
12846 .eraseblocks = { {32768 * 1024, 1} },
12847 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070012848 }
12849 },
12850 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12851 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12852 .write = spi_chip_write_256, /* Multi I/O supported */
12853 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12854 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012855 .prepare_access = spi_prepare_io,
12856 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070012857 },
12858
12859 {
12860 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012861 .name = "MT25QU256", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12862 .bustype = BUS_SPI,
12863 .manufacture_id = ST_ID,
12864 .model_id = ST_N25Q256__1E,
12865 .total_size = 32768,
12866 .page_size = 256,
12867 /* supports SFDP */
12868 /* OTP: 64B total; read 0x4B, write 0x42 */
12869 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons59052582022-03-08 15:23:58 +010012870 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012871 .probe = probe_spi_rdid,
12872 .probe_timing = TIMING_ZERO,
12873 .block_erasers =
12874 {
12875 {
12876 .eraseblocks = { {4 * 1024, 8192} },
12877 .block_erase = spi_block_erase_21,
12878 }, {
12879 .eraseblocks = { {4 * 1024, 8192} },
12880 .block_erase = spi_block_erase_20,
12881 }, {
12882 .eraseblocks = { {32 * 1024, 1024} },
12883 .block_erase = spi_block_erase_5c,
12884 }, {
12885 .eraseblocks = { {32 * 1024, 1024} },
12886 .block_erase = spi_block_erase_52,
12887 }, {
12888 .eraseblocks = { {64 * 1024, 512} },
12889 .block_erase = spi_block_erase_dc,
12890 }, {
12891 .eraseblocks = { {64 * 1024, 512} },
12892 .block_erase = spi_block_erase_d8,
12893 }, {
12894 .eraseblocks = { {32768 * 1024, 1} },
12895 .block_erase = spi_block_erase_c7,
12896 }, {
12897 .eraseblocks = { {32768 * 1024, 1} },
12898 .block_erase = spi_block_erase_60,
12899 }
12900 },
12901 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12902 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12903 .write = spi_chip_write_256, /* Multi I/O supported */
12904 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12905 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012906 .prepare_access = spi_prepare_io,
12907 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012908 },
12909
12910 {
12911 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070012912 .name = "MT25QL512", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070012913 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100012914 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012915 .model_id = ST_N25Q512__3G,
Ed Swierk199ab392017-07-03 13:33:44 -070012916 .total_size = 65536,
12917 .page_size = 256,
12918 /* supports SFDP */
12919 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010012920 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons3ed5a352018-09-30 16:31:09 +020012921 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070012922 .probe = probe_spi_rdid,
12923 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100012924 .block_erasers =
12925 {
Ed Swierk199ab392017-07-03 13:33:44 -070012926 {
12927 .eraseblocks = { {4 * 1024, 16384} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012928 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070012929 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012930 .eraseblocks = { {4 * 1024, 16384} },
12931 .block_erase = spi_block_erase_20,
12932 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070012933 .eraseblocks = { {32 * 1024, 2048} },
12934 .block_erase = spi_block_erase_5c,
12935 }, {
12936 .eraseblocks = { {32 * 1024, 2048} },
12937 .block_erase = spi_block_erase_52,
12938 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012939 .eraseblocks = { {64 * 1024, 1024} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020012940 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070012941 }, {
Nico Huberaac81422017-11-10 22:54:13 +010012942 .eraseblocks = { {64 * 1024, 1024} },
12943 .block_erase = spi_block_erase_d8,
12944 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070012945 .eraseblocks = { {65536 * 1024, 1} },
12946 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070012947 }, {
12948 .eraseblocks = { {65536 * 1024, 1} },
12949 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070012950 }
12951 },
12952 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
12953 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
12954 .write = spi_chip_write_256, /* Multi I/O supported */
12955 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
12956 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012957 .reg_bits =
12958 {
12959 .srp = {STATUS1, 7, RW},
12960 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
12961 .tb = {STATUS1, 5, RW},
12962 },
Nico Huberaabb3e02023-01-13 00:22:30 +010012963 .wp_write_cfg = spi_wp_write_cfg,
12964 .wp_read_cfg = spi_wp_read_cfg,
12965 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030012966 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020012967 .prepare_access = spi_prepare_io,
12968 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070012969 },
12970
12971 {
Jacob Creedon80e8dc42019-07-22 12:35:30 -070012972 .vendor = "Micron",
12973 .name = "MT25QU512", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
12974 .bustype = BUS_SPI,
12975 .manufacture_id = ST_ID,
12976 .model_id = ST_N25Q512__1G,
12977 .total_size = 65536,
12978 .page_size = 256,
12979 /* supports SFDP */
12980 /* OTP: 64B total; read 0x4B, write 0x42 */
12981 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
12982 .tested = TEST_OK_PREW,
12983 .probe = probe_spi_rdid,
12984 .probe_timing = TIMING_ZERO,
12985 .block_erasers =
12986 {
12987 {
12988 .eraseblocks = { {4 * 1024, 16384} },
12989 .block_erase = spi_block_erase_21,
12990 }, {
12991 .eraseblocks = { {4 * 1024, 16384} },
12992 .block_erase = spi_block_erase_20,
12993 }, {
12994 .eraseblocks = { {32 * 1024, 2048} },
12995 .block_erase = spi_block_erase_5c,
12996 }, {
12997 .eraseblocks = { {32 * 1024, 2048} },
12998 .block_erase = spi_block_erase_52,
12999 }, {
13000 .eraseblocks = { {64 * 1024, 1024} },
13001 .block_erase = spi_block_erase_dc,
13002 }, {
13003 .eraseblocks = { {64 * 1024, 1024} },
13004 .block_erase = spi_block_erase_d8,
13005 }, {
13006 .eraseblocks = { {65536 * 1024, 1} },
13007 .block_erase = spi_block_erase_c7,
13008 }, {
13009 .eraseblocks = { {65536 * 1024, 1} },
13010 .block_erase = spi_block_erase_60,
13011 }
13012 },
13013 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
13014 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
13015 .write = spi_chip_write_256, /* Multi I/O supported */
13016 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13017 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020013018 .prepare_access = spi_prepare_io,
13019 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070013020 },
13021
13022 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000013023 .vendor = "MoselVitelic",
13024 .name = "V29C51000B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013025 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013026 .manufacture_id = SYNCMOS_MVC_ID,
13027 .model_id = MVC_V29C51000B,
13028 .total_size = 64,
13029 .page_size = 512,
13030 .feature_bits = FEATURE_EITHER_RESET,
13031 .tested = TEST_UNTESTED,
13032 .probe = probe_jedec,
13033 .probe_timing = TIMING_ZERO,
13034 .block_erasers =
13035 {
13036 {
13037 .eraseblocks = { {512, 128} },
13038 .block_erase = erase_sector_jedec,
13039 }, {
13040 .eraseblocks = { {64 * 1024, 1} },
13041 .block_erase = erase_chip_block_jedec,
13042 },
13043 },
13044 .write = write_jedec_1,
13045 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013046 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013047 .prepare_access = prepare_memory_access,
13048 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013049 },
13050
13051 {
13052 .vendor = "MoselVitelic",
13053 .name = "V29C51000T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013054 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013055 .manufacture_id = SYNCMOS_MVC_ID,
13056 .model_id = MVC_V29C51000T,
13057 .total_size = 64,
13058 .page_size = 512,
13059 .feature_bits = FEATURE_EITHER_RESET,
13060 .tested = TEST_UNTESTED,
13061 .probe = probe_jedec,
13062 .probe_timing = TIMING_ZERO,
13063 .block_erasers =
13064 {
13065 {
13066 .eraseblocks = { {512, 128} },
13067 .block_erase = erase_sector_jedec,
13068 }, {
13069 .eraseblocks = { {64 * 1024, 1} },
13070 .block_erase = erase_chip_block_jedec,
13071 },
13072 },
13073 .write = write_jedec_1,
13074 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013075 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013076 .prepare_access = prepare_memory_access,
13077 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013078 },
13079
13080 {
13081 .vendor = "MoselVitelic",
13082 .name = "V29C51400B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013083 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013084 .manufacture_id = SYNCMOS_MVC_ID,
13085 .model_id = MVC_V29C51400B,
13086 .total_size = 512,
13087 .page_size = 1024,
13088 .feature_bits = FEATURE_EITHER_RESET,
13089 .tested = TEST_UNTESTED,
13090 .probe = probe_jedec,
13091 .probe_timing = TIMING_ZERO,
13092 .block_erasers =
13093 {
13094 {
13095 .eraseblocks = { {1024, 512} },
13096 .block_erase = erase_sector_jedec,
13097 }, {
13098 .eraseblocks = { {512 * 1024, 1} },
13099 .block_erase = erase_chip_block_jedec,
13100 },
13101 },
13102 .write = write_jedec_1,
13103 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013104 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013105 .prepare_access = prepare_memory_access,
13106 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013107 },
13108
13109 {
13110 .vendor = "MoselVitelic",
13111 .name = "V29C51400T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013112 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013113 .manufacture_id = SYNCMOS_MVC_ID,
13114 .model_id = MVC_V29C51400T,
13115 .total_size = 512,
13116 .page_size = 1024,
13117 .feature_bits = FEATURE_EITHER_RESET,
13118 .tested = TEST_UNTESTED,
13119 .probe = probe_jedec,
13120 .probe_timing = TIMING_ZERO,
13121 .block_erasers =
13122 {
13123 {
13124 .eraseblocks = { {1024, 512} },
13125 .block_erase = erase_sector_jedec,
13126 }, {
13127 .eraseblocks = { {512 * 1024, 1} },
13128 .block_erase = erase_chip_block_jedec,
13129 },
13130 },
13131 .write = write_jedec_1,
13132 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013133 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013134 .prepare_access = prepare_memory_access,
13135 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013136 },
13137
13138 {
13139 .vendor = "MoselVitelic",
13140 .name = "V29LC51000",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013141 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013142 .manufacture_id = SYNCMOS_MVC_ID,
13143 .model_id = MVC_V29LC51000,
13144 .total_size = 64,
13145 .page_size = 512,
13146 .feature_bits = FEATURE_EITHER_RESET,
13147 .tested = TEST_UNTESTED,
13148 .probe = probe_jedec,
13149 .probe_timing = TIMING_ZERO,
13150 .block_erasers =
13151 {
13152 {
13153 .eraseblocks = { {512, 128} },
13154 .block_erase = erase_sector_jedec,
13155 }, {
13156 .eraseblocks = { {64 * 1024, 1} },
13157 .block_erase = erase_chip_block_jedec,
13158 },
13159 },
13160 .write = write_jedec_1,
13161 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013162 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013163 .prepare_access = prepare_memory_access,
13164 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013165 },
13166
13167 {
13168 .vendor = "MoselVitelic",
13169 .name = "V29LC51001",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013170 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013171 .manufacture_id = SYNCMOS_MVC_ID,
13172 .model_id = MVC_V29LC51001,
13173 .total_size = 128,
13174 .page_size = 512,
13175 .feature_bits = FEATURE_EITHER_RESET,
13176 .tested = TEST_UNTESTED,
13177 .probe = probe_jedec,
13178 .probe_timing = TIMING_ZERO,
13179 .block_erasers =
13180 {
13181 {
13182 .eraseblocks = { {512, 256} },
13183 .block_erase = erase_sector_jedec,
13184 }, {
13185 .eraseblocks = { {128 * 1024, 1} },
13186 .block_erase = erase_chip_block_jedec,
13187 },
13188 },
13189 .write = write_jedec_1,
13190 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013191 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013192 .prepare_access = prepare_memory_access,
13193 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013194 },
13195
13196 {
13197 .vendor = "MoselVitelic",
13198 .name = "V29LC51002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013199 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013200 .manufacture_id = SYNCMOS_MVC_ID,
13201 .model_id = MVC_V29LC51002,
13202 .total_size = 256,
13203 .page_size = 512,
13204 .feature_bits = FEATURE_EITHER_RESET,
13205 .tested = TEST_UNTESTED,
13206 .probe = probe_jedec,
13207 .probe_timing = TIMING_ZERO,
13208 .block_erasers =
13209 {
13210 {
13211 .eraseblocks = { {512, 512} },
13212 .block_erase = erase_sector_jedec,
13213 }, {
13214 .eraseblocks = { {256 * 1024, 1} },
13215 .block_erase = erase_chip_block_jedec,
13216 },
13217 },
13218 .write = write_jedec_1,
13219 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013220 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010013221 .prepare_access = prepare_memory_access,
13222 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000013223 },
13224
13225 {
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013226 .vendor = "Nantronics",
13227 .name = "N25S10",
13228 .bustype = BUS_SPI,
13229 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13230 .model_id = NANTRONICS_N25S10,
13231 .total_size = 128,
13232 .page_size = 256,
13233 .feature_bits = FEATURE_WRSR_WREN,
13234 .tested = TEST_UNTESTED,
13235 .probe = probe_spi_rdid,
13236 .probe_timing = TIMING_ZERO,
13237 .block_erasers =
13238 {
13239 {
13240 .eraseblocks = { {4 * 1024, 32} },
13241 .block_erase = spi_block_erase_20,
13242 }, {
13243 .eraseblocks = { {4 * 1024, 32} },
13244 .block_erase = spi_block_erase_d7,
13245 }, {
13246 .eraseblocks = { {32 * 1024, 4} },
13247 .block_erase = spi_block_erase_52,
13248 }, {
13249 .eraseblocks = { {64 * 1024, 2} },
13250 .block_erase = spi_block_erase_d8,
13251 }, {
13252 .eraseblocks = { {128 * 1024, 1} },
13253 .block_erase = spi_block_erase_60,
13254 }, {
13255 .eraseblocks = { {128 * 1024, 1} },
13256 .block_erase = spi_block_erase_c7,
13257 }
13258 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013259 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013260 .unlock = spi_disable_blockprotect_bp3_srwd,
13261 .write = spi_chip_write_256,
13262 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13263 .voltage = {2700, 3600},
13264 },
13265
13266 {
13267 .vendor = "Nantronics",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013268 .name = "N25S16",
13269 .bustype = BUS_SPI,
13270 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13271 .model_id = NANTRONICS_N25S16,
13272 .total_size = 2048,
13273 .page_size = 256,
13274 .feature_bits = FEATURE_WRSR_WREN,
13275 .tested = TEST_UNTESTED,
13276 .probe = probe_spi_rdid,
13277 .probe_timing = TIMING_ZERO,
13278 .block_erasers =
13279 {
13280 {
13281 .eraseblocks = { {4 * 1024, 512} },
13282 .block_erase = spi_block_erase_20,
13283 }, {
13284 .eraseblocks = { {64 * 1024, 32} },
13285 .block_erase = spi_block_erase_d8,
13286 }, {
13287 .eraseblocks = { {2048 * 1024, 1} },
13288 .block_erase = spi_block_erase_60,
13289 }, {
13290 .eraseblocks = { {2048 * 1024, 1} },
13291 .block_erase = spi_block_erase_c7,
13292 }
13293 },
13294 .printlock = spi_prettyprint_status_register_bp3_srwd,
13295 .unlock = spi_disable_blockprotect_bp3_srwd,
13296 .write = spi_chip_write_256,
13297 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13298 .voltage = {2700, 3600},
13299 },
13300
13301 {
13302 .vendor = "Nantronics",
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013303 .name = "N25S20",
13304 .bustype = BUS_SPI,
13305 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13306 .model_id = NANTRONICS_N25S20,
13307 .total_size = 256,
13308 .page_size = 256,
13309 .feature_bits = FEATURE_WRSR_WREN,
13310 .tested = TEST_UNTESTED,
13311 .probe = probe_spi_rdid,
13312 .probe_timing = TIMING_ZERO,
13313 .block_erasers =
13314 {
13315 {
13316 .eraseblocks = { {4 * 1024, 64} },
13317 .block_erase = spi_block_erase_20,
13318 }, {
13319 .eraseblocks = { {4 * 1024, 64} },
13320 .block_erase = spi_block_erase_d7,
13321 }, {
13322 .eraseblocks = { {32 * 1024, 8} },
13323 .block_erase = spi_block_erase_52,
13324 }, {
13325 .eraseblocks = { {64 * 1024, 4} },
13326 .block_erase = spi_block_erase_d8,
13327 }, {
13328 .eraseblocks = { {256 * 1024, 1} },
13329 .block_erase = spi_block_erase_60,
13330 }, {
13331 .eraseblocks = { {256 * 1024, 1} },
13332 .block_erase = spi_block_erase_c7,
13333 }
13334 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013335 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013336 .unlock = spi_disable_blockprotect_bp3_srwd,
13337 .write = spi_chip_write_256,
13338 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13339 .voltage = {2700, 3600},
13340 },
13341
13342 {
13343 .vendor = "Nantronics",
13344 .name = "N25S40",
13345 .bustype = BUS_SPI,
13346 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13347 .model_id = NANTRONICS_N25S40,
13348 .total_size = 512,
13349 .page_size = 256,
13350 .feature_bits = FEATURE_WRSR_WREN,
13351 .tested = TEST_UNTESTED,
13352 .probe = probe_spi_rdid,
13353 .probe_timing = TIMING_ZERO,
13354 .block_erasers =
13355 {
13356 {
13357 .eraseblocks = { {4 * 1024, 128} },
13358 .block_erase = spi_block_erase_20,
13359 }, {
13360 .eraseblocks = { {4 * 1024, 128} },
13361 .block_erase = spi_block_erase_d7,
13362 }, {
13363 .eraseblocks = { {32 * 1024, 16} },
13364 .block_erase = spi_block_erase_52,
13365 }, {
13366 .eraseblocks = { {64 * 1024, 8} },
13367 .block_erase = spi_block_erase_d8,
13368 }, {
13369 .eraseblocks = { {512 * 1024, 1} },
13370 .block_erase = spi_block_erase_60,
13371 }, {
13372 .eraseblocks = { {512 * 1024, 1} },
13373 .block_erase = spi_block_erase_c7,
13374 }
13375 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013376 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013377 .unlock = spi_disable_blockprotect_bp3_srwd,
13378 .write = spi_chip_write_256,
13379 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13380 .voltage = {2700, 3600},
13381 },
13382
13383 {
13384 .vendor = "Nantronics",
13385 .name = "N25S80",
13386 .bustype = BUS_SPI,
13387 .manufacture_id = NANTRONICS_ID_NOPREFIX,
13388 .model_id = NANTRONICS_N25S80,
13389 .total_size = 1024,
13390 .page_size = 256,
13391 .feature_bits = FEATURE_WRSR_WREN,
13392 .tested = TEST_UNTESTED,
13393 .probe = probe_spi_rdid,
13394 .probe_timing = TIMING_ZERO,
13395 .block_erasers =
13396 {
13397 {
13398 .eraseblocks = { {4 * 1024, 256} },
13399 .block_erase = spi_block_erase_20,
13400 }, {
13401 .eraseblocks = { {32 * 1024, 32} },
13402 .block_erase = spi_block_erase_52,
13403 }, {
13404 .eraseblocks = { {64 * 1024, 16} },
13405 .block_erase = spi_block_erase_d8,
13406 }, {
13407 .eraseblocks = { {1024 * 1024, 1} },
13408 .block_erase = spi_block_erase_60,
13409 }, {
13410 .eraseblocks = { {1024 * 1024, 1} },
13411 .block_erase = spi_block_erase_c7,
13412 }
13413 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013414 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000013415 .unlock = spi_disable_blockprotect_bp3_srwd,
13416 .write = spi_chip_write_256,
13417 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
13418 .voltage = {2700, 3600},
13419 },
13420
13421 {
Stefan Taunerf4451612013-04-19 01:59:15 +000013422 .vendor = "PMC",
13423 .name = "Pm25LD010(C)",
13424 .bustype = BUS_SPI,
13425 .manufacture_id = PMC_ID,
13426 .model_id = PMC_PM25LD010,
13427 .total_size = 128,
13428 .page_size = 256,
13429 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000013430 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013431 .probe = probe_spi_rdid,
13432 .probe_timing = TIMING_ZERO,
13433 .block_erasers =
13434 {
13435 {
13436 .eraseblocks = { {4 * 1024, 32} },
13437 .block_erase = spi_block_erase_20,
13438 }, {
13439 .eraseblocks = { {4 * 1024, 32} },
13440 .block_erase = spi_block_erase_d7,
13441 }, {
13442 .eraseblocks = { {32 * 1024, 4} },
13443 .block_erase = spi_block_erase_d8,
13444 }, {
13445 .eraseblocks = { {128 * 1024, 1} },
13446 .block_erase = spi_block_erase_60,
13447 }, {
13448 .eraseblocks = { {128 * 1024, 1} },
13449 .block_erase = spi_block_erase_c7,
13450 }
13451 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013452 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013453 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13454 .write = spi_chip_write_256,
13455 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13456 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD010 */
13457 },
13458
13459 {
13460 .vendor = "PMC",
13461 .name = "Pm25LD020(C)",
13462 .bustype = BUS_SPI,
13463 .manufacture_id = PMC_ID,
13464 .model_id = PMC_PM25LD020,
13465 .total_size = 256,
13466 .page_size = 256,
13467 .feature_bits = FEATURE_WRSR_WREN,
Angel Ponsf5822a82018-09-30 20:09:58 +020013468 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013469 .probe = probe_spi_rdid,
13470 .probe_timing = TIMING_ZERO,
13471 .block_erasers =
13472 {
13473 {
13474 .eraseblocks = { {4 * 1024, 64} },
13475 .block_erase = spi_block_erase_20,
13476 }, {
13477 .eraseblocks = { {4 * 1024, 64} },
13478 .block_erase = spi_block_erase_d7,
13479 }, {
13480 .eraseblocks = { {64 * 1024, 4} },
13481 .block_erase = spi_block_erase_d8,
13482 }, {
13483 .eraseblocks = { {256 * 1024, 1} },
13484 .block_erase = spi_block_erase_60,
13485 }, {
13486 .eraseblocks = { {256 * 1024, 1} },
13487 .block_erase = spi_block_erase_c7,
13488 }
13489 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013490 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013491 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13492 .write = spi_chip_write_256,
13493 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13494 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD020 */
13495 },
13496
13497 {
13498 .vendor = "PMC",
13499 .name = "Pm25LD040(C)",
13500 .bustype = BUS_SPI,
13501 .manufacture_id = PMC_ID,
13502 .model_id = PMC_PM25LV040,
13503 .total_size = 512,
13504 .page_size = 256,
13505 .feature_bits = FEATURE_WRSR_WREN,
Angel Pons05127bf2018-09-30 20:23:24 +020013506 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000013507 .probe = probe_spi_rdid,
13508 .probe_timing = TIMING_ZERO,
13509 .block_erasers =
13510 {
13511 {
13512 .eraseblocks = { {4 * 1024, 128} },
13513 .block_erase = spi_block_erase_20,
13514 }, {
13515 .eraseblocks = { {4 * 1024, 128} },
13516 .block_erase = spi_block_erase_d7,
13517 }, {
13518 .eraseblocks = { {64 * 1024, 8} },
13519 .block_erase = spi_block_erase_d8,
13520 }, {
13521 .eraseblocks = { {512 * 1024, 1} },
13522 .block_erase = spi_block_erase_60,
13523 }, {
13524 .eraseblocks = { {512 * 1024, 1} },
13525 .block_erase = spi_block_erase_c7,
13526 }
13527 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013528 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000013529 .unlock = spi_disable_blockprotect,
13530 .write = spi_chip_write_256,
13531 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13532 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD040 */
13533 },
13534
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013535 {
13536 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013537 .name = "Pm25LD256C",
13538 .bustype = BUS_SPI,
13539 .manufacture_id = PMC_ID,
13540 .model_id = PMC_PM25LD256C,
13541 .total_size = 32,
13542 .page_size = 256,
13543 .feature_bits = FEATURE_WRSR_WREN,
13544 .tested = TEST_UNTESTED,
13545 .probe = probe_spi_rdid,
13546 .probe_timing = TIMING_ZERO,
13547 .block_erasers =
13548 {
13549 {
13550 .eraseblocks = { {4 * 1024, 8} },
13551 .block_erase = spi_block_erase_20,
13552 }, {
13553 .eraseblocks = { {4 * 1024, 8} },
13554 .block_erase = spi_block_erase_d7,
13555 }, {
13556 .eraseblocks = { {32 * 1024, 1} },
13557 .block_erase = spi_block_erase_d8,
13558 }, {
13559 .eraseblocks = { {32 * 1024, 1} },
13560 .block_erase = spi_block_erase_60,
13561 }, {
13562 .eraseblocks = { {32 * 1024, 1} },
13563 .block_erase = spi_block_erase_c7,
13564 }
13565 },
13566 .printlock = spi_prettyprint_status_register_bp2_srwd,
13567 .unlock = spi_disable_blockprotect,
13568 .write = spi_chip_write_256,
13569 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13570 .voltage = {2700, 3600},
13571 },
13572
13573 {
13574 .vendor = "PMC",
13575 .name = "Pm25LD512(C)",
13576 .bustype = BUS_SPI,
13577 .manufacture_id = PMC_ID,
13578 .model_id = PMC_PM25LD512,
13579 .total_size = 64,
13580 .page_size = 256,
13581 .feature_bits = FEATURE_WRSR_WREN,
13582 .tested = TEST_OK_PREW,
13583 .probe = probe_spi_rdid,
13584 .probe_timing = TIMING_ZERO,
13585 .block_erasers =
13586 {
13587 {
13588 .eraseblocks = { {4 * 1024, 16} },
13589 .block_erase = spi_block_erase_20,
13590 }, {
13591 .eraseblocks = { {4 * 1024, 16} },
13592 .block_erase = spi_block_erase_d7,
13593 }, {
13594 .eraseblocks = { {32 * 1024, 2} },
13595 .block_erase = spi_block_erase_d8,
13596 }, {
13597 .eraseblocks = { {64 * 1024, 1} },
13598 .block_erase = spi_block_erase_60,
13599 }, {
13600 .eraseblocks = { {64 * 1024, 1} },
13601 .block_erase = spi_block_erase_c7,
13602 }
13603 },
13604 .printlock = spi_prettyprint_status_register_bp2_srwd,
13605 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
13606 .write = spi_chip_write_256,
13607 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
13608 .voltage = {2300, 3600},
13609 },
13610
13611 {
13612 .vendor = "PMC",
13613 .name = "Pm25LQ016",
13614 .bustype = BUS_SPI,
13615 .manufacture_id = PMC_ID,
13616 .model_id = PMC_PM25LQ016,
13617 .total_size = 2048,
13618 .page_size = 256,
13619 /* OTP: 256B total; read 0x4B, write 0xB1 */
13620 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13621 .tested = TEST_UNTESTED,
13622 .probe = probe_spi_rdid,
13623 .probe_timing = TIMING_ZERO,
13624 .block_erasers =
13625 {
13626 {
13627 .eraseblocks = { {4 * 1024, 512} },
13628 .block_erase = spi_block_erase_20,
13629 }, {
13630 .eraseblocks = { {4 * 1024, 512} },
13631 .block_erase = spi_block_erase_d7,
13632 }, {
13633 .eraseblocks = { {64 * 1024, 32} },
13634 .block_erase = spi_block_erase_d8,
13635 }, {
13636 .eraseblocks = { {2048 * 1024, 1} },
13637 .block_erase = spi_block_erase_60,
13638 }, {
13639 .eraseblocks = { {2048 * 1024, 1} },
13640 .block_erase = spi_block_erase_c7,
13641 }
13642 },
13643 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13644 .unlock = spi_disable_blockprotect_bp3_srwd,
13645 .write = spi_chip_write_256,
13646 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13647 .voltage = {2300, 3600},
13648 },
13649
13650 {
13651 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013652 .name = "Pm25LQ020",
13653 .bustype = BUS_SPI,
13654 .manufacture_id = PMC_ID,
13655 .model_id = PMC_PM25LQ020,
13656 .total_size = 256,
13657 .page_size = 256,
13658 /* OTP: 256B total; read 0x4B, write 0xB1 */
13659 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13660 .tested = TEST_UNTESTED,
13661 .probe = probe_spi_rdid,
13662 .probe_timing = TIMING_ZERO,
13663 .block_erasers =
13664 {
13665 {
13666 .eraseblocks = { {4 * 1024, 64} },
13667 .block_erase = spi_block_erase_20,
13668 }, {
13669 .eraseblocks = { {4 * 1024, 64} },
13670 .block_erase = spi_block_erase_d7,
13671 }, {
13672 .eraseblocks = { {64 * 1024, 4} },
13673 .block_erase = spi_block_erase_d8,
13674 }, {
13675 .eraseblocks = { {256 * 1024, 1} },
13676 .block_erase = spi_block_erase_60,
13677 }, {
13678 .eraseblocks = { {256 * 1024, 1} },
13679 .block_erase = spi_block_erase_c7,
13680 }
13681 },
13682 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13683 .unlock = spi_disable_blockprotect_bp3_srwd,
13684 .write = spi_chip_write_256,
13685 .read = spi_chip_read,
13686 .voltage = {2300, 3600},
13687 },
13688
13689 {
13690 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013691 .name = "Pm25LQ032C",
13692 .bustype = BUS_SPI,
13693 .manufacture_id = PMC_ID,
13694 .model_id = PMC_PM25LQ032C,
13695 .total_size = 4096,
13696 .page_size = 256,
13697 /* OTP: 64B total; read 0x4B, write 0xB1 */
13698 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13699 .tested = TEST_OK_PREW,
13700 .probe = probe_spi_rdid,
13701 .probe_timing = TIMING_ZERO,
13702 .block_erasers =
13703 {
13704 {
13705 .eraseblocks = { {4 * 1024, 1024} },
13706 .block_erase = spi_block_erase_20,
13707 }, {
13708 .eraseblocks = { {4 * 1024, 1024} },
13709 .block_erase = spi_block_erase_d7,
13710 }, {
13711 .eraseblocks = { {64 * 1024, 64} },
13712 .block_erase = spi_block_erase_d8,
13713 }, {
13714 .eraseblocks = { {4096 * 1024, 1} },
13715 .block_erase = spi_block_erase_60,
13716 }, {
13717 .eraseblocks = { {4096 * 1024, 1} },
13718 .block_erase = spi_block_erase_c7,
13719 }
13720 },
13721 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13722 .unlock = spi_disable_blockprotect_bp3_srwd,
13723 .write = spi_chip_write_256,
13724 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13725 .voltage = {2700, 3600},
13726 },
13727
13728 {
13729 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000013730 .name = "Pm25LQ040",
13731 .bustype = BUS_SPI,
13732 .manufacture_id = PMC_ID,
13733 .model_id = PMC_PM25LQ040,
13734 .total_size = 512,
13735 .page_size = 256,
13736 /* OTP: 256B total; read 0x4B, write 0xB1 */
13737 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13738 .tested = TEST_UNTESTED,
13739 .probe = probe_spi_rdid,
13740 .probe_timing = TIMING_ZERO,
13741 .block_erasers =
13742 {
13743 {
13744 .eraseblocks = { {4 * 1024, 128} },
13745 .block_erase = spi_block_erase_20,
13746 }, {
13747 .eraseblocks = { {4 * 1024, 128} },
13748 .block_erase = spi_block_erase_d7,
13749 }, {
13750 .eraseblocks = { {64 * 1024, 8} },
13751 .block_erase = spi_block_erase_d8,
13752 }, {
13753 .eraseblocks = { {512 * 1024, 1} },
13754 .block_erase = spi_block_erase_60,
13755 }, {
13756 .eraseblocks = { {512 * 1024, 1} },
13757 .block_erase = spi_block_erase_c7,
13758 }
13759 },
13760 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13761 .unlock = spi_disable_blockprotect_bp3_srwd,
13762 .write = spi_chip_write_256,
13763 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13764 .voltage = {2300, 3600},
13765 },
13766
13767 {
13768 .vendor = "PMC",
13769 .name = "Pm25LQ080",
13770 .bustype = BUS_SPI,
13771 .manufacture_id = PMC_ID,
13772 .model_id = PMC_PM25LQ080,
13773 .total_size = 1024,
13774 .page_size = 256,
13775 /* OTP: 64B total; read 0x4B, write 0xB1 */
13776 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13777 .tested = TEST_UNTESTED,
13778 .probe = probe_spi_rdid,
13779 .probe_timing = TIMING_ZERO,
13780 .block_erasers =
13781 {
13782 {
13783 .eraseblocks = { {4 * 1024, 256} },
13784 .block_erase = spi_block_erase_20,
13785 }, {
13786 .eraseblocks = { {4 * 1024, 256} },
13787 .block_erase = spi_block_erase_d7,
13788 }, {
13789 .eraseblocks = { {64 * 1024, 16} },
13790 .block_erase = spi_block_erase_d8,
13791 }, {
13792 .eraseblocks = { {1024 * 1024, 1} },
13793 .block_erase = spi_block_erase_60,
13794 }, {
13795 .eraseblocks = { {1024 * 1024, 1} },
13796 .block_erase = spi_block_erase_c7,
13797 }
13798 },
13799 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13800 .unlock = spi_disable_blockprotect_bp3_srwd,
13801 .write = spi_chip_write_256,
13802 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
13803 .voltage = {2300, 3600},
13804 },
13805
13806 {
13807 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013808 .name = "Pm25LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013809 .bustype = BUS_SPI,
Stefan Taunerbecda742014-05-30 19:34:00 +000013810 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013811 .model_id = PMC_PM25LV010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013812 .total_size = 128,
13813 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013814 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerbecda742014-05-30 19:34:00 +000013815 .tested = TEST_OK_PREW,
13816 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013817 .probe_timing = TIMING_ZERO,
13818 .block_erasers =
13819 {
13820 {
13821 .eraseblocks = { {4 * 1024, 32} },
13822 .block_erase = spi_block_erase_d7,
13823 }, {
13824 .eraseblocks = { {32 * 1024, 4} },
13825 .block_erase = spi_block_erase_d8,
13826 }, {
13827 .eraseblocks = { {128 * 1024, 1} },
13828 .block_erase = spi_block_erase_c7,
13829 }
13830 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013831 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013832 .unlock = spi_disable_blockprotect,
13833 .write = spi_chip_write_256,
13834 .read = spi_chip_read, /* Fast read (0x0B) supported */
13835 .voltage = {2700, 3600},
13836 },
13837
13838 {
13839 .vendor = "PMC",
13840 .name = "Pm25LV010A",
13841 .bustype = BUS_SPI,
13842 .manufacture_id = PMC_ID,
13843 .model_id = PMC_PM25LV010,
13844 .total_size = 128,
13845 .page_size = 256,
13846 .feature_bits = FEATURE_WRSR_WREN,
13847 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013848 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013849 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013850 .block_erasers =
13851 {
13852 {
13853 .eraseblocks = { {4 * 1024, 32} },
13854 .block_erase = spi_block_erase_d7,
13855 }, {
13856 .eraseblocks = { {32 * 1024, 4} },
13857 .block_erase = spi_block_erase_d8,
13858 }, {
13859 .eraseblocks = { {128 * 1024, 1} },
13860 .block_erase = spi_block_erase_c7,
13861 }
13862 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013863 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013864 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013865 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013866 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000013867 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013868 },
13869
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013870 {
13871 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013872 .name = "Pm25LV016B",
13873 .bustype = BUS_SPI,
13874 .manufacture_id = PMC_ID,
13875 .model_id = PMC_PM25LV016B,
13876 .total_size = 2048,
13877 .page_size = 256,
13878 .feature_bits = FEATURE_WRSR_WREN,
13879 .tested = TEST_UNTESTED,
13880 .probe = probe_spi_rdid,
13881 .probe_timing = TIMING_ZERO,
13882 .block_erasers =
13883 {
13884 {
13885 .eraseblocks = { {4 * 1024, 512} },
13886 .block_erase = spi_block_erase_d7,
13887 }, {
13888 .eraseblocks = { {4 * 1024, 512} },
13889 .block_erase = spi_block_erase_20,
13890 }, {
13891 .eraseblocks = { {64 * 1024, 32} },
13892 .block_erase = spi_block_erase_d8,
13893 }, {
13894 .eraseblocks = { {2 * 1024 * 1024, 1} },
13895 .block_erase = spi_block_erase_60,
13896 }, {
13897 .eraseblocks = { {2 * 1024 * 1024, 1} },
13898 .block_erase = spi_block_erase_c7,
13899 }
13900 },
13901 .printlock = spi_prettyprint_status_register_bp2_srwd,
13902 .unlock = spi_disable_blockprotect,
13903 .write = spi_chip_write_256,
13904 .read = spi_chip_read, /* Fast read (0x0B) supported */
13905 .voltage = {2700, 3600},
13906 },
13907
13908 {
13909 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013910 .name = "Pm25LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013911 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013912 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013913 .model_id = PMC_PM25LV020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013914 .total_size = 256,
13915 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013916 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013917 .tested = TEST_UNTESTED,
13918 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013919 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013920 .block_erasers =
13921 {
13922 {
13923 .eraseblocks = { {4 * 1024, 64} },
13924 .block_erase = spi_block_erase_d7,
13925 }, {
13926 .eraseblocks = { {64 * 1024, 4} },
13927 .block_erase = spi_block_erase_d8,
13928 }, {
13929 .eraseblocks = { {256 * 1024, 1} },
13930 .block_erase = spi_block_erase_c7,
13931 }
13932 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013933 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013934 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013935 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013936 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013937 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013938 },
13939
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013940 {
13941 .vendor = "PMC",
13942 .name = "Pm25LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013943 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013944 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013945 .model_id = PMC_PM25LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013946 .total_size = 512,
13947 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013948 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner716e0982011-07-25 20:38:52 +000013949 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013950 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013951 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013952 .block_erasers =
13953 {
13954 {
13955 .eraseblocks = { {4 * 1024, 128} },
13956 .block_erase = spi_block_erase_d7,
13957 }, {
13958 .eraseblocks = { {64 * 1024, 8} },
13959 .block_erase = spi_block_erase_d8,
13960 }, {
13961 .eraseblocks = { {512 * 1024, 1} },
13962 .block_erase = spi_block_erase_c7,
13963 }
13964 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013965 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000013966 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000013967 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000013968 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013969 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000013970 },
13971
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013972 {
13973 .vendor = "PMC",
13974 .name = "Pm25LV080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013975 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013976 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013977 .model_id = PMC_PM25LV080B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013978 .total_size = 1024,
13979 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000013980 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013981 .tested = TEST_UNTESTED,
13982 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000013983 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000013984 .block_erasers =
13985 {
13986 {
13987 .eraseblocks = { {4 * 1024, 256} },
13988 .block_erase = spi_block_erase_d7,
13989 }, {
13990 .eraseblocks = { {4 * 1024, 256} },
13991 .block_erase = spi_block_erase_20,
13992 }, {
13993 .eraseblocks = { {64 * 1024, 16} },
13994 .block_erase = spi_block_erase_d8,
13995 }, {
13996 .eraseblocks = { {1024 * 1024, 1} },
13997 .block_erase = spi_block_erase_60,
13998 }, {
13999 .eraseblocks = { {1024 * 1024, 1} },
14000 .block_erase = spi_block_erase_c7,
14001 }
14002 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000014003 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000014004 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000014005 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000014006 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014007 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000014008 },
14009
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014010 {
14011 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014012 .name = "Pm25LV512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014013 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014014 .manufacture_id = PMC_ID_NOPREFIX,
14015 .model_id = PMC_PM25LV512,
14016 .total_size = 64,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014017 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000014018 .feature_bits = FEATURE_WRSR_WREN,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014019 .tested = TEST_OK_PREW,
14020 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000014021 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000014022 .block_erasers =
14023 {
14024 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014025 .eraseblocks = { {4 * 1024, 16} },
Sean Nelson5643c072010-01-19 03:23:07 +000014026 .block_erase = spi_block_erase_d7,
14027 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014028 .eraseblocks = { {32 * 1024, 2} },
Sean Nelson5643c072010-01-19 03:23:07 +000014029 .block_erase = spi_block_erase_d8,
14030 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014031 .eraseblocks = { {64 * 1024, 1} },
Sean Nelson5643c072010-01-19 03:23:07 +000014032 .block_erase = spi_block_erase_c7,
14033 }
14034 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014035 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000014036 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000014037 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000014038 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000014039 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000014040 },
14041
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014042 {
14043 .vendor = "PMC",
Sean Nelson72a9a022009-12-22 22:15:33 +000014044 .name = "Pm29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014045 .bustype = BUS_PARALLEL,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000014046 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014047 .model_id = PMC_PM29F002B,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000014048 .total_size = 256,
Sean Nelson72a9a022009-12-22 22:15:33 +000014049 .page_size = 8 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000014050 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000014051 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000014052 .probe = probe_jedec,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014053 .probe_timing = TIMING_FIXME,
Sean Nelson72a9a022009-12-22 22:15:33 +000014054 .block_erasers =
14055 {
14056 {
14057 .eraseblocks = {
14058 {16 * 1024, 1},
14059 {8 * 1024, 2},
14060 {96 * 1024, 1},
14061 {128 * 1024, 1},
14062 },
Sean Nelson35727f72010-01-28 23:55:12 +000014063 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000014064 }, {
14065 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000014066 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000014067 },
14068 },
Sean Nelson35727f72010-01-28 23:55:12 +000014069 .write = write_jedec_1,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000014070 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014071 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010014072 .prepare_access = prepare_memory_access,
14073 .finish_access = finish_memory_access,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000014074 },
14075
14076 {
14077 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014078 .name = "Pm29F002T",
14079 .bustype = BUS_PARALLEL,
14080 .manufacture_id = PMC_ID_NOPREFIX,
14081 .model_id = PMC_PM29F002T,
14082 .total_size = 256,
14083 .page_size = 8 * 1024,
14084 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
14085 .tested = TEST_OK_PREW,
14086 .probe = probe_jedec,
14087 .probe_timing = TIMING_FIXME,
14088 .block_erasers =
14089 {
14090 {
14091 .eraseblocks = {
14092 {128 * 1024, 1},
14093 {96 * 1024, 1},
14094 {8 * 1024, 2},
14095 {16 * 1024, 1},
14096 },
14097 .block_erase = erase_sector_jedec,
14098 }, {
14099 .eraseblocks = { {256 * 1024, 1} },
14100 .block_erase = erase_chip_block_jedec,
14101 },
14102 },
14103 .write = write_jedec_1,
14104 .read = read_memmapped,
14105 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010014106 .prepare_access = prepare_memory_access,
14107 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014108 },
14109
14110 {
14111 .vendor = "PMC",
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000014112 .name = "Pm39LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014113 .bustype = BUS_PARALLEL,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000014114 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014115 .model_id = PMC_PM39F010, /* Pm39LV010 and Pm39F010 have identical IDs but different voltage */
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000014116 .total_size = 128,
14117 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000014118 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000014119 .tested = TEST_OK_PREW,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000014120 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000014121 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson5643c072010-01-19 03:23:07 +000014122 .block_erasers =
14123 {
14124 {
14125 .eraseblocks = { {4 * 1024, 32} },
14126 .block_erase = erase_sector_jedec,
14127 }, {
14128 .eraseblocks = { {64 * 1024, 2} },
14129 .block_erase = erase_block_jedec,
14130 }, {
14131 .eraseblocks = { {128 * 1024, 1} },
14132 .block_erase = erase_chip_block_jedec,
14133 }
14134 },
Sean Nelson35727f72010-01-28 23:55:12 +000014135 .write = write_jedec_1,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000014136 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014137 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010014138 .prepare_access = prepare_memory_access,
14139 .finish_access = finish_memory_access,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000014140 },
14141
14142 {
14143 .vendor = "PMC",
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014144 .name = "Pm39LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014145 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014146 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014147 .model_id = PMC_PM39LV020,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014148 .total_size = 256,
14149 .page_size = 4096,
14150 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
14151 .tested = TEST_UNTESTED,
14152 .probe = probe_jedec,
14153 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100014154 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014155 {
14156 {
14157 .eraseblocks = { {4 * 1024, 64} },
14158 .block_erase = erase_sector_jedec,
14159 }, {
14160 .eraseblocks = { {64 * 1024, 4} },
14161 .block_erase = erase_block_jedec,
14162 }, {
14163 .eraseblocks = { {256 * 1024, 1} },
14164 .block_erase = erase_chip_block_jedec,
14165 }
14166 },
14167 .write = write_jedec_1,
14168 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014169 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010014170 .prepare_access = prepare_memory_access,
14171 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014172 },
14173
14174 {
14175 .vendor = "PMC",
14176 .name = "Pm39LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014177 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014178 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014179 .model_id = PMC_PM39LV040,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014180 .total_size = 512,
14181 .page_size = 4096,
14182 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000014183 .tested = TEST_OK_PR,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014184 .probe = probe_jedec,
14185 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100014186 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014187 {
14188 {
14189 .eraseblocks = { {4 * 1024, 128} },
14190 .block_erase = erase_sector_jedec,
14191 }, {
14192 .eraseblocks = { {64 * 1024, 8} },
14193 .block_erase = erase_block_jedec,
14194 }, {
14195 .eraseblocks = { {512 * 1024, 1} },
14196 .block_erase = erase_chip_block_jedec,
14197 }
14198 },
14199 .write = write_jedec_1,
14200 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014201 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010014202 .prepare_access = prepare_memory_access,
14203 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014204 },
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000014205
14206 {
14207 .vendor = "PMC",
14208 .name = "Pm39LV512",
14209 .bustype = BUS_PARALLEL,
14210 .manufacture_id = PMC_ID_NOPREFIX,
14211 .model_id = PMC_PM39LV512,
14212 .total_size = 64,
14213 .page_size = 4096,
14214 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
14215 .tested = TEST_OK_PREW,
14216 .probe = probe_jedec,
14217 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
14218 .block_erasers =
14219 {
14220 {
14221 .eraseblocks = { {4 * 1024, 16} },
14222 .block_erase = erase_sector_jedec,
14223 }, {
14224 .eraseblocks = { {64 * 1024, 1} },
14225 .block_erase = erase_block_jedec,
14226 }, {
14227 .eraseblocks = { {64 * 1024, 1} },
14228 .block_erase = erase_chip_block_jedec,
14229 }
14230 },
14231 .write = write_jedec_1,
14232 .read = read_memmapped,
14233 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010014234 .prepare_access = prepare_memory_access,
14235 .finish_access = finish_memory_access,
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000014236 },
14237
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000014238 {
14239 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014240 .name = "Pm49FL002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014241 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014242 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014243 .model_id = PMC_PM49FL002,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014244 .total_size = 256,
14245 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010014246 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014247 .tested = TEST_OK_PR,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000014248 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000014249 .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */
Sean Nelson5643c072010-01-19 03:23:07 +000014250 .block_erasers =
14251 {
14252 {
14253 .eraseblocks = { {4 * 1024, 64} },
14254 .block_erase = erase_sector_jedec,
14255 }, {
14256 .eraseblocks = { {16 * 1024, 16} },
14257 .block_erase = erase_block_jedec,
14258 }, {
14259 .eraseblocks = { {256 * 1024, 1} },
14260 .block_erase = erase_chip_block_jedec,
14261 }
14262 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014263 .unlock = unlock_regspace2_uniform_32k,
Sean Nelson36172342010-02-27 18:01:15 +000014264 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000014265 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014266 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010014267 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010014268 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000014269 },
14270
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014271 {
14272 .vendor = "PMC",
14273 .name = "Pm49FL004",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014274 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014275 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000014276 .model_id = PMC_PM49FL004,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014277 .total_size = 512,
14278 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010014279 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000014280 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000014281 .probe = probe_jedec,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000014282 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000014283 .block_erasers =
14284 {
14285 {
14286 .eraseblocks = { {4 * 1024, 128} },
14287 .block_erase = erase_sector_jedec,
14288 }, {
14289 .eraseblocks = { {64 * 1024, 8} },
14290 .block_erase = erase_block_jedec,
14291 }, {
14292 .eraseblocks = { {512 * 1024, 1} },
14293 .block_erase = erase_chip_block_jedec,
14294 }
14295 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000014296 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson36172342010-02-27 18:01:15 +000014297 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000014298 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000014299 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010014300 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010014301 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000014302 },
14303
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014304 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014305 .vendor = "SST",
Idwer Volleringf3607d12014-05-07 15:25:04 +000014306 .name = "SST25LF020A",
14307 .bustype = BUS_SPI,
14308 .manufacture_id = SST_ID,
14309 .model_id = SST_SST25VF020_REMS,
14310 .total_size = 256,
14311 .page_size = 256,
14312 .feature_bits = FEATURE_WRSR_EWSR,
14313 .tested = TEST_OK_PREW,
14314 .probe = probe_spi_rems,
14315 .probe_timing = TIMING_ZERO,
14316 .block_erasers =
14317 {
14318 {
14319 .eraseblocks = { {4 * 1024, 64} },
14320 .block_erase = spi_block_erase_20,
14321 }, {
14322 .eraseblocks = { {32 * 1024, 8} },
14323 .block_erase = spi_block_erase_52,
14324 }, {
14325 .eraseblocks = { {256 * 1024, 1} },
14326 .block_erase = spi_block_erase_60,
14327 },
14328 },
14329 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14330 .unlock = spi_disable_blockprotect,
14331 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14332 .read = spi_chip_read, /* Fast read (0x0B) supported */
14333 .voltage = {2700, 3600},
14334 },
14335
14336 {
14337 .vendor = "SST",
Zeus Castro33670ba2011-08-17 09:50:11 +000014338 .name = "SST25LF040A",
14339 .bustype = BUS_SPI,
14340 .manufacture_id = SST_ID,
14341 .model_id = SST_SST25VF040_REMS,
14342 .total_size = 512,
14343 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000014344 .feature_bits = FEATURE_WRSR_EWSR,
Uwe Hermann4335ec82011-09-07 20:20:25 +000014345 .tested = TEST_OK_PREW,
Zeus Castro33670ba2011-08-17 09:50:11 +000014346 .probe = probe_spi_res2,
14347 .probe_timing = TIMING_ZERO,
14348 .block_erasers =
14349 {
14350 {
14351 .eraseblocks = { {4 * 1024, 128} },
14352 .block_erase = spi_block_erase_20,
14353 }, {
14354 .eraseblocks = { {32 * 1024, 16} },
14355 .block_erase = spi_block_erase_52,
14356 }, {
14357 .eraseblocks = { {512 * 1024, 1} },
14358 .block_erase = spi_block_erase_60,
14359 },
14360 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014361 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000014362 .unlock = spi_disable_blockprotect,
14363 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14364 .read = spi_chip_read,
14365 .voltage = {3000, 3600},
14366 },
14367
14368 {
14369 .vendor = "SST",
Stefan Taunere34e3e82013-01-01 00:06:51 +000014370 .name = "SST25LF080(A)",
Zeus Castro33670ba2011-08-17 09:50:11 +000014371 .bustype = BUS_SPI,
14372 .manufacture_id = SST_ID,
14373 .model_id = SST_SST25VF080_REMS,
14374 .total_size = 1024,
14375 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000014376 .feature_bits = FEATURE_WRSR_EITHER,
Zeus Castro33670ba2011-08-17 09:50:11 +000014377 .tested = TEST_UNTESTED,
14378 .probe = probe_spi_res2,
14379 .probe_timing = TIMING_ZERO,
14380 .block_erasers =
14381 {
14382 {
14383 .eraseblocks = { {4 * 1024, 256} },
14384 .block_erase = spi_block_erase_20,
14385 }, {
14386 .eraseblocks = { {32 * 1024, 32} },
14387 .block_erase = spi_block_erase_52,
14388 }, {
14389 .eraseblocks = { {1024 * 1024, 1} },
14390 .block_erase = spi_block_erase_60,
14391 },
14392 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014393 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000014394 .unlock = spi_disable_blockprotect,
14395 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14396 .read = spi_chip_read,
14397 .voltage = {3000, 3600},
14398 },
14399
14400 {
14401 .vendor = "SST",
Stefan Tauner6697f712014-08-06 15:09:15 +000014402 .name = "SST25VF010(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014403 .bustype = BUS_SPI,
Mark Marshall90021f22010-12-03 14:48:11 +000014404 .manufacture_id = SST_ID,
14405 .model_id = SST_SST25VF010_REMS,
14406 .total_size = 128,
14407 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000014408 .feature_bits = FEATURE_WRSR_EWSR,
Mark Marshall90021f22010-12-03 14:48:11 +000014409 .tested = TEST_OK_PREW,
14410 .probe = probe_spi_rems,
14411 .probe_timing = TIMING_ZERO,
14412 .block_erasers =
14413 {
14414 {
14415 .eraseblocks = { {4 * 1024, 32} },
14416 .block_erase = spi_block_erase_20,
14417 }, {
14418 .eraseblocks = { {32 * 1024, 4} },
14419 .block_erase = spi_block_erase_52,
14420 }, {
Cory Henderson370f5822013-10-19 23:09:16 +000014421 .eraseblocks = { {32 * 1024, 4} },
Stefan Tauner6697f712014-08-06 15:09:15 +000014422 .block_erase = spi_block_erase_d8, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014423 }, {
Mark Marshall90021f22010-12-03 14:48:11 +000014424 .eraseblocks = { {128 * 1024, 1} },
14425 .block_erase = spi_block_erase_60,
Cory Henderson370f5822013-10-19 23:09:16 +000014426 }, {
14427 .eraseblocks = { {128 * 1024, 1} },
Stefan Tauner6697f712014-08-06 15:09:15 +000014428 .block_erase = spi_block_erase_c7, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014429 },
14430 },
14431 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14432 .unlock = spi_disable_blockprotect,
14433 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
Stefan Tauner6697f712014-08-06 15:09:15 +000014434 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000014435 .voltage = {2700, 3600},
14436 },
14437
14438 {
14439 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014440 .name = "SST25VF016B",
14441 .bustype = BUS_SPI,
14442 .manufacture_id = SST_ID,
14443 .model_id = SST_SST25VF016B,
14444 .total_size = 2048,
14445 .page_size = 256,
14446 .feature_bits = FEATURE_WRSR_EITHER,
14447 .tested = TEST_OK_PREW,
14448 .probe = probe_spi_rdid,
14449 .probe_timing = TIMING_ZERO,
14450 .block_erasers =
14451 {
14452 {
14453 .eraseblocks = { {4 * 1024, 512} },
14454 .block_erase = spi_block_erase_20,
14455 }, {
14456 .eraseblocks = { {32 * 1024, 64} },
14457 .block_erase = spi_block_erase_52,
14458 }, {
14459 .eraseblocks = { {64 * 1024, 32} },
14460 .block_erase = spi_block_erase_d8,
14461 }, {
14462 .eraseblocks = { {2 * 1024 * 1024, 1} },
14463 .block_erase = spi_block_erase_60,
14464 }, {
14465 .eraseblocks = { {2 * 1024 * 1024, 1} },
14466 .block_erase = spi_block_erase_c7,
14467 },
14468 },
14469 .printlock = spi_prettyprint_status_register_sst25vf016,
14470 .unlock = spi_disable_blockprotect,
14471 .write = spi_aai_write,
14472 .read = spi_chip_read,
14473 .voltage = {2700, 3600},
14474 },
14475
14476 {
14477 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014478 .name = "SST25VF020",
14479 .bustype = BUS_SPI,
14480 .manufacture_id = SST_ID,
14481 .model_id = SST_SST25VF020_REMS,
14482 .total_size = 256,
14483 .page_size = 256,
14484 .feature_bits = FEATURE_WRSR_EWSR,
14485 .tested = TEST_UNTESTED,
14486 .probe = probe_spi_rems,
14487 .probe_timing = TIMING_ZERO,
14488 .block_erasers =
14489 {
14490 {
14491 .eraseblocks = { {4 * 1024, 64} },
14492 .block_erase = spi_block_erase_20,
14493 }, {
14494 .eraseblocks = { {32 * 1024, 8} },
14495 .block_erase = spi_block_erase_52,
14496 }, {
14497 .eraseblocks = { {256 * 1024, 1} },
14498 .block_erase = spi_block_erase_60,
14499 },
14500 },
14501 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14502 .unlock = spi_disable_blockprotect,
14503 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14504 .read = spi_chip_read, /* only */
14505 .voltage = {2700, 3600},
14506 },
14507
14508 {
14509 .vendor = "SST",
14510 .name = "SST25VF020B",
14511 .bustype = BUS_SPI,
14512 .manufacture_id = SST_ID,
14513 .model_id = SST_SST25VF020B,
14514 .total_size = 256,
14515 .page_size = 256,
14516 .feature_bits = FEATURE_WRSR_EWSR,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000014517 .tested = TEST_OK_PREW,
Cory Henderson370f5822013-10-19 23:09:16 +000014518 .probe = probe_spi_rdid,
14519 .probe_timing = TIMING_ZERO,
14520 .block_erasers =
14521 {
14522 {
14523 .eraseblocks = { {4 * 1024, 64} },
14524 .block_erase = spi_block_erase_20,
14525 }, {
14526 .eraseblocks = { {32 * 1024, 8} },
14527 .block_erase = spi_block_erase_52,
14528 }, {
14529 .eraseblocks = { {64 * 1024, 4} },
14530 .block_erase = spi_block_erase_d8,
14531 }, {
14532 .eraseblocks = { {256 * 1024, 1} },
14533 .block_erase = spi_block_erase_60,
14534 }, {
14535 .eraseblocks = { {256 * 1024, 1} },
14536 .block_erase = spi_block_erase_c7,
14537 },
14538 },
14539 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 and 2nd SR */
14540 .unlock = spi_disable_blockprotect, /* FIXME: 2nd SR */
14541 .write = spi_aai_write, /* AAI supported (0xAD) */
14542 .read = spi_chip_read, /* Fast read (0x0B) supported */
14543 .voltage = {2700, 3600},
14544 },
14545
14546 {
14547 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014548 .name = "SST25VF032B",
14549 .bustype = BUS_SPI,
14550 .manufacture_id = SST_ID,
14551 .model_id = SST_SST25VF032B,
14552 .total_size = 4096,
14553 .page_size = 256,
14554 .feature_bits = FEATURE_WRSR_EWSR,
14555 .tested = TEST_OK_PREW,
14556 .probe = probe_spi_rdid,
14557 .probe_timing = TIMING_ZERO,
14558 .block_erasers =
14559 {
14560 {
14561 .eraseblocks = { {4 * 1024, 1024} },
14562 .block_erase = spi_block_erase_20,
14563 }, {
14564 .eraseblocks = { {32 * 1024, 128} },
14565 .block_erase = spi_block_erase_52,
14566 }, {
14567 .eraseblocks = { {64 * 1024, 64} },
14568 .block_erase = spi_block_erase_d8,
14569 }, {
14570 .eraseblocks = { {4 * 1024 * 1024, 1} },
14571 .block_erase = spi_block_erase_60,
14572 }, {
14573 .eraseblocks = { {4 * 1024 * 1024, 1} },
14574 .block_erase = spi_block_erase_c7,
14575 },
14576 },
14577 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14578 .unlock = spi_disable_blockprotect,
14579 .write = spi_aai_write,
14580 .read = spi_chip_read,
14581 .voltage = {2700, 3600},
14582 },
14583
14584 {
14585 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014586 .name = "SST25VF040",
14587 .bustype = BUS_SPI,
14588 .manufacture_id = SST_ID,
14589 .model_id = SST_SST25VF040_REMS,
14590 .total_size = 512,
14591 .page_size = 256,
14592 .feature_bits = FEATURE_WRSR_EWSR,
14593 .tested = TEST_OK_PR,
14594 .probe = probe_spi_rems,
14595 .probe_timing = TIMING_ZERO,
14596 .block_erasers =
14597 {
14598 {
14599 .eraseblocks = { {4 * 1024, 128} },
14600 .block_erase = spi_block_erase_20,
14601 }, {
14602 .eraseblocks = { {32 * 1024, 16} },
14603 .block_erase = spi_block_erase_52,
14604 }, {
14605 .eraseblocks = { {512 * 1024, 1} },
14606 .block_erase = spi_block_erase_60,
Mark Marshall90021f22010-12-03 14:48:11 +000014607 },
14608 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000014609 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Mark Marshall90021f22010-12-03 14:48:11 +000014610 .unlock = spi_disable_blockprotect,
Cory Henderson370f5822013-10-19 23:09:16 +000014611 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14612 .read = spi_chip_read,
14613 .voltage = {2700, 3600},
14614 },
14615
14616 {
14617 .vendor = "SST",
14618 .name = "SST25VF040B",
14619 .bustype = BUS_SPI,
14620 .manufacture_id = SST_ID,
14621 .model_id = SST_SST25VF040B,
14622 .total_size = 512,
14623 .page_size = 256,
14624 .feature_bits = FEATURE_WRSR_EWSR,
14625 .tested = TEST_OK_PREW,
14626 .probe = probe_spi_rdid,
14627 .probe_timing = TIMING_ZERO,
14628 .block_erasers =
14629 {
14630 {
14631 .eraseblocks = { {4 * 1024, 128} },
14632 .block_erase = spi_block_erase_20,
14633 }, {
14634 .eraseblocks = { {32 * 1024, 16} },
14635 .block_erase = spi_block_erase_52,
14636 }, {
14637 .eraseblocks = { {64 * 1024, 8} },
14638 .block_erase = spi_block_erase_d8,
14639 }, {
14640 .eraseblocks = { {512 * 1024, 1} },
14641 .block_erase = spi_block_erase_60,
14642 }, {
14643 .eraseblocks = { {512 * 1024, 1} },
14644 .block_erase = spi_block_erase_c7,
14645 },
14646 },
14647 .printlock = spi_prettyprint_status_register_sst25vf040b,
14648 .unlock = spi_disable_blockprotect,
14649 .write = spi_aai_write, /* AAI supported (0xAD) */
14650 .read = spi_chip_read, /* Fast read (0x0B) supported */
14651 .voltage = {2700, 3600},
14652 },
14653
14654 {
14655 .vendor = "SST",
14656 .name = "SST25VF040B.REMS",
14657 .bustype = BUS_SPI,
14658 .manufacture_id = SST_ID,
14659 .model_id = SST_SST25VF040B_REMS,
14660 .total_size = 512,
14661 .page_size = 256,
14662 .feature_bits = FEATURE_WRSR_EWSR,
14663 .tested = TEST_OK_PREW,
14664 .probe = probe_spi_rems,
14665 .probe_timing = TIMING_ZERO,
14666 .block_erasers =
14667 {
14668 {
14669 .eraseblocks = { {4 * 1024, 128} },
14670 .block_erase = spi_block_erase_20,
14671 }, {
14672 .eraseblocks = { {32 * 1024, 16} },
14673 .block_erase = spi_block_erase_52,
14674 }, {
14675 .eraseblocks = { {64 * 1024, 8} },
14676 .block_erase = spi_block_erase_d8,
14677 }, {
14678 .eraseblocks = { {512 * 1024, 1} },
14679 .block_erase = spi_block_erase_60,
14680 }, {
14681 .eraseblocks = { {512 * 1024, 1} },
14682 .block_erase = spi_block_erase_c7,
14683 },
14684 },
14685 .printlock = spi_prettyprint_status_register_sst25vf040b,
14686 .unlock = spi_disable_blockprotect,
14687 .write = spi_aai_write,
14688 .read = spi_chip_read,
14689 .voltage = {2700, 3600},
14690 },
14691
14692 {
14693 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014694 .name = "SST25VF064C",
Ben Gardnerbcf61092015-11-22 02:23:31 +000014695 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014696 .manufacture_id = SST_ID,
14697 .model_id = SST_SST25VF064C,
14698 .total_size = 8192,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014699 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014700 .feature_bits = FEATURE_WRSR_EWSR,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014701 .tested = TEST_OK_PREW,
14702 .probe = probe_spi_rdid,
14703 .probe_timing = TIMING_ZERO,
14704 .block_erasers =
14705 {
14706 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014707 .eraseblocks = { {4 * 1024, 2048} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014708 .block_erase = spi_block_erase_20,
14709 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014710 .eraseblocks = { {32 * 1024, 256} },
14711 .block_erase = spi_block_erase_52,
14712 }, {
14713 .eraseblocks = { {64 * 1024, 128} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014714 .block_erase = spi_block_erase_d8,
14715 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014716 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014717 .block_erase = spi_block_erase_60,
14718 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100014719 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000014720 .block_erase = spi_block_erase_c7,
14721 },
14722 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100014723 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14724 .unlock = spi_disable_blockprotect,
Ben Gardnerbcf61092015-11-22 02:23:31 +000014725 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014726 .read = spi_chip_read,
14727 .voltage = {2700, 3600},
Ben Gardnerbcf61092015-11-22 02:23:31 +000014728 },
14729
14730 {
14731 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000014732 .name = "SST25VF080B",
14733 .bustype = BUS_SPI,
14734 .manufacture_id = SST_ID,
14735 .model_id = SST_SST25VF080B,
14736 .total_size = 1024,
14737 .page_size = 256,
14738 .feature_bits = FEATURE_WRSR_EWSR,
14739 .tested = TEST_OK_PREW,
14740 .probe = probe_spi_rdid,
14741 .probe_timing = TIMING_ZERO,
14742 .block_erasers =
14743 {
14744 {
14745 .eraseblocks = { {4 * 1024, 256} },
14746 .block_erase = spi_block_erase_20,
14747 }, {
14748 .eraseblocks = { {32 * 1024, 32} },
14749 .block_erase = spi_block_erase_52,
14750 }, {
14751 .eraseblocks = { {64 * 1024, 16} },
14752 .block_erase = spi_block_erase_d8,
14753 }, {
14754 .eraseblocks = { {1024 * 1024, 1} },
14755 .block_erase = spi_block_erase_60,
14756 }, {
14757 .eraseblocks = { {1024 * 1024, 1} },
14758 .block_erase = spi_block_erase_c7,
14759 },
14760 },
14761 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
14762 .unlock = spi_disable_blockprotect,
14763 .write = spi_aai_write,
Mark Marshall90021f22010-12-03 14:48:11 +000014764 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +000014765 .voltage = {2700, 3600},
Mark Marshall90021f22010-12-03 14:48:11 +000014766 },
14767
14768 {
14769 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014770 .name = "SST25VF512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000014771 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014772 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100014773 .model_id = SST_SST25VF512_REMS,
14774 .total_size = 64,
14775 .page_size = 256,
14776 .feature_bits = FEATURE_WRSR_EWSR,
14777 .tested = TEST_OK_PREW,
14778 .probe = probe_spi_rems,
14779 .probe_timing = TIMING_ZERO,
14780 .block_erasers =
14781 {
14782 {
14783 .eraseblocks = { {4 * 1024, 16} },
14784 .block_erase = spi_block_erase_20,
14785 }, {
14786 .eraseblocks = { {32 * 1024, 2} },
14787 .block_erase = spi_block_erase_52,
14788 }, {
14789 .eraseblocks = { {32 * 1024, 2} },
14790 .block_erase = spi_block_erase_d8, /* Supported by SST25VF512A only */
14791 }, {
14792 .eraseblocks = { {64 * 1024, 1} },
14793 .block_erase = spi_block_erase_60,
14794 }, {
14795 .eraseblocks = { {64 * 1024, 1} },
14796 .block_erase = spi_block_erase_c7, /* Supported by SST25VF512A only */
14797 },
14798 },
14799 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
14800 .unlock = spi_disable_blockprotect,
14801 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
14802 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF512A only */
14803 .voltage = {2700, 3600},
14804 },
14805
14806 {
14807 .vendor = "SST",
14808 .name = "SST25WF010",
14809 .bustype = BUS_SPI,
14810 .manufacture_id = SST_ID,
14811 .model_id = SST_SST25WF010,
14812 .total_size = 128,
14813 .page_size = 256,
14814 .feature_bits = FEATURE_WRSR_EITHER,
14815 .tested = TEST_UNTESTED,
14816 .probe = probe_spi_rdid,
14817 .probe_timing = TIMING_ZERO,
14818 .block_erasers =
14819 {
14820 {
14821 .eraseblocks = { {4 * 1024, 32} },
14822 .block_erase = spi_block_erase_20,
14823 }, {
14824 .eraseblocks = { {32 * 1024, 4} },
14825 .block_erase = spi_block_erase_52,
14826 }, {
14827 .eraseblocks = { {1024 * 128, 1} },
14828 .block_erase = spi_block_erase_60,
14829 }, {
14830 .eraseblocks = { {1024 * 128, 1} },
14831 .block_erase = spi_block_erase_c7,
14832 },
14833 },
14834 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14835 .unlock = spi_disable_blockprotect_bp2_srwd,
14836 .write = spi_aai_write,
14837 .read = spi_chip_read, /* Fast read (0x0B) supported */
14838 .voltage = {1650, 1950},
14839 },
14840
14841 {
14842 .vendor = "SST",
14843 .name = "SST25WF020",
14844 .bustype = BUS_SPI,
14845 .manufacture_id = SST_ID,
14846 .model_id = SST_SST25WF020,
14847 .total_size = 256,
14848 .page_size = 256,
14849 .feature_bits = FEATURE_WRSR_EITHER,
14850 .tested = TEST_UNTESTED,
14851 .probe = probe_spi_rdid,
14852 .probe_timing = TIMING_ZERO,
14853 .block_erasers =
14854 {
14855 {
14856 .eraseblocks = { {4 * 1024, 64} },
14857 .block_erase = spi_block_erase_20,
14858 }, {
14859 .eraseblocks = { {32 * 1024, 8} },
14860 .block_erase = spi_block_erase_52,
14861 }, {
14862 .eraseblocks = { {64 * 1024, 4} },
14863 .block_erase = spi_block_erase_d8,
14864 }, {
14865 .eraseblocks = { {1024 * 256, 1} },
14866 .block_erase = spi_block_erase_60,
14867 }, {
14868 .eraseblocks = { {1024 * 256, 1} },
14869 .block_erase = spi_block_erase_c7,
14870 },
14871 },
14872 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14873 .unlock = spi_disable_blockprotect_bp2_srwd,
14874 .write = spi_aai_write,
14875 .read = spi_chip_read, /* Fast read (0x0B) supported */
14876 .voltage = {1650, 1950},
14877 },
14878
14879 {
14880 .vendor = "SST",
14881 .name = "SST25WF020A",
14882 .bustype = BUS_SPI,
14883 .manufacture_id = SANYO_ID, /* See flashchips.h */
14884 .model_id = SST_SST25WF020A,
14885 .total_size = 256,
14886 .page_size = 256,
14887 .feature_bits = FEATURE_WRSR_WREN,
14888 .tested = TEST_UNTESTED,
14889 .probe = probe_spi_rdid,
14890 .probe_timing = TIMING_ZERO,
14891 .block_erasers =
14892 {
14893 {
14894 .eraseblocks = { {4 * 1024, 64} },
14895 .block_erase = spi_block_erase_20,
14896 }, {
14897 .eraseblocks = { {64 * 1024, 4} },
14898 .block_erase = spi_block_erase_d8,
14899 }, {
14900 .eraseblocks = { {256 * 1024, 1} },
14901 .block_erase = spi_block_erase_60,
14902 }, {
14903 .eraseblocks = { {256 * 1024, 1} },
14904 .block_erase = spi_block_erase_c7,
14905 },
14906 },
14907 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14908 .unlock = spi_disable_blockprotect_bp2_srwd,
14909 .write = spi_chip_write_256,
14910 .read = spi_chip_read, /* Fast read (0x0B) supported */
14911 .voltage = {1650, 1950},
14912 },
14913
14914 {
14915 .vendor = "SST",
14916 .name = "SST25WF040",
14917 .bustype = BUS_SPI,
14918 .manufacture_id = SST_ID,
14919 .model_id = SST_SST25WF040,
14920 .total_size = 512,
14921 .page_size = 256,
14922 .feature_bits = FEATURE_WRSR_EITHER,
14923 .tested = TEST_UNTESTED,
14924 .probe = probe_spi_rdid,
14925 .probe_timing = TIMING_ZERO,
14926 .block_erasers =
14927 {
14928 {
14929 .eraseblocks = { {4 * 1024, 128} },
14930 .block_erase = spi_block_erase_20,
14931 }, {
14932 .eraseblocks = { {32 * 1024, 16} },
14933 .block_erase = spi_block_erase_52,
14934 }, {
14935 .eraseblocks = { {64 * 1024, 8} },
14936 .block_erase = spi_block_erase_d8,
14937 }, {
14938 .eraseblocks = { {1024 * 512, 1} },
14939 .block_erase = spi_block_erase_60,
14940 }, {
14941 .eraseblocks = { {1024 * 512, 1} },
14942 .block_erase = spi_block_erase_c7,
14943 },
14944 },
14945 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
14946 .unlock = spi_disable_blockprotect_bp2_srwd,
14947 .write = spi_aai_write,
14948 .read = spi_chip_read, /* Fast read (0x0B) supported */
14949 .voltage = {1650, 1950},
14950 },
14951
14952 {
14953 .vendor = "SST",
14954 .name = "SST25WF040B",
14955 .bustype = BUS_SPI,
14956 .manufacture_id = SANYO_ID, /* See flashchips.h */
14957 .model_id = SST_SST25WF040B,
14958 .total_size = 512,
14959 .page_size = 256,
14960 .feature_bits = FEATURE_WRSR_WREN,
14961 .tested = TEST_UNTESTED,
14962 .probe = probe_spi_rdid,
14963 .probe_timing = TIMING_ZERO,
14964 .block_erasers =
14965 {
14966 {
14967 .eraseblocks = { {4 * 1024, 128} },
14968 .block_erase = spi_block_erase_20,
14969 }, {
14970 .eraseblocks = { {64 * 1024, 8} },
14971 .block_erase = spi_block_erase_d8,
14972 }, {
14973 .eraseblocks = { {512 * 1024, 1} },
14974 .block_erase = spi_block_erase_60,
14975 }, {
14976 .eraseblocks = { {512 * 1024, 1} },
14977 .block_erase = spi_block_erase_c7,
14978 },
14979 },
14980 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
14981 .unlock = spi_disable_blockprotect_bp2_srwd,
14982 .write = spi_chip_write_256,
14983 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
14984 .voltage = {1650, 1950},
14985 },
14986
14987 {
14988 .vendor = "SST",
14989 .name = "SST25WF080",
14990 .bustype = BUS_SPI,
14991 .manufacture_id = SST_ID,
14992 .model_id = SST_SST25WF080,
14993 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014994 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000014995 .feature_bits = FEATURE_WRSR_EITHER,
Mark Marshall90021f22010-12-03 14:48:11 +000014996 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000014997 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000014998 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000014999 .block_erasers =
15000 {
15001 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100015002 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000015003 .block_erase = spi_block_erase_20,
15004 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100015005 .eraseblocks = { {32 * 1024, 32} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000015006 .block_erase = spi_block_erase_52,
15007 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100015008 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000015009 .block_erase = spi_block_erase_d8,
15010 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100015011 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000015012 .block_erase = spi_block_erase_60,
15013 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100015014 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000015015 .block_erase = spi_block_erase_c7,
15016 },
15017 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100015018 .printlock = spi_prettyprint_status_register_sst25, /* *does* have a BP3 but it is useless */
15019 .unlock = spi_disable_blockprotect_bp3_srwd,
Joshua Roys87955bf2011-08-01 18:39:28 +000015020 .write = spi_aai_write,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015021 .read = spi_chip_read, /* Fast read (0x0B) supported */
15022 .voltage = {1650, 1950},
FENG yu ningff692fb2008-12-08 18:15:10 +000015023 },
15024
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015025 {
15026 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015027 .name = "SST25WF080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015028 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015029 .manufacture_id = SANYO_ID, /* See flashchips.h */
15030 .model_id = SST_SST25WF080B,
15031 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015032 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015033 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerfcf6a8c2011-05-18 01:32:00 +000015034 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015035 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000015036 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000015037 .block_erasers =
15038 {
15039 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100015040 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000015041 .block_erase = spi_block_erase_20,
15042 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100015043 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000015044 .block_erase = spi_block_erase_d8,
15045 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100015046 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000015047 .block_erase = spi_block_erase_60,
15048 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100015049 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000015050 .block_erase = spi_block_erase_c7,
15051 },
15052 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100015053 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
15054 .unlock = spi_disable_blockprotect_bp2_srwd,
Helge Wagner1db7a442010-10-05 22:29:08 +000015055 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015056 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
15057 .voltage = {1650, 1950},
15058 },
15059
15060 {
15061 .vendor = "SST",
15062 .name = "SST25WF512",
15063 .bustype = BUS_SPI,
15064 .manufacture_id = SST_ID,
15065 .model_id = SST_SST25WF512,
15066 .total_size = 64,
15067 .page_size = 256,
15068 .feature_bits = FEATURE_WRSR_EITHER,
15069 .tested = TEST_UNTESTED,
15070 .probe = probe_spi_rdid,
15071 .probe_timing = TIMING_ZERO,
15072 .block_erasers =
15073 {
15074 {
15075 .eraseblocks = { {4 * 1024, 16} },
15076 .block_erase = spi_block_erase_20,
15077 }, {
15078 .eraseblocks = { {32 * 1024, 2} },
15079 .block_erase = spi_block_erase_52,
15080 }, {
15081 .eraseblocks = { {1024 * 64, 1} },
15082 .block_erase = spi_block_erase_60,
15083 }, {
15084 .eraseblocks = { {1024 * 64, 1} },
15085 .block_erase = spi_block_erase_c7,
15086 },
15087 },
15088 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
15089 .unlock = spi_disable_blockprotect_bp2_srwd,
15090 .write = spi_aai_write,
15091 .read = spi_chip_read, /* Fast read (0x0B) supported */
15092 .voltage = {1650, 1950},
Ed Swierk86f4e6d2010-07-21 15:02:22 +000015093 },
15094
15095 {
15096 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010015097 .name = "SST26VF016",
15098 .bustype = BUS_SPI,
15099 .manufacture_id = SST_ID,
15100 .model_id = SST_SST26VF016,
15101 .total_size = 2048,
15102 .page_size = 256,
15103 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15104 .tested = TEST_UNTESTED,
15105 .probe = probe_spi_rdid,
15106 .probe_timing = TIMING_ZERO,
15107 .block_erasers =
15108 {
15109 {
15110 .eraseblocks = { {4 * 1024, 512} },
15111 .block_erase = spi_block_erase_20,
15112 }, {
15113 .eraseblocks = {
15114 {8 * 1024, 4},
15115 {32 * 1024, 1},
15116 {64 * 1024, 30},
15117 {32 * 1024, 1},
15118 {8 * 1024, 4},
15119 },
15120 .block_erase = spi_block_erase_d8,
15121 }, {
15122 .eraseblocks = { {2 * 1024 * 1024, 1} },
15123 .block_erase = spi_block_erase_c7,
15124 },
15125 },
15126 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
15127 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15128 .write = spi_chip_write_256, /* Multi I/O supported */
15129 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15130 .voltage = {2700, 3600},
15131 },
15132
15133 {
15134 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070015135 .name = "SST26VF016B(A)",
15136 .bustype = BUS_SPI,
15137 .manufacture_id = SST_ID,
15138 .model_id = SST_SST26VF016B,
15139 .total_size = 2048,
15140 .page_size = 256,
15141 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15142 .tested = TEST_OK_PREW,
15143 .probe = probe_spi_rdid,
15144 .probe_timing = TIMING_ZERO,
15145 .block_erasers =
15146 {
15147 {
15148 .eraseblocks = { {4 * 1024, 512} },
15149 .block_erase = spi_block_erase_20,
15150 }, {
15151 .eraseblocks = {
15152 {8 * 1024, 4},
15153 {32 * 1024, 1},
15154 {64 * 1024, 30},
15155 {32 * 1024, 1},
15156 {8 * 1024, 4},
15157 },
15158 .block_erase = spi_block_erase_d8,
15159 }, {
15160 .eraseblocks = { {2 * 1024 * 1024, 1} },
15161 .block_erase = spi_block_erase_c7,
15162 },
15163 },
15164 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
15165 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15166 .write = spi_chip_write_256, /* Multi I/O supported */
15167 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15168 .voltage = {2700, 3600},
15169 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100015170
Wei Hu25584de2018-04-30 14:02:08 -070015171 {
15172 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010015173 .name = "SST26VF032",
15174 .bustype = BUS_SPI,
15175 .manufacture_id = SST_ID,
15176 .model_id = SST_SST26VF032,
15177 .total_size = 4096,
15178 .page_size = 256,
15179 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15180 .tested = TEST_UNTESTED,
15181 .probe = probe_spi_rdid,
15182 .probe_timing = TIMING_ZERO,
15183 .block_erasers =
15184 {
15185 {
15186 .eraseblocks = { {4 * 1024, 1024} },
15187 .block_erase = spi_block_erase_20,
15188 }, {
15189 .eraseblocks = {
15190 {8 * 1024, 4},
15191 {32 * 1024, 1},
15192 {64 * 1024, 62},
15193 {32 * 1024, 1},
15194 {8 * 1024, 4},
15195 },
15196 .block_erase = spi_block_erase_d8,
15197 }, {
15198 .eraseblocks = { {4 * 1024 * 1024, 1} },
15199 .block_erase = spi_block_erase_c7,
15200 },
15201 },
15202 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
15203 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15204 .write = spi_chip_write_256, /* Multi I/O supported */
15205 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15206 .voltage = {2700, 3600},
15207 },
15208
15209 {
15210 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070015211 .name = "SST26VF032B(A)",
15212 .bustype = BUS_SPI,
15213 .manufacture_id = SST_ID,
15214 .model_id = SST_SST26VF032B,
15215 .total_size = 4096,
15216 .page_size = 256,
15217 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15218 .tested = TEST_UNTESTED,
15219 .probe = probe_spi_rdid,
15220 .probe_timing = TIMING_ZERO,
15221 .block_erasers =
15222 {
15223 {
15224 .eraseblocks = { {4 * 1024, 1024} },
15225 .block_erase = spi_block_erase_20,
15226 }, {
15227 .eraseblocks = {
15228 {8 * 1024, 4},
15229 {32 * 1024, 1},
15230 {64 * 1024, 62},
15231 {32 * 1024, 1},
15232 {8 * 1024, 4},
15233 },
15234 .block_erase = spi_block_erase_d8,
15235 }, {
15236 .eraseblocks = { {4 * 1024 * 1024, 1} },
15237 .block_erase = spi_block_erase_c7,
15238 },
15239 },
15240 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
15241 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15242 .write = spi_chip_write_256, /* Multi I/O supported */
15243 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15244 .voltage = {2700, 3600},
15245 },
15246
Wei Hu25584de2018-04-30 14:02:08 -070015247 {
15248 .vendor = "SST",
15249 .name = "SST26VF064B(A)",
15250 .bustype = BUS_SPI,
15251 .manufacture_id = SST_ID,
15252 .model_id = SST_SST26VF064B,
15253 .total_size = 8192,
15254 .page_size = 256,
15255 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15256 .tested = TEST_OK_PREW,
15257 .probe = probe_spi_rdid,
15258 .probe_timing = TIMING_ZERO,
15259 .block_erasers =
15260 {
15261 {
15262 .eraseblocks = { {4 * 1024, 2048} },
15263 .block_erase = spi_block_erase_20,
15264 }, {
15265 .eraseblocks = {
15266 {8 * 1024, 4},
15267 {32 * 1024, 1},
15268 {64 * 1024, 126},
15269 {32 * 1024, 1},
15270 {8 * 1024, 4},
15271 },
15272 .block_erase = spi_block_erase_d8,
15273 }, {
15274 .eraseblocks = { {8 * 1024 * 1024, 1} },
15275 .block_erase = spi_block_erase_c7,
15276 },
15277 },
15278 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
15279 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15280 .write = spi_chip_write_256, /* Multi I/O supported */
15281 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15282 .voltage = {2700, 3600},
15283 },
15284
15285 {
15286 .vendor = "SST",
Nico Huberd4e41d32024-10-18 14:59:54 +020015287 .name = "SST26VF080A",
15288 .bustype = BUS_SPI,
15289 .manufacture_id = SST_ID,
15290 .model_id = SST_SST26VF080A,
15291 .total_size = 1024,
15292 .page_size = 256,
15293 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15294 .tested = TEST_UNTESTED,
15295 .probe = probe_spi_rdid,
15296 .probe_timing = TIMING_ZERO,
15297 .block_erasers =
15298 {
15299 {
15300 .eraseblocks = { {4 * 1024, 256} },
15301 .block_erase = spi_block_erase_20,
15302 }, {
15303 .eraseblocks = { {32 * 1024, 32} },
15304 .block_erase = spi_block_erase_52,
15305 }, {
15306 .eraseblocks = { {64 * 1024, 16} },
15307 .block_erase = spi_block_erase_d8,
15308 }, {
15309 .eraseblocks = { {1024 * 1024, 1} },
15310 .block_erase = spi_block_erase_60,
15311 }, {
15312 .eraseblocks = { {1024 * 1024, 1} },
15313 .block_erase = spi_block_erase_c7,
15314 },
15315 },
15316 .printlock = spi_prettyprint_status_register_bp3_srwd,
15317 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
15318 .write = spi_chip_write_256, /* Multi I/O supported */
15319 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15320 .voltage = {2700, 3600},
15321 },
15322
15323 {
15324 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015325 .name = "SST28SF040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015326 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015327 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015328 .model_id = SST_SST28SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015329 .total_size = 512,
15330 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000015331 .feature_bits = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015332 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015333 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015334 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst28sf040.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015335 .block_erasers =
15336 {
15337 {
15338 .eraseblocks = { {128, 4096} },
15339 .block_erase = erase_sector_28sf040,
15340 }, {
15341 .eraseblocks = { {512 * 1024, 1} },
15342 .block_erase = erase_chip_28sf040,
15343 }
15344 },
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015345 .unlock = unprotect_28sf040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015346 .write = write_28sf040,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015347 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015348 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015349 .prepare_access = prepare_memory_access,
15350 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015351 },
15352
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015353 {
15354 .vendor = "SST",
15355 .name = "SST29EE010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015356 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015357 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015358 .model_id = SST_SST29EE010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015359 .total_size = 128,
15360 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015361 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015362 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015363 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015364 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015365 .block_erasers =
15366 {
15367 {
15368 .eraseblocks = { {128 * 1024, 1} },
15369 .block_erase = erase_chip_block_jedec,
15370 }
15371 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015372 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015373 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015374 .voltage = {4500, 5500},
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",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015381 .name = "SST29EE020A",
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_SST29EE020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015385 .total_size = 256,
15386 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015387 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015388 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015389 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000015390 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015391 .block_erasers =
15392 {
15393 {
15394 .eraseblocks = { {256 * 1024, 1} },
15395 .block_erase = erase_chip_block_jedec,
15396 }
15397 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015398 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015399 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015400 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015401 .prepare_access = prepare_memory_access,
15402 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015403 },
15404
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015405 {
15406 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015407 .name = "SST29LE010",
15408 .bustype = BUS_PARALLEL,
15409 .manufacture_id = SST_ID,
15410 .model_id = SST_SST29LE010,
15411 .total_size = 128,
15412 .page_size = 128,
15413 .feature_bits = FEATURE_LONG_RESET,
15414 .tested = TEST_UNTESTED,
15415 .probe = probe_jedec,
15416 .probe_timing = 10,
15417 .block_erasers =
15418 {
15419 {
15420 .eraseblocks = { {128 * 1024, 1} },
15421 .block_erase = erase_chip_block_jedec,
15422 }
15423 },
15424 .write = write_jedec,
15425 .read = read_memmapped,
15426 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015427 .prepare_access = prepare_memory_access,
15428 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015429 },
15430
15431 {
15432 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015433 .name = "SST29LE020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015434 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015435 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015436 .model_id = SST_SST29LE020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015437 .total_size = 256,
15438 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000015439 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000015440 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015441 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000015442 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015443 .block_erasers =
15444 {
15445 {
15446 .eraseblocks = { {256 * 1024, 1} },
15447 .block_erase = erase_chip_block_jedec,
15448 }
15449 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015450 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015451 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015452 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015453 .prepare_access = prepare_memory_access,
15454 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015455 },
15456
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015457 {
15458 .vendor = "SST",
15459 .name = "SST39SF010A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015460 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015461 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015462 .model_id = SST_SST39SF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015463 .total_size = 128,
15464 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015465 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000015466 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015467 .probe = probe_jedec,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000015468 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015469 .block_erasers =
15470 {
15471 {
15472 .eraseblocks = { {4 * 1024, 32} },
15473 .block_erase = erase_sector_jedec,
15474 }, {
15475 .eraseblocks = { {128 * 1024, 1} },
15476 .block_erase = erase_chip_block_jedec,
15477 }
15478 },
Sean Nelson35727f72010-01-28 23:55:12 +000015479 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015480 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015481 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015482 .prepare_access = prepare_memory_access,
15483 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015484 },
15485
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015486 {
15487 .vendor = "SST",
15488 .name = "SST39SF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015489 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015490 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015491 .model_id = SST_SST39SF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015492 .total_size = 256,
15493 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015494 .feature_bits = FEATURE_EITHER_RESET,
Uwe Hermann19f46f22011-06-18 22:56:14 +000015495 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015496 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015497 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015498 .block_erasers =
15499 {
15500 {
15501 .eraseblocks = { {4 * 1024, 64} },
15502 .block_erase = erase_sector_jedec,
15503 }, {
15504 .eraseblocks = { {256 * 1024, 1} },
15505 .block_erase = erase_chip_block_jedec,
15506 }
15507 },
Sean Nelson35727f72010-01-28 23:55:12 +000015508 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015509 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015510 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015511 .prepare_access = prepare_memory_access,
15512 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015513 },
15514
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015515 {
15516 .vendor = "SST",
15517 .name = "SST39SF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015518 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015519 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015520 .model_id = SST_SST39SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015521 .total_size = 512,
15522 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015523 .feature_bits = FEATURE_EITHER_RESET,
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000015524 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015525 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015526 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015527 .block_erasers =
15528 {
15529 {
15530 .eraseblocks = { {4 * 1024, 128} },
15531 .block_erase = erase_sector_jedec,
15532 }, {
15533 .eraseblocks = { {512 * 1024, 1} },
15534 .block_erase = erase_chip_block_jedec,
15535 }
15536 },
Sean Nelson35727f72010-01-28 23:55:12 +000015537 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015538 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015539 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015540 .prepare_access = prepare_memory_access,
15541 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015542 },
15543
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015544 {
15545 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015546 .name = "SST39SF512",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015547 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015548 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015549 .model_id = SST_SST39SF512,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015550 .total_size = 64,
15551 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015552 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd7d423b2012-10-20 09:13:16 +000015553 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015554 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015555 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015556 .block_erasers =
15557 {
15558 {
15559 .eraseblocks = { {4 * 1024, 16} },
15560 .block_erase = erase_sector_jedec,
15561 }, {
15562 .eraseblocks = { {64 * 1024, 1} },
15563 .block_erase = erase_chip_block_jedec,
15564 }
15565 },
Sean Nelson35727f72010-01-28 23:55:12 +000015566 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015567 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015568 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015569 .prepare_access = prepare_memory_access,
15570 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015571 },
15572
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015573 {
15574 .vendor = "SST",
15575 .name = "SST39VF010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015576 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015577 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015578 .model_id = SST_SST39VF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015579 .total_size = 128,
15580 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015581 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd94d25d2012-07-28 03:17:15 +000015582 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015583 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015584 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015585 .block_erasers =
15586 {
15587 {
15588 .eraseblocks = { {4 * 1024, 32} },
15589 .block_erase = erase_sector_jedec,
15590 }, {
15591 .eraseblocks = { {128 * 1024, 1} },
15592 .block_erase = erase_chip_block_jedec,
15593 }
15594 },
Sean Nelson35727f72010-01-28 23:55:12 +000015595 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015596 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015597 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015598 .prepare_access = prepare_memory_access,
15599 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015600 },
15601
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015602 {
15603 .vendor = "SST",
15604 .name = "SST39VF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015605 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015606 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015607 .model_id = SST_SST39VF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015608 .total_size = 256,
15609 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015610 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner5c316f92015-02-08 21:57:52 +000015611 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015612 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015613 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015614 .block_erasers =
15615 {
15616 {
15617 .eraseblocks = { {4 * 1024, 64} },
15618 .block_erase = erase_sector_jedec,
15619 }, {
15620 .eraseblocks = { {256 * 1024, 1} },
15621 .block_erase = erase_chip_block_jedec,
15622 }
15623 },
Sean Nelson35727f72010-01-28 23:55:12 +000015624 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015625 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015626 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015627 .prepare_access = prepare_memory_access,
15628 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015629 },
15630
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015631 {
15632 .vendor = "SST",
15633 .name = "SST39VF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015634 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015635 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015636 .model_id = SST_SST39VF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015637 .total_size = 512,
15638 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015639 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015640 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015641 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015642 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015643 .block_erasers =
15644 {
15645 {
15646 .eraseblocks = { {4 * 1024, 128} },
15647 .block_erase = erase_sector_jedec,
15648 }, {
15649 .eraseblocks = { {512 * 1024, 1} },
15650 .block_erase = erase_chip_block_jedec,
15651 }
15652 },
Sean Nelson35727f72010-01-28 23:55:12 +000015653 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015654 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015655 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015656 .prepare_access = prepare_memory_access,
15657 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger90eff152008-12-08 23:51:45 +000015658 },
FENG yu ningff692fb2008-12-08 18:15:10 +000015659
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015660 {
15661 .vendor = "SST",
Peter Stuge8440cc02009-01-25 23:55:12 +000015662 .name = "SST39VF080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015663 .bustype = BUS_PARALLEL,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000015664 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015665 .model_id = SST_SST39VF080,
Peter Stuge8440cc02009-01-25 23:55:12 +000015666 .total_size = 1024,
15667 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000015668 .feature_bits = FEATURE_EITHER_RESET,
Peter Stuge8440cc02009-01-25 23:55:12 +000015669 .tested = TEST_UNTESTED,
15670 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015671 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015672 .block_erasers =
15673 {
15674 {
15675 .eraseblocks = { {4 * 1024, 256} },
15676 .block_erase = erase_sector_jedec,
15677 }, {
15678 .eraseblocks = { {64 * 1024, 16} },
15679 .block_erase = erase_block_jedec,
15680 }, {
15681 .eraseblocks = { {1024 * 1024, 1} },
15682 .block_erase = erase_chip_block_jedec,
15683 }
15684 },
Sean Nelson35727f72010-01-28 23:55:12 +000015685 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015686 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015687 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015688 .prepare_access = prepare_memory_access,
15689 .finish_access = finish_memory_access,
Peter Stuge8440cc02009-01-25 23:55:12 +000015690 },
15691
15692 {
15693 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015694 .name = "SST39VF512",
15695 .bustype = BUS_PARALLEL,
15696 .manufacture_id = SST_ID,
15697 .model_id = SST_SST39VF512,
15698 .total_size = 64,
15699 .page_size = 4096,
15700 .feature_bits = FEATURE_EITHER_RESET,
15701 .tested = TEST_OK_PREW,
15702 .probe = probe_jedec,
15703 .probe_timing = 1, /* 150 ns */
15704 .block_erasers =
15705 {
15706 {
15707 .eraseblocks = { {4 * 1024, 16} },
15708 .block_erase = erase_sector_jedec,
15709 }, {
15710 .eraseblocks = { {64 * 1024, 1} },
15711 .block_erase = erase_chip_block_jedec,
15712 }
15713 },
15714 .write = write_jedec_1,
15715 .read = read_memmapped,
15716 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015717 .prepare_access = prepare_memory_access,
15718 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100015719 },
15720
15721 {
15722 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015723 .name = "SST49LF002A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015724 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015725 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015726 .model_id = SST_SST49LF002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015727 .total_size = 256,
15728 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015729 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000015730 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015731 .probe = probe_jedec,
15732 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015733 .block_erasers =
15734 {
15735 {
15736 .eraseblocks = { {4 * 1024, 64} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015737 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015738 }, {
15739 .eraseblocks = { {16 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015740 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015741 }, {
15742 .eraseblocks = { {256 * 1024, 1} },
15743 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15744 }
15745 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015746 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015747 .unlock = unlock_sst_fwhub,
15748 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015749 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015750 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015751 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015752 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015753 },
15754
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015755 {
15756 .vendor = "SST",
15757 .name = "SST49LF003A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015758 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015759 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015760 .model_id = SST_SST49LF003A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015761 .total_size = 384,
15762 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015763 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000015764 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015765 .probe = probe_jedec,
15766 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015767 .block_erasers =
15768 {
15769 {
15770 .eraseblocks = { {4 * 1024, 96} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015771 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015772 }, {
15773 .eraseblocks = { {64 * 1024, 6} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015774 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015775 }, {
15776 .eraseblocks = { {384 * 1024, 1} },
15777 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15778 }
15779 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015780 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015781 .unlock = unlock_sst_fwhub,
15782 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015783 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015784 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015785 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015786 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015787 },
15788
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015789 {
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015790 /* Contrary to the data sheet, TBL# on the SST49LF004B affects the top 128kB (instead of 64kB)
15791 * and is only honored for 64k block erase, but not 4k sector erase.
15792 */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015793 .vendor = "SST",
15794 .name = "SST49LF004A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015795 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015796 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015797 .model_id = SST_SST49LF004A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015798 .total_size = 512,
15799 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015800 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000015801 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015802 .probe = probe_jedec,
15803 .probe_timing = 1, /* 150 ns */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015804 .block_erasers =
15805 {
15806 {
15807 .eraseblocks = { {4 * 1024, 128} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015808 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015809 }, {
15810 .eraseblocks = { {64 * 1024, 8} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015811 .block_erase = erase_block_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015812 }, {
15813 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson51c83fb2010-01-20 20:55:53 +000015814 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000015815 },
15816 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015817 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015818 .unlock = unlock_sst_fwhub,
15819 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015820 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015821 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015822 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015823 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015824 },
15825
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015826 {
15827 .vendor = "SST",
15828 .name = "SST49LF004C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015829 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015830 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015831 .model_id = SST_SST49LF004C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015832 .total_size = 512,
15833 .page_size = 4 * 1024,
15834 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015835 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015836 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015837 .block_erasers =
15838 {
15839 {
15840 .eraseblocks = { {4 * 1024, 128} },
15841 .block_erase = erase_sector_49lfxxxc,
15842 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015843 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015844 {64 * 1024, 7},
15845 {32 * 1024, 1},
15846 {8 * 1024, 2},
15847 {16 * 1024, 1},
15848 },
Sean Nelson69e58112010-03-23 17:10:28 +000015849 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015850 }
15851 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015852 .printlock = printlock_regspace2_block_eraser_1,
15853 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015854 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015855 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015856 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015857 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015858 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015859 },
15860
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015861 {
15862 .vendor = "SST",
15863 .name = "SST49LF008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015864 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015865 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015866 .model_id = SST_SST49LF008A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015867 .total_size = 1024,
15868 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010015869 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000015870 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015871 .probe = probe_jedec,
15872 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015873 .block_erasers =
15874 {
15875 {
15876 .eraseblocks = { {4 * 1024, 256} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015877 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015878 }, {
15879 .eraseblocks = { {64 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015880 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015881 }, {
15882 .eraseblocks = { {1024 * 1024, 1} },
15883 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
15884 }
15885 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015886 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000015887 .unlock = unlock_sst_fwhub,
15888 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015889 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015890 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015891 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015892 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015893 },
15894
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015895 {
15896 .vendor = "SST",
15897 .name = "SST49LF008C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015898 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015899 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015900 .model_id = SST_SST49LF008C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015901 .total_size = 1024,
15902 .page_size = 4 * 1024,
15903 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015904 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015905 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015906 .block_erasers =
15907 {
15908 {
15909 .eraseblocks = { {4 * 1024, 256} },
15910 .block_erase = erase_sector_49lfxxxc,
15911 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015912 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015913 {64 * 1024, 15},
15914 {32 * 1024, 1},
15915 {8 * 1024, 2},
15916 {16 * 1024, 1},
15917 },
Sean Nelson69e58112010-03-23 17:10:28 +000015918 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015919 }
15920 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015921 .printlock = printlock_regspace2_block_eraser_1,
15922 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015923 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015924 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015925 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015926 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015927 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015928 },
15929
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015930 {
15931 .vendor = "SST",
15932 .name = "SST49LF016C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015933 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015934 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015935 .model_id = SST_SST49LF016C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015936 .total_size = 2048,
15937 .page_size = 4 * 1024,
Stefan Tauner23e10b82016-01-23 16:16:49 +000015938 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000015939 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000015940 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015941 .block_erasers =
15942 {
15943 {
15944 .eraseblocks = { {4 * 1024, 512} },
15945 .block_erase = erase_sector_49lfxxxc,
15946 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000015947 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000015948 {64 * 1024, 31},
15949 {32 * 1024, 1},
15950 {8 * 1024, 2},
15951 {16 * 1024, 1},
15952 },
Sean Nelson69e58112010-03-23 17:10:28 +000015953 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000015954 }
15955 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000015956 .printlock = printlock_regspace2_block_eraser_1,
15957 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000015958 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015959 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015960 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010015961 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010015962 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000015963 },
15964
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015965 {
15966 .vendor = "SST",
15967 .name = "SST49LF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015968 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015969 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000015970 .model_id = SST_SST49LF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015971 .total_size = 256,
15972 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000015973 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner8179be52011-06-04 13:13:34 +000015974 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015975 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000015976 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000015977 .block_erasers =
15978 {
15979 {
15980 .eraseblocks = { {4 * 1024, 64} },
15981 .block_erase = erase_sector_jedec,
15982 }, {
15983 .eraseblocks = { {16 * 1024, 16} },
15984 .block_erase = erase_block_jedec,
15985 }, {
15986 .eraseblocks = { {256 * 1024, 1} },
15987 .block_erase = NULL,
15988 }
15989 },
Sean Nelson35727f72010-01-28 23:55:12 +000015990 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000015991 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015992 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010015993 .prepare_access = prepare_memory_access,
15994 .finish_access = finish_memory_access,
Sven Schnellec208dfb2009-01-07 12:35:09 +000015995 },
15996
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000015997 {
15998 .vendor = "SST",
15999 .name = "SST49LF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016000 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016001 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016002 .model_id = SST_SST49LF020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016003 .total_size = 256,
Carl-Daniel Hailfingerda654322009-07-23 01:44:38 +000016004 .page_size = 4 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016005 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000016006 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016007 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000016008 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000016009 .block_erasers =
16010 {
16011 {
16012 .eraseblocks = { {4 * 1024, 64} },
16013 .block_erase = erase_sector_jedec,
16014 }, {
16015 .eraseblocks = { {16 * 1024, 16} },
16016 .block_erase = erase_block_jedec,
16017 }, {
16018 .eraseblocks = { {256 * 1024, 1} },
16019 .block_erase = NULL,
16020 }
16021 },
Sean Nelson35727f72010-01-28 23:55:12 +000016022 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016023 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016024 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016025 .prepare_access = prepare_memory_access,
16026 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016027 },
16028
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016029 {
16030 .vendor = "SST",
16031 .name = "SST49LF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016032 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016033 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016034 .model_id = SST_SST49LF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016035 .total_size = 512,
16036 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000016037 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000016038 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016039 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000016040 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000016041 .block_erasers =
16042 {
16043 {
16044 .eraseblocks = { {4 * 1024, 128} },
16045 .block_erase = erase_sector_jedec,
16046 }, {
16047 .eraseblocks = { {64 * 1024, 8} },
16048 .block_erase = erase_block_jedec,
16049 }, {
16050 .eraseblocks = { {512 * 1024, 1} },
16051 .block_erase = NULL,
16052 }
16053 },
Sean Nelson35727f72010-01-28 23:55:12 +000016054 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016055 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016056 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016057 .prepare_access = prepare_memory_access,
16058 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016059 },
16060
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016061 {
16062 .vendor = "SST",
16063 .name = "SST49LF040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016064 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016065 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016066 .model_id = SST_SST49LF040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016067 .total_size = 512,
16068 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010016069 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000016070 .tested = TEST_OK_PREW,
Sean Nelson51c83fb2010-01-20 20:55:53 +000016071 .probe = probe_jedec,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000016072 .probe_timing = 1, /* 150ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000016073 .block_erasers =
16074 {
16075 {
16076 .eraseblocks = { {4 * 1024, 128} },
16077 .block_erase = erase_sector_jedec,
16078 }, {
16079 .eraseblocks = { {64 * 1024, 8} },
16080 .block_erase = erase_block_jedec,
16081 }, {
16082 .eraseblocks = { {512 * 1024, 1} },
16083 .block_erase = NULL,
16084 }
16085 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016086 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000016087 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016088 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016089 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010016090 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016091 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016092 },
16093
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016094 {
16095 .vendor = "SST",
16096 .name = "SST49LF080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016097 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016098 .manufacture_id = SST_ID,
Elyes HAOUAS124ef382018-03-27 12:15:09 +020016099 .model_id = SST_SST49LF080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016100 .total_size = 1024,
16101 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000016102 .feature_bits = FEATURE_EITHER_RESET,
Brandon Dowdyf07bf322011-03-06 18:31:11 +000016103 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016104 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000016105 .probe_timing = TIMING_FIXME,
Sean Nelson51c83fb2010-01-20 20:55:53 +000016106 .block_erasers =
16107 {
16108 {
16109 .eraseblocks = { {4 * 1024, 256} },
16110 .block_erase = erase_sector_jedec,
16111 }, {
16112 .eraseblocks = { {64 * 1024, 16} },
16113 .block_erase = erase_block_jedec,
16114 }, {
16115 .eraseblocks = { {1024 * 1024, 1} },
16116 .block_erase = NULL,
16117 }
16118 },
Sean Nelson35727f72010-01-28 23:55:12 +000016119 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016120 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016121 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016122 .prepare_access = prepare_memory_access,
16123 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016124 },
16125
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016126 {
16127 .vendor = "SST",
16128 .name = "SST49LF160C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016129 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016130 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016131 .model_id = SST_SST49LF160C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016132 .total_size = 2048,
16133 .page_size = 4 * 1024,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016134 .tested = TEST_OK_PR,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000016135 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016136 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000016137 .block_erasers =
16138 {
16139 {
16140 .eraseblocks = { {4 * 1024, 512} },
16141 .block_erase = erase_sector_49lfxxxc,
16142 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000016143 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000016144 {64 * 1024, 31},
16145 {32 * 1024, 1},
16146 {8 * 1024, 2},
16147 {16 * 1024, 1},
16148 },
Sean Nelson69e58112010-03-23 17:10:28 +000016149 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000016150 }
16151 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016152 .printlock = printlock_regspace2_block_eraser_1,
16153 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000016154 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016155 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016156 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010016157 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016158 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016159 },
16160
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016161 {
16162 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016163 .name = "M29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016164 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016165 .manufacture_id = ST_ID,
16166 .model_id = ST_M29F002B,
16167 .total_size = 256,
16168 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016169 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016170 .tested = TEST_UNTESTED,
16171 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016172 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016173 .block_erasers =
16174 {
16175 {
16176 .eraseblocks = {
16177 {16 * 1024, 1},
16178 {8 * 1024, 2},
16179 {32 * 1024, 1},
16180 {64 * 1024, 3},
16181 },
16182 .block_erase = erase_sector_jedec,
16183 }, {
16184 .eraseblocks = { {256 * 1024, 1} },
16185 .block_erase = erase_chip_block_jedec,
16186 }
16187 },
Sean Nelson35727f72010-01-28 23:55:12 +000016188 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016189 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000016190 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010016191 .prepare_access = prepare_memory_access,
16192 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016193 },
16194
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016195 {
16196 .vendor = "ST",
16197 .name = "M29F002T/NT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016198 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016199 .manufacture_id = ST_ID,
16200 .model_id = ST_M29F002T,
16201 .total_size = 256,
16202 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016203 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stefan Taunere34e3e82013-01-01 00:06:51 +000016204 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016205 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016206 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016207 .block_erasers =
16208 {
16209 {
16210 .eraseblocks = {
16211 {64 * 1024, 3},
16212 {32 * 1024, 1},
16213 {8 * 1024, 2},
16214 {16 * 1024, 1},
16215 },
16216 .block_erase = erase_sector_jedec,
16217 }, {
16218 .eraseblocks = { {256 * 1024, 1} },
16219 .block_erase = erase_chip_block_jedec,
16220 }
16221 },
Sean Nelson35727f72010-01-28 23:55:12 +000016222 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016223 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000016224 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010016225 .prepare_access = prepare_memory_access,
16226 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016227 },
16228
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016229 {
16230 .vendor = "ST",
16231 .name = "M29F040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016232 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016233 .manufacture_id = ST_ID,
16234 .model_id = ST_M29F040B,
16235 .total_size = 512,
16236 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016237 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
16238 .tested = TEST_UNTESTED,
16239 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000016240 .probe_timing = TIMING_ZERO, /* datasheet specifies no timing */
Sean Nelson56358aa2010-01-19 16:08:51 +000016241 .block_erasers =
16242 {
16243 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016244 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000016245 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016246 }, {
16247 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000016248 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016249 }
16250 },
Sean Nelson35727f72010-01-28 23:55:12 +000016251 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016252 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016253 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016254 .prepare_access = prepare_memory_access,
16255 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016256 },
16257
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016258 {
Sean Nelson35727f72010-01-28 23:55:12 +000016259 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016260 .vendor = "ST",
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016261 .name = "M29F400BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016262 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016263 .manufacture_id = ST_ID,
16264 .model_id = ST_M29F400BB,
16265 .total_size = 512,
16266 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016267 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000016268 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016269 .probe = probe_jedec,
16270 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016271 .block_erasers =
16272 {
16273 {
16274 .eraseblocks = {
16275 {16 * 1024, 1},
16276 {8 * 1024, 2},
16277 {32 * 1024, 1},
16278 {64 * 1024, 7},
16279 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016280 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016281 }, {
16282 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016283 .block_erase = erase_chip_block_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016284 }
16285 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016286 .write = write_jedec_1,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016287 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016288 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016289 .prepare_access = prepare_memory_access,
16290 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016291 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100016292
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000016293 {
16294 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
16295 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016296 .name = "M29F400BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016297 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016298 .manufacture_id = ST_ID,
16299 .model_id = ST_M29F400BT,
16300 .total_size = 512,
16301 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016302 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016303 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016304 .probe = probe_jedec,
16305 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson56358aa2010-01-19 16:08:51 +000016306 .block_erasers =
16307 {
16308 {
16309 .eraseblocks = {
16310 {64 * 1024, 7},
16311 {32 * 1024, 1},
16312 {8 * 1024, 2},
16313 {16 * 1024, 1},
16314 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016315 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016316 }, {
16317 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016318 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000016319 }
16320 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000016321 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016322 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016323 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016324 .prepare_access = prepare_memory_access,
16325 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016326 },
16327
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016328 {
16329 .vendor = "ST",
16330 .name = "M29W010B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016331 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016332 .manufacture_id = ST_ID,
16333 .model_id = ST_M29W010B,
16334 .total_size = 128,
16335 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016336 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016337 .tested = TEST_UNTESTED,
16338 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016339 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016340 .block_erasers =
16341 {
16342 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016343 .eraseblocks = { {16 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000016344 .block_erase = erase_sector_jedec,
16345 }, {
16346 .eraseblocks = { {128 * 1024, 1} },
16347 .block_erase = erase_chip_block_jedec,
16348 }
16349 },
Sean Nelson35727f72010-01-28 23:55:12 +000016350 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016351 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016352 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016353 .prepare_access = prepare_memory_access,
16354 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016355 },
16356
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016357 {
16358 .vendor = "ST",
16359 .name = "M29W040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016360 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016361 .manufacture_id = ST_ID,
16362 .model_id = ST_M29W040B,
16363 .total_size = 512,
16364 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016365 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016366 .tested = TEST_UNTESTED,
16367 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016368 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016369 .block_erasers =
16370 {
16371 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016372 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000016373 .block_erase = erase_sector_jedec,
16374 }, {
16375 .eraseblocks = { {512 * 1024, 1} },
16376 .block_erase = erase_chip_block_jedec,
16377 }
16378 },
Sean Nelson35727f72010-01-28 23:55:12 +000016379 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016380 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016381 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016382 .prepare_access = prepare_memory_access,
16383 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016384 },
16385
Stefan Taunereb582572012-09-21 12:52:50 +000016386 {
16387 .vendor = "ST",
16388 .name = "M29W512B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016389 .bustype = BUS_PARALLEL,
Alan Greenfa3fcd32019-06-27 15:41:50 +100016390 .manufacture_id = ST_ID,
Stefan Taunereb582572012-09-21 12:52:50 +000016391 .model_id = ST_M29W512B,
16392 .total_size = 64,
16393 .page_size = 64 * 1024,
16394 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stefan Tauner0554ca52013-07-25 22:54:25 +000016395 .tested = TEST_OK_PREW,
Stefan Taunereb582572012-09-21 12:52:50 +000016396 .probe = probe_jedec,
16397 .probe_timing = TIMING_ZERO,
16398 .block_erasers =
16399 {
16400 {
16401 .eraseblocks = { {64 * 1024, 1} },
16402 .block_erase = erase_chip_block_jedec,
16403 }
16404 },
16405 .write = write_jedec_1,
16406 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016407 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016408 .prepare_access = prepare_memory_access,
16409 .finish_access = finish_memory_access,
Stefan Taunereb582572012-09-21 12:52:50 +000016410 },
Jeffrey A. Kentba7c9222010-02-01 05:49:46 +000016411
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016412 {
16413 .vendor = "ST",
16414 .name = "M50FLW040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016415 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016416 .manufacture_id = ST_ID,
16417 .model_id = ST_M50FLW040A,
16418 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016419 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016420 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016421 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016422 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016423 .block_erasers =
16424 {
16425 {
Sean Nelson329bde72010-01-19 16:39:19 +000016426 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016427 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016428 {64 * 1024, 5}, /* block */
16429 {4 * 1024, 16}, /* sector */
16430 {4 * 1024, 16}, /* sector */
16431 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016432 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016433 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016434 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016435 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016436 }
16437 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016438 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100016439 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016440 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016441 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016442 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016443 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016444 },
16445
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016446 {
16447 .vendor = "ST",
16448 .name = "M50FLW040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016449 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016450 .manufacture_id = ST_ID,
16451 .model_id = ST_M50FLW040B,
16452 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016453 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016454 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016455 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016456 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016457 .block_erasers =
16458 {
16459 {
Sean Nelson329bde72010-01-19 16:39:19 +000016460 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016461 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016462 {4 * 1024, 16}, /* sector */
16463 {64 * 1024, 5}, /* block */
16464 {4 * 1024, 16}, /* sector */
16465 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016466 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016467 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016468 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016469 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016470 }
16471 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016472 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100016473 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016474 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016475 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016476 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016477 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016478 },
16479
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016480 {
16481 .vendor = "ST",
16482 .name = "M50FLW080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016483 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016484 .manufacture_id = ST_ID,
16485 .model_id = ST_M50FLW080A,
16486 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016487 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016488 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000016489 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016490 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016491 .block_erasers =
16492 {
16493 {
Sean Nelson329bde72010-01-19 16:39:19 +000016494 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016495 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016496 {64 * 1024, 13}, /* block */
16497 {4 * 1024, 16}, /* sector */
16498 {4 * 1024, 16}, /* sector */
16499 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016500 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016501 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016502 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016503 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016504 }
16505 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016506 .printlock = printlock_regspace2_block_eraser_0,
16507 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016508 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016509 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016510 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016511 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016512 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016513 },
16514
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016515 {
16516 .vendor = "ST",
16517 .name = "M50FLW080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016518 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016519 .manufacture_id = ST_ID,
16520 .model_id = ST_M50FLW080B,
16521 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016522 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016523 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016524 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000016525 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000016526 .block_erasers =
16527 {
16528 {
Sean Nelson329bde72010-01-19 16:39:19 +000016529 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000016530 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000016531 {4 * 1024, 16}, /* sector */
16532 {64 * 1024, 13}, /* block */
16533 {4 * 1024, 16}, /* sector */
16534 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000016535 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000016536 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000016537 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016538 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016539 }
16540 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016541 .printlock = printlock_regspace2_block_eraser_0,
16542 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016543 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016544 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016545 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016546 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016547 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016548 },
16549
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016550 {
16551 .vendor = "ST",
16552 .name = "M50FW002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016553 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016554 .manufacture_id = ST_ID,
16555 .model_id = ST_M50FW002,
16556 .total_size = 256,
Stefan Tauner4404f732013-09-12 08:28:56 +000016557 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016558 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000016559 .probe = probe_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016560 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016561 .block_erasers =
16562 {
16563 {
16564 .eraseblocks = {
16565 {64 * 1024, 3},
16566 {32 * 1024, 1},
16567 {8 * 1024, 2},
16568 {16 * 1024, 1},
16569 },
Sean Nelson28accc22010-03-19 18:47:06 +000016570 .block_erase = erase_block_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016571 }, {
Stefan Tauner5c316f92015-02-08 21:57:52 +000016572 .eraseblocks = { {256 * 1024, 1} },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016573 .block_erase = NULL, /* Only in A/A mux mode */
Sean Nelson56358aa2010-01-19 16:08:51 +000016574 }
16575 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016576 .printlock = printlock_regspace2_block_eraser_0,
16577 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016578 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016579 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016580 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016581 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016582 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016583 },
16584
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016585 {
16586 .vendor = "ST",
16587 .name = "M50FW016",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016588 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016589 .manufacture_id = ST_ID,
16590 .model_id = ST_M50FW016,
16591 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000016592 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016593 .tested = TEST_UNTESTED,
16594 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016595 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016596 .block_erasers =
16597 {
16598 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016599 .eraseblocks = { {64 * 1024, 32} },
Sean Nelson28accc22010-03-19 18:47:06 +000016600 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016601 }
16602 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016603 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016604 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016605 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016606 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016607 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016608 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016609 },
16610
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016611 {
16612 .vendor = "ST",
16613 .name = "M50FW040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016614 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016615 .manufacture_id = ST_ID,
16616 .model_id = ST_M50FW040,
16617 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000016618 .page_size = 0,
Sean Nelson28accc22010-03-19 18:47:06 +000016619 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016620 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016621 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016622 .block_erasers =
16623 {
16624 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016625 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000016626 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016627 }
16628 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016629 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016630 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016631 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016632 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016633 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016634 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016635 },
16636
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016637 {
16638 .vendor = "ST",
16639 .name = "M50FW080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016640 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016641 .manufacture_id = ST_ID,
16642 .model_id = ST_M50FW080,
16643 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000016644 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016645 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016646 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000016647 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000016648 .block_erasers =
16649 {
16650 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016651 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000016652 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016653 }
16654 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016655 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000016656 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016657 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016658 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016659 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016660 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016661 },
16662
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016663 {
16664 .vendor = "ST",
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016665 .name = "M50LPW080",
16666 .bustype = BUS_LPC, /* A/A Mux */
16667 .manufacture_id = ST_ID,
16668 .model_id = ST_M50LPW080,
16669 .total_size = 1024,
16670 .page_size = 0,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016671 .tested = TEST_UNTESTED,
16672 .probe = probe_82802ab,
16673 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
16674 .block_erasers =
16675 {
16676 {
Stefan Tauner6697f712014-08-06 15:09:15 +000016677 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016678 .block_erase = erase_block_82802ab,
16679 }
16680 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016681 .unlock = unlock_regspace2_uniform_64k,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016682 .write = write_82802ab,
16683 .read = read_memmapped,
16684 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016685 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016686 .finish_access = finish_memory_access,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000016687 },
16688
16689 {
16690 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016691 .name = "M50LPW116",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016692 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016693 .manufacture_id = ST_ID,
16694 .model_id = ST_M50LPW116,
16695 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000016696 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016697 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016698 .probe = probe_82802ab,
Udu Ogahc04ee222009-09-05 01:31:32 +000016699 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000016700 .block_erasers =
16701 {
16702 {
16703 .eraseblocks = {
16704 {4 * 1024, 16},
16705 {64 * 1024, 30},
16706 {32 * 1024, 1},
16707 {8 * 1024, 2},
16708 {16 * 1024, 1},
16709 },
Sean Nelson28accc22010-03-19 18:47:06 +000016710 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000016711 }
16712 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016713 .printlock = printlock_regspace2_block_eraser_0,
16714 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000016715 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016716 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016717 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010016718 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016719 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016720 },
16721
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016722 {
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030016723 .vendor = "ST",
16724 .name = "M95M02",
16725 .bustype = BUS_SPI,
16726 .manufacture_id = ST_ID,
16727 .model_id = ST_M95M02,
16728 .total_size = 256,
16729 .page_size = 256,
16730 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
16731 .tested = TEST_OK_PREW,
Nico Huber54557862023-05-15 12:01:04 +020016732 .spi_cmd_set = SPI95,
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030016733 .probe = probe_spi_st95,
16734 .probe_timing = TIMING_ZERO,
16735 .block_erasers =
16736 {
16737 {
16738 .eraseblocks = { {256 * 1024, 1} },
16739 .block_erase = spi_block_erase_emulation,
16740 }
16741 },
16742
16743 .printlock = spi_prettyprint_status_register_bp1_srwd,
16744 .unlock = spi_disable_blockprotect_bp1_srwd,
16745 .write = spi_chip_write_256,
16746 .read = spi_chip_read,
16747 .voltage = {2500, 5500},
16748 },
16749
16750 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100016751 .vendor = "Sanyo",
16752 .name = "LE25FU106B",
16753 .bustype = BUS_SPI,
16754 .manufacture_id = SANYO_ID,
16755 .model_id = SANYO_LE25FU106B,
16756 .total_size = 128,
16757 .page_size = 256,
16758 .feature_bits = FEATURE_WRSR_WREN,
16759 .tested = TEST_UNTESTED,
16760 .probe = probe_spi_res2,
16761 .probe_timing = TIMING_ZERO,
16762 .block_erasers =
16763 {
16764 /* FIXME: Is this correct?
16765 {
16766 .eraseblocks = { {2 * 1024, 64} },
16767 .block_erase = spi_block_erase_d7,
16768 },*/
16769 {
16770 .eraseblocks = { {32 * 1024, 4} },
16771 .block_erase = spi_block_erase_d8,
16772 }, {
16773 .eraseblocks = { {128 * 1024, 1} },
16774 .block_erase = spi_block_erase_c7,
16775 }
16776 },
16777 .printlock = spi_prettyprint_status_register_bp1_srwd,
16778 .unlock = spi_disable_blockprotect_bp1_srwd,
16779 .write = spi_chip_write_256,
16780 .read = spi_chip_read,
16781 .voltage = {2300, 3600},
16782 },
16783
16784 {
16785 .vendor = "Sanyo",
16786 .name = "LE25FU206",
16787 .bustype = BUS_SPI,
16788 .manufacture_id = SANYO_ID,
16789 .model_id = SANYO_LE25FU206,
16790 .total_size = 256,
16791 .page_size = 256,
16792 .feature_bits = FEATURE_WRSR_WREN,
16793 .tested = TEST_UNTESTED,
16794 .probe = probe_spi_res2,
16795 .probe_timing = TIMING_ZERO,
16796 .block_erasers =
16797 {
16798 {
16799 .eraseblocks = { {4 * 1024, 64} },
16800 .block_erase = spi_block_erase_d7,
16801 }, {
16802 .eraseblocks = { {64 * 1024, 4} },
16803 .block_erase = spi_block_erase_d8,
16804 }, {
16805 .eraseblocks = { {256 * 1024, 1} },
16806 .block_erase = spi_block_erase_c7,
16807 }
16808 },
16809 .printlock = spi_prettyprint_status_register_bp1_srwd,
16810 .unlock = spi_disable_blockprotect_bp1_srwd,
16811 .write = spi_chip_write_256,
16812 .read = spi_chip_read,
16813 .voltage = {2300, 3600},
16814 },
16815
16816 {
16817 .vendor = "Sanyo",
16818 .name = "LE25FU206A",
16819 .bustype = BUS_SPI,
16820 .manufacture_id = SANYO_ID,
16821 .model_id = SANYO_LE25FU206A,
16822 .total_size = 256,
16823 .page_size = 256,
16824 .tested = TEST_UNTESTED,
16825 .probe = probe_spi_rdid,
16826 .probe_timing = TIMING_ZERO,
16827 .block_erasers =
16828 {
16829 {
16830 .eraseblocks = { {4 * 1024, 64} },
16831 .block_erase = spi_block_erase_20,
16832 }, {
16833 .eraseblocks = { {4 * 1024, 64} },
16834 .block_erase = spi_block_erase_d7,
16835 }, {
16836 .eraseblocks = { {64 * 1024, 4} },
16837 .block_erase = spi_block_erase_d8,
16838 }, {
16839 .eraseblocks = { {256 * 1024, 1} },
16840 .block_erase = spi_block_erase_60,
16841 }, {
16842 .eraseblocks = { {256 * 1024, 1} },
16843 .block_erase = spi_block_erase_c7,
16844 }
16845 },
16846 .printlock = spi_prettyprint_status_register_bp2_srwd,
16847 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16848 .write = spi_chip_write_256,
16849 .read = spi_chip_read,
16850 .voltage = {2300, 3600},
16851 },
16852
16853 {
16854 .vendor = "Sanyo",
16855 .name = "LE25FU406B",
16856 .bustype = BUS_SPI,
16857 .manufacture_id = SANYO_ID,
16858 .model_id = SANYO_LE25FU406B,
16859 .total_size = 512,
16860 .page_size = 256,
16861 .feature_bits = FEATURE_WRSR_WREN,
16862 .tested = TEST_OK_PREW,
16863 .probe = probe_spi_res2,
16864 .probe_timing = TIMING_ZERO,
16865 .block_erasers =
16866 {
16867 {
16868 .eraseblocks = { {4 * 1024, 128} },
16869 .block_erase = spi_block_erase_d7,
16870 }, {
16871 .eraseblocks = { {64 * 1024, 8} },
16872 .block_erase = spi_block_erase_d8,
16873 }, {
16874 .eraseblocks = { {512 * 1024, 1} },
16875 .block_erase = spi_block_erase_c7,
16876 }
16877 },
16878 .printlock = spi_prettyprint_status_register_bp2_srwd,
16879 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
16880 .write = spi_chip_write_256,
16881 .read = spi_chip_read,
16882 .voltage = {2300, 3600},
16883 },
16884
16885 {
16886 .vendor = "Sanyo",
16887 .name = "LE25FU406C/LE25U40CMC",
16888 .bustype = BUS_SPI,
16889 .manufacture_id = SANYO_ID,
16890 .model_id = SANYO_LE25FU406C,
16891 .total_size = 512,
16892 .page_size = 256,
16893 .feature_bits = FEATURE_WRSR_WREN,
16894 .tested = TEST_OK_PREW,
16895 .probe = probe_spi_rdid,
16896 .probe_timing = TIMING_ZERO,
16897 .block_erasers =
16898 {
16899 {
16900 .eraseblocks = { {4 * 1024, 128} },
16901 .block_erase = spi_block_erase_20,
16902 }, {
16903 .eraseblocks = { {4 * 1024, 128} },
16904 .block_erase = spi_block_erase_d7,
16905 }, {
16906 .eraseblocks = { {64 * 1024, 8} },
16907 .block_erase = spi_block_erase_d8,
16908 }, {
16909 .eraseblocks = { {512 * 1024, 1} },
16910 .block_erase = spi_block_erase_60,
16911 }, {
16912 .eraseblocks = { {512 * 1024, 1} },
16913 .block_erase = spi_block_erase_c7,
16914 }
16915 },
16916 .printlock = spi_prettyprint_status_register_bp2_srwd,
16917 .unlock = spi_disable_blockprotect_bp2_srwd,
16918 .write = spi_chip_write_256,
16919 .read = spi_chip_read, /* Fast read (0x0B), dual read (0x3B) and dual I/O (0xBB) supported */
16920 .voltage = {2300, 3600},
16921 },
16922
16923 {
16924 .vendor = "Sanyo",
16925 .name = "LE25FW106",
16926 .bustype = BUS_SPI,
16927 .manufacture_id = SANYO_ID,
16928 .model_id = SANYO_LE25FW106,
16929 .total_size = 128,
16930 .page_size = 256,
16931 .feature_bits = FEATURE_WRSR_WREN,
16932 .tested = TEST_OK_PREW,
16933 .probe = probe_spi_res2,
16934 .probe_timing = TIMING_ZERO,
16935 .block_erasers =
16936 {
16937 {
16938 .eraseblocks = { {2 * 1024, 64} },
16939 .block_erase = spi_block_erase_d7,
16940 }, {
16941 .eraseblocks = { {32 * 1024, 4} },
16942 .block_erase = spi_block_erase_d8,
16943 }, {
16944 .eraseblocks = { {128 * 1024, 1} },
16945 .block_erase = spi_block_erase_c7,
16946 }
16947 },
16948 .printlock = spi_prettyprint_status_register_bp1_srwd, /* FIXME: Add ERSER error flag. */
16949 .unlock = spi_disable_blockprotect_bp1_srwd,
16950 .write = spi_chip_write_256,
16951 .read = spi_chip_read,
16952 .voltage = {2700, 3600},
16953 },
16954
16955 {
16956 .vendor = "Sanyo",
16957 .name = "LE25FW203A",
16958 .bustype = BUS_SPI,
16959 .manufacture_id = SANYO_ID,
16960 .model_id = SANYO_LE25FW203A,
16961 .total_size = 256,
16962 .page_size = 256,
16963 .tested = TEST_UNTESTED,
16964 .probe = probe_spi_rdid,
16965 .probe_timing = TIMING_ZERO,
16966 .block_erasers =
16967 {
16968 {
16969 .eraseblocks = { {256, 1024} },
16970 .block_erase = spi_block_erase_db,
16971 }, {
16972 .eraseblocks = { {64 * 1024, 4} },
16973 .block_erase = spi_block_erase_d8,
16974 }, {
16975 .eraseblocks = { {256 * 1024, 1} },
16976 .block_erase = spi_block_erase_c7,
16977 }
16978 },
16979 .printlock = spi_prettyprint_status_register_default_welwip,
16980 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
16981 .write = spi_chip_write_256,
16982 .read = spi_chip_read,
16983 .voltage = {2700, 3600},
16984 },
16985
16986 {
16987 .vendor = "Sanyo",
16988 .name = "LE25FW403A",
16989 .bustype = BUS_SPI,
16990 .manufacture_id = SANYO_ID,
16991 .model_id = SANYO_LE25FW403A,
16992 .total_size = 512,
16993 .page_size = 256,
16994 .tested = TEST_UNTESTED,
16995 .probe = probe_spi_rdid,
16996 .probe_timing = TIMING_ZERO,
16997 .block_erasers =
16998 {
16999 {
17000 .eraseblocks = { {256, 2 * 1024} },
17001 .block_erase = spi_block_erase_db,
17002 }, {
17003 .eraseblocks = { {64 * 1024, 8} },
17004 .block_erase = spi_block_erase_d8,
17005 }, {
17006 .eraseblocks = { {512 * 1024, 1} },
17007 .block_erase = spi_block_erase_c7,
17008 }
17009 },
17010 .printlock = spi_prettyprint_status_register_default_welwip,
17011 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
17012 .write = spi_chip_write_256,
17013 .read = spi_chip_read,
17014 .voltage = {2700, 3600},
17015 },
17016
17017 {
17018 .vendor = "Sanyo",
17019 .name = "LE25FW406A",
17020 .bustype = BUS_SPI,
17021 .manufacture_id = SANYO_ID,
17022 .model_id = SANYO_LE25FW406A,
17023 .total_size = 512,
17024 .page_size = 256,
17025 .feature_bits = FEATURE_WRSR_WREN,
17026 .tested = TEST_OK_PREW,
17027 .probe = probe_spi_res2,
17028 .probe_timing = TIMING_ZERO,
17029 .block_erasers =
17030 {
17031 {
17032 .eraseblocks = { {4 * 1024, 128} },
17033 .block_erase = spi_block_erase_d7,
17034 }, {
17035 .eraseblocks = { {64 * 1024, 8} },
17036 .block_erase = spi_block_erase_d8,
17037 }, {
17038 .eraseblocks = { {512 * 1024, 1} },
17039 .block_erase = spi_block_erase_c7,
17040 }
17041 },
17042 .printlock = spi_prettyprint_status_register_plain,
17043 .unlock = spi_disable_blockprotect,
17044 .write = spi_chip_write_256,
17045 .read = spi_chip_read,
17046 .voltage = {2700, 3600},
17047 },
17048
17049 {
17050 .vendor = "Sanyo",
17051 .name = "LE25FW418A",
17052 .bustype = BUS_SPI,
17053 .manufacture_id = SANYO_ID,
17054 .model_id = SANYO_LE25FW418A,
17055 .total_size = 512,
17056 .page_size = 256,
17057 .feature_bits = FEATURE_WRSR_WREN,
17058 .tested = TEST_UNTESTED,
17059 .probe = probe_spi_res2,
17060 .probe_timing = TIMING_ZERO,
17061 .block_erasers =
17062 {
17063 {
17064 .eraseblocks = { {4 * 1024, 128} },
17065 .block_erase = spi_block_erase_d7,
17066 }, {
17067 .eraseblocks = { {64 * 1024, 8} },
17068 .block_erase = spi_block_erase_d8,
17069 }, {
17070 .eraseblocks = { {512 * 1024, 1} },
17071 .block_erase = spi_block_erase_c7,
17072 }
17073 },
17074 .printlock = spi_prettyprint_status_register_bp2_srwd,
17075 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
17076 .write = spi_chip_write_256,
17077 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
17078 .voltage = {2700, 3600},
17079 },
17080
17081 {
17082 .vendor = "Sanyo",
17083 .name = "LE25FW806",
17084 .bustype = BUS_SPI,
17085 .manufacture_id = SANYO_ID,
17086 .model_id = SANYO_LE25FW806,
17087 .total_size = 1024,
17088 .page_size = 256,
17089 .feature_bits = FEATURE_WRSR_WREN,
17090 .tested = TEST_UNTESTED,
17091 .probe = probe_spi_res2,
17092 .probe_timing = TIMING_ZERO,
17093 .block_erasers =
17094 {
17095 {
17096 .eraseblocks = { {4 * 1024, 256} },
17097 .block_erase = spi_block_erase_20,
17098 }, {
17099 .eraseblocks = { {4 * 1024, 256} },
17100 .block_erase = spi_block_erase_d7,
17101 }, {
17102 .eraseblocks = { {64 * 1024, 16} },
17103 .block_erase = spi_block_erase_d8,
17104 }, {
17105 .eraseblocks = { {1024 * 1024, 1} },
17106 .block_erase = spi_block_erase_c7,
17107 }
17108 },
17109 .printlock = spi_prettyprint_status_register_bp2_srwd,
17110 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
17111 .write = spi_chip_write_256,
17112 .read = spi_chip_read,
17113 .voltage = {2700, 3600},
17114 },
17115
17116 {
17117 .vendor = "Sanyo",
17118 .name = "LE25FW808",
17119 .bustype = BUS_SPI,
17120 .manufacture_id = SANYO_ID,
17121 .model_id = SANYO_LE25FW808,
17122 .total_size = 1024,
17123 .page_size = 256,
17124 .feature_bits = FEATURE_WRSR_WREN,
17125 .tested = TEST_UNTESTED,
17126 .probe = probe_spi_res2,
17127 .probe_timing = TIMING_ZERO,
17128 .block_erasers =
17129 {
17130 {
17131 .eraseblocks = { {8 * 1024, 128} },
17132 .block_erase = spi_block_erase_d7,
17133 }, {
17134 .eraseblocks = { {64 * 1024, 16} },
17135 .block_erase = spi_block_erase_d8,
17136 }, {
17137 .eraseblocks = { {1024 * 1024, 1} },
17138 .block_erase = spi_block_erase_c7,
17139 }
17140 },
17141 .printlock = spi_prettyprint_status_register_bp2_srwd,
17142 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
17143 .write = spi_chip_write_256,
17144 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
17145 .voltage = {2700, 3600},
17146 },
17147
17148 {
17149 .vendor = "Sharp",
17150 .name = "LH28F008BJT-BTLZ1",
17151 .bustype = BUS_PARALLEL,
17152 .manufacture_id = SHARP_ID,
17153 .model_id = SHARP_LH28F008BJ__PB,
17154 .total_size = 1024,
17155 .page_size = 64 * 1024,
17156 .tested = TEST_OK_PREW,
17157 .probe = probe_82802ab,
17158 .probe_timing = TIMING_ZERO,
17159 .block_erasers =
17160 {
17161 {
17162 .eraseblocks = {
17163 {8 * 1024, 8},
17164 {64 * 1024, 15}
17165 },
17166 .block_erase = erase_block_82802ab,
17167 }, {
17168 .eraseblocks = { {1024 * 1024, 1} },
17169 .block_erase = erase_sector_49lfxxxc,
17170 }
17171 },
17172 .unlock = unlock_lh28f008bjt,
17173 .write = write_82802ab,
17174 .read = read_memmapped,
17175 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010017176 .prepare_access = prepare_memory_access,
17177 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017178 },
17179
17180 {
17181 .vendor = "Sharp",
17182 .name = "LHF00L04",
17183 .bustype = BUS_FWH, /* A/A Mux */
17184 .manufacture_id = SHARP_ID,
17185 .model_id = SHARP_LHF00L04,
17186 .total_size = 1024,
17187 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010017188 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017189 .tested = TEST_UNTESTED,
17190 .probe = probe_82802ab,
17191 .probe_timing = TIMING_ZERO,
17192 .block_erasers =
17193 {
17194 {
17195 .eraseblocks = {
17196 {64 * 1024, 15},
17197 {8 * 1024, 8}
17198 },
17199 .block_erase = erase_block_82802ab,
17200 }, {
17201 .eraseblocks = {
17202 {1024 * 1024, 1}
17203 },
17204 .block_erase = NULL, /* 30 D0, only in A/A mux mode */
17205 },
17206 },
17207 .unlock = unlock_regspace2_uniform_64k,
17208 .write = write_82802ab,
17209 .read = read_memmapped,
17210 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010017211 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010017212 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017213 },
17214
17215 {
17216 .vendor = "Spansion",
17217 .name = "S25FL004A",
17218 .bustype = BUS_SPI,
17219 .manufacture_id = SPANSION_ID,
17220 .model_id = SPANSION_S25FL004A,
17221 .total_size = 512,
17222 .page_size = 256,
17223 .feature_bits = FEATURE_WRSR_WREN,
17224 .tested = TEST_UNTESTED,
17225 .probe = probe_spi_rdid,
17226 .probe_timing = TIMING_ZERO,
17227 .block_erasers =
17228 {
17229 {
17230 .eraseblocks = { {64 * 1024, 8} },
17231 .block_erase = spi_block_erase_d8,
17232 }, {
17233 .eraseblocks = { {512 * 1024, 1} },
17234 .block_erase = spi_block_erase_c7,
17235 }
17236 },
17237 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17238 .unlock = spi_disable_blockprotect,
17239 .write = spi_chip_write_256,
17240 .read = spi_chip_read,
17241 .voltage = {2700, 3600},
17242 },
17243
17244 {
17245 .vendor = "Spansion",
17246 .name = "S25FL008A",
17247 .bustype = BUS_SPI,
17248 .manufacture_id = SPANSION_ID,
17249 .model_id = SPANSION_S25FL008A,
17250 .total_size = 1024,
17251 .page_size = 256,
17252 .feature_bits = FEATURE_WRSR_WREN,
17253 .tested = TEST_OK_PRE,
17254 .probe = probe_spi_rdid,
17255 .probe_timing = TIMING_ZERO,
17256 .block_erasers =
17257 {
17258 {
17259 .eraseblocks = { {64 * 1024, 16} },
17260 .block_erase = spi_block_erase_d8,
17261 }, {
17262 .eraseblocks = { {1024 * 1024, 1} },
17263 .block_erase = spi_block_erase_c7,
17264 }
17265 },
17266 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17267 .unlock = spi_disable_blockprotect,
17268 .write = spi_chip_write_256,
17269 .read = spi_chip_read,
17270 .voltage = {2700, 3600},
17271 },
17272
17273 {
17274 .vendor = "Spansion",
17275 .name = "S25FL016A",
17276 .bustype = BUS_SPI,
17277 .manufacture_id = SPANSION_ID,
17278 .model_id = SPANSION_S25FL016A,
17279 .total_size = 2048,
17280 .page_size = 256,
17281 .feature_bits = FEATURE_WRSR_WREN,
17282 .tested = TEST_OK_PREW,
17283 .probe = probe_spi_rdid,
17284 .probe_timing = TIMING_ZERO,
17285 .block_erasers =
17286 {
17287 {
17288 .eraseblocks = { {64 * 1024, 32} },
17289 .block_erase = spi_block_erase_d8,
17290 }, {
17291 .eraseblocks = { {2 * 1024 * 1024, 1} },
17292 .block_erase = spi_block_erase_c7,
17293 }
17294 },
17295 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17296 .unlock = spi_disable_blockprotect,
17297 .write = spi_chip_write_256,
17298 .read = spi_chip_read,
17299 .voltage = {2700, 3600},
17300 },
17301
17302 {
17303 .vendor = "Spansion",
17304 .name = "S25FL032A/P",
17305 .bustype = BUS_SPI,
17306 .manufacture_id = SPANSION_ID,
17307 .model_id = SPANSION_S25FL032A,
17308 .total_size = 4096,
17309 .page_size = 256,
17310 .feature_bits = FEATURE_WRSR_WREN,
17311 .tested = TEST_OK_PREW,
17312 .probe = probe_spi_rdid,
17313 .probe_timing = TIMING_ZERO,
17314 .block_erasers =
17315 {
17316 {
17317 .eraseblocks = { {64 * 1024, 64} },
17318 .block_erase = spi_block_erase_d8,
17319 }, {
17320 .eraseblocks = { {4 * 1024 * 1024, 1} },
17321 .block_erase = spi_block_erase_c7,
17322 }
17323 },
17324 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17325 .unlock = spi_disable_blockprotect,
17326 .write = spi_chip_write_256,
17327 .read = spi_chip_read,
17328 .voltage = {2700, 3600},
17329 },
17330
17331 {
17332 .vendor = "Spansion",
17333 .name = "S25FL064A/P",
17334 .bustype = BUS_SPI,
17335 .manufacture_id = SPANSION_ID,
17336 .model_id = SPANSION_S25FL064A,
17337 .total_size = 8192,
17338 .page_size = 256,
17339 .feature_bits = FEATURE_WRSR_WREN,
17340 .tested = TEST_OK_PREW,
17341 .probe = probe_spi_rdid,
17342 .probe_timing = TIMING_ZERO,
17343 .block_erasers =
17344 {
17345 {
17346 .eraseblocks = { {64 * 1024, 128} },
17347 .block_erase = spi_block_erase_d8,
17348 }, {
17349 .eraseblocks = { {8 * 1024 * 1024, 1} },
17350 .block_erase = spi_block_erase_c7,
17351 }
17352 },
17353 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
17354 .unlock = spi_disable_blockprotect,
17355 .write = spi_chip_write_256,
17356 .read = spi_chip_read,
17357 .voltage = {2700, 3600},
17358 },
17359
17360 {
17361 .vendor = "Spansion",
17362 .name = "S25FL116K/S25FL216K", /* FIXME: separate them */
17363 .bustype = BUS_SPI,
17364 .manufacture_id = SPANSION_ID,
17365 .model_id = SPANSION_S25FL216,
17366 .total_size = 2048,
17367 .page_size = 256,
17368 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (S25FL116K only) */
17369 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17370 .tested = TEST_UNTESTED,
17371 .probe = probe_spi_rdid,
17372 .probe_timing = TIMING_ZERO,
17373 .block_erasers =
17374 {
17375 {
17376 .eraseblocks = { {4 * 1024, 512} },
17377 .block_erase = spi_block_erase_20,
17378 }, {
17379 .eraseblocks = { {64 * 1024, 32} },
17380 .block_erase = spi_block_erase_d8,
17381 }, {
17382 .eraseblocks = { { 2048 * 1024, 1} },
17383 .block_erase = spi_block_erase_60,
17384 }, {
17385 .eraseblocks = { { 2048 * 1024, 1} },
17386 .block_erase = spi_block_erase_c7,
17387 }
17388 },
17389 .printlock = spi_prettyprint_status_register_bp3_srwd,
17390 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17391 .write = spi_chip_write_256,
17392 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17393 .voltage = {2700, 3600},
17394 },
17395
17396 {
17397 .vendor = "Spansion",
17398 .name = "S25FL127S-256kB", /* uniform 256kB sectors */
17399 .bustype = BUS_SPI,
17400 .manufacture_id = SPANSION_ID,
17401 .model_id = SPANSION_S25FL128,
17402 .total_size = 16384,
17403 .page_size = 512,
17404 /* supports 4B addressing */
17405 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17406 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17407 .tested = TEST_UNTESTED,
17408 .probe = probe_spi_rdid,
17409 .probe_timing = TIMING_ZERO,
17410 .block_erasers =
17411 {
17412 {
17413 .eraseblocks = { {256 * 1024, 64} },
17414 .block_erase = spi_block_erase_d8,
17415 }, {
17416 .eraseblocks = { { 16384 * 1024, 1} },
17417 .block_erase = spi_block_erase_60,
17418 }, {
17419 .eraseblocks = { { 16384 * 1024, 1} },
17420 .block_erase = spi_block_erase_c7,
17421 }
17422 },
17423 .printlock = spi_prettyprint_status_register_bp2_srwd,
17424 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17425 .write = spi_chip_write_256, /* Multi I/O supported */
17426 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17427 .voltage = {2700, 3600},
17428 },
17429
17430 {
17431 .vendor = "Spansion",
17432 .name = "S25FL127S-64kB", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17433 .bustype = BUS_SPI,
17434 .manufacture_id = SPANSION_ID,
17435 .model_id = SPANSION_S25FL128,
17436 .total_size = 16384,
17437 .page_size = 256,
17438 /* supports 4B addressing */
17439 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17440 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17441 .tested = TEST_OK_PREW,
17442 /* FIXME: we should distinguish the configuration on probing time like we do for AT45DB chips */
17443 .probe = probe_spi_rdid,
17444 .probe_timing = TIMING_ZERO,
17445 .block_erasers =
17446 {
17447 {
17448 /* This chip supports erasing of 32 so-called "parameter sectors" with
17449 * opcode 0x20 which may be configured to be on top or bottom of the address
17450 * space. Trying to access an address outside these 4kB blocks does have no
17451 * effect on the memory contents, e.g.
17452 .eraseblocks = {
17453 {4 * 1024, 32},
17454 {64 * 1024, 254} // inaccessible
17455 },
17456 .block_erase = spi_block_erase_20,
17457 }, { */
17458 .eraseblocks = { { 64 * 1024, 256} },
17459 .block_erase = spi_block_erase_d8,
17460 }, {
17461 .eraseblocks = { { 16384 * 1024, 1} },
17462 .block_erase = spi_block_erase_60,
17463 }, {
17464 .eraseblocks = { { 16384 * 1024, 1} },
17465 .block_erase = spi_block_erase_c7,
17466 }
17467 },
17468 .printlock = spi_prettyprint_status_register_bp2_srwd,
17469 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17470 .write = spi_chip_write_256, /* Multi I/O supported */
17471 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17472 .voltage = {2700, 3600},
17473 },
17474
17475 {
17476 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020017477 .name = "S25FL128L",
17478 .bustype = BUS_SPI,
17479 .manufacture_id = SPANSION_ID,
17480 .model_id = SPANSION_S25FL128L,
17481 .total_size = 16384,
17482 .page_size = 256,
17483 /* 4 x 256B Security Region (OTP) */
17484 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP,
17485 .tested = TEST_UNTESTED,
17486 .probe = probe_spi_rdid,
17487 .probe_timing = TIMING_ZERO,
17488 .block_erasers =
17489 {
17490 {
17491 .eraseblocks = { {4 * 1024, 4096} },
17492 .block_erase = spi_block_erase_20,
17493 }, {
17494 .eraseblocks = { {32 * 1024, 512} },
17495 .block_erase = spi_block_erase_52,
17496 }, {
17497 .eraseblocks = { {64 * 1024, 256} },
17498 .block_erase = spi_block_erase_d8,
17499 }, {
17500 .eraseblocks = { {16384 * 1024, 1} },
17501 .block_erase = spi_block_erase_60,
17502 }, {
17503 .eraseblocks = { {16384 * 1024, 1} },
17504 .block_erase = spi_block_erase_c7,
17505 }
17506 },
17507 .printlock = spi_prettyprint_status_register_bp2_srwd,
17508 .unlock = spi_disable_blockprotect_bp2_srwd,
17509 .write = spi_chip_write_256,
17510 .read = spi_chip_read, /* Fast read (0x0B) supported */
17511 .voltage = {2700, 3600},
17512 .reg_bits =
17513 {
17514 /*
17515 * Note: This chip has a read-only Status Register 2 that is not
17516 * counted here. Registers are mapped as follows:
17517 * STATUS1 ... Status Register 1
17518 * STATUS2 ... Configuration Register 1
17519 * STATUS3 ... Configuration Register 2
17520 */
17521 .srp = {STATUS1, 7, RW},
17522 .srl = {STATUS2, 0, RW},
17523 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17524 .tb = {STATUS1, 5, RW},
17525 .sec = {STATUS1, 6, RW},
17526 .cmp = {STATUS2, 6, RW},
17527 .wps = {STATUS3, 2, RW},
17528 },
Nico Huberaabb3e02023-01-13 00:22:30 +010017529 .wp_write_cfg = spi_wp_write_cfg,
17530 .wp_read_cfg = spi_wp_read_cfg,
17531 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020017532 .decode_range = decode_range_spi25,
17533 },
17534
17535 {
17536 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100017537 .name = "S25FL128P......0", /* uniform 64 kB sectors */
17538 .bustype = BUS_SPI,
17539 .manufacture_id = SPANSION_ID,
17540 .model_id = SPANSION_S25FL128,
17541 .total_size = 16384,
17542 .page_size = 256,
17543 .feature_bits = FEATURE_WRSR_WREN,
17544 .tested = TEST_OK_PREW,
17545 .probe = probe_spi_rdid,
17546 .probe_timing = TIMING_ZERO,
17547 .block_erasers =
17548 {
17549 {
17550 .eraseblocks = { {64 * 1024, 256} },
17551 .block_erase = spi_block_erase_20,
17552 }, {
17553 .eraseblocks = { {64 * 1024, 256} },
17554 .block_erase = spi_block_erase_d8,
17555 }, {
17556 .eraseblocks = { { 16384 * 1024, 1} },
17557 .block_erase = spi_block_erase_60,
17558 }, {
17559 .eraseblocks = { { 16384 * 1024, 1} },
17560 .block_erase = spi_block_erase_c7,
17561 }
17562 },
17563 .printlock = spi_prettyprint_status_register_bp3_srwd,
17564 .unlock = spi_disable_blockprotect_bp3_srwd,
17565 .write = spi_chip_write_256,
17566 .read = spi_chip_read, /* Fast read (0x0B) supported */
17567 .voltage = {2700, 3600},
17568 },
17569
17570 {
17571 .vendor = "Spansion",
17572 .name = "S25FL128P......1", /* uniform 256kB sectors */
17573 .bustype = BUS_SPI,
17574 .manufacture_id = SPANSION_ID,
17575 .model_id = SPANSION_S25FL128,
17576 .total_size = 16384,
17577 .page_size = 256,
17578 .feature_bits = FEATURE_WRSR_WREN,
17579 .tested = TEST_UNTESTED,
17580 .probe = probe_spi_rdid,
17581 .probe_timing = TIMING_ZERO,
17582 .block_erasers =
17583 {
17584 {
17585 .eraseblocks = { {256 * 1024, 64} },
17586 .block_erase = spi_block_erase_d8,
17587 }, {
17588 .eraseblocks = { { 16384 * 1024, 1} },
17589 .block_erase = spi_block_erase_c7,
17590 }
17591 },
17592 .printlock = spi_prettyprint_status_register_bp2_srwd,
17593 .unlock = spi_disable_blockprotect_bp2_srwd,
17594 .write = spi_chip_write_256,
17595 .read = spi_chip_read, /* Fast read (0x0B) supported */
17596 .voltage = {2700, 3600},
17597 },
17598
17599 {
17600 .vendor = "Spansion",
17601 .name = "S25FL128S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17602 .bustype = BUS_SPI,
17603 .manufacture_id = SPANSION_ID,
17604 .model_id = SPANSION_S25FL128,
17605 .total_size = 16384,
17606 .page_size = 256,
17607 /* supports 4B addressing */
17608 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17609 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17610 .tested = TEST_OK_PREW,
17611 .probe = probe_spi_rdid,
17612 .probe_timing = TIMING_ZERO,
17613 .block_erasers =
17614 {
17615 {
17616 /* This chip supports erasing of the 32 so-called "parameter sectors" with
17617 * opcode 0x20. Trying to access an address outside these 4kB blocks does
17618 * have no effect on the memory contents, but sets a flag in the SR.
17619 .eraseblocks = {
17620 {4 * 1024, 32},
17621 {64 * 1024, 254} // inaccessible
17622 },
17623 .block_erase = spi_block_erase_20,
17624 }, { */
17625 .eraseblocks = { { 64 * 1024, 256} },
17626 .block_erase = spi_block_erase_d8,
17627 }, {
17628 .eraseblocks = { { 16384 * 1024, 1} },
17629 .block_erase = spi_block_erase_60,
17630 }, {
17631 .eraseblocks = { { 16384 * 1024, 1} },
17632 .block_erase = spi_block_erase_c7,
17633 }
17634 },
17635 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17636 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17637 .write = spi_chip_write_256, /* Multi I/O supported */
17638 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17639 .voltage = {2700, 3600},
17640 },
17641
17642 {
17643 .vendor = "Spansion",
17644 .name = "S25FL128S......1", /* uniform 256 kB sectors */
17645 .bustype = BUS_SPI,
17646 .manufacture_id = SPANSION_ID,
17647 .model_id = SPANSION_S25FL128,
17648 .total_size = 16384,
17649 .page_size = 512,
17650 /* supports 4B addressing */
17651 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
17652 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17653 .tested = TEST_UNTESTED,
17654 .probe = probe_spi_rdid,
17655 .probe_timing = TIMING_ZERO,
17656 .block_erasers =
17657 {
17658 {
17659 .eraseblocks = { {256 * 1024, 64} },
17660 .block_erase = spi_block_erase_d8,
17661 }, {
17662 .eraseblocks = { { 16384 * 1024, 1} },
17663 .block_erase = spi_block_erase_60,
17664 }, {
17665 .eraseblocks = { { 16384 * 1024, 1} },
17666 .block_erase = spi_block_erase_c7,
17667 }
17668 },
17669 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
17670 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
17671 .write = spi_chip_write_256, /* Multi I/O supported */
17672 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17673 .voltage = {2700, 3600},
17674 },
17675
17676 {
17677 .vendor = "Spansion",
17678 .name = "S25FL129P......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17679 .bustype = BUS_SPI,
17680 .manufacture_id = SPANSION_ID,
17681 .model_id = SPANSION_S25FL128,
17682 .total_size = 16384,
17683 .page_size = 256,
17684 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
17685 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17686 .tested = TEST_OK_PREW,
17687 .probe = probe_spi_rdid,
17688 .probe_timing = TIMING_ZERO,
17689 .block_erasers =
17690 {
17691 {
17692 /* FIXME: This chip supports erasing of the 32 so-called "parameter sectors" with
17693 * opcode 0x20. Trying to access an address outside these 4kB blocks does have no
17694 * effect on the memory contents, but sets a flag in the SR.
17695 .eraseblocks = {
17696 {4 * 1024, 32},
17697 {64 * 1024, 254} // inaccessible
17698 },
17699 .block_erase = spi_block_erase_20,
17700 }, { */
17701 /* FIXME: Additionally it also supports erase opcode 40h for the respective 2*4 kB pairs
17702 .eraseblocks = {
17703 {8 * 1024, 16},
17704 {64 * 1024, 254} // inaccessible
17705 },
17706 .block_erase = spi_block_erase_40,
17707 }, { */
17708 .eraseblocks = { { 64 * 1024, 256} },
17709 .block_erase = spi_block_erase_d8,
17710 }, {
17711 .eraseblocks = { { 16384 * 1024, 1} },
17712 .block_erase = spi_block_erase_60,
17713 }, {
17714 .eraseblocks = { { 16384 * 1024, 1} },
17715 .block_erase = spi_block_erase_c7,
17716 }
17717 },
17718 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
17719 .unlock = spi_disable_blockprotect_bp2_srwd,
17720 .write = spi_chip_write_256, /* Multi I/O supported */
17721 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17722 .voltage = {2700, 3600},
17723 },
17724
17725 {
17726 .vendor = "Spansion",
17727 .name = "S25FL129P......1", /* uniform 256 kB sectors */
17728 .bustype = BUS_SPI,
17729 .manufacture_id = SPANSION_ID,
17730 .model_id = SPANSION_S25FL128,
17731 .total_size = 16384,
17732 .page_size = 256,
17733 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
17734 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17735 .tested = TEST_UNTESTED,
17736 .probe = probe_spi_rdid,
17737 .probe_timing = TIMING_ZERO,
17738 .block_erasers =
17739 {
17740 {
17741 .eraseblocks = { {256 * 1024, 64} },
17742 .block_erase = spi_block_erase_d8,
17743 }, {
17744 .eraseblocks = { { 16384 * 1024, 1} },
17745 .block_erase = spi_block_erase_60,
17746 }, {
17747 .eraseblocks = { { 16384 * 1024, 1} },
17748 .block_erase = spi_block_erase_c7,
17749 }
17750 },
17751 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
17752 .unlock = spi_disable_blockprotect_bp2_srwd,
17753 .write = spi_chip_write_256, /* Multi I/O supported */
17754 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17755 .voltage = {2700, 3600},
17756 },
17757
17758 {
17759 .vendor = "Spansion",
17760 .name = "S25FL132K",
17761 .bustype = BUS_SPI,
17762 .manufacture_id = SPANSION_ID,
17763 .model_id = SPANSION_S25FL132K,
17764 .total_size = 4096,
17765 .page_size = 256,
17766 /* OTP: 768B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
17767 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17768 .tested = TEST_UNTESTED,
17769 .probe = probe_spi_rdid,
17770 .probe_timing = TIMING_ZERO,
17771 .block_erasers =
17772 {
17773 {
17774 .eraseblocks = { {4 * 1024, 1024} },
17775 .block_erase = spi_block_erase_20,
17776 }, {
17777 .eraseblocks = { {64 * 1024, 64} },
17778 .block_erase = spi_block_erase_d8,
17779 }, {
17780 .eraseblocks = { { 4096 * 1024, 1} },
17781 .block_erase = spi_block_erase_60,
17782 }, {
17783 .eraseblocks = { { 4096 * 1024, 1} },
17784 .block_erase = spi_block_erase_c7,
17785 }
17786 },
17787 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
17788 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17789 .write = spi_chip_write_256,
17790 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17791 .voltage = {2700, 3600},
17792 },
17793
17794 {
17795 .vendor = "Spansion",
17796 .name = "S25FL164K",
17797 .bustype = BUS_SPI,
17798 .manufacture_id = SPANSION_ID,
17799 .model_id = SPANSION_S25FL164K,
17800 .total_size = 8192,
17801 .page_size = 256,
17802 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
17803 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
17804 .tested = TEST_OK_PREW,
17805 .probe = probe_spi_rdid,
17806 .probe_timing = TIMING_ZERO,
17807 .block_erasers =
17808 {
17809 {
17810 .eraseblocks = { {4 * 1024, 2048} },
17811 .block_erase = spi_block_erase_20,
17812 }, {
17813 .eraseblocks = { {64 * 1024, 128} },
17814 .block_erase = spi_block_erase_d8,
17815 }, {
17816 .eraseblocks = { { 8192 * 1024, 1} },
17817 .block_erase = spi_block_erase_60,
17818 }, {
17819 .eraseblocks = { { 8192 * 1024, 1} },
17820 .block_erase = spi_block_erase_c7,
17821 }
17822 },
17823 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
17824 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
17825 .write = spi_chip_write_256,
17826 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
17827 .voltage = {2700, 3600},
17828 },
17829
17830 {
17831 .vendor = "Spansion",
17832 .name = "S25FL204K",
17833 .bustype = BUS_SPI,
17834 .manufacture_id = SPANSION_ID,
17835 .model_id = SPANSION_S25FL204,
17836 .total_size = 512,
17837 .page_size = 256,
17838 .feature_bits = FEATURE_WRSR_WREN,
17839 .tested = TEST_OK_PR,
17840 .probe = probe_spi_rdid,
17841 .probe_timing = TIMING_ZERO,
17842 .block_erasers =
17843 {
17844 {
17845 .eraseblocks = { {4 * 1024, 128} },
17846 .block_erase = spi_block_erase_20,
17847 }, {
17848 .eraseblocks = { {64 * 1024, 8} },
17849 .block_erase = spi_block_erase_d8,
17850 }, {
17851 .eraseblocks = { { 512 * 1024, 1} },
17852 .block_erase = spi_block_erase_60,
17853 }, {
17854 .eraseblocks = { { 512 * 1024, 1} },
17855 .block_erase = spi_block_erase_c7,
17856 }
17857 },
17858 .printlock = spi_prettyprint_status_register_bp3_srwd,
17859 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17860 .write = spi_chip_write_256,
17861 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17862 .voltage = {2700, 3600},
17863 },
17864
17865 {
17866 .vendor = "Spansion",
17867 .name = "S25FL208K",
17868 .bustype = BUS_SPI,
17869 .manufacture_id = SPANSION_ID,
17870 .model_id = SPANSION_S25FL208,
17871 .total_size = 1024,
17872 .page_size = 256,
17873 .feature_bits = FEATURE_WRSR_WREN,
17874 .tested = TEST_OK_PREW,
17875 .probe = probe_spi_rdid,
17876 .probe_timing = TIMING_ZERO,
17877 .block_erasers =
17878 {
17879 {
17880 .eraseblocks = { {4 * 1024, 256} },
17881 .block_erase = spi_block_erase_20,
17882 }, {
17883 .eraseblocks = { {64 * 1024, 16} },
17884 .block_erase = spi_block_erase_d8,
17885 }, {
17886 .eraseblocks = { { 1024 * 1024, 1} },
17887 .block_erase = spi_block_erase_60,
17888 }, {
17889 .eraseblocks = { { 1024 * 1024, 1} },
17890 .block_erase = spi_block_erase_c7,
17891 }
17892 },
17893 .printlock = spi_prettyprint_status_register_bp3_srwd,
17894 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
17895 .write = spi_chip_write_256,
17896 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
17897 .voltage = {2700, 3600},
17898 },
17899
17900 {
17901 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020017902 .name = "S25FL256L",
17903 .bustype = BUS_SPI,
17904 .manufacture_id = SPANSION_ID,
17905 .model_id = SPANSION_S25FL256L,
17906 .total_size = 32768,
17907 .page_size = 256,
17908 /* 4 x 256B Security Region (OTP) */
17909 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP |
17910 FEATURE_4BA_ENTER | FEATURE_4BA_NATIVE,
17911 .tested = TEST_UNTESTED,
17912 .probe = probe_spi_rdid,
17913 .probe_timing = TIMING_ZERO,
17914 .block_erasers =
17915 {
17916 {
17917 .eraseblocks = { {4 * 1024, 8192} },
17918 .block_erase = spi_block_erase_21,
17919 }, {
17920 .eraseblocks = { {4 * 1024, 8192} },
17921 .block_erase = spi_block_erase_20,
17922 }, {
17923 .eraseblocks = { {32 * 1024, 1024} },
17924 .block_erase = spi_block_erase_53,
17925 }, {
17926 .eraseblocks = { {32 * 1024, 1024} },
17927 .block_erase = spi_block_erase_52,
17928 }, {
17929 .eraseblocks = { {64 * 1024, 512} },
17930 .block_erase = spi_block_erase_dc,
17931 }, {
17932 .eraseblocks = { {64 * 1024, 512} },
17933 .block_erase = spi_block_erase_d8,
17934 }, {
17935 .eraseblocks = { {32768 * 1024, 1} },
17936 .block_erase = spi_block_erase_60,
17937 }, {
17938 .eraseblocks = { {32768 * 1024, 1} },
17939 .block_erase = spi_block_erase_c7,
17940 }
17941 },
17942 .printlock = spi_prettyprint_status_register_bp3_srwd,
17943 .unlock = spi_disable_blockprotect_bp3_srwd,
17944 .write = spi_chip_write_256,
17945 .read = spi_chip_read, /* Fast read (0x0B) supported */
17946 .voltage = {2700, 3600},
17947 .reg_bits =
17948 {
17949 /*
17950 * Note: This chip has a read-only Status Register 2 that is not
17951 * counted here. Registers are mapped as follows:
17952 * STATUS1 ... Status Register 1
17953 * STATUS2 ... Configuration Register 1
17954 * STATUS3 ... Configuration Register 2
17955 */
17956 .srp = {STATUS1, 7, RW},
17957 .srl = {STATUS2, 0, RW},
17958 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
17959 .tb = {STATUS1, 6, RW},
17960 .cmp = {STATUS2, 6, RW},
17961 .wps = {STATUS3, 2, RW},
17962 },
Nico Huberaabb3e02023-01-13 00:22:30 +010017963 .wp_write_cfg = spi_wp_write_cfg,
17964 .wp_read_cfg = spi_wp_read_cfg,
17965 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020017966 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020017967 .prepare_access = spi_prepare_io,
17968 .finish_access = spi_finish_io,
Nico Huberfffc48d2022-05-28 14:26:06 +020017969 },
17970
17971 {
17972 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100017973 .name = "S25FL256S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
17974 .bustype = BUS_SPI,
17975 .manufacture_id = SPANSION_ID,
17976 .model_id = SPANSION_S25FL256,
17977 .total_size = 32768,
17978 .page_size = 256,
17979 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber9bb8a322022-05-24 15:07:34 +020017980 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
17981 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
Alan Green1f9cc7d2019-07-01 11:10:45 +100017982 .tested = TEST_OK_PREW,
17983 .probe = probe_spi_rdid,
17984 .probe_timing = TIMING_ZERO,
17985 .block_erasers =
17986 {
17987 {
17988 /* This chip supports erasing of the 32 so-called "parameter sectors" with
17989 * opcode 0x20. Trying to access an address outside these 4kB blocks does
17990 * have no effect on the memory contents, but sets a flag in the SR.
17991 .eraseblocks = {
17992 {4 * 1024, 32},
17993 {64 * 1024, 254} // inaccessible
17994 },
17995 .block_erase = spi_block_erase_20,
17996 }, { */
17997 .eraseblocks = { { 64 * 1024, 512} },
17998 .block_erase = spi_block_erase_dc,
17999 }, {
18000 .eraseblocks = { { 64 * 1024, 512} },
18001 .block_erase = spi_block_erase_d8,
18002 }, {
18003 .eraseblocks = { { 32768 * 1024, 1} },
18004 .block_erase = spi_block_erase_60,
18005 }, {
18006 .eraseblocks = { { 32768 * 1024, 1} },
18007 .block_erase = spi_block_erase_c7,
18008 }
18009 },
18010 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
18011 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
18012 .write = spi_chip_write_256, /* Multi I/O supported */
18013 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
18014 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020018015 .prepare_access = spi_prepare_io,
18016 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018017 },
18018
18019 {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010018020 .vendor = "Spansion",
18021 .name = "S25FL512S",
18022 .bustype = BUS_SPI,
18023 .manufacture_id = SPANSION_ID,
18024 .model_id = SPANSION_S25FL512,
18025 .total_size = 65536, /* 512 Mb (=> 64 MB)) */
18026 .page_size = 256,
18027 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber26237922022-06-20 19:37:37 +020018028 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
18029 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
18030 .tested = TEST_UNTESTED,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010018031 .probe = probe_spi_rdid,
18032 .probe_timing = TIMING_ZERO,
18033 .block_erasers =
18034 {
18035 {
18036 .eraseblocks = { { 256 * 1024, 256} },
18037 .block_erase = spi_block_erase_dc,
18038 }, {
Nico Huberbb608ff2022-05-24 15:33:26 +020018039 .eraseblocks = { { 256 * 1024, 256} },
18040 .block_erase = spi_block_erase_d8,
18041 }, {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010018042 .eraseblocks = { { 65536 * 1024, 1} },
18043 .block_erase = spi_block_erase_60,
18044 }, {
18045 .eraseblocks = { { 65536 * 1024, 1} },
18046 .block_erase = spi_block_erase_c7,
18047 }
18048 },
18049 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
18050 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
18051 .write = spi_chip_write_256, /* Multi I/O supported, IGNORE for now */
18052 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
18053 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020018054 .prepare_access = spi_prepare_io,
18055 .finish_access = spi_finish_io,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010018056 },
18057
18058 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000018059 .vendor = "SyncMOS/MoselVitelic",
18060 .name = "{F,S,V}29C51001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018061 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018062 .manufacture_id = SYNCMOS_MVC_ID,
18063 .model_id = SM_MVC_29C51001B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018064 .total_size = 128,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018065 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000018066 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018067 .tested = TEST_UNTESTED,
18068 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000018069 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000018070 .block_erasers =
18071 {
18072 {
18073 .eraseblocks = { {512, 256} },
18074 .block_erase = erase_sector_jedec,
18075 }, {
18076 .eraseblocks = { {128 * 1024, 1} },
18077 .block_erase = erase_chip_block_jedec,
18078 },
18079 },
Sean Nelson35727f72010-01-28 23:55:12 +000018080 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000018081 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018082 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018083 .prepare_access = prepare_memory_access,
18084 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000018085 },
18086
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018087 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000018088 .vendor = "SyncMOS/MoselVitelic",
18089 .name = "{F,S,V}29C51001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018090 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018091 .manufacture_id = SYNCMOS_MVC_ID,
18092 .model_id = SM_MVC_29C51001T,
18093 .total_size = 128,
18094 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000018095 .feature_bits = FEATURE_EITHER_RESET,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018096 .tested = TEST_UNTESTED,
18097 .probe = probe_jedec,
18098 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
18099 .block_erasers =
18100 {
18101 {
18102 .eraseblocks = { {512, 256} },
18103 .block_erase = erase_sector_jedec,
18104 }, {
18105 .eraseblocks = { {128 * 1024, 1} },
18106 .block_erase = erase_chip_block_jedec,
18107 },
18108 },
18109 .write = write_jedec_1,
18110 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018111 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018112 .prepare_access = prepare_memory_access,
18113 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018114 },
18115
18116 {
18117 .vendor = "SyncMOS/MoselVitelic",
18118 .name = "{F,S,V}29C51002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018119 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018120 .manufacture_id = SYNCMOS_MVC_ID,
18121 .model_id = SM_MVC_29C51002B,
18122 .total_size = 256,
18123 .page_size = 512,
18124 .feature_bits = FEATURE_EITHER_RESET,
18125 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018126 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000018127 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000018128 .block_erasers =
18129 {
18130 {
18131 .eraseblocks = { {512, 512} },
18132 .block_erase = erase_sector_jedec,
18133 }, {
18134 .eraseblocks = { {256 * 1024, 1} },
18135 .block_erase = erase_chip_block_jedec,
18136 },
18137 },
Sean Nelson35727f72010-01-28 23:55:12 +000018138 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000018139 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010018140 .prepare_access = prepare_memory_access,
18141 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000018142 },
18143
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018144 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000018145 .vendor = "SyncMOS/MoselVitelic",
18146 .name = "{F,S,V}29C51002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018147 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018148 .manufacture_id = SYNCMOS_MVC_ID,
18149 .model_id = SM_MVC_29C51002T,
18150 .total_size = 256,
18151 .page_size = 512,
18152 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000018153 .tested = TEST_OK_PREW,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018154 .probe = probe_jedec,
18155 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
18156 .block_erasers =
18157 {
18158 {
18159 .eraseblocks = { {512, 512} },
18160 .block_erase = erase_sector_jedec,
18161 }, {
18162 .eraseblocks = { {256 * 1024, 1} },
18163 .block_erase = erase_chip_block_jedec,
18164 },
18165 },
18166 .write = write_jedec_1,
18167 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010018168 .prepare_access = prepare_memory_access,
18169 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018170 },
18171
18172 {
18173 .vendor = "SyncMOS/MoselVitelic",
18174 .name = "{F,S,V}29C51004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018175 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018176 .manufacture_id = SYNCMOS_MVC_ID,
18177 .model_id = SM_MVC_29C51004B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018178 .total_size = 512,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018179 .page_size = 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000018180 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018181 .tested = TEST_UNTESTED,
18182 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000018183 .probe_timing = TIMING_ZERO,
Sean Nelson56358aa2010-01-19 16:08:51 +000018184 .block_erasers =
18185 {
18186 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000018187 .eraseblocks = { {1024, 512} },
18188 .block_erase = erase_sector_jedec,
18189 }, {
18190 .eraseblocks = { {512 * 1024, 1} },
18191 .block_erase = erase_chip_block_jedec,
18192 },
18193 },
18194 .write = write_jedec_1,
18195 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018196 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018197 .prepare_access = prepare_memory_access,
18198 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018199 },
18200
18201 {
18202 .vendor = "SyncMOS/MoselVitelic",
18203 .name = "{F,S,V}29C51004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018204 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018205 .manufacture_id = SYNCMOS_MVC_ID,
18206 .model_id = SM_MVC_29C51004T,
18207 .total_size = 512,
18208 .page_size = 1024,
18209 .feature_bits = FEATURE_EITHER_RESET,
18210 .tested = TEST_UNTESTED,
18211 .probe = probe_jedec,
18212 .probe_timing = TIMING_ZERO,
18213 .block_erasers =
18214 {
18215 {
18216 .eraseblocks = { {1024, 512} },
18217 .block_erase = erase_sector_jedec,
18218 }, {
18219 .eraseblocks = { {512 * 1024, 1} },
18220 .block_erase = erase_chip_block_jedec,
18221 },
18222 },
18223 .write = write_jedec_1,
18224 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018225 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018226 .prepare_access = prepare_memory_access,
18227 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018228 },
18229
18230 {
18231 .vendor = "SyncMOS/MoselVitelic",
18232 .name = "{S,V}29C31004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018233 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018234 .manufacture_id = SYNCMOS_MVC_ID,
18235 .model_id = SM_MVC_29C31004B,
18236 .total_size = 512,
18237 .page_size = 1024,
18238 .feature_bits = FEATURE_EITHER_RESET,
18239 .tested = TEST_UNTESTED,
18240 .probe = probe_jedec,
18241 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
18242 .block_erasers =
18243 {
18244 {
18245 .eraseblocks = { {1024, 512} },
18246 .block_erase = erase_sector_jedec,
18247 }, {
18248 .eraseblocks = { {512 * 1024, 1} },
18249 .block_erase = erase_chip_block_jedec,
18250 },
18251 },
18252 .write = write_jedec_1,
18253 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018254 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010018255 .prepare_access = prepare_memory_access,
18256 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018257 },
18258
18259 {
18260 .vendor = "SyncMOS/MoselVitelic",
18261 .name = "{S,V}29C31004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018262 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000018263 .manufacture_id = SYNCMOS_MVC_ID,
18264 .model_id = SM_MVC_29C31004T,
18265 .total_size = 512,
18266 .page_size = 1024,
18267 .feature_bits = FEATURE_EITHER_RESET,
18268 .tested = TEST_UNTESTED,
18269 .probe = probe_jedec,
18270 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
18271 .block_erasers =
18272 {
18273 {
18274 .eraseblocks = { {1024, 512} },
Sean Nelson56358aa2010-01-19 16:08:51 +000018275 .block_erase = erase_sector_jedec,
18276 }, {
18277 .eraseblocks = { {512 * 1024, 1} },
18278 .block_erase = erase_chip_block_jedec,
18279 },
18280 },
Sean Nelson35727f72010-01-28 23:55:12 +000018281 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000018282 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018283 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010018284 .prepare_access = prepare_memory_access,
18285 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000018286 },
18287
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018288 {
Uwe Hermanna106d152009-05-27 23:17:40 +000018289 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018290 .name = "TMS29F002RB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018291 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018292 .manufacture_id = TI_OLD_ID,
18293 .model_id = TI_TMS29F002RB,
18294 .total_size = 256,
18295 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000018296 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018297 .tested = TEST_UNTESTED,
18298 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000018299 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000018300 .block_erasers =
18301 {
18302 {
18303 .eraseblocks = {
18304 {16 * 1024, 1},
18305 {8 * 1024, 2},
18306 {32 * 1024, 1},
18307 {64 * 1024, 3},
18308 },
18309 .block_erase = erase_sector_jedec,
18310 }, {
18311 .eraseblocks = { {256 * 1024, 1} },
18312 .block_erase = erase_chip_block_jedec,
18313 },
18314 },
Sean Nelson35727f72010-01-28 23:55:12 +000018315 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018316 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018317 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018318 .prepare_access = prepare_memory_access,
18319 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018320 },
18321
18322 {
Uwe Hermanna106d152009-05-27 23:17:40 +000018323 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018324 .name = "TMS29F002RT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018325 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018326 .manufacture_id = TI_OLD_ID,
18327 .model_id = TI_TMS29F002RT,
18328 .total_size = 256,
18329 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000018330 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018331 .tested = TEST_UNTESTED,
18332 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000018333 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000018334 .block_erasers =
18335 {
18336 {
18337 .eraseblocks = {
18338 {64 * 1024, 3},
18339 {32 * 1024, 1},
18340 {8 * 1024, 2},
18341 {16 * 1024, 1},
18342 },
18343 .block_erase = erase_sector_jedec,
18344 }, {
18345 .eraseblocks = { {256 * 1024, 1} },
18346 .block_erase = erase_chip_block_jedec,
18347 },
18348 },
Sean Nelson35727f72010-01-28 23:55:12 +000018349 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018350 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000018351 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010018352 .prepare_access = prepare_memory_access,
18353 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000018354 },
18355
18356 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018357 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018358 .name = "W25P16",
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018359 .bustype = BUS_SPI,
18360 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018361 .model_id = WINBOND_NEX_W25P16,
18362 .total_size = 2048,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018363 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018364 .feature_bits = FEATURE_WRSR_WREN,
18365 .tested = TEST_UNTESTED,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018366 .probe = probe_spi_rdid,
18367 .probe_timing = TIMING_ZERO,
18368 .block_erasers =
18369 {
18370 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018371 .eraseblocks = { {64 * 1024, 32} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018372 .block_erase = spi_block_erase_d8,
18373 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018374 .eraseblocks = { {2048 * 1024, 1} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018375 .block_erase = spi_block_erase_c7,
18376 }
18377 },
18378 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18379 .unlock = spi_disable_blockprotect,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018380 .write = spi_chip_write_256,
18381 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000018382 .voltage = {2700, 3600},
18383 },
18384
18385 {
18386 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018387 .name = "W25P32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018388 .bustype = BUS_SPI,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018389 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018390 .model_id = WINBOND_NEX_W25P32,
18391 .total_size = 4096,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018392 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018393 .feature_bits = FEATURE_WRSR_WREN,
18394 .tested = TEST_UNTESTED,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018395 .probe = probe_spi_rdid,
18396 .probe_timing = TIMING_ZERO,
18397 .block_erasers =
18398 {
18399 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018400 .eraseblocks = { {64 * 1024, 64} },
18401 .block_erase = spi_block_erase_d8,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018402 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018403 .eraseblocks = { {4096 * 1024, 1} },
18404 .block_erase = spi_block_erase_c7,
18405 }
18406 },
18407 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18408 .unlock = spi_disable_blockprotect,
18409 .write = spi_chip_write_256,
18410 .read = spi_chip_read, /* Fast read (0x0B) supported */
18411 .voltage = {2700, 3600},
18412 },
18413
18414 {
18415 .vendor = "Winbond",
18416 .name = "W25P80",
18417 .bustype = BUS_SPI,
18418 .manufacture_id = WINBOND_NEX_ID,
18419 .model_id = WINBOND_NEX_W25P80,
18420 .total_size = 1024,
18421 .page_size = 256,
18422 .feature_bits = FEATURE_WRSR_WREN,
18423 .tested = TEST_UNTESTED,
18424 .probe = probe_spi_rdid,
18425 .probe_timing = TIMING_ZERO,
18426 .block_erasers =
18427 {
18428 {
Rudolf Marekce1c7982010-04-20 19:34:31 +000018429 .eraseblocks = { {64 * 1024, 16} },
18430 .block_erase = spi_block_erase_d8,
18431 }, {
18432 .eraseblocks = { {1024 * 1024, 1} },
Rudolf Marekce1c7982010-04-20 19:34:31 +000018433 .block_erase = spi_block_erase_c7,
18434 }
18435 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018436 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000018437 .unlock = spi_disable_blockprotect,
Rudolf Marekce1c7982010-04-20 19:34:31 +000018438 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018439 .read = spi_chip_read, /* Fast read (0x0B) supported */
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018440 .voltage = {2700, 3600},
David Hendricksc4acec92010-06-24 11:39:57 +000018441 },
18442
18443 {
18444 .vendor = "Winbond",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018445 .name = "W25Q128.V",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018446 .bustype = BUS_SPI,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018447 .manufacture_id = WINBOND_NEX_ID,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018448 .model_id = WINBOND_NEX_W25Q128_V,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018449 .total_size = 16384,
18450 .page_size = 256,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018451 /* supports SFDP */
18452 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018453 /* QPI: only FV & JV..M versions */
Nico Huber98970632024-08-30 02:14:05 +020018454 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020018455 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Edward O'Callaghana97e3532022-12-16 15:41:05 +110018456 .tested = TEST_OK_PREWB,
Antony Rheneus0fbba982011-05-26 14:28:51 +000018457 .probe = probe_spi_rdid,
18458 .probe_timing = TIMING_ZERO,
18459 .block_erasers =
18460 {
18461 {
18462 .eraseblocks = { {4 * 1024, 4096} },
18463 .block_erase = spi_block_erase_20,
18464 }, {
18465 .eraseblocks = { {32 * 1024, 512} },
18466 .block_erase = spi_block_erase_52,
18467 }, {
18468 .eraseblocks = { {64 * 1024, 256} },
18469 .block_erase = spi_block_erase_d8,
18470 }, {
18471 .eraseblocks = { {16 * 1024 * 1024, 1} },
18472 .block_erase = spi_block_erase_60,
18473 }, {
18474 .eraseblocks = { {16 * 1024 * 1024, 1} },
18475 .block_erase = spi_block_erase_c7,
18476 }
18477 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018478 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Antony Rheneus0fbba982011-05-26 14:28:51 +000018479 .unlock = spi_disable_blockprotect,
18480 .write = spi_chip_write_256,
18481 .read = spi_chip_read,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018482 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018483 /* FIXME: Older versions (e.g. 25Q128BV) use WRSR_EXT and have no WPS. */
18484 .reg_bits =
18485 {
Nico Huber2133f592024-01-06 18:30:01 +010018486 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018487 .srp = {STATUS1, 7, RW},
18488 .srl = {STATUS2, 0, RW},
18489 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18490 .tb = {STATUS1, 5, RW},
18491 .sec = {STATUS1, 6, RW},
18492 .cmp = {STATUS2, 6, RW},
18493 .wps = {STATUS3, 2, RW},
18494 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018495 .wp_write_cfg = spi_wp_write_cfg,
18496 .wp_read_cfg = spi_wp_read_cfg,
18497 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020018498 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018499 .prepare_access = spi_prepare_io,
18500 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000018501 },
18502
18503 {
18504 .vendor = "Winbond",
Patrick Rudolph34323492018-10-04 14:59:40 +020018505 .name = "W25Q128.V..M",
18506 .bustype = BUS_SPI,
18507 .manufacture_id = WINBOND_NEX_ID,
18508 .model_id = WINBOND_NEX_W25Q128_V_M,
18509 .total_size = 16384,
18510 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010018511 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
18512 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030018513 .tested = TEST_OK_PREWB,
Patrick Rudolph34323492018-10-04 14:59:40 +020018514 .probe = probe_spi_rdid,
18515 .probe_timing = TIMING_ZERO,
18516 .block_erasers =
18517 {
18518 {
18519 .eraseblocks = { {4 * 1024, 4096} },
18520 .block_erase = spi_block_erase_20,
18521 }, {
18522 .eraseblocks = { {32 * 1024, 512} },
18523 .block_erase = spi_block_erase_52,
18524 }, {
18525 .eraseblocks = { {64 * 1024, 256} },
18526 .block_erase = spi_block_erase_d8,
18527 }, {
18528 .eraseblocks = { {16 * 1024 * 1024, 1} },
18529 .block_erase = spi_block_erase_60,
18530 }, {
18531 .eraseblocks = { {16 * 1024 * 1024, 1} },
18532 .block_erase = spi_block_erase_c7,
18533 }
18534 },
Alan Greena1fc01d2019-09-23 17:12:44 +100018535 .printlock = spi_prettyprint_status_register_plain,
Patrick Rudolph34323492018-10-04 14:59:40 +020018536 .unlock = spi_disable_blockprotect,
18537 .write = spi_chip_write_256,
18538 .read = spi_chip_read,
18539 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018540 .reg_bits =
18541 {
Nico Huber2133f592024-01-06 18:30:01 +010018542 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018543 .srp = {STATUS1, 7, RW},
18544 .srl = {STATUS2, 0, RW},
18545 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18546 .tb = {STATUS1, 5, RW},
18547 .sec = {STATUS1, 6, RW},
18548 .cmp = {STATUS2, 6, RW},
18549 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018550 .wp_write_cfg = spi_wp_write_cfg,
18551 .wp_read_cfg = spi_wp_read_cfg,
18552 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018553 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018554 .prepare_access = spi_prepare_io,
18555 .finish_access = spi_finish_io,
Patrick Rudolph34323492018-10-04 14:59:40 +020018556 },
18557
18558 {
18559 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018560 .name = "W25Q128.W",
18561 .bustype = BUS_SPI,
18562 .manufacture_id = WINBOND_NEX_ID,
18563 .model_id = WINBOND_NEX_W25Q128_W,
18564 .total_size = 16384,
18565 .page_size = 256,
18566 /* supports SFDP */
18567 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018568 /* QPI: only FW & JW..M versions */
18569 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018570 .tested = TEST_OK_PREW,
18571 .probe = probe_spi_rdid,
18572 .probe_timing = TIMING_ZERO,
18573 .block_erasers =
18574 {
18575 {
18576 .eraseblocks = { {4 * 1024, 4096} },
18577 .block_erase = spi_block_erase_20,
18578 }, {
18579 .eraseblocks = { {32 * 1024, 512} },
18580 .block_erase = spi_block_erase_52,
18581 }, {
18582 .eraseblocks = { {64 * 1024, 256} },
18583 .block_erase = spi_block_erase_d8,
18584 }, {
18585 .eraseblocks = { {16 * 1024 * 1024, 1} },
18586 .block_erase = spi_block_erase_60,
18587 }, {
18588 .eraseblocks = { {16 * 1024 * 1024, 1} },
18589 .block_erase = spi_block_erase_c7,
18590 }
18591 },
18592 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18593 .unlock = spi_disable_blockprotect,
18594 .write = spi_chip_write_256,
18595 .read = spi_chip_read,
18596 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018597 .reg_bits =
18598 {
Nico Huber2133f592024-01-06 18:30:01 +010018599 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018600 .srp = {STATUS1, 7, RW},
18601 .srl = {STATUS2, 0, RW},
18602 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18603 .tb = {STATUS1, 5, RW},
18604 .sec = {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,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018613 },
18614
18615 {
18616 .vendor = "Winbond",
Peichao Wang1a119492019-11-11 15:26:41 +080018617 .name = "W25Q128.JW.DTR",
18618 .bustype = BUS_SPI,
18619 .manufacture_id = WINBOND_NEX_ID,
18620 .model_id = WINBOND_NEX_W25Q128_DTR,
18621 .total_size = 16384,
18622 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010018623 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
18624 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Peichao Wang1a119492019-11-11 15:26:41 +080018625 .tested = TEST_OK_PREW,
18626 .probe = probe_spi_rdid,
18627 .probe_timing = TIMING_ZERO,
18628 .block_erasers =
18629 {
18630 {
18631 .eraseblocks = { {4 * 1024, 4096} },
18632 .block_erase = spi_block_erase_20,
18633 }, {
18634 .eraseblocks = { {32 * 1024, 512} },
18635 .block_erase = spi_block_erase_52,
18636 }, {
18637 .eraseblocks = { {64 * 1024, 256} },
18638 .block_erase = spi_block_erase_d8,
18639 }, {
18640 .eraseblocks = { {16 * 1024 * 1024, 1} },
18641 .block_erase = spi_block_erase_60,
18642 }, {
18643 .eraseblocks = { {16 * 1024 * 1024, 1} },
18644 .block_erase = spi_block_erase_c7,
18645 }
18646 },
18647 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18648 .unlock = spi_disable_blockprotect,
18649 .write = spi_chip_write_256,
18650 .read = spi_chip_read,
18651 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018652 .reg_bits =
18653 {
Nico Huber2133f592024-01-06 18:30:01 +010018654 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018655 .srp = {STATUS1, 7, RW},
18656 .srl = {STATUS2, 0, RW},
18657 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
18658 .tb = {STATUS1, 5, RW},
18659 .sec = {STATUS1, 6, RW},
18660 .cmp = {STATUS2, 6, RW},
18661 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018662 .wp_write_cfg = spi_wp_write_cfg,
18663 .wp_read_cfg = spi_wp_read_cfg,
18664 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018665 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018666 .prepare_access = spi_prepare_io,
18667 .finish_access = spi_finish_io,
Peichao Wang1a119492019-11-11 15:26:41 +080018668 },
18669
18670 {
18671 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018672 .name = "W25Q16.V",
18673 .bustype = BUS_SPI,
18674 .manufacture_id = WINBOND_NEX_ID,
18675 .model_id = WINBOND_NEX_W25Q16_V,
18676 .total_size = 2048,
18677 .page_size = 256,
18678 /* supports SFDP */
18679 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018680 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018681 .tested = TEST_OK_PREW,
18682 .probe = probe_spi_rdid,
18683 .probe_timing = TIMING_ZERO,
18684 .block_erasers =
18685 {
18686 {
18687 .eraseblocks = { {4 * 1024, 512} },
18688 .block_erase = spi_block_erase_20,
18689 }, {
18690 .eraseblocks = { {32 * 1024, 64} },
18691 .block_erase = spi_block_erase_52,
18692 }, {
18693 .eraseblocks = { {64 * 1024, 32} },
18694 .block_erase = spi_block_erase_d8,
18695 }, {
18696 .eraseblocks = { {2 * 1024 * 1024, 1} },
18697 .block_erase = spi_block_erase_60,
18698 }, {
18699 .eraseblocks = { {2 * 1024 * 1024, 1} },
18700 .block_erase = spi_block_erase_c7,
18701 }
18702 },
Nico Huber2133f592024-01-06 18:30:01 +010018703 .reg_bits =
18704 {
18705 .qe = {STATUS2, 1, RW},
18706 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018707 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18708 .unlock = spi_disable_blockprotect,
18709 .write = spi_chip_write_256,
18710 .read = spi_chip_read,
18711 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020018712 .prepare_access = spi_prepare_io,
18713 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018714 },
18715
18716 {
18717 .vendor = "Winbond",
18718 .name = "W25Q16.W",
18719 .bustype = BUS_SPI,
18720 .manufacture_id = WINBOND_NEX_ID,
18721 .model_id = WINBOND_NEX_W25Q16_W,
18722 .total_size = 2048,
18723 .page_size = 256,
18724 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010018725 /* QPI: only FW & JW..M versions .qpi_read_params = { 2, 4, 6, 8 } */
18726 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018727 .tested = TEST_UNTESTED,
18728 .probe = probe_spi_rdid,
18729 .probe_timing = TIMING_ZERO,
18730 .block_erasers =
18731 {
18732 {
18733 .eraseblocks = { {4 * 1024, 512} },
18734 .block_erase = spi_block_erase_20,
18735 }, {
18736 .eraseblocks = { {32 * 1024, 64} },
18737 .block_erase = spi_block_erase_52,
18738 }, {
18739 .eraseblocks = { {64 * 1024, 32} },
18740 .block_erase = spi_block_erase_d8,
18741 }, {
18742 .eraseblocks = { {2 * 1024 * 1024, 1} },
18743 .block_erase = spi_block_erase_60,
18744 }, {
18745 .eraseblocks = { {2 * 1024 * 1024, 1} },
18746 .block_erase = spi_block_erase_c7,
18747 }
18748 },
Nico Huber2133f592024-01-06 18:30:01 +010018749 .reg_bits =
18750 {
18751 .qe = {STATUS2, 1, RW},
18752 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018753 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18754 .unlock = spi_disable_blockprotect,
18755 .write = spi_chip_write_256,
18756 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010018757 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018758 .prepare_access = spi_prepare_io,
18759 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018760 },
18761
18762 {
18763 .vendor = "Winbond",
18764 .name = "W25Q20.W",
18765 .bustype = BUS_SPI,
18766 .manufacture_id = WINBOND_NEX_ID,
18767 .model_id = WINBOND_NEX_W25Q20_W,
18768 .total_size = 256,
18769 .page_size = 256,
18770 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018771 /* W25Q20EW: FEATURE_WRSR2 */
18772 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018773 .tested = TEST_UNTESTED,
18774 .probe = probe_spi_rdid,
18775 .probe_timing = TIMING_ZERO,
18776 .block_erasers =
18777 {
18778 {
18779 .eraseblocks = { {4 * 1024, 64} },
18780 .block_erase = spi_block_erase_20,
18781 }, {
18782 .eraseblocks = { {32 * 1024, 8} },
18783 .block_erase = spi_block_erase_52,
18784 }, {
18785 .eraseblocks = { {64 * 1024, 4} },
18786 .block_erase = spi_block_erase_d8,
18787 }, {
18788 .eraseblocks = { {256 * 1024, 1} },
18789 .block_erase = spi_block_erase_60,
18790 }, {
18791 .eraseblocks = { {256 * 1024, 1} },
18792 .block_erase = spi_block_erase_c7,
18793 }
18794 },
Nico Huber2133f592024-01-06 18:30:01 +010018795 .reg_bits =
18796 {
18797 .qe = {STATUS2, 1, RW},
18798 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018799 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18800 .unlock = spi_disable_blockprotect,
18801 .write = spi_chip_write_256,
18802 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010018803 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020018804 .prepare_access = spi_prepare_io,
18805 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018806 },
18807
18808 {
18809 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020018810 .name = "W25Q256FV",
Boris Baykovaa6c3742016-06-11 18:29:01 +020018811 .bustype = BUS_SPI,
18812 .manufacture_id = WINBOND_NEX_ID,
18813 .model_id = WINBOND_NEX_W25Q256_V,
18814 .total_size = 32768,
18815 .page_size = 256,
18816 /* supports SFDP */
18817 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018818 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
18819 FEATURE_4BA_ENTER_WREN | FEATURE_4BA_EAR_C5C8 |
18820 FEATURE_4BA_READ | FEATURE_4BA_FAST_READ |
18821 FEATURE_QPI_SRP,
18822 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons3130cbd2018-09-30 19:32:30 +020018823 .tested = TEST_OK_PREW,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018824 .probe = probe_spi_rdid,
18825 .probe_timing = TIMING_ZERO,
18826 .block_erasers =
18827 {
18828 {
18829 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7a077222017-10-14 18:18:30 +020018830 .block_erase = spi_block_erase_20,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018831 }, {
18832 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber7a077222017-10-14 18:18:30 +020018833 .block_erase = spi_block_erase_52,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018834 }, {
18835 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7a077222017-10-14 18:18:30 +020018836 .block_erase = spi_block_erase_d8,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018837 }, {
18838 .eraseblocks = { {32 * 1024 * 1024, 1} },
18839 .block_erase = spi_block_erase_60,
18840 }, {
18841 .eraseblocks = { {32 * 1024 * 1024, 1} },
18842 .block_erase = spi_block_erase_c7,
18843 }
18844 },
18845 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18846 .unlock = spi_disable_blockprotect,
18847 .write = spi_chip_write_256,
18848 .read = spi_chip_read,
18849 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018850 .reg_bits =
18851 {
Nico Huber2133f592024-01-06 18:30:01 +010018852 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018853 .srp = {STATUS1, 7, RW},
18854 .srl = {STATUS2, 0, RW},
18855 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18856 .tb = {STATUS1, 6, RW},
18857 .cmp = {STATUS2, 6, RW},
18858 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018859 .wp_write_cfg = spi_wp_write_cfg,
18860 .wp_read_cfg = spi_wp_read_cfg,
18861 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018862 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018863 .prepare_access = spi_prepare_io,
18864 .finish_access = spi_finish_io,
Boris Baykovaa6c3742016-06-11 18:29:01 +020018865 },
18866
18867 {
18868 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020018869 .name = "W25Q256JV_Q",
18870 .bustype = BUS_SPI,
18871 .manufacture_id = WINBOND_NEX_ID,
18872 .model_id = WINBOND_NEX_W25Q256_V,
18873 .total_size = 32768,
18874 .page_size = 256,
18875 /* supports SFDP */
18876 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018877 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Nico Huberddfbbe82023-12-21 16:31:27 +010018878 .tested = TEST_OK_PREW,
Nico Huber5215eab2022-05-23 15:13:07 +020018879 .probe = probe_spi_rdid,
18880 .probe_timing = TIMING_ZERO,
18881 .block_erasers =
18882 {
18883 {
18884 .eraseblocks = { {4 * 1024, 8192} },
18885 .block_erase = spi_block_erase_21,
18886 }, {
18887 .eraseblocks = { {4 * 1024, 8192} },
18888 .block_erase = spi_block_erase_20,
18889 }, {
18890 .eraseblocks = { {32 * 1024, 1024} },
18891 .block_erase = spi_block_erase_52,
18892 }, {
18893 .eraseblocks = { {64 * 1024, 512} },
18894 .block_erase = spi_block_erase_dc,
18895 }, {
18896 .eraseblocks = { {64 * 1024, 512} },
18897 .block_erase = spi_block_erase_d8,
18898 }, {
18899 .eraseblocks = { {32 * 1024 * 1024, 1} },
18900 .block_erase = spi_block_erase_60,
18901 }, {
18902 .eraseblocks = { {32 * 1024 * 1024, 1} },
18903 .block_erase = spi_block_erase_c7,
18904 }
18905 },
18906 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18907 .unlock = spi_disable_blockprotect,
18908 .write = spi_chip_write_256,
18909 .read = spi_chip_read,
18910 .voltage = {2700, 3600},
18911 .reg_bits =
18912 {
Nico Huber2133f592024-01-06 18:30:01 +010018913 .qe = {STATUS2, 1, RW},
Nico Huber5215eab2022-05-23 15:13:07 +020018914 .srp = {STATUS1, 7, RW},
18915 .srl = {STATUS2, 0, RW},
18916 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18917 .tb = {STATUS1, 6, RW},
18918 .cmp = {STATUS2, 6, RW},
18919 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018920 .wp_write_cfg = spi_wp_write_cfg,
18921 .wp_read_cfg = spi_wp_read_cfg,
18922 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber5215eab2022-05-23 15:13:07 +020018923 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018924 .prepare_access = spi_prepare_io,
18925 .finish_access = spi_finish_io,
Nico Huber5215eab2022-05-23 15:13:07 +020018926 },
18927
18928 {
18929 .vendor = "Winbond",
David Hendricks49876792018-10-27 20:19:42 +000018930 .name = "W25Q256JV_M",
18931 .bustype = BUS_SPI,
18932 .manufacture_id = WINBOND_NEX_ID,
18933 .model_id = WINBOND_NEX_W25Q256JV_M,
18934 .total_size = 32768,
18935 .page_size = 256,
18936 /* supports SFDP */
18937 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010018938 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
18939 FEATURE_4BA | FEATURE_QPI_SRP,
18940 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
David Hendricks49876792018-10-27 20:19:42 +000018941 .tested = TEST_OK_PREW,
18942 .probe = probe_spi_rdid,
18943 .probe_timing = TIMING_ZERO,
18944 .block_erasers =
18945 {
18946 {
18947 .eraseblocks = { {4 * 1024, 8192} },
18948 .block_erase = spi_block_erase_21,
18949 }, {
18950 .eraseblocks = { {4 * 1024, 8192} },
18951 .block_erase = spi_block_erase_20,
18952 }, {
18953 .eraseblocks = { {32 * 1024, 1024} },
18954 .block_erase = spi_block_erase_52,
18955 }, {
18956 .eraseblocks = { {64 * 1024, 512} },
18957 .block_erase = spi_block_erase_dc,
18958 }, {
18959 .eraseblocks = { {64 * 1024, 512} },
18960 .block_erase = spi_block_erase_d8,
18961 }, {
18962 .eraseblocks = { {32 * 1024 * 1024, 1} },
18963 .block_erase = spi_block_erase_60,
18964 }, {
18965 .eraseblocks = { {32 * 1024 * 1024, 1} },
18966 .block_erase = spi_block_erase_c7,
18967 }
18968 },
18969 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
18970 .unlock = spi_disable_blockprotect,
18971 .write = spi_chip_write_256,
18972 .read = spi_chip_read,
18973 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018974 .reg_bits =
18975 {
Nico Huber2133f592024-01-06 18:30:01 +010018976 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018977 .srp = {STATUS1, 7, RW},
18978 .srl = {STATUS2, 0, RW},
18979 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18980 .tb = {STATUS1, 6, RW},
18981 .cmp = {STATUS2, 6, RW},
18982 },
Nico Huberaabb3e02023-01-13 00:22:30 +010018983 .wp_write_cfg = spi_wp_write_cfg,
18984 .wp_read_cfg = spi_wp_read_cfg,
18985 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110018986 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020018987 .prepare_access = spi_prepare_io,
18988 .finish_access = spi_finish_io,
David Hendricks49876792018-10-27 20:19:42 +000018989 },
18990
18991 {
18992 .vendor = "Winbond",
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020018993 .name = "W25Q256JW",
el-coderon01209852020-04-29 12:12:53 +020018994 .bustype = BUS_SPI,
18995 .manufacture_id = WINBOND_NEX_ID,
18996 .model_id = WINBOND_NEX_W25Q256_W,
18997 .total_size = 32768,
18998 .page_size = 256,
18999 /* supports SFDP */
19000 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019001 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
19002 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
el-coderon01209852020-04-29 12:12:53 +020019003 .tested = TEST_OK_PREW,
19004 .probe = probe_spi_rdid,
19005 .probe_timing = TIMING_ZERO,
19006 .block_erasers =
19007 {
19008 {
19009 .eraseblocks = { {4 * 1024, 8192} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020019010 .block_erase = spi_block_erase_21,
19011 }, {
19012 .eraseblocks = { {4 * 1024, 8192} },
el-coderon01209852020-04-29 12:12:53 +020019013 .block_erase = spi_block_erase_20,
19014 }, {
19015 .eraseblocks = { {32 * 1024, 1024} },
19016 .block_erase = spi_block_erase_52,
19017 }, {
19018 .eraseblocks = { {64 * 1024, 512} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020019019 .block_erase = spi_block_erase_dc,
19020 }, {
19021 .eraseblocks = { {64 * 1024, 512} },
el-coderon01209852020-04-29 12:12:53 +020019022 .block_erase = spi_block_erase_d8,
19023 }, {
19024 .eraseblocks = { {32 * 1024 * 1024, 1} },
19025 .block_erase = spi_block_erase_60,
19026 }, {
19027 .eraseblocks = { {32 * 1024 * 1024, 1} },
19028 .block_erase = spi_block_erase_c7,
19029 }
19030 },
Nico Huber2133f592024-01-06 18:30:01 +010019031 .reg_bits =
19032 {
19033 .qe = {STATUS2, 1, RW},
19034 },
el-coderon01209852020-04-29 12:12:53 +020019035 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19036 .unlock = spi_disable_blockprotect,
19037 .write = spi_chip_write_256,
19038 .read = spi_chip_read,
19039 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019040 .prepare_access = spi_prepare_io,
19041 .finish_access = spi_finish_io,
el-coderon01209852020-04-29 12:12:53 +020019042 },
19043
19044 {
19045 .vendor = "Winbond",
David Hendricks31532602020-08-16 17:14:56 -070019046 .name = "W25Q256JW_DTR",
19047 .bustype = BUS_SPI,
19048 .manufacture_id = WINBOND_NEX_ID,
19049 .model_id = WINBOND_NEX_W25Q256_DTR,
19050 .total_size = 32768,
19051 .page_size = 256,
19052 /* supports SFDP */
19053 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019054 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
19055 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
19056 .dummy_cycles =
19057 {
19058 .qpi_read_params = {
19059 2, /* Datasheet Rev.K says 4 is the default, though.
19060 Will assume that the text is wrong, if not,
19061 we'll know why it doesn't work. */
19062 4, 6, 8
19063 },
19064 },
Kapil Porwal111c3802022-12-09 19:41:27 +053019065 .tested = TEST_OK_PREWB,
David Hendricks31532602020-08-16 17:14:56 -070019066 .probe = probe_spi_rdid,
19067 .probe_timing = TIMING_ZERO,
19068 .block_erasers =
19069 {
19070 {
19071 .eraseblocks = { {4 * 1024, 8192} },
19072 .block_erase = spi_block_erase_21,
19073 }, {
19074 .eraseblocks = { {4 * 1024, 8192} },
19075 .block_erase = spi_block_erase_20,
19076 }, {
19077 .eraseblocks = { {32 * 1024, 1024} },
19078 .block_erase = spi_block_erase_52,
19079 }, {
19080 .eraseblocks = { {64 * 1024, 512} },
19081 .block_erase = spi_block_erase_dc,
19082 }, {
19083 .eraseblocks = { {64 * 1024, 512} },
19084 .block_erase = spi_block_erase_d8,
19085 }, {
19086 .eraseblocks = { {32 * 1024 * 1024, 1} },
19087 .block_erase = spi_block_erase_60,
19088 }, {
19089 .eraseblocks = { {32 * 1024 * 1024, 1} },
19090 .block_erase = spi_block_erase_c7,
19091 }
19092 },
19093 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19094 .unlock = spi_disable_blockprotect,
19095 .write = spi_chip_write_256,
19096 .read = spi_chip_read,
19097 .voltage = {1700, 1950},
Kapil Porwal111c3802022-12-09 19:41:27 +053019098 .reg_bits =
19099 {
Nico Huber2133f592024-01-06 18:30:01 +010019100 .qe = {STATUS2, 1, RW},
Kapil Porwal111c3802022-12-09 19:41:27 +053019101 .srp = {STATUS1, 7, RW},
19102 .srl = {STATUS2, 0, RW},
19103 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
19104 .tb = {STATUS1, 6, RW},
19105 .cmp = {STATUS2, 6, RW},
19106 .wps = {STATUS3, 2, RW},
19107 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019108 .wp_write_cfg = spi_wp_write_cfg,
19109 .wp_read_cfg = spi_wp_read_cfg,
19110 .wp_get_ranges = spi_wp_get_available_ranges,
Kapil Porwal111c3802022-12-09 19:41:27 +053019111 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019112 .prepare_access = spi_prepare_io,
19113 .finish_access = spi_finish_io,
David Hendricks31532602020-08-16 17:14:56 -070019114 },
19115
19116 {
19117 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019118 .name = "W25Q32BV/W25Q32CV/W25Q32DV",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019119 .bustype = BUS_SPI,
19120 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019121 .model_id = WINBOND_NEX_W25Q32_V,
19122 .total_size = 4096,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019123 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019124 /* supports SFDP */
19125 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019126 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019127 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019128 .probe = probe_spi_rdid,
19129 .probe_timing = TIMING_ZERO,
19130 .block_erasers =
19131 {
19132 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019133 .eraseblocks = { {4 * 1024, 1024} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019134 .block_erase = spi_block_erase_20,
19135 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019136 .eraseblocks = { {32 * 1024, 128} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019137 .block_erase = spi_block_erase_52,
19138 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019139 .eraseblocks = { {64 * 1024, 64} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019140 .block_erase = spi_block_erase_d8,
19141 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019142 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019143 .block_erase = spi_block_erase_60,
19144 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019145 .eraseblocks = { {4 * 1024 * 1024, 1} },
19146 .block_erase = spi_block_erase_c7,
19147 }
19148 },
19149 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19150 .unlock = spi_disable_blockprotect,
19151 .write = spi_chip_write_256,
19152 .read = spi_chip_read,
19153 .voltage = {2700, 3600},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019154 .reg_bits =
19155 {
Nico Huber2133f592024-01-06 18:30:01 +010019156 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019157 .srp = {STATUS1, 7, RW},
19158 .srl = {STATUS2, 0, RW},
19159 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19160 .tb = {STATUS1, 5, RW},
19161 .sec = {STATUS1, 6, RW},
19162 .cmp = {STATUS2, 6, RW},
19163 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019164 .wp_write_cfg = spi_wp_write_cfg,
19165 .wp_read_cfg = spi_wp_read_cfg,
19166 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019167 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019168 .prepare_access = spi_prepare_io,
19169 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019170 },
19171
19172 {
19173 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019174 .name = "W25Q32FV",
19175 .bustype = BUS_SPI,
19176 .manufacture_id = WINBOND_NEX_ID,
19177 .model_id = WINBOND_NEX_W25Q32_V,
19178 .total_size = 4096,
19179 .page_size = 256,
19180 /* supports SFDP */
19181 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019182 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019183 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010019184 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019185 .tested = TEST_OK_PREW,
19186 .probe = probe_spi_rdid,
19187 .probe_timing = TIMING_ZERO,
19188 .block_erasers =
19189 {
19190 {
19191 .eraseblocks = { {4 * 1024, 1024} },
19192 .block_erase = spi_block_erase_20,
19193 }, {
19194 .eraseblocks = { {32 * 1024, 128} },
19195 .block_erase = spi_block_erase_52,
19196 }, {
19197 .eraseblocks = { {64 * 1024, 64} },
19198 .block_erase = spi_block_erase_d8,
19199 }, {
19200 .eraseblocks = { {4 * 1024 * 1024, 1} },
19201 .block_erase = spi_block_erase_60,
19202 }, {
19203 .eraseblocks = { {4 * 1024 * 1024, 1} },
19204 .block_erase = spi_block_erase_c7,
19205 }
19206 },
19207 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19208 .unlock = spi_disable_blockprotect,
19209 .write = spi_chip_write_256,
19210 .read = spi_chip_read,
19211 .voltage = {2700, 3600},
19212 .reg_bits =
19213 {
Nico Huber2133f592024-01-06 18:30:01 +010019214 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019215 .srp = {STATUS1, 7, RW},
19216 .srl = {STATUS2, 0, RW},
19217 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19218 .tb = {STATUS1, 5, RW},
19219 .sec = {STATUS1, 6, RW},
19220 .cmp = {STATUS2, 6, RW},
19221 .wps = {STATUS3, 2, RW},
19222 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019223 .wp_write_cfg = spi_wp_write_cfg,
19224 .wp_read_cfg = spi_wp_read_cfg,
19225 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019226 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019227 .prepare_access = spi_prepare_io,
19228 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019229 },
19230
19231 {
19232 .vendor = "Winbond",
19233 .name = "W25Q32JV",
19234 .bustype = BUS_SPI,
19235 .manufacture_id = WINBOND_NEX_ID,
19236 .model_id = WINBOND_NEX_W25Q32_V,
19237 .total_size = 4096,
19238 .page_size = 256,
19239 /* supports SFDP */
19240 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019241 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019242 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
19243 .tested = TEST_OK_PREW,
19244 .probe = probe_spi_rdid,
19245 .probe_timing = TIMING_ZERO,
19246 .block_erasers =
19247 {
19248 {
19249 .eraseblocks = { {4 * 1024, 1024} },
19250 .block_erase = spi_block_erase_20,
19251 }, {
19252 .eraseblocks = { {32 * 1024, 128} },
19253 .block_erase = spi_block_erase_52,
19254 }, {
19255 .eraseblocks = { {64 * 1024, 64} },
19256 .block_erase = spi_block_erase_d8,
19257 }, {
19258 .eraseblocks = { {4 * 1024 * 1024, 1} },
19259 .block_erase = spi_block_erase_60,
19260 }, {
19261 .eraseblocks = { {4 * 1024 * 1024, 1} },
19262 .block_erase = spi_block_erase_c7,
19263 }
19264 },
19265 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19266 .unlock = spi_disable_blockprotect,
19267 .write = spi_chip_write_256,
19268 .read = spi_chip_read,
19269 .voltage = {2700, 3600},
19270 .reg_bits =
19271 {
Nico Huber2133f592024-01-06 18:30:01 +010019272 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019273 .srp = {STATUS1, 7, RW},
19274 .srl = {STATUS2, 0, RW},
19275 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19276 .tb = {STATUS1, 5, RW},
19277 .sec = {STATUS1, 6, RW},
19278 .cmp = {STATUS2, 6, RW},
19279 .wps = {STATUS3, 2, RW},
19280 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019281 .wp_write_cfg = spi_wp_write_cfg,
19282 .wp_read_cfg = spi_wp_read_cfg,
19283 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019284 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019285 .prepare_access = spi_prepare_io,
19286 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019287 },
19288
19289 {
19290 .vendor = "Winbond",
Angel Pons0d4354e2024-05-26 16:33:51 +020019291 .name = "W25Q32JV-.M",
19292 .bustype = BUS_SPI,
19293 .manufacture_id = WINBOND_NEX_ID,
19294 .model_id = WINBOND_NEX_W25Q32JV,
19295 .total_size = 4096,
19296 .page_size = 256,
19297 /* supports SFDP */
Nico Huber1412d9f2024-01-06 18:25:49 +010019298 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Angel Pons0d4354e2024-05-26 16:33:51 +020019299 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010019300 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons0d4354e2024-05-26 16:33:51 +020019301 .tested = TEST_OK_PREW,
19302 .probe = probe_spi_rdid,
19303 .probe_timing = TIMING_ZERO,
19304 .block_erasers =
19305 {
19306 {
19307 .eraseblocks = { {4 * 1024, 1024} },
19308 .block_erase = spi_block_erase_20,
19309 }, {
19310 .eraseblocks = { {32 * 1024, 128} },
19311 .block_erase = spi_block_erase_52,
19312 }, {
19313 .eraseblocks = { {64 * 1024, 64} },
19314 .block_erase = spi_block_erase_d8,
19315 }, {
19316 .eraseblocks = { {4 * 1024 * 1024, 1} },
19317 .block_erase = spi_block_erase_60,
19318 }, {
19319 .eraseblocks = { {4 * 1024 * 1024, 1} },
19320 .block_erase = spi_block_erase_c7,
19321 }
19322 },
19323 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19324 .unlock = spi_disable_blockprotect_bp2_srwd,
19325 .write = spi_chip_write_256,
19326 .read = spi_chip_read,
19327 .voltage = {2700, 3600},
19328 .reg_bits =
19329 {
Nico Huber2133f592024-01-06 18:30:01 +010019330 .qe = {STATUS2, 1, RW},
Angel Pons0d4354e2024-05-26 16:33:51 +020019331 .srp = {STATUS1, 7, RW},
19332 .srl = {STATUS2, 0, RW},
19333 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19334 .tb = {STATUS1, 5, RW},
19335 .sec = {STATUS1, 6, RW},
19336 .cmp = {STATUS2, 6, RW},
19337 .wps = {STATUS3, 2, RW},
19338 },
19339 .wp_write_cfg = spi_wp_write_cfg,
19340 .wp_read_cfg = spi_wp_read_cfg,
19341 .wp_get_ranges = spi_wp_get_available_ranges,
19342 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019343 .prepare_access = spi_prepare_io,
19344 .finish_access = spi_finish_io,
Angel Pons0d4354e2024-05-26 16:33:51 +020019345 },
19346
19347 {
19348 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019349 .name = "W25Q32BW/W25Q32CW/W25Q32DW",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019350 .bustype = BUS_SPI,
19351 .manufacture_id = WINBOND_NEX_ID,
19352 .model_id = WINBOND_NEX_W25Q32_W,
19353 .total_size = 4096,
19354 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019355 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019356 /* QPI: only DW version */
19357 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019358 .tested = TEST_OK_PREW,
19359 .probe = probe_spi_rdid,
19360 .probe_timing = TIMING_ZERO,
19361 .block_erasers =
19362 {
19363 {
19364 .eraseblocks = { {4 * 1024, 1024} },
19365 .block_erase = spi_block_erase_20,
19366 }, {
19367 .eraseblocks = { {32 * 1024, 128} },
19368 .block_erase = spi_block_erase_52,
19369 }, {
19370 .eraseblocks = { {64 * 1024, 64} },
19371 .block_erase = spi_block_erase_d8,
19372 }, {
19373 .eraseblocks = { {4 * 1024 * 1024, 1} },
19374 .block_erase = spi_block_erase_60,
19375 }, {
19376 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019377 .block_erase = spi_block_erase_c7,
19378 }
19379 },
19380 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19381 .unlock = spi_disable_blockprotect,
19382 .write = spi_chip_write_256,
19383 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019384 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019385 .reg_bits =
19386 {
Nico Huber2133f592024-01-06 18:30:01 +010019387 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019388 .srp = {STATUS1, 7, RW},
19389 .srl = {STATUS2, 0, RW},
19390 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19391 .tb = {STATUS1, 5, RW},
19392 .sec = {STATUS1, 6, RW},
19393 .cmp = {STATUS2, 6, RW},
19394 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019395 .wp_write_cfg = spi_wp_write_cfg,
19396 .wp_read_cfg = spi_wp_read_cfg,
19397 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019398 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019399 .prepare_access = spi_prepare_io,
19400 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019401 },
19402
19403 {
19404 .vendor = "Winbond",
19405 .name = "W25Q32FW",
19406 .bustype = BUS_SPI,
19407 .manufacture_id = WINBOND_NEX_ID,
19408 .model_id = WINBOND_NEX_W25Q32_W,
19409 .total_size = 4096,
19410 .page_size = 256,
19411 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010019412 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019413 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010019414 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019415 .tested = TEST_OK_PREW,
19416 .probe = probe_spi_rdid,
19417 .probe_timing = TIMING_ZERO,
19418 .block_erasers =
19419 {
19420 {
19421 .eraseblocks = { {4 * 1024, 1024} },
19422 .block_erase = spi_block_erase_20,
19423 }, {
19424 .eraseblocks = { {32 * 1024, 128} },
19425 .block_erase = spi_block_erase_52,
19426 }, {
19427 .eraseblocks = { {64 * 1024, 64} },
19428 .block_erase = spi_block_erase_d8,
19429 }, {
19430 .eraseblocks = { {4 * 1024 * 1024, 1} },
19431 .block_erase = spi_block_erase_60,
19432 }, {
19433 .eraseblocks = { {4 * 1024 * 1024, 1} },
19434 .block_erase = spi_block_erase_c7,
19435 }
19436 },
19437 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19438 .unlock = spi_disable_blockprotect,
19439 .write = spi_chip_write_256,
19440 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010019441 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019442 .reg_bits =
19443 {
Nico Huber2133f592024-01-06 18:30:01 +010019444 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019445 .srp = {STATUS1, 7, RW},
19446 .srl = {STATUS2, 0, RW},
19447 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19448 .tb = {STATUS1, 5, RW},
19449 .sec = {STATUS1, 6, RW},
19450 .cmp = {STATUS2, 6, RW},
19451 .wps = {STATUS3, 2, RW},
19452 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019453 .wp_write_cfg = spi_wp_write_cfg,
19454 .wp_read_cfg = spi_wp_read_cfg,
19455 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019456 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019457 .prepare_access = spi_prepare_io,
19458 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019459 },
19460
19461 {
19462 .vendor = "Winbond",
19463 .name = "W25Q32JW...Q",
19464 .bustype = BUS_SPI,
19465 .manufacture_id = WINBOND_NEX_ID,
19466 .model_id = WINBOND_NEX_W25Q32_W,
19467 .total_size = 4096,
19468 .page_size = 256,
19469 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19470 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010019471 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019472 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
19473 .tested = TEST_OK_PREW,
19474 .probe = probe_spi_rdid,
19475 .probe_timing = TIMING_ZERO,
19476 .block_erasers =
19477 {
19478 {
19479 .eraseblocks = { {4 * 1024, 1024} },
19480 .block_erase = spi_block_erase_20,
19481 }, {
19482 .eraseblocks = { {32 * 1024, 128} },
19483 .block_erase = spi_block_erase_52,
19484 }, {
19485 .eraseblocks = { {64 * 1024, 64} },
19486 .block_erase = spi_block_erase_d8,
19487 }, {
19488 .eraseblocks = { {4 * 1024 * 1024, 1} },
19489 .block_erase = spi_block_erase_60,
19490 }, {
19491 .eraseblocks = { {4 * 1024 * 1024, 1} },
19492 .block_erase = spi_block_erase_c7,
19493 }
19494 },
19495 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19496 .unlock = spi_disable_blockprotect,
19497 .write = spi_chip_write_256,
19498 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019499 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019500 .reg_bits =
19501 {
19502 .srp = {STATUS1, 7, RW},
19503 .srl = {STATUS2, 0, RW},
19504 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19505 .tb = {STATUS1, 5, RW},
19506 .sec = {STATUS1, 6, RW},
19507 .cmp = {STATUS2, 6, RW},
19508 .wps = {STATUS3, 2, RW},
19509 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019510 .wp_write_cfg = spi_wp_write_cfg,
19511 .wp_read_cfg = spi_wp_read_cfg,
19512 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019513 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019514 .prepare_access = spi_prepare_io,
19515 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019516 },
19517
19518 {
19519 .vendor = "Winbond",
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019520 .name = "W25Q32JW...M",
19521 .bustype = BUS_SPI,
19522 .manufacture_id = WINBOND_NEX_ID,
19523 .model_id = WINBOND_NEX_W25Q32JW_M,
19524 .total_size = 4096,
19525 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019526 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19527 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010019528 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019529 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_WRSR_EXT2,
Nico Huber2133f592024-01-06 18:30:01 +010019530 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019531 .tested = TEST_OK_PREW,
19532 .probe = probe_spi_rdid,
19533 .probe_timing = TIMING_ZERO,
19534 .block_erasers =
19535 {
19536 {
19537 .eraseblocks = { {4 * 1024, 1024} },
19538 .block_erase = spi_block_erase_20,
19539 }, {
19540 .eraseblocks = { {32 * 1024, 128} },
19541 .block_erase = spi_block_erase_52,
19542 }, {
19543 .eraseblocks = { {64 * 1024, 64} },
19544 .block_erase = spi_block_erase_d8,
19545 }, {
19546 .eraseblocks = { {4 * 1024 * 1024, 1} },
19547 .block_erase = spi_block_erase_60,
19548 }, {
19549 .eraseblocks = { {4 * 1024 * 1024, 1} },
19550 .block_erase = spi_block_erase_c7,
19551 }
19552 },
19553 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19554 .unlock = spi_disable_blockprotect_bp2_srwd,
19555 .write = spi_chip_write_256,
19556 .read = spi_chip_read,
19557 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019558 .reg_bits =
19559 {
Nico Huber2133f592024-01-06 18:30:01 +010019560 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019561 .srp = {STATUS1, 7, RW},
19562 .srl = {STATUS2, 0, RW},
19563 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19564 .tb = {STATUS1, 5, RW},
19565 .sec = {STATUS1, 6, RW},
19566 .cmp = {STATUS2, 6, RW},
19567 .wps = {STATUS3, 2, RW},
19568 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019569 .wp_write_cfg = spi_wp_write_cfg,
19570 .wp_read_cfg = spi_wp_read_cfg,
19571 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030019572 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019573 .prepare_access = spi_prepare_io,
19574 .finish_access = spi_finish_io,
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100019575 },
19576
19577 {
19578 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019579 .name = "W25Q40.V",
19580 .bustype = BUS_SPI,
19581 .manufacture_id = WINBOND_NEX_ID,
19582 .model_id = WINBOND_NEX_W25Q40_V,
19583 .total_size = 512,
19584 .page_size = 256,
19585 /* supports SFDP */
19586 /* OTP: 756B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019587 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019588 .tested = TEST_OK_PREW,
19589 .probe = probe_spi_rdid,
19590 .probe_timing = TIMING_ZERO,
19591 .block_erasers =
19592 {
19593 {
19594 .eraseblocks = { {4 * 1024, 128} },
19595 .block_erase = spi_block_erase_20,
19596 }, {
19597 .eraseblocks = { {32 * 1024, 16} },
19598 .block_erase = spi_block_erase_52,
19599 }, {
19600 .eraseblocks = { {64 * 1024, 8} },
19601 .block_erase = spi_block_erase_d8,
19602 }, {
19603 .eraseblocks = { {512 * 1024, 1} },
19604 .block_erase = spi_block_erase_60,
19605 }, {
19606 .eraseblocks = { {512 * 1024, 1} },
19607 .block_erase = spi_block_erase_c7,
19608 }
19609 },
Nico Huber2133f592024-01-06 18:30:01 +010019610 .reg_bits =
19611 {
19612 .qe = {STATUS2, 1, RW},
19613 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019614 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19615 .unlock = spi_disable_blockprotect,
19616 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber2133f592024-01-06 18:30:01 +010019617 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019618 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019619 .prepare_access = spi_prepare_io,
19620 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019621 },
19622
19623 {
19624 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020019625 .name = "W25Q40BW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019626 .bustype = BUS_SPI,
19627 .manufacture_id = WINBOND_NEX_ID,
Nico Huber25683572018-03-30 13:50:13 +020019628 .model_id = WINBOND_NEX_W25Q40BW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019629 .total_size = 512,
19630 .page_size = 256,
19631 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019632 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Angel Pons3164a0c2018-09-30 20:26:06 +020019633 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019634 .probe = probe_spi_rdid,
19635 .probe_timing = TIMING_ZERO,
19636 .block_erasers =
19637 {
19638 {
19639 .eraseblocks = { {4 * 1024, 128} },
19640 .block_erase = spi_block_erase_20,
19641 }, {
19642 .eraseblocks = { {32 * 1024, 16} },
19643 .block_erase = spi_block_erase_52,
19644 }, {
19645 .eraseblocks = { {64 * 1024, 8} },
19646 .block_erase = spi_block_erase_d8,
19647 }, {
19648 .eraseblocks = { {512 * 1024, 1} },
19649 .block_erase = spi_block_erase_60,
19650 }, {
19651 .eraseblocks = { {512 * 1024, 1} },
19652 .block_erase = spi_block_erase_c7,
19653 }
19654 },
Nico Huber2133f592024-01-06 18:30:01 +010019655 .reg_bits =
19656 {
19657 .qe = {STATUS2, 1, RW},
19658 },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019659 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19660 .unlock = spi_disable_blockprotect,
19661 .write = spi_chip_write_256,
19662 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019663 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019664 .prepare_access = spi_prepare_io,
19665 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019666 },
19667
19668 {
19669 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020019670 .name = "W25Q40EW",
19671 .bustype = BUS_SPI,
19672 .manufacture_id = WINBOND_NEX_ID,
19673 .model_id = WINBOND_NEX_W25Q40EW,
19674 .total_size = 512,
19675 .page_size = 256,
19676 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019677 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
19678 FEATURE_OTP | FEATURE_QPI_SRP,
19679 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green07b8a172019-09-23 16:47:05 +100019680 .tested = TEST_OK_PREW,
Nico Huber25683572018-03-30 13:50:13 +020019681 .probe = probe_spi_rdid,
19682 .probe_timing = TIMING_ZERO,
19683 .block_erasers =
19684 {
19685 {
19686 .eraseblocks = { {4 * 1024, 128} },
19687 .block_erase = spi_block_erase_20,
19688 }, {
19689 .eraseblocks = { {32 * 1024, 16} },
19690 .block_erase = spi_block_erase_52,
19691 }, {
19692 .eraseblocks = { {64 * 1024, 8} },
19693 .block_erase = spi_block_erase_d8,
19694 }, {
19695 .eraseblocks = { {512 * 1024, 1} },
19696 .block_erase = spi_block_erase_60,
19697 }, {
19698 .eraseblocks = { {512 * 1024, 1} },
19699 .block_erase = spi_block_erase_c7,
19700 }
19701 },
Nico Huber2133f592024-01-06 18:30:01 +010019702 .reg_bits =
19703 {
19704 .qe = {STATUS2, 1, RW},
19705 },
Nico Huber25683572018-03-30 13:50:13 +020019706 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19707 .unlock = spi_disable_blockprotect,
19708 .write = spi_chip_write_256,
19709 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010019710 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020019711 .prepare_access = spi_prepare_io,
19712 .finish_access = spi_finish_io,
Nico Huber25683572018-03-30 13:50:13 +020019713 },
19714
Stanislav Sedovf5775442018-03-07 14:16:51 -080019715 {
19716 .vendor = "Winbond",
Joel Stanley55439612019-07-27 19:25:35 +093019717 .name = "W25Q512JV",
19718 .bustype = BUS_SPI,
19719 .manufacture_id = WINBOND_NEX_ID,
19720 .model_id = WINBOND_NEX_W25Q512JV,
19721 .total_size = 64 * 1024,
19722 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010019723 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
19724 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Joel Stanley55439612019-07-27 19:25:35 +093019725 .tested = TEST_OK_PREW,
19726 .probe = probe_spi_rdid,
19727 .probe_timing = TIMING_ZERO,
19728 .block_erasers =
19729 {
19730 {
19731 .eraseblocks = { {4 * 1024, 16384} },
19732 .block_erase = spi_block_erase_21,
19733 }, {
19734 .eraseblocks = { {4 * 1024, 16384} },
19735 .block_erase = spi_block_erase_20,
19736 }, {
19737 .eraseblocks = { {32 * 1024, 2048} },
19738 .block_erase = spi_block_erase_52,
19739 }, {
19740 .eraseblocks = { {64 * 1024, 1024} },
19741 .block_erase = spi_block_erase_dc,
19742 }, {
19743 .eraseblocks = { {64 * 1024, 1024} },
19744 .block_erase = spi_block_erase_d8,
19745 }, {
19746 .eraseblocks = { {64 * 1024 * 1024, 1} },
19747 .block_erase = spi_block_erase_60,
19748 }, {
19749 .eraseblocks = { {64 * 1024 * 1024, 1} },
19750 .block_erase = spi_block_erase_c7,
19751 }
19752 },
Nico Huber2133f592024-01-06 18:30:01 +010019753 .reg_bits =
19754 {
19755 .qe = {STATUS2, 1, RW},
19756 },
Joel Stanley55439612019-07-27 19:25:35 +093019757 .printlock = spi_prettyprint_status_register_plain,
19758 .unlock = spi_disable_blockprotect,
19759 .write = spi_chip_write_256,
19760 .read = spi_chip_read,
19761 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020019762 .prepare_access = spi_prepare_io,
19763 .finish_access = spi_finish_io,
Joel Stanley55439612019-07-27 19:25:35 +093019764 },
19765
19766 {
Alexandru M Stan6ce26a72024-10-11 22:47:24 -070019767 .vendor = "Winbond",
19768 .name = "W25R512NW/W74M51NW",
19769 .bustype = BUS_SPI,
19770 .manufacture_id = WINBOND_NEX_ID,
19771 .model_id = WINBOND_NEX_W25R512NW,
19772 .total_size = 65536,
19773 .page_size = 256,
19774 /* supports SFDP */
19775 /* OTP: 3X256B; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
19776 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
19777 .tested = TEST_OK_PREW,
19778 .probe = probe_spi_rdid,
19779 .probe_timing = TIMING_ZERO,
19780 .block_erasers =
19781 {
19782 {
19783 .eraseblocks = { {4 * 1024, 16384} },
19784 .block_erase = spi_block_erase_21,
19785 }, {
19786 .eraseblocks = { {4 * 1024, 16384} },
19787 .block_erase = spi_block_erase_20,
19788 }, {
19789 .eraseblocks = { {32 * 1024, 2048} },
19790 .block_erase = spi_block_erase_52,
19791 }, {
19792 .eraseblocks = { {64 * 1024, 1024} },
19793 .block_erase = spi_block_erase_dc,
19794 }, {
19795 .eraseblocks = { {64 * 1024, 1024} },
19796 .block_erase = spi_block_erase_d8,
19797 }, {
19798 .eraseblocks = { {64 * 1024 * 1024, 1} },
19799 .block_erase = spi_block_erase_60,
19800 }, {
19801 .eraseblocks = { {64 * 1024 * 1024, 1} },
19802 .block_erase = spi_block_erase_c7,
19803 }
19804 },
19805 .printlock = spi_prettyprint_status_register_bp3_srwd,
19806 .unlock = spi_disable_blockprotect,
19807 .write = spi_chip_write_256,
19808 .read = spi_chip_read,
19809 .voltage = {1700, 1950},
19810 .prepare_access = spi_prepare_io,
19811 .finish_access = spi_finish_io,
19812 },
19813
19814 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010019815 .vendor = "Winbond",
19816 .name = "W25Q512NW-IM",
19817 .bustype = BUS_SPI,
19818 .manufacture_id = WINBOND_NEX_ID,
19819 .model_id = WINBOND_NEX_W25Q512NW_IM,
19820 .total_size = 64 * 1024,
19821 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010019822 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
19823 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
19824 .dummy_cycles =
19825 {
19826 /* Actually has 3 parameter bits, but higher values only help with DTR. */
19827 .qpi_read_params = { 2, 4, 6, 8 },
19828 },
Subrata Banikf5bffd92022-12-14 12:30:43 +053019829 .tested = TEST_OK_PREWB,
Felix Singer3c9bdb92022-12-15 23:30:16 +010019830 .probe = probe_spi_rdid,
19831 .probe_timing = TIMING_ZERO,
19832 .block_erasers =
Atul Dhudase2502dbd2021-09-21 10:02:20 +053019833 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010019834 {
19835 .eraseblocks = { {4 * 1024, 16384} },
19836 .block_erase = spi_block_erase_21,
19837 }, {
19838 .eraseblocks = { {4 * 1024, 16384} },
19839 .block_erase = spi_block_erase_20,
19840 }, {
19841 .eraseblocks = { {32 * 1024, 2048} },
19842 .block_erase = spi_block_erase_52,
19843 }, {
19844 .eraseblocks = { {64 * 1024, 1024} },
19845 .block_erase = spi_block_erase_dc,
19846 }, {
19847 .eraseblocks = { {64 * 1024, 1024} },
19848 .block_erase = spi_block_erase_d8,
19849 }, {
19850 .eraseblocks = { {64 * 1024 * 1024, 1} },
19851 .block_erase = spi_block_erase_60,
19852 }, {
19853 .eraseblocks = { {64 * 1024 * 1024, 1} },
19854 .block_erase = spi_block_erase_c7,
19855 }
19856 },
19857 .unlock = spi_disable_blockprotect,
19858 .write = spi_chip_write_256,
19859 .read = spi_chip_read,
19860 .voltage = {1650, 1950},
Subrata Banikf5bffd92022-12-14 12:30:43 +053019861 .reg_bits =
19862 {
Nico Huber2133f592024-01-06 18:30:01 +010019863 .qe = {STATUS2, 1, RW},
Subrata Banikf5bffd92022-12-14 12:30:43 +053019864 .srp = {STATUS1, 7, RW},
19865 .srl = {STATUS2, 0, RW},
19866 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
19867 .tb = {STATUS1, 6, RW},
19868 .cmp = {STATUS2, 6, RW},
19869 .wps = {STATUS3, 2, RW},
19870 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019871 .wp_write_cfg = spi_wp_write_cfg,
19872 .wp_read_cfg = spi_wp_read_cfg,
19873 .wp_get_ranges = spi_wp_get_available_ranges,
Subrata Banikf5bffd92022-12-14 12:30:43 +053019874 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019875 .prepare_access = spi_prepare_io,
19876 .finish_access = spi_finish_io,
Atul Dhudase2502dbd2021-09-21 10:02:20 +053019877 },
19878
19879 {
Joel Stanley55439612019-07-27 19:25:35 +093019880 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019881 .name = "W25Q64BV/W25Q64CV/W25Q64FV",
Stanislav Sedovf5775442018-03-07 14:16:51 -080019882 .bustype = BUS_SPI,
19883 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019884 .model_id = WINBOND_NEX_W25Q64_V,
19885 .total_size = 8192,
Stanislav Sedovf5775442018-03-07 14:16:51 -080019886 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019887 /* supports SFDP */
19888 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019889 /* QPI: only FV version */
19890 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030019891 .tested = TEST_OK_PREWB,
Stanislav Sedovf5775442018-03-07 14:16:51 -080019892 .probe = probe_spi_rdid,
19893 .probe_timing = TIMING_ZERO,
19894 .block_erasers =
19895 {
19896 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019897 .eraseblocks = { {4 * 1024, 2048} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019898 .block_erase = spi_block_erase_20,
19899 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019900 .eraseblocks = { {32 * 1024, 256} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019901 .block_erase = spi_block_erase_52,
19902 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019903 .eraseblocks = { {64 * 1024, 128} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019904 .block_erase = spi_block_erase_d8,
19905 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019906 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019907 .block_erase = spi_block_erase_60,
19908 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019909 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080019910 .block_erase = spi_block_erase_c7,
19911 }
19912 },
19913 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19914 .unlock = spi_disable_blockprotect,
19915 .write = spi_chip_write_256,
19916 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019917 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019918 .reg_bits =
19919 {
Nico Huber2133f592024-01-06 18:30:01 +010019920 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019921 .srp = {STATUS1, 7, RW},
19922 .srl = {STATUS2, 0, RW},
19923 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19924 .tb = {STATUS1, 5, RW},
19925 .sec = {STATUS1, 6, RW},
19926 .cmp = {STATUS2, 6, RW},
19927 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019928 .wp_write_cfg = spi_wp_write_cfg,
19929 .wp_read_cfg = spi_wp_read_cfg,
19930 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019931 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019932 .prepare_access = spi_prepare_io,
19933 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000019934 },
19935
19936 {
19937 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019938 .name = "W25Q64JV-.Q",
19939 .bustype = BUS_SPI,
19940 .manufacture_id = WINBOND_NEX_ID,
19941 .model_id = WINBOND_NEX_W25Q64_V,
19942 .total_size = 8192,
19943 .page_size = 256,
19944 /* supports SFDP */
19945 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010019946 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020019947 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019948 .tested = TEST_OK_PREW,
19949 .probe = probe_spi_rdid,
19950 .probe_timing = TIMING_ZERO,
19951 .block_erasers =
19952 {
19953 {
19954 .eraseblocks = { {4 * 1024, 2048} },
19955 .block_erase = spi_block_erase_20,
19956 }, {
19957 .eraseblocks = { {32 * 1024, 256} },
19958 .block_erase = spi_block_erase_52,
19959 }, {
19960 .eraseblocks = { {64 * 1024, 128} },
19961 .block_erase = spi_block_erase_d8,
19962 }, {
19963 .eraseblocks = { {8 * 1024 * 1024, 1} },
19964 .block_erase = spi_block_erase_60,
19965 }, {
19966 .eraseblocks = { {8 * 1024 * 1024, 1} },
19967 .block_erase = spi_block_erase_c7,
19968 }
19969 },
19970 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19971 .unlock = spi_disable_blockprotect,
19972 .write = spi_chip_write_256,
19973 .read = spi_chip_read,
19974 .voltage = {2700, 3600},
19975 .reg_bits =
19976 {
Nico Huber2133f592024-01-06 18:30:01 +010019977 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019978 .srp = {STATUS1, 7, RW},
19979 .srl = {STATUS2, 0, RW},
19980 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
19981 .tb = {STATUS1, 5, RW},
19982 .sec = {STATUS1, 6, RW},
19983 .cmp = {STATUS2, 6, RW},
19984 .wps = {STATUS3, 2, RW},
19985 },
Nico Huberaabb3e02023-01-13 00:22:30 +010019986 .wp_write_cfg = spi_wp_write_cfg,
19987 .wp_read_cfg = spi_wp_read_cfg,
19988 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019989 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020019990 .prepare_access = spi_prepare_io,
19991 .finish_access = spi_finish_io,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020019992 },
19993
19994 {
19995 .vendor = "Winbond",
19996 .name = "W25Q64JV-.M",
Simon Buhrow236a38c2021-11-05 11:48:30 +010019997 .bustype = BUS_SPI,
19998 .manufacture_id = WINBOND_NEX_ID,
19999 .model_id = WINBOND_NEX_W25Q64JV,
20000 .total_size = 8192,
20001 .page_size = 256,
20002 /* supports SFDP */
Nico Huber2133f592024-01-06 18:30:01 +010020003 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
20004 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010020005 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Simon Buhrow236a38c2021-11-05 11:48:30 +010020006 .tested = TEST_OK_PREW,
20007 .probe = probe_spi_rdid,
20008 .probe_timing = TIMING_ZERO,
20009 .block_erasers =
20010 {
20011 {
20012 .eraseblocks = { {4 * 1024, 2048} },
20013 .block_erase = spi_block_erase_20,
20014 }, {
20015 .eraseblocks = { {32 * 1024, 256} },
20016 .block_erase = spi_block_erase_52,
20017 }, {
20018 .eraseblocks = { {64 * 1024, 128} },
20019 .block_erase = spi_block_erase_d8,
20020 }, {
20021 .eraseblocks = { {8 * 1024 * 1024, 1} },
20022 .block_erase = spi_block_erase_60,
20023 }, {
20024 .eraseblocks = { {8 * 1024 * 1024, 1} },
20025 .block_erase = spi_block_erase_c7,
20026 }
20027 },
Nico Huber2133f592024-01-06 18:30:01 +010020028 .reg_bits =
20029 {
20030 .qe = {STATUS2, 1, RW},
20031 },
Simon Buhrow236a38c2021-11-05 11:48:30 +010020032 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
20033 .unlock = spi_disable_blockprotect_bp2_srwd,
20034 .write = spi_chip_write_256,
20035 .read = spi_chip_read,
20036 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020037 .prepare_access = spi_prepare_io,
20038 .finish_access = spi_finish_io,
Simon Buhrow236a38c2021-11-05 11:48:30 +010020039 },
20040
20041 {
20042 .vendor = "Winbond",
Nico Hubera358b142024-04-14 18:29:06 +020020043 .name = "W25Q64DW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000020044 .bustype = BUS_SPI,
20045 .manufacture_id = WINBOND_NEX_ID,
20046 .model_id = WINBOND_NEX_W25Q64_W,
20047 .total_size = 8192,
20048 .page_size = 256,
20049 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010020050 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
20051 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nico Hubera358b142024-04-14 18:29:06 +020020052 .tested = TEST_OK_PREW,
20053 .probe = probe_spi_rdid,
20054 .probe_timing = TIMING_ZERO,
20055 .block_erasers =
20056 {
20057 {
20058 .eraseblocks = { {4 * 1024, 2048} },
20059 .block_erase = spi_block_erase_20,
20060 }, {
20061 .eraseblocks = { {32 * 1024, 256} },
20062 .block_erase = spi_block_erase_52,
20063 }, {
20064 .eraseblocks = { {64 * 1024, 128} },
20065 .block_erase = spi_block_erase_d8,
20066 }, {
20067 .eraseblocks = { {8 * 1024 * 1024, 1} },
20068 .block_erase = spi_block_erase_60,
20069 }, {
20070 .eraseblocks = { {8 * 1024 * 1024, 1} },
20071 .block_erase = spi_block_erase_c7,
20072 }
20073 },
20074 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20075 .unlock = spi_disable_blockprotect,
20076 .write = spi_chip_write_256,
20077 .read = spi_chip_read,
20078 .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
20079 .reg_bits =
20080 {
20081 .srp = {STATUS1, 7, RW},
20082 .srl = {STATUS2, 0, RW},
20083 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
20084 .tb = {STATUS1, 5, RW},
20085 .sec = {STATUS1, 6, RW},
20086 .cmp = {STATUS2, 6, RW},
20087 },
20088 .wp_write_cfg = spi_wp_write_cfg,
20089 .wp_read_cfg = spi_wp_read_cfg,
20090 .wp_get_ranges = spi_wp_get_available_ranges,
20091 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020020092 .prepare_access = spi_prepare_io,
20093 .finish_access = spi_finish_io,
Nico Hubera358b142024-04-14 18:29:06 +020020094 },
20095
20096 {
20097 .vendor = "Winbond",
20098 .name = "W25Q64FW/W25Q64JW...Q",
20099 .bustype = BUS_SPI,
20100 .manufacture_id = WINBOND_NEX_ID,
20101 .model_id = WINBOND_NEX_W25Q64_W,
20102 .total_size = 8192,
20103 .page_size = 256,
20104 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010020105 /* FEATURE_QPI_SRP (2, 4, 6, 8): only FW version */
Nico Hubera358b142024-04-14 18:29:06 +020020106 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
Nico Huber1412d9f2024-01-06 18:25:49 +010020107 FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030020108 .tested = TEST_OK_PREWB,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000020109 .probe = probe_spi_rdid,
20110 .probe_timing = TIMING_ZERO,
20111 .block_erasers =
20112 {
20113 {
20114 .eraseblocks = { {4 * 1024, 2048} },
20115 .block_erase = spi_block_erase_20,
20116 }, {
20117 .eraseblocks = { {32 * 1024, 256} },
20118 .block_erase = spi_block_erase_52,
20119 }, {
20120 .eraseblocks = { {64 * 1024, 128} },
20121 .block_erase = spi_block_erase_d8,
20122 }, {
20123 .eraseblocks = { {8 * 1024 * 1024, 1} },
20124 .block_erase = spi_block_erase_60,
20125 }, {
20126 .eraseblocks = { {8 * 1024 * 1024, 1} },
20127 .block_erase = spi_block_erase_c7,
20128 }
20129 },
20130 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20131 .unlock = spi_disable_blockprotect,
20132 .write = spi_chip_write_256,
20133 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010020134 .voltage = {1700, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110020135 .reg_bits =
20136 {
Nico Huber2133f592024-01-06 18:30:01 +010020137 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110020138 .srp = {STATUS1, 7, RW},
20139 .srl = {STATUS2, 0, RW},
20140 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
20141 .tb = {STATUS1, 5, RW},
20142 .sec = {STATUS1, 6, RW},
20143 .cmp = {STATUS2, 6, RW},
20144 },
Nico Huberaabb3e02023-01-13 00:22:30 +010020145 .wp_write_cfg = spi_wp_write_cfg,
20146 .wp_read_cfg = spi_wp_read_cfg,
20147 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110020148 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020020149 .prepare_access = spi_prepare_io,
20150 .finish_access = spi_finish_io,
Antony Rheneus0fbba982011-05-26 14:28:51 +000020151 },
20152
20153 {
20154 .vendor = "Winbond",
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100020155 .name = "W25Q64JW...M",
Scott Chao1bbc5012020-04-08 22:10:50 +080020156 .bustype = BUS_SPI,
20157 .manufacture_id = WINBOND_NEX_ID,
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100020158 .model_id = WINBOND_NEX_W25Q64JW_M,
Scott Chao1bbc5012020-04-08 22:10:50 +080020159 .total_size = 8192,
20160 .page_size = 256,
20161 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
20162 /* QPI enable 0x38, disable 0xFF */
Nico Huber1412d9f2024-01-06 18:25:49 +010020163 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
20164 FEATURE_OTP | FEATURE_QPI_SRP,
20165 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Scott Chao1bbc5012020-04-08 22:10:50 +080020166 .tested = TEST_OK_PREW,
20167 .probe = probe_spi_rdid,
20168 .probe_timing = TIMING_ZERO,
20169 .block_erasers =
20170 {
20171 {
20172 .eraseblocks = { {4 * 1024, 2048} },
20173 .block_erase = spi_block_erase_20,
20174 }, {
20175 .eraseblocks = { {32 * 1024, 256} },
20176 .block_erase = spi_block_erase_52,
20177 }, {
20178 .eraseblocks = { {64 * 1024, 128} },
20179 .block_erase = spi_block_erase_d8,
20180 }, {
20181 .eraseblocks = { {8 * 1024 * 1024, 1} },
20182 .block_erase = spi_block_erase_60,
20183 }, {
20184 .eraseblocks = { {8 * 1024 * 1024, 1} },
20185 .block_erase = spi_block_erase_c7,
20186 }
20187 },
20188 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20189 .unlock = spi_disable_blockprotect,
20190 .write = spi_chip_write_256,
20191 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010020192 .voltage = {1700, 1950},
Evan Benn29c8b5d2022-09-13 16:01:10 +100020193 .reg_bits =
20194 {
Nico Huber2133f592024-01-06 18:30:01 +010020195 .qe = {STATUS2, 1, RW},
Evan Benn29c8b5d2022-09-13 16:01:10 +100020196 .srp = {STATUS1, 7, RW},
20197 .srl = {STATUS2, 0, RW},
20198 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
20199 .tb = {STATUS1, 5, RW},
20200 .sec = {STATUS1, 6, RW},
20201 .cmp = {STATUS2, 6, RW},
20202 .wps = {STATUS3, 2, RW},
20203 },
Nico Huberaabb3e02023-01-13 00:22:30 +010020204 .wp_write_cfg = spi_wp_write_cfg,
20205 .wp_read_cfg = spi_wp_read_cfg,
20206 .wp_get_ranges = spi_wp_get_available_ranges,
Evan Benn29c8b5d2022-09-13 16:01:10 +100020207 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020020208 .prepare_access = spi_prepare_io,
20209 .finish_access = spi_finish_io,
Scott Chao1bbc5012020-04-08 22:10:50 +080020210 },
20211
20212 {
20213 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020214 .name = "W25Q80.V",
Nico Huber70eed9f2017-04-24 22:19:27 +020020215 .bustype = BUS_SPI,
20216 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020217 .model_id = WINBOND_NEX_W25Q80_V,
20218 .total_size = 1024,
Nico Huber70eed9f2017-04-24 22:19:27 +020020219 .page_size = 256,
20220 /* supports SFDP */
20221 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010020222 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
David Hendricks48729d32017-12-08 14:44:07 -080020223 .tested = TEST_OK_PREW,
Nico Huber70eed9f2017-04-24 22:19:27 +020020224 .probe = probe_spi_rdid,
20225 .probe_timing = TIMING_ZERO,
20226 .block_erasers =
20227 {
20228 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020229 .eraseblocks = { {4 * 1024, 256} },
Nico Huber70eed9f2017-04-24 22:19:27 +020020230 .block_erase = spi_block_erase_20,
20231 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020232 .eraseblocks = { {32 * 1024, 32} },
Nico Huber70eed9f2017-04-24 22:19:27 +020020233 .block_erase = spi_block_erase_52,
20234 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020235 .eraseblocks = { {64 * 1024, 16} },
Nico Huber70eed9f2017-04-24 22:19:27 +020020236 .block_erase = spi_block_erase_d8,
20237 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020238 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020020239 .block_erase = spi_block_erase_60,
20240 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020241 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020020242 .block_erase = spi_block_erase_c7,
20243 }
20244 },
Nico Huber2133f592024-01-06 18:30:01 +010020245 .reg_bits =
20246 {
20247 .qe = {STATUS2, 1, RW},
20248 },
Nico Huber70eed9f2017-04-24 22:19:27 +020020249 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20250 .unlock = spi_disable_blockprotect,
20251 .write = spi_chip_write_256,
20252 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020253 .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",
20260 .name = "W25Q80BW",
20261 .bustype = BUS_SPI,
20262 .manufacture_id = WINBOND_NEX_ID,
20263 .model_id = WINBOND_NEX_W25Q80BW,
20264 .total_size = 1024,
20265 .page_size = 256,
20266 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010020267 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020268 .tested = TEST_OK_PREW,
20269 .probe = probe_spi_rdid,
20270 .probe_timing = TIMING_ZERO,
20271 .block_erasers =
20272 {
20273 {
20274 .eraseblocks = { {4 * 1024, 256} },
20275 .block_erase = spi_block_erase_20,
20276 }, {
20277 .eraseblocks = { {32 * 1024, 32} },
20278 .block_erase = spi_block_erase_52,
20279 }, {
20280 .eraseblocks = { {64 * 1024, 16} },
20281 .block_erase = spi_block_erase_d8,
20282 }, {
20283 .eraseblocks = { {1 * 1024 * 1024, 1} },
20284 .block_erase = spi_block_erase_60,
20285 }, {
20286 .eraseblocks = { {1 * 1024 * 1024, 1} },
20287 .block_erase = spi_block_erase_c7,
20288 }
20289 },
Nico Huber2133f592024-01-06 18:30:01 +010020290 .reg_bits =
20291 {
20292 .qe = {STATUS2, 1, RW},
20293 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100020294 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20295 .unlock = spi_disable_blockprotect,
20296 .write = spi_chip_write_256,
20297 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010020298 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020020299 .prepare_access = spi_prepare_io,
20300 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020301 },
20302
20303 {
20304 .vendor = "Winbond",
20305 .name = "W25Q80EW",
20306 .bustype = BUS_SPI,
20307 .manufacture_id = WINBOND_NEX_ID,
20308 .model_id = WINBOND_NEX_W25Q80EW,
20309 .total_size = 1024,
20310 .page_size = 256,
20311 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010020312 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
20313 FEATURE_OTP | FEATURE_QPI_SRP,
20314 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green1f9cc7d2019-07-01 11:10:45 +100020315 .tested = TEST_OK_PREW,
20316 .probe = probe_spi_rdid,
20317 .probe_timing = TIMING_ZERO,
20318 .block_erasers =
20319 {
20320 {
20321 .eraseblocks = { {4 * 1024, 256} },
20322 .block_erase = spi_block_erase_20,
20323 }, {
20324 .eraseblocks = { {32 * 1024, 32} },
20325 .block_erase = spi_block_erase_52,
20326 }, {
20327 .eraseblocks = { {64 * 1024, 16} },
20328 .block_erase = spi_block_erase_d8,
20329 }, {
20330 .eraseblocks = { {1 * 1024 * 1024, 1} },
20331 .block_erase = spi_block_erase_60,
20332 }, {
20333 .eraseblocks = { {1 * 1024 * 1024, 1} },
20334 .block_erase = spi_block_erase_c7,
20335 }
20336 },
Nico Huber2133f592024-01-06 18:30:01 +010020337 .reg_bits =
20338 {
20339 .qe = {STATUS2, 1, RW},
20340 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100020341 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20342 .unlock = spi_disable_blockprotect,
20343 .write = spi_chip_write_256,
20344 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010020345 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020020346 .prepare_access = spi_prepare_io,
20347 .finish_access = spi_finish_io,
Nico Huber70eed9f2017-04-24 22:19:27 +020020348 },
20349
20350 {
20351 .vendor = "Winbond",
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020352 .name = "W25X05",
20353 .bustype = BUS_SPI,
20354 .manufacture_id = WINBOND_NEX_ID,
20355 .model_id = WINBOND_NEX_W25X05,
20356 .total_size = 64,
20357 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020358 /* FEATURE_FAST_READ_DIO since W25X05B */
20359 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020360 .tested = TEST_OK_PREW,
20361 .probe = probe_spi_rdid,
20362 .probe_timing = TIMING_ZERO,
20363 .block_erasers =
20364 {
20365 {
20366 .eraseblocks = { {4 * 1024, 16} },
20367 .block_erase = spi_block_erase_20,
20368 }, {
20369 .eraseblocks = { {32 * 1024, 2} },
20370 .block_erase = spi_block_erase_52,
20371 }, {
20372 .eraseblocks = { {64 * 1024, 1} },
20373 .block_erase = spi_block_erase_d8,
20374 }
20375 },
20376 .printlock = spi_prettyprint_status_register_plain,
20377 .unlock = spi_disable_blockprotect,
20378 .write = spi_chip_write_256,
20379 .read = spi_chip_read,
20380 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020381 .prepare_access = spi_prepare_io,
20382 .finish_access = spi_finish_io,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040020383 },
20384
20385 {
20386 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020387 .name = "W25X10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020388 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020389 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020390 .model_id = WINBOND_NEX_W25X10,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020391 .total_size = 128,
20392 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020393 /* FEATURE_FAST_READ_DIO since W25X10B */
20394 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunere34e3e82013-01-01 00:06:51 +000020395 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020396 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000020397 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020398 .block_erasers =
20399 {
20400 {
20401 .eraseblocks = { {4 * 1024, 32} },
20402 .block_erase = spi_block_erase_20,
20403 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020404 .eraseblocks = { {64 * 1024, 2} },
20405 .block_erase = spi_block_erase_d8,
20406 }, {
20407 .eraseblocks = { {128 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020408 .block_erase = spi_block_erase_c7,
20409 }
20410 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020411 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020412 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000020413 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020414 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020415 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020416 .prepare_access = spi_prepare_io,
20417 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000020418 },
20419
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020420 {
20421 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020422 .name = "W25X16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020423 .bustype = BUS_SPI,
Hector Martina721ae22009-07-11 19:39:11 +000020424 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020425 .model_id = WINBOND_NEX_W25X16,
Hector Martina721ae22009-07-11 19:39:11 +000020426 .total_size = 2048,
20427 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020428 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner8179be52011-06-04 13:13:34 +000020429 .tested = TEST_OK_PREW,
Hector Martina721ae22009-07-11 19:39:11 +000020430 .probe = probe_spi_rdid,
20431 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020432 .block_erasers =
20433 {
20434 {
20435 .eraseblocks = { {4 * 1024, 512} },
20436 .block_erase = spi_block_erase_20,
20437 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020438 .eraseblocks = { {64 * 1024, 32} },
20439 .block_erase = spi_block_erase_d8,
20440 }, {
20441 .eraseblocks = { {2 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020442 .block_erase = spi_block_erase_c7,
20443 }
20444 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020445 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020446 .unlock = spi_disable_blockprotect,
Hector Martina721ae22009-07-11 19:39:11 +000020447 .write = spi_chip_write_256,
20448 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020449 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020450 .prepare_access = spi_prepare_io,
20451 .finish_access = spi_finish_io,
Hector Martina721ae22009-07-11 19:39:11 +000020452 },
20453
20454 {
20455 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020456 .name = "W25X20",
20457 .bustype = BUS_SPI,
20458 .manufacture_id = WINBOND_NEX_ID,
20459 .model_id = WINBOND_NEX_W25X20,
20460 .total_size = 256,
20461 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020462 /* FEATURE_FAST_READ_DIO since W25X20B */
20463 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020464 .tested = TEST_OK_PREW,
20465 .probe = probe_spi_rdid,
20466 .probe_timing = TIMING_ZERO,
20467 .block_erasers =
20468 {
20469 {
20470 .eraseblocks = { {4 * 1024, 64} },
20471 .block_erase = spi_block_erase_20,
20472 }, {
20473 .eraseblocks = { {64 * 1024, 4} },
20474 .block_erase = spi_block_erase_d8,
20475 }, {
20476 .eraseblocks = { {256 * 1024, 1} },
20477 .block_erase = spi_block_erase_c7,
20478 }
20479 },
20480 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20481 .unlock = spi_disable_blockprotect,
20482 .write = spi_chip_write_256,
20483 .read = spi_chip_read,
20484 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020485 .prepare_access = spi_prepare_io,
20486 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020487 },
20488
20489 {
20490 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020491 .name = "W25X32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020492 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000020493 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020494 .model_id = WINBOND_NEX_W25X32,
Zheng Bao1db2b752009-11-26 11:05:01 +000020495 .total_size = 4096,
20496 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020497 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000020498 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000020499 .probe = probe_spi_rdid,
20500 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020501 .block_erasers =
20502 {
20503 {
20504 .eraseblocks = { {4 * 1024, 1024} },
20505 .block_erase = spi_block_erase_20,
20506 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020507 .eraseblocks = { {64 * 1024, 64} },
20508 .block_erase = spi_block_erase_d8,
20509 }, {
20510 .eraseblocks = { {4 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020511 .block_erase = spi_block_erase_c7,
20512 }
20513 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020514 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020515 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000020516 .write = spi_chip_write_256,
20517 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020518 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020519 .prepare_access = spi_prepare_io,
20520 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000020521 },
20522
20523 {
20524 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020525 .name = "W25X40",
20526 .bustype = BUS_SPI,
20527 .manufacture_id = WINBOND_NEX_ID,
20528 .model_id = WINBOND_NEX_W25X40,
20529 .total_size = 512,
20530 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020531 /* FEATURE_FAST_READ_DIO since W25X40B */
20532 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020533 .tested = TEST_OK_PREW,
20534 .probe = probe_spi_rdid,
20535 .probe_timing = TIMING_ZERO,
20536 .block_erasers =
20537 {
20538 {
20539 .eraseblocks = { {4 * 1024, 128} },
20540 .block_erase = spi_block_erase_20,
20541 }, {
20542 .eraseblocks = { {64 * 1024, 8} },
20543 .block_erase = spi_block_erase_d8,
20544 }, {
20545 .eraseblocks = { {512 * 1024, 1} },
20546 .block_erase = spi_block_erase_c7,
20547 }
20548 },
20549 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20550 .unlock = spi_disable_blockprotect,
20551 .write = spi_chip_write_256,
20552 .read = spi_chip_read,
20553 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020554 .prepare_access = spi_prepare_io,
20555 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020556 },
20557
20558 {
20559 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020560 .name = "W25X64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020561 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000020562 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020563 .model_id = WINBOND_NEX_W25X64,
Zheng Bao1db2b752009-11-26 11:05:01 +000020564 .total_size = 8192,
20565 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020566 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner23e10b82016-01-23 16:16:49 +000020567 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000020568 .probe = probe_spi_rdid,
20569 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020570 .block_erasers =
20571 {
20572 {
20573 .eraseblocks = { {4 * 1024, 2048} },
20574 .block_erase = spi_block_erase_20,
20575 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020576 .eraseblocks = { {64 * 1024, 128} },
20577 .block_erase = spi_block_erase_d8,
20578 }, {
20579 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020580 .block_erase = spi_block_erase_c7,
20581 }
20582 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000020583 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000020584 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000020585 .write = spi_chip_write_256,
20586 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020587 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020588 .prepare_access = spi_prepare_io,
20589 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000020590 },
20591
20592 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100020593 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020594 .name = "W25X80",
Alan Greenfa3fcd32019-06-27 15:41:50 +100020595 .bustype = BUS_SPI,
20596 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020597 .model_id = WINBOND_NEX_W25X80,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020598 .total_size = 1024,
20599 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020020600 /* FEATURE_FAST_READ_DIO since W25X80B */
20601 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020602 .tested = TEST_OK_PREW,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020603 .probe = probe_spi_rdid,
20604 .probe_timing = TIMING_ZERO,
20605 .block_erasers =
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020606 {
20607 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020608 .eraseblocks = { {4 * 1024, 256} },
20609 .block_erase = spi_block_erase_20,
20610 }, {
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020611 .eraseblocks = { {64 * 1024, 16} },
20612 .block_erase = spi_block_erase_d8,
20613 }, {
20614 .eraseblocks = { {1024 * 1024, 1} },
20615 .block_erase = spi_block_erase_c7,
20616 }
20617 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100020618 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
20619 .unlock = spi_disable_blockprotect,
20620 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020621 .read = spi_chip_read,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020622 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020020623 .prepare_access = spi_prepare_io,
20624 .finish_access = spi_finish_io,
David Hendricksc9ee0ed2018-02-11 17:40:53 -080020625 },
20626
Alan Greenf29ea362019-06-27 17:14:02 +100020627 /* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
20628 {
Carl-Daniel Hailfinger2e88a9f2011-07-26 14:18:52 +000020629 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020630 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020631 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020632 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020633 .model_id = WINBOND_W29C010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020634 .total_size = 128,
20635 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000020636 .feature_bits = FEATURE_LONG_RESET,
David Hendricks567b7b82011-05-18 01:31:03 +000020637 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020638 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020639 .probe_timing = 10, /* used datasheet for the W29C011A */
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020640 .block_erasers =
20641 {
20642 {
20643 .eraseblocks = { {128 * 1024, 1} },
20644 .block_erase = erase_chip_block_jedec,
20645 }
20646 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020647 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020648 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010020649 .prepare_access = prepare_memory_access,
20650 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020651 },
20652
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020653 {
20654 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020655 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012-old",
20656 .bustype = BUS_PARALLEL,
20657 .manufacture_id = WINBOND_ID,
20658 .model_id = WINBOND_W29C010,
20659 .total_size = 128,
20660 .page_size = 128,
20661 .feature_bits = FEATURE_LONG_RESET,
20662 .tested = TEST_OK_PREW,
20663 .probe = probe_w29ee011,
20664 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (w29ee011.c) */
20665 .block_erasers =
20666 {
20667 {
20668 .eraseblocks = { {128 * 1024, 1} },
20669 .block_erase = erase_chip_block_jedec,
20670 }
20671 },
20672 .write = write_jedec,
20673 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010020674 .prepare_access = prepare_memory_access,
20675 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020676 },
20677
20678 {
20679 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020680 .name = "W29C020(C)/W29C022",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020681 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020682 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020683 .model_id = WINBOND_W29C020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020684 .total_size = 256,
20685 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000020686 .feature_bits = FEATURE_LONG_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020687 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020688 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000020689 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020690 .block_erasers =
20691 {
20692 {
20693 .eraseblocks = { {256 * 1024, 1} },
20694 .block_erase = erase_chip_block_jedec,
20695 }
20696 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020697 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020698 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020699 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020700 .prepare_access = prepare_memory_access,
20701 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020702 },
20703
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020704 {
20705 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000020706 .name = "W29C040/P",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020707 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020708 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000020709 .model_id = WINBOND_W29C040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020710 .total_size = 512,
20711 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000020712 .feature_bits = FEATURE_LONG_RESET,
20713 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020714 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000020715 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000020716 .block_erasers =
20717 {
20718 {
20719 .eraseblocks = { {512 * 1024, 1} },
20720 .block_erase = erase_chip_block_jedec,
20721 }
20722 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020723 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020724 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020725 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020726 .prepare_access = prepare_memory_access,
20727 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020728 },
20729
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020730 {
20731 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020732 .name = "W29C512A/W29EE512",
20733 .bustype = BUS_PARALLEL,
20734 .manufacture_id = WINBOND_ID,
20735 .model_id = WINBOND_W29C512A,
20736 .total_size = 64,
20737 .page_size = 128,
20738 .feature_bits = FEATURE_LONG_RESET,
20739 .tested = TEST_OK_PREW,
20740 .probe = probe_jedec,
20741 .probe_timing = 10,
20742 .block_erasers =
20743 {
20744 {
20745 .eraseblocks = { {64 * 1024, 1} },
20746 .block_erase = erase_chip_block_jedec,
20747 }
20748 },
20749 .write = write_jedec,
20750 .read = read_memmapped,
20751 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020752 .prepare_access = prepare_memory_access,
20753 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020754 },
20755
20756 {
20757 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020758 .name = "W29GL032CB",
20759 .bustype = BUS_PARALLEL,
20760 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20761 .model_id = WINBOND_W29GL032CB,
20762 .total_size = 4096,
20763 .page_size = 128 * 1024, /* actual page size is 16 */
20764 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20765 .tested = TEST_UNTESTED,
20766 .probe = probe_jedec_29gl,
20767 .probe_timing = TIMING_ZERO,
20768 .block_erasers =
20769 {
20770 {
20771 .eraseblocks = {
20772 {8 * 1024, 8},
20773 {64 * 1024, 63},
20774 },
20775 .block_erase = erase_sector_jedec,
20776 }, {
20777 .eraseblocks = { {4 * 1024 * 1024, 1} },
20778 .block_erase = erase_chip_block_jedec,
20779 },
20780 },
20781 .write = write_jedec_1,
20782 .read = read_memmapped,
20783 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020784 .prepare_access = prepare_memory_access,
20785 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020786 },
20787
20788 {
20789 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020790 .name = "W29GL032CH/L",
20791 .bustype = BUS_PARALLEL,
20792 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20793 .model_id = WINBOND_W29GL032CHL,
20794 .total_size = 4096,
20795 .page_size = 128 * 1024, /* actual page size is 16 */
20796 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20797 .tested = TEST_UNTESTED,
20798 .probe = probe_jedec_29gl,
20799 .probe_timing = TIMING_ZERO,
20800 .block_erasers =
20801 {
20802 {
20803 .eraseblocks = { {64 * 1024, 64} },
20804 .block_erase = erase_sector_jedec,
20805 }, {
20806 .eraseblocks = { {4 * 1024 * 1024, 1} },
20807 .block_erase = erase_chip_block_jedec,
20808 },
20809 },
20810 .write = write_jedec_1,
20811 .read = read_memmapped,
20812 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020813 .prepare_access = prepare_memory_access,
20814 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020815 },
20816
20817 {
20818 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020819 .name = "W29GL032CT",
20820 .bustype = BUS_PARALLEL,
20821 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20822 .model_id = WINBOND_W29GL032CT,
20823 .total_size = 4096,
20824 .page_size = 128 * 1024, /* actual page size is 16 */
20825 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20826 .tested = TEST_UNTESTED,
20827 .probe = probe_jedec_29gl,
20828 .probe_timing = TIMING_ZERO,
20829 .block_erasers =
20830 {
20831 {
20832 .eraseblocks = {
20833 {64 * 1024, 63},
20834 {8 * 1024, 8},
20835 },
20836 .block_erase = erase_sector_jedec,
20837 }, {
20838 .eraseblocks = { {4 * 1024 * 1024, 1} },
20839 .block_erase = erase_chip_block_jedec,
20840 },
20841 },
20842 .write = write_jedec_1,
20843 .read = read_memmapped,
20844 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020845 .prepare_access = prepare_memory_access,
20846 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020847 },
20848
20849 {
20850 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020851 .name = "W29GL064CB",
20852 .bustype = BUS_PARALLEL,
20853 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20854 .model_id = WINBOND_W29GL064CB,
20855 .total_size = 8192,
20856 .page_size = 128 * 1024, /* actual page size is 16 */
20857 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20858 .tested = TEST_UNTESTED,
20859 .probe = probe_jedec_29gl,
20860 .probe_timing = TIMING_ZERO,
20861 .block_erasers =
20862 {
20863 {
20864 .eraseblocks = {
20865 {8 * 1024, 8},
20866 {64 * 1024, 127},
20867 },
20868 .block_erase = erase_sector_jedec,
20869 }, {
20870 .eraseblocks = { {8 * 1024 * 1024, 1} },
20871 .block_erase = erase_chip_block_jedec,
20872 },
20873 },
20874 .write = write_jedec_1,
20875 .read = read_memmapped,
20876 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020877 .prepare_access = prepare_memory_access,
20878 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020879 },
20880
20881 {
20882 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100020883 .name = "W29GL064CH/L",
20884 .bustype = BUS_PARALLEL,
20885 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20886 .model_id = WINBOND_W29GL064CHL,
20887 .total_size = 8192,
20888 .page_size = 128 * 1024, /* actual page size is 16 */
20889 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20890 .tested = TEST_UNTESTED,
20891 .probe = probe_jedec_29gl,
20892 .probe_timing = TIMING_ZERO,
20893 .block_erasers =
20894 {
20895 {
20896 .eraseblocks = { {64 * 1024, 128} },
20897 .block_erase = erase_sector_jedec,
20898 }, {
20899 .eraseblocks = { {8 * 1024 * 1024, 1} },
20900 .block_erase = erase_chip_block_jedec,
20901 },
20902 },
20903 .write = write_jedec_1,
20904 .read = read_memmapped,
20905 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020906 .prepare_access = prepare_memory_access,
20907 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100020908 },
20909
20910 {
20911 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020912 .name = "W29GL064CT",
20913 .bustype = BUS_PARALLEL,
20914 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20915 .model_id = WINBOND_W29GL064CT,
20916 .total_size = 8192,
20917 .page_size = 128 * 1024, /* actual page size is 16 */
20918 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20919 .tested = TEST_UNTESTED,
20920 .probe = probe_jedec_29gl,
20921 .probe_timing = TIMING_ZERO,
20922 .block_erasers =
20923 {
20924 {
20925 .eraseblocks = {
20926 {64 * 1024, 127},
20927 {8 * 1024, 8},
20928 },
20929 .block_erase = erase_sector_jedec,
20930 }, {
20931 .eraseblocks = { {8 * 1024 * 1024, 1} },
20932 .block_erase = erase_chip_block_jedec,
20933 },
20934 },
20935 .write = write_jedec_1,
20936 .read = read_memmapped,
20937 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020938 .prepare_access = prepare_memory_access,
20939 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020940 },
20941
20942 {
20943 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020944 .name = "W29GL128C",
20945 .bustype = BUS_PARALLEL,
20946 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
20947 .model_id = WINBOND_W29GL128CHL,
20948 .total_size = 16384,
20949 .page_size = 128 * 1024, /* actual page size is 16 */
20950 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
20951 .tested = TEST_UNTESTED,
20952 .probe = probe_jedec_29gl,
20953 .probe_timing = TIMING_ZERO,
20954 .block_erasers =
20955 {
20956 {
20957 .eraseblocks = { {128 * 1024, 128} },
20958 .block_erase = erase_sector_jedec,
20959 }, {
20960 .eraseblocks = { {16 * 1024 * 1024, 1} },
20961 .block_erase = erase_chip_block_jedec,
20962 },
20963 },
20964 .write = write_jedec_1,
20965 .read = read_memmapped,
20966 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020967 .prepare_access = prepare_memory_access,
20968 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000020969 },
20970
20971 {
20972 .vendor = "Winbond",
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020973 .name = "W39F010",
20974 .bustype = BUS_PARALLEL,
20975 .manufacture_id = WINBOND_ID,
20976 .model_id = WINBOND_W39F010,
20977 .total_size = 128,
20978 .page_size = 4 * 1024,
20979 .feature_bits = FEATURE_EITHER_RESET,
20980 .tested = TEST_OK_PREW,
20981 .probe = probe_jedec,
20982 .probe_timing = 10,
20983 .block_erasers =
20984 {
20985 {
20986 .eraseblocks = { {4 * 1024, 32} },
20987 .block_erase = erase_block_jedec,
20988 }, {
20989 .eraseblocks = { {128 * 1024, 1} },
20990 .block_erase = erase_chip_block_jedec,
20991 }
20992 },
20993 .printlock = printlock_w39f010,
20994 .write = write_jedec_1,
20995 .read = read_memmapped,
20996 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020997 .prepare_access = prepare_memory_access,
20998 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000020999 },
21000
21001 {
21002 .vendor = "Winbond",
21003 .name = "W39L010",
21004 .bustype = BUS_PARALLEL,
21005 .manufacture_id = WINBOND_ID,
21006 .model_id = WINBOND_W39L010,
21007 .total_size = 128,
21008 .page_size = 4 * 1024,
21009 .feature_bits = FEATURE_EITHER_RESET,
21010 .tested = TEST_UNTESTED,
21011 .probe = probe_jedec,
21012 .probe_timing = 10,
21013 .block_erasers =
21014 {
21015 {
21016 .eraseblocks = { {4 * 1024, 32} },
21017 .block_erase = erase_block_jedec,
21018 }, {
21019 .eraseblocks = { {128 * 1024, 1} },
21020 .block_erase = erase_chip_block_jedec,
21021 }
21022 },
21023 .printlock = printlock_w39l010,
21024 .write = write_jedec_1,
21025 .read = read_memmapped,
21026 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021027 .prepare_access = prepare_memory_access,
21028 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000021029 },
21030
21031 {
21032 .vendor = "Winbond",
21033 .name = "W39L020",
21034 .bustype = BUS_PARALLEL,
21035 .manufacture_id = WINBOND_ID,
21036 .model_id = WINBOND_W39L020,
21037 .total_size = 256,
21038 .page_size = 4 * 1024,
21039 .feature_bits = FEATURE_EITHER_RESET,
21040 .tested = TEST_UNTESTED,
21041 .probe = probe_jedec,
21042 .probe_timing = 10,
21043 .block_erasers =
21044 {
21045 {
21046 .eraseblocks = { {4 * 1024, 64} },
21047 .block_erase = erase_block_jedec,
21048 }, {
21049 .eraseblocks = { {64 * 1024, 4} },
21050 .block_erase = erase_sector_jedec,
21051 }, {
21052 .eraseblocks = { {256 * 1024, 1} },
21053 .block_erase = erase_chip_block_jedec,
21054 }
21055 },
21056 .printlock = printlock_w39l020,
21057 .write = write_jedec_1,
21058 .read = read_memmapped,
21059 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021060 .prepare_access = prepare_memory_access,
21061 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000021062 },
21063
21064 {
21065 .vendor = "Winbond",
Michael Karcher19e0aac2011-03-06 17:58:05 +000021066 .name = "W39L040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021067 .bustype = BUS_PARALLEL,
Michael Karcher19e0aac2011-03-06 17:58:05 +000021068 .manufacture_id = WINBOND_ID,
21069 .model_id = WINBOND_W39L040,
21070 .total_size = 512,
21071 .page_size = 64 * 1024,
21072 .feature_bits = FEATURE_EITHER_RESET,
21073 .tested = TEST_OK_PR,
21074 .probe = probe_jedec,
21075 .probe_timing = 10,
21076 .block_erasers =
21077 {
21078 {
21079 .eraseblocks = { {4 * 1024, 128} },
21080 .block_erase = erase_block_jedec,
21081 }, {
21082 .eraseblocks = { {64 * 1024, 8} },
21083 .block_erase = erase_sector_jedec,
21084 }, {
21085 .eraseblocks = { {512 * 1024, 1} },
21086 .block_erase = erase_chip_block_jedec,
21087 }
21088 },
21089 .printlock = printlock_w39l040,
21090 .write = write_jedec_1,
21091 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000021092 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021093 .prepare_access = prepare_memory_access,
21094 .finish_access = finish_memory_access,
Michael Karcher19e0aac2011-03-06 17:58:05 +000021095 },
21096
21097 {
21098 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021099 .name = "W39V040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021100 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021101 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021102 .model_id = WINBOND_W39V040A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021103 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000021104 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000021105 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000021106 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021107 .probe = probe_jedec,
Stefan Tauner716e0982011-07-25 20:38:52 +000021108 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021109 .block_erasers =
21110 {
21111 {
21112 .eraseblocks = { {64 * 1024, 8} },
21113 .block_erase = erase_sector_jedec,
21114 }, {
21115 .eraseblocks = { {512 * 1024, 1} },
21116 .block_erase = erase_chip_block_jedec,
21117 }
21118 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021119 .printlock = printlock_w39v040a,
Sean Nelson35727f72010-01-28 23:55:12 +000021120 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021121 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021122 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021123 .prepare_access = prepare_memory_access,
21124 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021125 },
21126
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021127 {
21128 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021129 .name = "W39V040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021130 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021131 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021132 .model_id = WINBOND_W39V040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021133 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000021134 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000021135 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000021136 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021137 .probe = probe_jedec,
Paul Menzel018d4822011-10-21 12:33:07 +000021138 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021139 .block_erasers =
21140 {
21141 {
21142 .eraseblocks = { {64 * 1024, 8} },
21143 .block_erase = erase_sector_jedec,
21144 }, {
21145 .eraseblocks = { {512 * 1024, 1} },
21146 .block_erase = erase_chip_block_jedec,
21147 }
21148 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021149 .printlock = printlock_w39v040b,
Sean Nelson35727f72010-01-28 23:55:12 +000021150 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021151 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021152 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021153 .prepare_access = prepare_memory_access,
21154 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021155 },
21156
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021157 {
21158 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021159 .name = "W39V040C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021160 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021161 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021162 .model_id = WINBOND_W39V040C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021163 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000021164 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000021165 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000021166 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000021167 .probe = probe_jedec,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021168 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021169 .block_erasers =
21170 {
21171 {
21172 .eraseblocks = { {64 * 1024, 8} },
21173 .block_erase = erase_sector_jedec,
21174 }, {
21175 .eraseblocks = { {512 * 1024, 1} },
21176 .block_erase = erase_chip_block_jedec,
21177 }
21178 },
Sean Nelson6e0b9122010-02-19 00:52:10 +000021179 .printlock = printlock_w39v040c,
Sean Nelson35727f72010-01-28 23:55:12 +000021180 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021181 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021182 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021183 .prepare_access = prepare_memory_access,
21184 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021185 },
21186
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021187 {
21188 .vendor = "Winbond",
21189 .name = "W39V040FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021190 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021191 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021192 .model_id = WINBOND_W39V040FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021193 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000021194 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021195 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000021196 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021197 .probe = probe_jedec,
Antony Rheneus0fbba982011-05-26 14:28:51 +000021198 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021199 .block_erasers =
21200 {
21201 {
21202 .eraseblocks = { {4 * 1024, 128} },
21203 .block_erase = erase_block_jedec,
21204 }, {
21205 .eraseblocks = { {64 * 1024, 8} },
21206 .block_erase = erase_sector_jedec,
21207 }, {
21208 .eraseblocks = { {512 * 1024, 1} },
21209 .block_erase = erase_chip_block_jedec,
21210 }
21211 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021212 .printlock = printlock_w39v040fa,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000021213 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000021214 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021215 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021216 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010021217 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021218 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021219 },
21220
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021221 {
21222 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021223 .name = "W39V040FB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021224 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021225 .manufacture_id = WINBOND_ID,
21226 .model_id = WINBOND_W39V040B,
21227 .total_size = 512,
21228 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021229 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner0be072c2016-03-13 15:16:30 +000021230 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021231 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000021232 .probe_timing = 10,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021233 .block_erasers =
21234 {
21235 {
21236 .eraseblocks = { {64 * 1024, 8} },
21237 .block_erase = erase_sector_jedec,
21238 }, {
21239 .eraseblocks = { {512 * 1024, 1} },
21240 .block_erase = erase_chip_block_jedec,
21241 }
21242 },
21243 .printlock = printlock_w39v040fb,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000021244 .unlock = unlock_regspace2_uniform_64k,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021245 .write = write_jedec_1,
21246 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000021247 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021248 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021249 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021250 },
21251
21252 {
21253 .vendor = "Winbond",
21254 .name = "W39V040FC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021255 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021256 .manufacture_id = WINBOND_ID,
21257 .model_id = WINBOND_W39V040C,
21258 .total_size = 512,
21259 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021260 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauneraf2db612011-12-02 21:48:17 +000021261 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021262 .probe = probe_jedec,
21263 .probe_timing = 10,
21264 .block_erasers =
21265 {
21266 {
21267 .eraseblocks = { {64 * 1024, 8} },
21268 .block_erase = erase_sector_jedec,
21269 }, {
21270 .eraseblocks = { {512 * 1024, 1} },
21271 .block_erase = erase_chip_block_jedec,
21272 }
21273 },
21274 .printlock = printlock_w39v040fc,
21275 .write = write_jedec_1,
21276 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000021277 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021278 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021279 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021280 },
21281
21282 {
21283 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021284 .name = "W39V080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021285 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021286 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021287 .model_id = WINBOND_W39V080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021288 .total_size = 1024,
Sean Nelson72a9a022009-12-22 22:15:33 +000021289 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000021290 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzelac427b22012-02-16 21:07:07 +000021291 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021292 .probe = probe_jedec,
Paul Menzelac427b22012-02-16 21:07:07 +000021293 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021294 .block_erasers =
21295 {
21296 {
21297 .eraseblocks = { {64 * 1024, 16} },
21298 .block_erase = erase_sector_jedec,
21299 }, {
21300 .eraseblocks = { {1024 * 1024, 1} },
21301 .block_erase = erase_chip_block_jedec,
21302 }
21303 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000021304 .printlock = printlock_w39v080a,
Sean Nelson35727f72010-01-28 23:55:12 +000021305 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021306 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021307 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021308 .prepare_access = prepare_memory_access,
21309 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021310 },
21311
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021312 {
21313 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100021314 .name = "W39V080FA",
21315 .bustype = BUS_FWH,
21316 .manufacture_id = WINBOND_ID,
21317 .model_id = WINBOND_W39V080FA,
21318 .total_size = 1024,
21319 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021320 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021321 .tested = TEST_OK_PREW,
21322 .probe = probe_jedec,
21323 .probe_timing = 10,
21324 .block_erasers =
21325 {
21326 {
21327 .eraseblocks = { {64 * 1024, 16} },
21328 .block_erase = erase_sector_jedec,
21329 }, {
21330 .eraseblocks = { {1024 * 1024, 1} },
21331 .block_erase = erase_chip_block_jedec,
21332 }
21333 },
21334 .printlock = printlock_w39v080fa,
21335 .unlock = unlock_regspace2_uniform_64k,
21336 .write = write_jedec_1,
21337 .read = read_memmapped,
21338 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021339 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021340 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021341 },
21342
21343 {
21344 .vendor = "Winbond",
21345 .name = "W39V080FA (dual mode)",
21346 .bustype = BUS_FWH,
21347 .manufacture_id = WINBOND_ID,
21348 .model_id = WINBOND_W39V080FA_DM,
21349 .total_size = 512,
21350 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021351 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021352 .tested = TEST_UNTESTED,
21353 .probe = probe_jedec,
21354 .probe_timing = 10,
21355 .block_erasers =
21356 {
21357 {
21358 .eraseblocks = { {64 * 1024, 8} },
21359 .block_erase = erase_sector_jedec,
21360 }, {
21361 .eraseblocks = { {512 * 1024, 1} },
21362 .block_erase = erase_chip_block_jedec,
21363 }
21364 },
21365 .printlock = printlock_w39v080fa_dual,
21366 .write = write_jedec_1,
21367 .read = read_memmapped,
21368 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010021369 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021370 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021371 },
21372
21373 {
21374 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000021375 .name = "W49F002U/N",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021376 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021377 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021378 .model_id = WINBOND_W49F002U,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021379 .total_size = 256,
21380 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021381 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000021382 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021383 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000021384 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021385 .block_erasers =
21386 {
21387 {
21388 .eraseblocks = {
21389 {128 * 1024, 1},
21390 {96 * 1024, 1},
21391 {8 * 1024, 2},
21392 {16 * 1024, 1},
21393 },
21394 .block_erase = erase_sector_jedec,
21395 }, {
21396 .eraseblocks = { {256 * 1024, 1} },
21397 .block_erase = erase_chip_block_jedec,
21398 }
21399 },
Sean Nelson35727f72010-01-28 23:55:12 +000021400 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021401 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021402 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010021403 .prepare_access = prepare_memory_access,
21404 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021405 },
21406
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021407 {
21408 .vendor = "Winbond",
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021409 .name = "W49F020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021410 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021411 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021412 .model_id = WINBOND_W49F020,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021413 .total_size = 256,
21414 .page_size = 128,
21415 .feature_bits = FEATURE_EITHER_RESET,
21416 .tested = TEST_OK_PROBE,
21417 .probe = probe_jedec,
21418 .probe_timing = 10,
21419 .block_erasers =
21420 {
21421 {
21422 .eraseblocks = { {256 * 1024, 1} },
21423 .block_erase = erase_chip_block_jedec,
21424 }
21425 },
21426 .write = write_jedec_1,
21427 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021428 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010021429 .prepare_access = prepare_memory_access,
21430 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000021431 },
21432
21433 {
21434 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021435 .name = "W49V002A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021436 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021437 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021438 .model_id = WINBOND_W49V002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021439 .total_size = 256,
21440 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021441 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000021442 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021443 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000021444 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021445 .block_erasers =
21446 {
21447 {
21448 .eraseblocks = {
21449 {64 * 1024, 3},
21450 {32 * 1024, 1},
21451 {8 * 1024, 2},
21452 {16 * 1024, 1},
21453 },
21454 .block_erase = erase_sector_jedec,
21455 }, {
21456 .eraseblocks = { {256 * 1024, 1} },
21457 .block_erase = erase_chip_block_jedec,
21458 }
21459 },
Sean Nelson35727f72010-01-28 23:55:12 +000021460 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021461 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021462 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021463 .prepare_access = prepare_memory_access,
21464 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021465 },
21466
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021467 {
21468 .vendor = "Winbond",
21469 .name = "W49V002FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000021470 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021471 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000021472 .model_id = WINBOND_W49V002FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021473 .total_size = 256,
21474 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000021475 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000021476 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021477 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000021478 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000021479 .block_erasers =
21480 {
21481 {
21482 .eraseblocks = {
21483 {64 * 1024, 3},
21484 {32 * 1024, 1},
21485 {8 * 1024, 2},
21486 {16 * 1024, 1},
21487 },
21488 .block_erase = erase_sector_jedec,
21489 }, {
21490 .eraseblocks = { {256 * 1024, 1} },
21491 .block_erase = erase_chip_block_jedec,
21492 }
21493 },
Sean Nelson35727f72010-01-28 23:55:12 +000021494 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000021495 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000021496 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021497 .prepare_access = prepare_memory_access,
21498 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000021499 },
21500
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000021501 {
luke heef884232020-12-28 18:22:21 +080021502 .vendor = "XMC",
21503 .name = "XM25QH128C",
21504 .bustype = BUS_SPI,
21505 .manufacture_id = ST_ID,
21506 .model_id = XMC_XM25QH128C,
21507 .total_size = 16384,
21508 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010021509 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
21510 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021511 .tested = TEST_UNTESTED,
21512 .probe = probe_spi_rdid,
21513 .probe_timing = TIMING_ZERO,
21514 .block_erasers =
21515 {
21516 {
21517 .eraseblocks = { {4 * 1024, 4096} },
21518 .block_erase = spi_block_erase_20,
21519 }, {
21520 .eraseblocks = { {32 * 1024, 512} },
21521 .block_erase = spi_block_erase_52,
21522 }, {
21523 .eraseblocks = { {64 * 1024, 256} },
21524 .block_erase = spi_block_erase_d8,
21525 }, {
21526 .eraseblocks = { {16 * 1024 * 1024, 1} },
21527 .block_erase = spi_block_erase_60,
21528 }, {
21529 .eraseblocks = { {16 * 1024 * 1024, 1} },
21530 .block_erase = spi_block_erase_c7,
21531 }
21532 },
21533 .printlock = spi_prettyprint_status_register_plain,
21534 .unlock = spi_disable_blockprotect,
21535 .write = spi_chip_write_256,
21536 .read = spi_chip_read,
21537 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021538 .reg_bits =
21539 {
Nico Huber96786d02024-01-06 18:30:15 +010021540 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021541 .srp = {STATUS1, 7, RW},
21542 .srl = {STATUS2, 0, RW},
21543 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
21544 .tb = {STATUS1, 5, RW},
21545 .sec = {STATUS1, 6, RW},
21546 .cmp = {STATUS2, 6, RW},
21547 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021548 .wp_write_cfg = spi_wp_write_cfg,
21549 .wp_read_cfg = spi_wp_read_cfg,
21550 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021551 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020021552 .prepare_access = spi_prepare_io,
21553 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021554 },
21555
21556 {
21557 .vendor = "XMC",
21558 .name = "XM25QH256C",
21559 .bustype = BUS_SPI,
21560 .manufacture_id = ST_ID,
21561 .model_id = XMC_XM25QH256C,
21562 .total_size = 32768,
21563 .page_size = 256,
21564 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021565 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
21566 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
21567 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021568 .tested = TEST_UNTESTED,
21569 .probe = probe_spi_rdid,
21570 .probe_timing = TIMING_ZERO,
21571 .block_erasers =
21572 {
21573 {
21574 .eraseblocks = { {4 * 1024, 8192} },
21575 .block_erase = spi_block_erase_21,
21576 }, {
21577 .eraseblocks = { {4 * 1024, 8192} },
21578 .block_erase = spi_block_erase_20,
21579 }, {
21580 .eraseblocks = { {32 * 1024, 1024} },
21581 .block_erase = spi_block_erase_52,
21582 }, {
21583 .eraseblocks = { {64 * 1024, 512} },
21584 .block_erase = spi_block_erase_dc,
21585 }, {
21586 .eraseblocks = { {64 * 1024, 512} },
21587 .block_erase = spi_block_erase_d8,
21588 }, {
21589 .eraseblocks = { {32 * 1024 * 1024, 1} },
21590 .block_erase = spi_block_erase_60,
21591 }, {
21592 .eraseblocks = { {32 * 1024 * 1024, 1} },
21593 .block_erase = spi_block_erase_c7,
21594 }
21595 },
21596 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21597 .unlock = spi_disable_blockprotect,
21598 .write = spi_chip_write_256,
21599 .read = spi_chip_read,
21600 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021601 .reg_bits =
21602 {
Nico Huber96786d02024-01-06 18:30:15 +010021603 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021604 .srp = {STATUS1, 7, RW},
21605 .srl = {STATUS2, 0, RW},
21606 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
21607 .tb = {STATUS1, 6, RW},
21608 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021609 .wp_write_cfg = spi_wp_write_cfg,
21610 .wp_read_cfg = spi_wp_read_cfg,
21611 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110021612 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020021613 .prepare_access = spi_prepare_io,
21614 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021615 },
21616
21617 {
21618 .vendor = "XMC",
21619 .name = "XM25QH64C",
21620 .bustype = BUS_SPI,
21621 .manufacture_id = ST_ID,
21622 .model_id = XMC_XM25QH64C,
21623 .total_size = 8192,
21624 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010021625 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021626 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021627 .tested = TEST_UNTESTED,
21628 .probe = probe_spi_rdid,
21629 .probe_timing = TIMING_ZERO,
21630 .block_erasers =
21631 {
21632 {
21633 .eraseblocks = { {4 * 1024, 2048} },
21634 .block_erase = spi_block_erase_20,
21635 }, {
21636 .eraseblocks = { {32 * 1024, 256} },
21637 .block_erase = spi_block_erase_52,
21638 }, {
21639 .eraseblocks = { {64 * 1024, 128} },
21640 .block_erase = spi_block_erase_d8,
21641 }, {
21642 .eraseblocks = { {8 * 1024 * 1024, 1} },
21643 .block_erase = spi_block_erase_60,
21644 }, {
21645 .eraseblocks = { {8 * 1024 * 1024, 1} },
21646 .block_erase = spi_block_erase_c7,
21647 }
21648 },
Nico Huber96786d02024-01-06 18:30:15 +010021649 .reg_bits =
21650 {
21651 .qe = {STATUS2, 1, RW},
21652 },
luke heef884232020-12-28 18:22:21 +080021653 .printlock = spi_prettyprint_status_register_plain,
21654 .unlock = spi_disable_blockprotect,
21655 .write = spi_chip_write_256,
21656 .read = spi_chip_read,
21657 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020021658 .prepare_access = spi_prepare_io,
21659 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021660 },
21661
21662 {
21663 .vendor = "XMC",
21664 .name = "XM25QU128C",
21665 .bustype = BUS_SPI,
21666 .manufacture_id = ST_ID,
21667 .model_id = XMC_XM25QU128C,
21668 .total_size = 16384,
21669 .page_size = 256,
21670 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021671 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021672 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021673 .tested = TEST_UNTESTED,
21674 .probe = probe_spi_rdid,
21675 .probe_timing = TIMING_ZERO,
21676 .block_erasers =
21677 {
21678 {
21679 .eraseblocks = { {4 * 1024, 4096} },
21680 .block_erase = spi_block_erase_20,
21681 }, {
21682 .eraseblocks = { {32 * 1024, 512} },
21683 .block_erase = spi_block_erase_52,
21684 }, {
21685 .eraseblocks = { {64 * 1024, 256} },
21686 .block_erase = spi_block_erase_d8,
21687 }, {
21688 .eraseblocks = { {16 * 1024 * 1024, 1} },
21689 .block_erase = spi_block_erase_60,
21690 }, {
21691 .eraseblocks = { {16 * 1024 * 1024, 1} },
21692 .block_erase = spi_block_erase_c7,
21693 }
21694 },
Nico Huber96786d02024-01-06 18:30:15 +010021695 .reg_bits =
21696 {
21697 .qe = {STATUS2, 1, RW},
21698 },
luke heef884232020-12-28 18:22:21 +080021699 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21700 .unlock = spi_disable_blockprotect,
21701 .write = spi_chip_write_256,
21702 .read = spi_chip_read,
21703 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021704 .prepare_access = spi_prepare_io,
21705 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021706 },
21707
21708 {
21709 .vendor = "XMC",
21710 .name = "XM25QU256C",
21711 .bustype = BUS_SPI,
21712 .manufacture_id = ST_ID,
21713 .model_id = XMC_XM25QU256C,
21714 .total_size = 32768,
21715 .page_size = 256,
21716 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010021717 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
21718 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
21719 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021720 .tested = TEST_UNTESTED,
21721 .probe = probe_spi_rdid,
21722 .probe_timing = TIMING_ZERO,
21723 .block_erasers =
21724 {
21725 {
21726 .eraseblocks = { {4 * 1024, 8192} },
21727 .block_erase = spi_block_erase_21,
21728 }, {
21729 .eraseblocks = { {4 * 1024, 8192} },
21730 .block_erase = spi_block_erase_20,
21731 }, {
21732 .eraseblocks = { {32 * 1024, 1024} },
21733 .block_erase = spi_block_erase_52,
21734 }, {
21735 .eraseblocks = { {64 * 1024, 512} },
21736 .block_erase = spi_block_erase_dc,
21737 }, {
21738 .eraseblocks = { {64 * 1024, 512} },
21739 .block_erase = spi_block_erase_d8,
21740 }, {
21741 .eraseblocks = { {32 * 1024 * 1024, 1} },
21742 .block_erase = spi_block_erase_60,
21743 }, {
21744 .eraseblocks = { {32 * 1024 * 1024, 1} },
21745 .block_erase = spi_block_erase_c7,
21746 }
21747 },
Nico Huber96786d02024-01-06 18:30:15 +010021748 .reg_bits =
21749 {
21750 .qe = {STATUS2, 1, RW},
21751 },
luke heef884232020-12-28 18:22:21 +080021752 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21753 .unlock = spi_disable_blockprotect,
21754 .write = spi_chip_write_256,
21755 .read = spi_chip_read,
21756 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021757 .prepare_access = spi_prepare_io,
21758 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021759 },
21760
21761 {
21762 .vendor = "XMC",
21763 .name = "XM25QU64C",
21764 .bustype = BUS_SPI,
21765 .manufacture_id = ST_ID,
21766 .model_id = XMC_XM25QU64C,
21767 .total_size = 8192,
21768 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010021769 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010021770 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080021771 .tested = TEST_UNTESTED,
21772 .probe = probe_spi_rdid,
21773 .probe_timing = TIMING_ZERO,
21774 .block_erasers =
21775 {
21776 {
21777 .eraseblocks = { {4 * 1024, 2048} },
21778 .block_erase = spi_block_erase_20,
21779 }, {
21780 .eraseblocks = { {32 * 1024, 256} },
21781 .block_erase = spi_block_erase_52,
21782 }, {
21783 .eraseblocks = { {64 * 1024, 128} },
21784 .block_erase = spi_block_erase_d8,
21785 }, {
21786 .eraseblocks = { {8 * 1024 * 1024, 1} },
21787 .block_erase = spi_block_erase_60,
21788 }, {
21789 .eraseblocks = { {8 * 1024 * 1024, 1} },
21790 .block_erase = spi_block_erase_c7,
21791 }
21792 },
Nico Huber96786d02024-01-06 18:30:15 +010021793 .reg_bits =
21794 {
21795 .qe = {STATUS2, 1, RW},
21796 },
luke heef884232020-12-28 18:22:21 +080021797 .printlock = spi_prettyprint_status_register_plain,
21798 .unlock = spi_disable_blockprotect,
21799 .write = spi_chip_write_256,
21800 .read = spi_chip_read,
21801 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020021802 .prepare_access = spi_prepare_io,
21803 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080021804 },
21805
21806 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100021807 .vendor = "Zetta Device",
21808 .name = "ZD25D20",
21809 .bustype = BUS_SPI,
21810 .manufacture_id = ZETTADEVICE_ID,
21811 .model_id = ZETTADEVICE_ZD25D20,
21812 .total_size = 256,
21813 .page_size = 256,
21814 .feature_bits = FEATURE_WRSR_WREN,
21815 .tested = TEST_UNTESTED,
21816 .probe = probe_spi_rdid,
21817 .probe_timing = TIMING_ZERO,
21818 .block_erasers =
David Hendricksa72d5a92018-02-11 17:58:44 -080021819 {
21820 {
21821 .eraseblocks = { {4 * 1024, 64} },
21822 .block_erase = spi_block_erase_20,
21823 }, {
21824 .eraseblocks = { {32 * 1024, 8} },
21825 .block_erase = spi_block_erase_52,
21826 }, {
21827 .eraseblocks = { {64 * 1024, 4} },
21828 .block_erase = spi_block_erase_d8,
21829 }, {
21830 .eraseblocks = { {256 * 1024, 1} },
21831 .block_erase = spi_block_erase_60,
21832 }, {
21833 .eraseblocks = { {256 * 1024, 1} },
21834 .block_erase = spi_block_erase_c7,
21835 }
21836 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100021837 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21838 .unlock = spi_disable_blockprotect,
21839 .write = spi_chip_write_256,
21840 .read = spi_chip_read,
21841 .voltage = {2700, 3600},
David Hendricksa72d5a92018-02-11 17:58:44 -080021842 },
21843
21844 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100021845 .vendor = "Zetta Device",
21846 .name = "ZD25D40",
21847 .bustype = BUS_SPI,
21848 .manufacture_id = ZETTADEVICE_ID,
21849 .model_id = ZETTADEVICE_ZD25D40,
21850 .total_size = 512,
21851 .page_size = 256,
21852 .feature_bits = FEATURE_WRSR_WREN,
21853 .tested = TEST_UNTESTED,
21854 .probe = probe_spi_rdid,
21855 .probe_timing = TIMING_ZERO,
21856 .block_erasers =
nybashcbb46e22018-02-11 17:53:49 -080021857 {
21858 {
21859 .eraseblocks = { {4 * 1024, 128} },
21860 .block_erase = spi_block_erase_20,
21861 }, {
21862 .eraseblocks = { {32 * 1024, 16} },
21863 .block_erase = spi_block_erase_52,
21864 }, {
21865 .eraseblocks = { {64 * 1024, 8} },
21866 .block_erase = spi_block_erase_d8,
21867 }, {
21868 .eraseblocks = { {512 * 1024, 1} },
21869 .block_erase = spi_block_erase_60,
21870 }, {
21871 .eraseblocks = { {512 * 1024, 1} },
21872 .block_erase = spi_block_erase_c7,
21873 }
21874 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100021875 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21876 .unlock = spi_disable_blockprotect,
21877 .write = spi_chip_write_256,
21878 .read = spi_chip_read,
21879 .voltage = {2700, 3600},
nybashcbb46e22018-02-11 17:53:49 -080021880 },
21881
Stefan Taunerac1b4c82012-02-17 14:51:04 +000021882 {
Nico Huber34e3de62024-10-20 13:00:12 +020021883 .vendor = "Zetta Device",
21884 .name = "ZD25LQ64",
21885 .bustype = BUS_SPI,
21886 .manufacture_id = ZETTADEVICE_ID,
21887 .model_id = ZETTADEVICE_ZD25LQ64,
21888 .total_size = 8192,
21889 .page_size = 256,
21890 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR_EXT2 |
21891 FEATURE_OTP | FEATURE_QPI_SRP,
21892 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
21893 .tested = TEST_UNTESTED,
21894 .probe = probe_spi_rdid,
21895 .probe_timing = TIMING_ZERO,
21896 .block_erasers =
21897 {
21898 {
21899 .eraseblocks = { {4 * 1024, 2048} },
21900 .block_erase = spi_block_erase_20,
21901 }, {
21902 .eraseblocks = { {32 * 1024, 256} },
21903 .block_erase = spi_block_erase_52,
21904 }, {
21905 .eraseblocks = { {64 * 1024, 128} },
21906 .block_erase = spi_block_erase_d8,
21907 }, {
21908 .eraseblocks = { {8192 * 1024, 1} },
21909 .block_erase = spi_block_erase_60,
21910 }, {
21911 .eraseblocks = { {8192 * 1024, 1} },
21912 .block_erase = spi_block_erase_c7,
21913 },
21914 },
21915 .reg_bits =
21916 {
21917 .qe = {STATUS2, 1, RW},
21918 .srp = {STATUS1, 7, RW},
21919 .srl = {STATUS2, 0, RW},
21920 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
21921 .tb = {STATUS1, 5, RW},
21922 .sec = {STATUS1, 6, RW},
21923 .cmp = {STATUS2, 6, RW},
21924 },
21925 .wp_write_cfg = spi_wp_write_cfg,
21926 .wp_read_cfg = spi_wp_read_cfg,
21927 .wp_get_ranges = spi_wp_get_available_ranges,
21928 .decode_range = decode_range_spi25,
21929 .printlock = spi_prettyprint_status_register_bp2_srwd,
21930 .unlock = spi_disable_blockprotect_bp2_srwd,
21931 .write = spi_chip_write_256,
21932 .read = spi_chip_read,
21933 .voltage = {1650, 1950},
21934 .prepare_access = spi_prepare_io,
21935 .finish_access = spi_finish_io,
21936 },
21937
21938 {
21939 .vendor = "Zetta Device",
21940 .name = "ZD25LQ128",
21941 .bustype = BUS_SPI,
21942 .manufacture_id = ZETTADEVICE_ID,
21943 .model_id = ZETTADEVICE_ZD25LQ128,
21944 .total_size = 16384,
21945 .page_size = 256,
21946 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR_EXT2 |
21947 FEATURE_OTP | FEATURE_QPI_SRP,
21948 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
21949 .tested = TEST_UNTESTED,
21950 .probe = probe_spi_rdid,
21951 .probe_timing = TIMING_ZERO,
21952 .block_erasers =
21953 {
21954 {
21955 .eraseblocks = { {4 * 1024, 4096} },
21956 .block_erase = spi_block_erase_20,
21957 }, {
21958 .eraseblocks = { {32 * 1024, 512} },
21959 .block_erase = spi_block_erase_52,
21960 }, {
21961 .eraseblocks = { {64 * 1024, 256} },
21962 .block_erase = spi_block_erase_d8,
21963 }, {
21964 .eraseblocks = { {16384 * 1024, 1} },
21965 .block_erase = spi_block_erase_60,
21966 }, {
21967 .eraseblocks = { {16384 * 1024, 1} },
21968 .block_erase = spi_block_erase_c7,
21969 },
21970 },
21971 .reg_bits =
21972 {
21973 .qe = {STATUS2, 1, RW},
21974 .srp = {STATUS1, 7, RW},
21975 .srl = {STATUS2, 0, RW},
21976 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
21977 .tb = {STATUS1, 5, RW},
21978 .sec = {STATUS1, 6, RW},
21979 .cmp = {STATUS2, 6, RW},
21980 },
21981 .wp_write_cfg = spi_wp_write_cfg,
21982 .wp_read_cfg = spi_wp_read_cfg,
21983 .wp_get_ranges = spi_wp_get_available_ranges,
21984 .decode_range = decode_range_spi25,
21985 .printlock = spi_prettyprint_status_register_bp2_srwd,
21986 .unlock = spi_disable_blockprotect_bp2_srwd,
21987 .write = spi_chip_write_256,
21988 .read = spi_chip_read,
21989 .voltage = {1650, 1950},
21990 .prepare_access = spi_prepare_io,
21991 .finish_access = spi_finish_io,
21992 },
21993
21994 {
Alan Greendd592202019-08-23 10:11:37 +100021995 .vendor = "Unknown",
21996 .name = "SFDP-capable chip",
21997 .bustype = BUS_SPI,
21998 .manufacture_id = GENERIC_MANUF_ID,
21999 .model_id = SFDP_DEVICE_ID,
22000 .total_size = 0, /* set by probing function */
22001 .page_size = 0, /* set by probing function */
22002 .feature_bits = 0, /* set by probing function */
22003 /* We present our own "report this" text hence we do not */
22004 /* want the default "This flash part has status UNTESTED..." */
22005 /* text to be printed. */
22006 .tested = TEST_OK_PREW,
22007 .probe = probe_spi_sfdp,
22008 .block_erasers = {}, /* set by probing function */
22009 .unlock = spi_disable_blockprotect, /* is this safe? */
22010 .write = NULL, /* set by probing function */
22011 .read = spi_chip_read,
22012 /* FIXME: some vendor extensions define this */
22013 .voltage = {0},
22014 },
22015
22016 {
Carl-Daniel Hailfinger532c7172011-11-04 21:35:26 +000022017 .vendor = "Programmer",
22018 .name = "Opaque flash chip",
22019 .bustype = BUS_PROG,
22020 .manufacture_id = PROGMANUF_ID,
22021 .model_id = PROGDEV_ID,
22022 .total_size = 0,
22023 .page_size = 256,
22024 /* probe is assumed to work, rest will be filled in by probe */
22025 .tested = TEST_OK_PROBE,
22026 .probe = probe_opaque,
22027 /* eraseblock sizes will be set by the probing function */
22028 .block_erasers =
22029 {
22030 {
22031 .block_erase = erase_opaque,
22032 }
22033 },
22034 .write = write_opaque,
22035 .read = read_opaque,
22036 },
22037
22038 {
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000022039 .vendor = "AMIC",
22040 .name = "unknown AMIC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022041 .bustype = BUS_SPI,
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000022042 .manufacture_id = AMIC_ID,
22043 .model_id = GENERIC_DEVICE_ID,
22044 .total_size = 0,
22045 .page_size = 256,
22046 .tested = TEST_BAD_PREW,
22047 .probe = probe_spi_rdid4,
22048 .probe_timing = TIMING_ZERO,
22049 .write = NULL,
22050 .read = NULL,
22051 },
22052
22053 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022054 .vendor = "Atmel",
22055 .name = "unknown Atmel SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022056 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022057 .manufacture_id = ATMEL_ID,
22058 .model_id = GENERIC_DEVICE_ID,
22059 .total_size = 0,
22060 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000022061 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022062 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000022063 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022064 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022065 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000022066 },
22067
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022068 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +000022069 .vendor = "Eon",
22070 .name = "unknown Eon SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022071 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022072 .manufacture_id = EON_ID_NOPREFIX,
22073 .model_id = GENERIC_DEVICE_ID,
22074 .total_size = 0,
22075 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000022076 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022077 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000022078 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022079 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022080 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000022081 },
22082
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022083 {
22084 .vendor = "Macronix",
22085 .name = "unknown Macronix SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022086 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000022087 .manufacture_id = MACRONIX_ID,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022088 .model_id = GENERIC_DEVICE_ID,
22089 .total_size = 0,
22090 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000022091 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022092 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000022093 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022094 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022095 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000022096 },
22097
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022098 {
22099 .vendor = "PMC",
22100 .name = "unknown PMC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022101 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022102 .manufacture_id = PMC_ID,
22103 .model_id = GENERIC_DEVICE_ID,
22104 .total_size = 0,
22105 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000022106 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022107 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000022108 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022109 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022110 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000022111 },
22112
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022113 {
22114 .vendor = "SST",
22115 .name = "unknown SST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022116 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022117 .manufacture_id = SST_ID,
22118 .model_id = GENERIC_DEVICE_ID,
22119 .total_size = 0,
22120 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000022121 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022122 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000022123 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022124 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022125 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000022126 },
22127
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022128 {
22129 .vendor = "ST",
22130 .name = "unknown ST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022131 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022132 .manufacture_id = ST_ID,
22133 .model_id = GENERIC_DEVICE_ID,
22134 .total_size = 0,
22135 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000022136 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022137 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000022138 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022139 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022140 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000022141 },
Uwe Hermannfc425e82008-03-16 02:06:25 +000022142
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000022143 {
Sean Nelson118e1d62009-11-24 02:08:11 +000022144 .vendor = "Sanyo",
22145 .name = "unknown Sanyo SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022146 .bustype = BUS_SPI,
Sean Nelson118e1d62009-11-24 02:08:11 +000022147 .manufacture_id = SANYO_ID,
22148 .model_id = GENERIC_DEVICE_ID,
22149 .total_size = 0,
22150 .page_size = 256,
22151 .tested = TEST_BAD_PREW,
22152 .probe = probe_spi_rdid,
22153 .probe_timing = TIMING_ZERO,
Sean Nelson118e1d62009-11-24 02:08:11 +000022154 .write = NULL,
22155 .read = NULL,
22156 },
22157
22158 {
Stefan Taunereb582572012-09-21 12:52:50 +000022159 .vendor = "Winbond",
22160 .name = "unknown Winbond (ex Nexcom) SPI chip",
22161 .bustype = BUS_SPI,
22162 .manufacture_id = WINBOND_NEX_ID,
22163 .model_id = GENERIC_DEVICE_ID,
22164 .total_size = 0,
22165 .page_size = 256,
22166 .tested = TEST_BAD_PREW,
22167 .probe = probe_spi_rdid,
22168 .probe_timing = TIMING_ZERO,
22169 .write = NULL,
22170 .read = NULL,
22171 },
22172
22173 {
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000022174 .vendor = "Generic",
22175 .name = "unknown SPI chip (RDID)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022176 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000022177 .manufacture_id = GENERIC_MANUF_ID,
22178 .model_id = GENERIC_DEVICE_ID,
22179 .total_size = 0,
22180 .page_size = 256,
22181 .tested = TEST_BAD_PREW,
22182 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000022183 .write = NULL,
22184 },
Stefan Tauneraf2db612011-12-02 21:48:17 +000022185
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000022186 {
22187 .vendor = "Generic",
22188 .name = "unknown SPI chip (REMS)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022189 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000022190 .manufacture_id = GENERIC_MANUF_ID,
22191 .model_id = GENERIC_DEVICE_ID,
22192 .total_size = 0,
22193 .page_size = 256,
22194 .tested = TEST_BAD_PREW,
22195 .probe = probe_spi_rems,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000022196 .write = NULL,
22197 },
22198
Stefan Tauner96658be2014-05-26 22:05:31 +000022199 {0}
Stephan Guilloux72cf5652009-04-21 01:46:07 +000022200};
Stefan Tauner96658be2014-05-26 22:05:31 +000022201
22202const unsigned int flashchips_size = ARRAY_SIZE(flashchips);