blob: 990914f498c286a8e75b26778a5a94787dc0de74 [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",
Nico Huber6bc88e72024-10-20 16:32:08 +02003789 .name = "B.25Q32BS/BY25Q32CS/BY25Q32ES",
3790 .bustype = BUS_SPI,
3791 .manufacture_id = BOYA_BOHONG_ID,
3792 .model_id = BOYA_BOHONG_B_25Q32BS,
3793 .total_size = 4096,
3794 .page_size = 256,
3795 /* BY25Q32CS: QPI w/ SRP (4, 4, 6, 8) */
3796 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
3797 FEATURE_OTP | FEATURE_QIO,
3798 .tested = TEST_UNTESTED,
3799 .probe = probe_spi_rdid,
3800 .probe_timing = TIMING_ZERO,
3801 .block_erasers =
3802 {
3803 {
3804 .eraseblocks = { {4 * 1024, 1024} },
3805 .block_erase = spi_block_erase_20,
3806 }, {
3807 .eraseblocks = { {32 * 1024, 128} },
3808 .block_erase = spi_block_erase_52,
3809 }, {
3810 .eraseblocks = { {64 * 1024, 64} },
3811 .block_erase = spi_block_erase_d8,
3812 }, {
3813 .eraseblocks = { {4096 * 1024, 1} },
3814 .block_erase = spi_block_erase_60,
3815 }, {
3816 .eraseblocks = { {4096 * 1024, 1} },
3817 .block_erase = spi_block_erase_c7,
3818 },
3819 },
3820 .reg_bits =
3821 {
3822 .qe = {STATUS2, 1, RW},
3823 .srp = {STATUS1, 7, RW},
3824 .srl = {STATUS2, 0, RW},
3825 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3826 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
3827 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
3828 .cmp = {STATUS2, 6, RW},
3829 },
3830 .wp_write_cfg = spi_wp_write_cfg,
3831 .wp_read_cfg = spi_wp_read_cfg,
3832 .wp_get_ranges = spi_wp_get_available_ranges,
3833 .decode_range = decode_range_spi25,
3834 .printlock = spi_prettyprint_status_register_bp4_srwd,
3835 .unlock = spi_disable_blockprotect_bp4_srwd,
3836 .write = spi_chip_write_256,
3837 .read = spi_chip_read,
3838 .voltage = {2700, 3600},
3839 .prepare_access = spi_prepare_io,
3840 .finish_access = spi_finish_io,
3841 },
3842
3843 {
3844 .vendor = "Boya/BoHong Microelectronics",
3845 .name = "B.25Q64AS/BY25Q64ES",
3846 .bustype = BUS_SPI,
3847 .manufacture_id = BOYA_BOHONG_ID,
3848 .model_id = BOYA_BOHONG_B_25Q64AS,
3849 .total_size = 8192,
3850 .page_size = 256,
3851 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
3852 FEATURE_OTP | FEATURE_QIO,
3853 .tested = TEST_UNTESTED,
3854 .probe = probe_spi_rdid,
3855 .probe_timing = TIMING_ZERO,
3856 .block_erasers =
3857 {
3858 {
3859 .eraseblocks = { {4 * 1024, 2048} },
3860 .block_erase = spi_block_erase_20,
3861 }, {
3862 .eraseblocks = { {32 * 1024, 256} },
3863 .block_erase = spi_block_erase_52,
3864 }, {
3865 .eraseblocks = { {64 * 1024, 128} },
3866 .block_erase = spi_block_erase_d8,
3867 }, {
3868 .eraseblocks = { {8192 * 1024, 1} },
3869 .block_erase = spi_block_erase_60,
3870 }, {
3871 .eraseblocks = { {8192 * 1024, 1} },
3872 .block_erase = spi_block_erase_c7,
3873 },
3874 },
3875 .reg_bits =
3876 {
3877 .qe = {STATUS2, 1, RW},
3878 .srp = {STATUS1, 7, RW},
3879 .srl = {STATUS2, 0, RW},
3880 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3881 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
3882 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
3883 .cmp = {STATUS2, 6, RW},
3884 },
3885 .wp_write_cfg = spi_wp_write_cfg,
3886 .wp_read_cfg = spi_wp_read_cfg,
3887 .wp_get_ranges = spi_wp_get_available_ranges,
3888 .decode_range = decode_range_spi25,
3889 .printlock = spi_prettyprint_status_register_bp4_srwd,
3890 .unlock = spi_disable_blockprotect_bp4_srwd,
3891 .write = spi_chip_write_256,
3892 .read = spi_chip_read,
3893 .voltage = {2700, 3600},
3894 .prepare_access = spi_prepare_io,
3895 .finish_access = spi_finish_io,
3896 },
3897
3898 {
3899 .vendor = "Boya/BoHong Microelectronics",
3900 .name = "B.25Q128AS/BY25Q128ES",
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003901 .bustype = BUS_SPI,
Angel Pons1ebda782021-04-20 21:39:11 +02003902 .manufacture_id = BOYA_BOHONG_ID,
3903 .model_id = BOYA_BOHONG_B_25Q128AS,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003904 .total_size = 16384,
3905 .page_size = 256,
Nico Huber6bc88e72024-10-20 16:32:08 +02003906 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
Nico Huber226bb872024-04-09 23:30:34 +02003907 FEATURE_OTP | FEATURE_QIO,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05003908 .tested = TEST_OK_PREW,
3909 .probe = probe_spi_rdid,
3910 .probe_timing = TIMING_ZERO,
3911 .block_erasers =
3912 {
3913 {
3914 .eraseblocks = { {4 * 1024, 4096} },
3915 .block_erase = spi_block_erase_20,
3916 }, {
3917 .eraseblocks = { {32 * 1024, 512} },
3918 .block_erase = spi_block_erase_52,
3919 }, {
3920 .eraseblocks = { {64 * 1024, 256} },
3921 .block_erase = spi_block_erase_d8,
3922 }, {
3923 .eraseblocks = { {16 * 1024 * 1024, 1} },
3924 .block_erase = spi_block_erase_60,
3925 }, {
3926 .eraseblocks = { {16 * 1024 * 1024, 1} },
3927 .block_erase = spi_block_erase_c7,
3928 }
3929 },
Nico Huber226bb872024-04-09 23:30:34 +02003930 .reg_bits =
3931 {
3932 .qe = {STATUS2, 1, RW},
Nico Huber6bc88e72024-10-20 16:32:08 +02003933 .srp = {STATUS1, 7, RW},
3934 .srl = {STATUS2, 0, RW},
3935 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3936 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
3937 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
3938 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02003939 },
Nico Huber6bc88e72024-10-20 16:32:08 +02003940 .wp_write_cfg = spi_wp_write_cfg,
3941 .wp_read_cfg = spi_wp_read_cfg,
3942 .wp_get_ranges = spi_wp_get_available_ranges,
3943 .decode_range = decode_range_spi25,
3944 .printlock = spi_prettyprint_status_register_bp4_srwd,
3945 .unlock = spi_disable_blockprotect_bp4_srwd,
3946 .write = spi_chip_write_256,
3947 .read = spi_chip_read,
3948 .voltage = {2700, 3600},
3949 .prepare_access = spi_prepare_io,
3950 .finish_access = spi_finish_io,
3951 },
3952
3953 {
3954 .vendor = "Boya Microelectronics",
3955 .name = "BY25Q128FS",
3956 .bustype = BUS_SPI,
3957 .manufacture_id = BOYA_BOHONG_ID,
3958 .model_id = BOYA_BOHONG_B_25Q128FS,
3959 .total_size = 16384,
3960 .page_size = 256,
3961 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
3962 FEATURE_OTP | FEATURE_QIO,
3963 .tested = TEST_UNTESTED,
3964 .probe = probe_spi_rdid,
3965 .probe_timing = TIMING_ZERO,
3966 .block_erasers =
3967 {
3968 {
3969 .eraseblocks = { {4 * 1024, 4096} },
3970 .block_erase = spi_block_erase_20,
3971 }, {
3972 .eraseblocks = { {32 * 1024, 512} },
3973 .block_erase = spi_block_erase_52,
3974 }, {
3975 .eraseblocks = { {64 * 1024, 256} },
3976 .block_erase = spi_block_erase_d8,
3977 }, {
3978 .eraseblocks = { {16 * 1024 * 1024, 1} },
3979 .block_erase = spi_block_erase_60,
3980 }, {
3981 .eraseblocks = { {16 * 1024 * 1024, 1} },
3982 .block_erase = spi_block_erase_c7,
3983 }
3984 },
3985 .reg_bits =
3986 {
3987 .qe = {STATUS2, 1, RW},
3988 .srp = {STATUS1, 7, RW},
3989 .srl = {STATUS2, 0, RW},
3990 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
3991 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
3992 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
3993 .cmp = {STATUS2, 6, RW},
3994 },
3995 .wp_write_cfg = spi_wp_write_cfg,
3996 .wp_read_cfg = spi_wp_read_cfg,
3997 .wp_get_ranges = spi_wp_get_available_ranges,
3998 .decode_range = decode_range_spi25,
3999 .printlock = spi_prettyprint_status_register_bp4_srwd,
4000 .unlock = spi_disable_blockprotect_bp4_srwd,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05004001 .write = spi_chip_write_256,
4002 .read = spi_chip_read,
4003 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02004004 .prepare_access = spi_prepare_io,
4005 .finish_access = spi_finish_io,
Jack Olsen73ae5ef2020-08-08 21:12:13 -05004006 },
4007
4008 {
Joshua Roysf1324e02010-09-16 00:51:51 +00004009 .vendor = "Bright",
4010 .name = "BM29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004011 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +00004012 .manufacture_id = BRIGHT_ID,
4013 .model_id = BRIGHT_BM29F040,
4014 .total_size = 512,
4015 .page_size = 64 * 1024,
4016 .feature_bits = FEATURE_EITHER_RESET,
4017 .tested = TEST_OK_PR,
4018 .probe = probe_jedec,
4019 .probe_timing = TIMING_ZERO,
4020 .block_erasers =
4021 {
4022 {
4023 .eraseblocks = { {64 * 1024, 8} },
4024 .block_erase = erase_sector_jedec,
4025 }, {
4026 .eraseblocks = { {512 * 1024, 1} },
4027 .block_erase = erase_chip_block_jedec,
4028 },
4029 },
4030 .write = write_jedec_1,
4031 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00004032 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01004033 .prepare_access = prepare_memory_access,
4034 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +00004035 },
4036
4037 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004038 .vendor = "Catalyst",
4039 .name = "CAT28F512",
4040 .bustype = BUS_PARALLEL,
4041 .manufacture_id = CATALYST_ID,
4042 .model_id = CATALYST_CAT28F512,
4043 .total_size = 64,
4044 .page_size = 0, /* unused */
4045 .feature_bits = 0,
Alan Green908adf42019-07-03 15:34:06 +10004046 .tested = {.probe = OK, .read = OK, .erase = BAD, .write = BAD},
Alan Green1f9cc7d2019-07-01 11:10:45 +10004047 .probe = probe_jedec, /* FIXME! */
4048 .probe_timing = TIMING_ZERO,
4049 .block_erasers =
4050 {
4051 {
4052 .eraseblocks = { {64 * 1024, 1} },
4053 .block_erase = NULL, /* TODO */
4054 },
4055 },
4056 .write = NULL, /* TODO */
4057 .read = read_memmapped,
4058 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01004059 .prepare_access = prepare_memory_access,
4060 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004061 },
4062
4063 {
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004064 .vendor = "ENE",
4065 .name = "KB9012 (EDI)",
4066 .bustype = BUS_SPI,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004067 .total_size = 128,
4068 .page_size = 128,
4069 .feature_bits = FEATURE_ERASED_ZERO,
4070 .tested = TEST_OK_PREW,
Alan Greenc1863ca2019-06-27 15:08:03 +10004071 .spi_cmd_set = SPI_EDI,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004072 .probe = edi_probe_kb9012,
4073 .probe_timing = TIMING_ZERO,
4074 .block_erasers =
4075 {
4076 {
4077 .eraseblocks = { {128, 1024} },
4078 .block_erase = edi_chip_block_erase,
4079 },
4080 },
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004081 .write = edi_chip_write,
4082 .read = edi_chip_read,
4083 .voltage = {2700, 3600},
Alan Greenc1863ca2019-06-27 15:08:03 +10004084 .gran = write_gran_128bytes,
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03004085 },
4086
4087 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004088 .vendor = "ESI",
4089 .name = "ES25P16",
4090 .bustype = BUS_SPI,
4091 .manufacture_id = EXCEL_ID_NOPREFIX,
4092 .model_id = EXCEL_ES25P16,
4093 .total_size = 2 * 1024,
4094 .page_size = 256,
4095 /* 256-byte parameter page separate from memory array:
4096 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
4097 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00004098 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004099 .probe = probe_spi_rdid,
4100 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004101 .block_erasers =
4102 {
4103 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004104 .eraseblocks = { {64 * 1024, 32} },
4105 .block_erase = spi_block_erase_d8,
Sean Nelson54596372010-01-09 05:30:14 +00004106 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004107 .eraseblocks = { {2 * 1024 * 1024, 1} },
4108 .block_erase = spi_block_erase_c7,
Sean Nelson54596372010-01-09 05:30:14 +00004109 }
4110 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10004111 .printlock = spi_prettyprint_status_register_bp2_srwd,
4112 .unlock = spi_disable_blockprotect_bp2_srwd,
4113 .write = spi_chip_write_256,
4114 .read = spi_chip_read, /* Fast Read (0x0B) supported */
4115 .voltage = {2700, 3600},
4116 },
4117
4118 {
4119 .vendor = "ESI",
4120 .name = "ES25P40",
4121 .bustype = BUS_SPI,
4122 .manufacture_id = EXCEL_ID_NOPREFIX,
4123 .model_id = EXCEL_ES25P40,
4124 .total_size = 512,
4125 .page_size = 256,
4126 /* 256-byte parameter page separate from memory array:
4127 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
4128 .feature_bits = FEATURE_WRSR_WREN,
4129 .tested = TEST_UNTESTED,
4130 .probe = probe_spi_rdid,
4131 .probe_timing = TIMING_ZERO,
4132 .block_erasers =
4133 {
4134 {
4135 .eraseblocks = { {64 * 1024, 8} },
4136 .block_erase = spi_block_erase_d8,
4137 }, {
4138 .eraseblocks = { {512 * 1024, 1} },
4139 .block_erase = spi_block_erase_c7,
4140 }
4141 },
4142 .printlock = spi_prettyprint_status_register_bp2_srwd,
4143 .unlock = spi_disable_blockprotect_bp2_srwd,
4144 .write = spi_chip_write_256,
4145 .read = spi_chip_read, /* Fast Read (0x0B) supported */
4146 .voltage = {2700, 3600},
4147 },
4148
4149 {
4150 .vendor = "ESI",
4151 .name = "ES25P80",
4152 .bustype = BUS_SPI,
4153 .manufacture_id = EXCEL_ID_NOPREFIX,
4154 .model_id = EXCEL_ES25P80,
4155 .total_size = 1024,
4156 .page_size = 256,
4157 /* 256-byte parameter page separate from memory array:
4158 * supports read (0x53), fast read (0x5B), erase (0xD5) and program (0x52) instructions. */
4159 .feature_bits = FEATURE_WRSR_WREN,
4160 .tested = TEST_UNTESTED,
4161 .probe = probe_spi_rdid,
4162 .probe_timing = TIMING_ZERO,
4163 .block_erasers =
4164 {
4165 {
4166 .eraseblocks = { {64 * 1024, 16} },
4167 .block_erase = spi_block_erase_d8,
4168 }, {
4169 .eraseblocks = { {1024 * 1024, 1} },
4170 .block_erase = spi_block_erase_c7,
4171 }
4172 },
4173 .printlock = spi_prettyprint_status_register_bp2_srwd,
4174 .unlock = spi_disable_blockprotect_bp2_srwd,
4175 .write = spi_chip_write_256,
4176 .read = spi_chip_read, /* Fast Read (0x0B) supported */
4177 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +00004178 },
4179
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00004180 {
Stefan Tauner352e50b2013-02-22 15:58:45 +00004181 .vendor = "ESMT",
Michael Karcher80a59ea2010-06-19 22:06:35 +00004182 .name = "F25L008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004183 .bustype = BUS_SPI,
Stefan Tauner352e50b2013-02-22 15:58:45 +00004184 .manufacture_id = ESMT_ID,
4185 .model_id = ESMT_F25L008A,
Michael Karcher80a59ea2010-06-19 22:06:35 +00004186 .total_size = 1024,
4187 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004188 .feature_bits = FEATURE_WRSR_EITHER,
Stefan Taunereb582572012-09-21 12:52:50 +00004189 .tested = TEST_OK_PREW,
Michael Karcher80a59ea2010-06-19 22:06:35 +00004190 .probe = probe_spi_rdid,
4191 .probe_timing = TIMING_ZERO,
4192 .block_erasers =
4193 {
4194 {
4195 .eraseblocks = { {4 * 1024, 256} },
4196 .block_erase = spi_block_erase_20,
4197 }, {
4198 .eraseblocks = { {64 * 1024, 16} },
4199 .block_erase = spi_block_erase_d8,
4200 }, {
4201 .eraseblocks = { {1024 * 1024, 1} },
4202 .block_erase = spi_block_erase_60,
4203 }, {
4204 .eraseblocks = { {1024 * 1024, 1} },
4205 .block_erase = spi_block_erase_c7,
4206 }
4207 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004208 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004209 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger9a795d82010-07-14 16:19:05 +00004210 .write = spi_chip_write_1,
Michael Karcher4497e862010-07-10 19:34:15 +00004211 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004212 .voltage = {2700, 3600},
Michael Karcher80a59ea2010-06-19 22:06:35 +00004213 },
4214
4215 {
Stefan Tauner85f09f72014-05-27 21:27:14 +00004216 .vendor = "ESMT",
4217 .name = "F25L32PA",
4218 .bustype = BUS_SPI,
4219 .manufacture_id = ESMT_ID,
4220 .model_id = ESMT_F25L32PA,
4221 .total_size = 4096,
4222 .page_size = 256,
4223 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP,
4224 .tested = TEST_UNTESTED,
4225 .probe = probe_spi_rdid,
4226 .probe_timing = TIMING_ZERO,
4227 .block_erasers =
4228 {
4229 {
4230 .eraseblocks = { {4 * 1024, 1024} },
4231 .block_erase = spi_block_erase_20,
4232 }, {
4233 .eraseblocks = { {64 * 1024, 64} },
4234 .block_erase = spi_block_erase_d8,
4235 }, {
4236 .eraseblocks = { {4 * 1024 * 1024, 1} },
4237 .block_erase = spi_block_erase_60,
4238 }, {
4239 .eraseblocks = { {4 * 1024 * 1024, 1} },
4240 .block_erase = spi_block_erase_c7,
4241 }
4242 },
4243 .printlock = spi_prettyprint_status_register_bp2_bpl,
4244 .unlock = spi_disable_blockprotect,
4245 .write = spi_chip_write_256,
4246 .read = spi_chip_read,
4247 .voltage = {2700, 3600},
4248 },
4249
4250 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004251 .vendor = "ESMT",
4252 .name = "F49B002UA",
4253 .bustype = BUS_PARALLEL,
4254 .manufacture_id = ESMT_ID,
4255 .model_id = ESMT_F49B002UA,
4256 .total_size = 256,
4257 .page_size = 4096,
4258 .feature_bits = FEATURE_EITHER_RESET,
4259 .tested = TEST_UNTESTED,
4260 .probe = probe_jedec,
4261 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
4262 .block_erasers =
4263 {
4264 {
4265 .eraseblocks = {
4266 {128 * 1024, 1},
4267 {96 * 1024, 1},
4268 {8 * 1024, 2},
4269 {16 * 1024, 1},
4270 },
4271 .block_erase = erase_sector_jedec,
4272 }, {
4273 .eraseblocks = { {256 * 1024, 1} },
4274 .block_erase = erase_chip_block_jedec,
4275 }
4276 },
4277 .write = write_jedec_1,
4278 .read = read_memmapped,
4279 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01004280 .prepare_access = prepare_memory_access,
4281 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004282 },
4283
4284 {
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004285 .vendor = "Eon",
4286 .name = "EN25B05",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004287 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004288 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004289 .model_id = EON_EN25B05,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004290 .total_size = 64,
4291 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004292 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004293 .tested = TEST_UNTESTED,
4294 .probe = probe_spi_rdid,
4295 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004296 .block_erasers =
4297 {
4298 {
4299 .eraseblocks = {
4300 {4 * 1024, 2},
4301 {8 * 1024, 1},
4302 {16 * 1024, 1},
4303 {32 * 1024, 1},
4304 },
4305 .block_erase = spi_block_erase_d8,
4306 }, {
4307 .eraseblocks = { {64 * 1024, 1} },
4308 .block_erase = spi_block_erase_c7,
4309 }
4310 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004311 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004312 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004313 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004314 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004315 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004316 },
4317
4318 {
4319 .vendor = "Eon",
4320 .name = "EN25B05T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004321 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004322 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004323 .model_id = EON_EN25B05,
Sean Nelson54596372010-01-09 05:30:14 +00004324 .total_size = 64,
4325 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004326 .feature_bits = FEATURE_WRSR_WREN,
Sean Nelson54596372010-01-09 05:30:14 +00004327 .tested = TEST_UNTESTED,
4328 .probe = probe_spi_rdid,
4329 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004330 .block_erasers =
4331 {
4332 {
4333 .eraseblocks = {
4334 {32 * 1024, 1},
4335 {16 * 1024, 1},
4336 {8 * 1024, 1},
4337 {4 * 1024, 2},
4338 },
4339 .block_erase = spi_block_erase_d8,
4340 }, {
4341 .eraseblocks = { {64 * 1024, 1} },
4342 .block_erase = spi_block_erase_c7,
4343 }
4344 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004345 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004346 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004347 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004348 .read = spi_chip_read, /* Fast read (0x0B) supported */
4349 .voltage = {2700, 3600},
4350 },
4351
4352 {
4353 .vendor = "Eon",
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004354 .name = "EN25B10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004355 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004356 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004357 .model_id = EON_EN25B10,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004358 .total_size = 128,
4359 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004360 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004361 .tested = TEST_UNTESTED,
4362 .probe = probe_spi_rdid,
4363 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004364 .block_erasers =
4365 {
4366 {
4367 .eraseblocks = {
4368 {4 * 1024, 2},
4369 {8 * 1024, 1},
4370 {16 * 1024, 1},
4371 {32 * 1024, 3},
4372 },
4373 .block_erase = spi_block_erase_d8,
4374 }, {
4375 .eraseblocks = { {128 * 1024, 1} },
4376 .block_erase = spi_block_erase_c7,
4377 }
4378 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004379 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004380 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004381 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004382 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004383 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004384 },
4385
4386 {
4387 .vendor = "Eon",
4388 .name = "EN25B10T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004389 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004390 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004391 .model_id = EON_EN25B10,
Sean Nelson54596372010-01-09 05:30:14 +00004392 .total_size = 128,
4393 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004394 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +00004395 .tested = TEST_OK_PREW,
Sean Nelson54596372010-01-09 05:30:14 +00004396 .probe = probe_spi_rdid,
4397 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004398 .block_erasers =
4399 {
4400 {
4401 .eraseblocks = {
4402 {32 * 1024, 3},
4403 {16 * 1024, 1},
4404 {8 * 1024, 1},
4405 {4 * 1024, 2},
4406 },
4407 .block_erase = spi_block_erase_d8,
4408 }, {
4409 .eraseblocks = { {128 * 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,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004415 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004416 .read = spi_chip_read, /* Fast read (0x0B) supported */
4417 .voltage = {2700, 3600},
4418 },
4419
4420 {
4421 .vendor = "Eon",
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004422 .name = "EN25B16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004423 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004424 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004425 .model_id = EON_EN25B16,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004426 .total_size = 2048,
4427 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004428 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004429 .tested = TEST_UNTESTED,
4430 .probe = probe_spi_rdid,
4431 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004432 .block_erasers =
4433 {
4434 {
4435 .eraseblocks = {
4436 {4 * 1024, 2},
4437 {8 * 1024, 1},
4438 {16 * 1024, 1},
4439 {32 * 1024, 1},
4440 {64 * 1024, 31},
4441 },
4442 .block_erase = spi_block_erase_d8,
4443 }, {
4444 .eraseblocks = { {2 * 1024 * 1024, 1} },
4445 .block_erase = spi_block_erase_c7,
4446 }
4447 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004448 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004449 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004450 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004451 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004452 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004453 },
4454
4455 {
4456 .vendor = "Eon",
4457 .name = "EN25B16T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004458 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004459 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004460 .model_id = EON_EN25B16,
Sean Nelson54596372010-01-09 05:30:14 +00004461 .total_size = 2048,
4462 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +00004463 .feature_bits = FEATURE_WRSR_WREN,
Sean Nelson54596372010-01-09 05:30:14 +00004464 .tested = TEST_UNTESTED,
4465 .probe = probe_spi_rdid,
4466 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004467 .block_erasers =
4468 {
4469 {
4470 .eraseblocks = {
4471 {64 * 1024, 31},
4472 {32 * 1024, 1},
4473 {16 * 1024, 1},
4474 {8 * 1024, 1},
4475 {4 * 1024, 2},
4476 },
4477 .block_erase = spi_block_erase_d8,
4478 }, {
4479 .eraseblocks = { {2 * 1024 * 1024, 1} },
4480 .block_erase = spi_block_erase_c7,
4481 }
4482 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004483 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004484 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004485 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004486 .read = spi_chip_read, /* Fast read (0x0B) supported */
4487 .voltage = {2700, 3600},
4488 },
4489
4490 {
4491 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004492 .name = "EN25B20",
Stefan Taunerb175af52015-01-24 15:06:27 +00004493 .bustype = BUS_SPI,
4494 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004495 .model_id = EON_EN25B20,
4496 .total_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004497 .page_size = 256,
4498 .feature_bits = FEATURE_WRSR_WREN,
4499 .tested = TEST_UNTESTED,
4500 .probe = probe_spi_rdid,
4501 .probe_timing = TIMING_ZERO,
4502 .block_erasers =
4503 {
4504 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004505 .eraseblocks = {
4506 {4 * 1024, 2},
4507 {8 * 1024, 1},
4508 {16 * 1024, 1},
4509 {32 * 1024, 1},
4510 {64 * 1024, 3}
4511 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004512 .block_erase = spi_block_erase_d8,
4513 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004514 .eraseblocks = { {256 * 1024, 1} },
4515 .block_erase = spi_block_erase_c7,
4516 }
4517 },
4518 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4519 .unlock = spi_disable_blockprotect,
4520 .write = spi_chip_write_256,
4521 .read = spi_chip_read, /* Fast read (0x0B) supported */
4522 .voltage = {2700, 3600},
4523 },
4524
4525 {
4526 .vendor = "Eon",
4527 .name = "EN25B20T",
4528 .bustype = BUS_SPI,
4529 .manufacture_id = EON_ID_NOPREFIX,
4530 .model_id = EON_EN25B20,
4531 .total_size = 256,
4532 .page_size = 256,
4533 .feature_bits = FEATURE_WRSR_WREN,
4534 .tested = TEST_UNTESTED,
4535 .probe = probe_spi_rdid,
4536 .probe_timing = TIMING_ZERO,
4537 .block_erasers =
4538 {
4539 {
4540 .eraseblocks = {
4541 {64 * 1024, 3},
4542 {32 * 1024, 1},
4543 {16 * 1024, 1},
4544 {8 * 1024, 1},
4545 {4 * 1024, 2},
4546 },
4547 .block_erase = spi_block_erase_d8,
4548 }, {
4549 .eraseblocks = { {256 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004550 .block_erase = spi_block_erase_c7,
4551 }
4552 },
4553 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4554 .unlock = spi_disable_blockprotect,
4555 .write = spi_chip_write_256,
4556 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004557 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004558 },
4559
4560 {
4561 .vendor = "Eon",
4562 .name = "EN25B32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004563 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004564 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004565 .model_id = EON_EN25B32,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004566 .total_size = 4096,
4567 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004568 /* OTP: 512B total; enter 0x3A */
4569 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004570 .tested = TEST_UNTESTED,
4571 .probe = probe_spi_rdid,
4572 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004573 .block_erasers =
4574 {
4575 {
4576 .eraseblocks = {
4577 {4 * 1024, 2},
4578 {8 * 1024, 1},
4579 {16 * 1024, 1},
4580 {32 * 1024, 1},
4581 {64 * 1024, 63},
4582 },
4583 .block_erase = spi_block_erase_d8,
4584 }, {
4585 .eraseblocks = { {4 * 1024 * 1024, 1} },
4586 .block_erase = spi_block_erase_c7,
4587 }
4588 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004589 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004590 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004591 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004592 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004593 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004594 },
4595
4596 {
4597 .vendor = "Eon",
4598 .name = "EN25B32T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004599 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004600 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004601 .model_id = EON_EN25B32,
Sean Nelson54596372010-01-09 05:30:14 +00004602 .total_size = 4096,
4603 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004604 /* OTP: 512B total; enter 0x3A */
4605 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Sean Nelson54596372010-01-09 05:30:14 +00004606 .tested = TEST_UNTESTED,
4607 .probe = probe_spi_rdid,
4608 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004609 .block_erasers =
4610 {
4611 {
4612 .eraseblocks = {
4613 {64 * 1024, 63},
4614 {32 * 1024, 1},
4615 {16 * 1024, 1},
4616 {8 * 1024, 1},
4617 {4 * 1024, 2},
4618 },
4619 .block_erase = spi_block_erase_d8,
4620 }, {
4621 .eraseblocks = { {4 * 1024 * 1024, 1} },
4622 .block_erase = spi_block_erase_c7,
4623 }
4624 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004625 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004626 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004627 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004628 .read = spi_chip_read, /* Fast read (0x0B) supported */
4629 .voltage = {2700, 3600},
4630 },
4631
4632 {
4633 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004634 .name = "EN25B40",
Stefan Taunerb175af52015-01-24 15:06:27 +00004635 .bustype = BUS_SPI,
4636 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004637 .model_id = EON_EN25B40,
4638 .total_size = 512,
Stefan Taunerb175af52015-01-24 15:06:27 +00004639 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004640 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerb175af52015-01-24 15:06:27 +00004641 .tested = TEST_UNTESTED,
4642 .probe = probe_spi_rdid,
4643 .probe_timing = TIMING_ZERO,
4644 .block_erasers =
4645 {
4646 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004647 .eraseblocks = {
4648 {4 * 1024, 2},
4649 {8 * 1024, 1},
4650 {16 * 1024, 1},
4651 {32 * 1024, 1},
4652 {64 * 1024, 7}
4653 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004654 .block_erase = spi_block_erase_d8,
4655 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004656 .eraseblocks = { {512 * 1024, 1} },
4657 .block_erase = spi_block_erase_c7,
4658 }
4659 },
4660 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4661 .unlock = spi_disable_blockprotect,
4662 .write = spi_chip_write_256,
4663 .read = spi_chip_read, /* Fast read (0x0B) supported */
4664 .voltage = {2700, 3600},
4665 },
4666
4667 {
4668 .vendor = "Eon",
4669 .name = "EN25B40T",
4670 .bustype = BUS_SPI,
4671 .manufacture_id = EON_ID_NOPREFIX,
4672 .model_id = EON_EN25B40,
4673 .total_size = 512,
4674 .page_size = 256,
4675 .feature_bits = FEATURE_WRSR_WREN,
4676 .tested = TEST_UNTESTED,
4677 .probe = probe_spi_rdid,
4678 .probe_timing = TIMING_ZERO,
4679 .block_erasers =
4680 {
4681 {
4682 .eraseblocks = {
4683 {64 * 1024, 7},
4684 {32 * 1024, 1},
4685 {16 * 1024, 1},
4686 {8 * 1024, 1},
4687 {4 * 1024, 2},
4688 },
4689 .block_erase = spi_block_erase_d8,
4690 }, {
4691 .eraseblocks = { {512 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004692 .block_erase = spi_block_erase_c7,
4693 }
4694 },
4695 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4696 .unlock = spi_disable_blockprotect,
4697 .write = spi_chip_write_256,
4698 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004699 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004700 },
4701
4702 {
4703 .vendor = "Eon",
4704 .name = "EN25B64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004705 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004706 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004707 .model_id = EON_EN25B64,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004708 .total_size = 8192,
4709 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004710 /* OTP: 512B total; enter 0x3A */
4711 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004712 .tested = TEST_UNTESTED,
4713 .probe = probe_spi_rdid,
4714 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004715 .block_erasers =
4716 {
4717 {
4718 .eraseblocks = {
4719 {4 * 1024, 2},
4720 {8 * 1024, 1},
4721 {16 * 1024, 1},
4722 {32 * 1024, 1},
4723 {64 * 1024, 127},
4724 },
4725 .block_erase = spi_block_erase_d8,
4726 }, {
4727 .eraseblocks = { {8 * 1024 * 1024, 1} },
4728 .block_erase = spi_block_erase_c7,
4729 }
4730 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004731 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004732 .unlock = spi_disable_blockprotect,
Sean Nelson54596372010-01-09 05:30:14 +00004733 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004734 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004735 .voltage = {2700, 3600},
Sean Nelson54596372010-01-09 05:30:14 +00004736 },
4737
4738 {
4739 .vendor = "Eon",
4740 .name = "EN25B64T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004741 .bustype = BUS_SPI,
Sean Nelson54596372010-01-09 05:30:14 +00004742 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004743 .model_id = EON_EN25B64,
Sean Nelson54596372010-01-09 05:30:14 +00004744 .total_size = 8192,
4745 .page_size = 256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004746 /* OTP: 512B total; enter 0x3A */
4747 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Sean Nelson54596372010-01-09 05:30:14 +00004748 .tested = TEST_UNTESTED,
4749 .probe = probe_spi_rdid,
4750 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004751 .block_erasers =
4752 {
4753 {
4754 .eraseblocks = {
4755 {64 * 1024, 127},
4756 {32 * 1024, 1},
4757 {16 * 1024, 1},
4758 {8 * 1024, 1},
4759 {4 * 1024, 2},
4760 },
4761 .block_erase = spi_block_erase_d8,
4762 }, {
4763 .eraseblocks = { {8 * 1024 * 1024, 1} },
4764 .block_erase = spi_block_erase_c7,
4765 }
4766 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004767 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004768 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004769 .write = spi_chip_write_256,
Stefan Taunerb175af52015-01-24 15:06:27 +00004770 .read = spi_chip_read, /* Fast read (0x0B) supported */
4771 .voltage = {2700, 3600},
4772 },
4773
4774 {
4775 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004776 .name = "EN25B80",
Stefan Taunerb175af52015-01-24 15:06:27 +00004777 .bustype = BUS_SPI,
4778 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004779 .model_id = EON_EN25B80,
4780 .total_size = 1024,
Stefan Taunerb175af52015-01-24 15:06:27 +00004781 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10004782 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerb175af52015-01-24 15:06:27 +00004783 .tested = TEST_UNTESTED,
4784 .probe = probe_spi_rdid,
4785 .probe_timing = TIMING_ZERO,
4786 .block_erasers =
4787 {
4788 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004789 .eraseblocks = {
4790 {4 * 1024, 2},
4791 {8 * 1024, 1},
4792 {16 * 1024, 1},
4793 {32 * 1024, 1},
4794 {64 * 1024, 15}
4795 },
Stefan Taunerb175af52015-01-24 15:06:27 +00004796 .block_erase = spi_block_erase_d8,
4797 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10004798 .eraseblocks = { {1024 * 1024, 1} },
4799 .block_erase = spi_block_erase_c7,
4800 }
4801 },
4802 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4803 .unlock = spi_disable_blockprotect,
4804 .write = spi_chip_write_256,
4805 .read = spi_chip_read, /* Fast read (0x0B) supported */
4806 .voltage = {2700, 3600},
4807 },
4808
4809 {
4810 .vendor = "Eon",
4811 .name = "EN25B80T",
4812 .bustype = BUS_SPI,
4813 .manufacture_id = EON_ID_NOPREFIX,
4814 .model_id = EON_EN25B80,
4815 .total_size = 1024,
4816 .page_size = 256,
4817 .feature_bits = FEATURE_WRSR_WREN,
4818 .tested = TEST_UNTESTED,
4819 .probe = probe_spi_rdid,
4820 .probe_timing = TIMING_ZERO,
4821 .block_erasers =
4822 {
4823 {
4824 .eraseblocks = {
4825 {64 * 1024, 15},
4826 {32 * 1024, 1},
4827 {16 * 1024, 1},
4828 {8 * 1024, 1},
4829 {4 * 1024, 2},
4830 },
4831 .block_erase = spi_block_erase_d8,
4832 }, {
4833 .eraseblocks = { {1024 * 1024, 1} },
Stefan Taunerb175af52015-01-24 15:06:27 +00004834 .block_erase = spi_block_erase_c7,
4835 }
4836 },
4837 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4838 .unlock = spi_disable_blockprotect,
4839 .write = spi_chip_write_256,
4840 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004841 .voltage = {2700, 3600},
Carl-Daniel Hailfinger80243c92009-06-05 20:53:07 +00004842 },
4843
4844 {
4845 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004846 .name = "EN25F05",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004847 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004848 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004849 .model_id = EON_EN25F05,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004850 .total_size = 64,
4851 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004852 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner0554ca52013-07-25 22:54:25 +00004853 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004854 .probe = probe_spi_rdid,
4855 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004856 .block_erasers =
4857 {
4858 {
4859 .eraseblocks = { {4 * 1024, 16} },
4860 .block_erase = spi_block_erase_20,
4861 }, {
4862 .eraseblocks = { {32 * 1024, 2} },
4863 .block_erase = spi_block_erase_d8,
4864 }, {
4865 .eraseblocks = { {32 * 1024, 2} },
4866 .block_erase = spi_block_erase_52,
4867 }, {
4868 .eraseblocks = { {64 * 1024, 1} },
4869 .block_erase = spi_block_erase_60,
4870 }, {
4871 .eraseblocks = { {64 * 1024, 1} },
4872 .block_erase = spi_block_erase_c7,
4873 }
4874 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004875 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004876 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004877 .write = spi_chip_write_256,
4878 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004879 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004880 },
4881
4882 {
4883 .vendor = "Eon",
4884 .name = "EN25F10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004885 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004886 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004887 .model_id = EON_EN25F10,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004888 .total_size = 128,
4889 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004890 .feature_bits = FEATURE_WRSR_WREN,
Simon Buhrowd173ed42021-09-29 09:28:07 +02004891 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004892 .probe = probe_spi_rdid,
4893 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004894 .block_erasers =
4895 {
4896 {
4897 .eraseblocks = { {4 * 1024, 32} },
4898 .block_erase = spi_block_erase_20,
4899 }, {
4900 .eraseblocks = { {32 * 1024, 4} },
4901 .block_erase = spi_block_erase_d8,
4902 }, {
4903 .eraseblocks = { {32 * 1024, 4} },
4904 .block_erase = spi_block_erase_52,
4905 }, {
4906 .eraseblocks = { {128 * 1024, 1} },
4907 .block_erase = spi_block_erase_60,
4908 }, {
4909 .eraseblocks = { {128 * 1024, 1} },
4910 .block_erase = spi_block_erase_c7,
4911 }
4912 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004913 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004914 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004915 .write = spi_chip_write_256,
4916 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004917 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004918 },
4919
4920 {
4921 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10004922 .name = "EN25F16",
4923 .bustype = BUS_SPI,
4924 .manufacture_id = EON_ID_NOPREFIX,
4925 .model_id = EON_EN25F16,
4926 .total_size = 2048,
4927 .page_size = 256,
4928 .feature_bits = FEATURE_WRSR_WREN,
4929 .tested = TEST_OK_PREW,
4930 .probe = probe_spi_rdid,
4931 .probe_timing = TIMING_ZERO,
4932 .block_erasers =
4933 {
4934 {
4935 .eraseblocks = { {4 * 1024, 512} },
4936 .block_erase = spi_block_erase_20,
4937 }, {
4938 .eraseblocks = { {64 * 1024, 32} },
4939 .block_erase = spi_block_erase_d8,
4940 }, {
4941 .eraseblocks = { {2 * 1024 * 1024, 1} },
4942 .block_erase = spi_block_erase_60,
4943 }, {
4944 .eraseblocks = { {2 * 1024 * 1024, 1} },
4945 .block_erase = spi_block_erase_c7,
4946 }
4947 },
4948 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
4949 .unlock = spi_disable_blockprotect,
4950 .write = spi_chip_write_256,
4951 .read = spi_chip_read,
4952 .voltage = {2700, 3600},
4953 },
4954
4955 {
4956 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004957 .name = "EN25F20",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004958 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004959 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004960 .model_id = EON_EN25F20,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004961 .total_size = 256,
4962 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00004963 .feature_bits = FEATURE_WRSR_WREN,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004964 .tested = TEST_UNTESTED,
4965 .probe = probe_spi_rdid,
4966 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00004967 .block_erasers =
4968 {
4969 {
4970 .eraseblocks = { {4 * 1024, 64} },
4971 .block_erase = spi_block_erase_20,
4972 }, {
4973 .eraseblocks = { {64 * 1024, 4} },
4974 .block_erase = spi_block_erase_d8,
4975 }, {
4976 .eraseblocks = { {64 * 1024, 4} },
4977 .block_erase = spi_block_erase_52,
4978 }, {
4979 .eraseblocks = { {256 * 1024, 1} },
4980 .block_erase = spi_block_erase_60,
4981 }, {
4982 .eraseblocks = { {256 * 1024, 1} },
4983 .block_erase = spi_block_erase_c7,
4984 }
4985 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00004986 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00004987 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004988 .write = spi_chip_write_256,
4989 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00004990 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004991 },
4992
4993 {
4994 .vendor = "Eon",
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004995 .name = "EN25F32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00004996 .bustype = BUS_SPI,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004997 .manufacture_id = EON_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00004998 .model_id = EON_EN25F32,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00004999 .total_size = 4096,
5000 .page_size = 256,
David Hendricksd6c5dfc2010-09-03 03:18:26 +00005001 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner5c316f92015-02-08 21:57:52 +00005002 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005003 .probe = probe_spi_rdid,
5004 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +00005005 .block_erasers =
5006 {
5007 {
5008 .eraseblocks = { {4 * 1024, 1024} },
5009 .block_erase = spi_block_erase_20,
5010 }, {
5011 .eraseblocks = { {64 * 1024, 64} },
5012 .block_erase = spi_block_erase_d8,
5013 }, {
5014 .eraseblocks = { {4 * 1024 * 1024, 1} },
5015 .block_erase = spi_block_erase_60,
5016 }, {
5017 .eraseblocks = { {4 * 1024 * 1024, 1} },
5018 .block_erase = spi_block_erase_c7,
5019 }
5020 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005021 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +00005022 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005023 .write = spi_chip_write_256,
5024 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00005025 .voltage = {2700, 3600},
Carl-Daniel Hailfingera0a6ae92009-06-15 12:10:57 +00005026 },
5027
5028 {
Russ Dill3cd5a122010-03-05 08:44:11 +00005029 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005030 .name = "EN25F40",
5031 .bustype = BUS_SPI,
5032 .manufacture_id = EON_ID_NOPREFIX,
5033 .model_id = EON_EN25F40,
5034 .total_size = 512,
5035 .page_size = 256,
5036 .feature_bits = FEATURE_WRSR_WREN,
5037 .tested = TEST_OK_PREW,
5038 .probe = probe_spi_rdid,
5039 .probe_timing = TIMING_ZERO,
5040 .block_erasers =
5041 {
5042 {
5043 .eraseblocks = { {4 * 1024, 128} },
5044 .block_erase = spi_block_erase_20,
5045 }, {
5046 .eraseblocks = { {64 * 1024, 8} },
5047 .block_erase = spi_block_erase_d8,
5048 }, {
5049 .eraseblocks = { {512 * 1024, 1} },
5050 .block_erase = spi_block_erase_60,
5051 }, {
5052 .eraseblocks = { {512 * 1024, 1} },
5053 .block_erase = spi_block_erase_c7,
5054 },
5055 },
5056 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5057 .unlock = spi_disable_blockprotect,
5058 .write = spi_chip_write_256,
5059 .read = spi_chip_read,
5060 .voltage = {2700, 3600},
5061 },
5062
5063 {
5064 .vendor = "Eon",
Stefan Taunerd932fd02012-09-06 17:37:16 +00005065 .name = "EN25F64",
5066 .bustype = BUS_SPI,
5067 .manufacture_id = EON_ID_NOPREFIX,
Stefan Taunerd7d423b2012-10-20 09:13:16 +00005068 .model_id = EON_EN25F64,
Stefan Taunerd932fd02012-09-06 17:37:16 +00005069 .total_size = 8192,
5070 .page_size = 256,
5071 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunere34e3e82013-01-01 00:06:51 +00005072 .tested = TEST_OK_PREW,
Stefan Taunerd932fd02012-09-06 17:37:16 +00005073 .probe = probe_spi_rdid,
5074 .probe_timing = TIMING_ZERO,
5075 .block_erasers =
5076 {
5077 {
5078 .eraseblocks = { {4 * 1024, 2048} },
5079 .block_erase = spi_block_erase_20,
5080 }, {
5081 .eraseblocks = { {64 * 1024, 128} },
5082 .block_erase = spi_block_erase_d8,
5083 }, {
5084 .eraseblocks = { {8 * 1024 * 1024, 1} },
5085 .block_erase = spi_block_erase_60,
5086 }, {
5087 .eraseblocks = { {8 * 1024 * 1024, 1} },
5088 .block_erase = spi_block_erase_c7,
5089 }
5090 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005091 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Stefan Taunerd932fd02012-09-06 17:37:16 +00005092 .unlock = spi_disable_blockprotect,
5093 .write = spi_chip_write_256,
5094 .read = spi_chip_read,
5095 .voltage = {2700, 3600},
5096 },
5097
5098 {
5099 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005100 .name = "EN25F80",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005101 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005102 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005103 .model_id = EON_EN25F80,
David Hendricks6d715302011-07-24 22:21:57 +00005104 .total_size = 1024,
5105 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005106 .feature_bits = FEATURE_WRSR_WREN,
5107 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005108 .probe = probe_spi_rdid,
5109 .probe_timing = TIMING_ZERO,
5110 .block_erasers =
5111 {
5112 {
5113 .eraseblocks = { {4 * 1024, 256} },
5114 .block_erase = spi_block_erase_20,
5115 }, {
5116 .eraseblocks = { {64 * 1024, 16} },
5117 .block_erase = spi_block_erase_d8,
5118 }, {
5119 .eraseblocks = { {1024 * 1024, 1} },
5120 .block_erase = spi_block_erase_60,
5121 }, {
5122 .eraseblocks = { {1024 * 1024, 1} },
5123 .block_erase = spi_block_erase_c7,
5124 }
5125 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005126 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005127 .unlock = spi_disable_blockprotect,
5128 .write = spi_chip_write_256,
5129 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005130 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005131 },
5132
5133 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005134 .vendor = "Eon",
5135 .name = "EN25P05",
5136 .bustype = BUS_SPI,
5137 .manufacture_id = EON_ID_NOPREFIX,
5138 .model_id = EON_EN25B05,
5139 .total_size = 64,
5140 .page_size = 256,
5141 .feature_bits = FEATURE_WRSR_WREN,
5142 .tested = TEST_UNTESTED,
5143 .probe = probe_spi_rdid,
5144 .probe_timing = TIMING_ZERO,
5145 .block_erasers =
5146 {
5147 {
5148 .eraseblocks = {
5149 {32 * 1024, 2} },
5150 .block_erase = spi_block_erase_d8,
5151 }, {
5152 .eraseblocks = { {64 * 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 = "EN25P10",
5166 .bustype = BUS_SPI,
5167 .manufacture_id = EON_ID_NOPREFIX,
5168 .model_id = EON_EN25B10,
5169 .total_size = 128,
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 = { {32 * 1024, 4} },
5179 .block_erase = spi_block_erase_d8,
5180 }, {
5181 .eraseblocks = { {128 * 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 = "EN25P16",
5195 .bustype = BUS_SPI,
5196 .manufacture_id = EON_ID_NOPREFIX,
5197 .model_id = EON_EN25B16,
5198 .total_size = 2048,
5199 .page_size = 256,
5200 .feature_bits = FEATURE_WRSR_WREN,
5201 .tested = TEST_UNTESTED,
5202 .probe = probe_spi_rdid,
5203 .probe_timing = TIMING_ZERO,
5204 .block_erasers =
5205 {
5206 {
5207 .eraseblocks = { {64 * 1024, 32} },
5208 .block_erase = spi_block_erase_d8,
5209 }, {
5210 .eraseblocks = { {2 * 1024 * 1024, 1} },
5211 .block_erase = spi_block_erase_c7,
5212 }
5213 },
5214 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5215 .unlock = spi_disable_blockprotect,
5216 .write = spi_chip_write_256,
5217 .read = spi_chip_read, /* Fast read (0x0B) supported */
5218 .voltage = {2700, 3600},
5219 },
5220
5221 {
5222 .vendor = "Eon",
5223 .name = "EN25P20",
5224 .bustype = BUS_SPI,
5225 .manufacture_id = EON_ID_NOPREFIX,
5226 .model_id = EON_EN25B20,
5227 .total_size = 256,
5228 .page_size = 256,
5229 .feature_bits = FEATURE_WRSR_WREN,
5230 .tested = TEST_UNTESTED,
5231 .probe = probe_spi_rdid,
5232 .probe_timing = TIMING_ZERO,
5233 .block_erasers =
5234 {
5235 {
5236 .eraseblocks = { {64 * 1024, 4} },
5237 .block_erase = spi_block_erase_d8,
5238 }, {
5239 .eraseblocks = { {256 * 1024, 1} },
5240 .block_erase = spi_block_erase_c7,
5241 }
5242 },
5243 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5244 .unlock = spi_disable_blockprotect,
5245 .write = spi_chip_write_256,
5246 .read = spi_chip_read, /* Fast read (0x0B) supported */
5247 .voltage = {2700, 3600},
5248 },
5249
5250 {
5251 .vendor = "Eon",
5252 .name = "EN25P32", /* Uniform version of EN25B32 */
5253 .bustype = BUS_SPI,
5254 .manufacture_id = EON_ID_NOPREFIX,
5255 .model_id = EON_EN25B32,
5256 .total_size = 4096,
5257 .page_size = 256,
5258 /* OTP: 512B total; enter 0x3A */
5259 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5260 .tested = TEST_UNTESTED,
5261 .probe = probe_spi_rdid,
5262 .probe_timing = TIMING_ZERO,
5263 .block_erasers =
5264 {
5265 {
5266 .eraseblocks = { {64 * 1024, 64} },
5267 .block_erase = spi_block_erase_d8,
5268 }, {
5269 .eraseblocks = { {4 * 1024 * 1024, 1} },
5270 .block_erase = spi_block_erase_c7,
5271 }
5272 },
5273 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5274 .unlock = spi_disable_blockprotect,
5275 .write = spi_chip_write_256,
5276 .read = spi_chip_read, /* Fast read (0x0B) supported */
5277 .voltage = {2700, 3600},
5278 },
5279
5280 {
5281 .vendor = "Eon",
5282 .name = "EN25P40",
5283 .bustype = BUS_SPI,
5284 .manufacture_id = EON_ID_NOPREFIX,
5285 .model_id = EON_EN25B40,
5286 .total_size = 512,
5287 .page_size = 256,
5288 .feature_bits = FEATURE_WRSR_WREN,
5289 .tested = TEST_UNTESTED,
5290 .probe = probe_spi_rdid,
5291 .probe_timing = TIMING_ZERO,
5292 .block_erasers =
5293 {
5294 {
5295 .eraseblocks = { {64 * 1024, 8} },
5296 .block_erase = spi_block_erase_d8,
5297 }, {
5298 .eraseblocks = { {512 * 1024, 1} },
5299 .block_erase = spi_block_erase_c7,
5300 }
5301 },
5302 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5303 .unlock = spi_disable_blockprotect,
5304 .write = spi_chip_write_256,
5305 .read = spi_chip_read, /* Fast read (0x0B) supported */
5306 .voltage = {2700, 3600},
5307 },
5308
5309 {
5310 .vendor = "Eon",
5311 .name = "EN25P64",
5312 .bustype = BUS_SPI,
5313 .manufacture_id = EON_ID_NOPREFIX,
5314 .model_id = EON_EN25B64,
5315 .total_size = 8192,
5316 .page_size = 256,
5317 /* OTP: 512B total; enter 0x3A */
5318 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5319 .tested = TEST_UNTESTED,
5320 .probe = probe_spi_rdid,
5321 .probe_timing = TIMING_ZERO,
5322 .block_erasers =
5323 {
5324 {
5325 .eraseblocks = { {64 * 1024, 128} },
5326 .block_erase = spi_block_erase_d8,
5327 }, {
5328 .eraseblocks = { {8 * 1024 * 1024, 1} },
5329 .block_erase = spi_block_erase_c7,
5330 }
5331 },
5332 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5333 .unlock = spi_disable_blockprotect,
5334 .write = spi_chip_write_256,
5335 .read = spi_chip_read, /* Fast read (0x0B) supported */
5336 .voltage = {2700, 3600},
5337 },
5338
5339 {
5340 .vendor = "Eon",
5341 .name = "EN25P80",
5342 .bustype = BUS_SPI,
5343 .manufacture_id = EON_ID_NOPREFIX,
5344 .model_id = EON_EN25B80,
5345 .total_size = 1024,
5346 .page_size = 256,
5347 .feature_bits = FEATURE_WRSR_WREN,
5348 .tested = TEST_UNTESTED,
5349 .probe = probe_spi_rdid,
5350 .probe_timing = TIMING_ZERO,
5351 .block_erasers =
5352 {
5353 {
5354 .eraseblocks = { {64 * 1024, 16} },
5355 .block_erase = spi_block_erase_d8,
5356 }, {
5357 .eraseblocks = { {1024 * 1024, 1} },
5358 .block_erase = spi_block_erase_c7,
5359 }
5360 },
5361 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5362 .unlock = spi_disable_blockprotect,
5363 .write = spi_chip_write_256,
5364 .read = spi_chip_read, /* Fast read (0x0B) supported */
5365 .voltage = {2700, 3600},
5366 },
5367
5368 {
5369 .vendor = "Eon",
5370 .name = "EN25Q128",
5371 .bustype = BUS_SPI,
5372 .manufacture_id = EON_ID_NOPREFIX,
5373 .model_id = EON_EN25Q128,
5374 .total_size = 16384,
5375 .page_size = 256,
5376 /* OTP: 512B total; enter 0x3A */
5377 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5378 .tested = TEST_OK_PREW,
5379 .probe = probe_spi_rdid,
5380 .probe_timing = TIMING_ZERO,
5381 .block_erasers =
5382 {
5383 {
5384 .eraseblocks = { {4 * 1024, 4096} },
5385 .block_erase = spi_block_erase_20,
5386 }, {
5387 .eraseblocks = { {64 * 1024, 256} },
5388 .block_erase = spi_block_erase_d8,
5389 }, {
5390 .eraseblocks = { {16 * 1024 * 1024, 1} },
5391 .block_erase = spi_block_erase_60,
5392 }, {
5393 .eraseblocks = { {16 * 1024 * 1024, 1} },
5394 .block_erase = spi_block_erase_c7,
5395 }
5396 },
5397 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5398 .unlock = spi_disable_blockprotect,
5399 .write = spi_chip_write_256,
5400 .read = spi_chip_read,
5401 },
5402
5403 {
David Hendricks6d715302011-07-24 22:21:57 +00005404 /* Note: EN25D16 is an evil twin which shares the model ID
5405 but has different write protection capabilities */
5406 .vendor = "Eon",
5407 .name = "EN25Q16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005408 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005409 .manufacture_id = EON_ID_NOPREFIX,
5410 .model_id = EON_EN25Q16,
5411 .total_size = 2048,
5412 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005413 /* OTP: D16 512B/Q16 128B total; enter 0x3A */
5414 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks6d715302011-07-24 22:21:57 +00005415 .tested = TEST_UNTESTED,
5416 .probe = probe_spi_rdid,
5417 .probe_timing = TIMING_ZERO,
5418 .block_erasers =
5419 {
5420 {
5421 .eraseblocks = { {4 * 1024, 512} },
5422 .block_erase = spi_block_erase_20,
5423 }, {
5424 .eraseblocks = { {64 * 1024, 32} },
5425 .block_erase = spi_block_erase_d8,
5426 }, {
5427 /* not supported by Q16 version */
5428 .eraseblocks = { {64 * 1024, 32} },
5429 .block_erase = spi_block_erase_52,
5430 }, {
5431 .eraseblocks = { {2 * 1024 * 1024, 1} },
5432 .block_erase = spi_block_erase_60,
5433 }, {
5434 .eraseblocks = { {2 * 1024 * 1024, 1} },
5435 .block_erase = spi_block_erase_c7,
5436 }
5437 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005438 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005439 .unlock = spi_disable_blockprotect,
5440 .write = spi_chip_write_256,
5441 .read = spi_chip_read,
5442 .voltage = {2700, 3600},
5443 },
5444
5445 {
5446 .vendor = "Eon",
5447 .name = "EN25Q32(A/B)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005448 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005449 .manufacture_id = EON_ID_NOPREFIX,
5450 .model_id = EON_EN25Q32,
5451 .total_size = 4096,
5452 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005453 /* OTP: 512B total; enter 0x3A */
5454 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner352e50b2013-02-22 15:58:45 +00005455 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005456 .probe = probe_spi_rdid,
5457 .probe_timing = TIMING_ZERO,
5458 .block_erasers =
5459 {
5460 {
5461 .eraseblocks = { {4 * 1024, 1024} },
5462 .block_erase = spi_block_erase_20,
5463 }, {
5464 .eraseblocks = { {64 * 1024, 64} },
5465 .block_erase = spi_block_erase_d8,
5466 }, {
5467 .eraseblocks = { {4 * 1024 * 1024, 1} },
5468 .block_erase = spi_block_erase_60,
5469 }, {
5470 .eraseblocks = { {4 * 1024 * 1024, 1} },
5471 .block_erase = spi_block_erase_c7,
5472 }
5473 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005474 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005475 .unlock = spi_disable_blockprotect,
5476 .write = spi_chip_write_256,
5477 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005478 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005479 },
5480
5481 {
5482 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005483 .name = "EN25Q40",
5484 .bustype = BUS_SPI,
5485 .manufacture_id = EON_ID_NOPREFIX,
5486 .model_id = EON_EN25Q40,
5487 .total_size = 512,
5488 .page_size = 256,
5489 /* OTP: 256B total; enter 0x3A */
5490 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5491 .tested = TEST_UNTESTED,
5492 .probe = probe_spi_rdid,
5493 .probe_timing = TIMING_ZERO,
5494 .block_erasers =
5495 {
5496 {
5497 .eraseblocks = { {4 * 1024, 128} },
5498 .block_erase = spi_block_erase_20,
5499 }, {
5500 .eraseblocks = { {64 * 1024, 8} },
5501 .block_erase = spi_block_erase_d8,
5502 }, {
5503 .eraseblocks = { {512 * 1024, 1} },
5504 .block_erase = spi_block_erase_60,
5505 }, {
5506 .eraseblocks = { {512 * 1024, 1} },
5507 .block_erase = spi_block_erase_c7,
5508 }
5509 },
5510 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5511 .unlock = spi_disable_blockprotect,
5512 .write = spi_chip_write_256,
5513 .read = spi_chip_read,
5514 .voltage = {2700, 3600},
5515 },
5516
5517 {
5518 .vendor = "Eon",
David Hendricks6d715302011-07-24 22:21:57 +00005519 .name = "EN25Q64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005520 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005521 .manufacture_id = EON_ID_NOPREFIX,
5522 .model_id = EON_EN25Q64,
5523 .total_size = 8192,
5524 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005525 /* OTP: 512B total; enter 0x3A */
5526 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner352e50b2013-02-22 15:58:45 +00005527 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005528 .probe = probe_spi_rdid,
5529 .probe_timing = TIMING_ZERO,
5530 .block_erasers =
5531 {
5532 {
5533 .eraseblocks = { {4 * 1024, 2048} },
5534 .block_erase = spi_block_erase_20,
5535 }, {
5536 .eraseblocks = { {64 * 1024, 128} },
5537 .block_erase = spi_block_erase_d8,
5538 }, {
5539 .eraseblocks = { {8 * 1024 * 1024, 1} },
5540 .block_erase = spi_block_erase_60,
5541 }, {
5542 .eraseblocks = { {8 * 1024 * 1024, 1} },
5543 .block_erase = spi_block_erase_c7,
5544 }
5545 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00005546 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
David Hendricks6d715302011-07-24 22:21:57 +00005547 .unlock = spi_disable_blockprotect,
5548 .write = spi_chip_write_256,
5549 .read = spi_chip_read,
Stefan Taunereb582572012-09-21 12:52:50 +00005550 .voltage = {2700, 3600},
David Hendricks6d715302011-07-24 22:21:57 +00005551 },
5552
5553 {
5554 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005555 .name = "EN25Q80(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005556 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005557 .manufacture_id = EON_ID_NOPREFIX,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005558 .model_id = EON_EN25Q80,
5559 .total_size = 1024,
5560 .page_size = 256,
5561 /* OTP: 256B total; enter 0x3A */
5562 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5563 .tested = TEST_UNTESTED,
5564 .probe = probe_spi_rdid,
5565 .probe_timing = TIMING_ZERO,
5566 .block_erasers =
5567 {
5568 {
5569 .eraseblocks = { {4 * 1024, 256} },
5570 .block_erase = spi_block_erase_20,
5571 }, {
5572 .eraseblocks = { {64 * 1024, 16} },
5573 .block_erase = spi_block_erase_d8,
5574 }, {
5575 .eraseblocks = { {1024 * 1024, 1} },
5576 .block_erase = spi_block_erase_60,
5577 }, {
5578 .eraseblocks = { {1024 * 1024, 1} },
5579 .block_erase = spi_block_erase_c7,
5580 }
5581 },
5582 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
5583 .unlock = spi_disable_blockprotect,
5584 .write = spi_chip_write_256,
5585 .read = spi_chip_read,
5586 .voltage = {2700, 3600},
5587 },
5588
5589 {
5590 .vendor = "Eon",
5591 .name = "EN25QH128",
5592 .bustype = BUS_SPI,
5593 .manufacture_id = EON_ID_NOPREFIX,
5594 .model_id = EON_EN25QH128,
David Hendricks6d715302011-07-24 22:21:57 +00005595 .total_size = 16384,
5596 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005597 /* supports SFDP */
Daniel Lenski65922a32012-02-15 23:40:23 +00005598 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005599 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5600 .dummy_cycles =
5601 {
5602 .qpi_fast_read = 6,
5603 .qpi_fast_read_qio = 6,
5604 },
Tim Chenbfe149a2020-07-06 14:59:21 +08005605 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005606 .probe = probe_spi_rdid,
5607 .probe_timing = TIMING_ZERO,
5608 .block_erasers =
5609 {
5610 {
5611 .eraseblocks = { {4 * 1024, 4096} },
5612 .block_erase = spi_block_erase_20,
5613 }, {
5614 .eraseblocks = { {64 * 1024, 256} },
5615 .block_erase = spi_block_erase_d8,
5616 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005617 .eraseblocks = { { 16384 * 1024, 1} },
David Hendricks6d715302011-07-24 22:21:57 +00005618 .block_erase = spi_block_erase_60,
5619 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10005620 .eraseblocks = { { 16384 * 1024, 1} },
David Hendricks6d715302011-07-24 22:21:57 +00005621 .block_erase = spi_block_erase_c7,
5622 }
5623 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10005624 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5625 .unlock = spi_disable_blockprotect_bp3_srwd,
David Hendricks6d715302011-07-24 22:21:57 +00005626 .write = spi_chip_write_256,
5627 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10005628 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11005629 .reg_bits =
5630 {
5631 .srp = {STATUS1, 7, RW},
5632 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5633 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5634 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005635 .wp_write_cfg = spi_wp_write_cfg,
5636 .wp_read_cfg = spi_wp_read_cfg,
5637 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11005638 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02005639 .prepare_access = spi_prepare_io,
5640 .finish_access = spi_finish_io,
David Hendricks6d715302011-07-24 22:21:57 +00005641 },
5642
5643 {
5644 .vendor = "Eon",
5645 .name = "EN25QH16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00005646 .bustype = BUS_SPI,
David Hendricks6d715302011-07-24 22:21:57 +00005647 .manufacture_id = EON_ID_NOPREFIX,
5648 .model_id = EON_EN25QH16,
5649 .total_size = 2048,
5650 .page_size = 256,
Daniel Lenski65922a32012-02-15 23:40:23 +00005651 /* supports SFDP */
5652 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005653 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5654 .dummy_cycles =
5655 {
5656 .qpi_fast_read = 6,
5657 .qpi_fast_read_qio = 6,
5658 },
Stefan Tauner5c316f92015-02-08 21:57:52 +00005659 .tested = TEST_OK_PREW,
David Hendricks6d715302011-07-24 22:21:57 +00005660 .probe = probe_spi_rdid,
5661 .probe_timing = TIMING_ZERO,
5662 .block_erasers =
5663 {
5664 {
5665 .eraseblocks = { {4 * 1024, 512} },
5666 .block_erase = spi_block_erase_20,
5667 }, {
5668 .eraseblocks = { {64 * 1024, 32} },
5669 .block_erase = spi_block_erase_d8,
5670 }, {
5671 .eraseblocks = { {1024 * 2048, 1} },
5672 .block_erase = spi_block_erase_60,
5673 }, {
5674 .eraseblocks = { {1024 * 2048, 1} },
5675 .block_erase = spi_block_erase_c7,
5676 }
5677 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005678 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005679 .unlock = spi_disable_blockprotect_bp3_srwd,
David Hendricks6d715302011-07-24 22:21:57 +00005680 .write = spi_chip_write_256,
5681 .read = spi_chip_read,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005682 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005683 .prepare_access = spi_prepare_io,
5684 .finish_access = spi_finish_io,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005685 },
5686
5687 {
5688 .vendor = "Eon",
5689 .name = "EN25QH32",
5690 .bustype = BUS_SPI,
5691 .manufacture_id = EON_ID_NOPREFIX,
5692 .model_id = EON_EN25QH32,
5693 .total_size = 4096,
5694 .page_size = 256,
5695 /* supports SFDP */
5696 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005697 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5698 .dummy_cycles =
5699 {
5700 .qpi_fast_read = 6,
5701 .qpi_fast_read_qio = 6,
5702 },
Stefan Tauner23e10b82016-01-23 16:16:49 +00005703 .tested = TEST_OK_PREW,
Stefan Tauner2cef9162012-05-14 01:51:46 +00005704 .probe = probe_spi_rdid,
5705 .probe_timing = TIMING_ZERO,
5706 .block_erasers =
5707 {
5708 {
5709 .eraseblocks = { {4 * 1024, 1024} },
5710 .block_erase = spi_block_erase_20,
5711 }, {
5712 .eraseblocks = { {64 * 1024, 64} },
5713 .block_erase = spi_block_erase_d8,
5714 }, {
5715 .eraseblocks = { {1024 * 4096, 1} },
5716 .block_erase = spi_block_erase_60,
5717 }, {
5718 .eraseblocks = { {1024 * 4096, 1} },
5719 .block_erase = spi_block_erase_c7,
5720 }
5721 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005722 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005723 .unlock = spi_disable_blockprotect_bp3_srwd,
5724 .write = spi_chip_write_256,
5725 .read = spi_chip_read,
5726 .voltage = {2700, 3600},
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005727 .reg_bits =
5728 {
5729 .srp = {STATUS1, 7, RW},
5730 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5731 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5732 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005733 .wp_write_cfg = spi_wp_write_cfg,
5734 .wp_read_cfg = spi_wp_read_cfg,
5735 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005736 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02005737 .prepare_access = spi_prepare_io,
5738 .finish_access = spi_finish_io,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005739 },
5740
5741 {
5742 .vendor = "Eon",
5743 .name = "EN25QH32B",
5744 .bustype = BUS_SPI,
5745 .manufacture_id = EON_ID_NOPREFIX,
5746 .model_id = EON_EN25QH32,
5747 .total_size = 4096,
5748 .page_size = 256,
5749 /* supports SFDP */
5750 /* OTP: 1536B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005751 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_38,
5752 .dummy_cycles =
5753 {
5754 .qpi_fast_read = 6,
5755 .qpi_fast_read_qio = 6,
5756 },
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005757 .tested = TEST_OK_PREW,
5758 .probe = probe_spi_rdid,
5759 .probe_timing = TIMING_ZERO,
5760 .block_erasers =
5761 {
5762 {
5763 .eraseblocks = { {4 * 1024, 1024} },
5764 .block_erase = spi_block_erase_20,
5765 }, {
5766 .eraseblocks = { {32 * 1024, 128} },
5767 .block_erase = spi_block_erase_52,
5768 }, {
5769 .eraseblocks = { {64 * 1024, 64} },
5770 .block_erase = spi_block_erase_d8,
5771 }, {
5772 .eraseblocks = { {1024 * 4096, 1} },
5773 .block_erase = spi_block_erase_60,
5774 }, {
5775 .eraseblocks = { {1024 * 4096, 1} },
5776 .block_erase = spi_block_erase_c7,
5777 }
5778 },
5779 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5780 .unlock = spi_disable_blockprotect_bp3_srwd,
5781 .write = spi_chip_write_256,
5782 .read = spi_chip_read,
5783 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005784 .prepare_access = spi_prepare_io,
5785 .finish_access = spi_finish_io,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005786 },
5787
5788 {
5789 .vendor = "Eon",
5790 .name = "EN25QH64",
5791 .bustype = BUS_SPI,
5792 .manufacture_id = EON_ID_NOPREFIX,
5793 .model_id = EON_EN25QH64,
5794 .total_size = 8192,
5795 .page_size = 256,
5796 /* supports SFDP */
5797 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005798 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5799 .dummy_cycles =
5800 {
5801 .qpi_fast_read = 6,
5802 .qpi_fast_read_qio = 6,
5803 },
Stefan Tauner23e10b82016-01-23 16:16:49 +00005804 .tested = TEST_OK_PREW,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005805 .probe = probe_spi_rdid,
5806 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005807 .block_erasers =
5808 {
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005809 {
5810 .eraseblocks = { {4 * 1024, 2048} },
5811 .block_erase = spi_block_erase_20,
5812 }, {
5813 .eraseblocks = { {64 * 1024, 128} },
5814 .block_erase = spi_block_erase_d8,
5815 }, {
5816 .eraseblocks = { { 8192 * 1024, 1} },
5817 .block_erase = spi_block_erase_60,
5818 }, {
5819 .eraseblocks = { { 8192 * 1024, 1} },
5820 .block_erase = spi_block_erase_c7,
5821 }
5822 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005823 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005824 .unlock = spi_disable_blockprotect_bp3_srwd,
5825 .write = spi_chip_write_256,
5826 .read = spi_chip_read,
5827 .voltage = {2700, 3600},
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005828 .reg_bits =
5829 {
5830 .srp = {STATUS1, 7, RW},
5831 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
5832 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
5833 },
Nico Huberaabb3e02023-01-13 00:22:30 +01005834 .wp_write_cfg = spi_wp_write_cfg,
5835 .wp_read_cfg = spi_wp_read_cfg,
5836 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005837 .decode_range = decode_range_spi25_64k_block,
Nico Huber930d4212024-05-04 18:59:15 +02005838 .prepare_access = spi_prepare_io,
5839 .finish_access = spi_finish_io,
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005840 },
5841
5842 {
5843 .vendor = "Eon",
5844 .name = "EN25QH64A",
5845 .bustype = BUS_SPI,
5846 .manufacture_id = EON_ID_NOPREFIX,
5847 .model_id = EON_EN25QH64,
5848 .total_size = 8192,
5849 .page_size = 256,
5850 /* supports SFDP */
5851 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005852 /* Has a special, volatile status register 3 that is written with
5853 0xc0 like Set Read Parameters. Hence treating as QPI_SRP. */
5854 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP,
5855 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Sergii Dmytrukc6e8b1a2022-08-14 20:57:48 +03005856 .tested = TEST_OK_PREW,
5857 .probe = probe_spi_rdid,
5858 .probe_timing = TIMING_ZERO,
5859 .block_erasers =
5860 {
5861 {
5862 .eraseblocks = { {4 * 1024, 2048} },
5863 .block_erase = spi_block_erase_20,
5864 }, {
5865 .eraseblocks = { {32 * 1024, 256} },
5866 .block_erase = spi_block_erase_52,
5867 }, {
5868 .eraseblocks = { {64 * 1024, 128} },
5869 .block_erase = spi_block_erase_d8,
5870 }, {
5871 .eraseblocks = { { 8192 * 1024, 1} },
5872 .block_erase = spi_block_erase_60,
5873 }, {
5874 .eraseblocks = { { 8192 * 1024, 1} },
5875 .block_erase = spi_block_erase_c7,
5876 }
5877 },
5878 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
5879 .unlock = spi_disable_blockprotect_bp3_srwd,
5880 .write = spi_chip_write_256,
5881 .read = spi_chip_read,
5882 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02005883 .prepare_access = spi_prepare_io,
5884 .finish_access = spi_finish_io,
Nikolay Nikolaevc08542b2013-06-28 21:29:14 +00005885 },
5886
5887 {
5888 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005889 .name = "EN25S10",
5890 .bustype = BUS_SPI,
5891 .manufacture_id = EON_ID_NOPREFIX,
5892 .model_id = EON_EN25S10,
5893 .total_size = 128,
5894 .page_size = 256,
5895 /* OTP: 256B total; enter 0x3A */
5896 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5897 .tested = TEST_UNTESTED,
5898 .probe = probe_spi_rdid,
5899 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005900 .block_erasers =
5901 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005902 {
5903 .eraseblocks = { {4 * 1024, 32} },
5904 .block_erase = spi_block_erase_20,
5905 }, {
5906 .eraseblocks = { {32 * 1024, 4} },
5907 .block_erase = spi_block_erase_52,
5908 }, {
5909 .eraseblocks = { {128 * 1024, 1} },
5910 .block_erase = spi_block_erase_60,
5911 }, {
5912 .eraseblocks = { {128 * 1024, 1} },
5913 .block_erase = spi_block_erase_c7,
5914 }
5915 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00005916 .printlock = spi_prettyprint_status_register_bp2_srwd,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005917 .unlock = spi_disable_blockprotect,
5918 .write = spi_chip_write_256,
5919 .read = spi_chip_read,
5920 .voltage = {1650, 1950},
5921 },
5922
5923 {
5924 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005925 .name = "EN25S16",
5926 .bustype = BUS_SPI,
5927 .manufacture_id = EON_ID_NOPREFIX,
5928 .model_id = EON_EN25S16,
5929 .total_size = 2048,
5930 .page_size = 256,
5931 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01005932 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
5933 .dummy_cycles =
5934 {
5935 .qpi_fast_read = 6,
5936 .qpi_fast_read_qio = 6,
5937 },
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005938 .tested = TEST_UNTESTED,
5939 .probe = probe_spi_rdid,
5940 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10005941 .block_erasers =
5942 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005943 {
5944 .eraseblocks = { {4 * 1024, 512} },
5945 .block_erase = spi_block_erase_20,
5946 }, {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005947 .eraseblocks = { {32 * 1024, 64} },
5948 .block_erase = spi_block_erase_d8,
5949 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +05305950 .eraseblocks = { {64 * 1024, 32} },
5951 .block_erase = spi_block_erase_52,
5952 }, {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005953 .eraseblocks = { {2048 * 1024, 1} },
5954 .block_erase = spi_block_erase_60,
5955 }, {
5956 .eraseblocks = { {2048 * 1024, 1} },
5957 .block_erase = spi_block_erase_c7,
5958 }
5959 },
5960 .printlock = spi_prettyprint_status_register_en25s_wp,
5961 .unlock = spi_disable_blockprotect_bp3_srwd,
5962 .write = spi_chip_write_256,
5963 .read = spi_chip_read,
5964 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02005965 .prepare_access = spi_prepare_io,
5966 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00005967 },
5968
5969 {
5970 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10005971 .name = "EN25S20",
5972 .bustype = BUS_SPI,
5973 .manufacture_id = EON_ID_NOPREFIX,
5974 .model_id = EON_EN25S20,
5975 .total_size = 256,
5976 .page_size = 256,
5977 /* OTP: 256B total; enter 0x3A */
5978 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
5979 .tested = TEST_UNTESTED,
5980 .probe = probe_spi_rdid,
5981 .probe_timing = TIMING_ZERO,
5982 .block_erasers =
5983 {
5984 {
5985 .eraseblocks = { {4 * 1024, 64} },
5986 .block_erase = spi_block_erase_20,
5987 }, {
5988 .eraseblocks = { {64 * 1024, 4} },
5989 .block_erase = spi_block_erase_d8,
5990 }, {
5991 .eraseblocks = { {256 * 1024, 1} },
5992 .block_erase = spi_block_erase_60,
5993 }, {
5994 .eraseblocks = { {256 * 1024, 1} },
5995 .block_erase = spi_block_erase_c7,
5996 }
5997 },
5998 .printlock = spi_prettyprint_status_register_bp2_srwd,
5999 .unlock = spi_disable_blockprotect,
6000 .write = spi_chip_write_256,
6001 .read = spi_chip_read,
6002 .voltage = {1650, 1950},
6003 },
6004
6005 {
6006 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006007 .name = "EN25S32",
6008 .bustype = BUS_SPI,
6009 .manufacture_id = EON_ID_NOPREFIX,
6010 .model_id = EON_EN25S32,
6011 .total_size = 4096,
6012 .page_size = 256,
6013 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01006014 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
6015 .dummy_cycles =
6016 {
6017 .qpi_fast_read = 6,
6018 .qpi_fast_read_qio = 6,
6019 },
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006020 .tested = TEST_UNTESTED,
6021 .probe = probe_spi_rdid,
6022 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10006023 .block_erasers =
6024 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006025 {
6026 .eraseblocks = { {4 * 1024, 1024} },
6027 .block_erase = spi_block_erase_20,
6028 }, {
6029 .eraseblocks = { {32 * 1024, 128} },
6030 .block_erase = spi_block_erase_52,
6031 }, {
6032 .eraseblocks = { {64 * 1024, 64} },
6033 .block_erase = spi_block_erase_d8,
6034 }, {
6035 .eraseblocks = { {4096 * 1024, 1} },
6036 .block_erase = spi_block_erase_60,
6037 }, {
6038 .eraseblocks = { {4096 * 1024, 1} },
6039 .block_erase = spi_block_erase_c7,
6040 }
6041 },
6042 .printlock = spi_prettyprint_status_register_en25s_wp,
6043 .unlock = spi_disable_blockprotect_bp3_srwd,
6044 .write = spi_chip_write_256,
6045 .read = spi_chip_read,
6046 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006047 .prepare_access = spi_prepare_io,
6048 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006049 },
6050
6051 {
6052 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006053 .name = "EN25S40",
6054 .bustype = BUS_SPI,
6055 .manufacture_id = EON_ID_NOPREFIX,
6056 .model_id = EON_EN25S40,
6057 .total_size = 512,
6058 .page_size = 256,
6059 /* OTP: 256B total; enter 0x3A */
6060 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6061 .tested = TEST_OK_PREW,
6062 .probe = probe_spi_rdid,
6063 .probe_timing = TIMING_ZERO,
6064 .block_erasers =
6065 {
6066 {
6067 .eraseblocks = { {4 * 1024, 128} },
6068 .block_erase = spi_block_erase_20,
6069 }, {
6070 .eraseblocks = { {64 * 1024, 8} },
6071 .block_erase = spi_block_erase_d8,
6072 }, {
6073 .eraseblocks = { {512 * 1024, 1} },
6074 .block_erase = spi_block_erase_60,
6075 }, {
6076 .eraseblocks = { {512 * 1024, 1} },
6077 .block_erase = spi_block_erase_c7,
6078 }
6079 },
6080 .printlock = spi_prettyprint_status_register_bp2_srwd,
6081 .unlock = spi_disable_blockprotect,
6082 .write = spi_chip_write_256,
6083 .read = spi_chip_read,
6084 .voltage = {1650, 1950},
6085 },
6086
6087 {
6088 .vendor = "Eon",
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006089 .name = "EN25S64",
6090 .bustype = BUS_SPI,
6091 .manufacture_id = EON_ID_NOPREFIX,
6092 .model_id = EON_EN25S64,
6093 .total_size = 8192,
6094 .page_size = 256,
6095 /* OTP: 512B total; enter 0x3A */
Nico Huber1412d9f2024-01-06 18:25:49 +01006096 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | (FEATURE_QPI_38 & ~FEATURE_FAST_READ_QOUT),
6097 .dummy_cycles =
6098 {
6099 .qpi_fast_read = 6,
6100 .qpi_fast_read_qio = 6,
6101 },
Nikolai Artemievdf889fa2021-03-23 17:10:45 +11006102 .tested = TEST_OK_PREW,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006103 .probe = probe_spi_rdid,
6104 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10006105 .block_erasers =
6106 {
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006107 {
6108 .eraseblocks = { {4 * 1024, 2048} },
6109 .block_erase = spi_block_erase_20,
6110 }, {
6111 .eraseblocks = { {64 * 1024, 128} },
6112 .block_erase = spi_block_erase_d8,
6113 }, {
6114 .eraseblocks = { {8192 * 1024, 1} },
6115 .block_erase = spi_block_erase_60,
6116 }, {
6117 .eraseblocks = { {8192 * 1024, 1} },
6118 .block_erase = spi_block_erase_c7,
6119 }
6120 },
6121 .printlock = spi_prettyprint_status_register_en25s_wp,
6122 .unlock = spi_disable_blockprotect_bp3_srwd,
6123 .write = spi_chip_write_256,
6124 .read = spi_chip_read,
6125 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +02006126 .prepare_access = spi_prepare_io,
6127 .finish_access = spi_finish_io,
Nikolay Nikolaevd0e3ea12013-06-28 21:29:08 +00006128 },
6129
6130 {
6131 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006132 .name = "EN25S80",
6133 .bustype = BUS_SPI,
6134 .manufacture_id = EON_ID_NOPREFIX,
6135 .model_id = EON_EN25S80,
6136 .total_size = 1024,
6137 .page_size = 256,
6138 /* OTP: 256B total; enter 0x3A */
6139 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6140 .tested = TEST_UNTESTED,
6141 .probe = probe_spi_rdid,
6142 .probe_timing = TIMING_ZERO,
Russ Dill3cd5a122010-03-05 08:44:11 +00006143 .block_erasers =
6144 {
6145 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006146 .eraseblocks = { {4 * 1024, 256} },
6147 .block_erase = spi_block_erase_20,
6148 }, {
6149 .eraseblocks = { {64 * 1024, 16} },
6150 .block_erase = spi_block_erase_d8,
6151 }, {
6152 .eraseblocks = { {1024 * 1024, 1} },
6153 .block_erase = spi_block_erase_60,
6154 }, {
6155 .eraseblocks = { {1024 * 1024, 1} },
6156 .block_erase = spi_block_erase_c7,
6157 }
Russ Dill3cd5a122010-03-05 08:44:11 +00006158 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006159 .printlock = spi_prettyprint_status_register_bp2_srwd,
6160 .unlock = spi_disable_blockprotect,
6161 .write = spi_chip_write_256,
6162 .read = spi_chip_read,
6163 .voltage = {1650, 1950},
Russ Dill3cd5a122010-03-05 08:44:11 +00006164 },
6165
6166 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00006167 .vendor = "Eon",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006168 .name = "EN29F002(A)(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006169 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006170 .manufacture_id = EON_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006171 .model_id = EON_EN29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006172 .total_size = 256,
6173 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00006174 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Alan Green4362e622019-08-26 15:02:12 +10006175 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006176 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00006177 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006178 .block_erasers =
6179 {
6180 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006181 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006182 {16 * 1024, 1},
Michael Karchere3cb0a12010-03-13 23:47:09 +00006183 {8 * 1024, 2},
6184 {32 * 1024, 1},
6185 {64 * 1024, 3},
Sean Nelson6b11ad22009-12-23 17:05:59 +00006186 },
6187 .block_erase = erase_sector_jedec,
6188 }, {
6189 .eraseblocks = { {256 * 1024, 1} },
6190 .block_erase = erase_chip_block_jedec,
6191 },
6192 },
Michael Karcher1c296ca2009-11-27 17:49:42 +00006193 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006194 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006195 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006196 .prepare_access = prepare_memory_access,
6197 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006198 },
6199
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006200 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +00006201 .vendor = "Eon",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006202 .name = "EN29F002(A)(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00006203 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006204 .manufacture_id = EON_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00006205 .model_id = EON_EN29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006206 .total_size = 256,
6207 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +00006208 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +00006209 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006210 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00006211 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00006212 .block_erasers =
6213 {
6214 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006215 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00006216 {64 * 1024, 3},
Michael Karchere3cb0a12010-03-13 23:47:09 +00006217 {32 * 1024, 1},
6218 {8 * 1024, 2},
6219 {16 * 1024, 1},
Sean Nelson6b11ad22009-12-23 17:05:59 +00006220 },
6221 .block_erase = erase_sector_jedec,
6222 }, {
6223 .eraseblocks = { {256 * 1024, 1} },
6224 .block_erase = erase_chip_block_jedec,
6225 },
6226 },
Michael Karcher1c296ca2009-11-27 17:49:42 +00006227 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00006228 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00006229 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006230 .prepare_access = prepare_memory_access,
6231 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00006232 },
6233
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00006234 {
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006235 .vendor = "Eon",
Alan Green1f9cc7d2019-07-01 11:10:45 +10006236 .name = "EN29F010",
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006237 .bustype = BUS_PARALLEL,
6238 .manufacture_id = EON_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006239 .model_id = EON_EN29F010,
6240 .total_size = 128,
6241 .page_size = 128,
6242 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
6243 .tested = TEST_OK_PRE,
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006244 .probe = probe_jedec,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006245 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006246 .block_erasers =
6247 {
6248 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006249 .eraseblocks = { {16 * 1024, 8} },
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006250 .block_erase = erase_sector_jedec,
6251 },
6252 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006253 .eraseblocks = { {128 * 1024, 1} },
Denis 'GNUtoo' Cariklib5f9d5c2014-12-07 21:57:53 +00006254 .block_erase = erase_chip_block_jedec,
6255 },
6256 },
6257 .write = write_jedec_1,
6258 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006259 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01006260 .prepare_access = prepare_memory_access,
6261 .finish_access = finish_memory_access,
Rudolf Marek47eff6b2012-04-14 22:51:40 +00006262 },
6263
6264 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006265 .vendor = "Eon",
6266 .name = "EN29GL064(A)B",
6267 .bustype = BUS_PARALLEL,
6268 .manufacture_id = EON_ID,
6269 .model_id = EON_EN29GL064B,
6270 .total_size = 8192,
6271 .page_size = 128 * 1024, /* actual page size is 16 */
6272 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6273 .tested = TEST_UNTESTED,
6274 .probe = probe_jedec_29gl,
6275 .probe_timing = TIMING_ZERO,
6276 .block_erasers =
6277 {
6278 {
6279 .eraseblocks = {
6280 {8 * 1024, 8},
6281 {64 * 1024, 127},
6282 },
6283 .block_erase = erase_sector_jedec,
6284 }, {
6285 .eraseblocks = { {8 * 1024 * 1024, 1} },
6286 .block_erase = erase_chip_block_jedec,
6287 },
6288 },
6289 .write = write_jedec_1,
6290 .read = read_memmapped,
6291 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006292 .prepare_access = prepare_memory_access,
6293 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006294 },
6295
6296 {
6297 .vendor = "Eon",
6298 .name = "EN29GL064(A)T",
6299 .bustype = BUS_PARALLEL,
6300 .manufacture_id = EON_ID,
6301 .model_id = EON_EN29GL064T,
6302 .total_size = 8192,
6303 .page_size = 128 * 1024, /* actual page size is 16 */
6304 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6305 .tested = TEST_UNTESTED,
6306 .probe = probe_jedec_29gl,
6307 .probe_timing = TIMING_ZERO,
6308 .block_erasers =
6309 {
6310 {
6311 .eraseblocks = {
6312 {64 * 1024, 127},
6313 {8 * 1024, 8},
6314 },
6315 .block_erase = erase_sector_jedec,
6316 }, {
6317 .eraseblocks = { {8 * 1024 * 1024, 1} },
6318 .block_erase = erase_chip_block_jedec,
6319 },
6320 },
6321 .write = write_jedec_1,
6322 .read = read_memmapped,
6323 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006324 .prepare_access = prepare_memory_access,
6325 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006326 },
6327
6328 {
6329 .vendor = "Eon",
6330 .name = "EN29GL064H/L",
6331 .bustype = BUS_PARALLEL,
6332 .manufacture_id = EON_ID,
6333 .model_id = EON_EN29GL064HL,
6334 .total_size = 8192,
6335 .page_size = 128 * 1024, /* actual page size is 16 */
6336 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6337 .tested = TEST_UNTESTED,
6338 .probe = probe_jedec_29gl,
6339 .probe_timing = TIMING_ZERO,
6340 .block_erasers =
6341 {
6342 {
6343 .eraseblocks = { {64 * 1024, 128} },
6344 .block_erase = erase_sector_jedec,
6345 }, {
6346 .eraseblocks = { {8 * 1024 * 1024, 1} },
6347 .block_erase = erase_chip_block_jedec,
6348 },
6349 },
6350 .write = write_jedec_1,
6351 .read = read_memmapped,
6352 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006353 .prepare_access = prepare_memory_access,
6354 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006355 },
6356
6357 {
6358 .vendor = "Eon",
6359 .name = "EN29GL128",
6360 .bustype = BUS_PARALLEL,
6361 .manufacture_id = EON_ID,
6362 .model_id = EON_EN29GL128HL,
6363 .total_size = 16384,
6364 .page_size = 128 * 1024, /* actual page size is 16 */
6365 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
6366 .tested = TEST_UNTESTED,
6367 .probe = probe_jedec_29gl,
6368 .probe_timing = TIMING_ZERO,
6369 .block_erasers =
6370 {
6371 {
6372 .eraseblocks = { {128 * 1024, 128} },
6373 .block_erase = erase_sector_jedec,
6374 }, {
6375 .eraseblocks = { {16 * 1024 * 1024, 1} },
6376 .block_erase = erase_chip_block_jedec,
6377 },
6378 },
6379 .write = write_jedec_1,
6380 .read = read_memmapped,
6381 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006382 .prepare_access = prepare_memory_access,
6383 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +00006384 },
6385
6386 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006387 .vendor = "Eon",
6388 .name = "EN29LV040(A)",
6389 .bustype = BUS_PARALLEL,
6390 .manufacture_id = EON_ID,
6391 .model_id = EON_EN29LV040,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006392 .total_size = 512,
Alan Green1f9cc7d2019-07-01 11:10:45 +10006393 .page_size = 4 * 1024,
6394 .tested = TEST_OK_PREW,
6395 .probe = probe_jedec,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006396 .probe_timing = TIMING_ZERO,
6397 .block_erasers =
6398 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006399 {
6400 .eraseblocks = { {64 * 1024, 8} },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006401 .block_erase = erase_sector_jedec,
6402 },
6403 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006404 .eraseblocks = { {512 * 1024, 1} },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006405 .block_erase = erase_chip_block_jedec,
6406 },
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006407 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006408 .write = write_jedec_1,
6409 .read = read_memmapped,
6410 .voltage = {3000, 3600}, /* 3.0-3.6V for type -45R and 55R, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01006411 .prepare_access = prepare_memory_access,
6412 .finish_access = finish_memory_access,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006413 },
6414
6415 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006416 .vendor = "Eon",
6417 .name = "EN29LV640B",
6418 .bustype = BUS_PARALLEL,
6419 .manufacture_id = EON_ID,
6420 .model_id = EON_EN29LV640B,
6421 .total_size = 8192,
6422 .page_size = 8192,
6423 .feature_bits = FEATURE_ADDR_SHIFTED,
6424 .tested = TEST_OK_PREW,
6425 .probe = probe_en29lv640b,
6426 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006427 .block_erasers =
6428 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00006429 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006430 .eraseblocks = {
6431 {8 * 1024, 8},
6432 {64 * 1024, 127},
6433 },
6434 .block_erase = erase_block_jedec,
Stefan Tauner0be072c2016-03-13 15:16:30 +00006435 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10006436 .eraseblocks = { {8 * 1024 * 1024, 1} },
6437 .block_erase = erase_chip_block_jedec,
6438 },
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006439 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10006440 .write = write_en29lv640b,
6441 .read = read_memmapped,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006442 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +01006443 .prepare_access = prepare_memory_access,
6444 .finish_access = finish_memory_access,
Hatim Kanchwalab3d7fba2016-02-01 00:27:25 +00006445 },
6446
6447 {
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006448 .vendor = "Fudan",
6449 .name = "FM25F005",
6450 .bustype = BUS_SPI,
6451 .manufacture_id = FUDAN_ID_NOPREFIX,
6452 .model_id = FUDAN_FM25F005,
6453 .total_size = 64,
6454 .page_size = 256,
6455 /* OTP: 256B total; enter 0x3A */
6456 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6457 .tested = TEST_UNTESTED,
6458 .probe = probe_spi_rdid,
6459 .probe_timing = TIMING_ZERO,
6460 .block_erasers = {
6461 {
6462 .eraseblocks = { {4 * 1024, 16} },
6463 .block_erase = spi_block_erase_20,
6464 }, {
6465 .eraseblocks = { {32 * 1024, 2} },
6466 .block_erase = spi_block_erase_52,
6467 }, {
6468 .eraseblocks = { {64 * 1024, 1} },
6469 .block_erase = spi_block_erase_d8,
6470 }, {
6471 .eraseblocks = { {64 * 1024, 1} },
6472 .block_erase = spi_block_erase_60,
6473 }, {
6474 .eraseblocks = { {64 * 1024, 1} },
6475 .block_erase = spi_block_erase_c7,
6476 }
6477 },
6478 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6479 .unlock = spi_disable_blockprotect_bp2_srwd,
6480 .write = spi_chip_write_256,
6481 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6482 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6483 },
6484
6485 {
6486 .vendor = "Fudan",
6487 .name = "FM25F01",
6488 .bustype = BUS_SPI,
6489 .manufacture_id = FUDAN_ID_NOPREFIX,
6490 .model_id = FUDAN_FM25F01,
6491 .total_size = 128,
6492 .page_size = 256,
6493 /* OTP: 256B total; enter 0x3A */
6494 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6495 .tested = TEST_UNTESTED,
6496 .probe = probe_spi_rdid,
6497 .probe_timing = TIMING_ZERO,
6498 .block_erasers = {
6499 {
6500 .eraseblocks = { {4 * 1024, 32} },
6501 .block_erase = spi_block_erase_20,
6502 }, {
6503 .eraseblocks = { {32 * 1024, 4} },
6504 .block_erase = spi_block_erase_52,
6505 }, {
6506 .eraseblocks = { {64 * 1024, 2} },
6507 .block_erase = spi_block_erase_d8,
6508 }, {
6509 .eraseblocks = { {128 * 1024, 1} },
6510 .block_erase = spi_block_erase_60,
6511 }, {
6512 .eraseblocks = { {128 * 1024, 1} },
6513 .block_erase = spi_block_erase_c7,
6514 }
6515 },
6516 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6517 .unlock = spi_disable_blockprotect_bp2_srwd,
6518 .write = spi_chip_write_256,
6519 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6520 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6521 },
6522
6523 {
6524 .vendor = "Fudan",
6525 .name = "FM25F02(A)",
6526 .bustype = BUS_SPI,
6527 .manufacture_id = FUDAN_ID_NOPREFIX,
6528 .model_id = FUDAN_FM25F02,
6529 .total_size = 256,
6530 .page_size = 256,
6531 /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */
6532 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6533 .tested = TEST_UNTESTED,
6534 .probe = probe_spi_rdid,
6535 .probe_timing = TIMING_ZERO,
6536 .block_erasers = {
6537 {
6538 .eraseblocks = { {4 * 1024, 64} },
6539 .block_erase = spi_block_erase_20,
6540 }, {
6541 .eraseblocks = { {32 * 1024, 8} },
6542 .block_erase = spi_block_erase_52,
6543 }, {
6544 .eraseblocks = { {64 * 1024, 4} },
6545 .block_erase = spi_block_erase_d8,
6546 }, {
6547 .eraseblocks = { {1024 * 256, 1} },
6548 .block_erase = spi_block_erase_60,
6549 }, {
6550 .eraseblocks = { {1024 * 256, 1} },
6551 .block_erase = spi_block_erase_c7,
6552 },
6553 },
6554 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6555 .unlock = spi_disable_blockprotect_bp2_srwd,
6556 .write = spi_chip_write_256,
6557 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6558 .voltage = {2700, 3600}, /* 2.3-2.7V acceptable results in lower performance */
6559 },
6560
6561 {
6562 .vendor = "Fudan",
6563 .name = "FM25F04(A)",
6564 .bustype = BUS_SPI,
6565 .manufacture_id = FUDAN_ID_NOPREFIX,
6566 .model_id = FUDAN_FM25F04,
6567 .total_size = 512,
6568 .page_size = 256,
6569 /* OTP: 256B total; enter 0x3A, (A version only:) read ID 0x4B */
6570 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
6571 .tested = TEST_UNTESTED,
6572 .probe = probe_spi_rdid,
6573 .probe_timing = TIMING_ZERO,
6574 .block_erasers = {
6575 {
6576 .eraseblocks = { {4 * 1024, 128} },
6577 .block_erase = spi_block_erase_20,
6578 }, {
6579 .eraseblocks = { {32 * 1024, 16} },
6580 .block_erase = spi_block_erase_52,
6581 }, {
6582 .eraseblocks = { {64 * 1024, 8} },
6583 .block_erase = spi_block_erase_d8,
6584 }, {
6585 .eraseblocks = { {1024 * 512, 1} },
6586 .block_erase = spi_block_erase_60,
6587 }, {
6588 .eraseblocks = { {1024 * 512, 1} },
6589 .block_erase = spi_block_erase_c7,
6590 },
6591 },
6592 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6593 .unlock = spi_disable_blockprotect_bp2_srwd,
6594 .write = spi_chip_write_256,
6595 .read = spi_chip_read, /* Fast read (0x0B), dual I/O (0x3B) supported */
6596 .voltage = {2700, 3600},
6597 },
6598
6599 {
6600 .vendor = "Fudan",
Nico Huberc5915182024-10-21 23:40:10 +02006601 .name = "FM25Q02",
6602 .bustype = BUS_SPI,
6603 .manufacture_id = FUDAN_ID_NOPREFIX,
6604 .model_id = FUDAN_FM25Q02,
6605 .total_size = 256,
6606 .page_size = 256,
6607 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
6608 FEATURE_OTP | FEATURE_QPI_SRP,
6609 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6610 .tested = TEST_UNTESTED,
6611 .probe = probe_spi_rdid,
6612 .probe_timing = TIMING_ZERO,
6613 .block_erasers =
6614 {
6615 {
6616 .eraseblocks = { {4 * 1024, 64} },
6617 .block_erase = spi_block_erase_20,
6618 }, {
6619 .eraseblocks = { {32 * 1024, 8} },
6620 .block_erase = spi_block_erase_52,
6621 }, {
6622 .eraseblocks = { {64 * 1024, 4} },
6623 .block_erase = spi_block_erase_d8,
6624 }, {
6625 .eraseblocks = { {256 * 1024, 1} },
6626 .block_erase = spi_block_erase_60,
6627 }, {
6628 .eraseblocks = { {256 * 1024, 1} },
6629 .block_erase = spi_block_erase_c7,
6630 },
6631 },
6632 .reg_bits =
6633 {
6634 .qe = {STATUS2, 1, RW},
6635 .srp = {STATUS1, 7, RW},
6636 .srl = {STATUS2, 0, RW},
6637 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}},
6638 .tb = {STATUS1, 5, RW},
6639 .cmp = {STATUS2, 4, RW},
6640 .wps = {STATUS2, 5, RW},
6641 },
6642 .wp_write_cfg = spi_wp_write_cfg,
6643 .wp_read_cfg = spi_wp_read_cfg,
6644 .wp_get_ranges = spi_wp_get_available_ranges,
6645 .decode_range = decode_range_spi25,
6646 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6647 .unlock = spi_disable_blockprotect_bp2_srwd,
6648 .write = spi_chip_write_256,
6649 .read = spi_chip_read,
6650 .voltage = {2700, 3600},
6651 .prepare_access = spi_prepare_io,
6652 .finish_access = spi_finish_io,
6653 },
6654
6655 {
6656 .vendor = "Fudan",
6657 .name = "FM25Q04",
6658 .bustype = BUS_SPI,
6659 .manufacture_id = FUDAN_ID_NOPREFIX,
6660 .model_id = FUDAN_FM25Q04,
6661 .total_size = 512,
6662 .page_size = 256,
6663 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
6664 FEATURE_OTP | FEATURE_QPI_SRP,
6665 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6666 .tested = TEST_UNTESTED,
6667 .probe = probe_spi_rdid,
6668 .probe_timing = TIMING_ZERO,
6669 .block_erasers =
6670 {
6671 {
6672 .eraseblocks = { {4 * 1024, 128} },
6673 .block_erase = spi_block_erase_20,
6674 }, {
6675 .eraseblocks = { {32 * 1024, 16} },
6676 .block_erase = spi_block_erase_52,
6677 }, {
6678 .eraseblocks = { {64 * 1024, 8} },
6679 .block_erase = spi_block_erase_d8,
6680 }, {
6681 .eraseblocks = { {512 * 1024, 1} },
6682 .block_erase = spi_block_erase_60,
6683 }, {
6684 .eraseblocks = { {512 * 1024, 1} },
6685 .block_erase = spi_block_erase_c7,
6686 },
6687 },
6688 .reg_bits =
6689 {
6690 .qe = {STATUS2, 1, RW},
6691 .srp = {STATUS1, 7, RW},
6692 .srl = {STATUS2, 0, RW},
6693 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6694 .tb = {STATUS1, 5, RW},
6695 .cmp = {STATUS2, 4, RW},
6696 .wps = {STATUS2, 5, RW},
6697 },
6698 .wp_write_cfg = spi_wp_write_cfg,
6699 .wp_read_cfg = spi_wp_read_cfg,
6700 .wp_get_ranges = spi_wp_get_available_ranges,
6701 .decode_range = decode_range_spi25,
6702 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
6703 .unlock = spi_disable_blockprotect_bp2_srwd,
6704 .write = spi_chip_write_256,
6705 .read = spi_chip_read,
6706 .voltage = {2700, 3600},
6707 .prepare_access = spi_prepare_io,
6708 .finish_access = spi_finish_io,
6709 },
6710
6711 {
6712 .vendor = "Fudan",
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006713 .name = "FM25Q08",
6714 .bustype = BUS_SPI,
6715 .manufacture_id = FUDAN_ID_NOPREFIX,
6716 .model_id = FUDAN_FM25Q08,
6717 .total_size = 1024,
6718 .page_size = 256,
6719 /* supports SFDP */
6720 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber7f7bffa2024-10-21 23:57:11 +02006721 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
Nico Huber226bb872024-04-09 23:30:34 +02006722 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006723 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006724 .tested = TEST_UNTESTED,
6725 .probe = probe_spi_rdid,
6726 .probe_timing = TIMING_ZERO,
6727 .block_erasers = {
6728 {
6729 .eraseblocks = { {4 * 1024, 256} },
6730 .block_erase = spi_block_erase_20,
6731 }, {
6732 .eraseblocks = { {32 * 1024, 32} },
6733 .block_erase = spi_block_erase_52,
6734 }, {
6735 .eraseblocks = { {64 * 1024, 16} },
6736 .block_erase = spi_block_erase_d8,
6737 }, {
6738 .eraseblocks = { {1024 * 1024, 1} },
6739 .block_erase = spi_block_erase_60,
6740 }, {
6741 .eraseblocks = { {1024 * 1024, 1} },
6742 .block_erase = spi_block_erase_c7,
6743 },
6744 },
Nico Huber226bb872024-04-09 23:30:34 +02006745 .reg_bits =
6746 {
6747 .qe = {STATUS2, 1, RW},
Nico Huber7f7bffa2024-10-21 23:57:11 +02006748 .srp = {STATUS1, 7, RW},
6749 .srl = {STATUS2, 0, RW},
6750 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6751 .tb = {STATUS1, 5, RW},
6752 .sec = {STATUS1, 6, RW},
6753 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02006754 },
Nico Huber7f7bffa2024-10-21 23:57:11 +02006755 .wp_write_cfg = spi_wp_write_cfg,
6756 .wp_read_cfg = spi_wp_read_cfg,
6757 .wp_get_ranges = spi_wp_get_available_ranges,
6758 .decode_range = decode_range_spi25,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006759 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6760 .unlock = spi_disable_blockprotect_bp2_srwd,
6761 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006762 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006763 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006764 .prepare_access = spi_prepare_io,
6765 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006766 },
6767
6768 {
6769 .vendor = "Fudan",
Nico Huber4a351342024-10-22 00:03:52 +02006770 .name = "FM25Q08A",
6771 .bustype = BUS_SPI,
6772 .manufacture_id = FUDAN_ID_NOPREFIX,
6773 .model_id = FUDAN_FM25Q08,
6774 .total_size = 1024,
6775 .page_size = 256,
6776 /* supports SFDP */
6777 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
6778 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
6779 FEATURE_OTP | FEATURE_QPI_SRP,
6780 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6781 .tested = TEST_UNTESTED,
6782 .probe = probe_spi_rdid,
6783 .probe_timing = TIMING_ZERO,
6784 .block_erasers = {
6785 {
6786 .eraseblocks = { {4 * 1024, 256} },
6787 .block_erase = spi_block_erase_20,
6788 }, {
6789 .eraseblocks = { {32 * 1024, 32} },
6790 .block_erase = spi_block_erase_52,
6791 }, {
6792 .eraseblocks = { {64 * 1024, 16} },
6793 .block_erase = spi_block_erase_d8,
6794 }, {
6795 .eraseblocks = { {1024 * 1024, 1} },
6796 .block_erase = spi_block_erase_60,
6797 }, {
6798 .eraseblocks = { {1024 * 1024, 1} },
6799 .block_erase = spi_block_erase_c7,
6800 },
6801 },
6802 .reg_bits =
6803 {
6804 .qe = {STATUS2, 1, RW},
6805 .srp = {STATUS1, 7, RW},
6806 .srl = {STATUS2, 0, RW},
6807 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6808 .tb = {STATUS1, 5, RW},
6809 .sec = {STATUS1, 6, RW},
6810 .cmp = {STATUS2, 4, RW},
6811 },
6812 .wp_write_cfg = spi_wp_write_cfg,
6813 .wp_read_cfg = spi_wp_read_cfg,
6814 .wp_get_ranges = spi_wp_get_available_ranges,
6815 .decode_range = decode_range_spi25,
6816 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6817 .unlock = spi_disable_blockprotect_bp2_srwd,
6818 .write = spi_chip_write_256,
6819 .read = spi_chip_read,
6820 .voltage = {2700, 3600},
6821 .prepare_access = spi_prepare_io,
6822 .finish_access = spi_finish_io,
6823 },
6824
6825 {
6826 .vendor = "Fudan",
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006827 .name = "FM25Q16",
6828 .bustype = BUS_SPI,
6829 .manufacture_id = FUDAN_ID_NOPREFIX,
6830 .model_id = FUDAN_FM25Q16,
6831 .total_size = 2048,
6832 .page_size = 256,
6833 /* supports SFDP */
6834 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber7f7bffa2024-10-21 23:57:11 +02006835 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
Nico Huber226bb872024-04-09 23:30:34 +02006836 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006837 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006838 .tested = TEST_UNTESTED,
6839 .probe = probe_spi_rdid,
6840 .probe_timing = TIMING_ZERO,
6841 .block_erasers = {
6842 {
6843 .eraseblocks = { {4 * 1024, 512} },
6844 .block_erase = spi_block_erase_20,
6845 }, {
6846 .eraseblocks = { {32 * 1024, 64} },
6847 .block_erase = spi_block_erase_52,
6848 }, {
6849 .eraseblocks = { {64 * 1024, 32} },
6850 .block_erase = spi_block_erase_d8,
6851 }, {
6852 .eraseblocks = { {2 * 1024 * 1024, 1} },
6853 .block_erase = spi_block_erase_60,
6854 }, {
6855 .eraseblocks = { {2 * 1024 * 1024, 1} },
6856 .block_erase = spi_block_erase_c7,
6857 }
6858 },
Nico Huber226bb872024-04-09 23:30:34 +02006859 .reg_bits =
6860 {
6861 .qe = {STATUS2, 1, RW},
Nico Huber7f7bffa2024-10-21 23:57:11 +02006862 .srp = {STATUS1, 7, RW},
6863 .srl = {STATUS2, 0, RW},
6864 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6865 .tb = {STATUS1, 5, RW},
6866 .sec = {STATUS1, 6, RW},
6867 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02006868 },
Nico Huber7f7bffa2024-10-21 23:57:11 +02006869 .wp_write_cfg = spi_wp_write_cfg,
6870 .wp_read_cfg = spi_wp_read_cfg,
6871 .wp_get_ranges = spi_wp_get_available_ranges,
6872 .decode_range = decode_range_spi25,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006873 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6874 .unlock = spi_disable_blockprotect_bp2_srwd,
6875 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006876 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006877 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006878 .prepare_access = spi_prepare_io,
6879 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006880 },
6881
6882 {
6883 .vendor = "Fudan",
6884 .name = "FM25Q32",
6885 .bustype = BUS_SPI,
6886 .manufacture_id = FUDAN_ID_NOPREFIX,
6887 .model_id = FUDAN_FM25Q32,
6888 .total_size = 4096,
6889 .page_size = 256,
6890 /* supports SFDP */
6891 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber7f7bffa2024-10-21 23:57:11 +02006892 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
Nico Huber226bb872024-04-09 23:30:34 +02006893 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +01006894 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006895 .tested = TEST_UNTESTED,
6896 .probe = probe_spi_rdid,
6897 .probe_timing = TIMING_ZERO,
6898 .block_erasers = {
6899 {
6900 .eraseblocks = { {4 * 1024, 1024} },
6901 .block_erase = spi_block_erase_20,
6902 }, {
6903 .eraseblocks = { {32 * 1024, 128} },
6904 .block_erase = spi_block_erase_52,
6905 }, {
6906 .eraseblocks = { {64 * 1024, 64} },
6907 .block_erase = spi_block_erase_d8,
6908 }, {
6909 .eraseblocks = { {4 * 1024 * 1024, 1} },
6910 .block_erase = spi_block_erase_60,
6911 }, {
6912 .eraseblocks = { {4 * 1024 * 1024, 1} },
6913 .block_erase = spi_block_erase_c7,
6914 },
6915 },
Nico Huber226bb872024-04-09 23:30:34 +02006916 .reg_bits =
6917 {
6918 .qe = {STATUS2, 1, RW},
Nico Huber7f7bffa2024-10-21 23:57:11 +02006919 .srp = {STATUS1, 7, RW},
6920 .srl = {STATUS2, 0, RW},
6921 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6922 .tb = {STATUS1, 5, RW},
6923 .sec = {STATUS1, 6, RW},
6924 .cmp = {STATUS2, 6, RW},
Nico Huber226bb872024-04-09 23:30:34 +02006925 },
Nico Huber7f7bffa2024-10-21 23:57:11 +02006926 .wp_write_cfg = spi_wp_write_cfg,
6927 .wp_read_cfg = spi_wp_read_cfg,
6928 .wp_get_ranges = spi_wp_get_available_ranges,
6929 .decode_range = decode_range_spi25,
6930 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6931 .unlock = spi_disable_blockprotect_bp2_srwd,
6932 .write = spi_chip_write_256,
6933 .read = spi_chip_read,
6934 .voltage = {2700, 3600},
6935 .prepare_access = spi_prepare_io,
6936 .finish_access = spi_finish_io,
6937 },
6938
6939 {
6940 .vendor = "Fudan",
6941 .name = "FM25Q64",
6942 .bustype = BUS_SPI,
6943 .manufacture_id = FUDAN_ID_NOPREFIX,
6944 .model_id = FUDAN_FM25Q64,
6945 .total_size = 8192,
6946 .page_size = 256,
6947 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
6948 FEATURE_OTP | FEATURE_QPI_SRP,
6949 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
6950 .tested = TEST_UNTESTED,
6951 .probe = probe_spi_rdid,
6952 .probe_timing = TIMING_ZERO,
6953 .block_erasers =
6954 {
6955 {
6956 .eraseblocks = { {4 * 1024, 2048} },
6957 .block_erase = spi_block_erase_20,
6958 }, {
6959 .eraseblocks = { {32 * 1024, 256} },
6960 .block_erase = spi_block_erase_52,
6961 }, {
6962 .eraseblocks = { {64 * 1024, 128} },
6963 .block_erase = spi_block_erase_d8,
6964 }, {
6965 .eraseblocks = { {8192 * 1024, 1} },
6966 .block_erase = spi_block_erase_60,
6967 }, {
6968 .eraseblocks = { {8192 * 1024, 1} },
6969 .block_erase = spi_block_erase_c7,
6970 },
6971 },
6972 .reg_bits =
6973 {
6974 .qe = {STATUS2, 1, RW},
6975 .srp = {STATUS1, 7, RW},
6976 .srl = {STATUS2, 0, RW},
6977 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
6978 .tb = {STATUS1, 5, RW},
6979 .sec = {STATUS1, 6, RW},
6980 .cmp = {STATUS2, 6, RW},
6981 },
6982 .wp_write_cfg = spi_wp_write_cfg,
6983 .wp_read_cfg = spi_wp_read_cfg,
6984 .wp_get_ranges = spi_wp_get_available_ranges,
6985 .decode_range = decode_range_spi25,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006986 .printlock = spi_prettyprint_status_register_bp2_tb_bpl, /* bit6 selects size of protected blocks; TODO: SR2 */
6987 .unlock = spi_disable_blockprotect_bp2_srwd,
6988 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01006989 .read = spi_chip_read,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006990 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02006991 .prepare_access = spi_prepare_io,
6992 .finish_access = spi_finish_io,
Jakob Petersson0cf3e122019-02-18 01:55:43 +01006993 },
6994
6995 {
Nico Hubered8b82c2024-10-22 00:12:03 +02006996 .vendor = "Fudan",
6997 .name = "FM25Q128",
6998 .bustype = BUS_SPI,
6999 .manufacture_id = FUDAN_ID_NOPREFIX,
7000 .model_id = FUDAN_FM25Q128,
7001 .total_size = 16384,
7002 .page_size = 256,
7003 /* Supports full QIO/QPI but has non-volatile DC bits controlling all modes. */
7004 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
7005 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
7006 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
7007 .tested = TEST_UNTESTED,
7008 .probe = probe_spi_rdid,
7009 .probe_timing = TIMING_ZERO,
7010 .block_erasers =
7011 {
7012 {
7013 .eraseblocks = { {4 * 1024, 4096} },
7014 .block_erase = spi_block_erase_20,
7015 }, {
7016 .eraseblocks = { {32 * 1024, 512} },
7017 .block_erase = spi_block_erase_52,
7018 }, {
7019 .eraseblocks = { {64 * 1024, 256} },
7020 .block_erase = spi_block_erase_d8,
7021 }, {
7022 .eraseblocks = { {16384 * 1024, 1} },
7023 .block_erase = spi_block_erase_60,
7024 }, {
7025 .eraseblocks = { {16384 * 1024, 1} },
7026 .block_erase = spi_block_erase_c7,
7027 },
7028 },
7029 .reg_bits =
7030 {
7031 .qe = {STATUS2, 1, RW},
7032 .dc = {{STATUS2, 6, RW}, {STATUS2, 7, RW}},
7033 .srp = {STATUS1, 7, RW},
7034 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7035 .tb = {STATUS1, 5, RW},
7036 .cmp = {STATUS1, 6, RW},
7037 .wps = {STATUS3, 2, RW},
7038 },
7039 .wp_write_cfg = spi_wp_write_cfg,
7040 .wp_read_cfg = spi_wp_read_cfg,
7041 .wp_get_ranges = spi_wp_get_available_ranges,
7042 .decode_range = decode_range_spi25,
7043 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
7044 .unlock = spi_disable_blockprotect_bp2_srwd,
7045 .write = spi_chip_write_256,
7046 .read = spi_chip_read,
7047 .voltage = {2700, 3600},
7048 .prepare_access = spi_prepare_io,
7049 .finish_access = spi_finish_io,
7050 },
7051
7052 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007053 .vendor = "Fujitsu",
7054 .name = "MBM29F004BC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007055 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007056 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007057 .model_id = FUJITSU_MBM29F004BC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007058 .total_size = 512,
7059 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +00007060 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007061 .tested = TEST_UNTESTED,
7062 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00007063 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00007064 .block_erasers =
7065 {
7066 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007067 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007068 {16 * 1024, 1},
7069 {8 * 1024, 2},
7070 {32 * 1024, 1},
7071 {64 * 1024, 7},
7072 },
Sean Nelson35727f72010-01-28 23:55:12 +00007073 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007074 }, {
7075 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +00007076 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007077 },
7078 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007079 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007080 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00007081 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01007082 .prepare_access = prepare_memory_access,
7083 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007084 },
7085
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007086 {
7087 .vendor = "Fujitsu",
7088 .name = "MBM29F004TC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007089 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007090 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007091 .model_id = FUJITSU_MBM29F004TC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007092 .total_size = 512,
7093 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +00007094 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007095 .tested = TEST_UNTESTED,
7096 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +00007097 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson6b11ad22009-12-23 17:05:59 +00007098 .block_erasers =
7099 {
7100 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007101 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007102 {64 * 1024, 7},
7103 {32 * 1024, 1},
7104 {8 * 1024, 2},
7105 {16 * 1024, 1},
7106 },
Sean Nelson35727f72010-01-28 23:55:12 +00007107 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007108 }, {
7109 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +00007110 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007111 },
7112 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007113 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007114 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +00007115 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +01007116 .prepare_access = prepare_memory_access,
7117 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007118 },
7119
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007120 {
Sean Nelson35727f72010-01-28 23:55:12 +00007121 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007122 .vendor = "Fujitsu",
7123 .name = "MBM29F400BC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007124 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007125 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007126 .model_id = FUJITSU_MBM29F400BC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007127 .total_size = 512,
7128 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007129 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +00007130 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007131 .probe = probe_jedec,
7132 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson6b11ad22009-12-23 17:05:59 +00007133 .block_erasers =
7134 {
7135 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007136 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007137 {16 * 1024, 1},
7138 {8 * 1024, 2},
7139 {32 * 1024, 1},
7140 {64 * 1024, 7},
7141 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007142 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007143 }, {
7144 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007145 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007146 },
7147 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007148 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007149 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007150 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007151 .prepare_access = prepare_memory_access,
7152 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007153 },
7154
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007155 {
7156 .vendor = "Fujitsu",
7157 .name = "MBM29F400TC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +00007158 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007159 .manufacture_id = FUJITSU_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +00007160 .model_id = FUJITSU_MBM29F400TC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007161 .total_size = 512,
7162 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007163 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007164 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007165 .probe = probe_jedec,
7166 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson6b11ad22009-12-23 17:05:59 +00007167 .block_erasers =
7168 {
7169 {
Stefan Tauner0554ca52013-07-25 22:54:25 +00007170 .eraseblocks = {
Sean Nelson6b11ad22009-12-23 17:05:59 +00007171 {64 * 1024, 7},
7172 {32 * 1024, 1},
7173 {8 * 1024, 2},
7174 {16 * 1024, 1},
7175 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007176 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007177 }, {
7178 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007179 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +00007180 },
7181 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007182 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +00007183 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +00007184 .voltage = {4750, 5250}, /* 4.75-5.25V for type -55, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +01007185 .prepare_access = prepare_memory_access,
7186 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +00007187 },
7188
Stephan Guilloux5c5b5252009-01-08 03:40:17 +00007189 {
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007190 .vendor = "Fujitsu",
7191 .name = "MBM29LV160BE",
7192 .bustype = BUS_PARALLEL,
7193 .manufacture_id = FUJITSU_ID,
7194 .model_id = FUJITSU_MBM29LV160BE,
7195 .total_size = 2 * 1024,
7196 .page_size = 0,
7197 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_SHORT_RESET,
7198 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007199 .probe = probe_jedec,
7200 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007201 .block_erasers =
7202 {
7203 {
7204 .eraseblocks = {
7205 {16 * 1024, 1},
7206 {8 * 1024, 2},
7207 {32 * 1024, 1},
7208 {64 * 1024, 31},
7209 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007210 .block_erase = erase_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007211 }, {
7212 .eraseblocks = { {2048 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007213 .block_erase = erase_chip_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007214 },
7215 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007216 .write = write_jedec_1, /* Supports a fast mode too */
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007217 .read = read_memmapped,
7218 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01007219 .prepare_access = prepare_memory_access,
7220 .finish_access = finish_memory_access,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007221 },
7222
7223 {
7224 .vendor = "Fujitsu",
7225 .name = "MBM29LV160TE",
7226 .bustype = BUS_PARALLEL,
7227 .manufacture_id = FUJITSU_ID,
7228 .model_id = FUJITSU_MBM29LV160TE,
7229 .total_size = 2 * 1024,
7230 .page_size = 0,
7231 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_SHORT_RESET,
7232 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007233 .probe = probe_jedec,
7234 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007235 .block_erasers =
7236 {
7237 {
7238 .eraseblocks = {
7239 {64 * 1024, 31},
7240 {32 * 1024, 1},
7241 {8 * 1024, 2},
7242 {16 * 1024, 1},
7243 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007244 .block_erase = erase_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007245 }, {
7246 .eraseblocks = { {2048 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007247 .block_erase = erase_chip_block_jedec,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007248 },
7249 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +00007250 .write = write_jedec_1, /* Supports a fast mode too */
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007251 .read = read_memmapped,
7252 .voltage = {3000, 3600}, /* 3.0-3.6V for type -70, others 2.7-3.6V */
Nico Huber9eec4072023-01-12 01:17:30 +01007253 .prepare_access = prepare_memory_access,
7254 .finish_access = finish_memory_access,
Stefan Tauner6db8bad2013-08-25 13:31:43 +00007255 },
7256
7257 {
Justin Chevrier1525b2a2012-04-14 21:59:23 +00007258 .vendor = "GigaDevice",
Nico Huberd4eb5322024-11-08 23:26:04 +01007259 .name = "GD25LF80E",
7260 .bustype = BUS_SPI,
7261 .manufacture_id = GIGADEVICE_ID,
7262 .model_id = GIGADEVICE_GD25LF80E,
7263 .total_size = 1024,
7264 .page_size = 256,
7265 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7266 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7267 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7268 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7269 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7270 .tested = TEST_UNTESTED,
7271 .probe = probe_spi_rdid,
7272 .probe_timing = TIMING_ZERO,
7273 .block_erasers =
7274 {
7275 {
7276 .eraseblocks = { {4 * 1024, 256} },
7277 .block_erase = spi_block_erase_20,
7278 }, {
7279 .eraseblocks = { {32 * 1024, 32} },
7280 .block_erase = spi_block_erase_52,
7281 }, {
7282 .eraseblocks = { {64 * 1024, 16} },
7283 .block_erase = spi_block_erase_d8,
7284 }, {
7285 .eraseblocks = { {1024 * 1024, 1} },
7286 .block_erase = spi_block_erase_60,
7287 }, {
7288 .eraseblocks = { {1024 * 1024, 1} },
7289 .block_erase = spi_block_erase_c7,
7290 }
7291 },
7292 .printlock = spi_prettyprint_status_register_bp4_srwd,
7293 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7294 .write = spi_chip_write_256,
7295 .read = spi_chip_read,
7296 .voltage = {1650, 2000},
7297 .reg_bits =
7298 {
7299 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7300 .srp = {STATUS1, 7, RW},
7301 .srl = {STATUS2, 0, RW},
7302 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7303 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7304 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7305 .cmp = {STATUS2, 6, RW},
7306 },
7307 .wp_write_cfg = spi_wp_write_cfg,
7308 .wp_read_cfg = spi_wp_read_cfg,
7309 .wp_get_ranges = spi_wp_get_available_ranges,
7310 .decode_range = decode_range_spi25,
7311 .prepare_access = spi_prepare_io,
7312 .finish_access = spi_finish_io,
7313 },
7314
7315 {
7316 .vendor = "GigaDevice",
7317 .name = "GD25LF16E",
7318 .bustype = BUS_SPI,
7319 .manufacture_id = GIGADEVICE_ID,
7320 .model_id = GIGADEVICE_GD25LF16E,
7321 .total_size = 2048,
7322 .page_size = 256,
7323 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7324 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7325 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7326 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7327 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7328 .tested = TEST_UNTESTED,
7329 .probe = probe_spi_rdid,
7330 .probe_timing = TIMING_ZERO,
7331 .block_erasers =
7332 {
7333 {
7334 .eraseblocks = { {4 * 1024, 512} },
7335 .block_erase = spi_block_erase_20,
7336 }, {
7337 .eraseblocks = { {32 * 1024, 64} },
7338 .block_erase = spi_block_erase_52,
7339 }, {
7340 .eraseblocks = { {64 * 1024, 32} },
7341 .block_erase = spi_block_erase_d8,
7342 }, {
7343 .eraseblocks = { {2048 * 1024, 1} },
7344 .block_erase = spi_block_erase_60,
7345 }, {
7346 .eraseblocks = { {2048 * 1024, 1} },
7347 .block_erase = spi_block_erase_c7,
7348 }
7349 },
7350 .printlock = spi_prettyprint_status_register_bp4_srwd,
7351 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7352 .write = spi_chip_write_256,
7353 .read = spi_chip_read,
7354 .voltage = {1650, 2000},
7355 .reg_bits =
7356 {
7357 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7358 .srp = {STATUS1, 7, RW},
7359 .srl = {STATUS2, 0, RW},
7360 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7361 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7362 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7363 .cmp = {STATUS2, 6, RW},
7364 },
7365 .wp_write_cfg = spi_wp_write_cfg,
7366 .wp_read_cfg = spi_wp_read_cfg,
7367 .wp_get_ranges = spi_wp_get_available_ranges,
7368 .decode_range = decode_range_spi25,
7369 .prepare_access = spi_prepare_io,
7370 .finish_access = spi_finish_io,
7371 },
7372
7373 {
7374 .vendor = "GigaDevice",
7375 .name = "GD25LF32E",
7376 .bustype = BUS_SPI,
7377 .manufacture_id = GIGADEVICE_ID,
7378 .model_id = GIGADEVICE_GD25LF32E,
7379 .total_size = 4096,
7380 .page_size = 256,
7381 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7382 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7383 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7384 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7385 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7386 .tested = TEST_UNTESTED,
7387 .probe = probe_spi_rdid,
7388 .probe_timing = TIMING_ZERO,
7389 .block_erasers =
7390 {
7391 {
7392 .eraseblocks = { {4 * 1024, 1024} },
7393 .block_erase = spi_block_erase_20,
7394 }, {
7395 .eraseblocks = { {32 * 1024, 128} },
7396 .block_erase = spi_block_erase_52,
7397 }, {
7398 .eraseblocks = { {64 * 1024, 64} },
7399 .block_erase = spi_block_erase_d8,
7400 }, {
7401 .eraseblocks = { {4096 * 1024, 1} },
7402 .block_erase = spi_block_erase_60,
7403 }, {
7404 .eraseblocks = { {4096 * 1024, 1} },
7405 .block_erase = spi_block_erase_c7,
7406 }
7407 },
7408 .printlock = spi_prettyprint_status_register_bp4_srwd,
7409 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7410 .write = spi_chip_write_256,
7411 .read = spi_chip_read,
7412 .voltage = {1650, 2000},
7413 .reg_bits =
7414 {
7415 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7416 .srp = {STATUS1, 7, RW},
7417 .srl = {STATUS2, 0, RW},
7418 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7419 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7420 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7421 .cmp = {STATUS2, 6, RW},
7422 },
7423 .wp_write_cfg = spi_wp_write_cfg,
7424 .wp_read_cfg = spi_wp_read_cfg,
7425 .wp_get_ranges = spi_wp_get_available_ranges,
7426 .decode_range = decode_range_spi25,
7427 .prepare_access = spi_prepare_io,
7428 .finish_access = spi_finish_io,
7429 },
7430
7431 {
7432 .vendor = "GigaDevice",
7433 .name = "GD25LF64E",
7434 .bustype = BUS_SPI,
7435 .manufacture_id = GIGADEVICE_ID,
7436 .model_id = GIGADEVICE_GD25LF64E,
7437 .total_size = 8192,
7438 .page_size = 256,
7439 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7440 /* Supports fast-read quad-i/o (0xeb) but with 10 dummy cycles. */
7441 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7442 (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7443 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7444 .tested = TEST_UNTESTED,
7445 .probe = probe_spi_rdid,
7446 .probe_timing = TIMING_ZERO,
7447 .block_erasers =
7448 {
7449 {
7450 .eraseblocks = { {4 * 1024, 2048} },
7451 .block_erase = spi_block_erase_20,
7452 }, {
7453 .eraseblocks = { {32 * 1024, 256} },
7454 .block_erase = spi_block_erase_52,
7455 }, {
7456 .eraseblocks = { {64 * 1024, 128} },
7457 .block_erase = spi_block_erase_d8,
7458 }, {
7459 .eraseblocks = { {8192 * 1024, 1} },
7460 .block_erase = spi_block_erase_60,
7461 }, {
7462 .eraseblocks = { {8192 * 1024, 1} },
7463 .block_erase = spi_block_erase_c7,
7464 }
7465 },
7466 .printlock = spi_prettyprint_status_register_bp4_srwd,
7467 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7468 .write = spi_chip_write_256,
7469 .read = spi_chip_read,
7470 .voltage = {1650, 2000},
7471 .reg_bits =
7472 {
7473 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7474 .srp = {STATUS1, 7, RW},
7475 .srl = {STATUS2, 0, RW},
7476 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7477 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7478 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7479 .cmp = {STATUS2, 6, RW},
7480 },
7481 .wp_write_cfg = spi_wp_write_cfg,
7482 .wp_read_cfg = spi_wp_read_cfg,
7483 .wp_get_ranges = spi_wp_get_available_ranges,
7484 .decode_range = decode_range_spi25,
7485 .prepare_access = spi_prepare_io,
7486 .finish_access = spi_finish_io,
7487 },
7488
7489 {
7490 .vendor = "GigaDevice",
Nico Huber3646b182024-11-08 23:44:37 +01007491 .name = "GD25LF128E",
7492 .bustype = BUS_SPI,
7493 .manufacture_id = GIGADEVICE_ID,
7494 .model_id = GIGADEVICE_GD25LF128E,
7495 .total_size = 16384,
7496 .page_size = 256,
7497 /* OTP: 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7498 /* Supports fast-read quad-i/o (0xeb) but with non-volatile DC bits. */
7499 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
7500 FEATURE_OTP | (FEATURE_QPI_SRP & ~FEATURE_FAST_READ_QIO),
7501 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 10 } },
7502 .tested = TEST_UNTESTED,
7503 .probe = probe_spi_rdid,
7504 .probe_timing = TIMING_ZERO,
7505 .block_erasers =
7506 {
7507 {
7508 .eraseblocks = { {4 * 1024, 4096} },
7509 .block_erase = spi_block_erase_20,
7510 }, {
7511 .eraseblocks = { {32 * 1024, 512} },
7512 .block_erase = spi_block_erase_52,
7513 }, {
7514 .eraseblocks = { {64 * 1024, 256} },
7515 .block_erase = spi_block_erase_d8,
7516 }, {
7517 .eraseblocks = { {16384 * 1024, 1} },
7518 .block_erase = spi_block_erase_60,
7519 }, {
7520 .eraseblocks = { {16384 * 1024, 1} },
7521 .block_erase = spi_block_erase_c7,
7522 }
7523 },
7524 .printlock = spi_prettyprint_status_register_bp4_srwd,
7525 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7526 .write = spi_chip_write_256,
7527 .read = spi_chip_read,
7528 .voltage = {1650, 2000},
7529 .reg_bits =
7530 {
7531 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
7532 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
7533 .srp = {STATUS1, 7, RW},
7534 .srl = {STATUS2, 0, RW},
7535 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7536 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7537 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7538 .cmp = {STATUS2, 6, RW},
7539 },
7540 .wp_write_cfg = spi_wp_write_cfg,
7541 .wp_read_cfg = spi_wp_read_cfg,
7542 .wp_get_ranges = spi_wp_get_available_ranges,
7543 .decode_range = decode_range_spi25,
7544 .prepare_access = spi_prepare_io,
7545 .finish_access = spi_finish_io,
7546 },
7547
7548 {
7549 .vendor = "GigaDevice",
Edward O'Callaghan981a3442021-06-22 11:16:55 +10007550 .name = "GD25LQ128C/GD25LQ128D/GD25LQ128E",
Roman Titov95edc892015-04-03 21:29:04 +00007551 .bustype = BUS_SPI,
7552 .manufacture_id = GIGADEVICE_ID,
Alan Green188127e2019-08-06 16:10:34 +10007553 .model_id = GIGADEVICE_GD25LQ128CD,
Alan Green1f9cc7d2019-07-01 11:10:45 +10007554 .total_size = 16384,
Roman Titov95edc892015-04-03 21:29:04 +00007555 .page_size = 256,
Nico Huber7d0f5562024-11-08 15:06:22 +01007556 /* OTP: 3x 512B, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7557 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber4da971f2024-03-27 01:18:12 +01007558 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03007559 .tested = TEST_OK_PREWB,
Roman Titov95edc892015-04-03 21:29:04 +00007560 .probe = probe_spi_rdid,
7561 .probe_timing = TIMING_ZERO,
7562 .block_erasers =
7563 {
7564 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007565 .eraseblocks = { {4 * 1024, 4096} },
Roman Titov95edc892015-04-03 21:29:04 +00007566 .block_erase = spi_block_erase_20,
7567 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007568 .eraseblocks = { {32 * 1024, 512} },
Roman Titov95edc892015-04-03 21:29:04 +00007569 .block_erase = spi_block_erase_52,
7570 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007571 .eraseblocks = { {64 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00007572 .block_erase = spi_block_erase_d8,
7573 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007574 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00007575 .block_erase = spi_block_erase_60,
7576 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10007577 .eraseblocks = { {16 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00007578 .block_erase = spi_block_erase_c7,
7579 }
7580 },
7581 .printlock = spi_prettyprint_status_register_bp4_srwd,
7582 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7583 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007584 .read = spi_chip_read,
Nico Huber7d0f5562024-11-08 15:06:22 +01007585 .voltage = {1650, 1950},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007586 .reg_bits =
7587 {
Nico Huber4da971f2024-03-27 01:18:12 +01007588 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11007589 .srp = {STATUS1, 7, RW},
7590 .srl = {STATUS2, 0, RW},
7591 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7592 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7593 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7594 .cmp = {STATUS2, 6, RW},
7595 },
Nico Huberaabb3e02023-01-13 00:22:30 +01007596 .wp_write_cfg = spi_wp_write_cfg,
7597 .wp_read_cfg = spi_wp_read_cfg,
7598 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11007599 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007600 .prepare_access = spi_prepare_io,
7601 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00007602 },
7603
7604 {
7605 .vendor = "GigaDevice",
7606 .name = "GD25LQ16",
7607 .bustype = BUS_SPI,
7608 .manufacture_id = GIGADEVICE_ID,
7609 .model_id = GIGADEVICE_GD25LQ16,
7610 .total_size = 2048,
7611 .page_size = 256,
Nico Huber7f8c12d2024-11-08 14:24:14 +01007612 /* OTP: 1024B total, 256B reserved, later 3x 512B; read 0x48; write 0x42, erase 0x44 */
7613 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for L.16C */
7614 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Roman Titov95edc892015-04-03 21:29:04 +00007615 .tested = TEST_UNTESTED,
7616 .probe = probe_spi_rdid,
7617 .probe_timing = TIMING_ZERO,
7618 .block_erasers =
7619 {
7620 {
7621 .eraseblocks = { {4 * 1024, 512} },
7622 .block_erase = spi_block_erase_20,
7623 }, {
7624 .eraseblocks = { {32 * 1024, 64} },
7625 .block_erase = spi_block_erase_52,
7626 }, {
7627 .eraseblocks = { {64 * 1024, 32} },
7628 .block_erase = spi_block_erase_d8,
7629 }, {
7630 .eraseblocks = { {2 * 1024 * 1024, 1} },
7631 .block_erase = spi_block_erase_60,
7632 }, {
7633 .eraseblocks = { {2 * 1024 * 1024, 1} },
7634 .block_erase = spi_block_erase_c7,
7635 }
7636 },
Nico Huber7f8c12d2024-11-08 14:24:14 +01007637 .printlock = spi_prettyprint_status_register_bp4_srwd,
7638 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7639 .write = spi_chip_write_256,
7640 .read = spi_chip_read,
7641 .voltage = {1650, 1950}, /* 16C, 16E: up to 2.1V */
Nico Huber4da971f2024-03-27 01:18:12 +01007642 .reg_bits =
7643 {
7644 .qe = {STATUS2, 1, RW},
Nico Huber7f8c12d2024-11-08 14:24:14 +01007645 .srp = {STATUS1, 7, RW},
7646 .srl = {STATUS2, 0, RW},
7647 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7648 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7649 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7650 .cmp = {STATUS2, 6, RW},
7651 },
7652 .wp_write_cfg = spi_wp_write_cfg,
7653 .wp_read_cfg = spi_wp_read_cfg,
7654 .wp_get_ranges = spi_wp_get_available_ranges,
7655 .decode_range = decode_range_spi25,
7656 .prepare_access = spi_prepare_io,
7657 .finish_access = spi_finish_io,
7658 },
7659
7660 {
7661 .vendor = "GigaDevice",
7662 .name = "GD25LQ20",
7663 .bustype = BUS_SPI,
7664 .manufacture_id = GIGADEVICE_ID,
7665 .model_id = GIGADEVICE_GD25LQ20,
7666 .total_size = 256,
7667 .page_size = 256,
7668 /* OTP: 3x 512B; read 0x48; write 0x42, erase 0x44 */
7669 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
7670 .tested = TEST_UNTESTED,
7671 .probe = probe_spi_rdid,
7672 .probe_timing = TIMING_ZERO,
7673 .block_erasers =
7674 {
7675 {
7676 .eraseblocks = { {4 * 1024, 64} },
7677 .block_erase = spi_block_erase_20,
7678 }, {
7679 .eraseblocks = { {32 * 1024, 8} },
7680 .block_erase = spi_block_erase_52,
7681 }, {
7682 .eraseblocks = { {64 * 1024, 4} },
7683 .block_erase = spi_block_erase_d8,
7684 }, {
7685 .eraseblocks = { {256 * 1024, 1} },
7686 .block_erase = spi_block_erase_60,
7687 }, {
7688 .eraseblocks = { {256 * 1024, 1} },
7689 .block_erase = spi_block_erase_c7,
7690 }
Nico Huber4da971f2024-03-27 01:18:12 +01007691 },
Roman Titov95edc892015-04-03 21:29:04 +00007692 .printlock = spi_prettyprint_status_register_bp4_srwd,
7693 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7694 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007695 .read = spi_chip_read,
Nico Huber7f8c12d2024-11-08 14:24:14 +01007696 .voltage = {1650, 1950}, /* 20C: up to 2.1V, 20E: up to 2.0V */
7697 .reg_bits =
7698 {
7699 .qe = {STATUS2, 1, RW},
7700 .srp = {STATUS1, 7, RW},
7701 .srl = {STATUS2, 0, RW},
7702 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7703 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
7704 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
7705 .cmp = {STATUS2, 6, RW},
7706 },
7707 .wp_write_cfg = spi_wp_write_cfg,
7708 .wp_read_cfg = spi_wp_read_cfg,
7709 .wp_get_ranges = spi_wp_get_available_ranges,
7710 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02007711 .prepare_access = spi_prepare_io,
7712 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00007713 },
7714
7715 {
7716 .vendor = "GigaDevice",
Nico Huberbc001da2024-11-08 17:11:56 +01007717 .name = "GD25LQ256D/GD25LE256D/GD25LB256D/GD25LQ255E",
7718 .bustype = BUS_SPI,
7719 .manufacture_id = GIGADEVICE_ID,
7720 .model_id = GIGADEVICE_GD25LQ256D,
7721 .total_size = 32768,
7722 .page_size = 256,
7723 /* GD25LQ255E also supports native 4BA commands, EAR. */
7724 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP |
7725 FEATURE_4BA_ENTER | FEATURE_QPI_SRP,
7726 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
7727 .tested = TEST_UNTESTED,
7728 .probe = probe_spi_rdid,
7729 .probe_timing = TIMING_ZERO,
7730 .block_erasers =
7731 {
7732 {
7733 .eraseblocks = { {4 * 1024, 8192} },
7734 .block_erase = spi_block_erase_20,
7735 }, {
7736 .eraseblocks = { {32 * 1024, 1024} },
7737 .block_erase = spi_block_erase_52,
7738 }, {
7739 .eraseblocks = { {64 * 1024, 512} },
7740 .block_erase = spi_block_erase_d8,
7741 }, {
7742 .eraseblocks = { {32 * 1024 * 1024, 1} },
7743 .block_erase = spi_block_erase_60,
7744 }, {
7745 .eraseblocks = { {32 * 1024 * 1024, 1} },
7746 .block_erase = spi_block_erase_c7,
7747 }
7748 },
7749 .printlock = spi_prettyprint_status_register_bp4_srwd,
7750 .unlock = spi_disable_blockprotect_bp4_srwd,
7751 .write = spi_chip_write_256,
7752 .read = spi_chip_read,
7753 .voltage = {1650, 2000},
7754 .reg_bits =
7755 {
7756 .qe = {STATUS2, 1, RW}, /* GD25LB256D: Fixed QE=1 */
7757 .srp = {STATUS1, 7, RW},
7758 .srl = {STATUS2, 0, RW},
7759 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
7760 .tb = {STATUS1, 5, RW},
7761 .sec = {STATUS1, 6, RW},
7762 .cmp = {STATUS2, 6, RW},
7763 },
7764 .wp_write_cfg = spi_wp_write_cfg,
7765 .wp_read_cfg = spi_wp_read_cfg,
7766 .wp_get_ranges = spi_wp_get_available_ranges,
7767 .decode_range = decode_range_spi25,
7768 .prepare_access = spi_prepare_io,
7769 .finish_access = spi_finish_io,
7770 },
7771
7772 {
7773 .vendor = "GigaDevice",
7774 .name = "GD25LQ256H/GD25LE256H/GD25LB256F",
7775 .bustype = BUS_SPI,
7776 .manufacture_id = GIGADEVICE_ID,
7777 .model_id = GIGADEVICE_GD25LQ256D,
7778 .total_size = 32768,
7779 .page_size = 256,
7780 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
7781 /* LE256H supports DTR. */
7782 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
7783 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
7784 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
7785 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
7786 .tested = TEST_UNTESTED,
7787 .probe = probe_spi_rdid,
7788 .probe_timing = TIMING_ZERO,
7789 .block_erasers =
7790 {
7791 {
7792 .eraseblocks = { {4 * 1024, 8192} },
7793 .block_erase = spi_block_erase_21,
7794 }, {
7795 .eraseblocks = { {4 * 1024, 8192} },
7796 .block_erase = spi_block_erase_20,
7797 }, {
7798 .eraseblocks = { {32 * 1024, 1024} },
7799 .block_erase = spi_block_erase_5c,
7800 }, {
7801 .eraseblocks = { {32 * 1024, 1024} },
7802 .block_erase = spi_block_erase_52,
7803 }, {
7804 .eraseblocks = { {64 * 1024, 512} },
7805 .block_erase = spi_block_erase_dc,
7806 }, {
7807 .eraseblocks = { {64 * 1024, 512} },
7808 .block_erase = spi_block_erase_d8,
7809 }, {
7810 .eraseblocks = { {32 * 1024 * 1024, 1} },
7811 .block_erase = spi_block_erase_60,
7812 }, {
7813 .eraseblocks = { {32 * 1024 * 1024, 1} },
7814 .block_erase = spi_block_erase_c7,
7815 }
7816 },
7817 .printlock = spi_prettyprint_status_register_bp4_srwd,
7818 .unlock = spi_disable_blockprotect_bp4_srwd,
7819 .write = spi_chip_write_256,
7820 .read = spi_chip_read,
7821 .voltage = {1650, 2000},
7822 .reg_bits =
7823 {
7824 .qe = {STATUS2, 1, RW}, /* GD25LB256F: Fixed QE=1 */
7825 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
7826 .srp = {STATUS1, 7, RW},
7827 .srl = {STATUS2, 0, RW},
7828 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
7829 .tb = {STATUS1, 6, RW},
7830 .cmp = {STATUS2, 6, RW},
7831 },
7832 .wp_write_cfg = spi_wp_write_cfg,
7833 .wp_read_cfg = spi_wp_read_cfg,
7834 .wp_get_ranges = spi_wp_get_available_ranges,
7835 .decode_range = decode_range_spi25,
7836 .prepare_access = spi_prepare_io,
7837 .finish_access = spi_finish_io,
7838 },
7839
7840 {
7841 .vendor = "GigaDevice",
7842 .name = "GD25LE255E",
7843 .bustype = BUS_SPI,
7844 .manufacture_id = GIGADEVICE_ID,
7845 .model_id = GIGADEVICE_GD25LQ256D,
7846 .total_size = 32768,
7847 .page_size = 256,
7848 /* Non-volatile DC bits control SPI mode, hence disable fast-read commands. */
7849 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
7850 FEATURE_OTP | (FEATURE_4BA & ~FEATURE_4BA_FAST_READ) |
7851 FEATURE_FAST_READ_QPI4B | (FEATURE_QPI_SRP & ~FEATURE_QIO),
Nico Hubere0600182025-03-01 12:29:28 +01007852 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 0 } },
Nico Huberbc001da2024-11-08 17:11:56 +01007853 .tested = TEST_UNTESTED,
7854 .probe = probe_spi_rdid,
7855 .probe_timing = TIMING_ZERO,
7856 .block_erasers =
7857 {
7858 {
7859 .eraseblocks = { {4 * 1024, 8192} },
7860 .block_erase = spi_block_erase_21,
7861 }, {
7862 .eraseblocks = { {4 * 1024, 8192} },
7863 .block_erase = spi_block_erase_20,
7864 }, {
7865 .eraseblocks = { {32 * 1024, 1024} },
7866 .block_erase = spi_block_erase_5c,
7867 }, {
7868 .eraseblocks = { {32 * 1024, 1024} },
7869 .block_erase = spi_block_erase_52,
7870 }, {
7871 .eraseblocks = { {64 * 1024, 512} },
7872 .block_erase = spi_block_erase_dc,
7873 }, {
7874 .eraseblocks = { {64 * 1024, 512} },
7875 .block_erase = spi_block_erase_d8,
7876 }, {
7877 .eraseblocks = { {32 * 1024 * 1024, 1} },
7878 .block_erase = spi_block_erase_60,
7879 }, {
7880 .eraseblocks = { {32 * 1024 * 1024, 1} },
7881 .block_erase = spi_block_erase_c7,
7882 }
7883 },
7884 .printlock = spi_prettyprint_status_register_bp4_srwd,
7885 .unlock = spi_disable_blockprotect_bp4_srwd,
7886 .write = spi_chip_write_256,
7887 .read = spi_chip_read,
7888 .voltage = {1650, 2000},
7889 .reg_bits =
7890 {
7891 .qe = {STATUS2, 1, RW},
7892 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
7893 .srp = {STATUS1, 7, RW},
7894 .srl = {STATUS2, 0, RW},
7895 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
7896 .tb = {STATUS1, 6, RW},
7897 },
7898 .wp_write_cfg = spi_wp_write_cfg,
7899 .wp_read_cfg = spi_wp_read_cfg,
7900 .wp_get_ranges = spi_wp_get_available_ranges,
7901 .decode_range = decode_range_spi25,
7902 .prepare_access = spi_prepare_io,
7903 .finish_access = spi_finish_io,
7904 },
7905
7906 {
7907 .vendor = "GigaDevice",
Nico Huber06fbccc2024-11-08 17:36:28 +01007908 .name = "GD25LB256E/GD25LR256E",
7909 .bustype = BUS_SPI,
7910 .manufacture_id = GIGADEVICE_ID,
7911 .model_id = GIGADEVICE_GD25LB256E,
7912 .total_size = 32768,
7913 .page_size = 256,
7914 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
7915 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
7916 .tested = TEST_UNTESTED,
7917 .probe = probe_spi_rdid,
7918 .probe_timing = TIMING_ZERO,
7919 .block_erasers =
7920 {
7921 {
7922 .eraseblocks = { {4 * 1024, 8192} },
7923 .block_erase = spi_block_erase_21,
7924 }, {
7925 .eraseblocks = { {4 * 1024, 8192} },
7926 .block_erase = spi_block_erase_20,
7927 }, {
7928 .eraseblocks = { {32 * 1024, 1024} },
7929 .block_erase = spi_block_erase_5c,
7930 }, {
7931 .eraseblocks = { {32 * 1024, 1024} },
7932 .block_erase = spi_block_erase_52,
7933 }, {
7934 .eraseblocks = { {64 * 1024, 512} },
7935 .block_erase = spi_block_erase_dc,
7936 }, {
7937 .eraseblocks = { {64 * 1024, 512} },
7938 .block_erase = spi_block_erase_d8,
7939 }, {
7940 .eraseblocks = { {32 * 1024 * 1024, 1} },
7941 .block_erase = spi_block_erase_60,
7942 }, {
7943 .eraseblocks = { {32 * 1024 * 1024, 1} },
7944 .block_erase = spi_block_erase_c7,
7945 }
7946 },
7947 /* Has WPS bit in unsupported register. */
7948 .printlock = spi_prettyprint_status_register_bp4_srwd,
7949 .unlock = spi_disable_blockprotect_bp4_srwd,
7950 .write = spi_chip_write_256,
7951 .read = spi_chip_read,
7952 .voltage = {1650, 2000},
7953 .prepare_access = spi_prepare_io,
7954 .finish_access = spi_finish_io,
7955 },
7956
7957 {
7958 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007959 .name = "GD25LQ32",
7960 .bustype = BUS_SPI,
7961 .manufacture_id = GIGADEVICE_ID,
7962 .model_id = GIGADEVICE_GD25LQ32,
7963 .total_size = 4096,
7964 .page_size = 256,
Nico Huber7d0f5562024-11-08 15:06:22 +01007965 /* OTP: 1024B total, 256B reserved, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
7966 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber4da971f2024-03-27 01:18:12 +01007967 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007968 .tested = TEST_OK_PREW,
7969 .probe = probe_spi_rdid,
7970 .probe_timing = TIMING_ZERO,
7971 .block_erasers =
7972 {
7973 {
7974 .eraseblocks = { {4 * 1024, 1024} },
7975 .block_erase = spi_block_erase_20,
7976 }, {
7977 .eraseblocks = { {32 * 1024, 128} },
7978 .block_erase = spi_block_erase_52,
7979 }, {
7980 .eraseblocks = { {64 * 1024, 64} },
7981 .block_erase = spi_block_erase_d8,
7982 }, {
7983 .eraseblocks = { {4 * 1024 * 1024, 1} },
7984 .block_erase = spi_block_erase_60,
7985 }, {
7986 .eraseblocks = { {4 * 1024 * 1024, 1} },
7987 .block_erase = spi_block_erase_c7,
7988 }
7989 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00007990 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00007991 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
7992 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01007993 .read = spi_chip_read,
Nico Huber7d0f5562024-11-08 15:06:22 +01007994 .voltage = {1650, 1950},
7995 .reg_bits =
7996 {
7997 .qe = {STATUS2, 1, RW},
7998 .srp = {STATUS1, 7, RW},
7999 .srl = {STATUS2, 0, RW},
8000 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8001 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8002 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8003 .cmp = {STATUS2, 6, RW},
8004 },
8005 .wp_write_cfg = spi_wp_write_cfg,
8006 .wp_read_cfg = spi_wp_read_cfg,
8007 .wp_get_ranges = spi_wp_get_available_ranges,
8008 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008009 .prepare_access = spi_prepare_io,
8010 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00008011 },
8012
8013 {
8014 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008015 .name = "GD25LQ40",
8016 .bustype = BUS_SPI,
8017 .manufacture_id = GIGADEVICE_ID,
8018 .model_id = GIGADEVICE_GD25LQ40,
8019 .total_size = 512,
8020 .page_size = 256,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008021 /* OTP: 1024B total, 256B reserved, later 3x 512B; read 0x48; write 0x42, erase 0x44 */
8022 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ40B, LQ40C, LQ40E */
8023 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008024 .tested = TEST_UNTESTED,
8025 .probe = probe_spi_rdid,
8026 .probe_timing = TIMING_ZERO,
8027 .block_erasers =
8028 {
8029 {
8030 .eraseblocks = { {4 * 1024, 128} },
8031 .block_erase = spi_block_erase_20,
8032 }, {
8033 .eraseblocks = { {32 * 1024, 16} },
8034 .block_erase = spi_block_erase_52,
8035 }, {
8036 .eraseblocks = { {64 * 1024, 8} },
8037 .block_erase = spi_block_erase_d8,
8038 }, {
8039 .eraseblocks = { {512 * 1024, 1} },
8040 .block_erase = spi_block_erase_60,
8041 }, {
8042 .eraseblocks = { {512 * 1024, 1} },
8043 .block_erase = spi_block_erase_c7,
8044 }
8045 },
8046 .printlock = spi_prettyprint_status_register_bp4_srwd,
8047 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8048 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008049 .read = spi_chip_read,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008050 .voltage = {1650, 1950}, /* 40C: up to 2.1V, 40E: up to 2.0V */
8051 .reg_bits =
8052 {
8053 .qe = {STATUS2, 1, RW},
8054 .srp = {STATUS1, 7, RW},
8055 .srl = {STATUS2, 0, RW},
8056 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8057 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8058 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8059 .cmp = {STATUS2, 6, RW},
8060 },
8061 .wp_write_cfg = spi_wp_write_cfg,
8062 .wp_read_cfg = spi_wp_read_cfg,
8063 .wp_get_ranges = spi_wp_get_available_ranges,
8064 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008065 .prepare_access = spi_prepare_io,
8066 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008067 },
8068
8069 {
8070 .vendor = "GigaDevice",
Roman Titov95edc892015-04-03 21:29:04 +00008071 .name = "GD25LQ64(B)",
8072 .bustype = BUS_SPI,
8073 .manufacture_id = GIGADEVICE_ID,
8074 .model_id = GIGADEVICE_GD25LQ64,
8075 .total_size = 8192,
8076 .page_size = 256,
Nico Huber7d0f5562024-11-08 15:06:22 +01008077 /* OTP: 1024B total, 256B reserved, later 3x 1024B; read 0x48; write 0x42, erase 0x44 */
8078 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber4da971f2024-03-27 01:18:12 +01008079 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03008080 .tested = TEST_OK_PREWB,
Roman Titov95edc892015-04-03 21:29:04 +00008081 .probe = probe_spi_rdid,
8082 .probe_timing = TIMING_ZERO,
8083 .block_erasers =
8084 {
8085 {
8086 .eraseblocks = { {4 * 1024, 2048} },
8087 .block_erase = spi_block_erase_20,
8088 }, {
8089 .eraseblocks = { {32 * 1024, 256} },
8090 .block_erase = spi_block_erase_52,
8091 }, {
8092 .eraseblocks = { {64 * 1024, 128} },
8093 .block_erase = spi_block_erase_d8,
8094 }, {
8095 .eraseblocks = { {8 * 1024 * 1024, 1} },
8096 .block_erase = spi_block_erase_60,
8097 }, {
8098 .eraseblocks = { {8 * 1024 * 1024, 1} },
8099 .block_erase = spi_block_erase_c7,
8100 }
8101 },
8102 .printlock = spi_prettyprint_status_register_bp4_srwd,
8103 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8104 .write = spi_chip_write_256,
Nico Huber7d0f5562024-11-08 15:06:22 +01008105 .read = spi_chip_read,
8106 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008107 .reg_bits =
8108 {
Nico Huber4da971f2024-03-27 01:18:12 +01008109 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008110 .srp = {STATUS1, 7, RW},
8111 .srl = {STATUS2, 0, RW},
8112 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8113 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8114 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8115 .cmp = {STATUS2, 6, RW},
8116 },
Nico Huberaabb3e02023-01-13 00:22:30 +01008117 .wp_write_cfg = spi_wp_write_cfg,
8118 .wp_read_cfg = spi_wp_read_cfg,
8119 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008120 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008121 .prepare_access = spi_prepare_io,
8122 .finish_access = spi_finish_io,
Roman Titov95edc892015-04-03 21:29:04 +00008123 },
8124
8125 {
8126 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008127 .name = "GD25LQ80",
Roman Titov95edc892015-04-03 21:29:04 +00008128 .bustype = BUS_SPI,
8129 .manufacture_id = GIGADEVICE_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008130 .model_id = GIGADEVICE_GD25LQ80,
8131 .total_size = 1024,
Roman Titov95edc892015-04-03 21:29:04 +00008132 .page_size = 256,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008133 /* OTP: 1024B total, 256B reserved, later 3x 512B; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01008134 /* FEATURE_QPI_SRP(4, 4, 6, 8) except for LQ80B, LQ80C */
Nico Huber7f8c12d2024-11-08 14:24:14 +01008135 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Roman Titov95edc892015-04-03 21:29:04 +00008136 .tested = TEST_UNTESTED,
8137 .probe = probe_spi_rdid,
8138 .probe_timing = TIMING_ZERO,
8139 .block_erasers =
8140 {
8141 {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008142 .eraseblocks = { {4 * 1024, 256} },
Roman Titov95edc892015-04-03 21:29:04 +00008143 .block_erase = spi_block_erase_20,
8144 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008145 .eraseblocks = { {32 * 1024, 32} },
Roman Titov95edc892015-04-03 21:29:04 +00008146 .block_erase = spi_block_erase_52,
8147 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008148 .eraseblocks = { {64 * 1024, 16} },
Roman Titov95edc892015-04-03 21:29:04 +00008149 .block_erase = spi_block_erase_d8,
8150 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008151 .eraseblocks = { {1 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00008152 .block_erase = spi_block_erase_60,
8153 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +10008154 .eraseblocks = { {1 * 1024 * 1024, 1} },
Roman Titov95edc892015-04-03 21:29:04 +00008155 .block_erase = spi_block_erase_c7,
8156 }
8157 },
8158 .printlock = spi_prettyprint_status_register_bp4_srwd,
8159 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8160 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008161 .read = spi_chip_read,
Nico Huber7f8c12d2024-11-08 14:24:14 +01008162 .voltage = {1650, 1950}, /* 80C: up to 2.1V, 80E: up to 2.0V */
8163 .reg_bits =
8164 {
8165 .qe = {STATUS2, 1, RW},
8166 .srp = {STATUS1, 7, RW},
8167 .srl = {STATUS2, 0, RW},
8168 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8169 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8170 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8171 .cmp = {STATUS2, 6, RW},
8172 },
8173 .wp_write_cfg = spi_wp_write_cfg,
8174 .wp_read_cfg = spi_wp_read_cfg,
8175 .wp_get_ranges = spi_wp_get_available_ranges,
8176 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008177 .prepare_access = spi_prepare_io,
8178 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008179 },
8180
8181 {
8182 .vendor = "GigaDevice",
Nico Huber1da02932024-11-08 17:56:39 +01008183 .name = "GD25LB512ME/GD25LR512ME",
Naresh Solanki768cfc42024-10-04 20:17:34 +05308184 .bustype = BUS_SPI,
8185 .manufacture_id = GIGADEVICE_ID,
Nico Huber1da02932024-11-08 17:56:39 +01008186 .model_id = GIGADEVICE_GD25LB512ME,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308187 .total_size = 65536,
8188 .page_size = 256,
Nico Huber1da02932024-11-08 17:56:39 +01008189 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
8190 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308191 .tested = TEST_OK_PREW,
8192 .probe = probe_spi_rdid,
8193 .probe_timing = TIMING_ZERO,
8194 .block_erasers =
8195 {
8196 {
8197 .eraseblocks = { {4 * 1024, 16384} },
8198 .block_erase = spi_block_erase_21,
8199 }, {
8200 .eraseblocks = { {4 * 1024, 16384} },
8201 .block_erase = spi_block_erase_20,
8202 }, {
8203 .eraseblocks = { {32 * 1024, 2048} },
Nico Huber1da02932024-11-08 17:56:39 +01008204 .block_erase = spi_block_erase_5c,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308205 }, {
8206 .eraseblocks = { {32 * 1024, 2048} },
Nico Huber1da02932024-11-08 17:56:39 +01008207 .block_erase = spi_block_erase_52,
Naresh Solanki768cfc42024-10-04 20:17:34 +05308208 }, {
8209 .eraseblocks = { {64 * 1024, 1024} },
8210 .block_erase = spi_block_erase_dc,
8211 }, {
8212 .eraseblocks = { {64 * 1024, 1024} },
8213 .block_erase = spi_block_erase_d8,
8214 }, {
8215 .eraseblocks = { {64 * 1024 * 1024, 1} },
8216 .block_erase = spi_block_erase_60,
8217 }, {
8218 .eraseblocks = { {64 * 1024 * 1024, 1} },
8219 .block_erase = spi_block_erase_c7,
8220 }
8221 },
Nico Huber1da02932024-11-08 17:56:39 +01008222 /* Has WPS bit in unsupported register. */
8223 .printlock = spi_prettyprint_status_register_bp4_srwd,
8224 .unlock = spi_disable_blockprotect_bp4_srwd,
8225 .write = spi_chip_write_256,
8226 .read = spi_chip_read,
8227 .voltage = {1650, 2000},
8228 .prepare_access = spi_prepare_io,
8229 .finish_access = spi_finish_io,
8230 },
8231
8232 {
8233 .vendor = "GigaDevice",
Nico Huber38d037f2024-11-08 18:25:55 +01008234 .name = "GD25LB512MF/GD25LR512MF",
8235 .bustype = BUS_SPI,
8236 .manufacture_id = GIGADEVICE_ID,
8237 .model_id = GIGADEVICE_GD25LB512MF,
8238 .total_size = 65536,
8239 .page_size = 256,
8240 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
8241 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
8242 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
8243 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
8244 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8245 .tested = TEST_UNTESTED,
8246 .probe = probe_spi_rdid,
8247 .probe_timing = TIMING_ZERO,
8248 .block_erasers =
8249 {
8250 {
8251 .eraseblocks = { {4 * 1024, 16384} },
8252 .block_erase = spi_block_erase_21,
8253 }, {
8254 .eraseblocks = { {4 * 1024, 16384} },
8255 .block_erase = spi_block_erase_20,
8256 }, {
8257 .eraseblocks = { {32 * 1024, 2048} },
8258 .block_erase = spi_block_erase_52,
8259 }, {
8260 .eraseblocks = { {32 * 1024, 2048} },
8261 .block_erase = spi_block_erase_5c,
8262 }, {
8263 .eraseblocks = { {64 * 1024, 1024} },
8264 .block_erase = spi_block_erase_dc,
8265 }, {
8266 .eraseblocks = { {64 * 1024, 1024} },
8267 .block_erase = spi_block_erase_d8,
8268 }, {
8269 .eraseblocks = { {64 * 1024 * 1024, 1} },
8270 .block_erase = spi_block_erase_60,
8271 }, {
8272 .eraseblocks = { {64 * 1024 * 1024, 1} },
8273 .block_erase = spi_block_erase_c7,
8274 }
8275 },
8276 .printlock = spi_prettyprint_status_register_bp4_srwd,
8277 .unlock = spi_disable_blockprotect_bp4_srwd,
8278 .write = spi_chip_write_256,
8279 .read = spi_chip_read,
8280 .voltage = {1650, 2000},
8281 .reg_bits =
8282 {
8283 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
8284 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
8285 .srp = {STATUS1, 7, RW},
8286 .srl = {STATUS2, 0, RW},
8287 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8288 .tb = {STATUS1, 6, RW},
8289 .cmp = {STATUS2, 6, RW},
8290 },
8291 .wp_write_cfg = spi_wp_write_cfg,
8292 .wp_read_cfg = spi_wp_read_cfg,
8293 .wp_get_ranges = spi_wp_get_available_ranges,
8294 .decode_range = decode_range_spi25,
8295 .prepare_access = spi_prepare_io,
8296 .finish_access = spi_finish_io,
8297 },
8298
8299 {
8300 .vendor = "GigaDevice",
Nico Huber1da02932024-11-08 17:56:39 +01008301 .name = "GD55LB01GE",
8302 .bustype = BUS_SPI,
8303 .manufacture_id = GIGADEVICE_ID,
8304 .model_id = GIGADEVICE_GD55LB01GE,
8305 .total_size = 128 * 1024,
8306 .page_size = 256,
8307 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
8308 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
8309 .tested = TEST_UNTESTED,
8310 .probe = probe_spi_rdid,
8311 .probe_timing = TIMING_ZERO,
8312 .block_erasers =
8313 {
8314 {
8315 .eraseblocks = { {4 * 1024, 32768} },
8316 .block_erase = spi_block_erase_21,
8317 }, {
8318 .eraseblocks = { {4 * 1024, 32768} },
8319 .block_erase = spi_block_erase_20,
8320 }, {
8321 .eraseblocks = { {32 * 1024, 4096} },
8322 .block_erase = spi_block_erase_5c,
8323 }, {
8324 .eraseblocks = { {32 * 1024, 4096} },
8325 .block_erase = spi_block_erase_52,
8326 }, {
8327 .eraseblocks = { {64 * 1024, 2048} },
8328 .block_erase = spi_block_erase_dc,
8329 }, {
8330 .eraseblocks = { {64 * 1024, 2048} },
8331 .block_erase = spi_block_erase_d8,
8332 }, {
8333 .eraseblocks = { {128 * 1024 * 1024, 1} },
8334 .block_erase = spi_block_erase_60,
8335 }, {
8336 .eraseblocks = { {128 * 1024 * 1024, 1} },
8337 .block_erase = spi_block_erase_c7,
8338 }
8339 },
8340 /* Has WPS bit in unsupported register. */
8341 .printlock = spi_prettyprint_status_register_bp4_srwd,
8342 .unlock = spi_disable_blockprotect_bp4_srwd,
8343 .write = spi_chip_write_256,
8344 .read = spi_chip_read,
8345 .voltage = {1650, 2000},
8346 .prepare_access = spi_prepare_io,
8347 .finish_access = spi_finish_io,
8348 },
8349
8350 {
8351 .vendor = "GigaDevice",
Nico Huber38d037f2024-11-08 18:25:55 +01008352 .name = "GD55LB01GF",
8353 .bustype = BUS_SPI,
8354 .manufacture_id = GIGADEVICE_ID,
8355 .model_id = GIGADEVICE_GD55LB01GF,
8356 .total_size = 128 * 1024,
8357 .page_size = 256,
8358 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
8359 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
8360 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
8361 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
8362 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8363 .tested = TEST_UNTESTED,
8364 .probe = probe_spi_rdid,
8365 .probe_timing = TIMING_ZERO,
8366 .block_erasers =
8367 {
8368 {
8369 .eraseblocks = { {4 * 1024, 32768} },
8370 .block_erase = spi_block_erase_21,
8371 }, {
8372 .eraseblocks = { {4 * 1024, 32768} },
8373 .block_erase = spi_block_erase_20,
8374 }, {
8375 .eraseblocks = { {32 * 1024, 4096} },
8376 .block_erase = spi_block_erase_52,
8377 }, {
8378 .eraseblocks = { {32 * 1024, 4096} },
8379 .block_erase = spi_block_erase_5c,
8380 }, {
8381 .eraseblocks = { {64 * 1024, 2048} },
8382 .block_erase = spi_block_erase_dc,
8383 }, {
8384 .eraseblocks = { {64 * 1024, 2048} },
8385 .block_erase = spi_block_erase_d8,
8386 }, {
8387 .eraseblocks = { {128 * 1024 * 1024, 1} },
8388 .block_erase = spi_block_erase_60,
8389 }, {
8390 .eraseblocks = { {128 * 1024 * 1024, 1} },
8391 .block_erase = spi_block_erase_c7,
8392 }
8393 },
8394 .printlock = spi_prettyprint_status_register_bp4_srwd,
8395 .unlock = spi_disable_blockprotect_bp4_srwd,
8396 .write = spi_chip_write_256,
8397 .read = spi_chip_read,
8398 .voltage = {1650, 2000},
8399 .reg_bits =
8400 {
8401 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
8402 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
8403 .srp = {STATUS1, 7, RW},
8404 .srl = {STATUS2, 0, RW},
8405 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8406 .tb = {STATUS1, 6, RW},
8407 .cmp = {STATUS2, 6, RW},
8408 },
8409 .wp_write_cfg = spi_wp_write_cfg,
8410 .wp_read_cfg = spi_wp_read_cfg,
8411 .wp_get_ranges = spi_wp_get_available_ranges,
8412 .decode_range = decode_range_spi25,
8413 .prepare_access = spi_prepare_io,
8414 .finish_access = spi_finish_io,
8415 },
8416
8417 {
8418 .vendor = "GigaDevice",
Nico Huber1da02932024-11-08 17:56:39 +01008419 .name = "GD55LB02GE",
8420 .bustype = BUS_SPI,
8421 .manufacture_id = GIGADEVICE_ID,
8422 .model_id = GIGADEVICE_GD55LB02GE,
8423 .total_size = 256 * 1024,
8424 .page_size = 256,
8425 /* Has non-volatile DC bits in unsupported register, controlling QIO, QPI. */
8426 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA,
8427 .tested = TEST_UNTESTED,
8428 .probe = probe_spi_rdid,
8429 .probe_timing = TIMING_ZERO,
8430 .block_erasers =
8431 {
8432 {
8433 .eraseblocks = { {4 * 1024, 65536} },
8434 .block_erase = spi_block_erase_21,
8435 }, {
8436 .eraseblocks = { {4 * 1024, 65536} },
8437 .block_erase = spi_block_erase_20,
8438 }, {
8439 .eraseblocks = { {32 * 1024, 8192} },
8440 .block_erase = spi_block_erase_5c,
8441 }, {
8442 .eraseblocks = { {32 * 1024, 8192} },
8443 .block_erase = spi_block_erase_52,
8444 }, {
8445 .eraseblocks = { {64 * 1024, 4096} },
8446 .block_erase = spi_block_erase_dc,
8447 }, {
8448 .eraseblocks = { {64 * 1024, 4096} },
8449 .block_erase = spi_block_erase_d8,
8450 }, {
8451 .eraseblocks = { {256 * 1024 * 1024, 1} },
8452 .block_erase = spi_block_erase_60,
8453 }, {
8454 .eraseblocks = { {256 * 1024 * 1024, 1} },
8455 .block_erase = spi_block_erase_c7,
8456 }
8457 },
8458 /* Has WPS bit in unsupported register. */
Naresh Solanki768cfc42024-10-04 20:17:34 +05308459 .printlock = spi_prettyprint_status_register_bp4_srwd,
8460 .unlock = spi_disable_blockprotect_bp4_srwd,
8461 .write = spi_chip_write_256,
8462 .read = spi_chip_read,
8463 .voltage = {1650, 2000},
8464 .prepare_access = spi_prepare_io,
8465 .finish_access = spi_finish_io,
8466 },
8467
8468 {
8469 .vendor = "GigaDevice",
Nico Huber38d037f2024-11-08 18:25:55 +01008470 .name = "GD55LB02GF",
8471 .bustype = BUS_SPI,
8472 .manufacture_id = GIGADEVICE_ID,
8473 .model_id = GIGADEVICE_GD55LB02GF,
8474 .total_size = 256 * 1024,
8475 .page_size = 256,
8476 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
8477 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
8478 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
8479 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
8480 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8481 .tested = TEST_UNTESTED,
8482 .probe = probe_spi_rdid,
8483 .probe_timing = TIMING_ZERO,
8484 .block_erasers =
8485 {
8486 {
8487 .eraseblocks = { {4 * 1024, 65536} },
8488 .block_erase = spi_block_erase_21,
8489 }, {
8490 .eraseblocks = { {4 * 1024, 65536} },
8491 .block_erase = spi_block_erase_20,
8492 }, {
8493 .eraseblocks = { {32 * 1024, 8192} },
8494 .block_erase = spi_block_erase_52,
8495 }, {
8496 .eraseblocks = { {32 * 1024, 8192} },
8497 .block_erase = spi_block_erase_5c,
8498 }, {
8499 .eraseblocks = { {64 * 1024, 4096} },
8500 .block_erase = spi_block_erase_dc,
8501 }, {
8502 .eraseblocks = { {64 * 1024, 4096} },
8503 .block_erase = spi_block_erase_d8,
8504 }, {
8505 .eraseblocks = { {256 * 1024 * 1024, 1} },
8506 .block_erase = spi_block_erase_60,
8507 }, {
8508 .eraseblocks = { {256 * 1024 * 1024, 1} },
8509 .block_erase = spi_block_erase_c7,
8510 }
8511 },
8512 .printlock = spi_prettyprint_status_register_bp4_srwd,
8513 .unlock = spi_disable_blockprotect_bp4_srwd,
8514 .write = spi_chip_write_256,
8515 .read = spi_chip_read,
8516 .voltage = {1650, 2000},
8517 .reg_bits =
8518 {
8519 .qe = {STATUS2, 1, RW}, /* Fixed QE=1 */
8520 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
8521 .srp = {STATUS1, 7, RW},
8522 .srl = {STATUS2, 0, RW},
8523 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8524 .tb = {STATUS1, 6, RW},
8525 .cmp = {STATUS2, 6, RW},
8526 },
8527 .wp_write_cfg = spi_wp_write_cfg,
8528 .wp_read_cfg = spi_wp_read_cfg,
8529 .wp_get_ranges = spi_wp_get_available_ranges,
8530 .decode_range = decode_range_spi25,
8531 .prepare_access = spi_prepare_io,
8532 .finish_access = spi_finish_io,
8533 },
8534
8535 {
8536 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008537 .name = "GD25Q10",
8538 .bustype = BUS_SPI,
8539 .manufacture_id = GIGADEVICE_ID,
8540 .model_id = GIGADEVICE_GD25Q10,
8541 .total_size = 128,
8542 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01008543 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008544 .tested = TEST_UNTESTED,
8545 .probe = probe_spi_rdid,
8546 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10008547 .block_erasers =
8548 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008549 {
8550 .eraseblocks = { {4 * 1024, 32} },
8551 .block_erase = spi_block_erase_20,
8552 }, {
8553 .eraseblocks = { {32 * 1024, 4} },
8554 .block_erase = spi_block_erase_52,
8555 }, {
8556 .eraseblocks = { {64 * 1024, 2} },
8557 .block_erase = spi_block_erase_d8,
8558 }, {
8559 .eraseblocks = { {128 * 1024, 1} },
8560 .block_erase = spi_block_erase_60,
8561 }, {
8562 .eraseblocks = { {128 * 1024, 1} },
8563 .block_erase = spi_block_erase_c7,
8564 }
8565 },
Nico Huber4da971f2024-03-27 01:18:12 +01008566 .reg_bits =
8567 {
8568 .qe = {STATUS2, 1, RW},
8569 },
Stefan Tauner12f3d512014-05-27 21:27:27 +00008570 .printlock = spi_prettyprint_status_register_bp4_srwd,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008571 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8572 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008573 .read = spi_chip_read,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008574 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008575 .prepare_access = spi_prepare_io,
8576 .finish_access = spi_finish_io,
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00008577 },
8578
8579 {
8580 .vendor = "GigaDevice",
Nico Huber6ee2f892024-10-27 12:15:50 +01008581 .name = "GD25Q127C/GD25B127D",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008582 .bustype = BUS_SPI,
8583 .manufacture_id = GIGADEVICE_ID,
8584 .model_id = GIGADEVICE_GD25Q128,
8585 .total_size = 16384,
8586 .page_size = 256,
8587 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
Nico Huber6ee2f892024-10-27 12:15:50 +01008588 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
8589 FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03008590 .tested = TEST_OK_PREWB,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008591 .probe = probe_spi_rdid,
8592 .probe_timing = TIMING_ZERO,
8593 .block_erasers =
8594 {
8595 {
8596 .eraseblocks = { {4 * 1024, 4096} },
8597 .block_erase = spi_block_erase_20,
8598 }, {
8599 .eraseblocks = { {32 * 1024, 512} },
8600 .block_erase = spi_block_erase_52,
8601 }, {
8602 .eraseblocks = { {64 * 1024, 256} },
8603 .block_erase = spi_block_erase_d8,
8604 }, {
8605 .eraseblocks = { {16 * 1024 * 1024, 1} },
8606 .block_erase = spi_block_erase_60,
8607 }, {
8608 .eraseblocks = { {16 * 1024 * 1024, 1} },
8609 .block_erase = spi_block_erase_c7,
8610 }
8611 },
8612 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
8613 .printlock = spi_prettyprint_status_register_bp4_srwd,
8614 .unlock = spi_disable_blockprotect_bp4_srwd,
8615 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01008616 .read = spi_chip_read,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008617 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008618 .reg_bits =
8619 {
Nico Huber4da971f2024-03-27 01:18:12 +01008620 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008621 .srp = {STATUS1, 7, RW},
8622 .srl = {STATUS2, 0, RW},
8623 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8624 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8625 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8626 .cmp = {STATUS2, 6, RW},
8627 },
Nico Huberaabb3e02023-01-13 00:22:30 +01008628 .wp_write_cfg = spi_wp_write_cfg,
8629 .wp_read_cfg = spi_wp_read_cfg,
8630 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11008631 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008632 .prepare_access = spi_prepare_io,
8633 .finish_access = spi_finish_io,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00008634 },
8635
8636 {
8637 .vendor = "GigaDevice",
Nico Huber6ee2f892024-10-27 12:15:50 +01008638 .name = "GD25Q128B/GD25B128B",
8639 .bustype = BUS_SPI,
8640 .manufacture_id = GIGADEVICE_ID,
8641 .model_id = GIGADEVICE_GD25Q128,
8642 .total_size = 16384,
8643 .page_size = 256,
8644 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
8645 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
8646 .tested = TEST_OK_PREW,
8647 .probe = probe_spi_rdid,
8648 .probe_timing = TIMING_ZERO,
8649 .block_erasers =
8650 {
8651 {
8652 .eraseblocks = { {4 * 1024, 4096} },
8653 .block_erase = spi_block_erase_20,
8654 }, {
8655 .eraseblocks = { {32 * 1024, 512} },
8656 .block_erase = spi_block_erase_52,
8657 }, {
8658 .eraseblocks = { {64 * 1024, 256} },
8659 .block_erase = spi_block_erase_d8,
8660 }, {
8661 .eraseblocks = { {16 * 1024 * 1024, 1} },
8662 .block_erase = spi_block_erase_60,
8663 }, {
8664 .eraseblocks = { {16 * 1024 * 1024, 1} },
8665 .block_erase = spi_block_erase_c7,
8666 }
8667 },
8668 .printlock = spi_prettyprint_status_register_bp4_srwd,
8669 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8670 .write = spi_chip_write_256,
8671 .read = spi_chip_read,
8672 .voltage = {2700, 3600},
8673 .reg_bits =
8674 {
8675 .qe = {STATUS2, 1, RW}, /* GD25B128B: Fixed QE=1 */
8676 .srp = {STATUS1, 7, RW},
8677 .srl = {STATUS2, 0, RW},
8678 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8679 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8680 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8681 .cmp = {STATUS2, 6, RW},
8682 },
8683 .wp_write_cfg = spi_wp_write_cfg,
8684 .wp_read_cfg = spi_wp_read_cfg,
8685 .wp_get_ranges = spi_wp_get_available_ranges,
8686 .decode_range = decode_range_spi25,
8687 .prepare_access = spi_prepare_io,
8688 .finish_access = spi_finish_io,
8689 },
8690
8691 {
8692 .vendor = "GigaDevice",
Nico Huber68573af2024-01-06 18:28:22 +01008693 .name = "GD25Q128C",
8694 .bustype = BUS_SPI,
8695 .manufacture_id = GIGADEVICE_ID,
8696 .model_id = GIGADEVICE_GD25Q128,
8697 .total_size = 16384,
8698 .page_size = 256,
8699 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
Nico Huber6ee2f892024-10-27 12:15:50 +01008700 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
8701 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber68573af2024-01-06 18:28:22 +01008702 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
8703 .tested = TEST_OK_PREWB,
8704 .probe = probe_spi_rdid,
8705 .probe_timing = TIMING_ZERO,
8706 .block_erasers =
8707 {
8708 {
8709 .eraseblocks = { {4 * 1024, 4096} },
8710 .block_erase = spi_block_erase_20,
8711 }, {
8712 .eraseblocks = { {32 * 1024, 512} },
8713 .block_erase = spi_block_erase_52,
8714 }, {
8715 .eraseblocks = { {64 * 1024, 256} },
8716 .block_erase = spi_block_erase_d8,
8717 }, {
8718 .eraseblocks = { {16 * 1024 * 1024, 1} },
8719 .block_erase = spi_block_erase_60,
8720 }, {
8721 .eraseblocks = { {16 * 1024 * 1024, 1} },
8722 .block_erase = spi_block_erase_c7,
8723 }
8724 },
8725 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
8726 .printlock = spi_prettyprint_status_register_bp4_srwd,
8727 .unlock = spi_disable_blockprotect_bp4_srwd,
8728 .write = spi_chip_write_256,
8729 .read = spi_chip_read,
8730 .voltage = {2700, 3600},
8731 .reg_bits =
8732 {
8733 .qe = {STATUS2, 1, RW},
8734 .srp = {STATUS1, 7, RW},
8735 .srl = {STATUS2, 0, RW},
8736 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8737 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8738 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8739 .cmp = {STATUS2, 6, RW},
Nico Huber284d55b2025-02-26 23:37:49 +01008740 .wps = {STATUS3, 2, RW},
Nico Huber68573af2024-01-06 18:28:22 +01008741 },
Nico Huber2a1036b2024-10-20 23:19:49 +02008742 .wp_write_cfg = spi_wp_write_cfg,
8743 .wp_read_cfg = spi_wp_read_cfg,
8744 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber68573af2024-01-06 18:28:22 +01008745 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008746 .prepare_access = spi_prepare_io,
8747 .finish_access = spi_finish_io,
Nico Huber68573af2024-01-06 18:28:22 +01008748 },
8749
8750 {
8751 .vendor = "GigaDevice",
Nico Huber6ee2f892024-10-27 12:15:50 +01008752 .name = "GD25Q128E/GD25B128E/GD25R128E/GD25Q128H/GD25B128H",
8753 .bustype = BUS_SPI,
8754 .manufacture_id = GIGADEVICE_ID,
8755 .model_id = GIGADEVICE_GD25Q128,
8756 .total_size = 16384,
8757 .page_size = 256,
8758 /* OTP: 1536B total; read 0x48; write 0x42, erase 0x44 */
8759 /* Supports full QIO but has a non-volatile DC bit. */
8760 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
8761 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
8762 .tested = TEST_UNTESTED,
8763 .probe = probe_spi_rdid,
8764 .probe_timing = TIMING_ZERO,
8765 .block_erasers =
8766 {
8767 {
8768 .eraseblocks = { {4 * 1024, 4096} },
8769 .block_erase = spi_block_erase_20,
8770 }, {
8771 .eraseblocks = { {32 * 1024, 512} },
8772 .block_erase = spi_block_erase_52,
8773 }, {
8774 .eraseblocks = { {64 * 1024, 256} },
8775 .block_erase = spi_block_erase_d8,
8776 }, {
8777 .eraseblocks = { {16 * 1024 * 1024, 1} },
8778 .block_erase = spi_block_erase_60,
8779 }, {
8780 .eraseblocks = { {16 * 1024 * 1024, 1} },
8781 .block_erase = spi_block_erase_c7,
8782 }
8783 },
8784 /* TODO: 2nd status reg (read 0x35, write 0x31) and 3rd status reg (read 0x15, write 0x11) */
8785 .printlock = spi_prettyprint_status_register_bp4_srwd,
8786 .unlock = spi_disable_blockprotect_bp4_srwd,
8787 .write = spi_chip_write_256,
8788 .read = spi_chip_read,
8789 .voltage = {2700, 3600},
8790 .reg_bits =
8791 {
8792 .qe = {STATUS2, 1, RW}, /* GD25B/R: Fixed QE=1 */
8793 .dc = {{STATUS3, 0, RW}},
8794 .srp = {STATUS1, 7, RW},
8795 .srl = {STATUS2, 0, RW},
8796 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
8797 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
8798 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
8799 .cmp = {STATUS2, 6, RW},
8800 },
8801 .wp_write_cfg = spi_wp_write_cfg,
8802 .wp_read_cfg = spi_wp_read_cfg,
8803 .wp_get_ranges = spi_wp_get_available_ranges,
8804 .decode_range = decode_range_spi25,
8805 .prepare_access = spi_prepare_io,
8806 .finish_access = spi_finish_io,
8807 },
8808
8809 {
8810 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10008811 .name = "GD25Q16(B)",
8812 .bustype = BUS_SPI,
8813 .manufacture_id = GIGADEVICE_ID,
8814 .model_id = GIGADEVICE_GD25Q16,
8815 .total_size = 2048,
8816 .page_size = 256,
8817 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01008818 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008819 .tested = TEST_OK_PREW,
8820 .probe = probe_spi_rdid,
8821 .probe_timing = TIMING_ZERO,
8822 .block_erasers =
8823 {
8824 {
8825 .eraseblocks = { {4 * 1024, 512} },
8826 .block_erase = spi_block_erase_20,
8827 }, {
8828 .eraseblocks = { {32 * 1024, 64} },
8829 .block_erase = spi_block_erase_52,
8830 }, {
8831 .eraseblocks = { {64 * 1024, 32} },
8832 .block_erase = spi_block_erase_d8,
8833 }, {
8834 .eraseblocks = { {2 * 1024 * 1024, 1} },
8835 .block_erase = spi_block_erase_60,
8836 }, {
8837 .eraseblocks = { {2 * 1024 * 1024, 1} },
8838 .block_erase = spi_block_erase_c7,
8839 }
8840 },
Nico Huber4da971f2024-03-27 01:18:12 +01008841 .reg_bits =
8842 {
8843 .qe = {STATUS2, 1, RW},
8844 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10008845 .printlock = spi_prettyprint_status_register_bp4_srwd,
8846 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8847 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008848 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008849 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008850 .prepare_access = spi_prepare_io,
8851 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008852 },
8853
8854 {
8855 .vendor = "GigaDevice",
8856 .name = "GD25Q20(B)",
8857 .bustype = BUS_SPI,
8858 .manufacture_id = GIGADEVICE_ID,
8859 .model_id = GIGADEVICE_GD25Q20,
8860 .total_size = 256,
8861 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01008862 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008863 .tested = TEST_OK_PREW,
8864 .probe = probe_spi_rdid,
8865 .probe_timing = TIMING_ZERO,
8866 .block_erasers =
8867 {
8868 {
8869 .eraseblocks = { {4 * 1024, 64} },
8870 .block_erase = spi_block_erase_20,
8871 }, {
8872 .eraseblocks = { {32 * 1024, 8} },
8873 .block_erase = spi_block_erase_52,
8874 }, {
8875 .eraseblocks = { {64 * 1024, 4} },
8876 .block_erase = spi_block_erase_d8,
8877 }, {
8878 .eraseblocks = { {256 * 1024, 1} },
8879 .block_erase = spi_block_erase_60,
8880 }, {
8881 .eraseblocks = { {256 * 1024, 1} },
8882 .block_erase = spi_block_erase_c7,
8883 }
8884 },
Nico Huber4da971f2024-03-27 01:18:12 +01008885 .reg_bits = {
8886 .qe = {STATUS2, 1, RW},
8887 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10008888 .printlock = spi_prettyprint_status_register_bp4_srwd,
8889 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
8890 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01008891 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008892 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02008893 .prepare_access = spi_prepare_io,
8894 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10008895 },
8896
8897 {
8898 .vendor = "GigaDevice",
Nico Huber493a4e02024-10-27 15:15:26 +01008899 .name = "GD25Q256D/GD25B256D",
Alan Green86fc9cf2019-08-26 15:02:12 +10008900 .bustype = BUS_SPI,
8901 .manufacture_id = GIGADEVICE_ID,
8902 .model_id = GIGADEVICE_GD25Q256D,
8903 .total_size = 32768,
8904 .page_size = 256,
Nico Huber493a4e02024-10-27 15:15:26 +01008905 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_4BA |
Nico Huber4da971f2024-03-27 01:18:12 +01008906 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
8907 FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03008908 .tested = TEST_OK_PREWB,
Alan Green86fc9cf2019-08-26 15:02:12 +10008909 .probe = probe_spi_rdid,
8910 .probe_timing = TIMING_ZERO,
8911 .block_erasers =
8912 {
8913 {
8914 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber5374dc32019-10-04 16:16:15 +02008915 .block_erase = spi_block_erase_21,
8916 }, {
8917 .eraseblocks = { {4 * 1024, 8192} },
Alan Green86fc9cf2019-08-26 15:02:12 +10008918 .block_erase = spi_block_erase_20,
8919 }, {
8920 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber5374dc32019-10-04 16:16:15 +02008921 .block_erase = spi_block_erase_5c,
8922 }, {
8923 .eraseblocks = { {32 * 1024, 1024} },
Alan Green86fc9cf2019-08-26 15:02:12 +10008924 .block_erase = spi_block_erase_52,
8925 }, {
8926 .eraseblocks = { {64 * 1024, 512} },
Nico Huber5374dc32019-10-04 16:16:15 +02008927 .block_erase = spi_block_erase_dc,
8928 }, {
8929 .eraseblocks = { {64 * 1024, 512} },
Alan Green86fc9cf2019-08-26 15:02:12 +10008930 .block_erase = spi_block_erase_d8,
8931 }, {
8932 .eraseblocks = { {32 * 1024 * 1024, 1} },
8933 .block_erase = spi_block_erase_60,
8934 }, {
8935 .eraseblocks = { {32 * 1024 * 1024, 1} },
8936 .block_erase = spi_block_erase_c7,
8937 }
8938 },
Nico Huber493a4e02024-10-27 15:15:26 +01008939 .printlock = spi_prettyprint_status_register_bp4_srwd,
8940 .unlock = spi_disable_blockprotect_bp4_srwd,
Alan Green86fc9cf2019-08-26 15:02:12 +10008941 .write = spi_chip_write_256,
8942 .read = spi_chip_read,
8943 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11008944 .reg_bits =
8945 {
Nico Huber493a4e02024-10-27 15:15:26 +01008946 .qe = {STATUS2, 1, RW}, /* GD25B256D: Fixed QE=1 */
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11008947 .srp = {STATUS1, 7, RW},
8948 .srl = {STATUS2, 6, RW},
8949 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
8950 .tb = {STATUS1, 6, RW},
8951 },
Nico Huberaabb3e02023-01-13 00:22:30 +01008952 .wp_write_cfg = spi_wp_write_cfg,
8953 .wp_read_cfg = spi_wp_read_cfg,
8954 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11008955 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02008956 .prepare_access = spi_prepare_io,
8957 .finish_access = spi_finish_io,
Alan Green86fc9cf2019-08-26 15:02:12 +10008958 },
8959
8960 {
8961 .vendor = "GigaDevice",
Nico Huber493a4e02024-10-27 15:15:26 +01008962 .name = "GD25Q257D/GD25B257D",
8963 .bustype = BUS_SPI,
8964 .manufacture_id = GIGADEVICE_ID,
8965 .model_id = GIGADEVICE_GD25Q256D,
8966 .total_size = 32768,
8967 .page_size = 256,
8968 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
8969 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
8970 .tested = TEST_UNTESTED,
8971 .probe = probe_spi_rdid,
8972 .probe_timing = TIMING_ZERO,
8973 .block_erasers =
8974 {
8975 {
8976 .eraseblocks = { {4 * 1024, 8192} },
8977 .block_erase = spi_block_erase_21,
8978 }, {
8979 .eraseblocks = { {4 * 1024, 8192} },
8980 .block_erase = spi_block_erase_20,
8981 }, {
8982 .eraseblocks = { {32 * 1024, 1024} },
8983 .block_erase = spi_block_erase_5c,
8984 }, {
8985 .eraseblocks = { {32 * 1024, 1024} },
8986 .block_erase = spi_block_erase_52,
8987 }, {
8988 .eraseblocks = { {64 * 1024, 512} },
8989 .block_erase = spi_block_erase_dc,
8990 }, {
8991 .eraseblocks = { {64 * 1024, 512} },
8992 .block_erase = spi_block_erase_d8,
8993 }, {
8994 .eraseblocks = { {32 * 1024 * 1024, 1} },
8995 .block_erase = spi_block_erase_60,
8996 }, {
8997 .eraseblocks = { {32 * 1024 * 1024, 1} },
8998 .block_erase = spi_block_erase_c7,
8999 }
9000 },
9001 .printlock = spi_prettyprint_status_register_bp4_srwd,
9002 .unlock = spi_disable_blockprotect_bp4_srwd,
9003 .write = spi_chip_write_256,
9004 .read = spi_chip_read,
9005 .voltage = {2700, 3600},
9006 .reg_bits =
9007 {
9008 .qe = {STATUS2, 1, RW}, /* GD25B257D: Fixed QE=1 */
9009 .srp = {STATUS1, 7, RW},
9010 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9011 .tb = {STATUS1, 6, RW},
9012 },
9013 .wp_write_cfg = spi_wp_write_cfg,
9014 .wp_read_cfg = spi_wp_read_cfg,
9015 .wp_get_ranges = spi_wp_get_available_ranges,
9016 .decode_range = decode_range_spi25,
9017 .prepare_access = spi_prepare_io,
9018 .finish_access = spi_finish_io,
9019 },
9020
9021 {
9022 .vendor = "GigaDevice",
9023 .name = "GD25Q256E/GD25B256E/GD25R256E",
9024 .bustype = BUS_SPI,
9025 .manufacture_id = GIGADEVICE_ID,
9026 .model_id = GIGADEVICE_GD25Q256D,
9027 .total_size = 32768,
9028 .page_size = 256,
9029 /* Supports full QIO but has non-volatile DC bits. */
9030 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
9031 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ |
9032 FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
9033 .tested = TEST_UNTESTED,
9034 .probe = probe_spi_rdid,
9035 .probe_timing = TIMING_ZERO,
9036 .block_erasers =
9037 {
9038 {
9039 .eraseblocks = { {4 * 1024, 8192} },
9040 .block_erase = spi_block_erase_21,
9041 }, {
9042 .eraseblocks = { {4 * 1024, 8192} },
9043 .block_erase = spi_block_erase_20,
9044 }, {
9045 .eraseblocks = { {32 * 1024, 1024} },
9046 .block_erase = spi_block_erase_5c,
9047 }, {
9048 .eraseblocks = { {32 * 1024, 1024} },
9049 .block_erase = spi_block_erase_52,
9050 }, {
9051 .eraseblocks = { {64 * 1024, 512} },
9052 .block_erase = spi_block_erase_dc,
9053 }, {
9054 .eraseblocks = { {64 * 1024, 512} },
9055 .block_erase = spi_block_erase_d8,
9056 }, {
9057 .eraseblocks = { {32 * 1024 * 1024, 1} },
9058 .block_erase = spi_block_erase_60,
9059 }, {
9060 .eraseblocks = { {32 * 1024 * 1024, 1} },
9061 .block_erase = spi_block_erase_c7,
9062 }
9063 },
9064 .printlock = spi_prettyprint_status_register_bp4_srwd,
9065 .unlock = spi_disable_blockprotect_bp4_srwd,
9066 .write = spi_chip_write_256,
9067 .read = spi_chip_read,
9068 .voltage = {2700, 3600},
9069 .reg_bits =
9070 {
9071 .qe = {STATUS2, 1, RW}, /* GD25B/R: Fixed QE=1 */
9072 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9073 .srp = {STATUS1, 7, RW},
9074 .srl = {STATUS2, 6, RW},
9075 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9076 .tb = {STATUS1, 6, RW},
9077 },
9078 .wp_write_cfg = spi_wp_write_cfg,
9079 .wp_read_cfg = spi_wp_read_cfg,
9080 .wp_get_ranges = spi_wp_get_available_ranges,
9081 .decode_range = decode_range_spi25,
9082 .prepare_access = spi_prepare_io,
9083 .finish_access = spi_finish_io,
9084 },
9085
9086 {
9087 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009088 .name = "GD25Q32(B)",
9089 .bustype = BUS_SPI,
9090 .manufacture_id = GIGADEVICE_ID,
9091 .model_id = GIGADEVICE_GD25Q32,
9092 .total_size = 4096,
9093 .page_size = 256,
9094 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009095 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03009096 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009097 .probe = probe_spi_rdid,
9098 .probe_timing = TIMING_ZERO,
9099 .block_erasers =
9100 {
9101 {
9102 .eraseblocks = { {4 * 1024, 1024} },
9103 .block_erase = spi_block_erase_20,
9104 }, {
9105 .eraseblocks = { {32 * 1024, 128} },
9106 .block_erase = spi_block_erase_52,
9107 }, {
9108 .eraseblocks = { {64 * 1024, 64} },
9109 .block_erase = spi_block_erase_d8,
9110 }, {
9111 .eraseblocks = { {4 * 1024 * 1024, 1} },
9112 .block_erase = spi_block_erase_60,
9113 }, {
9114 .eraseblocks = { {4 * 1024 * 1024, 1} },
9115 .block_erase = spi_block_erase_c7,
9116 }
9117 },
9118 .printlock = spi_prettyprint_status_register_bp4_srwd,
9119 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9120 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009121 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009122 .voltage = {2700, 3600},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11009123 .reg_bits =
9124 {
Nico Huber4da971f2024-03-27 01:18:12 +01009125 .qe = {STATUS2, 1, RW},
Nikolai Artemievc6c3f282021-10-20 23:34:15 +11009126 .srp = {STATUS1, 7, RW},
9127 .srl = {STATUS2, 0, RW},
9128 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
9129 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
9130 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
9131 .cmp = {STATUS2, 6, RW},
9132 },
Nico Huberaabb3e02023-01-13 00:22:30 +01009133 .wp_write_cfg = spi_wp_write_cfg,
9134 .wp_read_cfg = spi_wp_read_cfg,
9135 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievc9feb1b2021-10-21 01:35:13 +11009136 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02009137 .prepare_access = spi_prepare_io,
9138 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009139 },
9140
9141 {
9142 .vendor = "GigaDevice",
9143 .name = "GD25Q40(B)",
9144 .bustype = BUS_SPI,
9145 .manufacture_id = GIGADEVICE_ID,
9146 .model_id = GIGADEVICE_GD25Q40,
9147 .total_size = 512,
9148 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01009149 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Simon Buhrow551664c2022-03-09 16:09:08 +01009150 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009151 .probe = probe_spi_rdid,
9152 .probe_timing = TIMING_ZERO,
9153 .block_erasers =
9154 {
9155 {
9156 .eraseblocks = { {4 * 1024, 128} },
9157 .block_erase = spi_block_erase_20,
9158 }, {
9159 .eraseblocks = { {32 * 1024, 16} },
9160 .block_erase = spi_block_erase_52,
9161 }, {
9162 .eraseblocks = { {64 * 1024, 8} },
9163 .block_erase = spi_block_erase_d8,
9164 }, {
9165 .eraseblocks = { {512 * 1024, 1} },
9166 .block_erase = spi_block_erase_60,
9167 }, {
9168 .eraseblocks = { {512 * 1024, 1} },
9169 .block_erase = spi_block_erase_c7,
9170 }
9171 },
Nico Huber4da971f2024-03-27 01:18:12 +01009172 .reg_bits =
9173 {
9174 .qe = {STATUS2, 1, RW},
9175 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009176 .printlock = spi_prettyprint_status_register_bp4_srwd,
9177 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9178 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009179 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009180 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009181 .prepare_access = spi_prepare_io,
9182 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009183 },
9184
9185 {
9186 .vendor = "GigaDevice",
9187 .name = "GD25Q512",
9188 .bustype = BUS_SPI,
9189 .manufacture_id = GIGADEVICE_ID,
9190 .model_id = GIGADEVICE_GD25Q512,
9191 .total_size = 64,
9192 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01009193 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009194 .tested = TEST_OK_PREW,
9195 .probe = probe_spi_rdid,
9196 .probe_timing = TIMING_ZERO,
9197 .block_erasers =
9198 {
9199 {
9200 .eraseblocks = { {4 * 1024, 16} },
9201 .block_erase = spi_block_erase_20,
9202 }, {
9203 .eraseblocks = { {32 * 1024, 2} },
9204 .block_erase = spi_block_erase_52,
9205 }, {
9206 .eraseblocks = { {64 * 1024, 1} },
9207 .block_erase = spi_block_erase_60,
9208 }, {
9209 .eraseblocks = { {64 * 1024, 1} },
9210 .block_erase = spi_block_erase_c7,
9211 }
9212 },
Nico Huber4da971f2024-03-27 01:18:12 +01009213 .reg_bits =
9214 {
9215 .qe = {STATUS2, 1, RW},
9216 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009217 .printlock = spi_prettyprint_status_register_bp4_srwd,
9218 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9219 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009220 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009221 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009222 .prepare_access = spi_prepare_io,
9223 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009224 },
9225
9226 {
9227 .vendor = "GigaDevice",
9228 .name = "GD25Q64(B)",
9229 .bustype = BUS_SPI,
9230 .manufacture_id = GIGADEVICE_ID,
9231 .model_id = GIGADEVICE_GD25Q64,
9232 .total_size = 8192,
9233 .page_size = 256,
9234 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009235 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +03009236 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009237 .probe = probe_spi_rdid,
9238 .probe_timing = TIMING_ZERO,
9239 .block_erasers =
9240 {
9241 {
9242 .eraseblocks = { {4 * 1024, 2048} },
9243 .block_erase = spi_block_erase_20,
9244 }, {
9245 .eraseblocks = { {32 * 1024, 256} },
9246 .block_erase = spi_block_erase_52,
9247 }, {
9248 .eraseblocks = { {64 * 1024, 128} },
9249 .block_erase = spi_block_erase_d8,
9250 }, {
9251 .eraseblocks = { {8 * 1024 * 1024, 1} },
9252 .block_erase = spi_block_erase_60,
9253 }, {
9254 .eraseblocks = { {8 * 1024 * 1024, 1} },
9255 .block_erase = spi_block_erase_c7,
9256 }
9257 },
9258 .printlock = spi_prettyprint_status_register_bp4_srwd,
9259 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9260 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009261 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009262 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11009263 .reg_bits =
9264 {
Nico Huber4da971f2024-03-27 01:18:12 +01009265 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11009266 .srp = {STATUS1, 7, RW},
9267 .srl = {STATUS2, 0, RW},
9268 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
9269 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
9270 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
9271 .cmp = {STATUS2, 6, RW},
9272 },
Nico Huberaabb3e02023-01-13 00:22:30 +01009273 .wp_write_cfg = spi_wp_write_cfg,
9274 .wp_read_cfg = spi_wp_read_cfg,
9275 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +11009276 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +02009277 .prepare_access = spi_prepare_io,
9278 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009279 },
9280
9281 {
9282 .vendor = "GigaDevice",
9283 .name = "GD25Q80(B)",
9284 .bustype = BUS_SPI,
9285 .manufacture_id = GIGADEVICE_ID,
9286 .model_id = GIGADEVICE_GD25Q80,
9287 .total_size = 1024,
9288 .page_size = 256,
9289 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (B version only) */
Nico Huber4da971f2024-03-27 01:18:12 +01009290 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009291 .tested = TEST_OK_PREW,
9292 .probe = probe_spi_rdid,
9293 .probe_timing = TIMING_ZERO,
9294 .block_erasers =
9295 {
9296 {
9297 .eraseblocks = { {4 * 1024, 256} },
9298 .block_erase = spi_block_erase_20,
9299 }, {
9300 .eraseblocks = { {32 * 1024, 32} },
9301 .block_erase = spi_block_erase_52,
9302 }, {
9303 .eraseblocks = { {64 * 1024, 16} },
9304 .block_erase = spi_block_erase_d8,
9305 }, {
9306 .eraseblocks = { {1024 * 1024, 1} },
9307 .block_erase = spi_block_erase_60,
9308 }, {
9309 .eraseblocks = { {1024 * 1024, 1} },
9310 .block_erase = spi_block_erase_c7,
9311 }
9312 },
Nico Huber4da971f2024-03-27 01:18:12 +01009313 .reg_bits =
9314 {
9315 .qe = {STATUS2, 1, RW},
9316 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009317 .printlock = spi_prettyprint_status_register_bp4_srwd,
9318 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9319 .write = spi_chip_write_256,
Nico Huber4da971f2024-03-27 01:18:12 +01009320 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009321 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009322 .prepare_access = spi_prepare_io,
9323 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009324 },
9325
9326 {
9327 .vendor = "GigaDevice",
Nico Huber565471c2024-11-08 13:07:52 +01009328 .name = "GD25B512ME/GD25R512ME",
9329 .bustype = BUS_SPI,
9330 .manufacture_id = GIGADEVICE_ID,
9331 .model_id = GIGADEVICE_GD25B512ME,
9332 .total_size = 65536,
9333 .page_size = 256,
9334 /* Supports QPI_38, but with non-volatile DC bits
9335 (which probably also affect QIO (0xeb) in SPI mode). */
9336 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_OTP |
9337 FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_FAST_READ_QOUT,
9338 .tested = TEST_UNTESTED,
9339 .probe = probe_spi_rdid,
9340 .probe_timing = TIMING_ZERO,
9341 .block_erasers =
9342 {
9343 {
9344 .eraseblocks = { {4 * 1024, 16384} },
9345 .block_erase = spi_block_erase_21,
9346 }, {
9347 .eraseblocks = { {4 * 1024, 16384} },
9348 .block_erase = spi_block_erase_20,
9349 }, {
9350 .eraseblocks = { {32 * 1024, 2048} },
9351 .block_erase = spi_block_erase_5c,
9352 }, {
9353 .eraseblocks = { {32 * 1024, 2048} },
9354 .block_erase = spi_block_erase_52,
9355 }, {
9356 .eraseblocks = { {64 * 1024, 1024} },
9357 .block_erase = spi_block_erase_dc,
9358 }, {
9359 .eraseblocks = { {64 * 1024, 1024} },
9360 .block_erase = spi_block_erase_d8,
9361 }, {
9362 .eraseblocks = { {65536 * 1024, 1} },
9363 .block_erase = spi_block_erase_60,
9364 }, {
9365 .eraseblocks = { {65536 * 1024, 1} },
9366 .block_erase = spi_block_erase_c7,
9367 }
9368 },
9369 /* Has WPS bit in unsupported register. */
9370 .printlock = spi_prettyprint_status_register_bp4_srwd,
9371 .unlock = spi_disable_blockprotect_bp4_srwd,
9372 .write = spi_chip_write_256,
9373 .read = spi_chip_read,
9374 .voltage = {2700, 3600},
9375 .wp_write_cfg = spi_wp_write_cfg,
9376 .wp_read_cfg = spi_wp_read_cfg,
9377 .wp_get_ranges = spi_wp_get_available_ranges,
9378 .decode_range = decode_range_spi25,
9379 .prepare_access = spi_prepare_io,
9380 .finish_access = spi_finish_io,
9381 },
9382
9383 {
9384 .vendor = "GigaDevice",
Nico Huber6d728e62024-11-08 13:07:52 +01009385 .name = "GD25B512MF/GD25R512MF",
9386 .bustype = BUS_SPI,
9387 .manufacture_id = GIGADEVICE_ID,
9388 .model_id = GIGADEVICE_GD25B512MF,
9389 .total_size = 65536,
9390 .page_size = 256,
9391 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
9392 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9393 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
9394 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
9395 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
9396 .tested = TEST_UNTESTED,
9397 .probe = probe_spi_rdid,
9398 .probe_timing = TIMING_ZERO,
9399 .block_erasers =
9400 {
9401 {
9402 .eraseblocks = { {4 * 1024, 16384} },
9403 .block_erase = spi_block_erase_21,
9404 }, {
9405 .eraseblocks = { {4 * 1024, 16384} },
9406 .block_erase = spi_block_erase_20,
9407 }, {
9408 .eraseblocks = { {32 * 1024, 2048} },
9409 .block_erase = spi_block_erase_5c,
9410 }, {
9411 .eraseblocks = { {32 * 1024, 2048} },
9412 .block_erase = spi_block_erase_52,
9413 }, {
9414 .eraseblocks = { {64 * 1024, 1024} },
9415 .block_erase = spi_block_erase_dc,
9416 }, {
9417 .eraseblocks = { {64 * 1024, 1024} },
9418 .block_erase = spi_block_erase_d8,
9419 }, {
9420 .eraseblocks = { {65536 * 1024, 1} },
9421 .block_erase = spi_block_erase_60,
9422 }, {
9423 .eraseblocks = { {65536 * 1024, 1} },
9424 .block_erase = spi_block_erase_c7,
9425 }
9426 },
9427 .printlock = spi_prettyprint_status_register_bp4_srwd,
9428 .unlock = spi_disable_blockprotect_bp4_srwd,
9429 .write = spi_chip_write_256,
9430 .read = spi_chip_read,
9431 .voltage = {2700, 3600},
9432 .reg_bits =
9433 {
9434 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
9435 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9436 .srp = {STATUS1, 7, RW},
9437 .srl = {STATUS2, 6, RW},
9438 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9439 .tb = {STATUS1, 6, RW},
9440 .cmp = {STATUS3, 3, RW},
9441 },
9442 .wp_write_cfg = spi_wp_write_cfg,
9443 .wp_read_cfg = spi_wp_read_cfg,
9444 .wp_get_ranges = spi_wp_get_available_ranges,
9445 .decode_range = decode_range_spi25,
9446 .prepare_access = spi_prepare_io,
9447 .finish_access = spi_finish_io,
9448 },
9449
9450 {
9451 .vendor = "GigaDevice",
Nico Huber565471c2024-11-08 13:07:52 +01009452 .name = "GD55B01GE",
9453 .bustype = BUS_SPI,
9454 .manufacture_id = GIGADEVICE_ID,
9455 .model_id = GIGADEVICE_GD55B01GE,
9456 .total_size = 128 * 1024,
9457 .page_size = 256,
9458 /* Supports QPI_38, but with non-volatile DC bits
9459 (which probably also affect QIO (0xeb) in SPI mode). */
9460 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_OTP |
9461 FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_FAST_READ_QOUT,
9462 .tested = TEST_UNTESTED,
9463 .probe = probe_spi_rdid,
9464 .probe_timing = TIMING_ZERO,
9465 .block_erasers =
9466 {
9467 {
9468 .eraseblocks = { {4 * 1024, 32768} },
9469 .block_erase = spi_block_erase_21,
9470 }, {
9471 .eraseblocks = { {4 * 1024, 32768} },
9472 .block_erase = spi_block_erase_20,
9473 }, {
9474 .eraseblocks = { {32 * 1024, 4096} },
9475 .block_erase = spi_block_erase_5c,
9476 }, {
9477 .eraseblocks = { {32 * 1024, 4096} },
9478 .block_erase = spi_block_erase_52,
9479 }, {
9480 .eraseblocks = { {64 * 1024, 2048} },
9481 .block_erase = spi_block_erase_dc,
9482 }, {
9483 .eraseblocks = { {64 * 1024, 2048} },
9484 .block_erase = spi_block_erase_d8,
9485 }, {
9486 .eraseblocks = { {128 * 1024 * 1024, 1} },
9487 .block_erase = spi_block_erase_60,
9488 }, {
9489 .eraseblocks = { {128 * 1024 * 1024, 1} },
9490 .block_erase = spi_block_erase_c7,
9491 }
9492 },
9493 /* Has WPS bit in unsupported register. */
9494 .printlock = spi_prettyprint_status_register_bp4_srwd,
9495 .unlock = spi_disable_blockprotect_bp4_srwd,
9496 .write = spi_chip_write_256,
9497 .read = spi_chip_read,
9498 .voltage = {2700, 3600},
9499 .wp_write_cfg = spi_wp_write_cfg,
9500 .wp_read_cfg = spi_wp_read_cfg,
9501 .wp_get_ranges = spi_wp_get_available_ranges,
9502 .decode_range = decode_range_spi25,
9503 .prepare_access = spi_prepare_io,
9504 .finish_access = spi_finish_io,
9505 },
9506
9507 {
9508 .vendor = "GigaDevice",
Nico Huber6d728e62024-11-08 13:07:52 +01009509 .name = "GD55B01GF",
9510 .bustype = BUS_SPI,
9511 .manufacture_id = GIGADEVICE_ID,
9512 .model_id = GIGADEVICE_GD55B01GF,
9513 .total_size = 128 * 1024,
9514 .page_size = 256,
9515 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
9516 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9517 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
9518 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
9519 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
9520 .tested = TEST_UNTESTED,
9521 .probe = probe_spi_rdid,
9522 .probe_timing = TIMING_ZERO,
9523 .block_erasers =
9524 {
9525 {
9526 .eraseblocks = { {4 * 1024, 32768} },
9527 .block_erase = spi_block_erase_21,
9528 }, {
9529 .eraseblocks = { {4 * 1024, 32768} },
9530 .block_erase = spi_block_erase_20,
9531 }, {
9532 .eraseblocks = { {32 * 1024, 4096} },
9533 .block_erase = spi_block_erase_5c,
9534 }, {
9535 .eraseblocks = { {32 * 1024, 4096} },
9536 .block_erase = spi_block_erase_52,
9537 }, {
9538 .eraseblocks = { {64 * 1024, 2048} },
9539 .block_erase = spi_block_erase_dc,
9540 }, {
9541 .eraseblocks = { {64 * 1024, 2048} },
9542 .block_erase = spi_block_erase_d8,
9543 }, {
9544 .eraseblocks = { {128 * 1024 * 1024, 1} },
9545 .block_erase = spi_block_erase_60,
9546 }, {
9547 .eraseblocks = { {128 * 1024 * 1024, 1} },
9548 .block_erase = spi_block_erase_c7,
9549 }
9550 },
9551 .printlock = spi_prettyprint_status_register_bp4_srwd,
9552 .unlock = spi_disable_blockprotect_bp4_srwd,
9553 .write = spi_chip_write_256,
9554 .read = spi_chip_read,
9555 .voltage = {2700, 3600},
9556 .reg_bits =
9557 {
9558 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
9559 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9560 .srp = {STATUS1, 7, RW},
9561 .srl = {STATUS2, 6, RW},
9562 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9563 .tb = {STATUS1, 6, RW},
9564 .cmp = {STATUS3, 3, RW},
9565 },
9566 .wp_write_cfg = spi_wp_write_cfg,
9567 .wp_read_cfg = spi_wp_read_cfg,
9568 .wp_get_ranges = spi_wp_get_available_ranges,
9569 .decode_range = decode_range_spi25,
9570 .prepare_access = spi_prepare_io,
9571 .finish_access = spi_finish_io,
9572 },
9573
9574 {
9575 .vendor = "GigaDevice",
Nico Huber565471c2024-11-08 13:07:52 +01009576 .name = "GD55B02GE",
9577 .bustype = BUS_SPI,
9578 .manufacture_id = GIGADEVICE_ID,
9579 .model_id = GIGADEVICE_GD55B02GE,
9580 .total_size = 256 * 1024,
9581 .page_size = 256,
9582 /* Supports QPI_38, but with non-volatile DC bits
9583 (which probably also affect QIO (0xeb) in SPI mode). */
9584 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_OTP |
9585 FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_FAST_READ_QOUT,
9586 .tested = TEST_UNTESTED,
9587 .probe = probe_spi_rdid,
9588 .probe_timing = TIMING_ZERO,
9589 .block_erasers =
9590 {
9591 {
9592 .eraseblocks = { {4 * 1024, 65536} },
9593 .block_erase = spi_block_erase_21,
9594 }, {
9595 .eraseblocks = { {4 * 1024, 65536} },
9596 .block_erase = spi_block_erase_20,
9597 }, {
9598 .eraseblocks = { {32 * 1024, 8192} },
9599 .block_erase = spi_block_erase_5c,
9600 }, {
9601 .eraseblocks = { {32 * 1024, 8192} },
9602 .block_erase = spi_block_erase_52,
9603 }, {
9604 .eraseblocks = { {64 * 1024, 4096} },
9605 .block_erase = spi_block_erase_dc,
9606 }, {
9607 .eraseblocks = { {64 * 1024, 4096} },
9608 .block_erase = spi_block_erase_d8,
9609 }, {
9610 .eraseblocks = { {256 * 1024 * 1024, 1} },
9611 .block_erase = spi_block_erase_60,
9612 }, {
9613 .eraseblocks = { {256 * 1024 * 1024, 1} },
9614 .block_erase = spi_block_erase_c7,
9615 }
9616 },
9617 /* Has WPS bit in unsupported register. */
9618 .printlock = spi_prettyprint_status_register_bp4_srwd,
9619 .unlock = spi_disable_blockprotect_bp4_srwd,
9620 .write = spi_chip_write_256,
9621 .read = spi_chip_read,
9622 .voltage = {2700, 3600},
9623 .wp_write_cfg = spi_wp_write_cfg,
9624 .wp_read_cfg = spi_wp_read_cfg,
9625 .wp_get_ranges = spi_wp_get_available_ranges,
9626 .decode_range = decode_range_spi25,
9627 .prepare_access = spi_prepare_io,
9628 .finish_access = spi_finish_io,
9629 },
9630
9631 {
9632 .vendor = "GigaDevice",
Nico Huber6d728e62024-11-08 13:07:52 +01009633 .name = "GD55B02GF",
9634 .bustype = BUS_SPI,
9635 .manufacture_id = GIGADEVICE_ID,
9636 .model_id = GIGADEVICE_GD55B02GF,
9637 .total_size = 256 * 1024,
9638 .page_size = 256,
9639 /* Has non-volatile DC bits which affect DIO and QIO in SPI mode. */
9640 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
9641 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B |
9642 (FEATURE_QPI_SRP & ~(FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO)),
9643 .dummy_cycles = { .qpi_read_params = { 4, 6, 8, 8 } },
9644 .tested = TEST_UNTESTED,
9645 .probe = probe_spi_rdid,
9646 .probe_timing = TIMING_ZERO,
9647 .block_erasers =
9648 {
9649 {
9650 .eraseblocks = { {4 * 1024, 65536} },
9651 .block_erase = spi_block_erase_21,
9652 }, {
9653 .eraseblocks = { {4 * 1024, 65536} },
9654 .block_erase = spi_block_erase_20,
9655 }, {
9656 .eraseblocks = { {32 * 1024, 8192} },
9657 .block_erase = spi_block_erase_5c,
9658 }, {
9659 .eraseblocks = { {32 * 1024, 8192} },
9660 .block_erase = spi_block_erase_52,
9661 }, {
9662 .eraseblocks = { {64 * 1024, 4096} },
9663 .block_erase = spi_block_erase_dc,
9664 }, {
9665 .eraseblocks = { {64 * 1024, 4096} },
9666 .block_erase = spi_block_erase_d8,
9667 }, {
9668 .eraseblocks = { {256 * 1024 * 1024, 1} },
9669 .block_erase = spi_block_erase_60,
9670 }, {
9671 .eraseblocks = { {256 * 1024 * 1024, 1} },
9672 .block_erase = spi_block_erase_c7,
9673 }
9674 },
9675 .printlock = spi_prettyprint_status_register_bp4_srwd,
9676 .unlock = spi_disable_blockprotect_bp4_srwd,
9677 .write = spi_chip_write_256,
9678 .read = spi_chip_read,
9679 .voltage = {2700, 3600},
9680 .reg_bits =
9681 {
9682 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
9683 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
9684 .srp = {STATUS1, 7, RW},
9685 .srl = {STATUS2, 6, RW},
9686 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
9687 .tb = {STATUS1, 6, RW},
9688 .cmp = {STATUS3, 3, RW},
9689 },
9690 .wp_write_cfg = spi_wp_write_cfg,
9691 .wp_read_cfg = spi_wp_read_cfg,
9692 .wp_get_ranges = spi_wp_get_available_ranges,
9693 .decode_range = decode_range_spi25,
9694 .prepare_access = spi_prepare_io,
9695 .finish_access = spi_finish_io,
9696 },
9697
9698 {
9699 .vendor = "GigaDevice",
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00009700 .name = "GD25T80",
9701 .bustype = BUS_SPI,
9702 .manufacture_id = GIGADEVICE_ID,
9703 .model_id = GIGADEVICE_GD25T80,
9704 .total_size = 1024,
9705 .page_size = 256,
9706 /* OTP: 256B total; enter 0x3A */
9707 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
9708 .tested = TEST_UNTESTED,
9709 .probe = probe_spi_rdid,
9710 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +10009711 .block_erasers =
9712 {
Nikolay Nikolaev3f3390b2013-06-28 21:28:56 +00009713 {
9714 .eraseblocks = { {4 * 1024, 256} },
9715 .block_erase = spi_block_erase_20,
9716 }, {
9717 .eraseblocks = { {64 * 1024, 16} },
9718 .block_erase = spi_block_erase_52,
9719 }, {
9720 .eraseblocks = { {64 * 1024, 16} },
9721 .block_erase = spi_block_erase_d8,
9722 }, {
9723 .eraseblocks = { {1024 * 1024, 1} },
9724 .block_erase = spi_block_erase_60,
9725 }, {
9726 .eraseblocks = { {1024 * 1024, 1} },
9727 .block_erase = spi_block_erase_c7,
9728 }
9729 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +00009730 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Justin Chevrier1525b2a2012-04-14 21:59:23 +00009731 .unlock = spi_disable_blockprotect,
9732 .write = spi_chip_write_256,
9733 .read = spi_chip_read,
Stefan Tauner352e50b2013-02-22 15:58:45 +00009734 .voltage = {2700, 3600},
Justin Chevrier1525b2a2012-04-14 21:59:23 +00009735 },
9736
9737 {
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009738 .vendor = "GigaDevice",
Alan Green1f9cc7d2019-07-01 11:10:45 +10009739 .name = "GD25VQ16C",
9740 .bustype = BUS_SPI,
9741 .manufacture_id = GIGADEVICE_ID,
9742 .model_id = GIGADEVICE_GD25VQ16C,
9743 .total_size = 2 * 1024,
9744 .page_size = 256,
9745 /* Supports SFDP */
9746 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009747 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009748 .tested = TEST_UNTESTED,
9749 .probe = probe_spi_rdid,
9750 .probe_timing = TIMING_ZERO,
9751 .block_erasers =
9752 {
9753 {
9754 .eraseblocks = { { 4 * 1024, 512} },
9755 .block_erase = spi_block_erase_20,
9756 }, {
9757 .eraseblocks = { { 32 * 1024, 64} },
9758 .block_erase = spi_block_erase_52,
9759 }, {
9760 .eraseblocks = { { 64 * 1024, 32} },
9761 .block_erase = spi_block_erase_d8,
9762 }, {
9763 .eraseblocks = { {2 * 1024 * 1024, 1} },
9764 .block_erase = spi_block_erase_60,
9765 }, {
9766 .eraseblocks = { {2 * 1024 * 1024, 1} },
9767 .block_erase = spi_block_erase_c7,
9768 }
9769 },
Nico Huber4da971f2024-03-27 01:18:12 +01009770 .reg_bits =
9771 {
9772 .qe = {STATUS2, 1, RW},
9773 },
Alan Green1f9cc7d2019-07-01 11:10:45 +10009774 .printlock = spi_prettyprint_status_register_bp4_srwd,
9775 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9776 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01009777 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009778 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009779 .prepare_access = spi_prepare_io,
9780 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +10009781 },
9782
9783 {
9784 .vendor = "GigaDevice",
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009785 .name = "GD25VQ21B",
9786 .bustype = BUS_SPI,
9787 .manufacture_id = GIGADEVICE_ID,
9788 .model_id = GIGADEVICE_GD25VQ21B,
9789 .total_size = 256,
9790 .page_size = 256,
9791 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009792 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
9793 FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009794 .tested = TEST_UNTESTED,
9795 .probe = probe_spi_rdid,
9796 .probe_timing = TIMING_ZERO,
9797 .block_erasers =
9798 {
9799 {
9800 .eraseblocks = { { 4 * 1024, 64} },
9801 .block_erase = spi_block_erase_20,
9802 }, {
9803 .eraseblocks = { { 32 * 1024, 8} },
9804 .block_erase = spi_block_erase_52,
9805 }, {
9806 .eraseblocks = { { 64 * 1024, 4} },
9807 .block_erase = spi_block_erase_d8,
9808 }, {
9809 .eraseblocks = { {256 * 1024, 1} },
9810 .block_erase = spi_block_erase_60,
9811 }, {
9812 .eraseblocks = { {256 * 1024, 1} },
9813 .block_erase = spi_block_erase_c7,
9814 }
9815 },
Nico Huber4da971f2024-03-27 01:18:12 +01009816 .reg_bits =
9817 {
9818 .qe = {STATUS2, 1, RW},
9819 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009820 .printlock = spi_prettyprint_status_register_bp4_srwd,
9821 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9822 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01009823 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009824 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009825 .prepare_access = spi_prepare_io,
9826 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009827 },
9828
9829 {
9830 .vendor = "GigaDevice",
9831 .name = "GD25VQ40C",
9832 .bustype = BUS_SPI,
9833 .manufacture_id = GIGADEVICE_ID,
9834 .model_id = GIGADEVICE_GD25VQ41B,
9835 .total_size = 512,
9836 .page_size = 256,
9837 /* Supports SFDP */
9838 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009839 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009840 .tested = TEST_UNTESTED,
9841 .probe = probe_spi_rdid,
9842 .probe_timing = TIMING_ZERO,
9843 .block_erasers =
9844 {
9845 {
9846 .eraseblocks = { { 4 * 1024, 128} },
9847 .block_erase = spi_block_erase_20,
9848 }, {
9849 .eraseblocks = { { 32 * 1024, 16} },
9850 .block_erase = spi_block_erase_52,
9851 }, {
9852 .eraseblocks = { { 64 * 1024, 8} },
9853 .block_erase = spi_block_erase_d8,
9854 }, {
9855 .eraseblocks = { {512 * 1024, 1} },
9856 .block_erase = spi_block_erase_60,
9857 }, {
9858 .eraseblocks = { {512 * 1024, 1} },
9859 .block_erase = spi_block_erase_c7,
9860 }
9861 },
Nico Huber4da971f2024-03-27 01:18:12 +01009862 .reg_bits =
9863 {
9864 .qe = {STATUS2, 1, RW},
9865 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009866 .printlock = spi_prettyprint_status_register_bp4_srwd,
9867 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9868 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01009869 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009870 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009871 .prepare_access = spi_prepare_io,
9872 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009873 },
9874
9875 {
9876 .vendor = "GigaDevice",
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009877 .name = "GD25VQ41B",
9878 .bustype = BUS_SPI,
9879 .manufacture_id = GIGADEVICE_ID,
9880 .model_id = GIGADEVICE_GD25VQ41B,
9881 .total_size = 512,
9882 .page_size = 256,
9883 /* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009884 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
9885 FEATURE_OTP | FEATURE_QIO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00009886 .tested = TEST_OK_PREW,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009887 .probe = probe_spi_rdid,
9888 .probe_timing = TIMING_ZERO,
Stefan Tauner0be072c2016-03-13 15:16:30 +00009889 .block_erasers =
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009890 {
Stefan Tauner0be072c2016-03-13 15:16:30 +00009891 {
9892 .eraseblocks = { { 4 * 1024, 128} },
9893 .block_erase = spi_block_erase_20,
9894 }, {
9895 .eraseblocks = { { 32 * 1024, 16} },
9896 .block_erase = spi_block_erase_52,
9897 }, {
9898 .eraseblocks = { { 64 * 1024, 8} },
9899 .block_erase = spi_block_erase_d8,
9900 }, {
9901 .eraseblocks = { {512 * 1024, 1} },
9902 .block_erase = spi_block_erase_60,
9903 }, {
9904 .eraseblocks = { {512 * 1024, 1} },
9905 .block_erase = spi_block_erase_c7,
9906 }
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009907 },
Nico Huber4da971f2024-03-27 01:18:12 +01009908 .reg_bits =
9909 {
9910 .qe = {STATUS2, 1, RW},
9911 },
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +00009912 .printlock = spi_prettyprint_status_register_bp4_srwd,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009913 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9914 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01009915 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009916 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009917 .prepare_access = spi_prepare_io,
9918 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009919 },
9920
9921 {
9922 .vendor = "GigaDevice",
9923 .name = "GD25VQ80C",
9924 .bustype = BUS_SPI,
9925 .manufacture_id = GIGADEVICE_ID,
9926 .model_id = GIGADEVICE_GD25VQ80C,
9927 .total_size = 1024,
9928 .page_size = 256,
9929 /* Supports SFDP */
9930 /* OTP: 1024B total; read 0x48, write 0x42, erase 0x44 */
Nico Huber4da971f2024-03-27 01:18:12 +01009931 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009932 .tested = TEST_UNTESTED,
9933 .probe = probe_spi_rdid,
9934 .probe_timing = TIMING_ZERO,
9935 .block_erasers =
9936 {
9937 {
9938 .eraseblocks = { { 4 * 1024, 256} },
9939 .block_erase = spi_block_erase_20,
9940 }, {
9941 .eraseblocks = { { 32 * 1024, 32} },
9942 .block_erase = spi_block_erase_52,
9943 }, {
9944 .eraseblocks = { { 64 * 1024, 16} },
9945 .block_erase = spi_block_erase_d8,
9946 }, {
9947 .eraseblocks = { {1024 * 1024, 1} },
9948 .block_erase = spi_block_erase_60,
9949 }, {
9950 .eraseblocks = { {1024 * 1024, 1} },
9951 .block_erase = spi_block_erase_c7,
9952 }
9953 },
Nico Huber4da971f2024-03-27 01:18:12 +01009954 .reg_bits =
9955 {
9956 .qe = {STATUS2, 1, RW},
9957 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009958 .printlock = spi_prettyprint_status_register_bp4_srwd,
9959 .unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
9960 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +01009961 .read = spi_chip_read,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009962 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +02009963 .prepare_access = spi_prepare_io,
9964 .finish_access = spi_finish_io,
Hatim Kanchwalad0595352016-03-06 14:33:49 +00009965 },
9966
9967 {
Dino Li3214f582020-03-25 17:39:53 +08009968 .vendor = "GigaDevice",
9969 .name = "GD25WQ80E",
9970 .bustype = BUS_SPI,
9971 .manufacture_id = GIGADEVICE_ID,
9972 .model_id = GIGADEVICE_GD25WQ80E,
9973 .total_size = 1024,
9974 .page_size = 256,
Nico Huber4da971f2024-03-27 01:18:12 +01009975 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Dino Li3214f582020-03-25 17:39:53 +08009976 .tested = TEST_OK_PREW,
9977 .probe = probe_spi_rdid,
9978 .probe_timing = TIMING_ZERO,
9979 .block_erasers =
9980 {
9981 {
9982 .eraseblocks = { {4 * 1024, 256} },
9983 .block_erase = spi_block_erase_20,
9984 }, {
9985 .eraseblocks = { {32 * 1024, 32} },
9986 .block_erase = spi_block_erase_52,
9987 }, {
9988 .eraseblocks = { {64 * 1024, 16} },
9989 .block_erase = spi_block_erase_d8,
9990 }, {
9991 .eraseblocks = { {1 * 1024 * 1024, 1} },
9992 .block_erase = spi_block_erase_60,
9993 }, {
9994 .eraseblocks = { {1 * 1024 * 1024, 1} },
9995 .block_erase = spi_block_erase_c7,
9996 }
9997 },
Nico Huber4da971f2024-03-27 01:18:12 +01009998 .reg_bits =
9999 {
10000 .qe = {STATUS2, 1, RW},
10001 },
Dino Li3214f582020-03-25 17:39:53 +080010002 .printlock = spi_prettyprint_status_register_bp4_srwd,
10003 .unlock = spi_disable_blockprotect_bp4_srwd,
10004 .write = spi_chip_write_256,
10005 .read = spi_chip_read,
10006 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010007 .prepare_access = spi_prepare_io,
10008 .finish_access = spi_finish_io,
Dino Li3214f582020-03-25 17:39:53 +080010009 },
10010
10011 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010012 .vendor = "Hyundai",
10013 .name = "HY29F002B",
10014 .bustype = BUS_PARALLEL,
10015 .manufacture_id = HYUNDAI_ID,
10016 .model_id = HYUNDAI_HY29F002B,
10017 .total_size = 256,
10018 .page_size = 256 * 1024,
10019 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Hatim Kanchwalad0595352016-03-06 14:33:49 +000010020 .tested = TEST_UNTESTED,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010021 .probe = probe_jedec,
10022 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Hatim Kanchwalad0595352016-03-06 14:33:49 +000010023 .block_erasers =
10024 {
10025 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010026 .eraseblocks = {
10027 {16 * 1024, 1},
10028 {8 * 1024, 2},
10029 {32 * 1024, 1},
10030 {64 * 1024, 3},
10031 },
10032 .block_erase = erase_sector_jedec,
Hatim Kanchwalad0595352016-03-06 14:33:49 +000010033 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010034 .eraseblocks = { {256 * 1024, 1} },
10035 .block_erase = erase_chip_block_jedec,
10036 },
Hatim Kanchwalad0595352016-03-06 14:33:49 +000010037 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100010038 .write = write_jedec_1,
10039 .read = read_memmapped,
10040 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010010041 .prepare_access = prepare_memory_access,
10042 .finish_access = finish_memory_access,
Hatim Kanchwalae0c7abf2016-02-21 00:21:11 +000010043 },
10044
10045 {
David Borgc96a8bd2010-06-21 16:12:22 +000010046 .vendor = "Hyundai",
10047 .name = "HY29F002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010048 .bustype = BUS_PARALLEL,
David Borgc96a8bd2010-06-21 16:12:22 +000010049 .manufacture_id = HYUNDAI_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000010050 .model_id = HYUNDAI_HY29F002T,
David Borgc96a8bd2010-06-21 16:12:22 +000010051 .total_size = 256,
10052 .page_size = 256 * 1024,
10053 .feature_bits = FEATURE_EITHER_RESET, /* Some revisions may need FEATURE_ADDR_2AA */
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000010054 .tested = TEST_OK_PRE,
David Borgc96a8bd2010-06-21 16:12:22 +000010055 .probe = probe_jedec,
10056 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10057 .block_erasers =
10058 {
10059 {
10060 .eraseblocks = {
10061 {64 * 1024, 3},
10062 {32 * 1024, 1},
10063 {8 * 1024, 2},
10064 {16 * 1024, 1},
10065 },
10066 .block_erase = erase_sector_jedec,
10067 }, {
10068 .eraseblocks = { {256 * 1024, 1} },
10069 .block_erase = erase_chip_block_jedec,
10070 },
10071 },
10072 .write = write_jedec_1,
10073 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000010074 .voltage = {4750, 5250}, /* 4.75-5.25V for type -45, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010010075 .prepare_access = prepare_memory_access,
10076 .finish_access = finish_memory_access,
David Borgc96a8bd2010-06-21 16:12:22 +000010077 },
10078
10079 {
10080 .vendor = "Hyundai",
Joshua Roysf1324e02010-09-16 00:51:51 +000010081 .name = "HY29F040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000010082 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +000010083 .manufacture_id = HYUNDAI_ID,
10084 .model_id = HYUNDAI_HY29F040A,
10085 .total_size = 512,
10086 .page_size = 64 * 1024,
10087 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
10088 .tested = TEST_UNTESTED,
10089 .probe = probe_jedec,
10090 .probe_timing = TIMING_ZERO,
10091 .block_erasers =
10092 {
10093 {
10094 .eraseblocks = { {64 * 1024, 8} },
10095 .block_erase = erase_sector_jedec,
10096 }, {
10097 .eraseblocks = { {512 * 1024, 1} },
10098 .block_erase = erase_chip_block_jedec,
10099 },
10100 },
10101 .write = write_jedec_1,
10102 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000010103 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010104 .prepare_access = prepare_memory_access,
10105 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +000010106 },
10107
10108 {
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010109 .vendor = "ISSI",
Angel Pons2ef47f32018-09-30 16:47:30 +020010110 .name = "IS25LP064",
10111 .bustype = BUS_SPI,
10112 .manufacture_id = ISSI_ID_SPI,
10113 .model_id = ISSI_IS25LP064,
10114 .total_size = 8192,
10115 .page_size = 256,
10116 /* OTP: 1024B total; read 0x48; write 0x42 */
10117 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Simon Buhrow9bf829d2021-10-20 17:09:09 +020010118 .tested = TEST_OK_PREW,
Angel Pons2ef47f32018-09-30 16:47:30 +020010119 .probe = probe_spi_rdid,
10120 .probe_timing = TIMING_ZERO,
10121 .block_erasers =
10122 {
10123 {
10124 .eraseblocks = { {4 * 1024, 2048} },
10125 .block_erase = spi_block_erase_20,
10126 }, {
10127 .eraseblocks = { {4 * 1024, 2048} },
10128 .block_erase = spi_block_erase_d7,
10129 }, {
10130 .eraseblocks = { {32 * 1024, 256} },
10131 .block_erase = spi_block_erase_52,
10132 }, {
10133 .eraseblocks = { {64 * 1024, 128} },
10134 .block_erase = spi_block_erase_d8,
10135 }, {
10136 .eraseblocks = { {8 * 1024 * 1024, 1} },
10137 .block_erase = spi_block_erase_60,
10138 }, {
10139 .eraseblocks = { {8 * 1024 * 1024, 1} },
10140 .block_erase = spi_block_erase_c7,
10141 }
10142 },
10143 .unlock = spi_disable_blockprotect,
10144 .write = spi_chip_write_256,
10145 .read = spi_chip_read,
10146 .voltage = {2300, 3600},
10147 },
10148
10149 {
10150 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -070010151 .name = "IS25LP128",
10152 .bustype = BUS_SPI,
10153 .manufacture_id = ISSI_ID_SPI,
10154 .model_id = ISSI_IS25LP128,
10155 .total_size = 16384,
10156 .page_size = 256,
10157 /* OTP: 1024B total; read 0x48; write 0x42 */
10158 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10159 .tested = TEST_OK_PREW,
10160 .probe = probe_spi_rdid,
10161 .probe_timing = TIMING_ZERO,
10162 .block_erasers =
10163 {
10164 {
10165 .eraseblocks = { {4 * 1024, 4096} },
10166 .block_erase = spi_block_erase_20,
10167 }, {
10168 .eraseblocks = { {4 * 1024, 4096} },
10169 .block_erase = spi_block_erase_d7,
10170 }, {
10171 .eraseblocks = { {32 * 1024, 512} },
10172 .block_erase = spi_block_erase_52,
10173 }, {
10174 .eraseblocks = { {64 * 1024, 256} },
10175 .block_erase = spi_block_erase_d8,
10176 }, {
10177 .eraseblocks = { {16 * 1024 * 1024, 1} },
10178 .block_erase = spi_block_erase_60,
10179 }, {
10180 .eraseblocks = { {16 * 1024 * 1024, 1} },
10181 .block_erase = spi_block_erase_c7,
10182 }
10183 },
10184 .unlock = spi_disable_blockprotect,
10185 .write = spi_chip_write_256,
10186 .read = spi_chip_read,
10187 .voltage = {2300, 3600},
10188 },
10189
10190 {
10191 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +000010192 .name = "IS25LP256",
10193 .bustype = BUS_SPI,
10194 .manufacture_id = ISSI_ID_SPI,
10195 .model_id = ISSI_IS25LP256,
10196 .total_size = 32768,
10197 .page_size = 256,
10198 /* supports SFDP */
10199 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +020010200 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
10201 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +000010202 .tested = TEST_OK_PREW,
10203 .probe = probe_spi_rdid,
10204 .probe_timing = TIMING_ZERO,
10205 .block_erasers =
10206 {
10207 {
10208 .eraseblocks = { {4 * 1024, 8192} },
10209 .block_erase = spi_block_erase_21,
10210 }, {
10211 .eraseblocks = { {4 * 1024, 8192} },
10212 .block_erase = spi_block_erase_20,
10213 /* could also use spi_block_erase_d7 */
10214 }, {
10215 .eraseblocks = { {32 * 1024, 1024} },
10216 .block_erase = spi_block_erase_5c,
10217 }, {
10218 .eraseblocks = { {32 * 1024, 1024} },
10219 .block_erase = spi_block_erase_52,
10220 }, {
10221 .eraseblocks = { {64 * 1024, 512} },
10222 .block_erase = spi_block_erase_dc,
10223 }, {
10224 .eraseblocks = { {64 * 1024, 512} },
10225 .block_erase = spi_block_erase_d8,
10226 }, {
10227 .eraseblocks = { {32 * 1024 * 1024, 1} },
10228 .block_erase = spi_block_erase_60,
10229 }, {
10230 .eraseblocks = { {32 * 1024 * 1024, 1} },
10231 .block_erase = spi_block_erase_c7,
10232 }
10233 },
10234 .unlock = spi_disable_blockprotect,
10235 .write = spi_chip_write_256,
10236 .read = spi_chip_read,
10237 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020010238 .prepare_access = spi_prepare_io,
10239 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +000010240 },
10241
10242 {
10243 .vendor = "ISSI",
Nico Huberb27b8d12018-10-02 20:46:21 +020010244 .name = "IS25WP032",
10245 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100010246 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +020010247 .model_id = ISSI_IS25WP032,
10248 .total_size = 4096,
10249 .page_size = 256,
10250 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010251 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
10252 dummy cycles; non-volatile read parameters, so disable for now */
10253 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +020010254 .tested = TEST_UNTESTED,
10255 .probe = probe_spi_rdid,
10256 .probe_timing = TIMING_ZERO,
10257 .block_erasers =
10258 {
10259 {
10260 .eraseblocks = { {4 * 1024, 1024} },
10261 .block_erase = spi_block_erase_20,
10262 }, {
10263 .eraseblocks = { {4 * 1024, 1024} },
10264 .block_erase = spi_block_erase_d7,
10265 }, {
10266 .eraseblocks = { {32 * 1024, 128} },
10267 .block_erase = spi_block_erase_52,
10268 }, {
10269 .eraseblocks = { {64 * 1024, 64} },
10270 .block_erase = spi_block_erase_d8,
10271 }, {
10272 .eraseblocks = { {4 * 1024 * 1024, 1} },
10273 .block_erase = spi_block_erase_60,
10274 }, {
10275 .eraseblocks = { {4 * 1024 * 1024, 1} },
10276 .block_erase = spi_block_erase_c7,
10277 }
10278 },
10279 .unlock = spi_disable_blockprotect,
10280 .write = spi_chip_write_256,
10281 .read = spi_chip_read,
10282 .voltage = {1650, 1950},
10283 },
10284
10285 {
10286 .vendor = "ISSI",
10287 .name = "IS25WP064",
10288 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100010289 .manufacture_id = ISSI_ID_SPI,
Nico Huberb27b8d12018-10-02 20:46:21 +020010290 .model_id = ISSI_IS25WP064,
10291 .total_size = 8192,
10292 .page_size = 256,
10293 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010294 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
10295 dummy cycles; non-volatile read parameters, so disable for now */
10296 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Nico Huberb27b8d12018-10-02 20:46:21 +020010297 .tested = TEST_OK_PREW,
10298 .probe = probe_spi_rdid,
10299 .probe_timing = TIMING_ZERO,
10300 .block_erasers =
10301 {
10302 {
10303 .eraseblocks = { {4 * 1024, 2048} },
10304 .block_erase = spi_block_erase_20,
10305 }, {
10306 .eraseblocks = { {4 * 1024, 2048} },
10307 .block_erase = spi_block_erase_d7,
10308 }, {
10309 .eraseblocks = { {32 * 1024, 256} },
10310 .block_erase = spi_block_erase_52,
10311 }, {
10312 .eraseblocks = { {64 * 1024, 128} },
10313 .block_erase = spi_block_erase_d8,
10314 }, {
10315 .eraseblocks = { {8 * 1024 * 1024, 1} },
10316 .block_erase = spi_block_erase_60,
10317 }, {
10318 .eraseblocks = { {8 * 1024 * 1024, 1} },
10319 .block_erase = spi_block_erase_c7,
10320 }
10321 },
10322 .unlock = spi_disable_blockprotect,
10323 .write = spi_chip_write_256,
10324 .read = spi_chip_read,
10325 .voltage = {1650, 1950},
10326 },
10327
10328 {
10329 .vendor = "ISSI",
David Hendricks3083ed92017-05-02 13:25:56 -070010330 .name = "IS25WP128",
10331 .bustype = BUS_SPI,
10332 .manufacture_id = ISSI_ID_SPI,
10333 .model_id = ISSI_IS25WP128,
10334 .total_size = 16384,
10335 .page_size = 256,
10336 /* OTP: 1024B total; read 0x48; write 0x42 */
Nico Huber1412d9f2024-01-06 18:25:49 +010010337 /* QPI: enter/exit 35/f5, SRP with 4 bits directly specifying
10338 dummy cycles; non-volatile read parameters, so disable for now */
10339 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
David Hendricks3083ed92017-05-02 13:25:56 -070010340 .tested = TEST_OK_PREW,
10341 .probe = probe_spi_rdid,
10342 .probe_timing = TIMING_ZERO,
10343 .block_erasers =
10344 {
10345 {
10346 .eraseblocks = { {4 * 1024, 4096} },
10347 .block_erase = spi_block_erase_20,
10348 }, {
10349 .eraseblocks = { {4 * 1024, 4096} },
10350 .block_erase = spi_block_erase_d7,
10351 }, {
10352 .eraseblocks = { {32 * 1024, 512} },
10353 .block_erase = spi_block_erase_52,
10354 }, {
10355 .eraseblocks = { {64 * 1024, 256} },
10356 .block_erase = spi_block_erase_d8,
10357 }, {
10358 .eraseblocks = { {16 * 1024 * 1024, 1} },
10359 .block_erase = spi_block_erase_60,
10360 }, {
10361 .eraseblocks = { {16 * 1024 * 1024, 1} },
10362 .block_erase = spi_block_erase_c7,
10363 }
10364 },
10365 .unlock = spi_disable_blockprotect,
10366 .write = spi_chip_write_256,
10367 .read = spi_chip_read,
10368 .voltage = {1650, 1950},
10369 },
10370
10371 {
10372 .vendor = "ISSI",
David Hendricks61818dc2018-10-28 01:02:21 +000010373 .name = "IS25WP256",
10374 .bustype = BUS_SPI,
10375 .manufacture_id = ISSI_ID_SPI,
10376 .model_id = ISSI_IS25WP256,
10377 .total_size = 32768,
10378 .page_size = 256,
10379 /* supports SFDP */
10380 /* OTP: 1024B total; read 0x68; write 0x62, erase 0x64, read ID 0x4B */
Nico Huberad55d5a2022-06-20 19:32:16 +020010381 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
10382 FEATURE_4BA | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
David Hendricks61818dc2018-10-28 01:02:21 +000010383 .tested = TEST_OK_PREW,
10384 .probe = probe_spi_rdid,
10385 .probe_timing = TIMING_ZERO,
10386 .block_erasers =
10387 {
10388 {
10389 .eraseblocks = { {4 * 1024, 8192} },
10390 .block_erase = spi_block_erase_21,
10391 }, {
10392 .eraseblocks = { {4 * 1024, 8192} },
10393 .block_erase = spi_block_erase_20,
10394 /* could also use spi_block_erase_d7 */
10395 }, {
10396 .eraseblocks = { {32 * 1024, 1024} },
10397 .block_erase = spi_block_erase_5c,
10398 }, {
10399 .eraseblocks = { {32 * 1024, 1024} },
10400 .block_erase = spi_block_erase_52,
10401 }, {
10402 .eraseblocks = { {64 * 1024, 512} },
10403 .block_erase = spi_block_erase_dc,
10404 }, {
10405 .eraseblocks = { {64 * 1024, 512} },
10406 .block_erase = spi_block_erase_d8,
10407 }, {
10408 .eraseblocks = { {32 * 1024 * 1024, 1} },
10409 .block_erase = spi_block_erase_60,
10410 }, {
10411 .eraseblocks = { {32 * 1024 * 1024, 1} },
10412 .block_erase = spi_block_erase_c7,
10413 }
10414 },
10415 .unlock = spi_disable_blockprotect,
10416 .write = spi_chip_write_256,
10417 .read = spi_chip_read,
10418 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020010419 .prepare_access = spi_prepare_io,
10420 .finish_access = spi_finish_io,
David Hendricks61818dc2018-10-28 01:02:21 +000010421 },
10422
10423 {
10424 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010425 .name = "IS29GL064B",
10426 .bustype = BUS_PARALLEL,
10427 .manufacture_id = ISSI_ID,
10428 .model_id = ISSI_PMC_IS29GL064B,
10429 .total_size = 8192,
10430 .page_size = 128 * 1024, /* actual page size is 16 */
10431 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10432 .tested = TEST_UNTESTED,
10433 .probe = probe_jedec_29gl,
10434 .probe_timing = TIMING_ZERO,
10435 .block_erasers =
10436 {
10437 {
10438 .eraseblocks = {
10439 {8 * 1024, 8},
10440 {64 * 1024, 127},
10441 },
10442 .block_erase = erase_sector_jedec,
10443 }, {
10444 .eraseblocks = { {8 * 1024 * 1024, 1} },
10445 .block_erase = erase_chip_block_jedec,
10446 },
10447 },
10448 .write = write_jedec_1,
10449 .read = read_memmapped,
10450 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010451 .prepare_access = prepare_memory_access,
10452 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010453 },
10454
10455 {
10456 .vendor = "ISSI",
Alan Green1f9cc7d2019-07-01 11:10:45 +100010457 .name = "IS29GL064H/L",
10458 .bustype = BUS_PARALLEL,
10459 .manufacture_id = ISSI_ID,
10460 .model_id = ISSI_PMC_IS29GL064HL,
10461 .total_size = 8192,
10462 .page_size = 128 * 1024, /* actual page size is 16 */
10463 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10464 .tested = TEST_UNTESTED,
10465 .probe = probe_jedec_29gl,
10466 .probe_timing = TIMING_ZERO,
10467 .block_erasers =
10468 {
10469 {
10470 .eraseblocks = { {64 * 1024, 128} },
10471 .block_erase = erase_sector_jedec,
10472 }, {
10473 .eraseblocks = { {8 * 1024 * 1024, 1} },
10474 .block_erase = erase_chip_block_jedec,
10475 },
10476 },
10477 .write = write_jedec_1,
10478 .read = read_memmapped,
10479 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010480 .prepare_access = prepare_memory_access,
10481 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010482 },
10483
10484 {
10485 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010486 .name = "IS29GL064T",
10487 .bustype = BUS_PARALLEL,
10488 .manufacture_id = ISSI_ID,
10489 .model_id = ISSI_PMC_IS29GL064T,
10490 .total_size = 8192,
10491 .page_size = 128 * 1024, /* actual page size is 16 */
10492 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10493 .tested = TEST_UNTESTED,
10494 .probe = probe_jedec_29gl,
10495 .probe_timing = TIMING_ZERO,
10496 .block_erasers =
10497 {
10498 {
10499 .eraseblocks = {
10500 {64 * 1024, 127},
10501 {8 * 1024, 8},
10502 },
10503 .block_erase = erase_sector_jedec,
10504 }, {
10505 .eraseblocks = { {8 * 1024 * 1024, 1} },
10506 .block_erase = erase_chip_block_jedec,
10507 },
10508 },
10509 .write = write_jedec_1,
10510 .read = read_memmapped,
10511 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010512 .prepare_access = prepare_memory_access,
10513 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010514 },
10515
10516 {
10517 .vendor = "ISSI",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010518 .name = "IS29GL128H/L",
10519 .bustype = BUS_PARALLEL,
10520 .manufacture_id = ISSI_ID,
10521 .model_id = ISSI_PMC_IS29GL128HL,
10522 .total_size = 16384,
10523 .page_size = 128 * 1024, /* actual page size is 16 */
10524 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
10525 .tested = TEST_UNTESTED,
10526 .probe = probe_jedec_29gl,
10527 .probe_timing = TIMING_ZERO,
10528 .block_erasers =
10529 {
10530 {
10531 .eraseblocks = { {128 * 1024, 128} },
10532 .block_erase = erase_sector_jedec,
10533 }, {
10534 .eraseblocks = { {16 * 1024 * 1024, 1} },
10535 .block_erase = erase_chip_block_jedec,
10536 },
10537 },
10538 .write = write_jedec_1,
10539 .read = read_memmapped,
10540 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010010541 .prepare_access = prepare_memory_access,
10542 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000010543 },
10544
10545 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100010546 .vendor = "Intel",
10547 .name = "25F160S33B8",
10548 .bustype = BUS_SPI,
10549 .manufacture_id = INTEL_ID,
10550 .model_id = INTEL_25F160S33B8,
10551 .total_size = 2048,
10552 .page_size = 256,
10553 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10554 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10555 .tested = TEST_UNTESTED,
10556 .probe = probe_spi_rdid,
10557 .probe_timing = TIMING_ZERO,
10558 .block_erasers =
10559 {
10560 {
10561 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10562 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10563 * have no effect on the memory contents, but sets a flag in the SR.
10564 .eraseblocks = {
10565 {8 * 1024, 8},
10566 {64 * 1024, 31} // inaccessible
10567 },
10568 .block_erase = spi_block_erase_40,
10569 }, { */
10570 .eraseblocks = { {64 * 1024, 32} },
10571 .block_erase = spi_block_erase_d8,
10572 }, {
10573 .eraseblocks = { {2 * 1024 * 1024, 1} },
10574 .block_erase = spi_block_erase_c7,
10575 }
10576 },
10577 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10578 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10579 .write = spi_chip_write_256,
10580 .read = spi_chip_read, /* also fast read 0x0B */
10581 .voltage = {2700, 3600},
10582 },
10583
10584 {
10585 .vendor = "Intel",
10586 .name = "25F160S33T8",
10587 .bustype = BUS_SPI,
10588 .manufacture_id = INTEL_ID,
10589 .model_id = INTEL_25F160S33T8,
10590 .total_size = 2048,
10591 .page_size = 256,
10592 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10593 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10594 .tested = TEST_UNTESTED,
10595 .probe = probe_spi_rdid,
10596 .probe_timing = TIMING_ZERO,
10597 .block_erasers =
10598 {
10599 {
10600 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10601 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10602 * have no effect on the memory contents, but sets a flag in the SR.
10603 .eraseblocks = {
10604 {64 * 1024, 31}, // inaccessible
10605 {8 * 1024, 8}
10606 },
10607 .block_erase = spi_block_erase_40,
10608 }, { */
10609 .eraseblocks = { {64 * 1024, 32} },
10610 .block_erase = spi_block_erase_d8,
10611 }, {
10612 .eraseblocks = { {2 * 1024 * 1024, 1} },
10613 .block_erase = spi_block_erase_c7,
10614 }
10615 },
10616 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10617 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10618 .write = spi_chip_write_256,
10619 .read = spi_chip_read, /* also fast read 0x0B */
10620 .voltage = {2700, 3600},
10621 },
10622
10623 {
10624 .vendor = "Intel",
10625 .name = "25F320S33B8",
10626 .bustype = BUS_SPI,
10627 .manufacture_id = INTEL_ID,
10628 .model_id = INTEL_25F320S33B8,
10629 .total_size = 4096,
10630 .page_size = 256,
10631 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10632 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10633 .tested = TEST_UNTESTED,
10634 .probe = probe_spi_rdid,
10635 .probe_timing = TIMING_ZERO,
10636 .block_erasers =
10637 {
10638 {
10639 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10640 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10641 * have no effect on the memory contents, but sets a flag in the SR.
10642 .eraseblocks = {
10643 {8 * 1024, 8},
10644 {64 * 1024, 63} // inaccessible
10645 },
10646 .block_erase = spi_block_erase_40,
10647 }, { */
10648 .eraseblocks = { {64 * 1024, 64} },
10649 .block_erase = spi_block_erase_d8,
10650 }, {
10651 .eraseblocks = { {4 * 1024 * 1024, 1} },
10652 .block_erase = spi_block_erase_c7,
10653 }
10654 },
10655 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10656 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10657 .write = spi_chip_write_256,
10658 .read = spi_chip_read, /* also fast read 0x0B */
10659 .voltage = {2700, 3600},
10660 },
10661
10662 {
10663 .vendor = "Intel",
10664 .name = "25F320S33T8",
10665 .bustype = BUS_SPI,
10666 .manufacture_id = INTEL_ID,
10667 .model_id = INTEL_25F320S33T8,
10668 .total_size = 4096,
10669 .page_size = 256,
10670 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10671 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10672 .tested = TEST_UNTESTED,
10673 .probe = probe_spi_rdid,
10674 .probe_timing = TIMING_ZERO,
10675 .block_erasers =
10676 {
10677 {
10678 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10679 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10680 * have no effect on the memory contents, but sets a flag in the SR.
10681 .eraseblocks = {
10682 {64 * 1024, 63}, // inaccessible
10683 {8 * 1024, 8}
10684 },
10685 .block_erase = spi_block_erase_40,
10686 }, { */
10687 .eraseblocks = { {64 * 1024, 64} },
10688 .block_erase = spi_block_erase_d8,
10689 }, {
10690 .eraseblocks = { {4 * 1024 * 1024, 1} },
10691 .block_erase = spi_block_erase_c7,
10692 }
10693 },
10694 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10695 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10696 .write = spi_chip_write_256,
10697 .read = spi_chip_read, /* also fast read 0x0B */
10698 .voltage = {2700, 3600},
10699 },
10700
10701 {
10702 .vendor = "Intel",
10703 .name = "25F640S33B8",
10704 .bustype = BUS_SPI,
10705 .manufacture_id = INTEL_ID,
10706 .model_id = INTEL_25F640S33B8,
10707 .total_size = 8192,
10708 .page_size = 256,
10709 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10710 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Zoltan HERPAIe0e8b2b2020-08-08 16:04:34 +020010711 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010712 .probe = probe_spi_rdid,
10713 .probe_timing = TIMING_ZERO,
10714 .block_erasers =
10715 {
10716 {
10717 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10718 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10719 * have no effect on the memory contents, but sets a flag in the SR.
10720 .eraseblocks = {
10721 {8 * 1024, 8},
10722 {64 * 1024, 127} // inaccessible
10723 },
10724 .block_erase = spi_block_erase_40,
10725 }, { */
10726 .eraseblocks = { {64 * 1024, 128} },
10727 .block_erase = spi_block_erase_d8,
10728 }, {
10729 .eraseblocks = { {8 * 1024 * 1024, 1} },
10730 .block_erase = spi_block_erase_c7,
10731 }
10732 },
10733 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10734 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10735 .write = spi_chip_write_256,
10736 .read = spi_chip_read, /* also fast read 0x0B */
10737 .voltage = {2700, 3600},
10738 },
10739
10740 {
10741 .vendor = "Intel",
10742 .name = "25F640S33T8",
10743 .bustype = BUS_SPI,
10744 .manufacture_id = INTEL_ID,
10745 .model_id = INTEL_25F640S33T8,
10746 .total_size = 8192,
10747 .page_size = 256,
10748 /* OTP: 506B total (2x 8B, 30x 16B, 1x 10B); read 0x4B; write 0x42 */
10749 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
10750 .tested = TEST_UNTESTED,
10751 .probe = probe_spi_rdid,
10752 .probe_timing = TIMING_ZERO,
10753 .block_erasers =
10754 {
10755 {
10756 /* This chip supports erasing of the 8 so-called "parameter blocks" with
10757 * opcode 0x40. Trying to access an address outside these 8 8kB blocks does
10758 * have no effect on the memory contents, but sets a flag in the SR.
10759 .eraseblocks = {
10760 {64 * 1024, 127}, // inaccessible
10761 {8 * 1024, 8}
10762 },
10763 .block_erase = spi_block_erase_40,
10764 }, { */
10765 .eraseblocks = { {64 * 1024, 128} },
10766 .block_erase = spi_block_erase_d8,
10767 }, {
10768 .eraseblocks = { {8 * 1024 * 1024, 1} },
10769 .block_erase = spi_block_erase_c7,
10770 }
10771 },
10772 .printlock = spi_prettyprint_status_register_bp2_ep_srwd,
10773 .unlock = spi_disable_blockprotect_bp2_ep_srwd,
10774 .write = spi_chip_write_256,
10775 .read = spi_chip_read, /* also fast read 0x0B */
10776 .voltage = {2700, 3600},
10777 },
10778
10779 {
10780 .vendor = "Intel",
10781 .name = "28F001BN/BX-B",
10782 .bustype = BUS_PARALLEL,
10783 .manufacture_id = INTEL_ID,
10784 .model_id = INTEL_28F001B,
10785 .total_size = 128,
10786 .page_size = 128 * 1024, /* 8k + 2x4k + 112k */
10787 .tested = TEST_UNTESTED,
10788 .probe = probe_jedec,
10789 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10790 .block_erasers =
10791 {
10792 {
10793 .eraseblocks = {
10794 {8 * 1024, 1},
10795 {4 * 1024, 2},
10796 {112 * 1024, 1},
10797 },
10798 .block_erase = erase_block_82802ab,
10799 },
10800 },
10801 .write = write_82802ab,
10802 .read = read_memmapped,
10803 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010804 .prepare_access = prepare_memory_access,
10805 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010806 },
10807
10808 {
10809 .vendor = "Intel",
10810 .name = "28F001BN/BX-T",
10811 .bustype = BUS_PARALLEL,
10812 .manufacture_id = INTEL_ID,
10813 .model_id = INTEL_28F001T,
10814 .total_size = 128,
10815 .page_size = 128 * 1024, /* 112k + 2x4k + 8k */
10816 .tested = TEST_OK_PREW,
10817 .probe = probe_jedec,
10818 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10819 .block_erasers =
10820 {
10821 {
10822 .eraseblocks = {
10823 {112 * 1024, 1},
10824 {4 * 1024, 2},
10825 {8 * 1024, 1},
10826 },
10827 .block_erase = erase_block_82802ab,
10828 },
10829 },
10830 .write = write_82802ab,
10831 .read = read_memmapped,
10832 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010010833 .prepare_access = prepare_memory_access,
10834 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010835 },
10836
10837 {
10838 .vendor = "Intel",
10839 .name = "28F002BC/BL/BV/BX-T",
10840 .bustype = BUS_PARALLEL,
10841 .manufacture_id = INTEL_ID,
10842 .model_id = INTEL_28F002T,
10843 .total_size = 256,
10844 .page_size = 256 * 1024,
10845 .tested = TEST_OK_PRE,
10846 .probe = probe_82802ab,
10847 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10848 .block_erasers =
10849 {
10850 {
10851 .eraseblocks = {
10852 {128 * 1024, 1},
10853 {96 * 1024, 1},
10854 {8 * 1024, 2},
10855 {16 * 1024, 1},
10856 },
10857 .block_erase = erase_block_82802ab,
10858 },
10859 },
10860 .write = write_82802ab,
10861 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010010862 .prepare_access = prepare_memory_access,
10863 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010864 },
10865
10866 {
10867 .vendor = "Intel",
10868 .name = "28F004B5/BE/BV/BX-B",
10869 .bustype = BUS_PARALLEL,
10870 .manufacture_id = INTEL_ID,
10871 .model_id = INTEL_28F004B,
10872 .total_size = 512,
10873 .page_size = 128 * 1024, /* maximal block size */
10874 .tested = TEST_UNTESTED,
10875 .probe = probe_82802ab,
10876 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10877 .block_erasers =
10878 {
10879 {
10880 .eraseblocks = {
10881 {16 * 1024, 1},
10882 {8 * 1024, 2},
10883 {96 * 1024, 1},
10884 {128 * 1024, 3},
10885 },
10886 .block_erase = erase_block_82802ab,
10887 },
10888 },
10889 .write = write_82802ab,
10890 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010010891 .prepare_access = prepare_memory_access,
10892 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010893 },
10894
10895 {
10896 .vendor = "Intel",
10897 .name = "28F004B5/BE/BV/BX-T",
10898 .bustype = BUS_PARALLEL,
10899 .manufacture_id = INTEL_ID,
10900 .model_id = INTEL_28F004T,
10901 .total_size = 512,
10902 .page_size = 128 * 1024, /* maximal block size */
10903 .tested = TEST_UNTESTED,
10904 .probe = probe_82802ab,
10905 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10906 .block_erasers =
10907 {
10908 {
10909 .eraseblocks = {
10910 {128 * 1024, 3},
10911 {96 * 1024, 1},
10912 {8 * 1024, 2},
10913 {16 * 1024, 1},
10914 },
10915 .block_erase = erase_block_82802ab,
10916 },
10917 },
10918 .write = write_82802ab,
10919 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010010920 .prepare_access = prepare_memory_access,
10921 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010922 },
10923
10924 {
10925 .vendor = "Intel",
10926 .name = "28F008S3/S5/SC",
10927 .bustype = BUS_PARALLEL,
10928 .manufacture_id = INTEL_ID,
10929 .model_id = INTEL_28F004S3,
10930 .total_size = 512,
10931 .page_size = 256,
10932 .tested = TEST_UNTESTED,
10933 .probe = probe_82802ab,
10934 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10935 .block_erasers =
10936 {
10937 {
10938 .eraseblocks = { {64 * 1024, 8} },
10939 .block_erase = erase_block_82802ab,
10940 },
10941 },
10942 .unlock = unlock_28f004s5,
10943 .write = write_82802ab,
10944 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010010945 .prepare_access = prepare_memory_access,
10946 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010947 },
10948
10949 {
10950 .vendor = "Intel",
10951 .name = "28F400BV/BX/CE/CV-B",
10952 .bustype = BUS_PARALLEL,
10953 .manufacture_id = INTEL_ID,
10954 .model_id = INTEL_28F400B,
10955 .total_size = 512,
10956 .page_size = 128 * 1024, /* maximal block size */
10957 .feature_bits = FEATURE_ADDR_SHIFTED,
10958 .tested = TEST_UNTESTED,
10959 .probe = probe_82802ab,
10960 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10961 .block_erasers =
10962 {
10963 {
10964 .eraseblocks = {
10965 {16 * 1024, 1},
10966 {8 * 1024, 2},
10967 {96 * 1024, 1},
10968 {128 * 1024, 3},
10969 },
10970 .block_erase = erase_block_82802ab,
10971 },
10972 },
10973 .write = write_82802ab,
10974 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010010975 .prepare_access = prepare_memory_access,
10976 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100010977 },
10978
10979 {
10980 .vendor = "Intel",
10981 .name = "28F400BV/BX/CE/CV-T",
10982 .bustype = BUS_PARALLEL,
10983 .manufacture_id = INTEL_ID,
10984 .model_id = INTEL_28F400T,
10985 .total_size = 512,
10986 .page_size = 128 * 1024, /* maximal block size */
10987 .feature_bits = FEATURE_ADDR_SHIFTED,
10988 .tested = TEST_UNTESTED,
10989 .probe = probe_82802ab,
10990 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
10991 .block_erasers =
10992 {
10993 {
10994 .eraseblocks = {
10995 {128 * 1024, 3},
10996 {96 * 1024, 1},
10997 {8 * 1024, 2},
10998 {16 * 1024, 1},
10999 },
11000 .block_erase = erase_block_82802ab,
11001 },
11002 },
11003 .write = write_82802ab,
11004 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010011005 .prepare_access = prepare_memory_access,
11006 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011007 },
11008
11009 {
11010 .vendor = "Intel",
11011 .name = "82802AB",
11012 .bustype = BUS_FWH,
11013 .manufacture_id = INTEL_ID,
11014 .model_id = INTEL_82802AB,
11015 .total_size = 512,
11016 .page_size = 64 * 1024,
Alan Green88552572019-07-24 13:56:06 +100011017 .tested = TEST_OK_PREW,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011018 .probe = probe_82802ab,
11019 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
11020 .block_erasers =
11021 {
11022 {
11023 .eraseblocks = { {64 * 1024, 8} },
11024 .block_erase = erase_block_82802ab,
11025 },
11026 },
11027 .unlock = unlock_regspace2_uniform_64k,
11028 .write = write_82802ab,
11029 .read = read_memmapped,
11030 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010011031 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010011032 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011033 },
11034
11035 {
11036 .vendor = "Intel",
11037 .name = "82802AC",
11038 .bustype = BUS_FWH,
11039 .manufacture_id = INTEL_ID,
11040 .model_id = INTEL_82802AC,
11041 .total_size = 1024,
11042 .page_size = 64 * 1024,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011043 .tested = TEST_OK_PR,
11044 .probe = probe_82802ab,
11045 .probe_timing = TIMING_IGNORED, /* routine does not use probe_timing (82802ab.c) */
11046 .block_erasers =
11047 {
11048 {
11049 .eraseblocks = { {64 * 1024, 16} },
11050 .block_erase = erase_block_82802ab,
11051 },
11052 },
11053 .unlock = unlock_regspace2_uniform_64k,
11054 .write = write_82802ab,
11055 .read = read_memmapped,
11056 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010011057 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010011058 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011059 },
11060
11061 {
11062 .vendor = "Macronix",
11063 .name = "MX23L12854",
11064 .bustype = BUS_SPI,
11065 .manufacture_id = MACRONIX_ID,
11066 .model_id = MACRONIX_MX23L12854,
11067 .total_size = 16384,
11068 .page_size = 256,
11069 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
11070 .probe = probe_spi_rdid,
11071 .probe_timing = TIMING_ZERO,
11072 .write = NULL, /* MX23L12854 is a mask ROM, so it is read-only */
11073 .read = spi_chip_read, /* Fast read (0x0B) supported */
11074 .voltage = {3000, 3600},
11075 },
11076
11077 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011078 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +000011079 .name = "MX23L1654",
11080 .bustype = BUS_SPI,
11081 .manufacture_id = MACRONIX_ID,
11082 .model_id = MACRONIX_MX23L1654,
11083 .total_size = 2048,
11084 .page_size = 256,
11085 .tested = {.probe = NT, .read = NT, .erase = NA, .write = NA},
11086 .probe = probe_spi_rdid,
11087 .probe_timing = TIMING_ZERO,
11088 .write = NULL, /* MX23L1654 is a mask ROM, so it is read-only */
11089 .read = spi_chip_read, /* Fast read (0x0B) supported */
11090 .voltage = {3000, 3600},
11091 },
11092
11093 {
11094 .vendor = "Macronix",
Michael Coppola4e7f36e2014-05-03 23:01:18 +000011095 .name = "MX23L3254",
11096 .bustype = BUS_SPI,
11097 .manufacture_id = MACRONIX_ID,
11098 .model_id = MACRONIX_MX23L3254,
11099 .total_size = 4096,
11100 .page_size = 256,
Stefan Tauner6455dff2014-05-26 00:36:24 +000011101 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola4e7f36e2014-05-03 23:01:18 +000011102 .probe = probe_spi_rdid,
11103 .probe_timing = TIMING_ZERO,
11104 .write = NULL, /* MX23L3254 is a mask ROM, so it is read-only */
11105 .read = spi_chip_read, /* Fast read (0x0B) supported */
11106 .voltage = {3000, 3600},
11107 },
11108
11109 {
11110 .vendor = "Macronix",
Michael Coppola583ea322014-08-20 18:56:35 +000011111 .name = "MX23L6454",
11112 .bustype = BUS_SPI,
11113 .manufacture_id = MACRONIX_ID,
11114 .model_id = MACRONIX_MX23L6454,
11115 .total_size = 8192,
11116 .page_size = 256,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011117 .tested = {.probe = OK, .read = OK, .erase = NA, .write = NA},
Michael Coppola583ea322014-08-20 18:56:35 +000011118 .probe = probe_spi_rdid,
11119 .probe_timing = TIMING_ZERO,
11120 .write = NULL, /* MX23L6454 is a mask ROM, so it is read-only */
11121 .read = spi_chip_read, /* Fast read (0x0B) supported */
11122 .voltage = {3000, 3600},
11123 },
11124
11125 {
11126 .vendor = "Macronix",
Stefan Taunerf656e802013-02-02 15:35:44 +000011127 .name = "MX25L1005(C)/MX25L1006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011128 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011129 .manufacture_id = MACRONIX_ID,
11130 .model_id = MACRONIX_MX25L1005,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011131 .total_size = 128,
11132 .page_size = 256,
Stefan Taunerf656e802013-02-02 15:35:44 +000011133 /* MX25L1006E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +010011134 /* FEATURE_FAST_READ_DOUT: MX25L1006E */
11135 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Stefan Taunerd7d423b2012-10-20 09:13:16 +000011136 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011137 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011138 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +000011139 .block_erasers =
11140 {
11141 {
11142 .eraseblocks = { {4 * 1024, 32} },
11143 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011144 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +000011145 .eraseblocks = { {64 * 1024, 2} },
11146 .block_erase = spi_block_erase_d8,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011147 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +000011148 .eraseblocks = { {128 * 1024, 1} },
11149 .block_erase = spi_block_erase_60,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011150 }, {
Carl-Daniel Hailfingerf38431a2009-09-05 02:30:58 +000011151 .eraseblocks = { {128 * 1024, 1} },
11152 .block_erase = spi_block_erase_c7,
11153 },
11154 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011155 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000011156 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011157 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011158 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011159 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011160 .prepare_access = spi_prepare_io,
11161 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000011162 },
11163
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011164 {
11165 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011166 .name = "MX25L12805D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011167 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011168 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011169 .model_id = MACRONIX_MX25L12805D,
11170 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011171 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011172 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011173 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011174 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011175 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011176 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011177 .block_erasers =
11178 {
11179 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011180 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011181 .block_erase = spi_block_erase_20,
11182 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011183 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011184 .block_erase = spi_block_erase_d8,
11185 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011186 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011187 .block_erase = spi_block_erase_60,
11188 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011189 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011190 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011191 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011192 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100011193 .printlock = spi_prettyprint_status_register_bp3_srwd,
11194 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011195 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011196 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011197 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000011198 },
11199
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011200 {
11201 .vendor = "Macronix",
Tao Xia571f6ad2021-07-21 16:41:53 +080011202 .name = "MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011203 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011204 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011205 .model_id = MACRONIX_MX25L12805D,
11206 .total_size = 16384,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011207 .page_size = 256,
Tao Xia571f6ad2021-07-21 16:41:53 +080011208 /* OTP: MX25L12833F has 1KB total, others have 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011209 /* *F versions: FEATURE_QPI_35 + DC bits (6, 4, 8, 10) in configuration register */
11210 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
11211 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stefan Tauner8179be52011-06-04 13:13:34 +000011212 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011213 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011214 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011215 .block_erasers =
11216 {
11217 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011218 .eraseblocks = { {4 * 1024, 4096} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011219 .block_erase = spi_block_erase_20,
11220 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011221 .eraseblocks = { {32 * 1024, 512} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011222 .block_erase = spi_block_erase_52,
11223 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011224 .eraseblocks = { {64 * 1024, 256} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011225 .block_erase = spi_block_erase_d8,
11226 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011227 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011228 .block_erase = spi_block_erase_60,
11229 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011230 .eraseblocks = { {16 * 1024 * 1024, 1} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011231 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011232 }
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011233 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100011234 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +010011235 .reg_bits =
11236 {
11237 .qe = {STATUS1, 6, RW},
11238 },
11239 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011240 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011241 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011242 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011243 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011244 .prepare_access = spi_prepare_io,
11245 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000011246 },
11247
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011248 {
11249 .vendor = "Macronix",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011250 .name = "MX25L1605",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011251 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011252 .manufacture_id = MACRONIX_ID,
11253 .model_id = MACRONIX_MX25L1605,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011254 .total_size = 2048,
11255 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +010011256 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Sven Schnelle4bd8a402011-03-07 10:59:06 +000011257 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011258 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011259 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011260 .block_erasers =
11261 {
11262 {
Stefan Tauner226037d2013-03-16 01:22:12 +000011263 .eraseblocks = { {64 * 1024, 32} },
11264 .block_erase = spi_block_erase_20,
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011265 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +000011266 .eraseblocks = { {64 * 1024, 32} },
11267 .block_erase = spi_block_erase_d8,
11268 }, {
11269 .eraseblocks = { {2 * 1024 * 1024, 1} },
11270 .block_erase = spi_block_erase_60,
11271 }, {
11272 .eraseblocks = { {2 * 1024 * 1024, 1} },
11273 .block_erase = spi_block_erase_c7,
11274 },
11275 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011276 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Stefan Tauner226037d2013-03-16 01:22:12 +000011277 .unlock = spi_disable_blockprotect,
11278 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011279 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000011280 .voltage = {2700, 3600},
11281 },
11282
11283 {
11284 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011285 .name = "MX25L1605A/MX25L1606E/MX25L1608E",
Stefan Tauner226037d2013-03-16 01:22:12 +000011286 .bustype = BUS_SPI,
11287 .manufacture_id = MACRONIX_ID,
11288 .model_id = MACRONIX_MX25L1605,
11289 .total_size = 2048,
11290 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011291 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L1606E and MX25L1608E only) */
Nico Huber46552c82024-03-27 01:18:12 +010011292 /* FEATURE_FAST_READ_DOUT: MX25L1606E & MX25L1608E */
11293 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +000011294 .tested = TEST_OK_PREW,
11295 .probe = probe_spi_rdid,
11296 .probe_timing = TIMING_ZERO,
11297 .block_erasers =
11298 {
11299 {
11300 .eraseblocks = { {4 * 1024, 512} },
11301 .block_erase = spi_block_erase_20,
11302 }, {
11303 .eraseblocks = { {64 * 1024, 32} },
Carl-Daniel Hailfinger40107122009-10-01 13:15:01 +000011304 .block_erase = spi_block_erase_52,
11305 }, {
11306 .eraseblocks = { {64 * 1024, 32} },
11307 .block_erase = spi_block_erase_d8,
11308 }, {
11309 .eraseblocks = { {2 * 1024 * 1024, 1} },
11310 .block_erase = spi_block_erase_60,
11311 }, {
11312 .eraseblocks = { {2 * 1024 * 1024, 1} },
11313 .block_erase = spi_block_erase_c7,
11314 },
11315 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011316 .printlock = spi_prettyprint_status_register_bp3_srwd, /* MX25L1605A bp2 only */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011317 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011318 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011319 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000011320 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011321 .prepare_access = spi_prepare_io,
11322 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +000011323 },
11324
11325 {
11326 .vendor = "Macronix",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011327 .name = "MX25L1605D/MX25L1608D/MX25L1673E",
Stefan Tauner226037d2013-03-16 01:22:12 +000011328 .bustype = BUS_SPI,
11329 .manufacture_id = MACRONIX_ID,
11330 .model_id = MACRONIX_MX25L1605,
11331 .total_size = 2048,
11332 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +010011333 /* FEATURE_QIO: MX25L1673E */
11334 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +000011335 .tested = TEST_OK_PREW,
11336 .probe = probe_spi_rdid,
11337 .probe_timing = TIMING_ZERO,
11338 .block_erasers =
11339 {
11340 {
11341 .eraseblocks = { {4 * 1024, 512} },
11342 .block_erase = spi_block_erase_20,
11343 }, {
11344 .eraseblocks = { {64 * 1024, 32} },
11345 .block_erase = spi_block_erase_d8,
11346 }, {
11347 .eraseblocks = { {2 * 1024 * 1024, 1} },
11348 .block_erase = spi_block_erase_60,
11349 }, {
11350 .eraseblocks = { {2 * 1024 * 1024, 1} },
11351 .block_erase = spi_block_erase_c7,
11352 },
11353 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011354 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: Continuously Program (CP) mode, for 73E is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011355 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000011356 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011357 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011358 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011359 .prepare_access = spi_prepare_io,
11360 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000011361 },
11362
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011363 {
11364 .vendor = "Macronix",
Stephan Guillouxf5c70902009-04-19 23:04:00 +000011365 .name = "MX25L1635D",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011366 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011367 .manufacture_id = MACRONIX_ID,
11368 .model_id = MACRONIX_MX25L1635D,
Stephan Guillouxf5c70902009-04-19 23:04:00 +000011369 .total_size = 2048,
11370 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +000011371 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011372 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
11373 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Angel Ponsc2054872021-01-15 18:57:32 +010011374 .tested = TEST_OK_PREW,
Stephan Guillouxf5c70902009-04-19 23:04:00 +000011375 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011376 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000011377 .block_erasers =
11378 {
11379 {
11380 .eraseblocks = { {4 * 1024, 512} },
11381 .block_erase = spi_block_erase_20,
11382 }, {
11383 .eraseblocks = { {64 * 1024, 32} },
11384 .block_erase = spi_block_erase_d8,
11385 }, {
11386 .eraseblocks = { {2 * 1024 * 1024, 1} },
11387 .block_erase = spi_block_erase_60,
11388 }, {
11389 .eraseblocks = { {2 * 1024 * 1024, 1} },
11390 .block_erase = spi_block_erase_c7,
11391 }
11392 },
Nico Huber46552c82024-03-27 01:18:12 +010011393 .reg_bits =
11394 {
11395 .qe = {STATUS1, 6, RW},
11396 },
11397 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000011398 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011399 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011400 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011401 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011402 .prepare_access = spi_prepare_io,
11403 .finish_access = spi_finish_io,
Stephan Guillouxf5c70902009-04-19 23:04:00 +000011404 },
Stephan Guillouxfd315502009-04-20 22:54:13 +000011405
Stephan Guillouxf5c70902009-04-19 23:04:00 +000011406 {
11407 .vendor = "Macronix",
Stephan Guilloux3611b802010-09-13 19:59:28 +000011408 .name = "MX25L1635E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011409 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011410 .manufacture_id = MACRONIX_ID,
11411 .model_id = MACRONIX_MX25L1635E,
Stephan Guilloux3611b802010-09-13 19:59:28 +000011412 .total_size = 2048,
11413 .page_size = 256,
Stefan Tauner226037d2013-03-16 01:22:12 +000011414 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011415 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
11416 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Stephan Guilloux3611b802010-09-13 19:59:28 +000011417 .tested = TEST_UNTESTED,
11418 .probe = probe_spi_rdid,
11419 .probe_timing = TIMING_ZERO,
11420 .block_erasers =
11421 {
11422 {
11423 .eraseblocks = { {4 * 1024, 512} },
11424 .block_erase = spi_block_erase_20,
11425 }, {
11426 .eraseblocks = { {64 * 1024, 32} },
11427 .block_erase = spi_block_erase_d8,
11428 }, {
11429 .eraseblocks = { {2 * 1024 * 1024, 1} },
11430 .block_erase = spi_block_erase_60,
11431 }, {
11432 .eraseblocks = { {2 * 1024 * 1024, 1} },
11433 .block_erase = spi_block_erase_c7,
11434 }
11435 },
Nico Huber46552c82024-03-27 01:18:12 +010011436 .reg_bits =
11437 {
11438 .qe = {STATUS1, 6, RW},
11439 },
11440 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000011441 .unlock = spi_disable_blockprotect_bp3_srwd,
Stephan Guilloux3611b802010-09-13 19:59:28 +000011442 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011443 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +000011444 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011445 .prepare_access = spi_prepare_io,
11446 .finish_access = spi_finish_io,
Stephan Guilloux3611b802010-09-13 19:59:28 +000011447 },
11448
11449 {
11450 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011451 .name = "MX25L2005(C)/MX25L2006E",
11452 .bustype = BUS_SPI,
11453 .manufacture_id = MACRONIX_ID,
11454 .model_id = MACRONIX_MX25L2005,
11455 .total_size = 256,
11456 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +010011457 /* FEATURE_FAST_READ_DOUT: MX25L2006E */
11458 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011459 .tested = TEST_OK_PREW,
11460 .probe = probe_spi_rdid,
11461 .probe_timing = TIMING_ZERO,
11462 .block_erasers =
11463 {
11464 {
11465 .eraseblocks = { {4 * 1024, 64} },
11466 .block_erase = spi_block_erase_20,
11467 }, {
11468 .eraseblocks = { {64 * 1024, 4} },
11469 .block_erase = spi_block_erase_52,
11470 }, {
11471 .eraseblocks = { {64 * 1024, 4} },
11472 .block_erase = spi_block_erase_d8,
11473 }, {
11474 .eraseblocks = { {256 * 1024, 1} },
11475 .block_erase = spi_block_erase_60,
11476 }, {
11477 .eraseblocks = { {256 * 1024, 1} },
11478 .block_erase = spi_block_erase_c7,
11479 },
11480 },
11481 .printlock = spi_prettyprint_status_register_bp1_srwd,
11482 .unlock = spi_disable_blockprotect,
11483 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011484 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011485 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011486 .prepare_access = spi_prepare_io,
11487 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011488 },
11489
11490 {
11491 .vendor = "Macronix",
Alan Green03707302019-08-26 12:50:43 +100011492 .name = "MX25L25635F/MX25L25645G",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011493 .bustype = BUS_SPI,
11494 .manufacture_id = MACRONIX_ID,
11495 .model_id = MACRONIX_MX25L25635F,
11496 .total_size = 32768,
11497 .page_size = 256,
11498 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011499 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
11500 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
11501 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Nico Huberc972aed2024-08-30 02:06:41 +020011502 .tested = TEST_OK_PREWB,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011503 .probe = probe_spi_rdid,
11504 .probe_timing = TIMING_ZERO,
11505 .block_erasers =
11506 {
11507 {
11508 .eraseblocks = { {4 * 1024, 8192} },
11509 .block_erase = spi_block_erase_21,
11510 }, {
11511 .eraseblocks = { {4 * 1024, 8192} },
11512 .block_erase = spi_block_erase_20,
11513 }, {
11514 .eraseblocks = { {32 * 1024, 1024} },
11515 .block_erase = spi_block_erase_5c,
11516 }, {
11517 .eraseblocks = { {32 * 1024, 1024} },
11518 .block_erase = spi_block_erase_52,
11519 }, {
11520 .eraseblocks = { {64 * 1024, 512} },
11521 .block_erase = spi_block_erase_dc,
11522 }, {
11523 .eraseblocks = { {64 * 1024, 512} },
11524 .block_erase = spi_block_erase_d8,
11525 }, {
11526 .eraseblocks = { {32 * 1024 * 1024, 1} },
11527 .block_erase = spi_block_erase_60,
11528 }, {
11529 .eraseblocks = { {32 * 1024 * 1024, 1} },
11530 .block_erase = spi_block_erase_c7,
11531 }
11532 },
11533 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
Nico Huber46552c82024-03-27 01:18:12 +010011534 .reg_bits = {
11535 .qe = {STATUS1, 6, RW},
11536 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
Nico Huberc972aed2024-08-30 02:06:41 +020011537 .srp = {STATUS1, 7, RW},
11538 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
11539 .tb = {CONFIG, 3, OTP},
Nico Huber46552c82024-03-27 01:18:12 +010011540 },
Nico Huberc972aed2024-08-30 02:06:41 +020011541 .wp_write_cfg = spi_wp_write_cfg,
11542 .wp_read_cfg = spi_wp_read_cfg,
11543 .wp_get_ranges = spi_wp_get_available_ranges,
11544 .decode_range = decode_range_spi25,
Nico Huber46552c82024-03-27 01:18:12 +010011545 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011546 .unlock = spi_disable_blockprotect_bp3_srwd,
11547 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011548 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011549 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011550 .prepare_access = spi_prepare_io,
11551 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011552 },
11553
11554 {
11555 .vendor = "Macronix",
Stefan Tauner226037d2013-03-16 01:22:12 +000011556 .name = "MX25L3205(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011557 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011558 .manufacture_id = MACRONIX_ID,
11559 .model_id = MACRONIX_MX25L3205,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011560 .total_size = 4096,
11561 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +010011562 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
David Hendricks22e05322010-12-13 23:54:59 +000011563 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011564 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011565 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000011566 .block_erasers =
11567 {
11568 {
Stefan Tauner226037d2013-03-16 01:22:12 +000011569 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +000011570 .block_erase = spi_block_erase_20,
11571 }, {
Stefan Tauner226037d2013-03-16 01:22:12 +000011572 .eraseblocks = { {64 * 1024, 64} },
Sean Nelson6b11ad22009-12-23 17:05:59 +000011573 .block_erase = spi_block_erase_d8,
11574 }, {
11575 .eraseblocks = { {4 * 1024 * 1024, 1} },
11576 .block_erase = spi_block_erase_60,
11577 }, {
11578 .eraseblocks = { {4 * 1024 * 1024, 1} },
11579 .block_erase = spi_block_erase_c7,
11580 },
11581 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011582 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit6: error flag */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000011583 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011584 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011585 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000011586 .voltage = {2700, 3600},
11587 },
11588
11589 {
11590 .vendor = "Macronix",
11591 .name = "MX25L3205D/MX25L3208D",
11592 .bustype = BUS_SPI,
11593 .manufacture_id = MACRONIX_ID,
11594 .model_id = MACRONIX_MX25L3205,
11595 .total_size = 4096,
11596 .page_size = 256,
11597 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011598 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +000011599 .tested = TEST_OK_PREW,
11600 .probe = probe_spi_rdid,
11601 .probe_timing = TIMING_ZERO,
11602 .block_erasers =
11603 {
11604 {
11605 .eraseblocks = { {4 * 1024, 1024} },
11606 .block_erase = spi_block_erase_20,
11607 }, {
11608 .eraseblocks = { {64 * 1024, 64} },
11609 .block_erase = spi_block_erase_d8,
11610 }, {
11611 .eraseblocks = { {4 * 1024 * 1024, 1} },
11612 .block_erase = spi_block_erase_60,
11613 }, {
11614 .eraseblocks = { {4 * 1024 * 1024, 1} },
11615 .block_erase = spi_block_erase_c7,
11616 },
11617 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011618 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011619 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000011620 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011621 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000011622 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011623 .prepare_access = spi_prepare_io,
11624 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +000011625 },
11626
11627 {
11628 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011629 .name = "MX25L3206E/MX25L3208E",
Stefan Tauner226037d2013-03-16 01:22:12 +000011630 .bustype = BUS_SPI,
11631 .manufacture_id = MACRONIX_ID,
11632 .model_id = MACRONIX_MX25L3205,
11633 .total_size = 4096,
11634 .page_size = 256,
11635 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011636 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner226037d2013-03-16 01:22:12 +000011637 .tested = TEST_OK_PREW,
11638 .probe = probe_spi_rdid,
11639 .probe_timing = TIMING_ZERO,
11640 .block_erasers =
11641 {
11642 {
11643 .eraseblocks = { {4 * 1024, 1024} },
11644 .block_erase = spi_block_erase_20,
11645 }, {
11646 .eraseblocks = { {64 * 1024, 64} },
11647 .block_erase = spi_block_erase_d8,
11648 }, {
11649 .eraseblocks = { {64 * 1024, 64} },
11650 .block_erase = spi_block_erase_52,
11651 }, {
11652 .eraseblocks = { {4 * 1024 * 1024, 1} },
11653 .block_erase = spi_block_erase_60,
11654 }, {
11655 .eraseblocks = { {4 * 1024 * 1024, 1} },
11656 .block_erase = spi_block_erase_c7,
11657 },
11658 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011659 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000011660 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000011661 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011662 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011663 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011664 .prepare_access = spi_prepare_io,
11665 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000011666 },
11667
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011668 {
11669 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011670 .name = "MX25L3235D",
11671 .bustype = BUS_SPI,
11672 .manufacture_id = MACRONIX_ID,
11673 .model_id = MACRONIX_MX25L3235D,
11674 .total_size = 4096,
11675 .page_size = 256,
11676 /* OTP: 256B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011677 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
11678 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011679 .tested = TEST_UNTESTED,
11680 .probe = probe_spi_rdid,
11681 .probe_timing = TIMING_ZERO,
11682 .block_erasers =
11683 {
11684 {
11685 .eraseblocks = { {4 * 1024, 1024} },
11686 .block_erase = spi_block_erase_20,
11687 }, {
11688 .eraseblocks = { {64 * 1024, 64} },
11689 .block_erase = spi_block_erase_d8,
11690 }, {
11691 .eraseblocks = { {4 * 1024 * 1024, 1} },
11692 .block_erase = spi_block_erase_60,
11693 }, {
11694 .eraseblocks = { {4 * 1024 * 1024, 1} },
11695 .block_erase = spi_block_erase_c7,
11696 }
11697 },
Nico Huber46552c82024-03-27 01:18:12 +010011698 .reg_bits =
11699 {
11700 .qe = {STATUS1, 6, RW},
11701 },
11702 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011703 .unlock = spi_disable_blockprotect_bp3_srwd,
11704 .write = spi_chip_write_256,
11705 .read = spi_chip_read,
11706 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011707 .prepare_access = spi_prepare_io,
11708 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011709 },
11710
11711 {
11712 .vendor = "Macronix",
Nico Huberb6683e02021-04-21 13:04:29 +020011713 .name = "MX25L3233F/MX25L3273E",
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011714 .bustype = BUS_SPI,
11715 .manufacture_id = MACRONIX_ID,
11716 .model_id = MACRONIX_MX25L3205,
11717 .total_size = 4096,
11718 .page_size = 256,
Nico Huber6e69e2b2021-04-21 13:03:13 +020011719 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011720 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Stefan Tauner23e10b82016-01-23 16:16:49 +000011721 .tested = TEST_OK_PREW,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011722 .probe = probe_spi_rdid,
11723 .probe_timing = TIMING_ZERO,
11724 .block_erasers =
11725 {
11726 {
11727 .eraseblocks = { {4 * 1024, 1024} },
11728 .block_erase = spi_block_erase_20,
11729 }, {
11730 .eraseblocks = { {32 * 1024, 128} },
11731 .block_erase = spi_block_erase_52,
11732 }, {
11733 .eraseblocks = { {64 * 1024, 64} },
11734 .block_erase = spi_block_erase_d8,
11735 }, {
11736 .eraseblocks = { {4 * 1024 * 1024, 1} },
11737 .block_erase = spi_block_erase_60,
11738 }, {
11739 .eraseblocks = { {4 * 1024 * 1024, 1} },
11740 .block_erase = spi_block_erase_c7,
11741 },
11742 },
Nico Huber46552c82024-03-27 01:18:12 +010011743 .reg_bits =
11744 {
11745 .qe = {STATUS1, 6, RW},
11746 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000011747 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000011748 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011749 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011750 .read = spi_chip_read,
Nico Huberb6683e02021-04-21 13:04:29 +020011751 .voltage = {2700, 3600}, /* 33F 2.65V..3.6V */
Nico Huber930d4212024-05-04 18:59:15 +020011752 .prepare_access = spi_prepare_io,
11753 .finish_access = spi_finish_io,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000011754 },
11755
11756 {
11757 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011758 .name = "MX25L4005(A/C)/MX25L4006E",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011759 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011760 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011761 .model_id = MACRONIX_MX25L4005,
11762 .total_size = 512,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +000011763 .page_size = 256,
Nico Huber46552c82024-03-27 01:18:12 +010011764 /* FEATURE_FAST_READ_DOUT: MX25L4006E */
11765 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011766 .tested = TEST_OK_PREW,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +000011767 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011768 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000011769 .block_erasers =
11770 {
11771 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011772 .eraseblocks = { {4 * 1024, 128} },
Sean Nelson54596372010-01-09 05:30:14 +000011773 .block_erase = spi_block_erase_20,
11774 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011775 .eraseblocks = { {64 * 1024, 8} },
11776 .block_erase = spi_block_erase_52,
11777 }, {
11778 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson54596372010-01-09 05:30:14 +000011779 .block_erase = spi_block_erase_d8,
11780 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011781 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +000011782 .block_erase = spi_block_erase_60,
11783 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100011784 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +000011785 .block_erase = spi_block_erase_c7,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011786 },
Sean Nelson54596372010-01-09 05:30:14 +000011787 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100011788 .printlock = spi_prettyprint_status_register_bp2_srwd,
11789 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011790 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011791 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011792 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011793 .prepare_access = spi_prepare_io,
11794 .finish_access = spi_finish_io,
Stephan Guilloux70ea9a32009-04-23 22:51:56 +000011795 },
11796
11797 {
11798 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100011799 .name = "MX25L512(E)/MX25V512(C)",
11800 .bustype = BUS_SPI,
11801 .manufacture_id = MACRONIX_ID,
11802 .model_id = MACRONIX_MX25L512,
11803 .total_size = 64,
11804 .page_size = 256,
11805 /* MX25L512E supports SFDP */
Nico Huber46552c82024-03-27 01:18:12 +010011806 /* FEATURE_FAST_READ_DOUT: MX25L512E */
11807 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011808 .tested = TEST_OK_PREW,
11809 .probe = probe_spi_rdid,
11810 .probe_timing = TIMING_ZERO,
11811 .block_erasers =
11812 {
11813 {
11814 .eraseblocks = { {4 * 1024, 16} },
11815 .block_erase = spi_block_erase_20,
11816 }, {
11817 .eraseblocks = { {64 * 1024, 1} },
11818 .block_erase = spi_block_erase_52,
11819 }, {
11820 .eraseblocks = { {64 * 1024, 1} },
11821 .block_erase = spi_block_erase_d8,
11822 }, {
11823 .eraseblocks = { {64 * 1024, 1} },
11824 .block_erase = spi_block_erase_60,
11825 }, {
11826 .eraseblocks = { {64 * 1024, 1} },
11827 .block_erase = spi_block_erase_c7,
11828 },
11829 },
11830 .printlock = spi_prettyprint_status_register_bp1_srwd,
11831 .unlock = spi_disable_blockprotect,
11832 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011833 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100011834 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V512(C) */
11835 },
11836
11837 {
11838 .vendor = "Macronix",
Steve Markgraf7e6f3a72020-07-13 18:22:56 +020011839 .name = "MX25L5121E",
11840 .bustype = BUS_SPI,
11841 .manufacture_id = MACRONIX_ID,
11842 .model_id = MACRONIX_MX25L5121E,
11843 .total_size = 64,
11844 .page_size = 32,
Nico Huber46552c82024-03-27 01:18:12 +010011845 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +020011846 .tested = TEST_OK_PREW,
11847 .probe = probe_spi_rdid,
11848 .probe_timing = TIMING_ZERO,
11849 .block_erasers =
11850 {
11851 {
11852 .eraseblocks = { {4 * 1024, 16} },
11853 .block_erase = spi_block_erase_20,
11854 }, {
11855 .eraseblocks = { {64 * 1024, 1} },
11856 .block_erase = spi_block_erase_52,
11857 }, {
11858 .eraseblocks = { {64 * 1024, 1} },
11859 .block_erase = spi_block_erase_d8,
11860 }, {
11861 .eraseblocks = { {64 * 1024, 1} },
11862 .block_erase = spi_block_erase_60,
11863 }, {
11864 .eraseblocks = { {64 * 1024, 1} },
11865 .block_erase = spi_block_erase_c7,
11866 },
11867 },
11868 .printlock = spi_prettyprint_status_register_bp1_srwd,
11869 .unlock = spi_disable_blockprotect,
11870 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011871 .read = spi_chip_read,
Steve Markgraf7e6f3a72020-07-13 18:22:56 +020011872 .voltage = {2700, 3600},
11873 },
11874
11875 {
11876 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011877 .name = "MX25L6405",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000011878 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000011879 .manufacture_id = MACRONIX_ID,
11880 .model_id = MACRONIX_MX25L6405,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011881 .total_size = 8192,
11882 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011883 /* Has an additional 512B EEPROM sector */
11884 .feature_bits = FEATURE_WRSR_WREN,
Paul Menzelac427b22012-02-16 21:07:07 +000011885 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011886 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000011887 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000011888 .block_erasers =
11889 {
11890 {
11891 .eraseblocks = { {64 * 1024, 128} },
11892 .block_erase = spi_block_erase_20,
11893 }, {
11894 .eraseblocks = { {64 * 1024, 128} },
11895 .block_erase = spi_block_erase_d8,
11896 }, {
11897 .eraseblocks = { {8 * 1024 * 1024, 1} },
11898 .block_erase = spi_block_erase_60,
11899 }, {
11900 .eraseblocks = { {8 * 1024 * 1024, 1} },
11901 .block_erase = spi_block_erase_c7,
11902 }
11903 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011904 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: error flag */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011905 .unlock = spi_disable_blockprotect_bp3_srwd,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000011906 .write = spi_chip_write_256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011907 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000011908 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000011909 },
11910
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000011911 {
11912 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011913 .name = "MX25L6405D",
Stefan Tauner226037d2013-03-16 01:22:12 +000011914 .bustype = BUS_SPI,
11915 .manufacture_id = MACRONIX_ID,
11916 .model_id = MACRONIX_MX25L6405,
11917 .total_size = 8192,
11918 .page_size = 256,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011919 /* OTP: 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011920 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DIO,
Stefan Tauner226037d2013-03-16 01:22:12 +000011921 .tested = TEST_OK_PREW,
11922 .probe = probe_spi_rdid,
11923 .probe_timing = TIMING_ZERO,
11924 .block_erasers =
11925 {
11926 {
11927 .eraseblocks = { {4 * 1024, 2048} },
11928 .block_erase = spi_block_erase_20,
11929 }, {
11930 .eraseblocks = { {64 * 1024, 128} },
11931 .block_erase = spi_block_erase_d8,
11932 }, {
11933 .eraseblocks = { {8 * 1024 * 1024, 1} },
11934 .block_erase = spi_block_erase_60,
11935 }, {
11936 .eraseblocks = { {8 * 1024 * 1024, 1} },
11937 .block_erase = spi_block_erase_c7,
11938 }
11939 },
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011940 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6: continuously program mode */
Stefan Tauner5c316f92015-02-08 21:57:52 +000011941 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000011942 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011943 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000011944 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011945 .prepare_access = spi_prepare_io,
11946 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +000011947 },
11948
11949 {
11950 .vendor = "Macronix",
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011951 .name = "MX25L6406E/MX25L6408E",
11952 .bustype = BUS_SPI,
11953 .manufacture_id = MACRONIX_ID,
11954 .model_id = MACRONIX_MX25L6405,
11955 .total_size = 8192,
11956 .page_size = 256,
11957 /* MX25L6406E supports SFDP */
11958 /* OTP: 06E 64B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010011959 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011960 .tested = TEST_OK_PREW,
11961 .probe = probe_spi_rdid,
11962 .probe_timing = TIMING_ZERO,
11963 .block_erasers =
11964 {
11965 {
11966 .eraseblocks = { {4 * 1024, 2048} },
11967 .block_erase = spi_block_erase_20,
11968 }, {
11969 .eraseblocks = { {64 * 1024, 128} },
11970 .block_erase = spi_block_erase_52,
11971 }, {
11972 .eraseblocks = { {64 * 1024, 128} },
11973 .block_erase = spi_block_erase_d8,
11974 }, {
11975 .eraseblocks = { {8 * 1024 * 1024, 1} },
11976 .block_erase = spi_block_erase_60,
11977 }, {
11978 .eraseblocks = { {8 * 1024 * 1024, 1} },
11979 .block_erase = spi_block_erase_c7,
11980 }
11981 },
11982 .printlock = spi_prettyprint_status_register_bp3_srwd,
11983 .unlock = spi_disable_blockprotect_bp3_srwd,
11984 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010011985 .read = spi_chip_read,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011986 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020011987 .prepare_access = spi_prepare_io,
11988 .finish_access = spi_finish_io,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000011989 },
11990
11991 {
11992 .vendor = "Macronix",
Nico Huberb0072782017-12-06 21:02:57 +010011993 .name = "MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F",
Stefan Tauner226037d2013-03-16 01:22:12 +000011994 .bustype = BUS_SPI,
11995 .manufacture_id = MACRONIX_ID,
11996 .model_id = MACRONIX_MX25L6405,
11997 .total_size = 8192,
11998 .page_size = 256,
11999 /* supports SFDP */
12000 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber46552c82024-03-27 01:18:12 +010012001 /* FEATURE_QIO: MX25L6473E, MX25L6473F */
12002 /* FEATURE_FAST_READ_DOUT, _QOUT: MX25L6436E */
12003 /* FEATURE_FAST_READ_DIO, _QIO: MX25L6445E, MX25L6465E */
12004 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ,
Stefan Tauner226037d2013-03-16 01:22:12 +000012005 .tested = TEST_OK_PREW,
12006 .probe = probe_spi_rdid,
12007 .probe_timing = TIMING_ZERO,
12008 .block_erasers =
12009 {
12010 {
12011 .eraseblocks = { {4 * 1024, 2048} },
12012 .block_erase = spi_block_erase_20,
12013 }, {
12014 .eraseblocks = { {32 * 1024, 256} },
12015 .block_erase = spi_block_erase_52,
12016 }, {
12017 .eraseblocks = { {64 * 1024, 128} },
12018 .block_erase = spi_block_erase_d8,
12019 }, {
12020 .eraseblocks = { {8 * 1024 * 1024, 1} },
12021 .block_erase = spi_block_erase_60,
12022 }, {
12023 .eraseblocks = { {8 * 1024 * 1024, 1} },
12024 .block_erase = spi_block_erase_c7,
12025 }
12026 },
Nico Huber46552c82024-03-27 01:18:12 +010012027 .reg_bits =
12028 {
12029 .qe = {STATUS1, 6, RW},
12030 },
12031 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000012032 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner226037d2013-03-16 01:22:12 +000012033 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010012034 .read = spi_chip_read,
Stefan Tauner226037d2013-03-16 01:22:12 +000012035 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012036 .prepare_access = spi_prepare_io,
12037 .finish_access = spi_finish_io,
Stefan Tauner226037d2013-03-16 01:22:12 +000012038 },
12039
12040 {
12041 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012042 .name = "MX25L6495F",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012043 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000012044 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012045 .model_id = MACRONIX_MX25L6495F,
12046 .total_size = 8192,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +000012047 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012048 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Stefan Tauner226037d2013-03-16 01:22:12 +000012049 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner0554ca52013-07-25 22:54:25 +000012050 .tested = TEST_OK_PREW,
Stephan Guilloux2f132fe2009-04-21 01:47:16 +000012051 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000012052 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000012053 .block_erasers =
12054 {
12055 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012056 .eraseblocks = { {4 * 1024, 2048} },
Sean Nelson54596372010-01-09 05:30:14 +000012057 .block_erase = spi_block_erase_20,
12058 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012059 .eraseblocks = { {32 * 1024, 256} },
12060 .block_erase = spi_block_erase_52,
12061 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +053012062 .eraseblocks = { {64 * 1024, 128} },
12063 .block_erase = spi_block_erase_d8,
12064 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012065 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +000012066 .block_erase = spi_block_erase_60,
12067 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012068 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelson54596372010-01-09 05:30:14 +000012069 .block_erase = spi_block_erase_c7,
12070 }
12071 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100012072 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000012073 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012074 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
Stefan Tauner5c316f92015-02-08 21:57:52 +000012075 .voltage = {2700, 3600},
12076 },
12077
12078 {
12079 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012080 .name = "MX25L8005/MX25L8006E/MX25L8008E/MX25V8005",
Stefan Tauner5c316f92015-02-08 21:57:52 +000012081 .bustype = BUS_SPI,
12082 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012083 .model_id = MACRONIX_MX25L8005,
12084 .total_size = 1024,
12085 .page_size = 256,
12086 /* MX25L8006E, MX25L8008E support SFDP */
12087 /* OTP: 64B total; enter 0xB1, exit 0xC1 (MX25L8006E, MX25L8008E only) */
Nico Huber46552c82024-03-27 01:18:12 +010012088 /* FEATURE_FAST_READ_DOUT: MX25L8006E, MX25L8008E */
12089 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012090 .tested = TEST_OK_PREW,
12091 .probe = probe_spi_rdid,
12092 .probe_timing = TIMING_ZERO,
12093 .block_erasers =
12094 {
12095 {
12096 .eraseblocks = { {4 * 1024, 256} },
12097 .block_erase = spi_block_erase_20,
12098 }, {
12099 .eraseblocks = { {64 * 1024, 16} },
12100 .block_erase = spi_block_erase_52,
12101 }, {
12102 .eraseblocks = { {64 * 1024, 16} },
12103 .block_erase = spi_block_erase_d8,
12104 }, {
12105 .eraseblocks = { {1024 * 1024, 1} },
12106 .block_erase = spi_block_erase_60,
12107 }, {
12108 .eraseblocks = { {1024 * 1024, 1} },
12109 .block_erase = spi_block_erase_c7,
12110 },
12111 },
12112 .printlock = spi_prettyprint_status_register_bp2_srwd,
12113 .unlock = spi_disable_blockprotect,
12114 .write = spi_chip_write_256,
Nico Huber46552c82024-03-27 01:18:12 +010012115 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012116 .voltage = {2700, 3600}, /* 2.35-3.6V for MX25V8005 */
12117 },
12118
12119 {
12120 .vendor = "Macronix",
sibradzicf62623c2020-03-14 17:21:34 +090012121 .name = "MX25R3235F",
12122 .bustype = BUS_SPI,
12123 .manufacture_id = MACRONIX_ID,
12124 .model_id = MACRONIX_MX25R3235F,
12125 .total_size = 4096,
12126 .page_size = 256,
12127 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +010012128 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
sibradzicf62623c2020-03-14 17:21:34 +090012129 .tested = TEST_OK_PREW,
12130 .probe = probe_spi_rdid,
12131 .probe_timing = TIMING_ZERO,
12132 .block_erasers =
12133 {
12134 {
12135 .eraseblocks = { {4 * 1024, 1024} },
12136 .block_erase = spi_block_erase_20,
12137 }, {
sibradzicf62623c2020-03-14 17:21:34 +090012138 .eraseblocks = { {32 * 1024, 128} },
12139 .block_erase = spi_block_erase_52,
12140 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +053012141 .eraseblocks = { {64 * 1024, 64} },
12142 .block_erase = spi_block_erase_d8,
12143 }, {
sibradzicf62623c2020-03-14 17:21:34 +090012144 .eraseblocks = { {4 * 1024 * 1024, 1} },
12145 .block_erase = spi_block_erase_60,
12146 }, {
12147 .eraseblocks = { {4 * 1024 * 1024, 1} },
12148 .block_erase = spi_block_erase_c7,
12149 }
12150 },
Nico Huber5f509992024-03-27 01:18:12 +010012151 .reg_bits =
12152 {
12153 .qe = {STATUS1, 6, RW},
12154 },
12155 .printlock = spi_prettyprint_status_register_bp3_srwd,
sibradzicf62623c2020-03-14 17:21:34 +090012156 .unlock = spi_disable_blockprotect_bp3_srwd,
12157 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +010012158 .read = spi_chip_read,
sibradzicf62623c2020-03-14 17:21:34 +090012159 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012160 .prepare_access = spi_prepare_io,
12161 .finish_access = spi_finish_io,
sibradzicf62623c2020-03-14 17:21:34 +090012162 },
12163
12164 {
12165 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012166 .name = "MX25R6435F",
12167 .bustype = BUS_SPI,
12168 .manufacture_id = MACRONIX_ID,
12169 .model_id = MACRONIX_MX25R6435F,
12170 .total_size = 8192,
12171 .page_size = 256,
12172 /* OTP: 1024B total; enter 0xB1, exit 0xC1 */
Nico Huber5f509992024-03-27 01:18:12 +010012173 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012174 .tested = TEST_OK_PREW,
12175 .probe = probe_spi_rdid,
12176 .probe_timing = TIMING_ZERO,
12177 .block_erasers =
12178 {
12179 {
12180 .eraseblocks = { {4 * 1024, 2048} },
12181 .block_erase = spi_block_erase_20,
12182 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012183 .eraseblocks = { {32 * 1024, 256} },
12184 .block_erase = spi_block_erase_52,
12185 }, {
Aarya Chaumal478e1792022-06-04 01:34:44 +053012186 .eraseblocks = { {64 * 1024, 128} },
12187 .block_erase = spi_block_erase_d8,
12188 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012189 .eraseblocks = { {8 * 1024 * 1024, 1} },
12190 .block_erase = spi_block_erase_60,
12191 }, {
12192 .eraseblocks = { {8 * 1024 * 1024, 1} },
12193 .block_erase = spi_block_erase_c7,
12194 }
12195 },
Nico Huber5f509992024-03-27 01:18:12 +010012196 .reg_bits =
12197 {
12198 .qe = {STATUS1, 6, RW},
12199 },
12200 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012201 .unlock = spi_disable_blockprotect_bp3_srwd,
12202 .write = spi_chip_write_256,
Nico Huber5f509992024-03-27 01:18:12 +010012203 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012204 .voltage = {1650, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020012205 .prepare_access = spi_prepare_io,
12206 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012207 },
12208
12209 {
12210 .vendor = "Macronix",
12211 .name = "MX25U12835F",
12212 .bustype = BUS_SPI,
12213 .manufacture_id = MACRONIX_ID,
12214 .model_id = MACRONIX_MX25U12835E,
Stefan Tauner5c316f92015-02-08 21:57:52 +000012215 .total_size = 16384,
12216 .page_size = 256,
12217 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012218 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_35,
12219 .dummy_cycles =
12220 {
12221 /* 133MHz version has configuration register
12222 bit to toggle 8 dummy cycles for QIO, defaults: */
12223 .qpi_fast_read = 4,
12224 .qpi_fast_read_qio = 6,
12225 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000012226 .tested = TEST_OK_PREW,
12227 .probe = probe_spi_rdid,
12228 .probe_timing = TIMING_ZERO,
12229 .block_erasers =
12230 {
12231 {
12232 .eraseblocks = { {4 * 1024, 4096} },
12233 .block_erase = spi_block_erase_20,
12234 }, {
12235 .eraseblocks = { {32 * 1024, 512} },
12236 .block_erase = spi_block_erase_52,
12237 }, {
12238 .eraseblocks = { {64 * 1024, 256} },
12239 .block_erase = spi_block_erase_d8,
12240 }, {
12241 .eraseblocks = { {16 * 1024 * 1024, 1} },
12242 .block_erase = spi_block_erase_60,
12243 }, {
12244 .eraseblocks = { {16 * 1024 * 1024, 1} },
12245 .block_erase = spi_block_erase_c7,
12246 }
12247 },
Angel Ponsf112e242018-09-30 20:14:17 +020012248 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010012249 .reg_bits =
12250 {
12251 .qe = {STATUS1, 6, RW},
12252 },
12253 .printlock = spi_prettyprint_status_register_bp3_srwd,
Angel Ponsf112e242018-09-30 20:14:17 +020012254 .unlock = spi_disable_blockprotect_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012255 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010012256 .read = spi_chip_read,
Angel Ponsf112e242018-09-30 20:14:17 +020012257 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012258 .prepare_access = spi_prepare_io,
12259 .finish_access = spi_finish_io,
Angel Ponsf112e242018-09-30 20:14:17 +020012260 },
12261
12262 {
12263 .vendor = "Macronix",
Vincent Palatinf800f552013-03-15 02:03:16 +000012264 .name = "MX25U1635E",
12265 .bustype = BUS_SPI,
12266 .manufacture_id = MACRONIX_ID,
12267 .model_id = MACRONIX_MX25U1635E,
12268 .total_size = 2048,
12269 .page_size = 256,
12270 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012271 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
12272 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
12273 .dummy_cycles =
12274 {
12275 .qpi_fast_read = 4,
12276 .qpi_fast_read_qio = 6,
12277 },
Stefan Tauner5c316f92015-02-08 21:57:52 +000012278 .tested = TEST_OK_PR,
Vincent Palatinf800f552013-03-15 02:03:16 +000012279 .probe = probe_spi_rdid,
12280 .probe_timing = TIMING_ZERO,
12281 .block_erasers =
12282 {
12283 {
12284 .eraseblocks = { {4 * 1024, 512} },
12285 .block_erase = spi_block_erase_20,
12286 }, {
12287 .eraseblocks = { {32 * 1024, 64} },
12288 .block_erase = spi_block_erase_52,
12289 }, {
12290 .eraseblocks = { {64 * 1024, 32} },
12291 .block_erase = spi_block_erase_d8,
12292 }, {
12293 .eraseblocks = { {2 * 1024 * 1024, 1} },
12294 .block_erase = spi_block_erase_60,
12295 }, {
12296 .eraseblocks = { {2 * 1024 * 1024, 1} },
12297 .block_erase = spi_block_erase_c7,
12298 }
12299 },
12300 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010012301 .reg_bits =
12302 {
12303 .qe = {STATUS1, 6, RW},
12304 },
12305 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Tauner5c316f92015-02-08 21:57:52 +000012306 .unlock = spi_disable_blockprotect_bp3_srwd,
Vincent Palatinf800f552013-03-15 02:03:16 +000012307 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010012308 .read = spi_chip_read,
Vincent Palatinf800f552013-03-15 02:03:16 +000012309 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012310 .prepare_access = spi_prepare_io,
12311 .finish_access = spi_finish_io,
Vincent Palatinf800f552013-03-15 02:03:16 +000012312 },
12313
12314 {
12315 .vendor = "Macronix",
David Tomaschikf75d8c52019-06-20 09:49:01 -070012316 .name = "MX25U25635F",
12317 .bustype = BUS_SPI,
12318 .manufacture_id = MACRONIX_ID,
12319 .model_id = MACRONIX_MX25U25635F,
12320 .total_size = 32768,
12321 .page_size = 256,
12322 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012323 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
12324 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
12325 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Nikolai Artemiev148254b2021-03-23 17:21:10 +110012326 .tested = TEST_OK_PREW,
David Tomaschikf75d8c52019-06-20 09:49:01 -070012327 .probe = probe_spi_rdid,
12328 .probe_timing = TIMING_ZERO,
12329 .block_erasers =
12330 {
12331 {
12332 .eraseblocks = { {4 * 1024, 8192} },
12333 .block_erase = spi_block_erase_21,
12334 }, {
12335 .eraseblocks = { {4 * 1024, 8192} },
12336 .block_erase = spi_block_erase_20,
12337 }, {
12338 .eraseblocks = { {32 * 1024, 1024} },
12339 .block_erase = spi_block_erase_5c,
12340 }, {
12341 .eraseblocks = { {32 * 1024, 1024} },
12342 .block_erase = spi_block_erase_52,
12343 }, {
12344 .eraseblocks = { {64 * 1024, 512} },
12345 .block_erase = spi_block_erase_dc,
12346 }, {
12347 .eraseblocks = { {64 * 1024, 512} },
12348 .block_erase = spi_block_erase_d8,
12349 }, {
12350 .eraseblocks = { {32 * 1024 * 1024, 1} },
12351 .block_erase = spi_block_erase_60,
12352 }, {
12353 .eraseblocks = { {32 * 1024 * 1024, 1} },
12354 .block_erase = spi_block_erase_c7,
12355 }
12356 },
12357 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010012358 .reg_bits =
12359 {
Nico Huber4fa39c52024-03-27 01:18:12 +010012360 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010012361 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
12362 },
Nico Huber4fa39c52024-03-27 01:18:12 +010012363 .printlock = spi_prettyprint_status_register_bp3_srwd,
David Tomaschikf75d8c52019-06-20 09:49:01 -070012364 .unlock = spi_disable_blockprotect_bp3_srwd,
12365 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010012366 .read = spi_chip_read,
David Tomaschikf75d8c52019-06-20 09:49:01 -070012367 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012368 .prepare_access = spi_prepare_io,
12369 .finish_access = spi_finish_io,
David Tomaschikf75d8c52019-06-20 09:49:01 -070012370 },
12371
12372 {
12373 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012374 .name = "MX25U3235E/F",
12375 .bustype = BUS_SPI,
12376 .manufacture_id = MACRONIX_ID,
12377 .model_id = MACRONIX_MX25U3235E,
12378 .total_size = 4096,
12379 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010012380 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100012381 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012382 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
12383 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
12384 .dummy_cycles =
12385 {
12386 .qpi_fast_read = 4,
12387 .qpi_fast_read_qio = 6,
12388 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100012389 .tested = TEST_OK_PREW,
12390 .probe = probe_spi_rdid,
12391 .probe_timing = TIMING_ZERO,
12392 .block_erasers =
12393 {
12394 {
12395 .eraseblocks = { {4 * 1024, 1024} },
12396 .block_erase = spi_block_erase_20,
12397 }, {
12398 .eraseblocks = { {32 * 1024, 128} },
12399 .block_erase = spi_block_erase_52,
12400 }, {
12401 .eraseblocks = { {64 * 1024, 64} },
12402 .block_erase = spi_block_erase_d8,
12403 }, {
12404 .eraseblocks = { {4 * 1024 * 1024, 1} },
12405 .block_erase = spi_block_erase_60,
12406 }, {
12407 .eraseblocks = { {4 * 1024 * 1024, 1} },
12408 .block_erase = spi_block_erase_c7,
12409 }
12410 },
12411 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010012412 .reg_bits =
12413 {
12414 .qe = {STATUS1, 6, RW},
12415 },
12416 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012417 .unlock = spi_disable_blockprotect_bp3_srwd,
12418 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010012419 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012420 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012421 .prepare_access = spi_prepare_io,
12422 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012423 },
12424
12425 {
12426 .vendor = "Macronix",
Daniel Thompsoncadd4202018-06-04 13:52:22 +010012427 .name = "MX25U51245G",
12428 .bustype = BUS_SPI,
12429 .manufacture_id = MACRONIX_ID,
12430 .model_id = MACRONIX_MX25U51245G,
12431 .total_size = 65536,
12432 .page_size = 256,
12433 /* OTP: 512B factory programmed and 512B customer programmed; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012434 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP |
12435 FEATURE_4BA | FEATURE_QPI_35 | FEATURE_FAST_READ_QPI4B,
12436 .dummy_cycles = { .qpi_read_params = { 6, 4, 8, 10 } },
Daniel Thompsoncadd4202018-06-04 13:52:22 +010012437 .tested = TEST_OK_PREW,
12438 .probe = probe_spi_rdid,
12439 .probe_timing = TIMING_ZERO,
12440 .block_erasers =
12441 {
12442 {
12443 .eraseblocks = { {4 * 1024, 16384} },
12444 .block_erase = spi_block_erase_21,
12445 }, {
12446 .eraseblocks = { {4 * 1024, 16384} },
12447 .block_erase = spi_block_erase_20,
12448 }, {
12449 .eraseblocks = { {32 * 1024, 2048} },
12450 .block_erase = spi_block_erase_5c,
12451 }, {
12452 .eraseblocks = { {32 * 1024, 2048} },
12453 .block_erase = spi_block_erase_52,
12454 }, {
12455 .eraseblocks = { {64 * 1024, 1024} },
12456 .block_erase = spi_block_erase_dc,
12457 }, {
12458 .eraseblocks = { {64 * 1024, 1024} },
12459 .block_erase = spi_block_erase_d8,
12460 }, {
12461 .eraseblocks = { {64 * 1024 * 1024, 1} },
12462 .block_erase = spi_block_erase_60,
12463 }, {
12464 .eraseblocks = { {64 * 1024 * 1024, 1} },
12465 .block_erase = spi_block_erase_c7,
12466 }
12467 },
12468 /* TODO: security register */
Nico Huber1412d9f2024-01-06 18:25:49 +010012469 .reg_bits =
12470 {
Nico Huber4fa39c52024-03-27 01:18:12 +010012471 .qe = {STATUS1, 6, RW},
Nico Huber1412d9f2024-01-06 18:25:49 +010012472 .dc = {{CONFIG, 6, RW}, {CONFIG, 7, RW}},
12473 },
Nico Huber4fa39c52024-03-27 01:18:12 +010012474 .printlock = spi_prettyprint_status_register_bp3_srwd,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010012475 .unlock = spi_disable_blockprotect_bp3_srwd,
12476 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber1412d9f2024-01-06 18:25:49 +010012477 .read = spi_chip_read,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010012478 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012479 .prepare_access = spi_prepare_io,
12480 .finish_access = spi_finish_io,
Daniel Thompsoncadd4202018-06-04 13:52:22 +010012481 },
12482
12483 {
12484 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012485 .name = "MX25U6435E/F",
Stefan Tauner40bc96f2015-01-10 09:33:14 +000012486 .bustype = BUS_SPI,
12487 .manufacture_id = MACRONIX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012488 .model_id = MACRONIX_MX25U6435E,
Stefan Tauner40bc96f2015-01-10 09:33:14 +000012489 .total_size = 8192,
12490 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010012491 /* F model supports SFDP, FAST_READ_DOUT/_QOUT */
Alan Green1f9cc7d2019-07-01 11:10:45 +100012492 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber1412d9f2024-01-06 18:25:49 +010012493 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_FAST_READ |
12494 FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO | FEATURE_QPI_35_F5,
12495 .dummy_cycles =
12496 {
12497 .qpi_fast_read = 4,
12498 .qpi_fast_read_qio = 6,
12499 },
Stefan Tauner40bc96f2015-01-10 09:33:14 +000012500 .tested = TEST_OK_PREW,
12501 .probe = probe_spi_rdid,
12502 .probe_timing = TIMING_ZERO,
12503 .block_erasers =
12504 {
12505 {
12506 .eraseblocks = { {4 * 1024, 2048} },
12507 .block_erase = spi_block_erase_20,
12508 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000012509 .eraseblocks = { {32 * 1024, 256} },
12510 .block_erase = spi_block_erase_52,
12511 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100012512 .eraseblocks = { {64 * 1024, 128} },
12513 .block_erase = spi_block_erase_d8,
12514 }, {
Stefan Tauner40bc96f2015-01-10 09:33:14 +000012515 .eraseblocks = { {8 * 1024 * 1024, 1} },
12516 .block_erase = spi_block_erase_60,
12517 }, {
12518 .eraseblocks = { {8 * 1024 * 1024, 1} },
12519 .block_erase = spi_block_erase_c7,
12520 }
12521 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100012522 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010012523 .reg_bits =
12524 {
12525 .qe = {STATUS1, 6, RW},
12526 },
12527 .printlock = spi_prettyprint_status_register_bp3_srwd,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010012528 .unlock = spi_disable_blockprotect_bp3_srwd,
12529 .write = spi_chip_write_256,
Nico Huber1412d9f2024-01-06 18:25:49 +010012530 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012531 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012532 .prepare_access = spi_prepare_io,
12533 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012534 },
12535
12536 {
12537 .vendor = "Macronix",
12538 .name = "MX25U8032E",
12539 .bustype = BUS_SPI,
12540 .manufacture_id = MACRONIX_ID,
12541 .model_id = MACRONIX_MX25U8032E,
12542 .total_size = 1024,
12543 .page_size = 256,
12544 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
Nico Huber4fa39c52024-03-27 01:18:12 +010012545 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
12546 FEATURE_FAST_READ | FEATURE_FAST_READ_DIO | FEATURE_FAST_READ_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012547 .tested = TEST_OK_PREW,
12548 .probe = probe_spi_rdid,
12549 .probe_timing = TIMING_ZERO,
12550 .block_erasers =
12551 {
12552 {
12553 .eraseblocks = { {4 * 1024, 256} },
12554 .block_erase = spi_block_erase_20,
12555 }, {
12556 .eraseblocks = { {32 * 1024, 32} },
12557 .block_erase = spi_block_erase_52,
12558 }, {
12559 .eraseblocks = { {64 * 1024, 16} },
12560 .block_erase = spi_block_erase_d8,
12561 }, {
12562 .eraseblocks = { {1024 * 1024, 1} },
12563 .block_erase = spi_block_erase_60,
12564 }, {
12565 .eraseblocks = { {1024 * 1024, 1} },
12566 .block_erase = spi_block_erase_c7,
12567 }
12568 },
12569 /* TODO: security register */
Nico Huber4fa39c52024-03-27 01:18:12 +010012570 .reg_bits =
12571 {
12572 .qe = {STATUS1, 6, RW},
12573 },
12574 .printlock = spi_prettyprint_status_register_bp3_srwd,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012575 .unlock = spi_disable_blockprotect_bp3_srwd,
12576 .write = spi_chip_write_256,
Nico Huber4fa39c52024-03-27 01:18:12 +010012577 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012578 .voltage = {1650, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020012579 .prepare_access = spi_prepare_io,
12580 .finish_access = spi_finish_io,
Nathan Rennie-Waldock5a7f9422018-08-10 15:35:23 +010012581 },
12582
12583 {
12584 .vendor = "Macronix",
Mark Panajotovic502a9132009-08-24 01:42:24 +000012585 .name = "MX29F001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012586 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000012587 .manufacture_id = MACRONIX_ID,
12588 .model_id = MACRONIX_MX29F001B,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012589 .total_size = 128,
12590 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000012591 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12592 .tested = TEST_UNTESTED,
12593 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000012594 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000012595 .block_erasers =
12596 {
12597 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000012598 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000012599 {8 * 1024, 1},
12600 {4 * 1024, 2},
12601 {8 * 1024, 2},
12602 {32 * 1024, 1},
12603 {64 * 1024, 1},
12604 },
Sean Nelson35727f72010-01-28 23:55:12 +000012605 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000012606 }, {
12607 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000012608 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000012609 }
12610 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000012611 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012612 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012613 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012614 .prepare_access = prepare_memory_access,
12615 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012616 },
12617
12618 {
12619 .vendor = "Macronix",
12620 .name = "MX29F001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012621 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000012622 .manufacture_id = MACRONIX_ID,
12623 .model_id = MACRONIX_MX29F001T,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012624 .total_size = 128,
12625 .page_size = 32 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000012626 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stefan Tauner74c6ec62011-05-18 01:31:46 +000012627 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000012628 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000012629 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000012630 .block_erasers =
12631 {
12632 {
Stefan Tauner0554ca52013-07-25 22:54:25 +000012633 .eraseblocks = {
Sean Nelson54596372010-01-09 05:30:14 +000012634 {64 * 1024, 1},
12635 {32 * 1024, 1},
12636 {8 * 1024, 2},
12637 {4 * 1024, 2},
12638 {8 * 1024, 1},
12639 },
Sean Nelson35727f72010-01-28 23:55:12 +000012640 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000012641 }, {
12642 .eraseblocks = { {128 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000012643 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000012644 }
12645 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000012646 .write = write_jedec_1,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012647 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012648 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012649 .prepare_access = prepare_memory_access,
12650 .finish_access = finish_memory_access,
Mark Panajotovic502a9132009-08-24 01:42:24 +000012651 },
12652
12653 {
12654 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000012655 .name = "MX29F002(N)B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012656 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000012657 .manufacture_id = MACRONIX_ID,
12658 .model_id = MACRONIX_MX29F002B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000012659 .total_size = 256,
12660 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000012661 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000012662 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000012663 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000012664 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012665 .block_erasers =
12666 {
12667 {
12668 .eraseblocks = {
12669 {16 * 1024, 1},
12670 {8 * 1024, 2},
12671 {32 * 1024, 1},
12672 {64 * 1024, 3},
12673 },
Sean Nelson35727f72010-01-28 23:55:12 +000012674 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012675 }, {
12676 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000012677 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012678 },
12679 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000012680 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000012681 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012682 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012683 .prepare_access = prepare_memory_access,
12684 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000012685 },
12686
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000012687 {
12688 .vendor = "Macronix",
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000012689 .name = "MX29F002(N)T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012690 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000012691 .manufacture_id = MACRONIX_ID,
12692 .model_id = MACRONIX_MX29F002T,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000012693 .total_size = 256,
12694 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000012695 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000012696 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000012697 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000012698 .probe_timing = TIMING_ZERO,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012699 .block_erasers =
12700 {
12701 {
12702 .eraseblocks = {
12703 {64 * 1024, 3},
12704 {32 * 1024, 1},
12705 {8 * 1024, 2},
12706 {16 * 1024, 1},
12707 },
Sean Nelson35727f72010-01-28 23:55:12 +000012708 .block_erase = erase_sector_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012709 }, {
12710 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000012711 .block_erase = erase_chip_block_jedec,
Sean Nelson6b11ad22009-12-23 17:05:59 +000012712 },
12713 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000012714 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000012715 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000012716 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012717 .prepare_access = prepare_memory_access,
12718 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000012719 },
12720
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000012721 {
12722 .vendor = "Macronix",
Daniele Forsi6a18a932014-07-13 14:53:45 +000012723 .name = "MX29F022(N)B",
12724 .bustype = BUS_PARALLEL,
12725 .manufacture_id = MACRONIX_ID,
12726 .model_id = MACRONIX_MX29F022B,
12727 .total_size = 256,
12728 .page_size = 0, /* unused */
12729 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12730 .tested = TEST_UNTESTED,
12731 .probe = probe_jedec,
12732 .probe_timing = TIMING_ZERO,
12733 .block_erasers =
12734 {
12735 {
12736 .eraseblocks = {
12737 {16 * 1024, 1},
12738 {8 * 1024, 2},
12739 {32 * 1024, 1},
12740 {64 * 1024, 3},
12741 },
12742 .block_erase = erase_sector_jedec,
12743 }, {
12744 .eraseblocks = { {256 * 1024, 1} },
12745 .block_erase = erase_chip_block_jedec,
12746 }
12747 },
12748 .write = write_jedec_1,
12749 .read = read_memmapped,
12750 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012751 .prepare_access = prepare_memory_access,
12752 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000012753 },
12754
12755 {
12756 .vendor = "Macronix",
12757 .name = "MX29F022(N)T",
12758 .bustype = BUS_PARALLEL,
12759 .manufacture_id = MACRONIX_ID,
12760 .model_id = MACRONIX_MX29F022T,
12761 .total_size = 256,
12762 .page_size = 0, /* unused */
12763 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12764 .tested = TEST_OK_PREW,
12765 .probe = probe_jedec,
12766 .probe_timing = TIMING_ZERO,
12767 .block_erasers =
12768 {
12769 {
12770 .eraseblocks = {
12771 {64 * 1024, 3},
12772 {32 * 1024, 1},
12773 {8 * 1024, 2},
12774 {16 * 1024, 1},
12775 },
12776 .block_erase = erase_sector_jedec,
12777 }, {
12778 .eraseblocks = { {256 * 1024, 1} },
12779 .block_erase = erase_chip_block_jedec,
12780 }
12781 },
12782 .write = write_jedec_1,
12783 .read = read_memmapped,
12784 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012785 .prepare_access = prepare_memory_access,
12786 .finish_access = finish_memory_access,
Daniele Forsi6a18a932014-07-13 14:53:45 +000012787 },
12788
12789 {
12790 .vendor = "Macronix",
Joshua Roysf1324e02010-09-16 00:51:51 +000012791 .name = "MX29F040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000012792 .bustype = BUS_PARALLEL,
Joshua Roysf1324e02010-09-16 00:51:51 +000012793 .manufacture_id = MACRONIX_ID,
12794 .model_id = MACRONIX_MX29F040,
12795 .total_size = 512,
12796 .page_size = 64 * 1024,
12797 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12798 .tested = TEST_UNTESTED,
12799 .probe = probe_jedec,
12800 .probe_timing = TIMING_ZERO,
12801 .block_erasers =
12802 {
12803 {
12804 .eraseblocks = { {64 * 1024, 8} },
12805 .block_erase = erase_sector_jedec,
12806 }, {
12807 .eraseblocks = { {512 * 1024, 1} },
12808 .block_erase = erase_chip_block_jedec,
12809 },
12810 },
12811 .write = write_jedec_1,
12812 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000012813 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010012814 .prepare_access = prepare_memory_access,
12815 .finish_access = finish_memory_access,
Joshua Roysf1324e02010-09-16 00:51:51 +000012816 },
12817
12818 {
12819 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012820 .name = "MX29GL128F",
12821 .bustype = BUS_PARALLEL,
12822 .manufacture_id = MACRONIX_ID,
12823 .model_id = MACRONIX_MX29GL128F,
12824 .total_size = 16384,
12825 .page_size = 128 * 1024, /* actual page size is 16 */
12826 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12827 .tested = TEST_UNTESTED,
12828 .probe = probe_jedec_29gl,
12829 .probe_timing = TIMING_ZERO,
12830 .block_erasers =
12831 {
12832 {
12833 .eraseblocks = { {128 * 1024, 128} },
12834 .block_erase = erase_sector_jedec,
12835 }, {
12836 .eraseblocks = { {16 * 1024 * 1024, 1} },
12837 .block_erase = erase_chip_block_jedec,
12838 },
12839 },
12840 .write = write_jedec_1,
12841 .read = read_memmapped,
12842 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012843 .prepare_access = prepare_memory_access,
12844 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012845 },
12846
12847 {
12848 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012849 .name = "MX29GL320EB",
12850 .bustype = BUS_PARALLEL,
12851 .manufacture_id = MACRONIX_ID,
12852 .model_id = MACRONIX_MX29GL320EB,
12853 .total_size = 4096,
12854 .page_size = 128 * 1024, /* actual page size is 16 */
12855 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12856 .tested = TEST_UNTESTED,
12857 .probe = probe_jedec_29gl,
12858 .probe_timing = TIMING_ZERO,
12859 .block_erasers =
12860 {
12861 {
12862 .eraseblocks = {
12863 {8 * 1024, 8},
12864 {64 * 1024, 63},
12865 },
12866 .block_erase = erase_sector_jedec,
12867 }, {
12868 .eraseblocks = { {4 * 1024 * 1024, 1} },
12869 .block_erase = erase_chip_block_jedec,
12870 },
12871 },
12872 .write = write_jedec_1,
12873 .read = read_memmapped,
12874 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012875 .prepare_access = prepare_memory_access,
12876 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012877 },
12878
12879 {
12880 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012881 .name = "MX29GL320EH/L",
12882 .bustype = BUS_PARALLEL,
12883 .manufacture_id = MACRONIX_ID,
12884 .model_id = MACRONIX_MX29GL320EHL,
12885 .total_size = 4096,
12886 .page_size = 128 * 1024, /* actual page size is 16 */
12887 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12888 .tested = TEST_UNTESTED,
12889 .probe = probe_jedec_29gl,
12890 .probe_timing = TIMING_ZERO,
12891 .block_erasers =
12892 {
12893 {
12894 .eraseblocks = { {64 * 1024, 64} },
12895 .block_erase = erase_sector_jedec,
12896 }, {
12897 .eraseblocks = { {4 * 1024 * 1024, 1} },
12898 .block_erase = erase_chip_block_jedec,
12899 },
12900 },
12901 .write = write_jedec_1,
12902 .read = read_memmapped,
12903 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012904 .prepare_access = prepare_memory_access,
12905 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012906 },
12907
12908 {
12909 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012910 .name = "MX29GL320ET",
12911 .bustype = BUS_PARALLEL,
12912 .manufacture_id = MACRONIX_ID,
12913 .model_id = MACRONIX_MX29GL320ET,
12914 .total_size = 4096,
12915 .page_size = 128 * 1024, /* actual page size is 16 */
12916 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12917 .tested = TEST_UNTESTED,
12918 .probe = probe_jedec_29gl,
12919 .probe_timing = TIMING_ZERO,
12920 .block_erasers =
12921 {
12922 {
12923 .eraseblocks = {
12924 {64 * 1024, 63},
12925 {8 * 1024, 8},
12926 },
12927 .block_erase = erase_sector_jedec,
12928 }, {
12929 .eraseblocks = { {4 * 1024 * 1024, 1} },
12930 .block_erase = erase_chip_block_jedec,
12931 },
12932 },
12933 .write = write_jedec_1,
12934 .read = read_memmapped,
12935 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012936 .prepare_access = prepare_memory_access,
12937 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012938 },
12939
12940 {
12941 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012942 .name = "MX29GL640EB",
12943 .bustype = BUS_PARALLEL,
12944 .manufacture_id = MACRONIX_ID,
12945 .model_id = MACRONIX_MX29GL640EB,
12946 .total_size = 8192,
12947 .page_size = 128 * 1024, /* actual page size is 16 */
12948 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12949 .tested = TEST_UNTESTED,
12950 .probe = probe_jedec_29gl,
12951 .probe_timing = TIMING_ZERO,
12952 .block_erasers =
12953 {
12954 {
12955 .eraseblocks = {
12956 {8 * 1024, 8},
12957 {64 * 1024, 127},
12958 },
12959 .block_erase = erase_sector_jedec,
12960 }, {
12961 .eraseblocks = { {8 * 1024 * 1024, 1} },
12962 .block_erase = erase_chip_block_jedec,
12963 },
12964 },
12965 .write = write_jedec_1,
12966 .read = read_memmapped,
12967 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012968 .prepare_access = prepare_memory_access,
12969 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000012970 },
12971
12972 {
12973 .vendor = "Macronix",
Alan Green1f9cc7d2019-07-01 11:10:45 +100012974 .name = "MX29GL640EH/L",
12975 .bustype = BUS_PARALLEL,
12976 .manufacture_id = MACRONIX_ID,
12977 .model_id = MACRONIX_MX29GL640EHL,
12978 .total_size = 8192,
12979 .page_size = 128 * 1024, /* actual page size is 16 */
12980 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
12981 .tested = TEST_UNTESTED,
12982 .probe = probe_jedec_29gl,
12983 .probe_timing = TIMING_ZERO,
12984 .block_erasers =
12985 {
12986 {
12987 .eraseblocks = { {64 * 1024, 128} },
12988 .block_erase = erase_sector_jedec,
12989 }, {
12990 .eraseblocks = { {8 * 1024 * 1024, 1} },
12991 .block_erase = erase_chip_block_jedec,
12992 },
12993 },
12994 .write = write_jedec_1,
12995 .read = read_memmapped,
12996 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010012997 .prepare_access = prepare_memory_access,
12998 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100012999 },
13000
13001 {
13002 .vendor = "Macronix",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000013003 .name = "MX29GL640ET",
13004 .bustype = BUS_PARALLEL,
13005 .manufacture_id = MACRONIX_ID,
13006 .model_id = MACRONIX_MX29GL640ET,
13007 .total_size = 8192,
13008 .page_size = 128 * 1024, /* actual page size is 16 */
13009 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
13010 .tested = TEST_UNTESTED,
13011 .probe = probe_jedec_29gl,
13012 .probe_timing = TIMING_ZERO,
13013 .block_erasers =
13014 {
13015 {
13016 .eraseblocks = {
13017 {64 * 1024, 127},
13018 {8 * 1024, 8},
13019 },
13020 .block_erase = erase_sector_jedec,
13021 }, {
13022 .eraseblocks = { {8 * 1024 * 1024, 1} },
13023 .block_erase = erase_chip_block_jedec,
13024 },
13025 },
13026 .write = write_jedec_1,
13027 .read = read_memmapped,
13028 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013029 .prepare_access = prepare_memory_access,
13030 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000013031 },
13032
13033 {
13034 .vendor = "Macronix",
Carl-Daniel Hailfinger350a0c32009-07-24 13:59:27 +000013035 .name = "MX29LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000013036 .bustype = BUS_PARALLEL,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000013037 .manufacture_id = MACRONIX_ID,
13038 .model_id = MACRONIX_MX29LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013039 .total_size = 512,
13040 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000013041 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
13042 .tested = TEST_UNTESTED,
13043 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000013044 .probe_timing = TIMING_ZERO,
Sean Nelson54596372010-01-09 05:30:14 +000013045 .block_erasers =
13046 {
13047 {
Stefan Tauner6697f712014-08-06 15:09:15 +000013048 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000013049 .block_erase = erase_sector_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000013050 }, {
13051 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000013052 .block_erase = erase_chip_block_jedec,
Sean Nelson54596372010-01-09 05:30:14 +000013053 },
13054 },
Michael Karcher1c296ca2009-11-27 17:49:42 +000013055 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000013056 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000013057 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010013058 .prepare_access = prepare_memory_access,
13059 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger7de86392008-12-10 10:32:05 +000013060 },
13061
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000013062 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013063 .vendor = "Macronix",
Hemanth Guruva Reddya136d422019-07-11 11:08:27 +020013064 .name = "MX66L51235F/MX25L51245G",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013065 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013066 .manufacture_id = MACRONIX_ID,
13067 .model_id = MACRONIX_MX66L51235F,
13068 .total_size = 65536,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013069 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013070 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
13071 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013072 .tested = TEST_OK_PREW,
13073 .probe = probe_spi_rdid,
13074 .probe_timing = TIMING_ZERO,
13075 .block_erasers =
13076 {
13077 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013078 .eraseblocks = { {4 * 1024, 16384} },
13079 .block_erase = spi_block_erase_21,
13080 }, {
13081 .eraseblocks = { {4 * 1024, 16384} },
13082 .block_erase = spi_block_erase_20,
13083 }, {
13084 .eraseblocks = { {32 * 1024, 2048} },
13085 .block_erase = spi_block_erase_5c,
13086 }, {
13087 .eraseblocks = { {32 * 1024, 2048} },
13088 .block_erase = spi_block_erase_52,
13089 }, {
13090 .eraseblocks = { {64 * 1024, 1024} },
13091 .block_erase = spi_block_erase_dc,
13092 }, {
13093 .eraseblocks = { {64 * 1024, 1024} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013094 .block_erase = spi_block_erase_d8,
13095 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013096 .eraseblocks = { {64 * 1024 * 1024, 1} },
13097 .block_erase = spi_block_erase_60,
13098 }, {
13099 .eraseblocks = { {64 * 1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013100 .block_erase = spi_block_erase_c7,
13101 }
13102 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100013103 /* TODO: security register and SBLK/SBULK; MX25L12835F: configuration register */
13104 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013105 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013106 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013107 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013108 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020013109 .prepare_access = spi_prepare_io,
13110 .finish_access = spi_finish_io,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013111 },
13112
Patrick Rudolph3ba83152021-06-08 10:52:19 +020013113 {
13114 .vendor = "Macronix",
13115 .name = "MX66L1G45G",
13116 .bustype = BUS_SPI,
13117 .manufacture_id = MACRONIX_ID,
13118 .model_id = MACRONIX_MX66L1G45G,
13119 .total_size = 131072,
13120 .page_size = 256,
13121 /* OTP: 512B total; enter 0xB1, exit 0xC1 */
13122 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
13123 .tested = TEST_OK_PREW,
13124 .probe = probe_spi_rdid,
13125 .probe_timing = TIMING_ZERO,
13126 .block_erasers =
13127 {
13128 {
13129 .eraseblocks = { {4 * 1024, 32768} },
13130 .block_erase = spi_block_erase_21,
13131 }, {
13132 .eraseblocks = { {4 * 1024, 32768} },
13133 .block_erase = spi_block_erase_20,
13134 }, {
13135 .eraseblocks = { {32 * 1024, 4096} },
13136 .block_erase = spi_block_erase_5c,
13137 }, {
13138 .eraseblocks = { {32 * 1024, 4096} },
13139 .block_erase = spi_block_erase_52,
13140 }, {
13141 .eraseblocks = { {64 * 1024, 2048} },
13142 .block_erase = spi_block_erase_dc,
13143 }, {
13144 .eraseblocks = { {64 * 1024, 2048} },
13145 .block_erase = spi_block_erase_d8,
13146 }, {
13147 .eraseblocks = { {128 * 1024 * 1024, 1} },
13148 .block_erase = spi_block_erase_60,
13149 }, {
13150 .eraseblocks = { {128 * 1024 * 1024, 1} },
13151 .block_erase = spi_block_erase_c7,
13152 }
13153 },
13154 /* TODO: security register and SBLK/SBULK, configuration register */
13155 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
13156 .unlock = spi_disable_blockprotect_bp3_srwd,
13157 .write = spi_chip_write_256,
13158 .read = spi_chip_read, /* Fast read (0x0B) supported */
13159 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020013160 .prepare_access = spi_prepare_io,
13161 .finish_access = spi_finish_io,
Patrick Rudolph3ba83152021-06-08 10:52:19 +020013162 },
13163
Nico Huberc90d6c42025-01-02 23:37:59 +010013164 {
13165 .vendor = "Microchip",
13166 .name = "25LC080",
13167 .bustype = BUS_SPI,
13168 .total_size = 1,
13169 .page_size = 16,
13170 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13171 .tested = TEST_UNTESTED,
13172 .spi_cmd_set = SPI25_EEPROM,
13173 .probe = probe_noop,
13174 .probe_timing = TIMING_ZERO,
13175 .block_erasers =
13176 {
13177 {
13178 .eraseblocks = { {1 * 1024, 1} },
13179 .block_erase = spi_block_erase_emulation,
13180 }
13181 },
13182
13183 .printlock = spi_prettyprint_status_register_bp1_srwd,
13184 .unlock = spi_disable_blockprotect_bp1_srwd,
13185 .gran = write_gran_1bit,
13186 .write = spi_chip_write_256,
13187 .read = spi_chip_read,
13188 .voltage = {2500, 5500},
13189 },
13190
13191 {
13192 .vendor = "Microchip",
13193 .name = "25LC016",
13194 .bustype = BUS_SPI,
13195 .total_size = 2,
13196 .page_size = 16,
13197 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13198 .tested = TEST_UNTESTED,
13199 .spi_cmd_set = SPI25_EEPROM,
13200 .probe = probe_noop,
13201 .probe_timing = TIMING_ZERO,
13202 .block_erasers =
13203 {
13204 {
13205 .eraseblocks = { {2 * 1024, 1} },
13206 .block_erase = spi_block_erase_emulation,
13207 }
13208 },
13209
13210 .printlock = spi_prettyprint_status_register_bp1_srwd,
13211 .unlock = spi_disable_blockprotect_bp1_srwd,
13212 .gran = write_gran_1bit,
13213 .write = spi_chip_write_256,
13214 .read = spi_chip_read,
13215 .voltage = {2500, 5500},
13216 },
13217
13218 {
13219 .vendor = "Microchip",
13220 .name = "25LC032",
13221 .bustype = BUS_SPI,
13222 .total_size = 4,
13223 .page_size = 32,
13224 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13225 .tested = TEST_UNTESTED,
13226 .spi_cmd_set = SPI25_EEPROM,
13227 .probe = probe_noop,
13228 .probe_timing = TIMING_ZERO,
13229 .block_erasers =
13230 {
13231 {
13232 .eraseblocks = { {4 * 1024, 1} },
13233 .block_erase = spi_block_erase_emulation,
13234 }
13235 },
13236
13237 .printlock = spi_prettyprint_status_register_bp1_srwd,
13238 .unlock = spi_disable_blockprotect_bp1_srwd,
13239 .gran = write_gran_1bit,
13240 .write = spi_chip_write_256,
13241 .read = spi_chip_read,
13242 .voltage = {2500, 5500},
13243 },
13244
13245 {
13246 .vendor = "Microchip",
13247 .name = "25LC064",
13248 .bustype = BUS_SPI,
13249 .total_size = 8,
13250 .page_size = 32,
13251 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13252 .tested = TEST_UNTESTED,
13253 .spi_cmd_set = SPI25_EEPROM,
13254 .probe = probe_noop,
13255 .probe_timing = TIMING_ZERO,
13256 .block_erasers =
13257 {
13258 {
13259 .eraseblocks = { {8 * 1024, 1} },
13260 .block_erase = spi_block_erase_emulation,
13261 }
13262 },
13263
13264 .printlock = spi_prettyprint_status_register_bp1_srwd,
13265 .unlock = spi_disable_blockprotect_bp1_srwd,
13266 .gran = write_gran_1bit,
13267 .write = spi_chip_write_256,
13268 .read = spi_chip_read,
13269 .voltage = {2500, 5500},
13270 },
13271
13272 {
13273 .vendor = "Microchip",
13274 .name = "25LC128",
13275 .bustype = BUS_SPI,
13276 .total_size = 16,
13277 .page_size = 64,
13278 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13279 .tested = TEST_UNTESTED,
13280 .spi_cmd_set = SPI25_EEPROM,
13281 .probe = probe_noop,
13282 .probe_timing = TIMING_ZERO,
13283 .block_erasers =
13284 {
13285 {
13286 .eraseblocks = { {16 * 1024, 1} },
13287 .block_erase = spi_block_erase_emulation,
13288 }
13289 },
13290
13291 .printlock = spi_prettyprint_status_register_bp1_srwd,
13292 .unlock = spi_disable_blockprotect_bp1_srwd,
13293 .gran = write_gran_1bit,
13294 .write = spi_chip_write_256,
13295 .read = spi_chip_read,
13296 .voltage = {2500, 5500},
13297 },
13298
13299 {
13300 .vendor = "Microchip",
13301 .name = "25LC256",
13302 .bustype = BUS_SPI,
13303 .total_size = 32,
13304 .page_size = 64,
13305 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13306 .tested = TEST_UNTESTED,
13307 .spi_cmd_set = SPI25_EEPROM,
13308 .probe = probe_noop,
13309 .probe_timing = TIMING_ZERO,
13310 .block_erasers =
13311 {
13312 {
13313 .eraseblocks = { {32 * 1024, 1} },
13314 .block_erase = spi_block_erase_emulation,
13315 }
13316 },
13317
13318 .printlock = spi_prettyprint_status_register_bp1_srwd,
13319 .unlock = spi_disable_blockprotect_bp1_srwd,
13320 .gran = write_gran_1bit,
13321 .write = spi_chip_write_256,
13322 .read = spi_chip_read,
13323 .voltage = {2500, 5500},
13324 },
13325
13326 {
13327 .vendor = "Microchip",
13328 .name = "25LC512",
13329 .bustype = BUS_SPI,
13330 .total_size = 64,
13331 .page_size = 128,
13332 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13333 .tested = TEST_UNTESTED,
13334 .spi_cmd_set = SPI25_EEPROM,
13335 .probe = probe_noop,
13336 .probe_timing = TIMING_ZERO,
13337 .block_erasers =
13338 {
13339 {
13340 .eraseblocks = { {64 * 1024, 1} },
13341 .block_erase = spi_block_erase_emulation,
13342 }
13343 },
13344
13345 .printlock = spi_prettyprint_status_register_bp1_srwd,
13346 .unlock = spi_disable_blockprotect_bp1_srwd,
13347 .gran = write_gran_1bit,
13348 .write = spi_chip_write_256,
13349 .read = spi_chip_read,
13350 .voltage = {2500, 5500},
13351 },
13352
13353 {
13354 .vendor = "Microchip",
13355 .name = "25LC1024",
13356 .bustype = BUS_SPI,
13357 .total_size = 128,
13358 .page_size = 256,
13359 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
13360 .tested = TEST_UNTESTED,
13361 .spi_cmd_set = SPI25_EEPROM,
13362 .probe = probe_noop,
13363 .probe_timing = TIMING_ZERO,
13364 .block_erasers =
13365 {
13366 {
13367 .eraseblocks = { {128 * 1024, 1} },
13368 .block_erase = spi_block_erase_emulation,
13369 }
13370 },
13371
13372 .printlock = spi_prettyprint_status_register_bp1_srwd,
13373 .unlock = spi_disable_blockprotect_bp1_srwd,
13374 .gran = write_gran_1bit,
13375 .write = spi_chip_write_256,
13376 .read = spi_chip_read,
13377 .voltage = {2500, 5500},
13378 },
13379
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013380 /* The ST M25P05 is a bit of a problem. It has the same ID as the
13381 * ST M25P05-A in RES mode, but supports only 128 byte writes instead
13382 * of 256 byte writes. We rely heavily on the fact that probe_spi_res1
13383 * only is successful if RDID does not work.
13384 */
13385 {
13386 .vendor = "Micron/Numonyx/ST",
13387 .name = "M25P05",
13388 .bustype = BUS_SPI,
13389 .manufacture_id = 0, /* Not used. */
13390 .model_id = ST_M25P05_RES,
13391 .total_size = 64,
13392 .page_size = 256,
13393 .feature_bits = FEATURE_WRSR_WREN,
13394 .tested = TEST_UNTESTED,
13395 .probe = probe_spi_res1,
13396 .probe_timing = TIMING_ZERO,
13397 .block_erasers =
13398 {
13399 {
13400 .eraseblocks = { {32 * 1024, 2} },
13401 .block_erase = spi_block_erase_d8,
13402 }, {
13403 .eraseblocks = { {64 * 1024, 1} },
13404 .block_erase = spi_block_erase_c7,
13405 }
13406 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013407 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013408 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013409 .write = spi_chip_write_1, /* 128 */
13410 .read = spi_chip_read,
13411 .voltage = {2700, 3600},
13412 },
13413
13414 {
13415 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013416 .name = "M25P05-A",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013417 .bustype = BUS_SPI,
13418 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013419 .model_id = ST_M25P05A,
13420 .total_size = 64,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013421 .page_size = 256,
13422 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000013423 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013424 .probe = probe_spi_rdid,
13425 .probe_timing = TIMING_ZERO,
13426 .block_erasers =
13427 {
13428 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013429 .eraseblocks = { {32 * 1024, 2} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013430 .block_erase = spi_block_erase_d8,
13431 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013432 .eraseblocks = { {64 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013433 .block_erase = spi_block_erase_c7,
13434 }
13435 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013436 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013437 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013438 .write = spi_chip_write_256,
13439 .read = spi_chip_read,
13440 .voltage = {2700, 3600},
13441 },
13442
13443 /* The ST M25P10 has the same problem as the M25P05. */
13444 {
13445 .vendor = "Micron/Numonyx/ST",
13446 .name = "M25P10",
13447 .bustype = BUS_SPI,
13448 .manufacture_id = 0, /* Not used. */
13449 .model_id = ST_M25P10_RES,
13450 .total_size = 128,
13451 .page_size = 256,
13452 .feature_bits = FEATURE_WRSR_WREN,
13453 .tested = TEST_UNTESTED,
13454 .probe = probe_spi_res1,
13455 .probe_timing = TIMING_ZERO,
13456 .block_erasers =
13457 {
13458 {
13459 .eraseblocks = { {32 * 1024, 4} },
13460 .block_erase = spi_block_erase_d8,
13461 }, {
13462 .eraseblocks = { {128 * 1024, 1} },
13463 .block_erase = spi_block_erase_c7,
13464 }
13465 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013466 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013467 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013468 .write = spi_chip_write_1, /* 128 */
13469 .read = spi_chip_read,
13470 .voltage = {2700, 3600},
13471 },
13472
13473 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013474 .vendor = "Micron/Numonyx/ST",
13475 .name = "M25P10-A",
13476 .bustype = BUS_SPI,
13477 .manufacture_id = ST_ID,
13478 .model_id = ST_M25P10A,
13479 .total_size = 128,
13480 .page_size = 256,
13481 .feature_bits = FEATURE_WRSR_WREN,
13482 .tested = TEST_OK_PREW,
13483 .probe = probe_spi_rdid,
13484 .probe_timing = TIMING_ZERO,
13485 .block_erasers =
13486 {
13487 {
13488 .eraseblocks = { {32 * 1024, 4} },
13489 .block_erase = spi_block_erase_d8,
13490 }, {
13491 .eraseblocks = { {128 * 1024, 1} },
13492 .block_erase = spi_block_erase_c7,
13493 }
13494 },
13495 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
13496 .unlock = spi_disable_blockprotect_bp3_srwd,
13497 .write = spi_chip_write_256,
13498 .read = spi_chip_read,
13499 .voltage = {2700, 3600},
13500 },
13501
13502 {
13503 .vendor = "Micron/Numonyx/ST",
13504 .name = "M25P128",
13505 .bustype = BUS_SPI,
13506 .manufacture_id = ST_ID,
13507 .model_id = ST_M25P128,
13508 .total_size = 16384,
13509 .page_size = 256,
13510 .feature_bits = FEATURE_WRSR_WREN,
13511 .tested = TEST_OK_PREW,
13512 .probe = probe_spi_rdid,
13513 .probe_timing = TIMING_ZERO,
13514 .block_erasers =
13515 {
13516 {
13517 .eraseblocks = { {256 * 1024, 64} },
13518 .block_erase = spi_block_erase_d8,
13519 }, {
13520 .eraseblocks = { {16 * 1024 * 1024, 1} },
13521 .block_erase = spi_block_erase_c7,
13522 }
13523 },
13524 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
13525 .unlock = spi_disable_blockprotect_bp3_srwd,
13526 .write = spi_chip_write_256,
13527 .read = spi_chip_read,
13528 .voltage = {2700, 3600},
13529 },
13530
13531 {
13532 .vendor = "Micron/Numonyx/ST",
13533 .name = "M25P16",
13534 .bustype = BUS_SPI,
13535 .manufacture_id = ST_ID,
13536 .model_id = ST_M25P16,
13537 .total_size = 2048,
13538 .page_size = 256,
13539 .feature_bits = FEATURE_WRSR_WREN,
13540 .tested = TEST_OK_PREW,
13541 .probe = probe_spi_rdid,
13542 .probe_timing = TIMING_ZERO,
13543 .block_erasers =
13544 {
13545 {
13546 .eraseblocks = { {64 * 1024, 32} },
13547 .block_erase = spi_block_erase_d8,
13548 }, {
13549 .eraseblocks = { {2 * 1024 * 1024, 1} },
13550 .block_erase = spi_block_erase_c7,
13551 }
13552 },
13553 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
13554 .unlock = spi_disable_blockprotect_bp3_srwd,
13555 .write = spi_chip_write_256,
13556 .read = spi_chip_read,
13557 .voltage = {2700, 3600},
13558 },
13559
13560 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013561 .vendor = "Micron/Numonyx/ST", /* Numonyx */
13562 .name = "M25P20",
13563 .bustype = BUS_SPI,
13564 .manufacture_id = ST_ID,
13565 .model_id = ST_M25P20,
13566 .total_size = 256,
13567 .page_size = 256,
13568 .feature_bits = FEATURE_WRSR_WREN,
13569 .tested = TEST_UNTESTED,
13570 .probe = probe_spi_rdid,
13571 .probe_timing = TIMING_ZERO,
13572 .block_erasers =
13573 {
13574 {
13575 .eraseblocks = { {64 * 1024, 4} },
13576 .block_erase = spi_block_erase_d8,
13577 }, {
13578 .eraseblocks = { {256 * 1024, 1} },
13579 .block_erase = spi_block_erase_c7,
13580 }
13581 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013582 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013583 .unlock = spi_disable_blockprotect,
13584 .write = spi_chip_write_256,
13585 .read = spi_chip_read, /* Fast read (0x0B) supported */
13586 .voltage = {2700, 3600},
13587 },
13588
13589 {
13590 .vendor = "Micron/Numonyx/ST",
13591 .name = "M25P20-old",
13592 .bustype = BUS_SPI,
13593 .manufacture_id = 0, /* Not used. */
13594 .model_id = ST_M25P20_RES,
13595 .total_size = 256,
13596 .page_size = 256,
13597 .feature_bits = FEATURE_WRSR_WREN,
13598 .tested = TEST_OK_PREW,
13599 .probe = probe_spi_res1,
13600 .probe_timing = TIMING_ZERO,
13601 .block_erasers =
13602 {
13603 {
13604 .eraseblocks = { {64 * 1024, 4} },
13605 .block_erase = spi_block_erase_d8,
13606 }, {
13607 .eraseblocks = { {256 * 1024, 1} },
13608 .block_erase = spi_block_erase_c7,
13609 }
13610 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013611 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013612 .unlock = spi_disable_blockprotect,
13613 .write = spi_chip_write_256,
13614 .read = spi_chip_read, /* Fast read (0x0B) supported */
13615 .voltage = {2700, 3600},
13616 },
13617
13618 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013619 .vendor = "Micron/Numonyx/ST",
13620 .name = "M25P32",
13621 .bustype = BUS_SPI,
13622 .manufacture_id = ST_ID,
13623 .model_id = ST_M25P32,
13624 .total_size = 4096,
13625 .page_size = 256,
13626 .feature_bits = FEATURE_WRSR_WREN,
13627 .tested = TEST_OK_PREW,
13628 .probe = probe_spi_rdid,
13629 .probe_timing = TIMING_ZERO,
13630 .block_erasers =
13631 {
13632 {
13633 .eraseblocks = { {64 * 1024, 64} },
13634 .block_erase = spi_block_erase_d8,
13635 }, {
13636 .eraseblocks = { {4 * 1024 * 1024, 1} },
13637 .block_erase = spi_block_erase_c7,
13638 }
13639 },
13640 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
13641 .unlock = spi_disable_blockprotect_bp3_srwd,
13642 .write = spi_chip_write_256,
13643 .read = spi_chip_read,
13644 .voltage = {2700, 3600},
13645 },
13646
13647 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013648 .vendor = "Micron/Numonyx/ST", /* Numonyx */
13649 .name = "M25P40",
13650 .bustype = BUS_SPI,
13651 .manufacture_id = ST_ID,
13652 .model_id = ST_M25P40,
13653 .total_size = 512,
13654 .page_size = 256,
13655 .feature_bits = FEATURE_WRSR_WREN,
13656 .tested = TEST_OK_PREW,
13657 .probe = probe_spi_rdid,
13658 .probe_timing = TIMING_ZERO,
13659 .block_erasers =
13660 {
13661 {
13662 .eraseblocks = { {64 * 1024, 8} },
13663 .block_erase = spi_block_erase_d8,
13664 }, {
13665 .eraseblocks = { {512 * 1024, 1} },
13666 .block_erase = spi_block_erase_c7,
13667 }
13668 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013669 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013670 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013671 .write = spi_chip_write_256,
13672 .read = spi_chip_read,
13673 .voltage = {2700, 3600},
13674 },
13675
13676 {
13677 .vendor = "Micron/Numonyx/ST",
13678 .name = "M25P40-old",
13679 .bustype = BUS_SPI,
13680 .manufacture_id = 0, /* Not used. */
13681 .model_id = ST_M25P40_RES,
13682 .total_size = 512,
13683 .page_size = 256,
13684 .feature_bits = FEATURE_WRSR_WREN,
13685 .tested = TEST_UNTESTED,
13686 .probe = probe_spi_res1,
13687 .probe_timing = TIMING_ZERO,
13688 .block_erasers =
13689 {
13690 {
13691 .eraseblocks = { {64 * 1024, 8} },
13692 .block_erase = spi_block_erase_d8,
13693 }, {
13694 .eraseblocks = { {512 * 1024, 1} },
13695 .block_erase = spi_block_erase_c7,
13696 }
13697 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013698 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013699 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013700 .write = spi_chip_write_256,
13701 .read = spi_chip_read,
13702 },
13703
13704 {
13705 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013706 .name = "M25P64",
13707 .bustype = BUS_SPI,
13708 .manufacture_id = ST_ID,
13709 .model_id = ST_M25P64,
13710 .total_size = 8192,
13711 .page_size = 256,
13712 .feature_bits = FEATURE_WRSR_WREN,
13713 .tested = TEST_OK_PREW,
13714 .probe = probe_spi_rdid,
13715 .probe_timing = TIMING_ZERO,
13716 .block_erasers =
13717 {
13718 {
13719 .eraseblocks = { {64 * 1024, 128} },
13720 .block_erase = spi_block_erase_d8,
13721 }, {
13722 .eraseblocks = { {8 * 1024 * 1024, 1} },
13723 .block_erase = spi_block_erase_c7,
13724 }
13725 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013726 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013727 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013728 .write = spi_chip_write_256,
13729 .read = spi_chip_read,
13730 .voltage = {2700, 3600},
13731 },
13732
13733 {
13734 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013735 .name = "M25P80",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013736 .bustype = BUS_SPI,
13737 .manufacture_id = ST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100013738 .model_id = ST_M25P80,
13739 .total_size = 1024,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013740 .page_size = 256,
13741 .feature_bits = FEATURE_WRSR_WREN,
13742 .tested = TEST_OK_PREW,
13743 .probe = probe_spi_rdid,
13744 .probe_timing = TIMING_ZERO,
13745 .block_erasers =
13746 {
13747 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013748 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013749 .block_erase = spi_block_erase_d8,
13750 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100013751 .eraseblocks = { {1024 * 1024, 1} },
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013752 .block_erase = spi_block_erase_c7,
13753 }
13754 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013755 .printlock = spi_prettyprint_status_register_bp3_srwd, /* TODO: check */
Stefan Tauner5c316f92015-02-08 21:57:52 +000013756 .unlock = spi_disable_blockprotect_bp3_srwd,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013757 .write = spi_chip_write_256,
13758 .read = spi_chip_read,
13759 .voltage = {2700, 3600},
13760 },
13761
13762 {
13763 .vendor = "Micron/Numonyx/ST",
13764 .name = "M25PE10",
13765 .bustype = BUS_SPI,
13766 .manufacture_id = ST_ID,
13767 .model_id = ST_M25PE10,
13768 .total_size = 128,
13769 .page_size = 256,
13770 .feature_bits = FEATURE_WRSR_WREN,
13771 .tested = TEST_UNTESTED,
13772 .probe = probe_spi_rdid,
13773 .probe_timing = TIMING_ZERO,
13774 .block_erasers =
13775 {
13776 {
13777 .eraseblocks = { {4 * 1024, 32} },
13778 .block_erase = spi_block_erase_20,
13779 }, {
13780 .eraseblocks = { {64 * 1024, 2} },
13781 .block_erase = spi_block_erase_d8,
13782 }, {
13783 .eraseblocks = { {128 * 1024, 1} },
13784 .block_erase = spi_block_erase_c7,
13785 }
13786 },
13787 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
13788 .unlock = spi_disable_blockprotect,
13789 .write = spi_chip_write_256,
13790 .read = spi_chip_read,
13791 .voltage = {2700, 3600},
13792 },
13793
13794 {
13795 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100013796 .name = "M25PE16",
13797 .bustype = BUS_SPI,
13798 .manufacture_id = ST_ID,
13799 .model_id = ST_M25PE16,
13800 .total_size = 2048,
13801 .page_size = 256,
13802 .feature_bits = FEATURE_WRSR_WREN,
13803 .tested = TEST_UNTESTED,
13804 .probe = probe_spi_rdid,
13805 .probe_timing = TIMING_ZERO,
13806 .block_erasers =
13807 {
13808 {
13809 .eraseblocks = { {4 * 1024, 512} },
13810 .block_erase = spi_block_erase_20,
13811 }, {
13812 .eraseblocks = { {64 * 1024, 32} },
13813 .block_erase = spi_block_erase_d8,
13814 }, {
13815 .eraseblocks = { {2 * 1024 * 1024, 1} },
13816 .block_erase = spi_block_erase_c7,
13817 }
13818 },
13819 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
13820 .unlock = spi_disable_blockprotect,
13821 .write = spi_chip_write_256,
13822 .read = spi_chip_read,
13823 .voltage = {2700, 3600},
13824 },
13825
13826 {
13827 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013828 .name = "M25PE20",
13829 .bustype = BUS_SPI,
13830 .manufacture_id = ST_ID,
13831 .model_id = ST_M25PE20,
13832 .total_size = 256,
13833 .page_size = 256,
13834 .feature_bits = FEATURE_WRSR_WREN,
13835 .tested = TEST_UNTESTED,
13836 .probe = probe_spi_rdid,
13837 .probe_timing = TIMING_ZERO,
13838 .block_erasers =
13839 {
13840 {
13841 .eraseblocks = { {4 * 1024, 64} },
13842 .block_erase = spi_block_erase_20,
13843 }, {
13844 .eraseblocks = { {64 * 1024, 4} },
13845 .block_erase = spi_block_erase_d8,
13846 }, {
13847 .eraseblocks = { {256 * 1024, 1} },
13848 .block_erase = spi_block_erase_c7,
13849 }
13850 },
13851 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
13852 .unlock = spi_disable_blockprotect,
13853 .write = spi_chip_write_256,
13854 .read = spi_chip_read,
13855 .voltage = {2700, 3600},
13856 },
13857
13858 {
13859 .vendor = "Micron/Numonyx/ST",
13860 .name = "M25PE40",
13861 .bustype = BUS_SPI,
13862 .manufacture_id = ST_ID,
13863 .model_id = ST_M25PE40,
13864 .total_size = 512,
13865 .page_size = 256,
13866 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner23e10b82016-01-23 16:16:49 +000013867 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013868 .probe = probe_spi_rdid,
13869 .probe_timing = TIMING_ZERO,
13870 .block_erasers =
13871 {
13872 {
13873 .eraseblocks = { {4 * 1024, 128} },
13874 .block_erase = spi_block_erase_20,
13875 }, {
13876 .eraseblocks = { {64 * 1024, 8} },
13877 .block_erase = spi_block_erase_d8,
13878 }, {
13879 .eraseblocks = { {512 * 1024, 1} },
13880 .block_erase = spi_block_erase_c7,
13881 }
13882 },
13883 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
13884 .unlock = spi_disable_blockprotect,
13885 .write = spi_chip_write_256,
13886 .read = spi_chip_read,
13887 .voltage = {2700, 3600},
13888 },
13889
13890 {
13891 .vendor = "Micron/Numonyx/ST",
13892 .name = "M25PE80",
13893 .bustype = BUS_SPI,
13894 .manufacture_id = ST_ID,
13895 .model_id = ST_M25PE80,
13896 .total_size = 1024,
13897 .page_size = 256,
13898 .feature_bits = FEATURE_WRSR_WREN,
13899 .tested = TEST_OK_PREW,
13900 .probe = probe_spi_rdid,
13901 .probe_timing = TIMING_ZERO,
13902 .block_erasers =
13903 {
13904 {
13905 .eraseblocks = { {4 * 1024, 256} },
13906 .block_erase = spi_block_erase_20,
13907 }, {
13908 .eraseblocks = { {64 * 1024, 16} },
13909 .block_erase = spi_block_erase_d8,
13910 }, {
13911 .eraseblocks = { {1024 * 1024, 1} },
13912 .block_erase = spi_block_erase_c7,
13913 }
13914 },
13915 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
13916 .unlock = spi_disable_blockprotect,
13917 .write = spi_chip_write_256,
13918 .read = spi_chip_read,
13919 .voltage = {2700, 3600},
13920 },
13921
13922 {
13923 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013924 .name = "M25PX16",
13925 .bustype = BUS_SPI,
13926 .manufacture_id = ST_ID,
13927 .model_id = ST_M25PX16,
13928 .total_size = 2048,
13929 .page_size = 256,
13930 /* OTP: 64B total; read 0x4B; write 0x42 */
13931 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13932 .tested = TEST_OK_PREW,
13933 .probe = probe_spi_rdid,
13934 .probe_timing = TIMING_ZERO,
13935 .block_erasers =
13936 {
13937 {
13938 .eraseblocks = { { 4 * 1024, 512 } },
13939 .block_erase = spi_block_erase_20,
13940 }, {
13941 .eraseblocks = { {64 * 1024, 32} },
13942 .block_erase = spi_block_erase_d8,
13943 }, {
13944 .eraseblocks = { {2 * 1024 * 1024, 1} },
13945 .block_erase = spi_block_erase_c7,
13946 }
13947 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013948 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013949 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
13950 .write = spi_chip_write_256,
13951 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000013952 .voltage = {2300, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013953 },
13954
13955 {
13956 .vendor = "Micron/Numonyx/ST",
13957 .name = "M25PX32",
13958 .bustype = BUS_SPI,
13959 .manufacture_id = ST_ID,
13960 .model_id = ST_M25PX32,
13961 .total_size = 4096,
13962 .page_size = 256,
13963 /* OTP: 64B total; read 0x4B; write 0x42 */
13964 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
13965 .tested = TEST_OK_PRE,
13966 .probe = probe_spi_rdid,
13967 .probe_timing = TIMING_ZERO,
13968 .block_erasers =
13969 {
13970 {
13971 .eraseblocks = { { 4 * 1024, 1024 } },
13972 .block_erase = spi_block_erase_20,
13973 }, {
13974 .eraseblocks = { {64 * 1024, 64} },
13975 .block_erase = spi_block_erase_d8,
13976 }, {
13977 .eraseblocks = { {4 * 1024 * 1024, 1} },
13978 .block_erase = spi_block_erase_c7,
13979 }
13980 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000013981 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013982 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
13983 .write = spi_chip_write_256,
13984 .read = spi_chip_read,
13985 .voltage = {2700, 3600},
13986 },
13987
13988 {
13989 .vendor = "Micron/Numonyx/ST",
13990 .name = "M25PX64",
13991 .bustype = BUS_SPI,
13992 .manufacture_id = ST_ID,
13993 .model_id = ST_M25PX64,
13994 .total_size = 8192,
13995 .page_size = 256,
13996 /* OTP: 64B total; read 0x4B; write 0x42 */
13997 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000013998 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000013999 .probe = probe_spi_rdid,
14000 .probe_timing = TIMING_ZERO,
14001 .block_erasers =
14002 {
14003 {
14004 .eraseblocks = { { 4 * 1024, 2048 } },
14005 .block_erase = spi_block_erase_20,
14006 }, {
14007 .eraseblocks = { {64 * 1024, 128} },
14008 .block_erase = spi_block_erase_d8,
14009 }, {
14010 .eraseblocks = { {8 * 1024 * 1024, 1} },
14011 .block_erase = spi_block_erase_c7,
14012 }
14013 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000014014 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014015 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
14016 .write = spi_chip_write_256,
14017 .read = spi_chip_read,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000014018 .voltage = {2700, 3600},
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014019 },
14020
14021 {
14022 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014023 .name = "M25PX80",
14024 .bustype = BUS_SPI,
14025 .manufacture_id = ST_ID,
14026 .model_id = ST_M25PX80,
14027 .total_size = 1024,
14028 .page_size = 256,
14029 /* OTP: 64B total; read 0x4B, write 0x42 */
14030 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14031 .tested = TEST_OK_PREW,
14032 .probe = probe_spi_rdid,
14033 .probe_timing = TIMING_ZERO,
14034 .block_erasers =
14035 {
14036 {
14037 .eraseblocks = { { 4 * 1024, 256 } },
14038 .block_erase = spi_block_erase_20,
14039 }, {
14040 .eraseblocks = { {64 * 1024, 16} },
14041 .block_erase = spi_block_erase_d8,
14042 }, {
14043 .eraseblocks = { {1024 * 1024, 1} },
14044 .block_erase = spi_block_erase_c7,
14045 }
14046 },
14047 .printlock = spi_prettyprint_status_register_bp2_srwd, /* bit5: T/B */
14048 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: per 64kB sector lock registers */
14049 .write = spi_chip_write_256,
14050 .read = spi_chip_read,
14051 .voltage = {2700, 3600},
14052 },
14053
14054 {
14055 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014056 .name = "M45PE10",
14057 .bustype = BUS_SPI,
14058 .manufacture_id = ST_ID,
14059 .model_id = ST_M45PE10,
14060 .total_size = 128,
14061 .page_size = 256,
14062 .tested = TEST_UNTESTED,
14063 .probe = probe_spi_rdid,
14064 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014065 .block_erasers =
14066 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014067 {
14068 .eraseblocks = { {256, 512} },
14069 .block_erase = spi_block_erase_db,
14070 }, {
14071 .eraseblocks = { {64 * 1024, 2} },
14072 .block_erase = spi_block_erase_d8,
14073 }
14074 },
14075 .printlock = spi_prettyprint_status_register_default_welwip,
14076 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
14077 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
14078 .read = spi_chip_read, /* Fast read (0x0B) supported */
14079 .voltage = {2700, 3600},
14080 },
14081
14082 {
14083 .vendor = "Micron/Numonyx/ST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100014084 .name = "M45PE16",
14085 .bustype = BUS_SPI,
14086 .manufacture_id = ST_ID,
14087 .model_id = ST_M45PE16,
14088 .total_size = 2048,
14089 .page_size = 256,
14090 .tested = TEST_UNTESTED,
14091 .probe = probe_spi_rdid,
14092 .probe_timing = TIMING_ZERO,
14093 .block_erasers =
14094 {
14095 {
14096 .eraseblocks = { {256, 8192} },
14097 .block_erase = spi_block_erase_db,
14098 }, {
14099 .eraseblocks = { {64 * 1024, 32} },
14100 .block_erase = spi_block_erase_d8,
14101 }
14102 },
14103 .printlock = spi_prettyprint_status_register_default_welwip,
14104 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
14105 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
14106 .read = spi_chip_read, /* Fast read (0x0B) supported */
14107 .voltage = {2700, 3600},
14108 },
14109
14110 {
14111 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014112 .name = "M45PE20",
14113 .bustype = BUS_SPI,
14114 .manufacture_id = ST_ID,
14115 .model_id = ST_M45PE20,
14116 .total_size = 256,
14117 .page_size = 256,
14118 .tested = TEST_UNTESTED,
14119 .probe = probe_spi_rdid,
14120 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014121 .block_erasers =
14122 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014123 {
14124 .eraseblocks = { {256, 1024} },
14125 .block_erase = spi_block_erase_db,
14126 }, {
14127 .eraseblocks = { {64 * 1024, 4} },
14128 .block_erase = spi_block_erase_d8,
14129 }
14130 },
14131 .printlock = spi_prettyprint_status_register_default_welwip,
14132 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
14133 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
14134 .read = spi_chip_read, /* Fast read (0x0B) supported */
14135 .voltage = {2700, 3600},
14136 },
14137
14138 {
14139 .vendor = "Micron/Numonyx/ST",
14140 .name = "M45PE40",
14141 .bustype = BUS_SPI,
14142 .manufacture_id = ST_ID,
14143 .model_id = ST_M45PE40,
14144 .total_size = 512,
14145 .page_size = 256,
14146 .tested = TEST_UNTESTED,
14147 .probe = probe_spi_rdid,
14148 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014149 .block_erasers =
14150 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014151 {
14152 .eraseblocks = { {256, 2048} },
14153 .block_erase = spi_block_erase_db,
14154 }, {
14155 .eraseblocks = { {64 * 1024, 8} },
14156 .block_erase = spi_block_erase_d8,
14157 }
14158 },
14159 .printlock = spi_prettyprint_status_register_default_welwip,
14160 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
Stefan Tauner23e10b82016-01-23 16:16:49 +000014161 .write = spi_chip_write_256, /* Page write supported (similar to PP but allows 0->1 changes) */
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014162 .read = spi_chip_read, /* Fast read (0x0B) supported */
14163 .voltage = {2700, 3600},
14164 },
14165
14166 {
14167 .vendor = "Micron/Numonyx/ST",
14168 .name = "M45PE80",
14169 .bustype = BUS_SPI,
14170 .manufacture_id = ST_ID,
14171 .model_id = ST_M45PE80,
14172 .total_size = 1024,
14173 .page_size = 256,
14174 .tested = TEST_UNTESTED,
14175 .probe = probe_spi_rdid,
14176 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014177 .block_erasers =
14178 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014179 {
14180 .eraseblocks = { {256, 4096} },
14181 .block_erase = spi_block_erase_db,
14182 }, {
14183 .eraseblocks = { {64 * 1024, 16} },
14184 .block_erase = spi_block_erase_d8,
14185 }
14186 },
14187 .printlock = spi_prettyprint_status_register_default_welwip,
14188 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
14189 .write = spi_chip_write_256, /* Page write (similar to PP but allows 0->1 changes) */
14190 .read = spi_chip_read, /* Fast read (0x0B) supported */
14191 .voltage = {2700, 3600},
14192 },
14193
14194 {
14195 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014196 .name = "N25Q00A..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
14197 .bustype = BUS_SPI,
14198 .manufacture_id = ST_ID,
14199 .model_id = ST_N25Q00A__1G,
14200 .total_size = 131072,
14201 .page_size = 256,
14202 /* supports SFDP */
14203 /* OTP: 64B total; read 0x4B, write 0x42 */
14204 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14205 .tested = TEST_UNTESTED,
14206 .probe = probe_spi_rdid,
14207 .probe_timing = TIMING_ZERO,
14208 .block_erasers =
14209 {
14210 {
14211 .eraseblocks = { {4 * 1024, 32768} },
14212 .block_erase = spi_block_erase_21,
14213 }, {
14214 .eraseblocks = { {4 * 1024, 32768} },
14215 .block_erase = spi_block_erase_20,
14216 }, {
14217 .eraseblocks = { {64 * 1024, 2048} },
14218 .block_erase = spi_block_erase_dc,
14219 }, {
14220 .eraseblocks = { {64 * 1024, 2048} },
14221 .block_erase = spi_block_erase_d8,
14222 }, {
14223 .eraseblocks = { {32768 * 1024, 4} },
14224 .block_erase = spi_block_erase_c4,
14225 }
14226 },
14227 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14228 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14229 .write = spi_chip_write_256, /* Multi I/O supported */
14230 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14231 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020014232 .prepare_access = spi_prepare_io,
14233 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014234 },
14235
14236 {
14237 .vendor = "Micron/Numonyx/ST",
14238 .name = "N25Q00A..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
14239 .bustype = BUS_SPI,
14240 .manufacture_id = ST_ID,
14241 .model_id = ST_N25Q00A__3G,
14242 .total_size = 131072,
14243 .page_size = 256,
14244 /* supports SFDP */
14245 /* OTP: 64B total; read 0x4B, write 0x42 */
14246 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14247 .tested = TEST_UNTESTED,
14248 .probe = probe_spi_rdid,
14249 .probe_timing = TIMING_ZERO,
14250 .block_erasers =
14251 {
14252 {
14253 .eraseblocks = { {4 * 1024, 32768} },
14254 .block_erase = spi_block_erase_21,
14255 }, {
14256 .eraseblocks = { {4 * 1024, 32768} },
14257 .block_erase = spi_block_erase_20,
14258 }, {
14259 .eraseblocks = { {64 * 1024, 2048} },
14260 .block_erase = spi_block_erase_dc,
14261 }, {
14262 .eraseblocks = { {64 * 1024, 2048} },
14263 .block_erase = spi_block_erase_d8,
14264 }, {
14265 .eraseblocks = { {32768 * 1024, 4} },
14266 .block_erase = spi_block_erase_c4,
14267 }
14268 },
14269 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14270 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14271 .write = spi_chip_write_256, /* Multi I/O supported */
14272 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14273 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020014274 .prepare_access = spi_prepare_io,
14275 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014276 },
14277
14278 {
14279 .vendor = "Micron/Numonyx/ST",
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014280 .name = "N25Q016",
14281 .bustype = BUS_SPI,
14282 .manufacture_id = ST_ID,
14283 .model_id = ST_N25Q016__1E,
14284 .total_size = 2048,
14285 .page_size = 256,
14286 /* supports SFDP */
14287 /* OTP: 64B total; read 0x4B, write 0x42 */
14288 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14289 .tested = TEST_UNTESTED,
14290 .probe = probe_spi_rdid,
14291 .probe_timing = TIMING_ZERO,
14292 .block_erasers =
14293 {
14294 {
14295 .eraseblocks = { {4 * 1024, 512} },
14296 .block_erase = spi_block_erase_20,
14297 }, {
14298 .eraseblocks = { {32 * 1024, 64} },
14299 .block_erase = spi_block_erase_52,
14300 }, {
14301 .eraseblocks = { {64 * 1024, 32} },
14302 .block_erase = spi_block_erase_d8,
14303 }, {
14304 .eraseblocks = { {2 * 1024 * 1024, 1} },
14305 .block_erase = spi_block_erase_c7,
14306 }
14307 },
14308 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14309 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14310 .write = spi_chip_write_256, /* Multi I/O supported */
14311 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14312 .voltage = {1700, 2000},
14313 },
14314
14315 {
14316 .vendor = "Micron/Numonyx/ST",
14317 .name = "N25Q032..1E",
14318 .bustype = BUS_SPI,
14319 .manufacture_id = ST_ID,
14320 .model_id = ST_N25Q032__1E,
14321 .total_size = 4096,
14322 .page_size = 256,
14323 /* supports SFDP */
14324 /* OTP: 64B total; read 0x4B, write 0x42 */
14325 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14326 .tested = TEST_UNTESTED,
14327 .probe = probe_spi_rdid,
14328 .probe_timing = TIMING_ZERO,
14329 .block_erasers =
14330 {
14331 {
14332 .eraseblocks = { {4 * 1024, 1024} },
14333 .block_erase = spi_block_erase_20,
14334 }, {
14335 .eraseblocks = { {64 * 1024, 64} },
14336 .block_erase = spi_block_erase_d8,
14337 }, {
14338 .eraseblocks = { {4 * 1024 * 1024, 1} },
14339 .block_erase = spi_block_erase_c7,
14340 }
14341 },
14342 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14343 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14344 .write = spi_chip_write_256, /* Multi I/O supported */
14345 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14346 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014347 .reg_bits =
14348 {
14349 /*
14350 * There is also a volatile lock register per 64KiB sector, which is not
14351 * mutually exclusive with BP-based protection.
14352 */
14353 .srp = {STATUS1, 7, RW},
14354 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
14355 .tb = {STATUS1, 5, RW},
14356 },
Nico Huberaabb3e02023-01-13 00:22:30 +010014357 .wp_write_cfg = spi_wp_write_cfg,
14358 .wp_read_cfg = spi_wp_read_cfg,
14359 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014360 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014361 },
14362
14363 {
14364 .vendor = "Micron/Numonyx/ST",
14365 .name = "N25Q032..3E",
14366 .bustype = BUS_SPI,
14367 .manufacture_id = ST_ID,
14368 .model_id = ST_N25Q032__3E,
14369 .total_size = 4096,
14370 .page_size = 256,
14371 /* supports SFDP */
14372 /* OTP: 64B total; read 0x4B, write 0x42 */
14373 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14374 .tested = TEST_OK_PREW,
14375 .probe = probe_spi_rdid,
14376 .probe_timing = TIMING_ZERO,
14377 .block_erasers =
14378 {
14379 {
14380 .eraseblocks = { {4 * 1024, 1024} },
14381 .block_erase = spi_block_erase_20,
14382 }, {
14383 .eraseblocks = { {64 * 1024, 64} },
14384 .block_erase = spi_block_erase_d8,
14385 }, {
14386 .eraseblocks = { {4 * 1024 * 1024, 1} },
14387 .block_erase = spi_block_erase_c7,
14388 }
14389 },
14390 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14391 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14392 .write = spi_chip_write_256, /* Multi I/O supported */
14393 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14394 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014395 .reg_bits =
14396 {
14397 /*
14398 * There is also a volatile lock register per 64KiB sector, which is not
14399 * mutually exclusive with BP-based protection.
14400 */
14401 .srp = {STATUS1, 7, RW},
14402 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
14403 .tb = {STATUS1, 5, RW},
14404 },
Nico Huberaabb3e02023-01-13 00:22:30 +010014405 .wp_write_cfg = spi_wp_write_cfg,
14406 .wp_read_cfg = spi_wp_read_cfg,
14407 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014408 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014409 },
14410
14411 {
14412 .vendor = "Micron/Numonyx/ST",
14413 .name = "N25Q064..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
14414 .bustype = BUS_SPI,
14415 .manufacture_id = ST_ID,
14416 .model_id = ST_N25Q064__1E,
14417 .total_size = 8192,
14418 .page_size = 256,
14419 /* supports SFDP */
14420 /* OTP: 64B total; read 0x4B, write 0x42 */
14421 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000014422 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014423 .probe = probe_spi_rdid,
14424 .probe_timing = TIMING_ZERO,
14425 .block_erasers =
14426 {
14427 {
14428 .eraseblocks = { {4 * 1024, 2048 } },
14429 .block_erase = spi_block_erase_20,
14430 }, {
14431 .eraseblocks = { {64 * 1024, 128} },
14432 .block_erase = spi_block_erase_d8,
14433 }, {
14434 .eraseblocks = { {8 * 1024 * 1024, 1} },
14435 .block_erase = spi_block_erase_c7,
14436 }
14437 },
14438 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14439 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14440 .write = spi_chip_write_256, /* Multi I/O supported */
14441 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14442 .voltage = {1700, 2000},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014443 .reg_bits =
14444 {
14445 /*
14446 * There is also a volatile lock register per 64KiB sector, which is not
14447 * mutually exclusive with BP-based protection.
14448 */
14449 .srp = {STATUS1, 7, RW},
14450 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
14451 .tb = {STATUS1, 5, RW},
14452 },
Nico Huberaabb3e02023-01-13 00:22:30 +010014453 .wp_write_cfg = spi_wp_write_cfg,
14454 .wp_read_cfg = spi_wp_read_cfg,
14455 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014456 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014457 },
14458
14459 {
14460 .vendor = "Micron/Numonyx/ST",
14461 .name = "N25Q064..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
14462 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100014463 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014464 .model_id = ST_N25Q064__3E,
14465 .total_size = 8192,
14466 .page_size = 256,
14467 /* supports SFDP */
14468 /* OTP: 64B total; read 0x4B, write 0x42 */
14469 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14470 .tested = TEST_OK_PREW,
14471 .probe = probe_spi_rdid,
14472 .probe_timing = TIMING_ZERO,
14473 .block_erasers =
14474 {
14475 {
14476 .eraseblocks = { {4 * 1024, 2048 } },
14477 .block_erase = spi_block_erase_20,
14478 }, {
14479 .eraseblocks = { {64 * 1024, 128} },
14480 .block_erase = spi_block_erase_d8,
14481 }, {
14482 .eraseblocks = { {8 * 1024 * 1024, 1} },
14483 .block_erase = spi_block_erase_c7,
14484 }
14485 },
14486 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14487 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14488 .write = spi_chip_write_256, /* Multi I/O supported */
14489 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14490 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014491 .reg_bits =
14492 {
14493 /*
14494 * There is also a volatile lock register per 64KiB sector, which is not
14495 * mutually exclusive with BP-based protection.
14496 */
14497 .srp = {STATUS1, 7, RW},
14498 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
14499 .tb = {STATUS1, 5, RW},
14500 },
Nico Huberaabb3e02023-01-13 00:22:30 +010014501 .wp_write_cfg = spi_wp_write_cfg,
14502 .wp_read_cfg = spi_wp_read_cfg,
14503 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030014504 .decode_range = decode_range_spi25,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014505 },
14506
14507 {
14508 .vendor = "Micron/Numonyx/ST",
14509 .name = "N25Q128..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
14510 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100014511 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014512 .model_id = ST_N25Q128__1E,
14513 .total_size = 16384,
14514 .page_size = 256,
14515 /* supports SFDP */
14516 /* OTP: 64B total; read 0x4B, write 0x42 */
14517 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Stefan Tauner23e10b82016-01-23 16:16:49 +000014518 .tested = TEST_OK_PREW,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014519 .probe = probe_spi_rdid,
14520 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014521 .block_erasers =
14522 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014523 {
14524 .eraseblocks = { {4 * 1024, 4096 } },
14525 .block_erase = spi_block_erase_20,
14526 }, {
14527 .eraseblocks = { {64 * 1024, 256} },
14528 .block_erase = spi_block_erase_d8,
14529 }, {
14530 .eraseblocks = { {16384 * 1024, 1} },
14531 .block_erase = spi_block_erase_c7,
14532 }
14533 },
14534 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14535 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14536 .write = spi_chip_write_256, /* Multi I/O supported */
14537 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14538 .voltage = {1700, 2000},
14539 },
14540
14541 {
14542 .vendor = "Micron/Numonyx/ST",
14543 .name = "N25Q128..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
14544 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100014545 .manufacture_id = ST_ID,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014546 .model_id = ST_N25Q128__3E,
14547 .total_size = 16384,
14548 .page_size = 256,
14549 /* supports SFDP */
14550 /* OTP: 64B total; read 0x4B, write 0x42 */
14551 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14552 .tested = TEST_OK_PREW,
14553 .probe = probe_spi_rdid,
14554 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100014555 .block_erasers =
14556 {
Stefan Tauner1aa80b02013-07-25 22:58:51 +000014557 {
14558 .eraseblocks = { {4 * 1024, 4096 } },
14559 .block_erase = spi_block_erase_20,
14560 }, {
14561 .eraseblocks = { {64 * 1024, 256} },
14562 .block_erase = spi_block_erase_d8,
14563 }, {
14564 .eraseblocks = { {16384 * 1024, 1} },
14565 .block_erase = spi_block_erase_c7,
14566 }
14567 },
14568 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14569 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14570 .write = spi_chip_write_256, /* Multi I/O supported */
14571 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14572 .voltage = {2700, 3600},
14573 },
14574
14575 {
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014576 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014577 .name = "N25Q256..1E", /* ..1E = 1.8V, uniform 64KB/4KB blocks/sectors */
14578 .bustype = BUS_SPI,
14579 .manufacture_id = ST_ID,
14580 .model_id = ST_N25Q256__1E,
14581 .total_size = 32768,
14582 .page_size = 256,
14583 /* supports SFDP */
14584 /* OTP: 64B total; read 0x4B, write 0x42 */
14585 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14586 .tested = TEST_UNTESTED,
14587 .probe = probe_spi_rdid,
14588 .probe_timing = TIMING_ZERO,
14589 .block_erasers =
14590 {
14591 {
14592 .eraseblocks = { {4 * 1024, 8192} },
14593 .block_erase = spi_block_erase_21,
14594 }, {
14595 .eraseblocks = { {4 * 1024, 8192} },
14596 .block_erase = spi_block_erase_20,
14597 }, {
14598 .eraseblocks = { {64 * 1024, 512} },
14599 .block_erase = spi_block_erase_dc,
14600 }, {
14601 .eraseblocks = { {64 * 1024, 512} },
14602 .block_erase = spi_block_erase_d8,
14603 }, {
14604 .eraseblocks = { {32768 * 1024, 1} },
14605 .block_erase = spi_block_erase_c7,
14606 }
14607 },
14608 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14609 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14610 .write = spi_chip_write_256, /* Multi I/O supported */
14611 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14612 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020014613 .prepare_access = spi_prepare_io,
14614 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014615 },
14616
14617 {
14618 .vendor = "Micron/Numonyx/ST",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014619 .name = "N25Q256..3E", /* ..3E = 3V, uniform 64KB/4KB blocks/sectors */
14620 .bustype = BUS_SPI,
14621 .manufacture_id = ST_ID,
14622 .model_id = ST_N25Q256__3E,
14623 .total_size = 32768,
14624 .page_size = 256,
14625 /* supports SFDP */
14626 /* OTP: 64B total; read 0x4B, write 0x42 */
14627 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14628 .tested = TEST_UNTESTED,
14629 .probe = probe_spi_rdid,
14630 .probe_timing = TIMING_ZERO,
14631 .block_erasers =
14632 {
14633 {
14634 .eraseblocks = { {4 * 1024, 8192} },
14635 .block_erase = spi_block_erase_21,
14636 }, {
14637 .eraseblocks = { {4 * 1024, 8192} },
14638 .block_erase = spi_block_erase_20,
14639 }, {
14640 .eraseblocks = { {64 * 1024, 512} },
14641 .block_erase = spi_block_erase_dc,
14642 }, {
14643 .eraseblocks = { {64 * 1024, 512} },
14644 .block_erase = spi_block_erase_d8,
14645 }, {
14646 .eraseblocks = { {32768 * 1024, 1} },
14647 .block_erase = spi_block_erase_c7,
14648 }
14649 },
14650 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14651 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14652 .write = spi_chip_write_256, /* Multi I/O supported */
14653 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14654 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020014655 .prepare_access = spi_prepare_io,
14656 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014657 },
14658
14659 {
14660 .vendor = "Micron/Numonyx/ST",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014661 .name = "N25Q512..1G", /* ..1G = 1.8V, uniform 64KB/4KB blocks/sectors */
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014662 .bustype = BUS_SPI,
14663 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014664 .model_id = ST_N25Q512__1G,
14665 .total_size = 65536,
14666 .page_size = 256,
14667 /* supports SFDP */
14668 /* OTP: 64B total; read 0x4B, write 0x42 */
14669 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14670 .tested = TEST_UNTESTED,
14671 .probe = probe_spi_rdid,
14672 .probe_timing = TIMING_ZERO,
14673 .block_erasers =
14674 {
14675 {
14676 .eraseblocks = { {4 * 1024, 16384} },
14677 .block_erase = spi_block_erase_21,
14678 }, {
14679 .eraseblocks = { {4 * 1024, 16384} },
14680 .block_erase = spi_block_erase_20,
14681 }, {
14682 .eraseblocks = { {64 * 1024, 1024} },
14683 .block_erase = spi_block_erase_dc,
14684 }, {
14685 .eraseblocks = { {64 * 1024, 1024} },
14686 .block_erase = spi_block_erase_d8,
14687 }, {
14688 .eraseblocks = { {32768 * 1024, 2} },
14689 .block_erase = spi_block_erase_c4,
14690 }
14691 },
14692 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14693 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14694 .write = spi_chip_write_256, /* Multi I/O supported */
14695 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14696 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020014697 .prepare_access = spi_prepare_io,
14698 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014699 },
14700
14701 {
14702 .vendor = "Micron/Numonyx/ST",
14703 .name = "N25Q512..3G", /* ..3G = 3V, uniform 64KB/4KB blocks/sectors */
14704 .bustype = BUS_SPI,
14705 .manufacture_id = ST_ID,
14706 .model_id = ST_N25Q512__3G,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014707 .total_size = 65536,
14708 .page_size = 256,
14709 /* supports SFDP */
14710 /* OTP: 64B total; read 0x4B, write 0x42 */
14711 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14712 .tested = TEST_OK_PREW,
14713 .probe = probe_spi_rdid,
14714 .probe_timing = TIMING_ZERO,
14715 .block_erasers =
14716 {
14717 {
14718 .eraseblocks = { {4 * 1024, 16384} },
14719 .block_erase = spi_block_erase_21,
14720 }, {
14721 .eraseblocks = { {4 * 1024, 16384} },
14722 .block_erase = spi_block_erase_20,
14723 }, {
14724 .eraseblocks = { {64 * 1024, 1024} },
14725 .block_erase = spi_block_erase_dc,
14726 }, {
14727 .eraseblocks = { {64 * 1024, 1024} },
14728 .block_erase = spi_block_erase_d8,
14729 }, {
Jacob Creedone8e7b0e2019-07-22 12:21:22 -070014730 .eraseblocks = { {32768 * 1024, 2} },
14731 .block_erase = spi_block_erase_c4,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014732 }
14733 },
14734 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14735 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14736 .write = spi_chip_write_256, /* Multi I/O supported */
14737 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14738 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020014739 .prepare_access = spi_prepare_io,
14740 .finish_access = spi_finish_io,
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070014741 },
14742
14743 {
Ed Swierk199ab392017-07-03 13:33:44 -070014744 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014745 .name = "MT25QL01G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
14746 .bustype = BUS_SPI,
14747 .manufacture_id = ST_ID,
14748 .model_id = ST_N25Q00A__3G,
14749 .total_size = 131072,
14750 .page_size = 256,
14751 /* supports SFDP */
14752 /* OTP: 64B total; read 0x4B, write 0x42 */
14753 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14754 .tested = TEST_OK_PREW,
14755 .probe = probe_spi_rdid,
14756 .probe_timing = TIMING_ZERO,
14757 .block_erasers =
14758 {
14759 {
14760 .eraseblocks = { {4 * 1024, 32768} },
14761 .block_erase = spi_block_erase_21,
14762 }, {
14763 .eraseblocks = { {4 * 1024, 32768} },
14764 .block_erase = spi_block_erase_20,
14765 }, {
14766 .eraseblocks = { {32 * 1024, 4096} },
14767 .block_erase = spi_block_erase_5c,
14768 }, {
14769 .eraseblocks = { {32 * 1024, 4096} },
14770 .block_erase = spi_block_erase_52,
14771 }, {
14772 .eraseblocks = { {64 * 1024, 2048} },
14773 .block_erase = spi_block_erase_dc,
14774 }, {
14775 .eraseblocks = { {64 * 1024, 2048} },
14776 .block_erase = spi_block_erase_d8,
14777 }, {
14778 .eraseblocks = { {65536 * 1024, 2} },
14779 .block_erase = spi_block_erase_c4,
14780 }
14781 },
14782 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14783 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14784 .write = spi_chip_write_256, /* Multi I/O supported */
14785 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14786 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020014787 .prepare_access = spi_prepare_io,
14788 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014789 },
14790
14791 {
14792 .vendor = "Micron",
14793 .name = "MT25QU01G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
14794 .bustype = BUS_SPI,
14795 .manufacture_id = ST_ID,
14796 .model_id = ST_N25Q00A__1G,
14797 .total_size = 131072,
14798 .page_size = 256,
14799 /* supports SFDP */
14800 /* OTP: 64B total; read 0x4B, write 0x42 */
14801 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14802 .tested = TEST_UNTESTED,
14803 .probe = probe_spi_rdid,
14804 .probe_timing = TIMING_ZERO,
14805 .block_erasers =
14806 {
14807 {
14808 .eraseblocks = { {4 * 1024, 32768} },
14809 .block_erase = spi_block_erase_21,
14810 }, {
14811 .eraseblocks = { {4 * 1024, 32768} },
14812 .block_erase = spi_block_erase_20,
14813 }, {
14814 .eraseblocks = { {32 * 1024, 4096} },
14815 .block_erase = spi_block_erase_5c,
14816 }, {
14817 .eraseblocks = { {32 * 1024, 4096} },
14818 .block_erase = spi_block_erase_52,
14819 }, {
14820 .eraseblocks = { {64 * 1024, 2048} },
14821 .block_erase = spi_block_erase_dc,
14822 }, {
14823 .eraseblocks = { {64 * 1024, 2048} },
14824 .block_erase = spi_block_erase_d8,
14825 }, {
14826 .eraseblocks = { {65536 * 1024, 2} },
14827 .block_erase = spi_block_erase_c4,
14828 }
14829 },
14830 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14831 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14832 .write = spi_chip_write_256, /* Multi I/O supported */
14833 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14834 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020014835 .prepare_access = spi_prepare_io,
14836 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014837 },
14838
14839 {
14840 .vendor = "Micron",
14841 .name = "MT25QL02G", /* L = 3V, uniform 64KB/4KB blocks/sectors */
14842 .bustype = BUS_SPI,
14843 .manufacture_id = ST_ID,
14844 .model_id = ST_MT25QL02G,
14845 .total_size = 262144,
14846 .page_size = 256,
14847 /* supports SFDP */
14848 /* OTP: 64B total; read 0x4B, write 0x42 */
14849 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14850 .tested = TEST_UNTESTED,
14851 .probe = probe_spi_rdid,
14852 .probe_timing = TIMING_ZERO,
14853 .block_erasers =
14854 {
14855 {
14856 .eraseblocks = { {4 * 1024, 65536} },
14857 .block_erase = spi_block_erase_21,
14858 }, {
14859 .eraseblocks = { {4 * 1024, 65536} },
14860 .block_erase = spi_block_erase_20,
14861 }, {
14862 .eraseblocks = { {32 * 1024, 8192} },
14863 .block_erase = spi_block_erase_5c,
14864 }, {
14865 .eraseblocks = { {32 * 1024, 8192} },
14866 .block_erase = spi_block_erase_52,
14867 }, {
14868 .eraseblocks = { {64 * 1024, 4096} },
14869 .block_erase = spi_block_erase_dc,
14870 }, {
14871 .eraseblocks = { {64 * 1024, 4096} },
14872 .block_erase = spi_block_erase_d8,
14873 }, {
14874 .eraseblocks = { {65536 * 1024, 4} },
14875 .block_erase = spi_block_erase_c4,
14876 }
14877 },
14878 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14879 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14880 .write = spi_chip_write_256, /* Multi I/O supported */
14881 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14882 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020014883 .prepare_access = spi_prepare_io,
14884 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014885 },
14886
14887 {
14888 .vendor = "Micron",
14889 .name = "MT25QU02G", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
14890 .bustype = BUS_SPI,
14891 .manufacture_id = ST_ID,
14892 .model_id = ST_MT25QU02G,
14893 .total_size = 262144,
14894 .page_size = 256,
14895 /* supports SFDP */
14896 /* OTP: 64B total; read 0x4B, write 0x42 */
14897 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
14898 .tested = TEST_UNTESTED,
14899 .probe = probe_spi_rdid,
14900 .probe_timing = TIMING_ZERO,
14901 .block_erasers =
14902 {
14903 {
14904 .eraseblocks = { {4 * 1024, 65536} },
14905 .block_erase = spi_block_erase_21,
14906 }, {
14907 .eraseblocks = { {4 * 1024, 65536} },
14908 .block_erase = spi_block_erase_20,
14909 }, {
14910 .eraseblocks = { {32 * 1024, 8192} },
14911 .block_erase = spi_block_erase_5c,
14912 }, {
14913 .eraseblocks = { {32 * 1024, 8192} },
14914 .block_erase = spi_block_erase_52,
14915 }, {
14916 .eraseblocks = { {64 * 1024, 4096} },
14917 .block_erase = spi_block_erase_dc,
14918 }, {
14919 .eraseblocks = { {64 * 1024, 4096} },
14920 .block_erase = spi_block_erase_d8,
14921 }, {
14922 .eraseblocks = { {65536 * 1024, 4} },
14923 .block_erase = spi_block_erase_c4,
14924 }
14925 },
14926 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14927 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14928 .write = spi_chip_write_256, /* Multi I/O supported */
14929 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14930 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020014931 .prepare_access = spi_prepare_io,
14932 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014933 },
14934
14935 {
14936 .vendor = "Micron",
14937 .name = "MT25QU128", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
14938 .bustype = BUS_SPI,
14939 .manufacture_id = ST_ID,
14940 .model_id = ST_N25Q128__1E,
14941 .total_size = 16384,
14942 .page_size = 256,
14943 /* supports SFDP */
14944 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huber48dc0902023-03-05 17:20:55 +010014945 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014946 .tested = TEST_UNTESTED,
14947 .probe = probe_spi_rdid,
14948 .probe_timing = TIMING_ZERO,
14949 .block_erasers =
14950 {
14951 {
14952 .eraseblocks = { {4 * 1024, 4096} },
14953 .block_erase = spi_block_erase_20,
14954 }, {
14955 .eraseblocks = { {32 * 1024, 512} },
14956 .block_erase = spi_block_erase_52,
14957 }, {
14958 .eraseblocks = { {64 * 1024, 256} },
14959 .block_erase = spi_block_erase_d8,
14960 }, {
14961 .eraseblocks = { {16384 * 1024, 1} },
14962 .block_erase = spi_block_erase_c7,
14963 }, {
14964 .eraseblocks = { {16384 * 1024, 1} },
14965 .block_erase = spi_block_erase_60,
14966 }
14967 },
14968 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
14969 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
14970 .write = spi_chip_write_256, /* Multi I/O supported */
14971 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
14972 .voltage = {1700, 2000},
14973 },
14974
14975 {
14976 .vendor = "Micron",
14977 .name = "MT25QL128", /* L = 3V, uniform 64KB/4KB blocks/sectors */
14978 .bustype = BUS_SPI,
14979 .manufacture_id = ST_ID,
14980 .model_id = ST_N25Q128__3E,
14981 .total_size = 16384,
14982 .page_size = 256,
14983 /* supports SFDP */
14984 /* OTP: 64B total; read 0x4B, write 0x42 */
Rick Altherr1e563602022-12-22 10:25:34 -080014985 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
14986 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070014987 .probe = probe_spi_rdid,
14988 .probe_timing = TIMING_ZERO,
14989 .block_erasers =
14990 {
14991 {
14992 .eraseblocks = { {4 * 1024, 4096} },
14993 .block_erase = spi_block_erase_20,
14994 }, {
14995 .eraseblocks = { {32 * 1024, 512} },
14996 .block_erase = spi_block_erase_52,
14997 }, {
14998 .eraseblocks = { {64 * 1024, 256} },
14999 .block_erase = spi_block_erase_d8,
15000 }, {
15001 .eraseblocks = { {16384 * 1024, 1} },
15002 .block_erase = spi_block_erase_c7,
15003 }, {
15004 .eraseblocks = { {16384 * 1024, 1} },
15005 .block_erase = spi_block_erase_60,
15006 }
15007 },
15008 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
15009 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
15010 .write = spi_chip_write_256, /* Multi I/O supported */
15011 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15012 .voltage = {2700, 3600},
15013 },
15014
15015 {
15016 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070015017 .name = "MT25QL256", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070015018 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100015019 .manufacture_id = ST_ID,
Ed Swierk199ab392017-07-03 13:33:44 -070015020 .model_id = ST_N25Q256__3E,
15021 .total_size = 32768,
15022 .page_size = 256,
15023 /* supports SFDP */
15024 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010015025 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Simon Buhrowb7014f92021-02-15 13:16:57 +010015026 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070015027 .probe = probe_spi_rdid,
15028 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100015029 .block_erasers =
15030 {
Ed Swierk199ab392017-07-03 13:33:44 -070015031 {
15032 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020015033 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070015034 }, {
Nico Huberaac81422017-11-10 22:54:13 +010015035 .eraseblocks = { {4 * 1024, 8192} },
15036 .block_erase = spi_block_erase_20,
15037 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070015038 .eraseblocks = { {32 * 1024, 1024} },
15039 .block_erase = spi_block_erase_5c,
15040 }, {
15041 .eraseblocks = { {32 * 1024, 1024} },
15042 .block_erase = spi_block_erase_52,
15043 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070015044 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020015045 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070015046 }, {
Nico Huberaac81422017-11-10 22:54:13 +010015047 .eraseblocks = { {64 * 1024, 512} },
15048 .block_erase = spi_block_erase_d8,
15049 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070015050 .eraseblocks = { {32768 * 1024, 1} },
15051 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070015052 }, {
15053 .eraseblocks = { {32768 * 1024, 1} },
15054 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070015055 }
15056 },
15057 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
15058 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
15059 .write = spi_chip_write_256, /* Multi I/O supported */
15060 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15061 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020015062 .prepare_access = spi_prepare_io,
15063 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070015064 },
15065
15066 {
15067 .vendor = "Micron",
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015068 .name = "MT25QU256", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
15069 .bustype = BUS_SPI,
15070 .manufacture_id = ST_ID,
15071 .model_id = ST_N25Q256__1E,
15072 .total_size = 32768,
15073 .page_size = 256,
15074 /* supports SFDP */
15075 /* OTP: 64B total; read 0x4B, write 0x42 */
15076 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons59052582022-03-08 15:23:58 +010015077 .tested = TEST_OK_PREW,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015078 .probe = probe_spi_rdid,
15079 .probe_timing = TIMING_ZERO,
15080 .block_erasers =
15081 {
15082 {
15083 .eraseblocks = { {4 * 1024, 8192} },
15084 .block_erase = spi_block_erase_21,
15085 }, {
15086 .eraseblocks = { {4 * 1024, 8192} },
15087 .block_erase = spi_block_erase_20,
15088 }, {
15089 .eraseblocks = { {32 * 1024, 1024} },
15090 .block_erase = spi_block_erase_5c,
15091 }, {
15092 .eraseblocks = { {32 * 1024, 1024} },
15093 .block_erase = spi_block_erase_52,
15094 }, {
15095 .eraseblocks = { {64 * 1024, 512} },
15096 .block_erase = spi_block_erase_dc,
15097 }, {
15098 .eraseblocks = { {64 * 1024, 512} },
15099 .block_erase = spi_block_erase_d8,
15100 }, {
15101 .eraseblocks = { {32768 * 1024, 1} },
15102 .block_erase = spi_block_erase_c7,
15103 }, {
15104 .eraseblocks = { {32768 * 1024, 1} },
15105 .block_erase = spi_block_erase_60,
15106 }
15107 },
15108 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
15109 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
15110 .write = spi_chip_write_256, /* Multi I/O supported */
15111 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15112 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020015113 .prepare_access = spi_prepare_io,
15114 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015115 },
15116
15117 {
15118 .vendor = "Micron",
Jacob Creedon08e9d1d2019-07-22 12:04:40 -070015119 .name = "MT25QL512", /* L = 3V, uniform 64KB/4KB blocks/sectors */
Ed Swierk199ab392017-07-03 13:33:44 -070015120 .bustype = BUS_SPI,
Alan Greenfa3fcd32019-06-27 15:41:50 +100015121 .manufacture_id = ST_ID,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015122 .model_id = ST_N25Q512__3G,
Ed Swierk199ab392017-07-03 13:33:44 -070015123 .total_size = 65536,
15124 .page_size = 256,
15125 /* supports SFDP */
15126 /* OTP: 64B total; read 0x4B, write 0x42 */
Nico Huberaac81422017-11-10 22:54:13 +010015127 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
Angel Pons3ed5a352018-09-30 16:31:09 +020015128 .tested = TEST_OK_PREW,
Ed Swierk199ab392017-07-03 13:33:44 -070015129 .probe = probe_spi_rdid,
15130 .probe_timing = TIMING_ZERO,
Alan Greenfdf5da42019-06-27 16:56:52 +100015131 .block_erasers =
15132 {
Ed Swierk199ab392017-07-03 13:33:44 -070015133 {
15134 .eraseblocks = { {4 * 1024, 16384} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020015135 .block_erase = spi_block_erase_21,
Ed Swierk199ab392017-07-03 13:33:44 -070015136 }, {
Nico Huberaac81422017-11-10 22:54:13 +010015137 .eraseblocks = { {4 * 1024, 16384} },
15138 .block_erase = spi_block_erase_20,
15139 }, {
Jacob Creedon045b97e2019-07-22 12:26:56 -070015140 .eraseblocks = { {32 * 1024, 2048} },
15141 .block_erase = spi_block_erase_5c,
15142 }, {
15143 .eraseblocks = { {32 * 1024, 2048} },
15144 .block_erase = spi_block_erase_52,
15145 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070015146 .eraseblocks = { {64 * 1024, 1024} },
Nico Huber7e3c81a2017-10-14 18:56:50 +020015147 .block_erase = spi_block_erase_dc,
Ed Swierk199ab392017-07-03 13:33:44 -070015148 }, {
Nico Huberaac81422017-11-10 22:54:13 +010015149 .eraseblocks = { {64 * 1024, 1024} },
15150 .block_erase = spi_block_erase_d8,
15151 }, {
Ed Swierk199ab392017-07-03 13:33:44 -070015152 .eraseblocks = { {65536 * 1024, 1} },
15153 .block_erase = spi_block_erase_c7,
Jacob Creedon045b97e2019-07-22 12:26:56 -070015154 }, {
15155 .eraseblocks = { {65536 * 1024, 1} },
15156 .block_erase = spi_block_erase_60,
Ed Swierk199ab392017-07-03 13:33:44 -070015157 }
15158 },
15159 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
15160 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
15161 .write = spi_chip_write_256, /* Multi I/O supported */
15162 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15163 .voltage = {2700, 3600},
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030015164 .reg_bits =
15165 {
15166 .srp = {STATUS1, 7, RW},
15167 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 6, RW}},
15168 .tb = {STATUS1, 5, RW},
15169 },
Nico Huberaabb3e02023-01-13 00:22:30 +010015170 .wp_write_cfg = spi_wp_write_cfg,
15171 .wp_read_cfg = spi_wp_read_cfg,
15172 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd5ba24c2022-07-25 00:28:35 +030015173 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020015174 .prepare_access = spi_prepare_io,
15175 .finish_access = spi_finish_io,
Ed Swierk199ab392017-07-03 13:33:44 -070015176 },
15177
15178 {
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015179 .vendor = "Micron",
15180 .name = "MT25QU512", /* U = 1.8V, uniform 64KB/4KB blocks/sectors */
15181 .bustype = BUS_SPI,
15182 .manufacture_id = ST_ID,
15183 .model_id = ST_N25Q512__1G,
15184 .total_size = 65536,
15185 .page_size = 256,
15186 /* supports SFDP */
15187 /* OTP: 64B total; read 0x4B, write 0x42 */
15188 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA_WREN,
15189 .tested = TEST_OK_PREW,
15190 .probe = probe_spi_rdid,
15191 .probe_timing = TIMING_ZERO,
15192 .block_erasers =
15193 {
15194 {
15195 .eraseblocks = { {4 * 1024, 16384} },
15196 .block_erase = spi_block_erase_21,
15197 }, {
15198 .eraseblocks = { {4 * 1024, 16384} },
15199 .block_erase = spi_block_erase_20,
15200 }, {
15201 .eraseblocks = { {32 * 1024, 2048} },
15202 .block_erase = spi_block_erase_5c,
15203 }, {
15204 .eraseblocks = { {32 * 1024, 2048} },
15205 .block_erase = spi_block_erase_52,
15206 }, {
15207 .eraseblocks = { {64 * 1024, 1024} },
15208 .block_erase = spi_block_erase_dc,
15209 }, {
15210 .eraseblocks = { {64 * 1024, 1024} },
15211 .block_erase = spi_block_erase_d8,
15212 }, {
15213 .eraseblocks = { {65536 * 1024, 1} },
15214 .block_erase = spi_block_erase_c7,
15215 }, {
15216 .eraseblocks = { {65536 * 1024, 1} },
15217 .block_erase = spi_block_erase_60,
15218 }
15219 },
15220 .printlock = spi_prettyprint_status_register_n25q, /* TODO: config, lock, flag regs */
15221 .unlock = spi_disable_blockprotect_n25q, /* TODO: per 64kB sector lock registers */
15222 .write = spi_chip_write_256, /* Multi I/O supported */
15223 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15224 .voltage = {1700, 2000},
Nico Huber930d4212024-05-04 18:59:15 +020015225 .prepare_access = spi_prepare_io,
15226 .finish_access = spi_finish_io,
Jacob Creedon80e8dc42019-07-22 12:35:30 -070015227 },
15228
15229 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000015230 .vendor = "MoselVitelic",
15231 .name = "V29C51000B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015232 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015233 .manufacture_id = SYNCMOS_MVC_ID,
15234 .model_id = MVC_V29C51000B,
15235 .total_size = 64,
15236 .page_size = 512,
15237 .feature_bits = FEATURE_EITHER_RESET,
15238 .tested = TEST_UNTESTED,
15239 .probe = probe_jedec,
15240 .probe_timing = TIMING_ZERO,
15241 .block_erasers =
15242 {
15243 {
15244 .eraseblocks = { {512, 128} },
15245 .block_erase = erase_sector_jedec,
15246 }, {
15247 .eraseblocks = { {64 * 1024, 1} },
15248 .block_erase = erase_chip_block_jedec,
15249 },
15250 },
15251 .write = write_jedec_1,
15252 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015253 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015254 .prepare_access = prepare_memory_access,
15255 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015256 },
15257
15258 {
15259 .vendor = "MoselVitelic",
15260 .name = "V29C51000T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015261 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015262 .manufacture_id = SYNCMOS_MVC_ID,
15263 .model_id = MVC_V29C51000T,
15264 .total_size = 64,
15265 .page_size = 512,
15266 .feature_bits = FEATURE_EITHER_RESET,
15267 .tested = TEST_UNTESTED,
15268 .probe = probe_jedec,
15269 .probe_timing = TIMING_ZERO,
15270 .block_erasers =
15271 {
15272 {
15273 .eraseblocks = { {512, 128} },
15274 .block_erase = erase_sector_jedec,
15275 }, {
15276 .eraseblocks = { {64 * 1024, 1} },
15277 .block_erase = erase_chip_block_jedec,
15278 },
15279 },
15280 .write = write_jedec_1,
15281 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015282 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015283 .prepare_access = prepare_memory_access,
15284 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015285 },
15286
15287 {
15288 .vendor = "MoselVitelic",
15289 .name = "V29C51400B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015290 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015291 .manufacture_id = SYNCMOS_MVC_ID,
15292 .model_id = MVC_V29C51400B,
15293 .total_size = 512,
15294 .page_size = 1024,
15295 .feature_bits = FEATURE_EITHER_RESET,
15296 .tested = TEST_UNTESTED,
15297 .probe = probe_jedec,
15298 .probe_timing = TIMING_ZERO,
15299 .block_erasers =
15300 {
15301 {
15302 .eraseblocks = { {1024, 512} },
15303 .block_erase = erase_sector_jedec,
15304 }, {
15305 .eraseblocks = { {512 * 1024, 1} },
15306 .block_erase = erase_chip_block_jedec,
15307 },
15308 },
15309 .write = write_jedec_1,
15310 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015311 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015312 .prepare_access = prepare_memory_access,
15313 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015314 },
15315
15316 {
15317 .vendor = "MoselVitelic",
15318 .name = "V29C51400T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015319 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015320 .manufacture_id = SYNCMOS_MVC_ID,
15321 .model_id = MVC_V29C51400T,
15322 .total_size = 512,
15323 .page_size = 1024,
15324 .feature_bits = FEATURE_EITHER_RESET,
15325 .tested = TEST_UNTESTED,
15326 .probe = probe_jedec,
15327 .probe_timing = TIMING_ZERO,
15328 .block_erasers =
15329 {
15330 {
15331 .eraseblocks = { {1024, 512} },
15332 .block_erase = erase_sector_jedec,
15333 }, {
15334 .eraseblocks = { {512 * 1024, 1} },
15335 .block_erase = erase_chip_block_jedec,
15336 },
15337 },
15338 .write = write_jedec_1,
15339 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015340 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015341 .prepare_access = prepare_memory_access,
15342 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015343 },
15344
15345 {
15346 .vendor = "MoselVitelic",
15347 .name = "V29LC51000",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015348 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015349 .manufacture_id = SYNCMOS_MVC_ID,
15350 .model_id = MVC_V29LC51000,
15351 .total_size = 64,
15352 .page_size = 512,
15353 .feature_bits = FEATURE_EITHER_RESET,
15354 .tested = TEST_UNTESTED,
15355 .probe = probe_jedec,
15356 .probe_timing = TIMING_ZERO,
15357 .block_erasers =
15358 {
15359 {
15360 .eraseblocks = { {512, 128} },
15361 .block_erase = erase_sector_jedec,
15362 }, {
15363 .eraseblocks = { {64 * 1024, 1} },
15364 .block_erase = erase_chip_block_jedec,
15365 },
15366 },
15367 .write = write_jedec_1,
15368 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015369 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015370 .prepare_access = prepare_memory_access,
15371 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015372 },
15373
15374 {
15375 .vendor = "MoselVitelic",
15376 .name = "V29LC51001",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015377 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015378 .manufacture_id = SYNCMOS_MVC_ID,
15379 .model_id = MVC_V29LC51001,
15380 .total_size = 128,
15381 .page_size = 512,
15382 .feature_bits = FEATURE_EITHER_RESET,
15383 .tested = TEST_UNTESTED,
15384 .probe = probe_jedec,
15385 .probe_timing = TIMING_ZERO,
15386 .block_erasers =
15387 {
15388 {
15389 .eraseblocks = { {512, 256} },
15390 .block_erase = erase_sector_jedec,
15391 }, {
15392 .eraseblocks = { {128 * 1024, 1} },
15393 .block_erase = erase_chip_block_jedec,
15394 },
15395 },
15396 .write = write_jedec_1,
15397 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015398 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015399 .prepare_access = prepare_memory_access,
15400 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015401 },
15402
15403 {
15404 .vendor = "MoselVitelic",
15405 .name = "V29LC51002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000015406 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015407 .manufacture_id = SYNCMOS_MVC_ID,
15408 .model_id = MVC_V29LC51002,
15409 .total_size = 256,
15410 .page_size = 512,
15411 .feature_bits = FEATURE_EITHER_RESET,
15412 .tested = TEST_UNTESTED,
15413 .probe = probe_jedec,
15414 .probe_timing = TIMING_ZERO,
15415 .block_erasers =
15416 {
15417 {
15418 .eraseblocks = { {512, 512} },
15419 .block_erase = erase_sector_jedec,
15420 }, {
15421 .eraseblocks = { {256 * 1024, 1} },
15422 .block_erase = erase_chip_block_jedec,
15423 },
15424 },
15425 .write = write_jedec_1,
15426 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000015427 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010015428 .prepare_access = prepare_memory_access,
15429 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000015430 },
15431
15432 {
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015433 .vendor = "Nantronics",
15434 .name = "N25S10",
15435 .bustype = BUS_SPI,
15436 .manufacture_id = NANTRONICS_ID_NOPREFIX,
15437 .model_id = NANTRONICS_N25S10,
15438 .total_size = 128,
15439 .page_size = 256,
15440 .feature_bits = FEATURE_WRSR_WREN,
15441 .tested = TEST_UNTESTED,
15442 .probe = probe_spi_rdid,
15443 .probe_timing = TIMING_ZERO,
15444 .block_erasers =
15445 {
15446 {
15447 .eraseblocks = { {4 * 1024, 32} },
15448 .block_erase = spi_block_erase_20,
15449 }, {
15450 .eraseblocks = { {4 * 1024, 32} },
15451 .block_erase = spi_block_erase_d7,
15452 }, {
15453 .eraseblocks = { {32 * 1024, 4} },
15454 .block_erase = spi_block_erase_52,
15455 }, {
15456 .eraseblocks = { {64 * 1024, 2} },
15457 .block_erase = spi_block_erase_d8,
15458 }, {
15459 .eraseblocks = { {128 * 1024, 1} },
15460 .block_erase = spi_block_erase_60,
15461 }, {
15462 .eraseblocks = { {128 * 1024, 1} },
15463 .block_erase = spi_block_erase_c7,
15464 }
15465 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015466 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015467 .unlock = spi_disable_blockprotect_bp3_srwd,
15468 .write = spi_chip_write_256,
15469 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
15470 .voltage = {2700, 3600},
15471 },
15472
15473 {
15474 .vendor = "Nantronics",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015475 .name = "N25S16",
15476 .bustype = BUS_SPI,
15477 .manufacture_id = NANTRONICS_ID_NOPREFIX,
15478 .model_id = NANTRONICS_N25S16,
15479 .total_size = 2048,
15480 .page_size = 256,
15481 .feature_bits = FEATURE_WRSR_WREN,
15482 .tested = TEST_UNTESTED,
15483 .probe = probe_spi_rdid,
15484 .probe_timing = TIMING_ZERO,
15485 .block_erasers =
15486 {
15487 {
15488 .eraseblocks = { {4 * 1024, 512} },
15489 .block_erase = spi_block_erase_20,
15490 }, {
15491 .eraseblocks = { {64 * 1024, 32} },
15492 .block_erase = spi_block_erase_d8,
15493 }, {
15494 .eraseblocks = { {2048 * 1024, 1} },
15495 .block_erase = spi_block_erase_60,
15496 }, {
15497 .eraseblocks = { {2048 * 1024, 1} },
15498 .block_erase = spi_block_erase_c7,
15499 }
15500 },
15501 .printlock = spi_prettyprint_status_register_bp3_srwd,
15502 .unlock = spi_disable_blockprotect_bp3_srwd,
15503 .write = spi_chip_write_256,
15504 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
15505 .voltage = {2700, 3600},
15506 },
15507
15508 {
15509 .vendor = "Nantronics",
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015510 .name = "N25S20",
15511 .bustype = BUS_SPI,
15512 .manufacture_id = NANTRONICS_ID_NOPREFIX,
15513 .model_id = NANTRONICS_N25S20,
15514 .total_size = 256,
15515 .page_size = 256,
15516 .feature_bits = FEATURE_WRSR_WREN,
15517 .tested = TEST_UNTESTED,
15518 .probe = probe_spi_rdid,
15519 .probe_timing = TIMING_ZERO,
15520 .block_erasers =
15521 {
15522 {
15523 .eraseblocks = { {4 * 1024, 64} },
15524 .block_erase = spi_block_erase_20,
15525 }, {
15526 .eraseblocks = { {4 * 1024, 64} },
15527 .block_erase = spi_block_erase_d7,
15528 }, {
15529 .eraseblocks = { {32 * 1024, 8} },
15530 .block_erase = spi_block_erase_52,
15531 }, {
15532 .eraseblocks = { {64 * 1024, 4} },
15533 .block_erase = spi_block_erase_d8,
15534 }, {
15535 .eraseblocks = { {256 * 1024, 1} },
15536 .block_erase = spi_block_erase_60,
15537 }, {
15538 .eraseblocks = { {256 * 1024, 1} },
15539 .block_erase = spi_block_erase_c7,
15540 }
15541 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015542 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015543 .unlock = spi_disable_blockprotect_bp3_srwd,
15544 .write = spi_chip_write_256,
15545 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
15546 .voltage = {2700, 3600},
15547 },
15548
15549 {
15550 .vendor = "Nantronics",
15551 .name = "N25S40",
15552 .bustype = BUS_SPI,
15553 .manufacture_id = NANTRONICS_ID_NOPREFIX,
15554 .model_id = NANTRONICS_N25S40,
15555 .total_size = 512,
15556 .page_size = 256,
15557 .feature_bits = FEATURE_WRSR_WREN,
15558 .tested = TEST_UNTESTED,
15559 .probe = probe_spi_rdid,
15560 .probe_timing = TIMING_ZERO,
15561 .block_erasers =
15562 {
15563 {
15564 .eraseblocks = { {4 * 1024, 128} },
15565 .block_erase = spi_block_erase_20,
15566 }, {
15567 .eraseblocks = { {4 * 1024, 128} },
15568 .block_erase = spi_block_erase_d7,
15569 }, {
15570 .eraseblocks = { {32 * 1024, 16} },
15571 .block_erase = spi_block_erase_52,
15572 }, {
15573 .eraseblocks = { {64 * 1024, 8} },
15574 .block_erase = spi_block_erase_d8,
15575 }, {
15576 .eraseblocks = { {512 * 1024, 1} },
15577 .block_erase = spi_block_erase_60,
15578 }, {
15579 .eraseblocks = { {512 * 1024, 1} },
15580 .block_erase = spi_block_erase_c7,
15581 }
15582 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015583 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015584 .unlock = spi_disable_blockprotect_bp3_srwd,
15585 .write = spi_chip_write_256,
15586 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
15587 .voltage = {2700, 3600},
15588 },
15589
15590 {
15591 .vendor = "Nantronics",
15592 .name = "N25S80",
15593 .bustype = BUS_SPI,
15594 .manufacture_id = NANTRONICS_ID_NOPREFIX,
15595 .model_id = NANTRONICS_N25S80,
15596 .total_size = 1024,
15597 .page_size = 256,
15598 .feature_bits = FEATURE_WRSR_WREN,
15599 .tested = TEST_UNTESTED,
15600 .probe = probe_spi_rdid,
15601 .probe_timing = TIMING_ZERO,
15602 .block_erasers =
15603 {
15604 {
15605 .eraseblocks = { {4 * 1024, 256} },
15606 .block_erase = spi_block_erase_20,
15607 }, {
15608 .eraseblocks = { {32 * 1024, 32} },
15609 .block_erase = spi_block_erase_52,
15610 }, {
15611 .eraseblocks = { {64 * 1024, 16} },
15612 .block_erase = spi_block_erase_d8,
15613 }, {
15614 .eraseblocks = { {1024 * 1024, 1} },
15615 .block_erase = spi_block_erase_60,
15616 }, {
15617 .eraseblocks = { {1024 * 1024, 1} },
15618 .block_erase = spi_block_erase_c7,
15619 }
15620 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015621 .printlock = spi_prettyprint_status_register_bp3_srwd,
Stefan Taunerb6b00e92013-06-28 21:28:43 +000015622 .unlock = spi_disable_blockprotect_bp3_srwd,
15623 .write = spi_chip_write_256,
15624 .read = spi_chip_read, /* Fast read (0x0B), dual I/O read (0x3B) supported */
15625 .voltage = {2700, 3600},
15626 },
15627
15628 {
Stefan Taunerf4451612013-04-19 01:59:15 +000015629 .vendor = "PMC",
15630 .name = "Pm25LD010(C)",
15631 .bustype = BUS_SPI,
15632 .manufacture_id = PMC_ID,
15633 .model_id = PMC_PM25LD010,
15634 .total_size = 128,
15635 .page_size = 256,
15636 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000015637 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000015638 .probe = probe_spi_rdid,
15639 .probe_timing = TIMING_ZERO,
15640 .block_erasers =
15641 {
15642 {
15643 .eraseblocks = { {4 * 1024, 32} },
15644 .block_erase = spi_block_erase_20,
15645 }, {
15646 .eraseblocks = { {4 * 1024, 32} },
15647 .block_erase = spi_block_erase_d7,
15648 }, {
15649 .eraseblocks = { {32 * 1024, 4} },
15650 .block_erase = spi_block_erase_d8,
15651 }, {
15652 .eraseblocks = { {128 * 1024, 1} },
15653 .block_erase = spi_block_erase_60,
15654 }, {
15655 .eraseblocks = { {128 * 1024, 1} },
15656 .block_erase = spi_block_erase_c7,
15657 }
15658 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015659 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000015660 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
15661 .write = spi_chip_write_256,
15662 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
15663 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD010 */
15664 },
15665
15666 {
15667 .vendor = "PMC",
15668 .name = "Pm25LD020(C)",
15669 .bustype = BUS_SPI,
15670 .manufacture_id = PMC_ID,
15671 .model_id = PMC_PM25LD020,
15672 .total_size = 256,
15673 .page_size = 256,
15674 .feature_bits = FEATURE_WRSR_WREN,
Angel Ponsf5822a82018-09-30 20:09:58 +020015675 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000015676 .probe = probe_spi_rdid,
15677 .probe_timing = TIMING_ZERO,
15678 .block_erasers =
15679 {
15680 {
15681 .eraseblocks = { {4 * 1024, 64} },
15682 .block_erase = spi_block_erase_20,
15683 }, {
15684 .eraseblocks = { {4 * 1024, 64} },
15685 .block_erase = spi_block_erase_d7,
15686 }, {
15687 .eraseblocks = { {64 * 1024, 4} },
15688 .block_erase = spi_block_erase_d8,
15689 }, {
15690 .eraseblocks = { {256 * 1024, 1} },
15691 .block_erase = spi_block_erase_60,
15692 }, {
15693 .eraseblocks = { {256 * 1024, 1} },
15694 .block_erase = spi_block_erase_c7,
15695 }
15696 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015697 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000015698 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
15699 .write = spi_chip_write_256,
15700 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
15701 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD020 */
15702 },
15703
15704 {
15705 .vendor = "PMC",
15706 .name = "Pm25LD040(C)",
15707 .bustype = BUS_SPI,
15708 .manufacture_id = PMC_ID,
15709 .model_id = PMC_PM25LV040,
15710 .total_size = 512,
15711 .page_size = 256,
15712 .feature_bits = FEATURE_WRSR_WREN,
Angel Pons05127bf2018-09-30 20:23:24 +020015713 .tested = TEST_OK_PREW,
Stefan Taunerf4451612013-04-19 01:59:15 +000015714 .probe = probe_spi_rdid,
15715 .probe_timing = TIMING_ZERO,
15716 .block_erasers =
15717 {
15718 {
15719 .eraseblocks = { {4 * 1024, 128} },
15720 .block_erase = spi_block_erase_20,
15721 }, {
15722 .eraseblocks = { {4 * 1024, 128} },
15723 .block_erase = spi_block_erase_d7,
15724 }, {
15725 .eraseblocks = { {64 * 1024, 8} },
15726 .block_erase = spi_block_erase_d8,
15727 }, {
15728 .eraseblocks = { {512 * 1024, 1} },
15729 .block_erase = spi_block_erase_60,
15730 }, {
15731 .eraseblocks = { {512 * 1024, 1} },
15732 .block_erase = spi_block_erase_c7,
15733 }
15734 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000015735 .printlock = spi_prettyprint_status_register_bp2_srwd,
Stefan Taunerf4451612013-04-19 01:59:15 +000015736 .unlock = spi_disable_blockprotect,
15737 .write = spi_chip_write_256,
15738 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
15739 .voltage = {2700, 3600}, /* 2.3-3.6V for Pm25LD040 */
15740 },
15741
Steven Honeyman81a8fb72015-06-02 22:32:24 +000015742 {
15743 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015744 .name = "Pm25LD256C",
15745 .bustype = BUS_SPI,
15746 .manufacture_id = PMC_ID,
15747 .model_id = PMC_PM25LD256C,
15748 .total_size = 32,
15749 .page_size = 256,
15750 .feature_bits = FEATURE_WRSR_WREN,
15751 .tested = TEST_UNTESTED,
15752 .probe = probe_spi_rdid,
15753 .probe_timing = TIMING_ZERO,
15754 .block_erasers =
15755 {
15756 {
15757 .eraseblocks = { {4 * 1024, 8} },
15758 .block_erase = spi_block_erase_20,
15759 }, {
15760 .eraseblocks = { {4 * 1024, 8} },
15761 .block_erase = spi_block_erase_d7,
15762 }, {
15763 .eraseblocks = { {32 * 1024, 1} },
15764 .block_erase = spi_block_erase_d8,
15765 }, {
15766 .eraseblocks = { {32 * 1024, 1} },
15767 .block_erase = spi_block_erase_60,
15768 }, {
15769 .eraseblocks = { {32 * 1024, 1} },
15770 .block_erase = spi_block_erase_c7,
15771 }
15772 },
15773 .printlock = spi_prettyprint_status_register_bp2_srwd,
15774 .unlock = spi_disable_blockprotect,
15775 .write = spi_chip_write_256,
15776 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
15777 .voltage = {2700, 3600},
15778 },
15779
15780 {
15781 .vendor = "PMC",
15782 .name = "Pm25LD512(C)",
15783 .bustype = BUS_SPI,
15784 .manufacture_id = PMC_ID,
15785 .model_id = PMC_PM25LD512,
15786 .total_size = 64,
15787 .page_size = 256,
15788 .feature_bits = FEATURE_WRSR_WREN,
15789 .tested = TEST_OK_PREW,
15790 .probe = probe_spi_rdid,
15791 .probe_timing = TIMING_ZERO,
15792 .block_erasers =
15793 {
15794 {
15795 .eraseblocks = { {4 * 1024, 16} },
15796 .block_erase = spi_block_erase_20,
15797 }, {
15798 .eraseblocks = { {4 * 1024, 16} },
15799 .block_erase = spi_block_erase_d7,
15800 }, {
15801 .eraseblocks = { {32 * 1024, 2} },
15802 .block_erase = spi_block_erase_d8,
15803 }, {
15804 .eraseblocks = { {64 * 1024, 1} },
15805 .block_erase = spi_block_erase_60,
15806 }, {
15807 .eraseblocks = { {64 * 1024, 1} },
15808 .block_erase = spi_block_erase_c7,
15809 }
15810 },
15811 .printlock = spi_prettyprint_status_register_bp2_srwd,
15812 .unlock = spi_disable_blockprotect, /* FIXME: C version supports "Safe Guard" */
15813 .write = spi_chip_write_256,
15814 .read = spi_chip_read, /* Fast read (0x0B), dual I/O supported */
15815 .voltage = {2300, 3600},
15816 },
15817
15818 {
15819 .vendor = "PMC",
15820 .name = "Pm25LQ016",
15821 .bustype = BUS_SPI,
15822 .manufacture_id = PMC_ID,
15823 .model_id = PMC_PM25LQ016,
15824 .total_size = 2048,
15825 .page_size = 256,
15826 /* OTP: 256B total; read 0x4B, write 0xB1 */
15827 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15828 .tested = TEST_UNTESTED,
15829 .probe = probe_spi_rdid,
15830 .probe_timing = TIMING_ZERO,
15831 .block_erasers =
15832 {
15833 {
15834 .eraseblocks = { {4 * 1024, 512} },
15835 .block_erase = spi_block_erase_20,
15836 }, {
15837 .eraseblocks = { {4 * 1024, 512} },
15838 .block_erase = spi_block_erase_d7,
15839 }, {
15840 .eraseblocks = { {64 * 1024, 32} },
15841 .block_erase = spi_block_erase_d8,
15842 }, {
15843 .eraseblocks = { {2048 * 1024, 1} },
15844 .block_erase = spi_block_erase_60,
15845 }, {
15846 .eraseblocks = { {2048 * 1024, 1} },
15847 .block_erase = spi_block_erase_c7,
15848 }
15849 },
15850 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
15851 .unlock = spi_disable_blockprotect_bp3_srwd,
15852 .write = spi_chip_write_256,
15853 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15854 .voltage = {2300, 3600},
15855 },
15856
15857 {
15858 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000015859 .name = "Pm25LQ020",
15860 .bustype = BUS_SPI,
15861 .manufacture_id = PMC_ID,
15862 .model_id = PMC_PM25LQ020,
15863 .total_size = 256,
15864 .page_size = 256,
15865 /* OTP: 256B total; read 0x4B, write 0xB1 */
15866 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15867 .tested = TEST_UNTESTED,
15868 .probe = probe_spi_rdid,
15869 .probe_timing = TIMING_ZERO,
15870 .block_erasers =
15871 {
15872 {
15873 .eraseblocks = { {4 * 1024, 64} },
15874 .block_erase = spi_block_erase_20,
15875 }, {
15876 .eraseblocks = { {4 * 1024, 64} },
15877 .block_erase = spi_block_erase_d7,
15878 }, {
15879 .eraseblocks = { {64 * 1024, 4} },
15880 .block_erase = spi_block_erase_d8,
15881 }, {
15882 .eraseblocks = { {256 * 1024, 1} },
15883 .block_erase = spi_block_erase_60,
15884 }, {
15885 .eraseblocks = { {256 * 1024, 1} },
15886 .block_erase = spi_block_erase_c7,
15887 }
15888 },
15889 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
15890 .unlock = spi_disable_blockprotect_bp3_srwd,
15891 .write = spi_chip_write_256,
15892 .read = spi_chip_read,
15893 .voltage = {2300, 3600},
15894 },
15895
15896 {
15897 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100015898 .name = "Pm25LQ032C",
15899 .bustype = BUS_SPI,
15900 .manufacture_id = PMC_ID,
15901 .model_id = PMC_PM25LQ032C,
15902 .total_size = 4096,
15903 .page_size = 256,
15904 /* OTP: 64B total; read 0x4B, write 0xB1 */
15905 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15906 .tested = TEST_OK_PREW,
15907 .probe = probe_spi_rdid,
15908 .probe_timing = TIMING_ZERO,
15909 .block_erasers =
15910 {
15911 {
15912 .eraseblocks = { {4 * 1024, 1024} },
15913 .block_erase = spi_block_erase_20,
15914 }, {
15915 .eraseblocks = { {4 * 1024, 1024} },
15916 .block_erase = spi_block_erase_d7,
15917 }, {
15918 .eraseblocks = { {64 * 1024, 64} },
15919 .block_erase = spi_block_erase_d8,
15920 }, {
15921 .eraseblocks = { {4096 * 1024, 1} },
15922 .block_erase = spi_block_erase_60,
15923 }, {
15924 .eraseblocks = { {4096 * 1024, 1} },
15925 .block_erase = spi_block_erase_c7,
15926 }
15927 },
15928 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
15929 .unlock = spi_disable_blockprotect_bp3_srwd,
15930 .write = spi_chip_write_256,
15931 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15932 .voltage = {2700, 3600},
15933 },
15934
15935 {
15936 .vendor = "PMC",
Steven Honeyman81a8fb72015-06-02 22:32:24 +000015937 .name = "Pm25LQ040",
15938 .bustype = BUS_SPI,
15939 .manufacture_id = PMC_ID,
15940 .model_id = PMC_PM25LQ040,
15941 .total_size = 512,
15942 .page_size = 256,
15943 /* OTP: 256B total; read 0x4B, write 0xB1 */
15944 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15945 .tested = TEST_UNTESTED,
15946 .probe = probe_spi_rdid,
15947 .probe_timing = TIMING_ZERO,
15948 .block_erasers =
15949 {
15950 {
15951 .eraseblocks = { {4 * 1024, 128} },
15952 .block_erase = spi_block_erase_20,
15953 }, {
15954 .eraseblocks = { {4 * 1024, 128} },
15955 .block_erase = spi_block_erase_d7,
15956 }, {
15957 .eraseblocks = { {64 * 1024, 8} },
15958 .block_erase = spi_block_erase_d8,
15959 }, {
15960 .eraseblocks = { {512 * 1024, 1} },
15961 .block_erase = spi_block_erase_60,
15962 }, {
15963 .eraseblocks = { {512 * 1024, 1} },
15964 .block_erase = spi_block_erase_c7,
15965 }
15966 },
15967 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
15968 .unlock = spi_disable_blockprotect_bp3_srwd,
15969 .write = spi_chip_write_256,
15970 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
15971 .voltage = {2300, 3600},
15972 },
15973
15974 {
15975 .vendor = "PMC",
15976 .name = "Pm25LQ080",
15977 .bustype = BUS_SPI,
15978 .manufacture_id = PMC_ID,
15979 .model_id = PMC_PM25LQ080,
15980 .total_size = 1024,
15981 .page_size = 256,
15982 /* OTP: 64B total; read 0x4B, write 0xB1 */
15983 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
15984 .tested = TEST_UNTESTED,
15985 .probe = probe_spi_rdid,
15986 .probe_timing = TIMING_ZERO,
15987 .block_erasers =
15988 {
15989 {
15990 .eraseblocks = { {4 * 1024, 256} },
15991 .block_erase = spi_block_erase_20,
15992 }, {
15993 .eraseblocks = { {4 * 1024, 256} },
15994 .block_erase = spi_block_erase_d7,
15995 }, {
15996 .eraseblocks = { {64 * 1024, 16} },
15997 .block_erase = spi_block_erase_d8,
15998 }, {
15999 .eraseblocks = { {1024 * 1024, 1} },
16000 .block_erase = spi_block_erase_60,
16001 }, {
16002 .eraseblocks = { {1024 * 1024, 1} },
16003 .block_erase = spi_block_erase_c7,
16004 }
16005 },
16006 .printlock = spi_prettyprint_status_register_bp3_srwd, /* bit6 is quad enable */
16007 .unlock = spi_disable_blockprotect_bp3_srwd,
16008 .write = spi_chip_write_256,
16009 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
16010 .voltage = {2300, 3600},
16011 },
16012
16013 {
16014 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016015 .name = "Pm25LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016016 .bustype = BUS_SPI,
Stefan Taunerbecda742014-05-30 19:34:00 +000016017 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016018 .model_id = PMC_PM25LV010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016019 .total_size = 128,
16020 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000016021 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerbecda742014-05-30 19:34:00 +000016022 .tested = TEST_OK_PREW,
16023 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016024 .probe_timing = TIMING_ZERO,
16025 .block_erasers =
16026 {
16027 {
16028 .eraseblocks = { {4 * 1024, 32} },
16029 .block_erase = spi_block_erase_d7,
16030 }, {
16031 .eraseblocks = { {32 * 1024, 4} },
16032 .block_erase = spi_block_erase_d8,
16033 }, {
16034 .eraseblocks = { {128 * 1024, 1} },
16035 .block_erase = spi_block_erase_c7,
16036 }
16037 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000016038 .printlock = spi_prettyprint_status_register_bp1_srwd,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016039 .unlock = spi_disable_blockprotect,
16040 .write = spi_chip_write_256,
16041 .read = spi_chip_read, /* Fast read (0x0B) supported */
16042 .voltage = {2700, 3600},
16043 },
16044
16045 {
16046 .vendor = "PMC",
16047 .name = "Pm25LV010A",
16048 .bustype = BUS_SPI,
16049 .manufacture_id = PMC_ID,
16050 .model_id = PMC_PM25LV010,
16051 .total_size = 128,
16052 .page_size = 256,
16053 .feature_bits = FEATURE_WRSR_WREN,
16054 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016055 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000016056 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016057 .block_erasers =
16058 {
16059 {
16060 .eraseblocks = { {4 * 1024, 32} },
16061 .block_erase = spi_block_erase_d7,
16062 }, {
16063 .eraseblocks = { {32 * 1024, 4} },
16064 .block_erase = spi_block_erase_d8,
16065 }, {
16066 .eraseblocks = { {128 * 1024, 1} },
16067 .block_erase = spi_block_erase_c7,
16068 }
16069 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000016070 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000016071 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000016072 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016073 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000016074 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000016075 },
16076
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016077 {
16078 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100016079 .name = "Pm25LV016B",
16080 .bustype = BUS_SPI,
16081 .manufacture_id = PMC_ID,
16082 .model_id = PMC_PM25LV016B,
16083 .total_size = 2048,
16084 .page_size = 256,
16085 .feature_bits = FEATURE_WRSR_WREN,
16086 .tested = TEST_UNTESTED,
16087 .probe = probe_spi_rdid,
16088 .probe_timing = TIMING_ZERO,
16089 .block_erasers =
16090 {
16091 {
16092 .eraseblocks = { {4 * 1024, 512} },
16093 .block_erase = spi_block_erase_d7,
16094 }, {
16095 .eraseblocks = { {4 * 1024, 512} },
16096 .block_erase = spi_block_erase_20,
16097 }, {
16098 .eraseblocks = { {64 * 1024, 32} },
16099 .block_erase = spi_block_erase_d8,
16100 }, {
16101 .eraseblocks = { {2 * 1024 * 1024, 1} },
16102 .block_erase = spi_block_erase_60,
16103 }, {
16104 .eraseblocks = { {2 * 1024 * 1024, 1} },
16105 .block_erase = spi_block_erase_c7,
16106 }
16107 },
16108 .printlock = spi_prettyprint_status_register_bp2_srwd,
16109 .unlock = spi_disable_blockprotect,
16110 .write = spi_chip_write_256,
16111 .read = spi_chip_read, /* Fast read (0x0B) supported */
16112 .voltage = {2700, 3600},
16113 },
16114
16115 {
16116 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016117 .name = "Pm25LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016118 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016119 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016120 .model_id = PMC_PM25LV020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016121 .total_size = 256,
16122 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000016123 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016124 .tested = TEST_UNTESTED,
16125 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000016126 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016127 .block_erasers =
16128 {
16129 {
16130 .eraseblocks = { {4 * 1024, 64} },
16131 .block_erase = spi_block_erase_d7,
16132 }, {
16133 .eraseblocks = { {64 * 1024, 4} },
16134 .block_erase = spi_block_erase_d8,
16135 }, {
16136 .eraseblocks = { {256 * 1024, 1} },
16137 .block_erase = spi_block_erase_c7,
16138 }
16139 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000016140 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000016141 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000016142 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016143 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016144 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000016145 },
16146
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016147 {
16148 .vendor = "PMC",
16149 .name = "Pm25LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016150 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016151 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016152 .model_id = PMC_PM25LV040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016153 .total_size = 512,
16154 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000016155 .feature_bits = FEATURE_WRSR_WREN,
Stefan Tauner716e0982011-07-25 20:38:52 +000016156 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016157 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000016158 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016159 .block_erasers =
16160 {
16161 {
16162 .eraseblocks = { {4 * 1024, 128} },
16163 .block_erase = spi_block_erase_d7,
16164 }, {
16165 .eraseblocks = { {64 * 1024, 8} },
16166 .block_erase = spi_block_erase_d8,
16167 }, {
16168 .eraseblocks = { {512 * 1024, 1} },
16169 .block_erase = spi_block_erase_c7,
16170 }
16171 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000016172 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000016173 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000016174 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016175 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016176 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000016177 },
16178
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016179 {
16180 .vendor = "PMC",
16181 .name = "Pm25LV080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016182 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016183 .manufacture_id = PMC_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016184 .model_id = PMC_PM25LV080B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016185 .total_size = 1024,
16186 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000016187 .feature_bits = FEATURE_WRSR_WREN,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016188 .tested = TEST_UNTESTED,
16189 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000016190 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016191 .block_erasers =
16192 {
16193 {
16194 .eraseblocks = { {4 * 1024, 256} },
16195 .block_erase = spi_block_erase_d7,
16196 }, {
16197 .eraseblocks = { {4 * 1024, 256} },
16198 .block_erase = spi_block_erase_20,
16199 }, {
16200 .eraseblocks = { {64 * 1024, 16} },
16201 .block_erase = spi_block_erase_d8,
16202 }, {
16203 .eraseblocks = { {1024 * 1024, 1} },
16204 .block_erase = spi_block_erase_60,
16205 }, {
16206 .eraseblocks = { {1024 * 1024, 1} },
16207 .block_erase = spi_block_erase_c7,
16208 }
16209 },
Stefan Tauner12f3d512014-05-27 21:27:27 +000016210 .printlock = spi_prettyprint_status_register_bp2_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000016211 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000016212 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016213 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016214 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000016215 },
16216
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016217 {
16218 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100016219 .name = "Pm25LV512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016220 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016221 .manufacture_id = PMC_ID_NOPREFIX,
16222 .model_id = PMC_PM25LV512,
16223 .total_size = 64,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016224 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000016225 .feature_bits = FEATURE_WRSR_WREN,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016226 .tested = TEST_OK_PREW,
16227 .probe = probe_spi_res2, /* The continuation code is transferred as the 3rd byte m( */
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000016228 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016229 .block_erasers =
16230 {
16231 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100016232 .eraseblocks = { {4 * 1024, 16} },
Sean Nelson5643c072010-01-19 03:23:07 +000016233 .block_erase = spi_block_erase_d7,
16234 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100016235 .eraseblocks = { {32 * 1024, 2} },
Sean Nelson5643c072010-01-19 03:23:07 +000016236 .block_erase = spi_block_erase_d8,
16237 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100016238 .eraseblocks = { {64 * 1024, 1} },
Sean Nelson5643c072010-01-19 03:23:07 +000016239 .block_erase = spi_block_erase_c7,
16240 }
16241 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100016242 .printlock = spi_prettyprint_status_register_bp1_srwd,
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000016243 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000016244 .write = spi_chip_write_256,
Stefan Tauner3f5e35d2013-04-19 01:58:33 +000016245 .read = spi_chip_read, /* Fast read (0x0B) supported */
Steven Zakulec7d257b42011-07-19 08:50:18 +000016246 .voltage = {2700, 3600},
FENG yu ningff692fb2008-12-08 18:15:10 +000016247 },
16248
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016249 {
16250 .vendor = "PMC",
Sean Nelson72a9a022009-12-22 22:15:33 +000016251 .name = "Pm29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016252 .bustype = BUS_PARALLEL,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000016253 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016254 .model_id = PMC_PM29F002B,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000016255 .total_size = 256,
Sean Nelson72a9a022009-12-22 22:15:33 +000016256 .page_size = 8 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000016257 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000016258 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000016259 .probe = probe_jedec,
Stefan Tauner1aa80b02013-07-25 22:58:51 +000016260 .probe_timing = TIMING_FIXME,
Sean Nelson72a9a022009-12-22 22:15:33 +000016261 .block_erasers =
16262 {
16263 {
16264 .eraseblocks = {
16265 {16 * 1024, 1},
16266 {8 * 1024, 2},
16267 {96 * 1024, 1},
16268 {128 * 1024, 1},
16269 },
Sean Nelson35727f72010-01-28 23:55:12 +000016270 .block_erase = erase_sector_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000016271 }, {
16272 .eraseblocks = { {256 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000016273 .block_erase = erase_chip_block_jedec,
Sean Nelson72a9a022009-12-22 22:15:33 +000016274 },
16275 },
Sean Nelson35727f72010-01-28 23:55:12 +000016276 .write = write_jedec_1,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000016277 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016278 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016279 .prepare_access = prepare_memory_access,
16280 .finish_access = finish_memory_access,
Uwe Hermannf983d9f2009-06-14 21:53:26 +000016281 },
16282
16283 {
16284 .vendor = "PMC",
Alan Green1f9cc7d2019-07-01 11:10:45 +100016285 .name = "Pm29F002T",
16286 .bustype = BUS_PARALLEL,
16287 .manufacture_id = PMC_ID_NOPREFIX,
16288 .model_id = PMC_PM29F002T,
16289 .total_size = 256,
16290 .page_size = 8 * 1024,
16291 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
16292 .tested = TEST_OK_PREW,
16293 .probe = probe_jedec,
16294 .probe_timing = TIMING_FIXME,
16295 .block_erasers =
16296 {
16297 {
16298 .eraseblocks = {
16299 {128 * 1024, 1},
16300 {96 * 1024, 1},
16301 {8 * 1024, 2},
16302 {16 * 1024, 1},
16303 },
16304 .block_erase = erase_sector_jedec,
16305 }, {
16306 .eraseblocks = { {256 * 1024, 1} },
16307 .block_erase = erase_chip_block_jedec,
16308 },
16309 },
16310 .write = write_jedec_1,
16311 .read = read_memmapped,
16312 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010016313 .prepare_access = prepare_memory_access,
16314 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100016315 },
16316
16317 {
16318 .vendor = "PMC",
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016319 .name = "Pm39LV010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016320 .bustype = BUS_PARALLEL,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016321 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016322 .model_id = PMC_PM39F010, /* Pm39LV010 and Pm39F010 have identical IDs but different voltage */
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016323 .total_size = 128,
16324 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000016325 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000016326 .tested = TEST_OK_PREW,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016327 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016328 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson5643c072010-01-19 03:23:07 +000016329 .block_erasers =
16330 {
16331 {
16332 .eraseblocks = { {4 * 1024, 32} },
16333 .block_erase = erase_sector_jedec,
16334 }, {
16335 .eraseblocks = { {64 * 1024, 2} },
16336 .block_erase = erase_block_jedec,
16337 }, {
16338 .eraseblocks = { {128 * 1024, 1} },
16339 .block_erase = erase_chip_block_jedec,
16340 }
16341 },
Sean Nelson35727f72010-01-28 23:55:12 +000016342 .write = write_jedec_1,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016343 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016344 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016345 .prepare_access = prepare_memory_access,
16346 .finish_access = finish_memory_access,
Rudolf Marek50fdf3b2009-05-17 17:02:07 +000016347 },
16348
16349 {
16350 .vendor = "PMC",
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016351 .name = "Pm39LV020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016352 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016353 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016354 .model_id = PMC_PM39LV020,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016355 .total_size = 256,
16356 .page_size = 4096,
16357 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
16358 .tested = TEST_UNTESTED,
16359 .probe = probe_jedec,
16360 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100016361 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016362 {
16363 {
16364 .eraseblocks = { {4 * 1024, 64} },
16365 .block_erase = erase_sector_jedec,
16366 }, {
16367 .eraseblocks = { {64 * 1024, 4} },
16368 .block_erase = erase_block_jedec,
16369 }, {
16370 .eraseblocks = { {256 * 1024, 1} },
16371 .block_erase = erase_chip_block_jedec,
16372 }
16373 },
16374 .write = write_jedec_1,
16375 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016376 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016377 .prepare_access = prepare_memory_access,
16378 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016379 },
16380
16381 {
16382 .vendor = "PMC",
16383 .name = "Pm39LV040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016384 .bustype = BUS_PARALLEL,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016385 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016386 .model_id = PMC_PM39LV040,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016387 .total_size = 512,
16388 .page_size = 4096,
16389 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000016390 .tested = TEST_OK_PR,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016391 .probe = probe_jedec,
16392 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Alan Greenfa3fcd32019-06-27 15:41:50 +100016393 .block_erasers =
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016394 {
16395 {
16396 .eraseblocks = { {4 * 1024, 128} },
16397 .block_erase = erase_sector_jedec,
16398 }, {
16399 .eraseblocks = { {64 * 1024, 8} },
16400 .block_erase = erase_block_jedec,
16401 }, {
16402 .eraseblocks = { {512 * 1024, 1} },
16403 .block_erase = erase_chip_block_jedec,
16404 }
16405 },
16406 .write = write_jedec_1,
16407 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016408 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016409 .prepare_access = prepare_memory_access,
16410 .finish_access = finish_memory_access,
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016411 },
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000016412
16413 {
16414 .vendor = "PMC",
16415 .name = "Pm39LV512",
16416 .bustype = BUS_PARALLEL,
16417 .manufacture_id = PMC_ID_NOPREFIX,
16418 .model_id = PMC_PM39LV512,
16419 .total_size = 64,
16420 .page_size = 4096,
16421 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
16422 .tested = TEST_OK_PREW,
16423 .probe = probe_jedec,
16424 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
16425 .block_erasers =
16426 {
16427 {
16428 .eraseblocks = { {4 * 1024, 16} },
16429 .block_erase = erase_sector_jedec,
16430 }, {
16431 .eraseblocks = { {64 * 1024, 1} },
16432 .block_erase = erase_block_jedec,
16433 }, {
16434 .eraseblocks = { {64 * 1024, 1} },
16435 .block_erase = erase_chip_block_jedec,
16436 }
16437 },
16438 .write = write_jedec_1,
16439 .read = read_memmapped,
16440 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010016441 .prepare_access = prepare_memory_access,
16442 .finish_access = finish_memory_access,
Kyösti Mälkkiedab1d22012-05-20 23:32:33 +000016443 },
16444
Anders Juel Jensendfdc56f2010-03-27 23:25:14 +000016445 {
16446 .vendor = "PMC",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016447 .name = "Pm49FL002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016448 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016449 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016450 .model_id = PMC_PM49FL002,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016451 .total_size = 256,
16452 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010016453 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016454 .tested = TEST_OK_PR,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000016455 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000016456 .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */
Sean Nelson5643c072010-01-19 03:23:07 +000016457 .block_erasers =
16458 {
16459 {
16460 .eraseblocks = { {4 * 1024, 64} },
16461 .block_erase = erase_sector_jedec,
16462 }, {
16463 .eraseblocks = { {16 * 1024, 16} },
16464 .block_erase = erase_block_jedec,
16465 }, {
16466 .eraseblocks = { {256 * 1024, 1} },
16467 .block_erase = erase_chip_block_jedec,
16468 }
16469 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016470 .unlock = unlock_regspace2_uniform_32k,
Sean Nelson36172342010-02-27 18:01:15 +000016471 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016472 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016473 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010016474 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016475 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016476 },
16477
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016478 {
16479 .vendor = "PMC",
16480 .name = "Pm49FL004",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000016481 .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016482 .manufacture_id = PMC_ID_NOPREFIX,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000016483 .model_id = PMC_PM49FL004,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016484 .total_size = 512,
16485 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010016486 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000016487 .tested = TEST_OK_PREW,
Carl-Daniel Hailfingere9404662010-01-09 02:24:17 +000016488 .probe = probe_jedec,
Stefan Tauner74dc73f2015-03-01 22:04:38 +000016489 .probe_timing = TIMING_ZERO,
Sean Nelson5643c072010-01-19 03:23:07 +000016490 .block_erasers =
16491 {
16492 {
16493 .eraseblocks = { {4 * 1024, 128} },
16494 .block_erase = erase_sector_jedec,
16495 }, {
16496 .eraseblocks = { {64 * 1024, 8} },
16497 .block_erase = erase_block_jedec,
16498 }, {
16499 .eraseblocks = { {512 * 1024, 1} },
16500 .block_erase = erase_chip_block_jedec,
16501 }
16502 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000016503 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson36172342010-02-27 18:01:15 +000016504 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000016505 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000016506 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010016507 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010016508 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000016509 },
16510
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000016511 {
Nico Huberb09136b2024-10-25 22:52:30 +020016512 .vendor = "Puya",
16513 .name = "P25Q05H",
16514 .bustype = BUS_SPI,
16515 .manufacture_id = PUYA_ID,
16516 .model_id = PUYA_P25Q05H,
16517 .total_size = 64,
16518 .page_size = 256,
16519 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
16520 FEATURE_OTP | FEATURE_QIO,
16521 .tested = TEST_UNTESTED,
16522 .probe = probe_spi_rdid,
16523 .probe_timing = TIMING_ZERO,
16524 .block_erasers =
16525 {
16526 {
16527 .eraseblocks = { {256, 256} },
16528 .block_erase = spi_block_erase_81,
16529 }, {
16530 .eraseblocks = { {4 * 1024, 16} },
16531 .block_erase = spi_block_erase_20,
16532 }, {
16533 .eraseblocks = { {32 * 1024, 2} },
16534 .block_erase = spi_block_erase_52,
16535 }, {
16536 .eraseblocks = { {64 * 1024, 1} },
16537 .block_erase = spi_block_erase_d8,
16538 }, {
16539 .eraseblocks = { {64 * 1024, 1} },
16540 .block_erase = spi_block_erase_60,
16541 }, {
16542 .eraseblocks = { {64 * 1024, 1} },
16543 .block_erase = spi_block_erase_c7,
16544 },
16545 },
16546 .reg_bits =
16547 {
16548 .qe = {STATUS2, 1, RW},
16549 .srp = {STATUS1, 7, RW},
16550 .srl = {STATUS2, 0, RW},
16551 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16552 .tb = {STATUS1, 5, RW},
16553 .sec = {STATUS1, 6, RW},
16554 .cmp = {STATUS2, 6, RW},
16555 },
16556 .wp_write_cfg = spi_wp_write_cfg,
16557 .wp_read_cfg = spi_wp_read_cfg,
16558 .wp_get_ranges = spi_wp_get_available_ranges,
16559 .decode_range = decode_range_spi25,
16560 .printlock = spi_prettyprint_status_register_bp4_srwd,
16561 .unlock = spi_disable_blockprotect_bp4_srwd,
16562 .write = spi_chip_write_256,
16563 .read = spi_chip_read,
16564 .voltage = {2300, 3600},
16565 .prepare_access = spi_prepare_io,
16566 .finish_access = spi_finish_io,
16567 },
16568
16569 {
16570 .vendor = "Puya",
Nico Huberb0cae5e2024-10-25 23:03:40 +020016571 .name = "P25Q06H",
16572 .bustype = BUS_SPI,
16573 .manufacture_id = PUYA_ID,
16574 .model_id = PUYA_P25Q06H,
16575 .total_size = 64,
16576 .page_size = 256,
16577 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
16578 FEATURE_OTP | FEATURE_QIO,
16579 .tested = TEST_UNTESTED,
16580 .probe = probe_spi_rdid,
16581 .probe_timing = TIMING_ZERO,
16582 .block_erasers =
16583 {
16584 {
16585 .eraseblocks = { {256, 256} },
16586 .block_erase = spi_block_erase_81,
16587 }, {
16588 .eraseblocks = { {4 * 1024, 16} },
16589 .block_erase = spi_block_erase_20,
16590 }, {
16591 .eraseblocks = { {32 * 1024, 2} },
16592 .block_erase = spi_block_erase_52,
16593 }, {
16594 .eraseblocks = { {64 * 1024, 1} },
16595 .block_erase = spi_block_erase_d8,
16596 }, {
16597 .eraseblocks = { {64 * 1024, 1} },
16598 .block_erase = spi_block_erase_60,
16599 }, {
16600 .eraseblocks = { {64 * 1024, 1} },
16601 .block_erase = spi_block_erase_c7,
16602 },
16603 },
16604 .reg_bits =
16605 {
16606 .qe = {STATUS2, 1, RW},
16607 .srp = {STATUS1, 7, RW},
16608 .srl = {STATUS2, 0, RW},
16609 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16610 .tb = {STATUS1, 5, RW},
16611 .sec = {STATUS1, 6, RW},
16612 .cmp = {STATUS2, 6, RW},
16613 },
16614 .wp_write_cfg = spi_wp_write_cfg,
16615 .wp_read_cfg = spi_wp_read_cfg,
16616 .wp_get_ranges = spi_wp_get_available_ranges,
16617 .decode_range = decode_range_spi25,
16618 .printlock = spi_prettyprint_status_register_bp4_srwd,
16619 .unlock = spi_disable_blockprotect_bp4_srwd,
16620 .write = spi_chip_write_256,
16621 .read = spi_chip_read,
16622 .voltage = {2300, 3600},
16623 .prepare_access = spi_prepare_io,
16624 .finish_access = spi_finish_io,
16625 },
16626
16627 {
16628 .vendor = "Puya",
Nico Huberb09136b2024-10-25 22:52:30 +020016629 .name = "P25Q10H",
16630 .bustype = BUS_SPI,
16631 .manufacture_id = PUYA_ID,
16632 .model_id = PUYA_P25Q10H,
16633 .total_size = 128,
16634 .page_size = 256,
16635 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
16636 FEATURE_OTP | FEATURE_QIO,
16637 .tested = TEST_UNTESTED,
16638 .probe = probe_spi_rdid,
16639 .probe_timing = TIMING_ZERO,
16640 .block_erasers =
16641 {
16642 {
16643 .eraseblocks = { {256, 512} },
16644 .block_erase = spi_block_erase_81,
16645 }, {
16646 .eraseblocks = { {4 * 1024, 32} },
16647 .block_erase = spi_block_erase_20,
16648 }, {
16649 .eraseblocks = { {32 * 1024, 4} },
16650 .block_erase = spi_block_erase_52,
16651 }, {
16652 .eraseblocks = { {64 * 1024, 2} },
16653 .block_erase = spi_block_erase_d8,
16654 }, {
16655 .eraseblocks = { {128 * 1024, 1} },
16656 .block_erase = spi_block_erase_60,
16657 }, {
16658 .eraseblocks = { {128 * 1024, 1} },
16659 .block_erase = spi_block_erase_c7,
16660 },
16661 },
16662 .reg_bits =
16663 {
16664 .qe = {STATUS2, 1, RW},
16665 .srp = {STATUS1, 7, RW},
16666 .srl = {STATUS2, 0, RW},
16667 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16668 .tb = {STATUS1, 5, RW},
16669 .sec = {STATUS1, 6, RW},
16670 .cmp = {STATUS2, 6, RW},
16671 },
16672 .wp_write_cfg = spi_wp_write_cfg,
16673 .wp_read_cfg = spi_wp_read_cfg,
16674 .wp_get_ranges = spi_wp_get_available_ranges,
16675 .decode_range = decode_range_spi25,
16676 .printlock = spi_prettyprint_status_register_bp4_srwd,
16677 .unlock = spi_disable_blockprotect_bp4_srwd,
16678 .write = spi_chip_write_256,
16679 .read = spi_chip_read,
16680 .voltage = {2300, 3600},
16681 .prepare_access = spi_prepare_io,
16682 .finish_access = spi_finish_io,
16683 },
16684
16685 {
16686 .vendor = "Puya",
Nico Huberb0cae5e2024-10-25 23:03:40 +020016687 .name = "P25Q11H",
16688 .bustype = BUS_SPI,
16689 .manufacture_id = PUYA_ID,
16690 .model_id = PUYA_P25Q11H,
16691 .total_size = 128,
16692 .page_size = 256,
16693 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
16694 FEATURE_OTP | FEATURE_QIO,
16695 .tested = TEST_UNTESTED,
16696 .probe = probe_spi_rdid,
16697 .probe_timing = TIMING_ZERO,
16698 .block_erasers =
16699 {
16700 {
16701 .eraseblocks = { {256, 512} },
16702 .block_erase = spi_block_erase_81,
16703 }, {
16704 .eraseblocks = { {4 * 1024, 32} },
16705 .block_erase = spi_block_erase_20,
16706 }, {
16707 .eraseblocks = { {32 * 1024, 4} },
16708 .block_erase = spi_block_erase_52,
16709 }, {
16710 .eraseblocks = { {64 * 1024, 2} },
16711 .block_erase = spi_block_erase_d8,
16712 }, {
16713 .eraseblocks = { {128 * 1024, 1} },
16714 .block_erase = spi_block_erase_60,
16715 }, {
16716 .eraseblocks = { {128 * 1024, 1} },
16717 .block_erase = spi_block_erase_c7,
16718 },
16719 },
16720 .reg_bits =
16721 {
16722 .qe = {STATUS2, 1, RW},
16723 .srp = {STATUS1, 7, RW},
16724 .srl = {STATUS2, 0, RW},
16725 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16726 .tb = {STATUS1, 5, RW},
16727 .sec = {STATUS1, 6, RW},
16728 .cmp = {STATUS2, 6, RW},
16729 },
16730 .wp_write_cfg = spi_wp_write_cfg,
16731 .wp_read_cfg = spi_wp_read_cfg,
16732 .wp_get_ranges = spi_wp_get_available_ranges,
16733 .decode_range = decode_range_spi25,
16734 .printlock = spi_prettyprint_status_register_bp4_srwd,
16735 .unlock = spi_disable_blockprotect_bp4_srwd,
16736 .write = spi_chip_write_256,
16737 .read = spi_chip_read,
16738 .voltage = {2300, 3600},
16739 .prepare_access = spi_prepare_io,
16740 .finish_access = spi_finish_io,
16741 },
16742
16743 {
16744 .vendor = "Puya",
Nico Huberb09136b2024-10-25 22:52:30 +020016745 .name = "P25Q20H",
16746 .bustype = BUS_SPI,
16747 .manufacture_id = PUYA_ID,
16748 .model_id = PUYA_P25Q20H,
16749 .total_size = 256,
16750 .page_size = 256,
16751 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
16752 FEATURE_OTP | FEATURE_QIO,
16753 .tested = TEST_UNTESTED,
16754 .probe = probe_spi_rdid,
16755 .probe_timing = TIMING_ZERO,
16756 .block_erasers =
16757 {
16758 {
16759 .eraseblocks = { {256, 1024} },
16760 .block_erase = spi_block_erase_81,
16761 }, {
16762 .eraseblocks = { {4 * 1024, 64} },
16763 .block_erase = spi_block_erase_20,
16764 }, {
16765 .eraseblocks = { {32 * 1024, 8} },
16766 .block_erase = spi_block_erase_52,
16767 }, {
16768 .eraseblocks = { {64 * 1024, 4} },
16769 .block_erase = spi_block_erase_d8,
16770 }, {
16771 .eraseblocks = { {256 * 1024, 1} },
16772 .block_erase = spi_block_erase_60,
16773 }, {
16774 .eraseblocks = { {256 * 1024, 1} },
16775 .block_erase = spi_block_erase_c7,
16776 },
16777 },
16778 .reg_bits =
16779 {
16780 .qe = {STATUS2, 1, RW},
16781 .srp = {STATUS1, 7, RW},
16782 .srl = {STATUS2, 0, RW},
16783 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16784 .tb = {STATUS1, 5, RW},
16785 .sec = {STATUS1, 6, RW},
16786 .cmp = {STATUS2, 6, RW},
16787 },
16788 .wp_write_cfg = spi_wp_write_cfg,
16789 .wp_read_cfg = spi_wp_read_cfg,
16790 .wp_get_ranges = spi_wp_get_available_ranges,
16791 .decode_range = decode_range_spi25,
16792 .printlock = spi_prettyprint_status_register_bp4_srwd,
16793 .unlock = spi_disable_blockprotect_bp4_srwd,
16794 .write = spi_chip_write_256,
16795 .read = spi_chip_read,
16796 .voltage = {2300, 3600},
16797 .prepare_access = spi_prepare_io,
16798 .finish_access = spi_finish_io,
16799 },
16800
16801 {
16802 .vendor = "Puya",
Nico Huberb0cae5e2024-10-25 23:03:40 +020016803 .name = "P25Q21H",
16804 .bustype = BUS_SPI,
16805 .manufacture_id = PUYA_ID,
16806 .model_id = PUYA_P25Q21H,
16807 .total_size = 256,
16808 .page_size = 256,
16809 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR3 |
16810 FEATURE_OTP | FEATURE_QIO,
16811 .tested = TEST_UNTESTED,
16812 .probe = probe_spi_rdid,
16813 .probe_timing = TIMING_ZERO,
16814 .block_erasers =
16815 {
16816 {
16817 .eraseblocks = { {256, 1024} },
16818 .block_erase = spi_block_erase_81,
16819 }, {
16820 .eraseblocks = { {4 * 1024, 64} },
16821 .block_erase = spi_block_erase_20,
16822 }, {
16823 .eraseblocks = { {32 * 1024, 8} },
16824 .block_erase = spi_block_erase_52,
16825 }, {
16826 .eraseblocks = { {64 * 1024, 4} },
16827 .block_erase = spi_block_erase_d8,
16828 }, {
16829 .eraseblocks = { {256 * 1024, 1} },
16830 .block_erase = spi_block_erase_60,
16831 }, {
16832 .eraseblocks = { {256 * 1024, 1} },
16833 .block_erase = spi_block_erase_c7,
16834 },
16835 },
16836 .reg_bits =
16837 {
16838 .qe = {STATUS2, 1, RW},
16839 .srp = {STATUS1, 7, RW},
16840 .srl = {STATUS2, 0, RW},
16841 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16842 .tb = {STATUS1, 5, RW},
16843 .sec = {STATUS1, 6, RW},
16844 .cmp = {STATUS2, 6, RW},
16845 },
16846 .wp_write_cfg = spi_wp_write_cfg,
16847 .wp_read_cfg = spi_wp_read_cfg,
16848 .wp_get_ranges = spi_wp_get_available_ranges,
16849 .decode_range = decode_range_spi25,
16850 .printlock = spi_prettyprint_status_register_bp4_srwd,
16851 .unlock = spi_disable_blockprotect_bp4_srwd,
16852 .write = spi_chip_write_256,
16853 .read = spi_chip_read,
16854 .voltage = {2300, 3600},
16855 .prepare_access = spi_prepare_io,
16856 .finish_access = spi_finish_io,
16857 },
16858
16859 {
16860 .vendor = "Puya",
Nico Huberb09136b2024-10-25 22:52:30 +020016861 .name = "P25Q40H",
16862 .bustype = BUS_SPI,
16863 .manufacture_id = PUYA_ID,
16864 .model_id = PUYA_P25Q40H,
16865 .total_size = 512,
16866 .page_size = 256,
16867 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
16868 FEATURE_OTP | FEATURE_QIO,
16869 .tested = TEST_UNTESTED,
16870 .probe = probe_spi_rdid,
16871 .probe_timing = TIMING_ZERO,
16872 .block_erasers =
16873 {
16874 {
16875 .eraseblocks = { {256, 2048} },
16876 .block_erase = spi_block_erase_81,
16877 }, {
16878 .eraseblocks = { {4 * 1024, 128} },
16879 .block_erase = spi_block_erase_20,
16880 }, {
16881 .eraseblocks = { {32 * 1024, 16} },
16882 .block_erase = spi_block_erase_52,
16883 }, {
16884 .eraseblocks = { {64 * 1024, 8} },
16885 .block_erase = spi_block_erase_d8,
16886 }, {
16887 .eraseblocks = { {512 * 1024, 1} },
16888 .block_erase = spi_block_erase_60,
16889 }, {
16890 .eraseblocks = { {512 * 1024, 1} },
16891 .block_erase = spi_block_erase_c7,
16892 },
16893 },
16894 .reg_bits =
16895 {
16896 .qe = {STATUS2, 1, RW},
16897 .srp = {STATUS1, 7, RW},
16898 .srl = {STATUS2, 0, RW},
16899 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16900 .tb = {STATUS1, 5, RW},
16901 .sec = {STATUS1, 6, RW},
16902 .cmp = {STATUS2, 6, RW},
16903 },
16904 .wp_write_cfg = spi_wp_write_cfg,
16905 .wp_read_cfg = spi_wp_read_cfg,
16906 .wp_get_ranges = spi_wp_get_available_ranges,
16907 .decode_range = decode_range_spi25,
16908 .printlock = spi_prettyprint_status_register_bp4_srwd,
16909 .unlock = spi_disable_blockprotect_bp4_srwd,
16910 .write = spi_chip_write_256,
16911 .read = spi_chip_read,
16912 .voltage = {2300, 3600},
16913 .prepare_access = spi_prepare_io,
16914 .finish_access = spi_finish_io,
16915 },
16916
16917 {
16918 .vendor = "Puya",
Nico Huber1c5d8292024-10-25 23:21:02 +020016919 .name = "P25Q40SH",
16920 .bustype = BUS_SPI,
16921 .manufacture_id = PUYA_ID,
16922 .model_id = PUYA_P25Q40H,
16923 .total_size = 512,
16924 .page_size = 256,
16925 /* Has configuration register that acts like third status register. */
16926 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
16927 FEATURE_OTP | FEATURE_QPI_SRP,
16928 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
16929 .tested = TEST_UNTESTED,
16930 .probe = probe_spi_rdid,
16931 .probe_timing = TIMING_ZERO,
16932 .block_erasers =
16933 {
16934 {
16935 .eraseblocks = { {256, 2048} },
16936 .block_erase = spi_block_erase_81,
16937 }, {
16938 .eraseblocks = { {4 * 1024, 128} },
16939 .block_erase = spi_block_erase_20,
16940 }, {
16941 .eraseblocks = { {32 * 1024, 16} },
16942 .block_erase = spi_block_erase_52,
16943 }, {
16944 .eraseblocks = { {64 * 1024, 8} },
16945 .block_erase = spi_block_erase_d8,
16946 }, {
16947 .eraseblocks = { {512 * 1024, 1} },
16948 .block_erase = spi_block_erase_60,
16949 }, {
16950 .eraseblocks = { {512 * 1024, 1} },
16951 .block_erase = spi_block_erase_c7,
16952 },
16953 },
16954 .reg_bits =
16955 {
16956 .qe = {STATUS2, 1, RW},
16957 .srp = {STATUS1, 7, RW},
16958 .srl = {STATUS2, 0, RW},
16959 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
16960 .tb = {STATUS1, 5, RW},
16961 .sec = {STATUS1, 6, RW},
16962 .cmp = {STATUS2, 6, RW},
16963 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
16964 },
16965 .wp_write_cfg = spi_wp_write_cfg,
16966 .wp_read_cfg = spi_wp_read_cfg,
16967 .wp_get_ranges = spi_wp_get_available_ranges,
16968 .decode_range = decode_range_spi25,
16969 .printlock = spi_prettyprint_status_register_bp4_srwd,
16970 .unlock = spi_disable_blockprotect_bp4_srwd,
16971 .write = spi_chip_write_256,
16972 .read = spi_chip_read,
16973 .voltage = {2300, 3600},
16974 .prepare_access = spi_prepare_io,
16975 .finish_access = spi_finish_io,
16976 },
16977
16978 {
16979 .vendor = "Puya",
Nico Huberb09136b2024-10-25 22:52:30 +020016980 .name = "P25Q80H",
16981 .bustype = BUS_SPI,
16982 .manufacture_id = PUYA_ID,
16983 .model_id = PUYA_P25Q80H,
16984 .total_size = 1024,
16985 .page_size = 256,
16986 /* RDCR: 0x15, WRCR: 0x31(!) */
16987 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
16988 FEATURE_OTP | FEATURE_QIO,
16989 .tested = TEST_UNTESTED,
16990 .probe = probe_spi_rdid,
16991 .probe_timing = TIMING_ZERO,
16992 .block_erasers =
16993 {
16994 {
16995 .eraseblocks = { {256, 4096} },
16996 .block_erase = spi_block_erase_81,
16997 }, {
16998 .eraseblocks = { {4 * 1024, 256} },
16999 .block_erase = spi_block_erase_20,
17000 }, {
17001 .eraseblocks = { {32 * 1024, 32} },
17002 .block_erase = spi_block_erase_52,
17003 }, {
17004 .eraseblocks = { {64 * 1024, 16} },
17005 .block_erase = spi_block_erase_d8,
17006 }, {
17007 .eraseblocks = { {1024 * 1024, 1} },
17008 .block_erase = spi_block_erase_60,
17009 }, {
17010 .eraseblocks = { {1024 * 1024, 1} },
17011 .block_erase = spi_block_erase_c7,
17012 },
17013 },
17014 .reg_bits =
17015 {
17016 .qe = {STATUS2, 1, RW},
17017 .srp = {STATUS1, 7, RW},
17018 .srl = {STATUS2, 0, RW},
17019 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17020 .tb = {STATUS1, 5, RW},
17021 .sec = {STATUS1, 6, RW},
17022 .cmp = {STATUS2, 6, RW},
17023 },
17024 .wp_write_cfg = spi_wp_write_cfg,
17025 .wp_read_cfg = spi_wp_read_cfg,
17026 .wp_get_ranges = spi_wp_get_available_ranges,
17027 .decode_range = decode_range_spi25,
17028 .printlock = spi_prettyprint_status_register_bp4_srwd,
17029 .unlock = spi_disable_blockprotect_bp4_srwd,
17030 .write = spi_chip_write_256,
17031 .read = spi_chip_read,
17032 .voltage = {2300, 3600},
17033 .prepare_access = spi_prepare_io,
17034 .finish_access = spi_finish_io,
17035 },
17036
17037 {
17038 .vendor = "Puya",
Nico Huber1c5d8292024-10-25 23:21:02 +020017039 .name = "P25Q80SH",
17040 .bustype = BUS_SPI,
17041 .manufacture_id = PUYA_ID,
17042 .model_id = PUYA_P25Q80H,
17043 .total_size = 1024,
17044 .page_size = 256,
17045 /* Has configuration register that acts like third status register. */
17046 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17047 FEATURE_OTP | FEATURE_QPI_SRP,
17048 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17049 .tested = TEST_UNTESTED,
17050 .probe = probe_spi_rdid,
17051 .probe_timing = TIMING_ZERO,
17052 .block_erasers =
17053 {
17054 {
17055 .eraseblocks = { {256, 4096} },
17056 .block_erase = spi_block_erase_81,
17057 }, {
17058 .eraseblocks = { {4 * 1024, 256} },
17059 .block_erase = spi_block_erase_20,
17060 }, {
17061 .eraseblocks = { {32 * 1024, 32} },
17062 .block_erase = spi_block_erase_52,
17063 }, {
17064 .eraseblocks = { {64 * 1024, 16} },
17065 .block_erase = spi_block_erase_d8,
17066 }, {
17067 .eraseblocks = { {1024 * 1024, 1} },
17068 .block_erase = spi_block_erase_60,
17069 }, {
17070 .eraseblocks = { {1024 * 1024, 1} },
17071 .block_erase = spi_block_erase_c7,
17072 },
17073 },
17074 .reg_bits =
17075 {
17076 .qe = {STATUS2, 1, RW},
17077 .srp = {STATUS1, 7, RW},
17078 .srl = {STATUS2, 0, RW},
17079 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17080 .tb = {STATUS1, 5, RW},
17081 .sec = {STATUS1, 6, RW},
17082 .cmp = {STATUS2, 6, RW},
17083 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17084 },
17085 .wp_write_cfg = spi_wp_write_cfg,
17086 .wp_read_cfg = spi_wp_read_cfg,
17087 .wp_get_ranges = spi_wp_get_available_ranges,
17088 .decode_range = decode_range_spi25,
17089 .printlock = spi_prettyprint_status_register_bp4_srwd,
17090 .unlock = spi_disable_blockprotect_bp4_srwd,
17091 .write = spi_chip_write_256,
17092 .read = spi_chip_read,
17093 .voltage = {2300, 3600},
17094 .prepare_access = spi_prepare_io,
17095 .finish_access = spi_finish_io,
17096 },
17097
17098 {
17099 .vendor = "Puya",
Nico Huberb09136b2024-10-25 22:52:30 +020017100 .name = "P25Q16H",
17101 .bustype = BUS_SPI,
17102 .manufacture_id = PUYA_ID,
17103 .model_id = PUYA_P25Q16H,
17104 .total_size = 2048,
17105 .page_size = 256,
17106 /* RDCR: 0x15, WRCR: 0x31(!) */
17107 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
17108 FEATURE_OTP | FEATURE_QIO,
17109 .tested = TEST_UNTESTED,
17110 .probe = probe_spi_rdid,
17111 .probe_timing = TIMING_ZERO,
17112 .block_erasers =
17113 {
17114 {
17115 .eraseblocks = { {256, 8192} },
17116 .block_erase = spi_block_erase_81,
17117 }, {
17118 .eraseblocks = { {4 * 1024, 512} },
17119 .block_erase = spi_block_erase_20,
17120 }, {
17121 .eraseblocks = { {32 * 1024, 64} },
17122 .block_erase = spi_block_erase_52,
17123 }, {
17124 .eraseblocks = { {64 * 1024, 32} },
17125 .block_erase = spi_block_erase_d8,
17126 }, {
17127 .eraseblocks = { {2048 * 1024, 1} },
17128 .block_erase = spi_block_erase_60,
17129 }, {
17130 .eraseblocks = { {2048 * 1024, 1} },
17131 .block_erase = spi_block_erase_c7,
17132 },
17133 },
17134 .reg_bits =
17135 {
17136 .qe = {STATUS2, 1, RW},
17137 .srp = {STATUS1, 7, RW},
17138 .srl = {STATUS2, 0, RW},
17139 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17140 .tb = {STATUS1, 5, RW},
17141 .sec = {STATUS1, 6, RW},
17142 .cmp = {STATUS2, 6, RW},
17143 },
17144 .wp_write_cfg = spi_wp_write_cfg,
17145 .wp_read_cfg = spi_wp_read_cfg,
17146 .wp_get_ranges = spi_wp_get_available_ranges,
17147 .decode_range = decode_range_spi25,
17148 .printlock = spi_prettyprint_status_register_bp4_srwd,
17149 .unlock = spi_disable_blockprotect_bp4_srwd,
17150 .write = spi_chip_write_256,
17151 .read = spi_chip_read,
17152 .voltage = {2300, 3600},
17153 .prepare_access = spi_prepare_io,
17154 .finish_access = spi_finish_io,
17155 },
17156
17157 {
Nico Huber1c5d8292024-10-25 23:21:02 +020017158 .vendor = "Puya",
17159 .name = "P25Q16SH",
17160 .bustype = BUS_SPI,
17161 .manufacture_id = PUYA_ID,
17162 .model_id = PUYA_P25Q16H,
17163 .total_size = 2048,
17164 .page_size = 256,
17165 /* Has configuration register that acts like third status register. */
17166 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17167 FEATURE_OTP | FEATURE_QPI_SRP,
17168 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17169 .tested = TEST_UNTESTED,
17170 .probe = probe_spi_rdid,
17171 .probe_timing = TIMING_ZERO,
17172 .block_erasers =
17173 {
17174 {
17175 .eraseblocks = { {256, 8192} },
17176 .block_erase = spi_block_erase_81,
17177 }, {
17178 .eraseblocks = { {4 * 1024, 512} },
17179 .block_erase = spi_block_erase_20,
17180 }, {
17181 .eraseblocks = { {32 * 1024, 64} },
17182 .block_erase = spi_block_erase_52,
17183 }, {
17184 .eraseblocks = { {64 * 1024, 32} },
17185 .block_erase = spi_block_erase_d8,
17186 }, {
17187 .eraseblocks = { {2048 * 1024, 1} },
17188 .block_erase = spi_block_erase_60,
17189 }, {
17190 .eraseblocks = { {2048 * 1024, 1} },
17191 .block_erase = spi_block_erase_c7,
17192 },
17193 },
17194 .reg_bits =
17195 {
17196 .qe = {STATUS2, 1, RW},
17197 .srp = {STATUS1, 7, RW},
17198 .srl = {STATUS2, 0, RW},
17199 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17200 .tb = {STATUS1, 5, RW},
17201 .sec = {STATUS1, 6, RW},
17202 .cmp = {STATUS2, 6, RW},
17203 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17204 },
17205 .wp_write_cfg = spi_wp_write_cfg,
17206 .wp_read_cfg = spi_wp_read_cfg,
17207 .wp_get_ranges = spi_wp_get_available_ranges,
17208 .decode_range = decode_range_spi25,
17209 .printlock = spi_prettyprint_status_register_bp4_srwd,
17210 .unlock = spi_disable_blockprotect_bp4_srwd,
17211 .write = spi_chip_write_256,
17212 .read = spi_chip_read,
17213 .voltage = {2300, 3600},
17214 .prepare_access = spi_prepare_io,
17215 .finish_access = spi_finish_io,
17216 },
17217
17218 {
Nico Huberfe21b432024-10-25 23:51:05 +020017219 .vendor = "Puya",
17220 .name = "P25Q32H",
17221 .bustype = BUS_SPI,
17222 .manufacture_id = PUYA_ID,
17223 .model_id = PUYA_P25Q32H,
17224 .total_size = 4096,
17225 .page_size = 256,
17226 /* Has configuration register that acts like third status register. */
17227 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
17228 FEATURE_OTP | FEATURE_QPI_SRP,
17229 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
17230 .tested = TEST_UNTESTED,
17231 .probe = probe_spi_rdid,
17232 .probe_timing = TIMING_ZERO,
17233 .block_erasers =
17234 {
17235 {
17236 .eraseblocks = { {256, 16384} },
17237 .block_erase = spi_block_erase_81,
17238 }, {
17239 .eraseblocks = { {4 * 1024, 1024} },
17240 .block_erase = spi_block_erase_20,
17241 }, {
17242 .eraseblocks = { {32 * 1024, 128} },
17243 .block_erase = spi_block_erase_52,
17244 }, {
17245 .eraseblocks = { {64 * 1024, 64} },
17246 .block_erase = spi_block_erase_d8,
17247 }, {
17248 .eraseblocks = { {4096 * 1024, 1} },
17249 .block_erase = spi_block_erase_60,
17250 }, {
17251 .eraseblocks = { {4096 * 1024, 1} },
17252 .block_erase = spi_block_erase_c7,
17253 },
17254 },
17255 .reg_bits =
17256 {
17257 .qe = {STATUS2, 1, RW},
17258 .srp = {STATUS1, 7, RW},
17259 .srl = {STATUS2, 0, RW},
17260 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17261 .tb = {STATUS1, 5, RW},
17262 .sec = {STATUS1, 6, RW},
17263 .cmp = {STATUS2, 6, RW},
17264 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17265 },
17266 .wp_write_cfg = spi_wp_write_cfg,
17267 .wp_read_cfg = spi_wp_read_cfg,
17268 .wp_get_ranges = spi_wp_get_available_ranges,
17269 .decode_range = decode_range_spi25,
17270 .printlock = spi_prettyprint_status_register_bp4_srwd,
17271 .unlock = spi_disable_blockprotect_bp4_srwd,
17272 .write = spi_chip_write_256,
17273 .read = spi_chip_read,
17274 .voltage = {2300, 3600},
17275 .prepare_access = spi_prepare_io,
17276 .finish_access = spi_finish_io,
17277 },
17278
17279 {
17280 .vendor = "Puya",
17281 .name = "P25Q32SH",
17282 .bustype = BUS_SPI,
17283 .manufacture_id = PUYA_ID,
17284 .model_id = PUYA_P25Q32H,
17285 .total_size = 4096,
17286 .page_size = 256,
17287 /* Has configuration register that acts like third status register. */
17288 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
17289 FEATURE_OTP | FEATURE_QPI_SRP,
17290 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17291 .tested = TEST_UNTESTED,
17292 .probe = probe_spi_rdid,
17293 .probe_timing = TIMING_ZERO,
17294 .block_erasers =
17295 {
17296 {
17297 .eraseblocks = { {256, 16384} },
17298 .block_erase = spi_block_erase_81,
17299 }, {
17300 .eraseblocks = { {4 * 1024, 1024} },
17301 .block_erase = spi_block_erase_20,
17302 }, {
17303 .eraseblocks = { {32 * 1024, 128} },
17304 .block_erase = spi_block_erase_52,
17305 }, {
17306 .eraseblocks = { {64 * 1024, 64} },
17307 .block_erase = spi_block_erase_d8,
17308 }, {
17309 .eraseblocks = { {4096 * 1024, 1} },
17310 .block_erase = spi_block_erase_60,
17311 }, {
17312 .eraseblocks = { {4096 * 1024, 1} },
17313 .block_erase = spi_block_erase_c7,
17314 },
17315 },
17316 .reg_bits =
17317 {
17318 .qe = {STATUS2, 1, RW},
17319 .srp = {STATUS1, 7, RW},
17320 .srl = {STATUS2, 0, RW},
17321 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17322 .tb = {STATUS1, 5, RW},
17323 .sec = {STATUS1, 6, RW},
17324 .cmp = {STATUS2, 6, RW},
17325 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17326 },
17327 .wp_write_cfg = spi_wp_write_cfg,
17328 .wp_read_cfg = spi_wp_read_cfg,
17329 .wp_get_ranges = spi_wp_get_available_ranges,
17330 .decode_range = decode_range_spi25,
17331 .printlock = spi_prettyprint_status_register_bp4_srwd,
17332 .unlock = spi_disable_blockprotect_bp4_srwd,
17333 .write = spi_chip_write_256,
17334 .read = spi_chip_read,
17335 .voltage = {2300, 3600},
17336 .prepare_access = spi_prepare_io,
17337 .finish_access = spi_finish_io,
17338 },
17339
17340 {
17341 .vendor = "Puya",
17342 .name = "P25Q64H",
17343 .bustype = BUS_SPI,
17344 .manufacture_id = PUYA_ID,
17345 .model_id = PUYA_P25Q64H,
17346 .total_size = 8192,
17347 .page_size = 256,
17348 /* Has configuration register that acts like third status register. */
17349 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
17350 FEATURE_OTP | FEATURE_QPI_SRP,
17351 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
17352 .tested = TEST_UNTESTED,
17353 .probe = probe_spi_rdid,
17354 .probe_timing = TIMING_ZERO,
17355 .block_erasers =
17356 {
17357 {
17358 .eraseblocks = { {256, 32768} },
17359 .block_erase = spi_block_erase_81,
17360 }, {
17361 .eraseblocks = { {4 * 1024, 2048} },
17362 .block_erase = spi_block_erase_20,
17363 }, {
17364 .eraseblocks = { {32 * 1024, 256} },
17365 .block_erase = spi_block_erase_52,
17366 }, {
17367 .eraseblocks = { {64 * 1024, 128} },
17368 .block_erase = spi_block_erase_d8,
17369 }, {
17370 .eraseblocks = { {8192 * 1024, 1} },
17371 .block_erase = spi_block_erase_60,
17372 }, {
17373 .eraseblocks = { {8192 * 1024, 1} },
17374 .block_erase = spi_block_erase_c7,
17375 },
17376 },
17377 .reg_bits =
17378 {
17379 .qe = {STATUS2, 1, RW},
17380 .srp = {STATUS1, 7, RW},
17381 .srl = {STATUS2, 0, RW},
17382 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17383 .tb = {STATUS1, 5, RW},
17384 .sec = {STATUS1, 6, RW},
17385 .cmp = {STATUS2, 6, RW},
17386 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17387 },
17388 .wp_write_cfg = spi_wp_write_cfg,
17389 .wp_read_cfg = spi_wp_read_cfg,
17390 .wp_get_ranges = spi_wp_get_available_ranges,
17391 .decode_range = decode_range_spi25,
17392 .printlock = spi_prettyprint_status_register_bp4_srwd,
17393 .unlock = spi_disable_blockprotect_bp4_srwd,
17394 .write = spi_chip_write_256,
17395 .read = spi_chip_read,
17396 .voltage = {2300, 3600},
17397 .prepare_access = spi_prepare_io,
17398 .finish_access = spi_finish_io,
17399 },
17400
17401 {
17402 .vendor = "Puya",
17403 .name = "P25Q64SH",
17404 .bustype = BUS_SPI,
17405 .manufacture_id = PUYA_ID,
17406 .model_id = PUYA_P25Q64H,
17407 .total_size = 8192,
17408 .page_size = 256,
17409 /* Has configuration register that acts like third status register. */
17410 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
17411 FEATURE_OTP | FEATURE_QPI_SRP,
17412 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17413 .tested = TEST_UNTESTED,
17414 .probe = probe_spi_rdid,
17415 .probe_timing = TIMING_ZERO,
17416 .block_erasers =
17417 {
17418 {
17419 .eraseblocks = { {256, 32768} },
17420 .block_erase = spi_block_erase_81,
17421 }, {
17422 .eraseblocks = { {4 * 1024, 2048} },
17423 .block_erase = spi_block_erase_20,
17424 }, {
17425 .eraseblocks = { {32 * 1024, 256} },
17426 .block_erase = spi_block_erase_52,
17427 }, {
17428 .eraseblocks = { {64 * 1024, 128} },
17429 .block_erase = spi_block_erase_d8,
17430 }, {
17431 .eraseblocks = { {8192 * 1024, 1} },
17432 .block_erase = spi_block_erase_60,
17433 }, {
17434 .eraseblocks = { {8192 * 1024, 1} },
17435 .block_erase = spi_block_erase_c7,
17436 },
17437 },
17438 .reg_bits =
17439 {
17440 .qe = {STATUS2, 1, RW},
17441 .srp = {STATUS1, 7, RW},
17442 .srl = {STATUS2, 0, RW},
17443 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17444 .tb = {STATUS1, 5, RW},
17445 .sec = {STATUS1, 6, RW},
17446 .cmp = {STATUS2, 6, RW},
17447 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17448 },
17449 .wp_write_cfg = spi_wp_write_cfg,
17450 .wp_read_cfg = spi_wp_read_cfg,
17451 .wp_get_ranges = spi_wp_get_available_ranges,
17452 .decode_range = decode_range_spi25,
17453 .printlock = spi_prettyprint_status_register_bp4_srwd,
17454 .unlock = spi_disable_blockprotect_bp4_srwd,
17455 .write = spi_chip_write_256,
17456 .read = spi_chip_read,
17457 .voltage = {2300, 3600},
17458 .prepare_access = spi_prepare_io,
17459 .finish_access = spi_finish_io,
17460 },
17461
17462 {
17463 .vendor = "Puya",
17464 .name = "P25Q128H",
17465 .bustype = BUS_SPI,
17466 .manufacture_id = PUYA_ID,
17467 .model_id = PUYA_P25Q128H,
17468 .total_size = 16384,
17469 .page_size = 256,
17470 /* Has configuration register that acts like third status register. */
17471 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR2 | FEATURE_WRSR3 |
17472 FEATURE_OTP | FEATURE_QPI_SRP,
17473 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17474 .tested = TEST_UNTESTED,
17475 .probe = probe_spi_rdid,
17476 .probe_timing = TIMING_ZERO,
17477 .block_erasers =
17478 {
17479 {
17480 .eraseblocks = { {256, 65536} },
17481 .block_erase = spi_block_erase_81,
17482 }, {
17483 .eraseblocks = { {4 * 1024, 4096} },
17484 .block_erase = spi_block_erase_20,
17485 }, {
17486 .eraseblocks = { {32 * 1024, 512} },
17487 .block_erase = spi_block_erase_52,
17488 }, {
17489 .eraseblocks = { {64 * 1024, 256} },
17490 .block_erase = spi_block_erase_d8,
17491 }, {
17492 .eraseblocks = { {16384 * 1024, 1} },
17493 .block_erase = spi_block_erase_60,
17494 }, {
17495 .eraseblocks = { {16384 * 1024, 1} },
17496 .block_erase = spi_block_erase_c7,
17497 },
17498 },
17499 .reg_bits =
17500 {
17501 .qe = {STATUS2, 1, RW},
17502 .srp = {STATUS1, 7, RW},
17503 .srl = {STATUS2, 0, RW},
17504 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17505 .tb = {STATUS1, 5, RW},
17506 .sec = {STATUS1, 6, RW},
17507 .cmp = {STATUS2, 6, RW},
17508 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17509 },
17510 .wp_write_cfg = spi_wp_write_cfg,
17511 .wp_read_cfg = spi_wp_read_cfg,
17512 .wp_get_ranges = spi_wp_get_available_ranges,
17513 .decode_range = decode_range_spi25,
17514 .printlock = spi_prettyprint_status_register_bp4_srwd,
17515 .unlock = spi_disable_blockprotect_bp4_srwd,
17516 .write = spi_chip_write_256,
17517 .read = spi_chip_read,
17518 .voltage = {2300, 3600},
17519 .prepare_access = spi_prepare_io,
17520 .finish_access = spi_finish_io,
17521 },
17522
17523 {
Nico Huber06e02642024-10-26 00:46:11 +020017524 .vendor = "Puya",
17525 .name = "PY25Q40HB",
17526 .bustype = BUS_SPI,
17527 .manufacture_id = PUYA_ID,
17528 .model_id = PUYA_PY25Q40H,
17529 .total_size = 512,
17530 .page_size = 256,
17531 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
17532 FEATURE_OTP | FEATURE_QPI_SRP,
17533 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17534 .tested = TEST_UNTESTED,
17535 .probe = probe_spi_rdid,
17536 .probe_timing = TIMING_ZERO,
17537 .block_erasers =
17538 {
17539 {
17540 .eraseblocks = { {4 * 1024, 128} },
17541 .block_erase = spi_block_erase_20,
17542 }, {
17543 .eraseblocks = { {32 * 1024, 16} },
17544 .block_erase = spi_block_erase_52,
17545 }, {
17546 .eraseblocks = { {64 * 1024, 8} },
17547 .block_erase = spi_block_erase_d8,
17548 }, {
17549 .eraseblocks = { {512 * 1024, 1} },
17550 .block_erase = spi_block_erase_60,
17551 }, {
17552 .eraseblocks = { {512 * 1024, 1} },
17553 .block_erase = spi_block_erase_c7,
17554 },
17555 },
17556 .reg_bits =
17557 {
17558 .qe = {STATUS2, 1, RW},
17559 .srp = {STATUS1, 7, RW},
17560 .srl = {STATUS2, 0, RW},
17561 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17562 .tb = {STATUS1, 5, RW},
17563 .sec = {STATUS1, 6, RW},
17564 .cmp = {STATUS2, 6, RW},
17565 },
17566 .wp_write_cfg = spi_wp_write_cfg,
17567 .wp_read_cfg = spi_wp_read_cfg,
17568 .wp_get_ranges = spi_wp_get_available_ranges,
17569 .decode_range = decode_range_spi25,
17570 .printlock = spi_prettyprint_status_register_bp4_srwd,
17571 .unlock = spi_disable_blockprotect_bp4_srwd,
17572 .write = spi_chip_write_256,
17573 .read = spi_chip_read,
17574 .voltage = {2300, 3600},
17575 .prepare_access = spi_prepare_io,
17576 .finish_access = spi_finish_io,
17577 },
17578
17579 {
17580 .vendor = "Puya",
17581 .name = "PY25Q80HB",
17582 .bustype = BUS_SPI,
17583 .manufacture_id = PUYA_ID,
17584 .model_id = PUYA_PY25Q80H,
17585 .total_size = 1024,
17586 .page_size = 256,
17587 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
17588 FEATURE_OTP | FEATURE_QPI_SRP,
17589 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17590 .tested = TEST_UNTESTED,
17591 .probe = probe_spi_rdid,
17592 .probe_timing = TIMING_ZERO,
17593 .block_erasers =
17594 {
17595 {
17596 .eraseblocks = { {4 * 1024, 256} },
17597 .block_erase = spi_block_erase_20,
17598 }, {
17599 .eraseblocks = { {32 * 1024, 32} },
17600 .block_erase = spi_block_erase_52,
17601 }, {
17602 .eraseblocks = { {64 * 1024, 16} },
17603 .block_erase = spi_block_erase_d8,
17604 }, {
17605 .eraseblocks = { {1024 * 1024, 1} },
17606 .block_erase = spi_block_erase_60,
17607 }, {
17608 .eraseblocks = { {1024 * 1024, 1} },
17609 .block_erase = spi_block_erase_c7,
17610 },
17611 },
17612 .reg_bits =
17613 {
17614 .qe = {STATUS2, 1, RW},
17615 .srp = {STATUS1, 7, RW},
17616 .srl = {STATUS2, 0, RW},
17617 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17618 .tb = {STATUS1, 5, RW},
17619 .sec = {STATUS1, 6, RW},
17620 .cmp = {STATUS2, 6, RW},
17621 },
17622 .wp_write_cfg = spi_wp_write_cfg,
17623 .wp_read_cfg = spi_wp_read_cfg,
17624 .wp_get_ranges = spi_wp_get_available_ranges,
17625 .decode_range = decode_range_spi25,
17626 .printlock = spi_prettyprint_status_register_bp4_srwd,
17627 .unlock = spi_disable_blockprotect_bp4_srwd,
17628 .write = spi_chip_write_256,
17629 .read = spi_chip_read,
17630 .voltage = {2300, 3600},
17631 .prepare_access = spi_prepare_io,
17632 .finish_access = spi_finish_io,
17633 },
17634
17635 {
17636 .vendor = "Puya",
17637 .name = "PY25Q16HB",
17638 .bustype = BUS_SPI,
17639 .manufacture_id = PUYA_ID,
17640 .model_id = PUYA_PY25Q16H,
17641 .total_size = 2048,
17642 .page_size = 256,
17643 /* Has configuration register that acts like third status register. */
17644 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17645 FEATURE_OTP | FEATURE_QPI_SRP,
17646 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17647 .tested = TEST_UNTESTED,
17648 .probe = probe_spi_rdid,
17649 .probe_timing = TIMING_ZERO,
17650 .block_erasers =
17651 {
17652 {
17653 .eraseblocks = { {4 * 1024, 512} },
17654 .block_erase = spi_block_erase_20,
17655 }, {
17656 .eraseblocks = { {32 * 1024, 64} },
17657 .block_erase = spi_block_erase_52,
17658 }, {
17659 .eraseblocks = { {64 * 1024, 32} },
17660 .block_erase = spi_block_erase_d8,
17661 }, {
17662 .eraseblocks = { {2048 * 1024, 1} },
17663 .block_erase = spi_block_erase_60,
17664 }, {
17665 .eraseblocks = { {2048 * 1024, 1} },
17666 .block_erase = spi_block_erase_c7,
17667 },
17668 },
17669 .reg_bits =
17670 {
17671 .qe = {STATUS2, 1, RW},
17672 .srp = {STATUS1, 7, RW},
17673 .srl = {STATUS2, 0, RW},
17674 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17675 .tb = {STATUS1, 5, RW},
17676 .sec = {STATUS1, 6, RW},
17677 .cmp = {STATUS2, 6, RW},
17678 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17679 },
17680 .wp_write_cfg = spi_wp_write_cfg,
17681 .wp_read_cfg = spi_wp_read_cfg,
17682 .wp_get_ranges = spi_wp_get_available_ranges,
17683 .decode_range = decode_range_spi25,
17684 .printlock = spi_prettyprint_status_register_bp4_srwd,
17685 .unlock = spi_disable_blockprotect_bp4_srwd,
17686 .write = spi_chip_write_256,
17687 .read = spi_chip_read,
17688 .voltage = {2300, 3600},
17689 .prepare_access = spi_prepare_io,
17690 .finish_access = spi_finish_io,
17691 },
17692
17693 {
17694 .vendor = "Puya",
17695 .name = "PY25Q32HB",
17696 .bustype = BUS_SPI,
17697 .manufacture_id = PUYA_ID,
17698 .model_id = PUYA_PY25Q32H,
17699 .total_size = 4096,
17700 .page_size = 256,
17701 /* Has configuration register that acts like third status register. */
17702 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17703 FEATURE_OTP | FEATURE_QPI_SRP,
17704 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17705 .tested = TEST_UNTESTED,
17706 .probe = probe_spi_rdid,
17707 .probe_timing = TIMING_ZERO,
17708 .block_erasers =
17709 {
17710 {
17711 .eraseblocks = { {4 * 1024, 1024} },
17712 .block_erase = spi_block_erase_20,
17713 }, {
17714 .eraseblocks = { {32 * 1024, 128} },
17715 .block_erase = spi_block_erase_52,
17716 }, {
17717 .eraseblocks = { {64 * 1024, 64} },
17718 .block_erase = spi_block_erase_d8,
17719 }, {
17720 .eraseblocks = { {4096 * 1024, 1} },
17721 .block_erase = spi_block_erase_60,
17722 }, {
17723 .eraseblocks = { {4096 * 1024, 1} },
17724 .block_erase = spi_block_erase_c7,
17725 },
17726 },
17727 .reg_bits =
17728 {
17729 .qe = {STATUS2, 1, RW},
17730 .srp = {STATUS1, 7, RW},
17731 .srl = {STATUS2, 0, RW},
17732 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17733 .tb = {STATUS1, 5, RW},
17734 .sec = {STATUS1, 6, RW},
17735 .cmp = {STATUS2, 6, RW},
17736 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17737 },
17738 .wp_write_cfg = spi_wp_write_cfg,
17739 .wp_read_cfg = spi_wp_read_cfg,
17740 .wp_get_ranges = spi_wp_get_available_ranges,
17741 .decode_range = decode_range_spi25,
17742 .printlock = spi_prettyprint_status_register_bp4_srwd,
17743 .unlock = spi_disable_blockprotect_bp4_srwd,
17744 .write = spi_chip_write_256,
17745 .read = spi_chip_read,
17746 .voltage = {2300, 3600},
17747 .prepare_access = spi_prepare_io,
17748 .finish_access = spi_finish_io,
17749 },
17750
17751 {
17752 .vendor = "Puya",
17753 .name = "PY25Q64HA",
17754 .bustype = BUS_SPI,
17755 .manufacture_id = PUYA_ID,
17756 .model_id = PUYA_PY25Q64H,
17757 .total_size = 8192,
17758 .page_size = 256,
17759 /* Has configuration register that acts like third status register. */
17760 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17761 FEATURE_OTP | FEATURE_QPI_SRP,
17762 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17763 .tested = TEST_UNTESTED,
17764 .probe = probe_spi_rdid,
17765 .probe_timing = TIMING_ZERO,
17766 .block_erasers =
17767 {
17768 {
17769 .eraseblocks = { {4 * 1024, 2048} },
17770 .block_erase = spi_block_erase_20,
17771 }, {
17772 .eraseblocks = { {32 * 1024, 256} },
17773 .block_erase = spi_block_erase_52,
17774 }, {
17775 .eraseblocks = { {64 * 1024, 128} },
17776 .block_erase = spi_block_erase_d8,
17777 }, {
17778 .eraseblocks = { {8192 * 1024, 1} },
17779 .block_erase = spi_block_erase_60,
17780 }, {
17781 .eraseblocks = { {8192 * 1024, 1} },
17782 .block_erase = spi_block_erase_c7,
17783 },
17784 },
17785 .reg_bits =
17786 {
17787 .qe = {STATUS2, 1, RW},
17788 .srp = {STATUS1, 7, RW},
17789 .srl = {STATUS2, 0, RW},
17790 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17791 .tb = {STATUS1, 5, RW},
17792 .sec = {STATUS1, 6, RW},
17793 .cmp = {STATUS2, 6, RW},
17794 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17795 },
17796 .wp_write_cfg = spi_wp_write_cfg,
17797 .wp_read_cfg = spi_wp_read_cfg,
17798 .wp_get_ranges = spi_wp_get_available_ranges,
17799 .decode_range = decode_range_spi25,
17800 .printlock = spi_prettyprint_status_register_bp4_srwd,
17801 .unlock = spi_disable_blockprotect_bp4_srwd,
17802 .write = spi_chip_write_256,
17803 .read = spi_chip_read,
17804 .voltage = {2700, 3600},
17805 .prepare_access = spi_prepare_io,
17806 .finish_access = spi_finish_io,
17807 },
17808
17809 {
17810 .vendor = "Puya",
17811 .name = "PY25F64HA",
17812 .bustype = BUS_SPI,
17813 .manufacture_id = PUYA_ID,
17814 .model_id = PUYA_PY25F64H,
17815 .total_size = 8192,
17816 .page_size = 256,
17817 /* Has configuration register that acts like third status register. */
17818 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17819 FEATURE_OTP | FEATURE_QPI_SRP,
17820 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17821 .tested = TEST_UNTESTED,
17822 .probe = probe_spi_rdid,
17823 .probe_timing = TIMING_ZERO,
17824 .block_erasers =
17825 {
17826 {
17827 .eraseblocks = { {4 * 1024, 2048} },
17828 .block_erase = spi_block_erase_20,
17829 }, {
17830 .eraseblocks = { {32 * 1024, 256} },
17831 .block_erase = spi_block_erase_52,
17832 }, {
17833 .eraseblocks = { {64 * 1024, 128} },
17834 .block_erase = spi_block_erase_d8,
17835 }, {
17836 .eraseblocks = { {8192 * 1024, 1} },
17837 .block_erase = spi_block_erase_60,
17838 }, {
17839 .eraseblocks = { {8192 * 1024, 1} },
17840 .block_erase = spi_block_erase_c7,
17841 },
17842 },
17843 .reg_bits =
17844 {
17845 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
17846 .srp = {STATUS1, 7, RW},
17847 .srl = {STATUS2, 0, RW},
17848 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17849 .tb = {STATUS1, 5, RW},
17850 .sec = {STATUS1, 6, RW},
17851 .cmp = {STATUS2, 6, RW},
17852 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17853 },
17854 .wp_write_cfg = spi_wp_write_cfg,
17855 .wp_read_cfg = spi_wp_read_cfg,
17856 .wp_get_ranges = spi_wp_get_available_ranges,
17857 .decode_range = decode_range_spi25,
17858 .printlock = spi_prettyprint_status_register_bp4_srwd,
17859 .unlock = spi_disable_blockprotect_bp4_srwd,
17860 .write = spi_chip_write_256,
17861 .read = spi_chip_read,
17862 .voltage = {2700, 3600},
17863 .prepare_access = spi_prepare_io,
17864 .finish_access = spi_finish_io,
17865 },
17866
17867 {
17868 .vendor = "Puya",
17869 .name = "PY25Q128HA",
17870 .bustype = BUS_SPI,
17871 .manufacture_id = PUYA_ID,
17872 .model_id = PUYA_PY25Q128H,
17873 .total_size = 16384,
17874 .page_size = 256,
17875 /* Has configuration register that acts like third status register. */
17876 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17877 FEATURE_OTP | FEATURE_QPI_SRP,
17878 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17879 .tested = TEST_UNTESTED,
17880 .probe = probe_spi_rdid,
17881 .probe_timing = TIMING_ZERO,
17882 .block_erasers =
17883 {
17884 {
17885 .eraseblocks = { {4 * 1024, 4096} },
17886 .block_erase = spi_block_erase_20,
17887 }, {
17888 .eraseblocks = { {32 * 1024, 512} },
17889 .block_erase = spi_block_erase_52,
17890 }, {
17891 .eraseblocks = { {64 * 1024, 256} },
17892 .block_erase = spi_block_erase_d8,
17893 }, {
17894 .eraseblocks = { {16384 * 1024, 1} },
17895 .block_erase = spi_block_erase_60,
17896 }, {
17897 .eraseblocks = { {16384 * 1024, 1} },
17898 .block_erase = spi_block_erase_c7,
17899 },
17900 },
17901 .reg_bits =
17902 {
17903 .qe = {STATUS2, 1, RW},
17904 .srp = {STATUS1, 7, RW},
17905 .srl = {STATUS2, 0, RW},
17906 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17907 .tb = {STATUS1, 5, RW},
17908 .sec = {STATUS1, 6, RW},
17909 .cmp = {STATUS2, 6, RW},
17910 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17911 },
17912 .wp_write_cfg = spi_wp_write_cfg,
17913 .wp_read_cfg = spi_wp_read_cfg,
17914 .wp_get_ranges = spi_wp_get_available_ranges,
17915 .decode_range = decode_range_spi25,
17916 .printlock = spi_prettyprint_status_register_bp4_srwd,
17917 .unlock = spi_disable_blockprotect_bp4_srwd,
17918 .write = spi_chip_write_256,
17919 .read = spi_chip_read,
17920 .voltage = {2700, 3600},
17921 .prepare_access = spi_prepare_io,
17922 .finish_access = spi_finish_io,
17923 },
17924
17925 {
17926 .vendor = "Puya",
17927 .name = "PY25F128HA/PY25R128HA",
17928 .bustype = BUS_SPI,
17929 .manufacture_id = PUYA_ID,
17930 .model_id = PUYA_PY25F128H,
17931 .total_size = 16384,
17932 .page_size = 256,
17933 /* Has configuration register that acts like third status register. */
17934 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17935 FEATURE_OTP | FEATURE_QPI_SRP,
17936 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17937 .tested = TEST_UNTESTED,
17938 .probe = probe_spi_rdid,
17939 .probe_timing = TIMING_ZERO,
17940 .block_erasers =
17941 {
17942 {
17943 .eraseblocks = { {4 * 1024, 4096} },
17944 .block_erase = spi_block_erase_20,
17945 }, {
17946 .eraseblocks = { {32 * 1024, 512} },
17947 .block_erase = spi_block_erase_52,
17948 }, {
17949 .eraseblocks = { {64 * 1024, 256} },
17950 .block_erase = spi_block_erase_d8,
17951 }, {
17952 .eraseblocks = { {16384 * 1024, 1} },
17953 .block_erase = spi_block_erase_60,
17954 }, {
17955 .eraseblocks = { {16384 * 1024, 1} },
17956 .block_erase = spi_block_erase_c7,
17957 },
17958 },
17959 .reg_bits =
17960 {
17961 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
17962 .srp = {STATUS1, 7, RW},
17963 .srl = {STATUS2, 0, RW},
17964 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
17965 .tb = {STATUS1, 5, RW},
17966 .sec = {STATUS1, 6, RW},
17967 .cmp = {STATUS2, 6, RW},
17968 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
17969 },
17970 .wp_write_cfg = spi_wp_write_cfg,
17971 .wp_read_cfg = spi_wp_read_cfg,
17972 .wp_get_ranges = spi_wp_get_available_ranges,
17973 .decode_range = decode_range_spi25,
17974 .printlock = spi_prettyprint_status_register_bp4_srwd,
17975 .unlock = spi_disable_blockprotect_bp4_srwd,
17976 .write = spi_chip_write_256,
17977 .read = spi_chip_read,
17978 .voltage = {2700, 3600},
17979 .prepare_access = spi_prepare_io,
17980 .finish_access = spi_finish_io,
17981 },
17982
17983 {
Nico Huberc230c692024-10-26 01:16:23 +020017984 .vendor = "Puya",
17985 .name = "PY25Q256HB",
17986 .bustype = BUS_SPI,
17987 .manufacture_id = PUYA_ID,
17988 .model_id = PUYA_PY25Q256H,
17989 .total_size = 32768,
17990 .page_size = 256,
17991 /* Has configuration register that acts like third status register. */
17992 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
17993 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_QPI_SRP,
17994 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
17995 .tested = TEST_UNTESTED,
17996 .probe = probe_spi_rdid,
17997 .probe_timing = TIMING_ZERO,
17998 .block_erasers =
17999 {
18000 {
18001 .eraseblocks = { {4 * 1024, 8192} },
18002 .block_erase = spi_block_erase_21,
18003 }, {
18004 .eraseblocks = { {4 * 1024, 8192} },
18005 .block_erase = spi_block_erase_20,
18006 }, {
18007 .eraseblocks = { {32 * 1024, 1024} },
18008 .block_erase = spi_block_erase_5c,
18009 }, {
18010 .eraseblocks = { {32 * 1024, 1024} },
18011 .block_erase = spi_block_erase_52,
18012 }, {
18013 .eraseblocks = { {64 * 1024, 512} },
18014 .block_erase = spi_block_erase_dc,
18015 }, {
18016 .eraseblocks = { {64 * 1024, 512} },
18017 .block_erase = spi_block_erase_d8,
18018 }, {
18019 .eraseblocks = { {32768 * 1024, 1} },
18020 .block_erase = spi_block_erase_60,
18021 }, {
18022 .eraseblocks = { {32768 * 1024, 1} },
18023 .block_erase = spi_block_erase_c7,
18024 },
18025 },
18026 .reg_bits =
18027 {
18028 .qe = {STATUS2, 1, RW},
18029 .srp = {STATUS1, 7, RW},
18030 .srl = {STATUS2, 0, RW},
Nico Huber5a72cfb2025-02-26 23:47:14 +010018031 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18032 .tb = {STATUS1, 6, RW},
Nico Huberc230c692024-10-26 01:16:23 +020018033 .cmp = {STATUS2, 6, RW},
18034 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
18035 },
18036 .wp_write_cfg = spi_wp_write_cfg,
18037 .wp_read_cfg = spi_wp_read_cfg,
18038 .wp_get_ranges = spi_wp_get_available_ranges,
18039 .decode_range = decode_range_spi25,
18040 .printlock = spi_prettyprint_status_register_bp4_srwd,
18041 .unlock = spi_disable_blockprotect_bp4_srwd,
18042 .write = spi_chip_write_256,
18043 .read = spi_chip_read,
18044 .voltage = {2700, 3600},
18045 .prepare_access = spi_prepare_io,
18046 .finish_access = spi_finish_io,
18047 },
18048
18049 {
18050 .vendor = "Puya",
18051 .name = "PY25F256HB",
18052 .bustype = BUS_SPI,
18053 .manufacture_id = PUYA_ID,
18054 .model_id = PUYA_PY25F256H,
18055 .total_size = 32768,
18056 .page_size = 256,
18057 /* Has configuration register that acts like third status register. */
18058 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
18059 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_QPI_SRP,
18060 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
18061 .tested = TEST_UNTESTED,
18062 .probe = probe_spi_rdid,
18063 .probe_timing = TIMING_ZERO,
18064 .block_erasers =
18065 {
18066 {
18067 .eraseblocks = { {4 * 1024, 8192} },
18068 .block_erase = spi_block_erase_21,
18069 }, {
18070 .eraseblocks = { {4 * 1024, 8192} },
18071 .block_erase = spi_block_erase_20,
18072 }, {
18073 .eraseblocks = { {32 * 1024, 1024} },
18074 .block_erase = spi_block_erase_5c,
18075 }, {
18076 .eraseblocks = { {32 * 1024, 1024} },
18077 .block_erase = spi_block_erase_52,
18078 }, {
18079 .eraseblocks = { {64 * 1024, 512} },
18080 .block_erase = spi_block_erase_dc,
18081 }, {
18082 .eraseblocks = { {64 * 1024, 512} },
18083 .block_erase = spi_block_erase_d8,
18084 }, {
18085 .eraseblocks = { {32768 * 1024, 1} },
18086 .block_erase = spi_block_erase_60,
18087 }, {
18088 .eraseblocks = { {32768 * 1024, 1} },
18089 .block_erase = spi_block_erase_c7,
18090 },
18091 },
18092 .reg_bits =
18093 {
18094 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
18095 .srp = {STATUS1, 7, RW},
18096 .srl = {STATUS2, 0, RW},
Nico Huber5a72cfb2025-02-26 23:47:14 +010018097 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18098 .tb = {STATUS1, 6, RW},
Nico Huberc230c692024-10-26 01:16:23 +020018099 .cmp = {STATUS2, 6, RW},
18100 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
18101 },
18102 .wp_write_cfg = spi_wp_write_cfg,
18103 .wp_read_cfg = spi_wp_read_cfg,
18104 .wp_get_ranges = spi_wp_get_available_ranges,
18105 .decode_range = decode_range_spi25,
18106 .printlock = spi_prettyprint_status_register_bp4_srwd,
18107 .unlock = spi_disable_blockprotect_bp4_srwd,
18108 .write = spi_chip_write_256,
18109 .read = spi_chip_read,
18110 .voltage = {2700, 3600},
18111 .prepare_access = spi_prepare_io,
18112 .finish_access = spi_finish_io,
18113 },
18114
18115 {
18116 .vendor = "Puya",
18117 .name = "PY25Q512HB",
18118 .bustype = BUS_SPI,
18119 .manufacture_id = PUYA_ID,
18120 .model_id = PUYA_PY25Q512H,
18121 .total_size = 65536,
18122 .page_size = 256,
18123 /* Has configuration register that acts like third status register. */
18124 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
18125 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_QPI_SRP,
18126 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
18127 .tested = TEST_UNTESTED,
18128 .probe = probe_spi_rdid,
18129 .probe_timing = TIMING_ZERO,
18130 .block_erasers =
18131 {
18132 {
18133 .eraseblocks = { {4 * 1024, 16384} },
18134 .block_erase = spi_block_erase_21,
18135 }, {
18136 .eraseblocks = { {4 * 1024, 16384} },
18137 .block_erase = spi_block_erase_20,
18138 }, {
18139 .eraseblocks = { {32 * 1024, 2048} },
18140 .block_erase = spi_block_erase_5c,
18141 }, {
18142 .eraseblocks = { {32 * 1024, 2048} },
18143 .block_erase = spi_block_erase_52,
18144 }, {
18145 .eraseblocks = { {64 * 1024, 1024} },
18146 .block_erase = spi_block_erase_dc,
18147 }, {
18148 .eraseblocks = { {64 * 1024, 1024} },
18149 .block_erase = spi_block_erase_d8,
18150 }, {
18151 .eraseblocks = { {65536 * 1024, 1} },
18152 .block_erase = spi_block_erase_60,
18153 }, {
18154 .eraseblocks = { {65536 * 1024, 1} },
18155 .block_erase = spi_block_erase_c7,
18156 },
18157 },
18158 .reg_bits =
18159 {
18160 .qe = {STATUS2, 1, RW},
18161 .srp = {STATUS1, 7, RW},
18162 .srl = {STATUS2, 0, RW},
Nico Huber5a72cfb2025-02-26 23:47:14 +010018163 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18164 .tb = {STATUS1, 6, RW},
Nico Huberc230c692024-10-26 01:16:23 +020018165 .cmp = {STATUS2, 6, RW},
18166 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
18167 },
18168 .wp_write_cfg = spi_wp_write_cfg,
18169 .wp_read_cfg = spi_wp_read_cfg,
18170 .wp_get_ranges = spi_wp_get_available_ranges,
18171 .decode_range = decode_range_spi25,
18172 .printlock = spi_prettyprint_status_register_bp4_srwd,
18173 .unlock = spi_disable_blockprotect_bp4_srwd,
18174 .write = spi_chip_write_256,
18175 .read = spi_chip_read,
18176 .voltage = {2700, 3600},
18177 .prepare_access = spi_prepare_io,
18178 .finish_access = spi_finish_io,
18179 },
18180
18181 {
18182 .vendor = "Puya",
18183 .name = "PY25F512HB",
18184 .bustype = BUS_SPI,
18185 .manufacture_id = PUYA_ID,
18186 .model_id = PUYA_PY25F512H,
18187 .total_size = 65536,
18188 .page_size = 256,
18189 /* Has configuration register that acts like third status register. */
18190 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
18191 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_QPI_SRP,
18192 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
18193 .tested = TEST_UNTESTED,
18194 .probe = probe_spi_rdid,
18195 .probe_timing = TIMING_ZERO,
18196 .block_erasers =
18197 {
18198 {
18199 .eraseblocks = { {4 * 1024, 16384} },
18200 .block_erase = spi_block_erase_21,
18201 }, {
18202 .eraseblocks = { {4 * 1024, 16384} },
18203 .block_erase = spi_block_erase_20,
18204 }, {
18205 .eraseblocks = { {32 * 1024, 2048} },
18206 .block_erase = spi_block_erase_5c,
18207 }, {
18208 .eraseblocks = { {32 * 1024, 2048} },
18209 .block_erase = spi_block_erase_52,
18210 }, {
18211 .eraseblocks = { {64 * 1024, 1024} },
18212 .block_erase = spi_block_erase_dc,
18213 }, {
18214 .eraseblocks = { {64 * 1024, 1024} },
18215 .block_erase = spi_block_erase_d8,
18216 }, {
18217 .eraseblocks = { {65536 * 1024, 1} },
18218 .block_erase = spi_block_erase_60,
18219 }, {
18220 .eraseblocks = { {65536 * 1024, 1} },
18221 .block_erase = spi_block_erase_c7,
18222 },
18223 },
18224 .reg_bits =
18225 {
18226 .qe = {STATUS2, 1, RO}, /* Fixed QE=1 */
18227 .srp = {STATUS1, 7, RW},
18228 .srl = {STATUS2, 0, RW},
Nico Huber5a72cfb2025-02-26 23:47:14 +010018229 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18230 .tb = {STATUS1, 6, RW},
Nico Huberc230c692024-10-26 01:16:23 +020018231 .cmp = {STATUS2, 6, RW},
18232 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
18233 },
18234 .wp_write_cfg = spi_wp_write_cfg,
18235 .wp_read_cfg = spi_wp_read_cfg,
18236 .wp_get_ranges = spi_wp_get_available_ranges,
18237 .decode_range = decode_range_spi25,
18238 .printlock = spi_prettyprint_status_register_bp4_srwd,
18239 .unlock = spi_disable_blockprotect_bp4_srwd,
18240 .write = spi_chip_write_256,
18241 .read = spi_chip_read,
18242 .voltage = {2700, 3600},
18243 .prepare_access = spi_prepare_io,
18244 .finish_access = spi_finish_io,
18245 },
18246
18247 {
18248 .vendor = "Puya",
18249 .name = "PY25Q01GHB",
18250 .bustype = BUS_SPI,
18251 .manufacture_id = PUYA_ID,
18252 .model_id = PUYA_PY25Q01GH,
18253 .total_size = 128 * 1024,
18254 .page_size = 256,
18255 /* Has configuration register that acts like third status register. */
18256 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
18257 FEATURE_OTP | FEATURE_4BA | FEATURE_FAST_READ_QPI4B | FEATURE_QPI_SRP,
18258 .dummy_cycles = { .qpi_read_params = { 10, 4, 6, 8 } },
18259 .tested = TEST_UNTESTED,
18260 .probe = probe_spi_rdid,
18261 .probe_timing = TIMING_ZERO,
18262 .block_erasers =
18263 {
18264 {
18265 .eraseblocks = { {4 * 1024, 32768} },
18266 .block_erase = spi_block_erase_21,
18267 }, {
18268 .eraseblocks = { {4 * 1024, 32768} },
18269 .block_erase = spi_block_erase_20,
18270 }, {
18271 .eraseblocks = { {32 * 1024, 4096} },
18272 .block_erase = spi_block_erase_5c,
18273 }, {
18274 .eraseblocks = { {32 * 1024, 4096} },
18275 .block_erase = spi_block_erase_52,
18276 }, {
18277 .eraseblocks = { {64 * 1024, 2048} },
18278 .block_erase = spi_block_erase_dc,
18279 }, {
18280 .eraseblocks = { {64 * 1024, 2048} },
18281 .block_erase = spi_block_erase_d8,
18282 }, {
18283 .eraseblocks = { {128 * 1024 * 1024, 1} },
18284 .block_erase = spi_block_erase_60,
18285 }, {
18286 .eraseblocks = { {128 * 1024 * 1024, 1} },
18287 .block_erase = spi_block_erase_c7,
18288 },
18289 },
18290 .reg_bits =
18291 {
18292 .qe = {STATUS2, 1, RW},
18293 .srp = {STATUS1, 7, RW},
18294 .srl = {STATUS2, 0, RW},
Nico Huber5a72cfb2025-02-26 23:47:14 +010018295 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
18296 .tb = {STATUS1, 6, RW},
Nico Huberc230c692024-10-26 01:16:23 +020018297 .cmp = {STATUS2, 6, RW},
18298 .wps = {STATUS3, 2, RW}, /* Called configuration register in datasheet. */
18299 },
18300 .wp_write_cfg = spi_wp_write_cfg,
18301 .wp_read_cfg = spi_wp_read_cfg,
18302 .wp_get_ranges = spi_wp_get_available_ranges,
18303 .decode_range = decode_range_spi25,
18304 .printlock = spi_prettyprint_status_register_bp4_srwd,
18305 .unlock = spi_disable_blockprotect_bp4_srwd,
18306 .write = spi_chip_write_256,
18307 .read = spi_chip_read,
18308 .voltage = {2700, 3600},
18309 .prepare_access = spi_prepare_io,
18310 .finish_access = spi_finish_io,
18311 },
18312
18313 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018314 .vendor = "SST",
Idwer Volleringf3607d12014-05-07 15:25:04 +000018315 .name = "SST25LF020A",
18316 .bustype = BUS_SPI,
18317 .manufacture_id = SST_ID,
18318 .model_id = SST_SST25VF020_REMS,
18319 .total_size = 256,
18320 .page_size = 256,
18321 .feature_bits = FEATURE_WRSR_EWSR,
18322 .tested = TEST_OK_PREW,
18323 .probe = probe_spi_rems,
18324 .probe_timing = TIMING_ZERO,
18325 .block_erasers =
18326 {
18327 {
18328 .eraseblocks = { {4 * 1024, 64} },
18329 .block_erase = spi_block_erase_20,
18330 }, {
18331 .eraseblocks = { {32 * 1024, 8} },
18332 .block_erase = spi_block_erase_52,
18333 }, {
18334 .eraseblocks = { {256 * 1024, 1} },
18335 .block_erase = spi_block_erase_60,
18336 },
18337 },
18338 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
18339 .unlock = spi_disable_blockprotect,
18340 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18341 .read = spi_chip_read, /* Fast read (0x0B) supported */
18342 .voltage = {2700, 3600},
18343 },
18344
18345 {
18346 .vendor = "SST",
Zeus Castro33670ba2011-08-17 09:50:11 +000018347 .name = "SST25LF040A",
18348 .bustype = BUS_SPI,
18349 .manufacture_id = SST_ID,
18350 .model_id = SST_SST25VF040_REMS,
18351 .total_size = 512,
18352 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000018353 .feature_bits = FEATURE_WRSR_EWSR,
Uwe Hermann4335ec82011-09-07 20:20:25 +000018354 .tested = TEST_OK_PREW,
Zeus Castro33670ba2011-08-17 09:50:11 +000018355 .probe = probe_spi_res2,
18356 .probe_timing = TIMING_ZERO,
18357 .block_erasers =
18358 {
18359 {
18360 .eraseblocks = { {4 * 1024, 128} },
18361 .block_erase = spi_block_erase_20,
18362 }, {
18363 .eraseblocks = { {32 * 1024, 16} },
18364 .block_erase = spi_block_erase_52,
18365 }, {
18366 .eraseblocks = { {512 * 1024, 1} },
18367 .block_erase = spi_block_erase_60,
18368 },
18369 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018370 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000018371 .unlock = spi_disable_blockprotect,
18372 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18373 .read = spi_chip_read,
18374 .voltage = {3000, 3600},
18375 },
18376
18377 {
18378 .vendor = "SST",
Stefan Taunere34e3e82013-01-01 00:06:51 +000018379 .name = "SST25LF080(A)",
Zeus Castro33670ba2011-08-17 09:50:11 +000018380 .bustype = BUS_SPI,
18381 .manufacture_id = SST_ID,
18382 .model_id = SST_SST25VF080_REMS,
18383 .total_size = 1024,
18384 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000018385 .feature_bits = FEATURE_WRSR_EITHER,
Zeus Castro33670ba2011-08-17 09:50:11 +000018386 .tested = TEST_UNTESTED,
18387 .probe = probe_spi_res2,
18388 .probe_timing = TIMING_ZERO,
18389 .block_erasers =
18390 {
18391 {
18392 .eraseblocks = { {4 * 1024, 256} },
18393 .block_erase = spi_block_erase_20,
18394 }, {
18395 .eraseblocks = { {32 * 1024, 32} },
18396 .block_erase = spi_block_erase_52,
18397 }, {
18398 .eraseblocks = { {1024 * 1024, 1} },
18399 .block_erase = spi_block_erase_60,
18400 },
18401 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018402 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Zeus Castro33670ba2011-08-17 09:50:11 +000018403 .unlock = spi_disable_blockprotect,
18404 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18405 .read = spi_chip_read,
18406 .voltage = {3000, 3600},
18407 },
18408
18409 {
18410 .vendor = "SST",
Stefan Tauner6697f712014-08-06 15:09:15 +000018411 .name = "SST25VF010(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018412 .bustype = BUS_SPI,
Mark Marshall90021f22010-12-03 14:48:11 +000018413 .manufacture_id = SST_ID,
18414 .model_id = SST_SST25VF010_REMS,
18415 .total_size = 128,
18416 .page_size = 256,
Steven Zakulec3603a282012-05-02 20:07:57 +000018417 .feature_bits = FEATURE_WRSR_EWSR,
Mark Marshall90021f22010-12-03 14:48:11 +000018418 .tested = TEST_OK_PREW,
18419 .probe = probe_spi_rems,
18420 .probe_timing = TIMING_ZERO,
18421 .block_erasers =
18422 {
18423 {
18424 .eraseblocks = { {4 * 1024, 32} },
18425 .block_erase = spi_block_erase_20,
18426 }, {
18427 .eraseblocks = { {32 * 1024, 4} },
18428 .block_erase = spi_block_erase_52,
18429 }, {
Cory Henderson370f5822013-10-19 23:09:16 +000018430 .eraseblocks = { {32 * 1024, 4} },
Stefan Tauner6697f712014-08-06 15:09:15 +000018431 .block_erase = spi_block_erase_d8, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000018432 }, {
Mark Marshall90021f22010-12-03 14:48:11 +000018433 .eraseblocks = { {128 * 1024, 1} },
18434 .block_erase = spi_block_erase_60,
Cory Henderson370f5822013-10-19 23:09:16 +000018435 }, {
18436 .eraseblocks = { {128 * 1024, 1} },
Stefan Tauner6697f712014-08-06 15:09:15 +000018437 .block_erase = spi_block_erase_c7, /* Supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000018438 },
18439 },
18440 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
18441 .unlock = spi_disable_blockprotect,
18442 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
Stefan Tauner6697f712014-08-06 15:09:15 +000018443 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF010A only */
Cory Henderson370f5822013-10-19 23:09:16 +000018444 .voltage = {2700, 3600},
18445 },
18446
18447 {
18448 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018449 .name = "SST25VF016B",
18450 .bustype = BUS_SPI,
18451 .manufacture_id = SST_ID,
18452 .model_id = SST_SST25VF016B,
18453 .total_size = 2048,
18454 .page_size = 256,
18455 .feature_bits = FEATURE_WRSR_EITHER,
18456 .tested = TEST_OK_PREW,
18457 .probe = probe_spi_rdid,
18458 .probe_timing = TIMING_ZERO,
18459 .block_erasers =
18460 {
18461 {
18462 .eraseblocks = { {4 * 1024, 512} },
18463 .block_erase = spi_block_erase_20,
18464 }, {
18465 .eraseblocks = { {32 * 1024, 64} },
18466 .block_erase = spi_block_erase_52,
18467 }, {
18468 .eraseblocks = { {64 * 1024, 32} },
18469 .block_erase = spi_block_erase_d8,
18470 }, {
18471 .eraseblocks = { {2 * 1024 * 1024, 1} },
18472 .block_erase = spi_block_erase_60,
18473 }, {
18474 .eraseblocks = { {2 * 1024 * 1024, 1} },
18475 .block_erase = spi_block_erase_c7,
18476 },
18477 },
18478 .printlock = spi_prettyprint_status_register_sst25vf016,
18479 .unlock = spi_disable_blockprotect,
18480 .write = spi_aai_write,
18481 .read = spi_chip_read,
18482 .voltage = {2700, 3600},
18483 },
18484
18485 {
18486 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000018487 .name = "SST25VF020",
18488 .bustype = BUS_SPI,
18489 .manufacture_id = SST_ID,
18490 .model_id = SST_SST25VF020_REMS,
18491 .total_size = 256,
18492 .page_size = 256,
18493 .feature_bits = FEATURE_WRSR_EWSR,
18494 .tested = TEST_UNTESTED,
18495 .probe = probe_spi_rems,
18496 .probe_timing = TIMING_ZERO,
18497 .block_erasers =
18498 {
18499 {
18500 .eraseblocks = { {4 * 1024, 64} },
18501 .block_erase = spi_block_erase_20,
18502 }, {
18503 .eraseblocks = { {32 * 1024, 8} },
18504 .block_erase = spi_block_erase_52,
18505 }, {
18506 .eraseblocks = { {256 * 1024, 1} },
18507 .block_erase = spi_block_erase_60,
18508 },
18509 },
18510 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
18511 .unlock = spi_disable_blockprotect,
18512 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18513 .read = spi_chip_read, /* only */
18514 .voltage = {2700, 3600},
18515 },
18516
18517 {
18518 .vendor = "SST",
18519 .name = "SST25VF020B",
18520 .bustype = BUS_SPI,
18521 .manufacture_id = SST_ID,
18522 .model_id = SST_SST25VF020B,
18523 .total_size = 256,
18524 .page_size = 256,
18525 .feature_bits = FEATURE_WRSR_EWSR,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000018526 .tested = TEST_OK_PREW,
Cory Henderson370f5822013-10-19 23:09:16 +000018527 .probe = probe_spi_rdid,
18528 .probe_timing = TIMING_ZERO,
18529 .block_erasers =
18530 {
18531 {
18532 .eraseblocks = { {4 * 1024, 64} },
18533 .block_erase = spi_block_erase_20,
18534 }, {
18535 .eraseblocks = { {32 * 1024, 8} },
18536 .block_erase = spi_block_erase_52,
18537 }, {
18538 .eraseblocks = { {64 * 1024, 4} },
18539 .block_erase = spi_block_erase_d8,
18540 }, {
18541 .eraseblocks = { {256 * 1024, 1} },
18542 .block_erase = spi_block_erase_60,
18543 }, {
18544 .eraseblocks = { {256 * 1024, 1} },
18545 .block_erase = spi_block_erase_c7,
18546 },
18547 },
18548 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 and 2nd SR */
18549 .unlock = spi_disable_blockprotect, /* FIXME: 2nd SR */
18550 .write = spi_aai_write, /* AAI supported (0xAD) */
18551 .read = spi_chip_read, /* Fast read (0x0B) supported */
18552 .voltage = {2700, 3600},
18553 },
18554
18555 {
18556 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018557 .name = "SST25VF032B",
18558 .bustype = BUS_SPI,
18559 .manufacture_id = SST_ID,
18560 .model_id = SST_SST25VF032B,
18561 .total_size = 4096,
18562 .page_size = 256,
18563 .feature_bits = FEATURE_WRSR_EWSR,
18564 .tested = TEST_OK_PREW,
18565 .probe = probe_spi_rdid,
18566 .probe_timing = TIMING_ZERO,
18567 .block_erasers =
18568 {
18569 {
18570 .eraseblocks = { {4 * 1024, 1024} },
18571 .block_erase = spi_block_erase_20,
18572 }, {
18573 .eraseblocks = { {32 * 1024, 128} },
18574 .block_erase = spi_block_erase_52,
18575 }, {
18576 .eraseblocks = { {64 * 1024, 64} },
18577 .block_erase = spi_block_erase_d8,
18578 }, {
18579 .eraseblocks = { {4 * 1024 * 1024, 1} },
18580 .block_erase = spi_block_erase_60,
18581 }, {
18582 .eraseblocks = { {4 * 1024 * 1024, 1} },
18583 .block_erase = spi_block_erase_c7,
18584 },
18585 },
18586 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
18587 .unlock = spi_disable_blockprotect,
18588 .write = spi_aai_write,
18589 .read = spi_chip_read,
18590 .voltage = {2700, 3600},
18591 },
18592
18593 {
18594 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000018595 .name = "SST25VF040",
18596 .bustype = BUS_SPI,
18597 .manufacture_id = SST_ID,
18598 .model_id = SST_SST25VF040_REMS,
18599 .total_size = 512,
18600 .page_size = 256,
18601 .feature_bits = FEATURE_WRSR_EWSR,
18602 .tested = TEST_OK_PR,
18603 .probe = probe_spi_rems,
18604 .probe_timing = TIMING_ZERO,
18605 .block_erasers =
18606 {
18607 {
18608 .eraseblocks = { {4 * 1024, 128} },
18609 .block_erase = spi_block_erase_20,
18610 }, {
18611 .eraseblocks = { {32 * 1024, 16} },
18612 .block_erase = spi_block_erase_52,
18613 }, {
18614 .eraseblocks = { {512 * 1024, 1} },
18615 .block_erase = spi_block_erase_60,
Mark Marshall90021f22010-12-03 14:48:11 +000018616 },
18617 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000018618 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
Mark Marshall90021f22010-12-03 14:48:11 +000018619 .unlock = spi_disable_blockprotect,
Cory Henderson370f5822013-10-19 23:09:16 +000018620 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18621 .read = spi_chip_read,
18622 .voltage = {2700, 3600},
18623 },
18624
18625 {
18626 .vendor = "SST",
18627 .name = "SST25VF040B",
18628 .bustype = BUS_SPI,
18629 .manufacture_id = SST_ID,
18630 .model_id = SST_SST25VF040B,
18631 .total_size = 512,
18632 .page_size = 256,
18633 .feature_bits = FEATURE_WRSR_EWSR,
18634 .tested = TEST_OK_PREW,
18635 .probe = probe_spi_rdid,
18636 .probe_timing = TIMING_ZERO,
18637 .block_erasers =
18638 {
18639 {
18640 .eraseblocks = { {4 * 1024, 128} },
18641 .block_erase = spi_block_erase_20,
18642 }, {
18643 .eraseblocks = { {32 * 1024, 16} },
18644 .block_erase = spi_block_erase_52,
18645 }, {
18646 .eraseblocks = { {64 * 1024, 8} },
18647 .block_erase = spi_block_erase_d8,
18648 }, {
18649 .eraseblocks = { {512 * 1024, 1} },
18650 .block_erase = spi_block_erase_60,
18651 }, {
18652 .eraseblocks = { {512 * 1024, 1} },
18653 .block_erase = spi_block_erase_c7,
18654 },
18655 },
18656 .printlock = spi_prettyprint_status_register_sst25vf040b,
18657 .unlock = spi_disable_blockprotect,
18658 .write = spi_aai_write, /* AAI supported (0xAD) */
18659 .read = spi_chip_read, /* Fast read (0x0B) supported */
18660 .voltage = {2700, 3600},
18661 },
18662
18663 {
18664 .vendor = "SST",
18665 .name = "SST25VF040B.REMS",
18666 .bustype = BUS_SPI,
18667 .manufacture_id = SST_ID,
18668 .model_id = SST_SST25VF040B_REMS,
18669 .total_size = 512,
18670 .page_size = 256,
18671 .feature_bits = FEATURE_WRSR_EWSR,
18672 .tested = TEST_OK_PREW,
18673 .probe = probe_spi_rems,
18674 .probe_timing = TIMING_ZERO,
18675 .block_erasers =
18676 {
18677 {
18678 .eraseblocks = { {4 * 1024, 128} },
18679 .block_erase = spi_block_erase_20,
18680 }, {
18681 .eraseblocks = { {32 * 1024, 16} },
18682 .block_erase = spi_block_erase_52,
18683 }, {
18684 .eraseblocks = { {64 * 1024, 8} },
18685 .block_erase = spi_block_erase_d8,
18686 }, {
18687 .eraseblocks = { {512 * 1024, 1} },
18688 .block_erase = spi_block_erase_60,
18689 }, {
18690 .eraseblocks = { {512 * 1024, 1} },
18691 .block_erase = spi_block_erase_c7,
18692 },
18693 },
18694 .printlock = spi_prettyprint_status_register_sst25vf040b,
18695 .unlock = spi_disable_blockprotect,
18696 .write = spi_aai_write,
18697 .read = spi_chip_read,
18698 .voltage = {2700, 3600},
18699 },
18700
18701 {
18702 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018703 .name = "SST25VF064C",
Ben Gardnerbcf61092015-11-22 02:23:31 +000018704 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018705 .manufacture_id = SST_ID,
18706 .model_id = SST_SST25VF064C,
18707 .total_size = 8192,
Ben Gardnerbcf61092015-11-22 02:23:31 +000018708 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018709 .feature_bits = FEATURE_WRSR_EWSR,
Ben Gardnerbcf61092015-11-22 02:23:31 +000018710 .tested = TEST_OK_PREW,
18711 .probe = probe_spi_rdid,
18712 .probe_timing = TIMING_ZERO,
18713 .block_erasers =
18714 {
18715 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018716 .eraseblocks = { {4 * 1024, 2048} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000018717 .block_erase = spi_block_erase_20,
18718 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018719 .eraseblocks = { {32 * 1024, 256} },
18720 .block_erase = spi_block_erase_52,
18721 }, {
18722 .eraseblocks = { {64 * 1024, 128} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000018723 .block_erase = spi_block_erase_d8,
18724 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018725 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000018726 .block_erase = spi_block_erase_60,
18727 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100018728 .eraseblocks = { {8 * 1024 * 1024, 1} },
Ben Gardnerbcf61092015-11-22 02:23:31 +000018729 .block_erase = spi_block_erase_c7,
18730 },
18731 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100018732 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
18733 .unlock = spi_disable_blockprotect,
Ben Gardnerbcf61092015-11-22 02:23:31 +000018734 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018735 .read = spi_chip_read,
18736 .voltage = {2700, 3600},
Ben Gardnerbcf61092015-11-22 02:23:31 +000018737 },
18738
18739 {
18740 .vendor = "SST",
Cory Henderson370f5822013-10-19 23:09:16 +000018741 .name = "SST25VF080B",
18742 .bustype = BUS_SPI,
18743 .manufacture_id = SST_ID,
18744 .model_id = SST_SST25VF080B,
18745 .total_size = 1024,
18746 .page_size = 256,
18747 .feature_bits = FEATURE_WRSR_EWSR,
18748 .tested = TEST_OK_PREW,
18749 .probe = probe_spi_rdid,
18750 .probe_timing = TIMING_ZERO,
18751 .block_erasers =
18752 {
18753 {
18754 .eraseblocks = { {4 * 1024, 256} },
18755 .block_erase = spi_block_erase_20,
18756 }, {
18757 .eraseblocks = { {32 * 1024, 32} },
18758 .block_erase = spi_block_erase_52,
18759 }, {
18760 .eraseblocks = { {64 * 1024, 16} },
18761 .block_erase = spi_block_erase_d8,
18762 }, {
18763 .eraseblocks = { {1024 * 1024, 1} },
18764 .block_erase = spi_block_erase_60,
18765 }, {
18766 .eraseblocks = { {1024 * 1024, 1} },
18767 .block_erase = spi_block_erase_c7,
18768 },
18769 },
18770 .printlock = spi_prettyprint_status_register_sst25, /* TODO: check */
18771 .unlock = spi_disable_blockprotect,
18772 .write = spi_aai_write,
Mark Marshall90021f22010-12-03 14:48:11 +000018773 .read = spi_chip_read,
Steven Zakulec7d257b42011-07-19 08:50:18 +000018774 .voltage = {2700, 3600},
Mark Marshall90021f22010-12-03 14:48:11 +000018775 },
18776
18777 {
18778 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100018779 .name = "SST25VF512(A)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000018780 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000018781 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100018782 .model_id = SST_SST25VF512_REMS,
18783 .total_size = 64,
18784 .page_size = 256,
18785 .feature_bits = FEATURE_WRSR_EWSR,
18786 .tested = TEST_OK_PREW,
18787 .probe = probe_spi_rems,
18788 .probe_timing = TIMING_ZERO,
18789 .block_erasers =
18790 {
18791 {
18792 .eraseblocks = { {4 * 1024, 16} },
18793 .block_erase = spi_block_erase_20,
18794 }, {
18795 .eraseblocks = { {32 * 1024, 2} },
18796 .block_erase = spi_block_erase_52,
18797 }, {
18798 .eraseblocks = { {32 * 1024, 2} },
18799 .block_erase = spi_block_erase_d8, /* Supported by SST25VF512A only */
18800 }, {
18801 .eraseblocks = { {64 * 1024, 1} },
18802 .block_erase = spi_block_erase_60,
18803 }, {
18804 .eraseblocks = { {64 * 1024, 1} },
18805 .block_erase = spi_block_erase_c7, /* Supported by SST25VF512A only */
18806 },
18807 },
18808 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: No BP2 & 3 */
18809 .unlock = spi_disable_blockprotect,
18810 .write = spi_chip_write_1, /* AAI supported, but opcode is 0xAF */
18811 .read = spi_chip_read, /* Fast read (0x0B) supported by SST25VF512A only */
18812 .voltage = {2700, 3600},
18813 },
18814
18815 {
18816 .vendor = "SST",
18817 .name = "SST25WF010",
18818 .bustype = BUS_SPI,
18819 .manufacture_id = SST_ID,
18820 .model_id = SST_SST25WF010,
18821 .total_size = 128,
18822 .page_size = 256,
18823 .feature_bits = FEATURE_WRSR_EITHER,
18824 .tested = TEST_UNTESTED,
18825 .probe = probe_spi_rdid,
18826 .probe_timing = TIMING_ZERO,
18827 .block_erasers =
18828 {
18829 {
18830 .eraseblocks = { {4 * 1024, 32} },
18831 .block_erase = spi_block_erase_20,
18832 }, {
18833 .eraseblocks = { {32 * 1024, 4} },
18834 .block_erase = spi_block_erase_52,
18835 }, {
18836 .eraseblocks = { {1024 * 128, 1} },
18837 .block_erase = spi_block_erase_60,
18838 }, {
18839 .eraseblocks = { {1024 * 128, 1} },
18840 .block_erase = spi_block_erase_c7,
18841 },
18842 },
18843 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
18844 .unlock = spi_disable_blockprotect_bp2_srwd,
18845 .write = spi_aai_write,
18846 .read = spi_chip_read, /* Fast read (0x0B) supported */
18847 .voltage = {1650, 1950},
18848 },
18849
18850 {
18851 .vendor = "SST",
18852 .name = "SST25WF020",
18853 .bustype = BUS_SPI,
18854 .manufacture_id = SST_ID,
18855 .model_id = SST_SST25WF020,
18856 .total_size = 256,
18857 .page_size = 256,
18858 .feature_bits = FEATURE_WRSR_EITHER,
18859 .tested = TEST_UNTESTED,
18860 .probe = probe_spi_rdid,
18861 .probe_timing = TIMING_ZERO,
18862 .block_erasers =
18863 {
18864 {
18865 .eraseblocks = { {4 * 1024, 64} },
18866 .block_erase = spi_block_erase_20,
18867 }, {
18868 .eraseblocks = { {32 * 1024, 8} },
18869 .block_erase = spi_block_erase_52,
18870 }, {
18871 .eraseblocks = { {64 * 1024, 4} },
18872 .block_erase = spi_block_erase_d8,
18873 }, {
18874 .eraseblocks = { {1024 * 256, 1} },
18875 .block_erase = spi_block_erase_60,
18876 }, {
18877 .eraseblocks = { {1024 * 256, 1} },
18878 .block_erase = spi_block_erase_c7,
18879 },
18880 },
18881 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
18882 .unlock = spi_disable_blockprotect_bp2_srwd,
18883 .write = spi_aai_write,
18884 .read = spi_chip_read, /* Fast read (0x0B) supported */
18885 .voltage = {1650, 1950},
18886 },
18887
18888 {
18889 .vendor = "SST",
18890 .name = "SST25WF020A",
18891 .bustype = BUS_SPI,
18892 .manufacture_id = SANYO_ID, /* See flashchips.h */
18893 .model_id = SST_SST25WF020A,
18894 .total_size = 256,
18895 .page_size = 256,
18896 .feature_bits = FEATURE_WRSR_WREN,
18897 .tested = TEST_UNTESTED,
18898 .probe = probe_spi_rdid,
18899 .probe_timing = TIMING_ZERO,
18900 .block_erasers =
18901 {
18902 {
18903 .eraseblocks = { {4 * 1024, 64} },
18904 .block_erase = spi_block_erase_20,
18905 }, {
18906 .eraseblocks = { {64 * 1024, 4} },
18907 .block_erase = spi_block_erase_d8,
18908 }, {
18909 .eraseblocks = { {256 * 1024, 1} },
18910 .block_erase = spi_block_erase_60,
18911 }, {
18912 .eraseblocks = { {256 * 1024, 1} },
18913 .block_erase = spi_block_erase_c7,
18914 },
18915 },
18916 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
18917 .unlock = spi_disable_blockprotect_bp2_srwd,
18918 .write = spi_chip_write_256,
18919 .read = spi_chip_read, /* Fast read (0x0B) supported */
18920 .voltage = {1650, 1950},
18921 },
18922
18923 {
18924 .vendor = "SST",
18925 .name = "SST25WF040",
18926 .bustype = BUS_SPI,
18927 .manufacture_id = SST_ID,
18928 .model_id = SST_SST25WF040,
18929 .total_size = 512,
18930 .page_size = 256,
18931 .feature_bits = FEATURE_WRSR_EITHER,
18932 .tested = TEST_UNTESTED,
18933 .probe = probe_spi_rdid,
18934 .probe_timing = TIMING_ZERO,
18935 .block_erasers =
18936 {
18937 {
18938 .eraseblocks = { {4 * 1024, 128} },
18939 .block_erase = spi_block_erase_20,
18940 }, {
18941 .eraseblocks = { {32 * 1024, 16} },
18942 .block_erase = spi_block_erase_52,
18943 }, {
18944 .eraseblocks = { {64 * 1024, 8} },
18945 .block_erase = spi_block_erase_d8,
18946 }, {
18947 .eraseblocks = { {1024 * 512, 1} },
18948 .block_erase = spi_block_erase_60,
18949 }, {
18950 .eraseblocks = { {1024 * 512, 1} },
18951 .block_erase = spi_block_erase_c7,
18952 },
18953 },
18954 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
18955 .unlock = spi_disable_blockprotect_bp2_srwd,
18956 .write = spi_aai_write,
18957 .read = spi_chip_read, /* Fast read (0x0B) supported */
18958 .voltage = {1650, 1950},
18959 },
18960
18961 {
18962 .vendor = "SST",
18963 .name = "SST25WF040B",
18964 .bustype = BUS_SPI,
18965 .manufacture_id = SANYO_ID, /* See flashchips.h */
18966 .model_id = SST_SST25WF040B,
18967 .total_size = 512,
18968 .page_size = 256,
18969 .feature_bits = FEATURE_WRSR_WREN,
18970 .tested = TEST_UNTESTED,
18971 .probe = probe_spi_rdid,
18972 .probe_timing = TIMING_ZERO,
18973 .block_erasers =
18974 {
18975 {
18976 .eraseblocks = { {4 * 1024, 128} },
18977 .block_erase = spi_block_erase_20,
18978 }, {
18979 .eraseblocks = { {64 * 1024, 8} },
18980 .block_erase = spi_block_erase_d8,
18981 }, {
18982 .eraseblocks = { {512 * 1024, 1} },
18983 .block_erase = spi_block_erase_60,
18984 }, {
18985 .eraseblocks = { {512 * 1024, 1} },
18986 .block_erase = spi_block_erase_c7,
18987 },
18988 },
18989 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
18990 .unlock = spi_disable_blockprotect_bp2_srwd,
18991 .write = spi_chip_write_256,
18992 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
18993 .voltage = {1650, 1950},
18994 },
18995
18996 {
18997 .vendor = "SST",
18998 .name = "SST25WF080",
18999 .bustype = BUS_SPI,
19000 .manufacture_id = SST_ID,
19001 .model_id = SST_SST25WF080,
19002 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019003 .page_size = 256,
Stefan Taunere34e3e82013-01-01 00:06:51 +000019004 .feature_bits = FEATURE_WRSR_EITHER,
Mark Marshall90021f22010-12-03 14:48:11 +000019005 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019006 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000019007 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019008 .block_erasers =
19009 {
19010 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019011 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019012 .block_erase = spi_block_erase_20,
19013 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019014 .eraseblocks = { {32 * 1024, 32} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019015 .block_erase = spi_block_erase_52,
19016 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019017 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019018 .block_erase = spi_block_erase_d8,
19019 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019020 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019021 .block_erase = spi_block_erase_60,
19022 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019023 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019024 .block_erase = spi_block_erase_c7,
19025 },
19026 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019027 .printlock = spi_prettyprint_status_register_sst25, /* *does* have a BP3 but it is useless */
19028 .unlock = spi_disable_blockprotect_bp3_srwd,
Joshua Roys87955bf2011-08-01 18:39:28 +000019029 .write = spi_aai_write,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019030 .read = spi_chip_read, /* Fast read (0x0B) supported */
19031 .voltage = {1650, 1950},
FENG yu ningff692fb2008-12-08 18:15:10 +000019032 },
19033
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019034 {
19035 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019036 .name = "SST25WF080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019037 .bustype = BUS_SPI,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019038 .manufacture_id = SANYO_ID, /* See flashchips.h */
19039 .model_id = SST_SST25WF080B,
19040 .total_size = 1024,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019041 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019042 .feature_bits = FEATURE_WRSR_WREN,
Stefan Taunerfcf6a8c2011-05-18 01:32:00 +000019043 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019044 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000019045 .probe_timing = TIMING_ZERO,
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019046 .block_erasers =
19047 {
19048 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019049 .eraseblocks = { {4 * 1024, 256} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019050 .block_erase = spi_block_erase_20,
19051 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019052 .eraseblocks = { {64 * 1024, 16} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019053 .block_erase = spi_block_erase_d8,
19054 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019055 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019056 .block_erase = spi_block_erase_60,
19057 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100019058 .eraseblocks = { {1024 * 1024, 1} },
Carl-Daniel Hailfingerbbfeb702009-12-23 12:16:47 +000019059 .block_erase = spi_block_erase_c7,
19060 },
19061 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100019062 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
19063 .unlock = spi_disable_blockprotect_bp2_srwd,
Helge Wagner1db7a442010-10-05 22:29:08 +000019064 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019065 .read = spi_chip_read, /* Fast read (0x0B), dual O (0x3B), dual I/O read (0xBB) supported */
19066 .voltage = {1650, 1950},
19067 },
19068
19069 {
19070 .vendor = "SST",
19071 .name = "SST25WF512",
19072 .bustype = BUS_SPI,
19073 .manufacture_id = SST_ID,
19074 .model_id = SST_SST25WF512,
19075 .total_size = 64,
19076 .page_size = 256,
19077 .feature_bits = FEATURE_WRSR_EITHER,
19078 .tested = TEST_UNTESTED,
19079 .probe = probe_spi_rdid,
19080 .probe_timing = TIMING_ZERO,
19081 .block_erasers =
19082 {
19083 {
19084 .eraseblocks = { {4 * 1024, 16} },
19085 .block_erase = spi_block_erase_20,
19086 }, {
19087 .eraseblocks = { {32 * 1024, 2} },
19088 .block_erase = spi_block_erase_52,
19089 }, {
19090 .eraseblocks = { {1024 * 64, 1} },
19091 .block_erase = spi_block_erase_60,
19092 }, {
19093 .eraseblocks = { {1024 * 64, 1} },
19094 .block_erase = spi_block_erase_c7,
19095 },
19096 },
19097 .printlock = spi_prettyprint_status_register_sst25, /* FIXME: does not have a BP3 */
19098 .unlock = spi_disable_blockprotect_bp2_srwd,
19099 .write = spi_aai_write,
19100 .read = spi_chip_read, /* Fast read (0x0B) supported */
19101 .voltage = {1650, 1950},
Ed Swierk86f4e6d2010-07-21 15:02:22 +000019102 },
19103
19104 {
19105 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010019106 .name = "SST26VF016",
19107 .bustype = BUS_SPI,
19108 .manufacture_id = SST_ID,
19109 .model_id = SST_SST26VF016,
19110 .total_size = 2048,
19111 .page_size = 256,
19112 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19113 .tested = TEST_UNTESTED,
19114 .probe = probe_spi_rdid,
19115 .probe_timing = TIMING_ZERO,
19116 .block_erasers =
19117 {
19118 {
19119 .eraseblocks = { {4 * 1024, 512} },
19120 .block_erase = spi_block_erase_20,
19121 }, {
19122 .eraseblocks = {
19123 {8 * 1024, 4},
19124 {32 * 1024, 1},
19125 {64 * 1024, 30},
19126 {32 * 1024, 1},
19127 {8 * 1024, 4},
19128 },
19129 .block_erase = spi_block_erase_d8,
19130 }, {
19131 .eraseblocks = { {2 * 1024 * 1024, 1} },
19132 .block_erase = spi_block_erase_c7,
19133 },
19134 },
19135 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19136 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19137 .write = spi_chip_write_256, /* Multi I/O supported */
19138 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19139 .voltage = {2700, 3600},
19140 },
19141
19142 {
19143 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070019144 .name = "SST26VF016B(A)",
19145 .bustype = BUS_SPI,
19146 .manufacture_id = SST_ID,
19147 .model_id = SST_SST26VF016B,
19148 .total_size = 2048,
19149 .page_size = 256,
19150 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19151 .tested = TEST_OK_PREW,
19152 .probe = probe_spi_rdid,
19153 .probe_timing = TIMING_ZERO,
19154 .block_erasers =
19155 {
19156 {
19157 .eraseblocks = { {4 * 1024, 512} },
19158 .block_erase = spi_block_erase_20,
19159 }, {
19160 .eraseblocks = {
19161 {8 * 1024, 4},
19162 {32 * 1024, 1},
19163 {64 * 1024, 30},
19164 {32 * 1024, 1},
19165 {8 * 1024, 4},
19166 },
19167 .block_erase = spi_block_erase_d8,
19168 }, {
19169 .eraseblocks = { {2 * 1024 * 1024, 1} },
19170 .block_erase = spi_block_erase_c7,
19171 },
19172 },
19173 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19174 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19175 .write = spi_chip_write_256, /* Multi I/O supported */
19176 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19177 .voltage = {2700, 3600},
19178 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100019179
Wei Hu25584de2018-04-30 14:02:08 -070019180 {
19181 .vendor = "SST",
Nico Hubera2eaf4a2023-02-15 22:56:53 +010019182 .name = "SST26VF032",
19183 .bustype = BUS_SPI,
19184 .manufacture_id = SST_ID,
19185 .model_id = SST_SST26VF032,
19186 .total_size = 4096,
19187 .page_size = 256,
19188 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19189 .tested = TEST_UNTESTED,
19190 .probe = probe_spi_rdid,
19191 .probe_timing = TIMING_ZERO,
19192 .block_erasers =
19193 {
19194 {
19195 .eraseblocks = { {4 * 1024, 1024} },
19196 .block_erase = spi_block_erase_20,
19197 }, {
19198 .eraseblocks = {
19199 {8 * 1024, 4},
19200 {32 * 1024, 1},
19201 {64 * 1024, 62},
19202 {32 * 1024, 1},
19203 {8 * 1024, 4},
19204 },
19205 .block_erase = spi_block_erase_d8,
19206 }, {
19207 .eraseblocks = { {4 * 1024 * 1024, 1} },
19208 .block_erase = spi_block_erase_c7,
19209 },
19210 },
19211 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19212 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19213 .write = spi_chip_write_256, /* Multi I/O supported */
19214 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19215 .voltage = {2700, 3600},
19216 },
19217
19218 {
19219 .vendor = "SST",
Wei Hu25584de2018-04-30 14:02:08 -070019220 .name = "SST26VF032B(A)",
19221 .bustype = BUS_SPI,
19222 .manufacture_id = SST_ID,
19223 .model_id = SST_SST26VF032B,
19224 .total_size = 4096,
19225 .page_size = 256,
19226 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19227 .tested = TEST_UNTESTED,
19228 .probe = probe_spi_rdid,
19229 .probe_timing = TIMING_ZERO,
19230 .block_erasers =
19231 {
19232 {
19233 .eraseblocks = { {4 * 1024, 1024} },
19234 .block_erase = spi_block_erase_20,
19235 }, {
19236 .eraseblocks = {
19237 {8 * 1024, 4},
19238 {32 * 1024, 1},
19239 {64 * 1024, 62},
19240 {32 * 1024, 1},
19241 {8 * 1024, 4},
19242 },
19243 .block_erase = spi_block_erase_d8,
19244 }, {
19245 .eraseblocks = { {4 * 1024 * 1024, 1} },
19246 .block_erase = spi_block_erase_c7,
19247 },
19248 },
19249 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19250 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19251 .write = spi_chip_write_256, /* Multi I/O supported */
19252 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19253 .voltage = {2700, 3600},
19254 },
19255
Wei Hu25584de2018-04-30 14:02:08 -070019256 {
19257 .vendor = "SST",
19258 .name = "SST26VF064B(A)",
19259 .bustype = BUS_SPI,
19260 .manufacture_id = SST_ID,
19261 .model_id = SST_SST26VF064B,
19262 .total_size = 8192,
19263 .page_size = 256,
19264 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19265 .tested = TEST_OK_PREW,
19266 .probe = probe_spi_rdid,
19267 .probe_timing = TIMING_ZERO,
19268 .block_erasers =
19269 {
19270 {
19271 .eraseblocks = { {4 * 1024, 2048} },
19272 .block_erase = spi_block_erase_20,
19273 }, {
19274 .eraseblocks = {
19275 {8 * 1024, 4},
19276 {32 * 1024, 1},
19277 {64 * 1024, 126},
19278 {32 * 1024, 1},
19279 {8 * 1024, 4},
19280 },
19281 .block_erase = spi_block_erase_d8,
19282 }, {
19283 .eraseblocks = { {8 * 1024 * 1024, 1} },
19284 .block_erase = spi_block_erase_c7,
19285 },
19286 },
19287 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
19288 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19289 .write = spi_chip_write_256, /* Multi I/O supported */
19290 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19291 .voltage = {2700, 3600},
19292 },
19293
19294 {
19295 .vendor = "SST",
Nico Huberd4e41d32024-10-18 14:59:54 +020019296 .name = "SST26VF080A",
19297 .bustype = BUS_SPI,
19298 .manufacture_id = SST_ID,
19299 .model_id = SST_SST26VF080A,
19300 .total_size = 1024,
19301 .page_size = 256,
19302 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
19303 .tested = TEST_UNTESTED,
19304 .probe = probe_spi_rdid,
19305 .probe_timing = TIMING_ZERO,
19306 .block_erasers =
19307 {
19308 {
19309 .eraseblocks = { {4 * 1024, 256} },
19310 .block_erase = spi_block_erase_20,
19311 }, {
19312 .eraseblocks = { {32 * 1024, 32} },
19313 .block_erase = spi_block_erase_52,
19314 }, {
19315 .eraseblocks = { {64 * 1024, 16} },
19316 .block_erase = spi_block_erase_d8,
19317 }, {
19318 .eraseblocks = { {1024 * 1024, 1} },
19319 .block_erase = spi_block_erase_60,
19320 }, {
19321 .eraseblocks = { {1024 * 1024, 1} },
19322 .block_erase = spi_block_erase_c7,
19323 },
19324 },
19325 .printlock = spi_prettyprint_status_register_bp3_srwd,
19326 .unlock = spi_disable_blockprotect_sst26_global_unprotect,
19327 .write = spi_chip_write_256, /* Multi I/O supported */
19328 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
19329 .voltage = {2700, 3600},
19330 },
19331
19332 {
19333 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019334 .name = "SST28SF040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019335 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019336 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019337 .model_id = SST_SST28SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019338 .total_size = 512,
19339 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000019340 .feature_bits = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019341 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019342 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000019343 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst28sf040.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019344 .block_erasers =
19345 {
19346 {
19347 .eraseblocks = { {128, 4096} },
19348 .block_erase = erase_sector_28sf040,
19349 }, {
19350 .eraseblocks = { {512 * 1024, 1} },
19351 .block_erase = erase_chip_28sf040,
19352 }
19353 },
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000019354 .unlock = unprotect_28sf040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019355 .write = write_28sf040,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019356 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019357 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019358 .prepare_access = prepare_memory_access,
19359 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019360 },
19361
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019362 {
19363 .vendor = "SST",
19364 .name = "SST29EE010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019365 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019366 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019367 .model_id = SST_SST29EE010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019368 .total_size = 128,
19369 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000019370 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000019371 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019372 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000019373 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019374 .block_erasers =
19375 {
19376 {
19377 .eraseblocks = { {128 * 1024, 1} },
19378 .block_erase = erase_chip_block_jedec,
19379 }
19380 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019381 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019382 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019383 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019384 .prepare_access = prepare_memory_access,
19385 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019386 },
19387
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019388 {
19389 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019390 .name = "SST29EE020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019391 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019392 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019393 .model_id = SST_SST29EE020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019394 .total_size = 256,
19395 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000019396 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000019397 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019398 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000019399 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019400 .block_erasers =
19401 {
19402 {
19403 .eraseblocks = { {256 * 1024, 1} },
19404 .block_erase = erase_chip_block_jedec,
19405 }
19406 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019407 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019408 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019409 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019410 .prepare_access = prepare_memory_access,
19411 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019412 },
19413
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019414 {
19415 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019416 .name = "SST29LE010",
19417 .bustype = BUS_PARALLEL,
19418 .manufacture_id = SST_ID,
19419 .model_id = SST_SST29LE010,
19420 .total_size = 128,
19421 .page_size = 128,
19422 .feature_bits = FEATURE_LONG_RESET,
19423 .tested = TEST_UNTESTED,
19424 .probe = probe_jedec,
19425 .probe_timing = 10,
19426 .block_erasers =
19427 {
19428 {
19429 .eraseblocks = { {128 * 1024, 1} },
19430 .block_erase = erase_chip_block_jedec,
19431 }
19432 },
19433 .write = write_jedec,
19434 .read = read_memmapped,
19435 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019436 .prepare_access = prepare_memory_access,
19437 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019438 },
19439
19440 {
19441 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019442 .name = "SST29LE020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019443 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019444 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019445 .model_id = SST_SST29LE020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019446 .total_size = 256,
19447 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000019448 .feature_bits = FEATURE_LONG_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000019449 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019450 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000019451 .probe_timing = 10,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019452 .block_erasers =
19453 {
19454 {
19455 .eraseblocks = { {256 * 1024, 1} },
19456 .block_erase = erase_chip_block_jedec,
19457 }
19458 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019459 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019460 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019461 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019462 .prepare_access = prepare_memory_access,
19463 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019464 },
19465
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019466 {
19467 .vendor = "SST",
19468 .name = "SST39SF010A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019469 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019470 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019471 .model_id = SST_SST39SF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019472 .total_size = 128,
19473 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019474 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000019475 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019476 .probe = probe_jedec,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000019477 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019478 .block_erasers =
19479 {
19480 {
19481 .eraseblocks = { {4 * 1024, 32} },
19482 .block_erase = erase_sector_jedec,
19483 }, {
19484 .eraseblocks = { {128 * 1024, 1} },
19485 .block_erase = erase_chip_block_jedec,
19486 }
19487 },
Sean Nelson35727f72010-01-28 23:55:12 +000019488 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019489 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019490 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019491 .prepare_access = prepare_memory_access,
19492 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019493 },
19494
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019495 {
19496 .vendor = "SST",
19497 .name = "SST39SF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019498 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019499 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019500 .model_id = SST_SST39SF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019501 .total_size = 256,
19502 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019503 .feature_bits = FEATURE_EITHER_RESET,
Uwe Hermann19f46f22011-06-18 22:56:14 +000019504 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019505 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019506 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019507 .block_erasers =
19508 {
19509 {
19510 .eraseblocks = { {4 * 1024, 64} },
19511 .block_erase = erase_sector_jedec,
19512 }, {
19513 .eraseblocks = { {256 * 1024, 1} },
19514 .block_erase = erase_chip_block_jedec,
19515 }
19516 },
Sean Nelson35727f72010-01-28 23:55:12 +000019517 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019518 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019519 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019520 .prepare_access = prepare_memory_access,
19521 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019522 },
19523
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019524 {
19525 .vendor = "SST",
19526 .name = "SST39SF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019527 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019528 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019529 .model_id = SST_SST39SF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019530 .total_size = 512,
19531 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019532 .feature_bits = FEATURE_EITHER_RESET,
Sylvain "ythier" Hitier3093f8f2011-09-03 11:22:27 +000019533 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019534 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019535 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019536 .block_erasers =
19537 {
19538 {
19539 .eraseblocks = { {4 * 1024, 128} },
19540 .block_erase = erase_sector_jedec,
19541 }, {
19542 .eraseblocks = { {512 * 1024, 1} },
19543 .block_erase = erase_chip_block_jedec,
19544 }
19545 },
Sean Nelson35727f72010-01-28 23:55:12 +000019546 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019547 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019548 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019549 .prepare_access = prepare_memory_access,
19550 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019551 },
19552
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019553 {
19554 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019555 .name = "SST39SF512",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019556 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019557 .manufacture_id = SST_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019558 .model_id = SST_SST39SF512,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019559 .total_size = 64,
19560 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019561 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd7d423b2012-10-20 09:13:16 +000019562 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019563 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019564 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019565 .block_erasers =
19566 {
19567 {
19568 .eraseblocks = { {4 * 1024, 16} },
19569 .block_erase = erase_sector_jedec,
19570 }, {
19571 .eraseblocks = { {64 * 1024, 1} },
19572 .block_erase = erase_chip_block_jedec,
19573 }
19574 },
Sean Nelson35727f72010-01-28 23:55:12 +000019575 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019576 .read = read_memmapped,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019577 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010019578 .prepare_access = prepare_memory_access,
19579 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019580 },
19581
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019582 {
19583 .vendor = "SST",
19584 .name = "SST39VF010",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019585 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019586 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019587 .model_id = SST_SST39VF010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019588 .total_size = 128,
19589 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019590 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerd94d25d2012-07-28 03:17:15 +000019591 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019592 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019593 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019594 .block_erasers =
19595 {
19596 {
19597 .eraseblocks = { {4 * 1024, 32} },
19598 .block_erase = erase_sector_jedec,
19599 }, {
19600 .eraseblocks = { {128 * 1024, 1} },
19601 .block_erase = erase_chip_block_jedec,
19602 }
19603 },
Sean Nelson35727f72010-01-28 23:55:12 +000019604 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019605 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019606 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019607 .prepare_access = prepare_memory_access,
19608 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019609 },
19610
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019611 {
19612 .vendor = "SST",
19613 .name = "SST39VF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019614 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019615 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019616 .model_id = SST_SST39VF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019617 .total_size = 256,
19618 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019619 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner5c316f92015-02-08 21:57:52 +000019620 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019621 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019622 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019623 .block_erasers =
19624 {
19625 {
19626 .eraseblocks = { {4 * 1024, 64} },
19627 .block_erase = erase_sector_jedec,
19628 }, {
19629 .eraseblocks = { {256 * 1024, 1} },
19630 .block_erase = erase_chip_block_jedec,
19631 }
19632 },
Sean Nelson35727f72010-01-28 23:55:12 +000019633 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019634 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019635 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019636 .prepare_access = prepare_memory_access,
19637 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019638 },
19639
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019640 {
19641 .vendor = "SST",
19642 .name = "SST39VF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019643 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019644 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019645 .model_id = SST_SST39VF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019646 .total_size = 512,
19647 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019648 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000019649 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019650 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019651 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019652 .block_erasers =
19653 {
19654 {
19655 .eraseblocks = { {4 * 1024, 128} },
19656 .block_erase = erase_sector_jedec,
19657 }, {
19658 .eraseblocks = { {512 * 1024, 1} },
19659 .block_erase = erase_chip_block_jedec,
19660 }
19661 },
Sean Nelson35727f72010-01-28 23:55:12 +000019662 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019663 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019664 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019665 .prepare_access = prepare_memory_access,
19666 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger90eff152008-12-08 23:51:45 +000019667 },
FENG yu ningff692fb2008-12-08 18:15:10 +000019668
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019669 {
19670 .vendor = "SST",
Peter Stuge8440cc02009-01-25 23:55:12 +000019671 .name = "SST39VF080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019672 .bustype = BUS_PARALLEL,
Mateusz Murawskie33890d2009-06-12 11:45:10 +000019673 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019674 .model_id = SST_SST39VF080,
Peter Stuge8440cc02009-01-25 23:55:12 +000019675 .total_size = 1024,
19676 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000019677 .feature_bits = FEATURE_EITHER_RESET,
Peter Stuge8440cc02009-01-25 23:55:12 +000019678 .tested = TEST_UNTESTED,
19679 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019680 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019681 .block_erasers =
19682 {
19683 {
19684 .eraseblocks = { {4 * 1024, 256} },
19685 .block_erase = erase_sector_jedec,
19686 }, {
19687 .eraseblocks = { {64 * 1024, 16} },
19688 .block_erase = erase_block_jedec,
19689 }, {
19690 .eraseblocks = { {1024 * 1024, 1} },
19691 .block_erase = erase_chip_block_jedec,
19692 }
19693 },
Sean Nelson35727f72010-01-28 23:55:12 +000019694 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019695 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019696 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019697 .prepare_access = prepare_memory_access,
19698 .finish_access = finish_memory_access,
Peter Stuge8440cc02009-01-25 23:55:12 +000019699 },
19700
19701 {
19702 .vendor = "SST",
Alan Green1f9cc7d2019-07-01 11:10:45 +100019703 .name = "SST39VF512",
19704 .bustype = BUS_PARALLEL,
19705 .manufacture_id = SST_ID,
19706 .model_id = SST_SST39VF512,
19707 .total_size = 64,
19708 .page_size = 4096,
19709 .feature_bits = FEATURE_EITHER_RESET,
19710 .tested = TEST_OK_PREW,
19711 .probe = probe_jedec,
19712 .probe_timing = 1, /* 150 ns */
19713 .block_erasers =
19714 {
19715 {
19716 .eraseblocks = { {4 * 1024, 16} },
19717 .block_erase = erase_sector_jedec,
19718 }, {
19719 .eraseblocks = { {64 * 1024, 1} },
19720 .block_erase = erase_chip_block_jedec,
19721 }
19722 },
19723 .write = write_jedec_1,
19724 .read = read_memmapped,
19725 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010019726 .prepare_access = prepare_memory_access,
19727 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100019728 },
19729
19730 {
19731 .vendor = "SST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019732 .name = "SST49LF002A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019733 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019734 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019735 .model_id = SST_SST49LF002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019736 .total_size = 256,
19737 .page_size = 16 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010019738 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000019739 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019740 .probe = probe_jedec,
19741 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019742 .block_erasers =
19743 {
19744 {
19745 .eraseblocks = { {4 * 1024, 64} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019746 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019747 }, {
19748 .eraseblocks = { {16 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019749 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019750 }, {
19751 .eraseblocks = { {256 * 1024, 1} },
19752 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
19753 }
19754 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019755 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019756 .unlock = unlock_sst_fwhub,
19757 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019758 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019759 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019760 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019761 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019762 },
19763
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019764 {
19765 .vendor = "SST",
19766 .name = "SST49LF003A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019767 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019768 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019769 .model_id = SST_SST49LF003A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019770 .total_size = 384,
19771 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010019772 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000019773 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019774 .probe = probe_jedec,
19775 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019776 .block_erasers =
19777 {
19778 {
19779 .eraseblocks = { {4 * 1024, 96} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019780 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019781 }, {
19782 .eraseblocks = { {64 * 1024, 6} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019783 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019784 }, {
19785 .eraseblocks = { {384 * 1024, 1} },
19786 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
19787 }
19788 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019789 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019790 .unlock = unlock_sst_fwhub,
19791 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019792 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019793 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019794 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019795 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019796 },
19797
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019798 {
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000019799 /* Contrary to the data sheet, TBL# on the SST49LF004B affects the top 128kB (instead of 64kB)
19800 * and is only honored for 64k block erase, but not 4k sector erase.
19801 */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019802 .vendor = "SST",
19803 .name = "SST49LF004A/B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019804 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019805 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019806 .model_id = SST_SST49LF004A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019807 .total_size = 512,
19808 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010019809 .feature_bits = FEATURE_EITHER_RESET,
Idwer Vollering67f28142011-03-06 22:26:23 +000019810 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019811 .probe = probe_jedec,
19812 .probe_timing = 1, /* 150 ns */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000019813 .block_erasers =
19814 {
19815 {
19816 .eraseblocks = { {4 * 1024, 128} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019817 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000019818 }, {
19819 .eraseblocks = { {64 * 1024, 8} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019820 .block_erase = erase_block_jedec,
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000019821 }, {
19822 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson51c83fb2010-01-20 20:55:53 +000019823 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
Carl-Daniel Hailfingera06287c2009-09-23 22:01:33 +000019824 },
19825 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019826 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019827 .unlock = unlock_sst_fwhub,
19828 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019829 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019830 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019831 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019832 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019833 },
19834
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019835 {
19836 .vendor = "SST",
19837 .name = "SST49LF004C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019838 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019839 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019840 .model_id = SST_SST49LF004C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019841 .total_size = 512,
19842 .page_size = 4 * 1024,
19843 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019844 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000019845 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019846 .block_erasers =
19847 {
19848 {
19849 .eraseblocks = { {4 * 1024, 128} },
19850 .block_erase = erase_sector_49lfxxxc,
19851 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000019852 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000019853 {64 * 1024, 7},
19854 {32 * 1024, 1},
19855 {8 * 1024, 2},
19856 {16 * 1024, 1},
19857 },
Sean Nelson69e58112010-03-23 17:10:28 +000019858 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019859 }
19860 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000019861 .printlock = printlock_regspace2_block_eraser_1,
19862 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000019863 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019864 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019865 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019866 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019867 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019868 },
19869
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019870 {
19871 .vendor = "SST",
19872 .name = "SST49LF008A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019873 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019874 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019875 .model_id = SST_SST49LF008A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019876 .total_size = 1024,
19877 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010019878 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000019879 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019880 .probe = probe_jedec,
19881 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019882 .block_erasers =
19883 {
19884 {
19885 .eraseblocks = { {4 * 1024, 256} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019886 .block_erase = erase_sector_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019887 }, {
19888 .eraseblocks = { {64 * 1024, 16} },
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019889 .block_erase = erase_block_jedec,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019890 }, {
19891 .eraseblocks = { {1024 * 1024, 1} },
19892 .block_erase = NULL, /* AA 55 80 AA 55 10, only in A/A mux mode */
19893 }
19894 },
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019895 .printlock = printlock_sst_fwhub,
Sean Nelsonccf7a2a2010-03-16 03:09:10 +000019896 .unlock = unlock_sst_fwhub,
19897 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019898 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019899 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019900 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019901 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019902 },
19903
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019904 {
19905 .vendor = "SST",
19906 .name = "SST49LF008C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019907 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019908 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019909 .model_id = SST_SST49LF008C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019910 .total_size = 1024,
19911 .page_size = 4 * 1024,
19912 .tested = TEST_UNTESTED,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019913 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000019914 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019915 .block_erasers =
19916 {
19917 {
19918 .eraseblocks = { {4 * 1024, 256} },
19919 .block_erase = erase_sector_49lfxxxc,
19920 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000019921 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000019922 {64 * 1024, 15},
19923 {32 * 1024, 1},
19924 {8 * 1024, 2},
19925 {16 * 1024, 1},
19926 },
Sean Nelson69e58112010-03-23 17:10:28 +000019927 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019928 }
19929 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000019930 .printlock = printlock_regspace2_block_eraser_1,
19931 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000019932 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019933 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019934 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019935 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019936 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019937 },
19938
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019939 {
19940 .vendor = "SST",
19941 .name = "SST49LF016C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019942 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019943 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019944 .model_id = SST_SST49LF016C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019945 .total_size = 2048,
19946 .page_size = 4 * 1024,
Stefan Tauner23e10b82016-01-23 16:16:49 +000019947 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000019948 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000019949 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019950 .block_erasers =
19951 {
19952 {
19953 .eraseblocks = { {4 * 1024, 512} },
19954 .block_erase = erase_sector_49lfxxxc,
19955 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000019956 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000019957 {64 * 1024, 31},
19958 {32 * 1024, 1},
19959 {8 * 1024, 2},
19960 {16 * 1024, 1},
19961 },
Sean Nelson69e58112010-03-23 17:10:28 +000019962 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000019963 }
19964 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000019965 .printlock = printlock_regspace2_block_eraser_1,
19966 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000019967 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000019968 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000019969 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010019970 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010019971 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000019972 },
19973
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019974 {
19975 .vendor = "SST",
19976 .name = "SST49LF020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000019977 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019978 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000019979 .model_id = SST_SST49LF020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019980 .total_size = 256,
19981 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000019982 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner8179be52011-06-04 13:13:34 +000019983 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000019984 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000019985 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000019986 .block_erasers =
19987 {
19988 {
19989 .eraseblocks = { {4 * 1024, 64} },
19990 .block_erase = erase_sector_jedec,
19991 }, {
19992 .eraseblocks = { {16 * 1024, 16} },
19993 .block_erase = erase_block_jedec,
19994 }, {
19995 .eraseblocks = { {256 * 1024, 1} },
19996 .block_erase = NULL,
19997 }
19998 },
Sean Nelson35727f72010-01-28 23:55:12 +000019999 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020000 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020001 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020002 .prepare_access = prepare_memory_access,
20003 .finish_access = finish_memory_access,
Sven Schnellec208dfb2009-01-07 12:35:09 +000020004 },
20005
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020006 {
20007 .vendor = "SST",
20008 .name = "SST49LF020A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020009 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020010 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000020011 .model_id = SST_SST49LF020A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020012 .total_size = 256,
Carl-Daniel Hailfingerda654322009-07-23 01:44:38 +000020013 .page_size = 4 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020014 .feature_bits = FEATURE_EITHER_RESET,
Carl-Daniel Hailfingerf52f7842010-10-08 18:52:29 +000020015 .tested = TEST_OK_PRE,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020016 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000020017 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000020018 .block_erasers =
20019 {
20020 {
20021 .eraseblocks = { {4 * 1024, 64} },
20022 .block_erase = erase_sector_jedec,
20023 }, {
20024 .eraseblocks = { {16 * 1024, 16} },
20025 .block_erase = erase_block_jedec,
20026 }, {
20027 .eraseblocks = { {256 * 1024, 1} },
20028 .block_erase = NULL,
20029 }
20030 },
Sean Nelson35727f72010-01-28 23:55:12 +000020031 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020032 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020033 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020034 .prepare_access = prepare_memory_access,
20035 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020036 },
20037
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020038 {
20039 .vendor = "SST",
20040 .name = "SST49LF040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020041 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020042 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000020043 .model_id = SST_SST49LF040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020044 .total_size = 512,
20045 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000020046 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000020047 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020048 .probe = probe_jedec,
Uwe Hermann431f4f72010-09-05 12:41:25 +000020049 .probe_timing = 1, /* 150 ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000020050 .block_erasers =
20051 {
20052 {
20053 .eraseblocks = { {4 * 1024, 128} },
20054 .block_erase = erase_sector_jedec,
20055 }, {
20056 .eraseblocks = { {64 * 1024, 8} },
20057 .block_erase = erase_block_jedec,
20058 }, {
20059 .eraseblocks = { {512 * 1024, 1} },
20060 .block_erase = NULL,
20061 }
20062 },
Sean Nelson35727f72010-01-28 23:55:12 +000020063 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020064 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020065 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020066 .prepare_access = prepare_memory_access,
20067 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020068 },
20069
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020070 {
20071 .vendor = "SST",
20072 .name = "SST49LF040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020073 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020074 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000020075 .model_id = SST_SST49LF040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020076 .total_size = 512,
20077 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010020078 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000020079 .tested = TEST_OK_PREW,
Sean Nelson51c83fb2010-01-20 20:55:53 +000020080 .probe = probe_jedec,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000020081 .probe_timing = 1, /* 150ns */
Sean Nelson51c83fb2010-01-20 20:55:53 +000020082 .block_erasers =
20083 {
20084 {
20085 .eraseblocks = { {4 * 1024, 128} },
20086 .block_erase = erase_sector_jedec,
20087 }, {
20088 .eraseblocks = { {64 * 1024, 8} },
20089 .block_erase = erase_block_jedec,
20090 }, {
20091 .eraseblocks = { {512 * 1024, 1} },
20092 .block_erase = NULL,
20093 }
20094 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020095 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000020096 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020097 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020098 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010020099 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020100 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020101 },
20102
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020103 {
20104 .vendor = "SST",
20105 .name = "SST49LF080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020106 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020107 .manufacture_id = SST_ID,
Elyes HAOUAS124ef382018-03-27 12:15:09 +020020108 .model_id = SST_SST49LF080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020109 .total_size = 1024,
20110 .page_size = 4096,
Sean Nelson35727f72010-01-28 23:55:12 +000020111 .feature_bits = FEATURE_EITHER_RESET,
Brandon Dowdyf07bf322011-03-06 18:31:11 +000020112 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020113 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000020114 .probe_timing = TIMING_FIXME,
Sean Nelson51c83fb2010-01-20 20:55:53 +000020115 .block_erasers =
20116 {
20117 {
20118 .eraseblocks = { {4 * 1024, 256} },
20119 .block_erase = erase_sector_jedec,
20120 }, {
20121 .eraseblocks = { {64 * 1024, 16} },
20122 .block_erase = erase_block_jedec,
20123 }, {
20124 .eraseblocks = { {1024 * 1024, 1} },
20125 .block_erase = NULL,
20126 }
20127 },
Sean Nelson35727f72010-01-28 23:55:12 +000020128 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020129 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020130 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020131 .prepare_access = prepare_memory_access,
20132 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020133 },
20134
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020135 {
20136 .vendor = "SST",
20137 .name = "SST49LF160C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020138 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020139 .manufacture_id = SST_ID,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000020140 .model_id = SST_SST49LF160C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020141 .total_size = 2048,
20142 .page_size = 4 * 1024,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020143 .tested = TEST_OK_PR,
Carl-Daniel Hailfinger81449a22010-03-15 03:48:42 +000020144 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000020145 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (sst49lfxxxc.c) */
Sean Nelson51c83fb2010-01-20 20:55:53 +000020146 .block_erasers =
20147 {
20148 {
20149 .eraseblocks = { {4 * 1024, 512} },
20150 .block_erase = erase_sector_49lfxxxc,
20151 }, {
Stefan Tauner0554ca52013-07-25 22:54:25 +000020152 .eraseblocks = {
Sean Nelson51c83fb2010-01-20 20:55:53 +000020153 {64 * 1024, 31},
20154 {32 * 1024, 1},
20155 {8 * 1024, 2},
20156 {16 * 1024, 1},
20157 },
Sean Nelson69e58112010-03-23 17:10:28 +000020158 .block_erase = erase_block_82802ab,
Sean Nelson51c83fb2010-01-20 20:55:53 +000020159 }
20160 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020161 .printlock = printlock_regspace2_block_eraser_1,
20162 .unlock = unlock_regspace2_block_eraser_1,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000020163 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020164 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020165 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010020166 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020167 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020168 },
20169
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020170 {
20171 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020172 .name = "M29F002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020173 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020174 .manufacture_id = ST_ID,
20175 .model_id = ST_M29F002B,
20176 .total_size = 256,
20177 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020178 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020179 .tested = TEST_UNTESTED,
20180 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020181 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000020182 .block_erasers =
20183 {
20184 {
20185 .eraseblocks = {
20186 {16 * 1024, 1},
20187 {8 * 1024, 2},
20188 {32 * 1024, 1},
20189 {64 * 1024, 3},
20190 },
20191 .block_erase = erase_sector_jedec,
20192 }, {
20193 .eraseblocks = { {256 * 1024, 1} },
20194 .block_erase = erase_chip_block_jedec,
20195 }
20196 },
Sean Nelson35727f72010-01-28 23:55:12 +000020197 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020198 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020199 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010020200 .prepare_access = prepare_memory_access,
20201 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020202 },
20203
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020204 {
20205 .vendor = "ST",
20206 .name = "M29F002T/NT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020207 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020208 .manufacture_id = ST_ID,
20209 .model_id = ST_M29F002T,
20210 .total_size = 256,
20211 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020212 .feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
Stefan Taunere34e3e82013-01-01 00:06:51 +000020213 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020214 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020215 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000020216 .block_erasers =
20217 {
20218 {
20219 .eraseblocks = {
20220 {64 * 1024, 3},
20221 {32 * 1024, 1},
20222 {8 * 1024, 2},
20223 {16 * 1024, 1},
20224 },
20225 .block_erase = erase_sector_jedec,
20226 }, {
20227 .eraseblocks = { {256 * 1024, 1} },
20228 .block_erase = erase_chip_block_jedec,
20229 }
20230 },
Sean Nelson35727f72010-01-28 23:55:12 +000020231 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020232 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000020233 .voltage = {4750, 5250}, /* 4.75-5.25V for type -X, others 4.5-5.5V */
Nico Huber9eec4072023-01-12 01:17:30 +010020234 .prepare_access = prepare_memory_access,
20235 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020236 },
20237
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020238 {
20239 .vendor = "ST",
20240 .name = "M29F040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020241 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020242 .manufacture_id = ST_ID,
20243 .model_id = ST_M29F040B,
20244 .total_size = 512,
20245 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020246 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
20247 .tested = TEST_UNTESTED,
20248 .probe = probe_jedec,
David Borg204f4652010-12-04 03:26:40 +000020249 .probe_timing = TIMING_ZERO, /* datasheet specifies no timing */
Sean Nelson56358aa2010-01-19 16:08:51 +000020250 .block_erasers =
20251 {
20252 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020253 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson35727f72010-01-28 23:55:12 +000020254 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000020255 }, {
20256 .eraseblocks = { {512 * 1024, 1} },
Sean Nelson35727f72010-01-28 23:55:12 +000020257 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000020258 }
20259 },
Sean Nelson35727f72010-01-28 23:55:12 +000020260 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020261 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020262 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020263 .prepare_access = prepare_memory_access,
20264 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020265 },
20266
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020267 {
Sean Nelson35727f72010-01-28 23:55:12 +000020268 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020269 .vendor = "ST",
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020270 .name = "M29F400BB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020271 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020272 .manufacture_id = ST_ID,
20273 .model_id = ST_M29F400BB,
20274 .total_size = 512,
20275 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020276 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger79e67572010-10-13 21:49:30 +000020277 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020278 .probe = probe_jedec,
20279 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020280 .block_erasers =
20281 {
20282 {
20283 .eraseblocks = {
20284 {16 * 1024, 1},
20285 {8 * 1024, 2},
20286 {32 * 1024, 1},
20287 {64 * 1024, 7},
20288 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020289 .block_erase = erase_sector_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020290 }, {
20291 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020292 .block_erase = erase_chip_block_jedec,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020293 }
20294 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020295 .write = write_jedec_1,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020296 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020297 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020298 .prepare_access = prepare_memory_access,
20299 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020300 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100020301
Carl-Daniel Hailfinger420cf6f2010-07-16 22:07:20 +000020302 {
20303 /* FIXME: this has WORD/BYTE sequences; 2AA for word, 555 for byte */
20304 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020305 .name = "M29F400BT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020306 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020307 .manufacture_id = ST_ID,
20308 .model_id = ST_M29F400BT,
20309 .total_size = 512,
20310 .page_size = 64 * 1024,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020311 .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020312 .tested = TEST_UNTESTED,
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020313 .probe = probe_jedec,
20314 .probe_timing = 10, // FIXME: check datasheet. Using the 10 us from probe_m29f400bt
Sean Nelson56358aa2010-01-19 16:08:51 +000020315 .block_erasers =
20316 {
20317 {
20318 .eraseblocks = {
20319 {64 * 1024, 7},
20320 {32 * 1024, 1},
20321 {8 * 1024, 2},
20322 {16 * 1024, 1},
20323 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020324 .block_erase = erase_sector_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000020325 }, {
20326 .eraseblocks = { {512 * 1024, 1} },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020327 .block_erase = erase_chip_block_jedec,
Sean Nelson56358aa2010-01-19 16:08:51 +000020328 }
20329 },
Carl-Daniel Hailfingera8cf3622014-08-08 08:33:01 +000020330 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020331 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020332 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010020333 .prepare_access = prepare_memory_access,
20334 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020335 },
20336
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020337 {
20338 .vendor = "ST",
20339 .name = "M29W010B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020340 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020341 .manufacture_id = ST_ID,
20342 .model_id = ST_M29W010B,
20343 .total_size = 128,
20344 .page_size = 16 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020345 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020346 .tested = TEST_UNTESTED,
20347 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020348 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000020349 .block_erasers =
20350 {
20351 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020352 .eraseblocks = { {16 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000020353 .block_erase = erase_sector_jedec,
20354 }, {
20355 .eraseblocks = { {128 * 1024, 1} },
20356 .block_erase = erase_chip_block_jedec,
20357 }
20358 },
Sean Nelson35727f72010-01-28 23:55:12 +000020359 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020360 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020361 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020362 .prepare_access = prepare_memory_access,
20363 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020364 },
20365
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020366 {
20367 .vendor = "ST",
20368 .name = "M29W040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020369 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020370 .manufacture_id = ST_ID,
20371 .model_id = ST_M29W040B,
20372 .total_size = 512,
20373 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000020374 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020375 .tested = TEST_UNTESTED,
20376 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000020377 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000020378 .block_erasers =
20379 {
20380 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020381 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson56358aa2010-01-19 16:08:51 +000020382 .block_erase = erase_sector_jedec,
20383 }, {
20384 .eraseblocks = { {512 * 1024, 1} },
20385 .block_erase = erase_chip_block_jedec,
20386 }
20387 },
Sean Nelson35727f72010-01-28 23:55:12 +000020388 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020389 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020390 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020391 .prepare_access = prepare_memory_access,
20392 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020393 },
20394
Stefan Taunereb582572012-09-21 12:52:50 +000020395 {
20396 .vendor = "ST",
20397 .name = "M29W512B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020398 .bustype = BUS_PARALLEL,
Alan Greenfa3fcd32019-06-27 15:41:50 +100020399 .manufacture_id = ST_ID,
Stefan Taunereb582572012-09-21 12:52:50 +000020400 .model_id = ST_M29W512B,
20401 .total_size = 64,
20402 .page_size = 64 * 1024,
20403 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Stefan Tauner0554ca52013-07-25 22:54:25 +000020404 .tested = TEST_OK_PREW,
Stefan Taunereb582572012-09-21 12:52:50 +000020405 .probe = probe_jedec,
20406 .probe_timing = TIMING_ZERO,
20407 .block_erasers =
20408 {
20409 {
20410 .eraseblocks = { {64 * 1024, 1} },
20411 .block_erase = erase_chip_block_jedec,
20412 }
20413 },
20414 .write = write_jedec_1,
20415 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020416 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010020417 .prepare_access = prepare_memory_access,
20418 .finish_access = finish_memory_access,
Stefan Taunereb582572012-09-21 12:52:50 +000020419 },
Jeffrey A. Kentba7c9222010-02-01 05:49:46 +000020420
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020421 {
20422 .vendor = "ST",
20423 .name = "M50FLW040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020424 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020425 .manufacture_id = ST_ID,
20426 .model_id = ST_M50FLW040A,
20427 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000020428 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020429 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000020430 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000020431 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000020432 .block_erasers =
20433 {
20434 {
Sean Nelson329bde72010-01-19 16:39:19 +000020435 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000020436 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000020437 {64 * 1024, 5}, /* block */
20438 {4 * 1024, 16}, /* sector */
20439 {4 * 1024, 16}, /* sector */
20440 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000020441 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000020442 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000020443 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000020444 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020445 }
20446 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020447 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100020448 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020449 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020450 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020451 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020452 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020453 },
20454
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020455 {
20456 .vendor = "ST",
20457 .name = "M50FLW040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020458 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020459 .manufacture_id = ST_ID,
20460 .model_id = ST_M50FLW040B,
20461 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000020462 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020463 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000020464 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000020465 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000020466 .block_erasers =
20467 {
20468 {
Sean Nelson329bde72010-01-19 16:39:19 +000020469 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000020470 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000020471 {4 * 1024, 16}, /* sector */
20472 {64 * 1024, 5}, /* block */
20473 {4 * 1024, 16}, /* sector */
20474 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000020475 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000020476 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000020477 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000020478 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020479 }
20480 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020481 .unlock = unlock_regspace2_uniform_64k,
Alan Greenc1863ca2019-06-27 15:08:03 +100020482 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020483 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020484 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020485 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020486 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020487 },
20488
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020489 {
20490 .vendor = "ST",
20491 .name = "M50FLW080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020492 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020493 .manufacture_id = ST_ID,
20494 .model_id = ST_M50FLW080A,
20495 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000020496 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020497 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000020498 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000020499 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000020500 .block_erasers =
20501 {
20502 {
Sean Nelson329bde72010-01-19 16:39:19 +000020503 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000020504 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000020505 {64 * 1024, 13}, /* block */
20506 {4 * 1024, 16}, /* sector */
20507 {4 * 1024, 16}, /* sector */
20508 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000020509 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000020510 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000020511 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000020512 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020513 }
20514 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020515 .printlock = printlock_regspace2_block_eraser_0,
20516 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000020517 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020518 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020519 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020520 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020521 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020522 },
20523
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020524 {
20525 .vendor = "ST",
20526 .name = "M50FLW080B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020527 .bustype = BUS_FWH | BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020528 .manufacture_id = ST_ID,
20529 .model_id = ST_M50FLW080B,
20530 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000020531 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020532 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000020533 .probe = probe_82802ab,
Carl-Daniel Hailfinger08fa2f32010-01-10 01:34:00 +000020534 .probe_timing = TIMING_FIXME,
Sean Nelson56358aa2010-01-19 16:08:51 +000020535 .block_erasers =
20536 {
20537 {
Sean Nelson329bde72010-01-19 16:39:19 +000020538 .eraseblocks = {
Uwe Hermann431f4f72010-09-05 12:41:25 +000020539 {4 * 1024, 16}, /* sector */
Sean Nelson329bde72010-01-19 16:39:19 +000020540 {4 * 1024, 16}, /* sector */
20541 {64 * 1024, 13}, /* block */
20542 {4 * 1024, 16}, /* sector */
20543 },
Stefan Taunerbeaffd82013-09-12 08:29:06 +000020544 .block_erase = erase_sector_stm50,
Sean Nelson329bde72010-01-19 16:39:19 +000020545 }, {
Stefan Tauner6697f712014-08-06 15:09:15 +000020546 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000020547 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020548 }
20549 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020550 .printlock = printlock_regspace2_block_eraser_0,
20551 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000020552 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020553 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020554 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020555 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020556 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020557 },
20558
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020559 {
20560 .vendor = "ST",
20561 .name = "M50FW002",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020562 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020563 .manufacture_id = ST_ID,
20564 .model_id = ST_M50FW002,
20565 .total_size = 256,
Stefan Tauner4404f732013-09-12 08:28:56 +000020566 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020567 .tested = TEST_OK_PR,
Sean Nelson35727f72010-01-28 23:55:12 +000020568 .probe = probe_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020569 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000020570 .block_erasers =
20571 {
20572 {
20573 .eraseblocks = {
20574 {64 * 1024, 3},
20575 {32 * 1024, 1},
20576 {8 * 1024, 2},
20577 {16 * 1024, 1},
20578 },
Sean Nelson28accc22010-03-19 18:47:06 +000020579 .block_erase = erase_block_82802ab,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020580 }, {
Stefan Tauner5c316f92015-02-08 21:57:52 +000020581 .eraseblocks = { {256 * 1024, 1} },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020582 .block_erase = NULL, /* Only in A/A mux mode */
Sean Nelson56358aa2010-01-19 16:08:51 +000020583 }
20584 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020585 .printlock = printlock_regspace2_block_eraser_0,
20586 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000020587 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020588 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020589 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020590 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020591 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020592 },
20593
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020594 {
20595 .vendor = "ST",
20596 .name = "M50FW016",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020597 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020598 .manufacture_id = ST_ID,
20599 .model_id = ST_M50FW016,
20600 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000020601 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020602 .tested = TEST_UNTESTED,
20603 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000020604 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000020605 .block_erasers =
20606 {
20607 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020608 .eraseblocks = { {64 * 1024, 32} },
Sean Nelson28accc22010-03-19 18:47:06 +000020609 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020610 }
20611 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020612 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000020613 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020614 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020615 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020616 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020617 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020618 },
20619
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020620 {
20621 .vendor = "ST",
20622 .name = "M50FW040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020623 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020624 .manufacture_id = ST_ID,
20625 .model_id = ST_M50FW040,
20626 .total_size = 512,
Stefan Tauner4404f732013-09-12 08:28:56 +000020627 .page_size = 0,
Sean Nelson28accc22010-03-19 18:47:06 +000020628 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020629 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000020630 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000020631 .block_erasers =
20632 {
20633 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020634 .eraseblocks = { {64 * 1024, 8} },
Sean Nelson28accc22010-03-19 18:47:06 +000020635 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020636 }
20637 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020638 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000020639 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020640 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020641 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020642 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020643 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020644 },
20645
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020646 {
20647 .vendor = "ST",
20648 .name = "M50FW080",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020649 .bustype = BUS_FWH, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020650 .manufacture_id = ST_ID,
20651 .model_id = ST_M50FW080,
20652 .total_size = 1024,
Stefan Tauner4404f732013-09-12 08:28:56 +000020653 .page_size = 0,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020654 .tested = TEST_OK_PR,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020655 .probe = probe_82802ab,
Paul Menzelc07a41c2011-06-19 17:23:55 +000020656 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (82802ab.c) */
Sean Nelson56358aa2010-01-19 16:08:51 +000020657 .block_erasers =
20658 {
20659 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020660 .eraseblocks = { {64 * 1024, 16} },
Sean Nelson28accc22010-03-19 18:47:06 +000020661 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020662 }
20663 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020664 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson28accc22010-03-19 18:47:06 +000020665 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020666 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020667 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020668 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020669 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020670 },
20671
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020672 {
20673 .vendor = "ST",
Stefan Tauner8c4602b2013-09-12 08:29:00 +000020674 .name = "M50LPW080",
20675 .bustype = BUS_LPC, /* A/A Mux */
20676 .manufacture_id = ST_ID,
20677 .model_id = ST_M50LPW080,
20678 .total_size = 1024,
20679 .page_size = 0,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000020680 .tested = TEST_UNTESTED,
20681 .probe = probe_82802ab,
20682 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
20683 .block_erasers =
20684 {
20685 {
Stefan Tauner6697f712014-08-06 15:09:15 +000020686 .eraseblocks = { {64 * 1024, 16} },
Stefan Tauner8c4602b2013-09-12 08:29:00 +000020687 .block_erase = erase_block_82802ab,
20688 }
20689 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020690 .unlock = unlock_regspace2_uniform_64k,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000020691 .write = write_82802ab,
20692 .read = read_memmapped,
20693 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020694 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020695 .finish_access = finish_memory_access,
Stefan Tauner8c4602b2013-09-12 08:29:00 +000020696 },
20697
20698 {
20699 .vendor = "ST",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020700 .name = "M50LPW116",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000020701 .bustype = BUS_LPC, /* A/A Mux */
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020702 .manufacture_id = ST_ID,
20703 .model_id = ST_M50LPW116,
20704 .total_size = 2048,
Stefan Tauner4404f732013-09-12 08:28:56 +000020705 .page_size = 0,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020706 .tested = TEST_UNTESTED,
Sean Nelson35727f72010-01-28 23:55:12 +000020707 .probe = probe_82802ab,
Udu Ogahc04ee222009-09-05 01:31:32 +000020708 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000020709 .block_erasers =
20710 {
20711 {
20712 .eraseblocks = {
20713 {4 * 1024, 16},
20714 {64 * 1024, 30},
20715 {32 * 1024, 1},
20716 {8 * 1024, 2},
20717 {16 * 1024, 1},
20718 },
Sean Nelson28accc22010-03-19 18:47:06 +000020719 .block_erase = erase_block_82802ab,
Sean Nelson56358aa2010-01-19 16:08:51 +000020720 }
20721 },
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000020722 .printlock = printlock_regspace2_block_eraser_0,
20723 .unlock = unlock_regspace2_block_eraser_0,
Sean Nelson28accc22010-03-19 18:47:06 +000020724 .write = write_82802ab,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000020725 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000020726 .voltage = {3000, 3600}, /* Also has 12V fast program & erase */
Nico Huberb1974022023-01-12 13:13:12 +010020727 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010020728 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000020729 },
20730
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000020731 {
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030020732 .vendor = "ST",
20733 .name = "M95M02",
20734 .bustype = BUS_SPI,
20735 .manufacture_id = ST_ID,
20736 .model_id = ST_M95M02,
20737 .total_size = 256,
20738 .page_size = 256,
20739 .feature_bits = FEATURE_WRSR_WREN | FEATURE_NO_ERASE | FEATURE_ERASED_ZERO,
20740 .tested = TEST_OK_PREW,
Nico Huber54557862023-05-15 12:01:04 +020020741 .spi_cmd_set = SPI95,
Konstantin Grudnev3d8868c2019-07-23 00:48:54 +030020742 .probe = probe_spi_st95,
20743 .probe_timing = TIMING_ZERO,
20744 .block_erasers =
20745 {
20746 {
20747 .eraseblocks = { {256 * 1024, 1} },
20748 .block_erase = spi_block_erase_emulation,
20749 }
20750 },
20751
20752 .printlock = spi_prettyprint_status_register_bp1_srwd,
20753 .unlock = spi_disable_blockprotect_bp1_srwd,
20754 .write = spi_chip_write_256,
20755 .read = spi_chip_read,
20756 .voltage = {2500, 5500},
20757 },
20758
20759 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100020760 .vendor = "Sanyo",
20761 .name = "LE25FU106B",
20762 .bustype = BUS_SPI,
20763 .manufacture_id = SANYO_ID,
20764 .model_id = SANYO_LE25FU106B,
20765 .total_size = 128,
20766 .page_size = 256,
20767 .feature_bits = FEATURE_WRSR_WREN,
20768 .tested = TEST_UNTESTED,
20769 .probe = probe_spi_res2,
20770 .probe_timing = TIMING_ZERO,
20771 .block_erasers =
20772 {
20773 /* FIXME: Is this correct?
20774 {
20775 .eraseblocks = { {2 * 1024, 64} },
20776 .block_erase = spi_block_erase_d7,
20777 },*/
20778 {
20779 .eraseblocks = { {32 * 1024, 4} },
20780 .block_erase = spi_block_erase_d8,
20781 }, {
20782 .eraseblocks = { {128 * 1024, 1} },
20783 .block_erase = spi_block_erase_c7,
20784 }
20785 },
20786 .printlock = spi_prettyprint_status_register_bp1_srwd,
20787 .unlock = spi_disable_blockprotect_bp1_srwd,
20788 .write = spi_chip_write_256,
20789 .read = spi_chip_read,
20790 .voltage = {2300, 3600},
20791 },
20792
20793 {
20794 .vendor = "Sanyo",
20795 .name = "LE25FU206",
20796 .bustype = BUS_SPI,
20797 .manufacture_id = SANYO_ID,
20798 .model_id = SANYO_LE25FU206,
20799 .total_size = 256,
20800 .page_size = 256,
20801 .feature_bits = FEATURE_WRSR_WREN,
20802 .tested = TEST_UNTESTED,
20803 .probe = probe_spi_res2,
20804 .probe_timing = TIMING_ZERO,
20805 .block_erasers =
20806 {
20807 {
20808 .eraseblocks = { {4 * 1024, 64} },
20809 .block_erase = spi_block_erase_d7,
20810 }, {
20811 .eraseblocks = { {64 * 1024, 4} },
20812 .block_erase = spi_block_erase_d8,
20813 }, {
20814 .eraseblocks = { {256 * 1024, 1} },
20815 .block_erase = spi_block_erase_c7,
20816 }
20817 },
20818 .printlock = spi_prettyprint_status_register_bp1_srwd,
20819 .unlock = spi_disable_blockprotect_bp1_srwd,
20820 .write = spi_chip_write_256,
20821 .read = spi_chip_read,
20822 .voltage = {2300, 3600},
20823 },
20824
20825 {
20826 .vendor = "Sanyo",
20827 .name = "LE25FU206A",
20828 .bustype = BUS_SPI,
20829 .manufacture_id = SANYO_ID,
20830 .model_id = SANYO_LE25FU206A,
20831 .total_size = 256,
20832 .page_size = 256,
20833 .tested = TEST_UNTESTED,
20834 .probe = probe_spi_rdid,
20835 .probe_timing = TIMING_ZERO,
20836 .block_erasers =
20837 {
20838 {
20839 .eraseblocks = { {4 * 1024, 64} },
20840 .block_erase = spi_block_erase_20,
20841 }, {
20842 .eraseblocks = { {4 * 1024, 64} },
20843 .block_erase = spi_block_erase_d7,
20844 }, {
20845 .eraseblocks = { {64 * 1024, 4} },
20846 .block_erase = spi_block_erase_d8,
20847 }, {
20848 .eraseblocks = { {256 * 1024, 1} },
20849 .block_erase = spi_block_erase_60,
20850 }, {
20851 .eraseblocks = { {256 * 1024, 1} },
20852 .block_erase = spi_block_erase_c7,
20853 }
20854 },
20855 .printlock = spi_prettyprint_status_register_bp2_srwd,
20856 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
20857 .write = spi_chip_write_256,
20858 .read = spi_chip_read,
20859 .voltage = {2300, 3600},
20860 },
20861
20862 {
20863 .vendor = "Sanyo",
20864 .name = "LE25FU406B",
20865 .bustype = BUS_SPI,
20866 .manufacture_id = SANYO_ID,
20867 .model_id = SANYO_LE25FU406B,
20868 .total_size = 512,
20869 .page_size = 256,
20870 .feature_bits = FEATURE_WRSR_WREN,
20871 .tested = TEST_OK_PREW,
20872 .probe = probe_spi_res2,
20873 .probe_timing = TIMING_ZERO,
20874 .block_erasers =
20875 {
20876 {
20877 .eraseblocks = { {4 * 1024, 128} },
20878 .block_erase = spi_block_erase_d7,
20879 }, {
20880 .eraseblocks = { {64 * 1024, 8} },
20881 .block_erase = spi_block_erase_d8,
20882 }, {
20883 .eraseblocks = { {512 * 1024, 1} },
20884 .block_erase = spi_block_erase_c7,
20885 }
20886 },
20887 .printlock = spi_prettyprint_status_register_bp2_srwd,
20888 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
20889 .write = spi_chip_write_256,
20890 .read = spi_chip_read,
20891 .voltage = {2300, 3600},
20892 },
20893
20894 {
20895 .vendor = "Sanyo",
20896 .name = "LE25FU406C/LE25U40CMC",
20897 .bustype = BUS_SPI,
20898 .manufacture_id = SANYO_ID,
20899 .model_id = SANYO_LE25FU406C,
20900 .total_size = 512,
20901 .page_size = 256,
20902 .feature_bits = FEATURE_WRSR_WREN,
20903 .tested = TEST_OK_PREW,
20904 .probe = probe_spi_rdid,
20905 .probe_timing = TIMING_ZERO,
20906 .block_erasers =
20907 {
20908 {
20909 .eraseblocks = { {4 * 1024, 128} },
20910 .block_erase = spi_block_erase_20,
20911 }, {
20912 .eraseblocks = { {4 * 1024, 128} },
20913 .block_erase = spi_block_erase_d7,
20914 }, {
20915 .eraseblocks = { {64 * 1024, 8} },
20916 .block_erase = spi_block_erase_d8,
20917 }, {
20918 .eraseblocks = { {512 * 1024, 1} },
20919 .block_erase = spi_block_erase_60,
20920 }, {
20921 .eraseblocks = { {512 * 1024, 1} },
20922 .block_erase = spi_block_erase_c7,
20923 }
20924 },
20925 .printlock = spi_prettyprint_status_register_bp2_srwd,
20926 .unlock = spi_disable_blockprotect_bp2_srwd,
20927 .write = spi_chip_write_256,
20928 .read = spi_chip_read, /* Fast read (0x0B), dual read (0x3B) and dual I/O (0xBB) supported */
20929 .voltage = {2300, 3600},
20930 },
20931
20932 {
20933 .vendor = "Sanyo",
20934 .name = "LE25FW106",
20935 .bustype = BUS_SPI,
20936 .manufacture_id = SANYO_ID,
20937 .model_id = SANYO_LE25FW106,
20938 .total_size = 128,
20939 .page_size = 256,
20940 .feature_bits = FEATURE_WRSR_WREN,
20941 .tested = TEST_OK_PREW,
20942 .probe = probe_spi_res2,
20943 .probe_timing = TIMING_ZERO,
20944 .block_erasers =
20945 {
20946 {
20947 .eraseblocks = { {2 * 1024, 64} },
20948 .block_erase = spi_block_erase_d7,
20949 }, {
20950 .eraseblocks = { {32 * 1024, 4} },
20951 .block_erase = spi_block_erase_d8,
20952 }, {
20953 .eraseblocks = { {128 * 1024, 1} },
20954 .block_erase = spi_block_erase_c7,
20955 }
20956 },
20957 .printlock = spi_prettyprint_status_register_bp1_srwd, /* FIXME: Add ERSER error flag. */
20958 .unlock = spi_disable_blockprotect_bp1_srwd,
20959 .write = spi_chip_write_256,
20960 .read = spi_chip_read,
20961 .voltage = {2700, 3600},
20962 },
20963
20964 {
20965 .vendor = "Sanyo",
20966 .name = "LE25FW203A",
20967 .bustype = BUS_SPI,
20968 .manufacture_id = SANYO_ID,
20969 .model_id = SANYO_LE25FW203A,
20970 .total_size = 256,
20971 .page_size = 256,
20972 .tested = TEST_UNTESTED,
20973 .probe = probe_spi_rdid,
20974 .probe_timing = TIMING_ZERO,
20975 .block_erasers =
20976 {
20977 {
20978 .eraseblocks = { {256, 1024} },
20979 .block_erase = spi_block_erase_db,
20980 }, {
20981 .eraseblocks = { {64 * 1024, 4} },
20982 .block_erase = spi_block_erase_d8,
20983 }, {
20984 .eraseblocks = { {256 * 1024, 1} },
20985 .block_erase = spi_block_erase_c7,
20986 }
20987 },
20988 .printlock = spi_prettyprint_status_register_default_welwip,
20989 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
20990 .write = spi_chip_write_256,
20991 .read = spi_chip_read,
20992 .voltage = {2700, 3600},
20993 },
20994
20995 {
20996 .vendor = "Sanyo",
20997 .name = "LE25FW403A",
20998 .bustype = BUS_SPI,
20999 .manufacture_id = SANYO_ID,
21000 .model_id = SANYO_LE25FW403A,
21001 .total_size = 512,
21002 .page_size = 256,
21003 .tested = TEST_UNTESTED,
21004 .probe = probe_spi_rdid,
21005 .probe_timing = TIMING_ZERO,
21006 .block_erasers =
21007 {
21008 {
21009 .eraseblocks = { {256, 2 * 1024} },
21010 .block_erase = spi_block_erase_db,
21011 }, {
21012 .eraseblocks = { {64 * 1024, 8} },
21013 .block_erase = spi_block_erase_d8,
21014 }, {
21015 .eraseblocks = { {512 * 1024, 1} },
21016 .block_erase = spi_block_erase_c7,
21017 }
21018 },
21019 .printlock = spi_prettyprint_status_register_default_welwip,
21020 .unlock = NULL, /* #WP pin write-protects lower 64kB. */
21021 .write = spi_chip_write_256,
21022 .read = spi_chip_read,
21023 .voltage = {2700, 3600},
21024 },
21025
21026 {
21027 .vendor = "Sanyo",
21028 .name = "LE25FW406A",
21029 .bustype = BUS_SPI,
21030 .manufacture_id = SANYO_ID,
21031 .model_id = SANYO_LE25FW406A,
21032 .total_size = 512,
21033 .page_size = 256,
21034 .feature_bits = FEATURE_WRSR_WREN,
21035 .tested = TEST_OK_PREW,
21036 .probe = probe_spi_res2,
21037 .probe_timing = TIMING_ZERO,
21038 .block_erasers =
21039 {
21040 {
21041 .eraseblocks = { {4 * 1024, 128} },
21042 .block_erase = spi_block_erase_d7,
21043 }, {
21044 .eraseblocks = { {64 * 1024, 8} },
21045 .block_erase = spi_block_erase_d8,
21046 }, {
21047 .eraseblocks = { {512 * 1024, 1} },
21048 .block_erase = spi_block_erase_c7,
21049 }
21050 },
21051 .printlock = spi_prettyprint_status_register_plain,
21052 .unlock = spi_disable_blockprotect,
21053 .write = spi_chip_write_256,
21054 .read = spi_chip_read,
21055 .voltage = {2700, 3600},
21056 },
21057
21058 {
21059 .vendor = "Sanyo",
21060 .name = "LE25FW418A",
21061 .bustype = BUS_SPI,
21062 .manufacture_id = SANYO_ID,
21063 .model_id = SANYO_LE25FW418A,
21064 .total_size = 512,
21065 .page_size = 256,
21066 .feature_bits = FEATURE_WRSR_WREN,
21067 .tested = TEST_UNTESTED,
21068 .probe = probe_spi_res2,
21069 .probe_timing = TIMING_ZERO,
21070 .block_erasers =
21071 {
21072 {
21073 .eraseblocks = { {4 * 1024, 128} },
21074 .block_erase = spi_block_erase_d7,
21075 }, {
21076 .eraseblocks = { {64 * 1024, 8} },
21077 .block_erase = spi_block_erase_d8,
21078 }, {
21079 .eraseblocks = { {512 * 1024, 1} },
21080 .block_erase = spi_block_erase_c7,
21081 }
21082 },
21083 .printlock = spi_prettyprint_status_register_bp2_srwd,
21084 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
21085 .write = spi_chip_write_256,
21086 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
21087 .voltage = {2700, 3600},
21088 },
21089
21090 {
21091 .vendor = "Sanyo",
21092 .name = "LE25FW806",
21093 .bustype = BUS_SPI,
21094 .manufacture_id = SANYO_ID,
21095 .model_id = SANYO_LE25FW806,
21096 .total_size = 1024,
21097 .page_size = 256,
21098 .feature_bits = FEATURE_WRSR_WREN,
21099 .tested = TEST_UNTESTED,
21100 .probe = probe_spi_res2,
21101 .probe_timing = TIMING_ZERO,
21102 .block_erasers =
21103 {
21104 {
21105 .eraseblocks = { {4 * 1024, 256} },
21106 .block_erase = spi_block_erase_20,
21107 }, {
21108 .eraseblocks = { {4 * 1024, 256} },
21109 .block_erase = spi_block_erase_d7,
21110 }, {
21111 .eraseblocks = { {64 * 1024, 16} },
21112 .block_erase = spi_block_erase_d8,
21113 }, {
21114 .eraseblocks = { {1024 * 1024, 1} },
21115 .block_erase = spi_block_erase_c7,
21116 }
21117 },
21118 .printlock = spi_prettyprint_status_register_bp2_srwd,
21119 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
21120 .write = spi_chip_write_256,
21121 .read = spi_chip_read,
21122 .voltage = {2700, 3600},
21123 },
21124
21125 {
21126 .vendor = "Sanyo",
21127 .name = "LE25FW808",
21128 .bustype = BUS_SPI,
21129 .manufacture_id = SANYO_ID,
21130 .model_id = SANYO_LE25FW808,
21131 .total_size = 1024,
21132 .page_size = 256,
21133 .feature_bits = FEATURE_WRSR_WREN,
21134 .tested = TEST_UNTESTED,
21135 .probe = probe_spi_res2,
21136 .probe_timing = TIMING_ZERO,
21137 .block_erasers =
21138 {
21139 {
21140 .eraseblocks = { {8 * 1024, 128} },
21141 .block_erase = spi_block_erase_d7,
21142 }, {
21143 .eraseblocks = { {64 * 1024, 16} },
21144 .block_erase = spi_block_erase_d8,
21145 }, {
21146 .eraseblocks = { {1024 * 1024, 1} },
21147 .block_erase = spi_block_erase_c7,
21148 }
21149 },
21150 .printlock = spi_prettyprint_status_register_bp2_srwd,
21151 .unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
21152 .write = spi_chip_write_256,
21153 .read = spi_chip_read, /* some quad-read supported ("HD_READ mode") */
21154 .voltage = {2700, 3600},
21155 },
21156
21157 {
21158 .vendor = "Sharp",
21159 .name = "LH28F008BJT-BTLZ1",
21160 .bustype = BUS_PARALLEL,
21161 .manufacture_id = SHARP_ID,
21162 .model_id = SHARP_LH28F008BJ__PB,
21163 .total_size = 1024,
21164 .page_size = 64 * 1024,
21165 .tested = TEST_OK_PREW,
21166 .probe = probe_82802ab,
21167 .probe_timing = TIMING_ZERO,
21168 .block_erasers =
21169 {
21170 {
21171 .eraseblocks = {
21172 {8 * 1024, 8},
21173 {64 * 1024, 15}
21174 },
21175 .block_erase = erase_block_82802ab,
21176 }, {
21177 .eraseblocks = { {1024 * 1024, 1} },
21178 .block_erase = erase_sector_49lfxxxc,
21179 }
21180 },
21181 .unlock = unlock_lh28f008bjt,
21182 .write = write_82802ab,
21183 .read = read_memmapped,
21184 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010021185 .prepare_access = prepare_memory_access,
21186 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021187 },
21188
21189 {
21190 .vendor = "Sharp",
21191 .name = "LHF00L04",
21192 .bustype = BUS_FWH, /* A/A Mux */
21193 .manufacture_id = SHARP_ID,
21194 .model_id = SHARP_LHF00L04,
21195 .total_size = 1024,
21196 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010021197 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021198 .tested = TEST_UNTESTED,
21199 .probe = probe_82802ab,
21200 .probe_timing = TIMING_ZERO,
21201 .block_erasers =
21202 {
21203 {
21204 .eraseblocks = {
21205 {64 * 1024, 15},
21206 {8 * 1024, 8}
21207 },
21208 .block_erase = erase_block_82802ab,
21209 }, {
21210 .eraseblocks = {
21211 {1024 * 1024, 1}
21212 },
21213 .block_erase = NULL, /* 30 D0, only in A/A mux mode */
21214 },
21215 },
21216 .unlock = unlock_regspace2_uniform_64k,
21217 .write = write_82802ab,
21218 .read = read_memmapped,
21219 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010021220 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010021221 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021222 },
21223
21224 {
21225 .vendor = "Spansion",
21226 .name = "S25FL004A",
21227 .bustype = BUS_SPI,
21228 .manufacture_id = SPANSION_ID,
21229 .model_id = SPANSION_S25FL004A,
21230 .total_size = 512,
21231 .page_size = 256,
21232 .feature_bits = FEATURE_WRSR_WREN,
21233 .tested = TEST_UNTESTED,
21234 .probe = probe_spi_rdid,
21235 .probe_timing = TIMING_ZERO,
21236 .block_erasers =
21237 {
21238 {
21239 .eraseblocks = { {64 * 1024, 8} },
21240 .block_erase = spi_block_erase_d8,
21241 }, {
21242 .eraseblocks = { {512 * 1024, 1} },
21243 .block_erase = spi_block_erase_c7,
21244 }
21245 },
21246 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21247 .unlock = spi_disable_blockprotect,
21248 .write = spi_chip_write_256,
21249 .read = spi_chip_read,
21250 .voltage = {2700, 3600},
21251 },
21252
21253 {
21254 .vendor = "Spansion",
21255 .name = "S25FL008A",
21256 .bustype = BUS_SPI,
21257 .manufacture_id = SPANSION_ID,
21258 .model_id = SPANSION_S25FL008A,
21259 .total_size = 1024,
21260 .page_size = 256,
21261 .feature_bits = FEATURE_WRSR_WREN,
21262 .tested = TEST_OK_PRE,
21263 .probe = probe_spi_rdid,
21264 .probe_timing = TIMING_ZERO,
21265 .block_erasers =
21266 {
21267 {
21268 .eraseblocks = { {64 * 1024, 16} },
21269 .block_erase = spi_block_erase_d8,
21270 }, {
21271 .eraseblocks = { {1024 * 1024, 1} },
21272 .block_erase = spi_block_erase_c7,
21273 }
21274 },
21275 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21276 .unlock = spi_disable_blockprotect,
21277 .write = spi_chip_write_256,
21278 .read = spi_chip_read,
21279 .voltage = {2700, 3600},
21280 },
21281
21282 {
21283 .vendor = "Spansion",
21284 .name = "S25FL016A",
21285 .bustype = BUS_SPI,
21286 .manufacture_id = SPANSION_ID,
21287 .model_id = SPANSION_S25FL016A,
21288 .total_size = 2048,
21289 .page_size = 256,
21290 .feature_bits = FEATURE_WRSR_WREN,
21291 .tested = TEST_OK_PREW,
21292 .probe = probe_spi_rdid,
21293 .probe_timing = TIMING_ZERO,
21294 .block_erasers =
21295 {
21296 {
21297 .eraseblocks = { {64 * 1024, 32} },
21298 .block_erase = spi_block_erase_d8,
21299 }, {
21300 .eraseblocks = { {2 * 1024 * 1024, 1} },
21301 .block_erase = spi_block_erase_c7,
21302 }
21303 },
21304 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21305 .unlock = spi_disable_blockprotect,
21306 .write = spi_chip_write_256,
21307 .read = spi_chip_read,
21308 .voltage = {2700, 3600},
21309 },
21310
21311 {
21312 .vendor = "Spansion",
21313 .name = "S25FL032A/P",
21314 .bustype = BUS_SPI,
21315 .manufacture_id = SPANSION_ID,
21316 .model_id = SPANSION_S25FL032A,
21317 .total_size = 4096,
21318 .page_size = 256,
21319 .feature_bits = FEATURE_WRSR_WREN,
21320 .tested = TEST_OK_PREW,
21321 .probe = probe_spi_rdid,
21322 .probe_timing = TIMING_ZERO,
21323 .block_erasers =
21324 {
21325 {
21326 .eraseblocks = { {64 * 1024, 64} },
21327 .block_erase = spi_block_erase_d8,
21328 }, {
21329 .eraseblocks = { {4 * 1024 * 1024, 1} },
21330 .block_erase = spi_block_erase_c7,
21331 }
21332 },
21333 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21334 .unlock = spi_disable_blockprotect,
21335 .write = spi_chip_write_256,
21336 .read = spi_chip_read,
21337 .voltage = {2700, 3600},
21338 },
21339
21340 {
21341 .vendor = "Spansion",
21342 .name = "S25FL064A/P",
21343 .bustype = BUS_SPI,
21344 .manufacture_id = SPANSION_ID,
21345 .model_id = SPANSION_S25FL064A,
21346 .total_size = 8192,
21347 .page_size = 256,
21348 .feature_bits = FEATURE_WRSR_WREN,
21349 .tested = TEST_OK_PREW,
21350 .probe = probe_spi_rdid,
21351 .probe_timing = TIMING_ZERO,
21352 .block_erasers =
21353 {
21354 {
21355 .eraseblocks = { {64 * 1024, 128} },
21356 .block_erase = spi_block_erase_d8,
21357 }, {
21358 .eraseblocks = { {8 * 1024 * 1024, 1} },
21359 .block_erase = spi_block_erase_c7,
21360 }
21361 },
21362 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
21363 .unlock = spi_disable_blockprotect,
21364 .write = spi_chip_write_256,
21365 .read = spi_chip_read,
21366 .voltage = {2700, 3600},
21367 },
21368
21369 {
21370 .vendor = "Spansion",
21371 .name = "S25FL116K/S25FL216K", /* FIXME: separate them */
21372 .bustype = BUS_SPI,
21373 .manufacture_id = SPANSION_ID,
21374 .model_id = SPANSION_S25FL216,
21375 .total_size = 2048,
21376 .page_size = 256,
21377 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 (S25FL116K only) */
21378 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21379 .tested = TEST_UNTESTED,
21380 .probe = probe_spi_rdid,
21381 .probe_timing = TIMING_ZERO,
21382 .block_erasers =
21383 {
21384 {
21385 .eraseblocks = { {4 * 1024, 512} },
21386 .block_erase = spi_block_erase_20,
21387 }, {
21388 .eraseblocks = { {64 * 1024, 32} },
21389 .block_erase = spi_block_erase_d8,
21390 }, {
21391 .eraseblocks = { { 2048 * 1024, 1} },
21392 .block_erase = spi_block_erase_60,
21393 }, {
21394 .eraseblocks = { { 2048 * 1024, 1} },
21395 .block_erase = spi_block_erase_c7,
21396 }
21397 },
21398 .printlock = spi_prettyprint_status_register_bp3_srwd,
21399 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
21400 .write = spi_chip_write_256,
21401 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
21402 .voltage = {2700, 3600},
21403 },
21404
21405 {
21406 .vendor = "Spansion",
21407 .name = "S25FL127S-256kB", /* uniform 256kB sectors */
21408 .bustype = BUS_SPI,
21409 .manufacture_id = SPANSION_ID,
21410 .model_id = SPANSION_S25FL128,
21411 .total_size = 16384,
21412 .page_size = 512,
21413 /* supports 4B addressing */
21414 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
21415 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21416 .tested = TEST_UNTESTED,
21417 .probe = probe_spi_rdid,
21418 .probe_timing = TIMING_ZERO,
21419 .block_erasers =
21420 {
21421 {
21422 .eraseblocks = { {256 * 1024, 64} },
21423 .block_erase = spi_block_erase_d8,
21424 }, {
21425 .eraseblocks = { { 16384 * 1024, 1} },
21426 .block_erase = spi_block_erase_60,
21427 }, {
21428 .eraseblocks = { { 16384 * 1024, 1} },
21429 .block_erase = spi_block_erase_c7,
21430 }
21431 },
21432 .printlock = spi_prettyprint_status_register_bp2_srwd,
21433 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
21434 .write = spi_chip_write_256, /* Multi I/O supported */
21435 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21436 .voltage = {2700, 3600},
21437 },
21438
21439 {
21440 .vendor = "Spansion",
21441 .name = "S25FL127S-64kB", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
21442 .bustype = BUS_SPI,
21443 .manufacture_id = SPANSION_ID,
21444 .model_id = SPANSION_S25FL128,
21445 .total_size = 16384,
21446 .page_size = 256,
21447 /* supports 4B addressing */
21448 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
21449 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21450 .tested = TEST_OK_PREW,
21451 /* FIXME: we should distinguish the configuration on probing time like we do for AT45DB chips */
21452 .probe = probe_spi_rdid,
21453 .probe_timing = TIMING_ZERO,
21454 .block_erasers =
21455 {
21456 {
21457 /* This chip supports erasing of 32 so-called "parameter sectors" with
21458 * opcode 0x20 which may be configured to be on top or bottom of the address
21459 * space. Trying to access an address outside these 4kB blocks does have no
21460 * effect on the memory contents, e.g.
21461 .eraseblocks = {
21462 {4 * 1024, 32},
21463 {64 * 1024, 254} // inaccessible
21464 },
21465 .block_erase = spi_block_erase_20,
21466 }, { */
21467 .eraseblocks = { { 64 * 1024, 256} },
21468 .block_erase = spi_block_erase_d8,
21469 }, {
21470 .eraseblocks = { { 16384 * 1024, 1} },
21471 .block_erase = spi_block_erase_60,
21472 }, {
21473 .eraseblocks = { { 16384 * 1024, 1} },
21474 .block_erase = spi_block_erase_c7,
21475 }
21476 },
21477 .printlock = spi_prettyprint_status_register_bp2_srwd,
21478 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
21479 .write = spi_chip_write_256, /* Multi I/O supported */
21480 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21481 .voltage = {2700, 3600},
21482 },
21483
21484 {
21485 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020021486 .name = "S25FL128L",
21487 .bustype = BUS_SPI,
21488 .manufacture_id = SPANSION_ID,
21489 .model_id = SPANSION_S25FL128L,
21490 .total_size = 16384,
21491 .page_size = 256,
21492 /* 4 x 256B Security Region (OTP) */
21493 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP,
21494 .tested = TEST_UNTESTED,
21495 .probe = probe_spi_rdid,
21496 .probe_timing = TIMING_ZERO,
21497 .block_erasers =
21498 {
21499 {
21500 .eraseblocks = { {4 * 1024, 4096} },
21501 .block_erase = spi_block_erase_20,
21502 }, {
21503 .eraseblocks = { {32 * 1024, 512} },
21504 .block_erase = spi_block_erase_52,
21505 }, {
21506 .eraseblocks = { {64 * 1024, 256} },
21507 .block_erase = spi_block_erase_d8,
21508 }, {
21509 .eraseblocks = { {16384 * 1024, 1} },
21510 .block_erase = spi_block_erase_60,
21511 }, {
21512 .eraseblocks = { {16384 * 1024, 1} },
21513 .block_erase = spi_block_erase_c7,
21514 }
21515 },
21516 .printlock = spi_prettyprint_status_register_bp2_srwd,
21517 .unlock = spi_disable_blockprotect_bp2_srwd,
21518 .write = spi_chip_write_256,
21519 .read = spi_chip_read, /* Fast read (0x0B) supported */
21520 .voltage = {2700, 3600},
21521 .reg_bits =
21522 {
21523 /*
21524 * Note: This chip has a read-only Status Register 2 that is not
21525 * counted here. Registers are mapped as follows:
21526 * STATUS1 ... Status Register 1
21527 * STATUS2 ... Configuration Register 1
21528 * STATUS3 ... Configuration Register 2
21529 */
21530 .srp = {STATUS1, 7, RW},
21531 .srl = {STATUS2, 0, RW},
21532 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
21533 .tb = {STATUS1, 5, RW},
21534 .sec = {STATUS1, 6, RW},
21535 .cmp = {STATUS2, 6, RW},
21536 .wps = {STATUS3, 2, RW},
21537 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021538 .wp_write_cfg = spi_wp_write_cfg,
21539 .wp_read_cfg = spi_wp_read_cfg,
21540 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020021541 .decode_range = decode_range_spi25,
21542 },
21543
21544 {
21545 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100021546 .name = "S25FL128P......0", /* uniform 64 kB sectors */
21547 .bustype = BUS_SPI,
21548 .manufacture_id = SPANSION_ID,
21549 .model_id = SPANSION_S25FL128,
21550 .total_size = 16384,
21551 .page_size = 256,
21552 .feature_bits = FEATURE_WRSR_WREN,
21553 .tested = TEST_OK_PREW,
21554 .probe = probe_spi_rdid,
21555 .probe_timing = TIMING_ZERO,
21556 .block_erasers =
21557 {
21558 {
21559 .eraseblocks = { {64 * 1024, 256} },
21560 .block_erase = spi_block_erase_20,
21561 }, {
21562 .eraseblocks = { {64 * 1024, 256} },
21563 .block_erase = spi_block_erase_d8,
21564 }, {
21565 .eraseblocks = { { 16384 * 1024, 1} },
21566 .block_erase = spi_block_erase_60,
21567 }, {
21568 .eraseblocks = { { 16384 * 1024, 1} },
21569 .block_erase = spi_block_erase_c7,
21570 }
21571 },
21572 .printlock = spi_prettyprint_status_register_bp3_srwd,
21573 .unlock = spi_disable_blockprotect_bp3_srwd,
21574 .write = spi_chip_write_256,
21575 .read = spi_chip_read, /* Fast read (0x0B) supported */
21576 .voltage = {2700, 3600},
21577 },
21578
21579 {
21580 .vendor = "Spansion",
21581 .name = "S25FL128P......1", /* uniform 256kB sectors */
21582 .bustype = BUS_SPI,
21583 .manufacture_id = SPANSION_ID,
21584 .model_id = SPANSION_S25FL128,
21585 .total_size = 16384,
21586 .page_size = 256,
21587 .feature_bits = FEATURE_WRSR_WREN,
21588 .tested = TEST_UNTESTED,
21589 .probe = probe_spi_rdid,
21590 .probe_timing = TIMING_ZERO,
21591 .block_erasers =
21592 {
21593 {
21594 .eraseblocks = { {256 * 1024, 64} },
21595 .block_erase = spi_block_erase_d8,
21596 }, {
21597 .eraseblocks = { { 16384 * 1024, 1} },
21598 .block_erase = spi_block_erase_c7,
21599 }
21600 },
21601 .printlock = spi_prettyprint_status_register_bp2_srwd,
21602 .unlock = spi_disable_blockprotect_bp2_srwd,
21603 .write = spi_chip_write_256,
21604 .read = spi_chip_read, /* Fast read (0x0B) supported */
21605 .voltage = {2700, 3600},
21606 },
21607
21608 {
21609 .vendor = "Spansion",
21610 .name = "S25FL128S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
21611 .bustype = BUS_SPI,
21612 .manufacture_id = SPANSION_ID,
21613 .model_id = SPANSION_S25FL128,
21614 .total_size = 16384,
21615 .page_size = 256,
21616 /* supports 4B addressing */
21617 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
21618 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21619 .tested = TEST_OK_PREW,
21620 .probe = probe_spi_rdid,
21621 .probe_timing = TIMING_ZERO,
21622 .block_erasers =
21623 {
21624 {
21625 /* This chip supports erasing of the 32 so-called "parameter sectors" with
21626 * opcode 0x20. Trying to access an address outside these 4kB blocks does
21627 * have no effect on the memory contents, but sets a flag in the SR.
21628 .eraseblocks = {
21629 {4 * 1024, 32},
21630 {64 * 1024, 254} // inaccessible
21631 },
21632 .block_erase = spi_block_erase_20,
21633 }, { */
21634 .eraseblocks = { { 64 * 1024, 256} },
21635 .block_erase = spi_block_erase_d8,
21636 }, {
21637 .eraseblocks = { { 16384 * 1024, 1} },
21638 .block_erase = spi_block_erase_60,
21639 }, {
21640 .eraseblocks = { { 16384 * 1024, 1} },
21641 .block_erase = spi_block_erase_c7,
21642 }
21643 },
21644 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
21645 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
21646 .write = spi_chip_write_256, /* Multi I/O supported */
21647 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21648 .voltage = {2700, 3600},
21649 },
21650
21651 {
21652 .vendor = "Spansion",
21653 .name = "S25FL128S......1", /* uniform 256 kB sectors */
21654 .bustype = BUS_SPI,
21655 .manufacture_id = SPANSION_ID,
21656 .model_id = SPANSION_S25FL128,
21657 .total_size = 16384,
21658 .page_size = 512,
21659 /* supports 4B addressing */
21660 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
21661 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21662 .tested = TEST_UNTESTED,
21663 .probe = probe_spi_rdid,
21664 .probe_timing = TIMING_ZERO,
21665 .block_erasers =
21666 {
21667 {
21668 .eraseblocks = { {256 * 1024, 64} },
21669 .block_erase = spi_block_erase_d8,
21670 }, {
21671 .eraseblocks = { { 16384 * 1024, 1} },
21672 .block_erase = spi_block_erase_60,
21673 }, {
21674 .eraseblocks = { { 16384 * 1024, 1} },
21675 .block_erase = spi_block_erase_c7,
21676 }
21677 },
21678 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
21679 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
21680 .write = spi_chip_write_256, /* Multi I/O supported */
21681 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21682 .voltage = {2700, 3600},
21683 },
21684
21685 {
21686 .vendor = "Spansion",
21687 .name = "S25FL129P......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
21688 .bustype = BUS_SPI,
21689 .manufacture_id = SPANSION_ID,
21690 .model_id = SPANSION_S25FL128,
21691 .total_size = 16384,
21692 .page_size = 256,
21693 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
21694 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21695 .tested = TEST_OK_PREW,
21696 .probe = probe_spi_rdid,
21697 .probe_timing = TIMING_ZERO,
21698 .block_erasers =
21699 {
21700 {
21701 /* FIXME: This chip supports erasing of the 32 so-called "parameter sectors" with
21702 * opcode 0x20. Trying to access an address outside these 4kB blocks does have no
21703 * effect on the memory contents, but sets a flag in the SR.
21704 .eraseblocks = {
21705 {4 * 1024, 32},
21706 {64 * 1024, 254} // inaccessible
21707 },
21708 .block_erase = spi_block_erase_20,
21709 }, { */
21710 /* FIXME: Additionally it also supports erase opcode 40h for the respective 2*4 kB pairs
21711 .eraseblocks = {
21712 {8 * 1024, 16},
21713 {64 * 1024, 254} // inaccessible
21714 },
21715 .block_erase = spi_block_erase_40,
21716 }, { */
21717 .eraseblocks = { { 64 * 1024, 256} },
21718 .block_erase = spi_block_erase_d8,
21719 }, {
21720 .eraseblocks = { { 16384 * 1024, 1} },
21721 .block_erase = spi_block_erase_60,
21722 }, {
21723 .eraseblocks = { { 16384 * 1024, 1} },
21724 .block_erase = spi_block_erase_c7,
21725 }
21726 },
21727 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
21728 .unlock = spi_disable_blockprotect_bp2_srwd,
21729 .write = spi_chip_write_256, /* Multi I/O supported */
21730 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21731 .voltage = {2700, 3600},
21732 },
21733
21734 {
21735 .vendor = "Spansion",
21736 .name = "S25FL129P......1", /* uniform 256 kB sectors */
21737 .bustype = BUS_SPI,
21738 .manufacture_id = SPANSION_ID,
21739 .model_id = SPANSION_S25FL128,
21740 .total_size = 16384,
21741 .page_size = 256,
21742 /* OTP: 506B total, 16B reserved; read 0x4B; write 0x42 */
21743 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21744 .tested = TEST_UNTESTED,
21745 .probe = probe_spi_rdid,
21746 .probe_timing = TIMING_ZERO,
21747 .block_erasers =
21748 {
21749 {
21750 .eraseblocks = { {256 * 1024, 64} },
21751 .block_erase = spi_block_erase_d8,
21752 }, {
21753 .eraseblocks = { { 16384 * 1024, 1} },
21754 .block_erase = spi_block_erase_60,
21755 }, {
21756 .eraseblocks = { { 16384 * 1024, 1} },
21757 .block_erase = spi_block_erase_c7,
21758 }
21759 },
21760 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: Configuration register */
21761 .unlock = spi_disable_blockprotect_bp2_srwd,
21762 .write = spi_chip_write_256, /* Multi I/O supported */
21763 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21764 .voltage = {2700, 3600},
21765 },
21766
21767 {
21768 .vendor = "Spansion",
21769 .name = "S25FL132K",
21770 .bustype = BUS_SPI,
21771 .manufacture_id = SPANSION_ID,
21772 .model_id = SPANSION_S25FL132K,
21773 .total_size = 4096,
21774 .page_size = 256,
21775 /* OTP: 768B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
21776 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21777 .tested = TEST_UNTESTED,
21778 .probe = probe_spi_rdid,
21779 .probe_timing = TIMING_ZERO,
21780 .block_erasers =
21781 {
21782 {
21783 .eraseblocks = { {4 * 1024, 1024} },
21784 .block_erase = spi_block_erase_20,
21785 }, {
21786 .eraseblocks = { {64 * 1024, 64} },
21787 .block_erase = spi_block_erase_d8,
21788 }, {
21789 .eraseblocks = { { 4096 * 1024, 1} },
21790 .block_erase = spi_block_erase_60,
21791 }, {
21792 .eraseblocks = { { 4096 * 1024, 1} },
21793 .block_erase = spi_block_erase_c7,
21794 }
21795 },
21796 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
21797 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
21798 .write = spi_chip_write_256,
21799 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21800 .voltage = {2700, 3600},
21801 },
21802
21803 {
21804 .vendor = "Spansion",
21805 .name = "S25FL164K",
21806 .bustype = BUS_SPI,
21807 .manufacture_id = SPANSION_ID,
21808 .model_id = SPANSION_S25FL164K,
21809 .total_size = 8192,
21810 .page_size = 256,
21811 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44 */
21812 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
21813 .tested = TEST_OK_PREW,
21814 .probe = probe_spi_rdid,
21815 .probe_timing = TIMING_ZERO,
21816 .block_erasers =
21817 {
21818 {
21819 .eraseblocks = { {4 * 1024, 2048} },
21820 .block_erase = spi_block_erase_20,
21821 }, {
21822 .eraseblocks = { {64 * 1024, 128} },
21823 .block_erase = spi_block_erase_d8,
21824 }, {
21825 .eraseblocks = { { 8192 * 1024, 1} },
21826 .block_erase = spi_block_erase_60,
21827 }, {
21828 .eraseblocks = { { 8192 * 1024, 1} },
21829 .block_erase = spi_block_erase_c7,
21830 }
21831 },
21832 .printlock = spi_prettyprint_status_register_bp2_srwd, /* TODO: improve */
21833 .unlock = spi_disable_blockprotect_bp2_srwd, /* #WP pin write-protects SRWP bit. */
21834 .write = spi_chip_write_256,
21835 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
21836 .voltage = {2700, 3600},
21837 },
21838
21839 {
21840 .vendor = "Spansion",
21841 .name = "S25FL204K",
21842 .bustype = BUS_SPI,
21843 .manufacture_id = SPANSION_ID,
21844 .model_id = SPANSION_S25FL204,
21845 .total_size = 512,
21846 .page_size = 256,
21847 .feature_bits = FEATURE_WRSR_WREN,
21848 .tested = TEST_OK_PR,
21849 .probe = probe_spi_rdid,
21850 .probe_timing = TIMING_ZERO,
21851 .block_erasers =
21852 {
21853 {
21854 .eraseblocks = { {4 * 1024, 128} },
21855 .block_erase = spi_block_erase_20,
21856 }, {
21857 .eraseblocks = { {64 * 1024, 8} },
21858 .block_erase = spi_block_erase_d8,
21859 }, {
21860 .eraseblocks = { { 512 * 1024, 1} },
21861 .block_erase = spi_block_erase_60,
21862 }, {
21863 .eraseblocks = { { 512 * 1024, 1} },
21864 .block_erase = spi_block_erase_c7,
21865 }
21866 },
21867 .printlock = spi_prettyprint_status_register_bp3_srwd,
21868 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
21869 .write = spi_chip_write_256,
21870 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
21871 .voltage = {2700, 3600},
21872 },
21873
21874 {
21875 .vendor = "Spansion",
21876 .name = "S25FL208K",
21877 .bustype = BUS_SPI,
21878 .manufacture_id = SPANSION_ID,
21879 .model_id = SPANSION_S25FL208,
21880 .total_size = 1024,
21881 .page_size = 256,
21882 .feature_bits = FEATURE_WRSR_WREN,
21883 .tested = TEST_OK_PREW,
21884 .probe = probe_spi_rdid,
21885 .probe_timing = TIMING_ZERO,
21886 .block_erasers =
21887 {
21888 {
21889 .eraseblocks = { {4 * 1024, 256} },
21890 .block_erase = spi_block_erase_20,
21891 }, {
21892 .eraseblocks = { {64 * 1024, 16} },
21893 .block_erase = spi_block_erase_d8,
21894 }, {
21895 .eraseblocks = { { 1024 * 1024, 1} },
21896 .block_erase = spi_block_erase_60,
21897 }, {
21898 .eraseblocks = { { 1024 * 1024, 1} },
21899 .block_erase = spi_block_erase_c7,
21900 }
21901 },
21902 .printlock = spi_prettyprint_status_register_bp3_srwd,
21903 .unlock = spi_disable_blockprotect_bp3_srwd, /* #WP pin write-protects SRWP bit. */
21904 .write = spi_chip_write_256,
21905 .read = spi_chip_read, /* Fast read (0x0B) and dual I/O (0x3B) supported */
21906 .voltage = {2700, 3600},
21907 },
21908
21909 {
21910 .vendor = "Spansion",
Nico Huberfffc48d2022-05-28 14:26:06 +020021911 .name = "S25FL256L",
21912 .bustype = BUS_SPI,
21913 .manufacture_id = SPANSION_ID,
21914 .model_id = SPANSION_S25FL256L,
21915 .total_size = 32768,
21916 .page_size = 256,
21917 /* 4 x 256B Security Region (OTP) */
21918 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT3 | FEATURE_OTP |
21919 FEATURE_4BA_ENTER | FEATURE_4BA_NATIVE,
21920 .tested = TEST_UNTESTED,
21921 .probe = probe_spi_rdid,
21922 .probe_timing = TIMING_ZERO,
21923 .block_erasers =
21924 {
21925 {
21926 .eraseblocks = { {4 * 1024, 8192} },
21927 .block_erase = spi_block_erase_21,
21928 }, {
21929 .eraseblocks = { {4 * 1024, 8192} },
21930 .block_erase = spi_block_erase_20,
21931 }, {
21932 .eraseblocks = { {32 * 1024, 1024} },
21933 .block_erase = spi_block_erase_53,
21934 }, {
21935 .eraseblocks = { {32 * 1024, 1024} },
21936 .block_erase = spi_block_erase_52,
21937 }, {
21938 .eraseblocks = { {64 * 1024, 512} },
21939 .block_erase = spi_block_erase_dc,
21940 }, {
21941 .eraseblocks = { {64 * 1024, 512} },
21942 .block_erase = spi_block_erase_d8,
21943 }, {
21944 .eraseblocks = { {32768 * 1024, 1} },
21945 .block_erase = spi_block_erase_60,
21946 }, {
21947 .eraseblocks = { {32768 * 1024, 1} },
21948 .block_erase = spi_block_erase_c7,
21949 }
21950 },
21951 .printlock = spi_prettyprint_status_register_bp3_srwd,
21952 .unlock = spi_disable_blockprotect_bp3_srwd,
21953 .write = spi_chip_write_256,
21954 .read = spi_chip_read, /* Fast read (0x0B) supported */
21955 .voltage = {2700, 3600},
21956 .reg_bits =
21957 {
21958 /*
21959 * Note: This chip has a read-only Status Register 2 that is not
21960 * counted here. Registers are mapped as follows:
21961 * STATUS1 ... Status Register 1
21962 * STATUS2 ... Configuration Register 1
21963 * STATUS3 ... Configuration Register 2
21964 */
21965 .srp = {STATUS1, 7, RW},
21966 .srl = {STATUS2, 0, RW},
21967 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
21968 .tb = {STATUS1, 6, RW},
21969 .cmp = {STATUS2, 6, RW},
21970 .wps = {STATUS3, 2, RW},
21971 },
Nico Huberaabb3e02023-01-13 00:22:30 +010021972 .wp_write_cfg = spi_wp_write_cfg,
21973 .wp_read_cfg = spi_wp_read_cfg,
21974 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huberfffc48d2022-05-28 14:26:06 +020021975 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020021976 .prepare_access = spi_prepare_io,
21977 .finish_access = spi_finish_io,
Nico Huberfffc48d2022-05-28 14:26:06 +020021978 },
21979
21980 {
21981 .vendor = "Spansion",
Alan Green1f9cc7d2019-07-01 11:10:45 +100021982 .name = "S25FL256S......0", /* hybrid: 32 (top or bottom) 4 kB sub-sectors + 64 kB sectors */
21983 .bustype = BUS_SPI,
21984 .manufacture_id = SPANSION_ID,
21985 .model_id = SPANSION_S25FL256,
21986 .total_size = 32768,
21987 .page_size = 256,
21988 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber9bb8a322022-05-24 15:07:34 +020021989 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
21990 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
Alan Green1f9cc7d2019-07-01 11:10:45 +100021991 .tested = TEST_OK_PREW,
21992 .probe = probe_spi_rdid,
21993 .probe_timing = TIMING_ZERO,
21994 .block_erasers =
21995 {
21996 {
21997 /* This chip supports erasing of the 32 so-called "parameter sectors" with
21998 * opcode 0x20. Trying to access an address outside these 4kB blocks does
21999 * have no effect on the memory contents, but sets a flag in the SR.
22000 .eraseblocks = {
22001 {4 * 1024, 32},
22002 {64 * 1024, 254} // inaccessible
22003 },
22004 .block_erase = spi_block_erase_20,
22005 }, { */
22006 .eraseblocks = { { 64 * 1024, 512} },
22007 .block_erase = spi_block_erase_dc,
22008 }, {
22009 .eraseblocks = { { 64 * 1024, 512} },
22010 .block_erase = spi_block_erase_d8,
22011 }, {
22012 .eraseblocks = { { 32768 * 1024, 1} },
22013 .block_erase = spi_block_erase_60,
22014 }, {
22015 .eraseblocks = { { 32768 * 1024, 1} },
22016 .block_erase = spi_block_erase_c7,
22017 }
22018 },
22019 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
22020 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
22021 .write = spi_chip_write_256, /* Multi I/O supported */
22022 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
22023 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020022024 .prepare_access = spi_prepare_io,
22025 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022026 },
22027
22028 {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010022029 .vendor = "Spansion",
22030 .name = "S25FL512S",
22031 .bustype = BUS_SPI,
22032 .manufacture_id = SPANSION_ID,
22033 .model_id = SPANSION_S25FL512,
22034 .total_size = 65536, /* 512 Mb (=> 64 MB)) */
22035 .page_size = 256,
22036 /* OTP: 1024B total, 32B reserved; read 0x4B; write 0x42 */
Nico Huber26237922022-06-20 19:37:37 +020022037 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP |
22038 FEATURE_4BA_NATIVE | FEATURE_4BA_ENTER_EAR7 | FEATURE_4BA_EAR_1716,
22039 .tested = TEST_UNTESTED,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010022040 .probe = probe_spi_rdid,
22041 .probe_timing = TIMING_ZERO,
22042 .block_erasers =
22043 {
22044 {
22045 .eraseblocks = { { 256 * 1024, 256} },
22046 .block_erase = spi_block_erase_dc,
22047 }, {
Nico Huberbb608ff2022-05-24 15:33:26 +020022048 .eraseblocks = { { 256 * 1024, 256} },
22049 .block_erase = spi_block_erase_d8,
22050 }, {
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010022051 .eraseblocks = { { 65536 * 1024, 1} },
22052 .block_erase = spi_block_erase_60,
22053 }, {
22054 .eraseblocks = { { 65536 * 1024, 1} },
22055 .block_erase = spi_block_erase_c7,
22056 }
22057 },
22058 .printlock = spi_prettyprint_status_register_bp2_ep_srwd, /* TODO: SR2 and many others */
22059 .unlock = spi_disable_blockprotect_bp2_srwd, /* TODO: various other locks */
22060 .write = spi_chip_write_256, /* Multi I/O supported, IGNORE for now */
22061 .read = spi_chip_read, /* Fast read (0x0B) and multi I/O supported */
22062 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020022063 .prepare_access = spi_prepare_io,
22064 .finish_access = spi_finish_io,
Bernhard Urban-Forster05c629b2020-02-02 21:29:48 +010022065 },
22066
22067 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000022068 .vendor = "SyncMOS/MoselVitelic",
22069 .name = "{F,S,V}29C51001B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022070 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022071 .manufacture_id = SYNCMOS_MVC_ID,
22072 .model_id = SM_MVC_29C51001B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022073 .total_size = 128,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022074 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000022075 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022076 .tested = TEST_UNTESTED,
22077 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000022078 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000022079 .block_erasers =
22080 {
22081 {
22082 .eraseblocks = { {512, 256} },
22083 .block_erase = erase_sector_jedec,
22084 }, {
22085 .eraseblocks = { {128 * 1024, 1} },
22086 .block_erase = erase_chip_block_jedec,
22087 },
22088 },
Sean Nelson35727f72010-01-28 23:55:12 +000022089 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022090 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022091 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022092 .prepare_access = prepare_memory_access,
22093 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000022094 },
22095
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022096 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000022097 .vendor = "SyncMOS/MoselVitelic",
22098 .name = "{F,S,V}29C51001T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022099 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022100 .manufacture_id = SYNCMOS_MVC_ID,
22101 .model_id = SM_MVC_29C51001T,
22102 .total_size = 128,
22103 .page_size = 512,
Sean Nelson35727f72010-01-28 23:55:12 +000022104 .feature_bits = FEATURE_EITHER_RESET,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022105 .tested = TEST_UNTESTED,
22106 .probe = probe_jedec,
22107 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
22108 .block_erasers =
22109 {
22110 {
22111 .eraseblocks = { {512, 256} },
22112 .block_erase = erase_sector_jedec,
22113 }, {
22114 .eraseblocks = { {128 * 1024, 1} },
22115 .block_erase = erase_chip_block_jedec,
22116 },
22117 },
22118 .write = write_jedec_1,
22119 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022120 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022121 .prepare_access = prepare_memory_access,
22122 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022123 },
22124
22125 {
22126 .vendor = "SyncMOS/MoselVitelic",
22127 .name = "{F,S,V}29C51002B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022128 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022129 .manufacture_id = SYNCMOS_MVC_ID,
22130 .model_id = SM_MVC_29C51002B,
22131 .total_size = 256,
22132 .page_size = 512,
22133 .feature_bits = FEATURE_EITHER_RESET,
22134 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022135 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000022136 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000022137 .block_erasers =
22138 {
22139 {
22140 .eraseblocks = { {512, 512} },
22141 .block_erase = erase_sector_jedec,
22142 }, {
22143 .eraseblocks = { {256 * 1024, 1} },
22144 .block_erase = erase_chip_block_jedec,
22145 },
22146 },
Sean Nelson35727f72010-01-28 23:55:12 +000022147 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022148 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010022149 .prepare_access = prepare_memory_access,
22150 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000022151 },
22152
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022153 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000022154 .vendor = "SyncMOS/MoselVitelic",
22155 .name = "{F,S,V}29C51002T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022156 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022157 .manufacture_id = SYNCMOS_MVC_ID,
22158 .model_id = SM_MVC_29C51002T,
22159 .total_size = 256,
22160 .page_size = 512,
22161 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000022162 .tested = TEST_OK_PREW,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022163 .probe = probe_jedec,
22164 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
22165 .block_erasers =
22166 {
22167 {
22168 .eraseblocks = { {512, 512} },
22169 .block_erase = erase_sector_jedec,
22170 }, {
22171 .eraseblocks = { {256 * 1024, 1} },
22172 .block_erase = erase_chip_block_jedec,
22173 },
22174 },
22175 .write = write_jedec_1,
22176 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010022177 .prepare_access = prepare_memory_access,
22178 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022179 },
22180
22181 {
22182 .vendor = "SyncMOS/MoselVitelic",
22183 .name = "{F,S,V}29C51004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022184 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022185 .manufacture_id = SYNCMOS_MVC_ID,
22186 .model_id = SM_MVC_29C51004B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022187 .total_size = 512,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022188 .page_size = 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000022189 .feature_bits = FEATURE_EITHER_RESET,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022190 .tested = TEST_UNTESTED,
22191 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000022192 .probe_timing = TIMING_ZERO,
Sean Nelson56358aa2010-01-19 16:08:51 +000022193 .block_erasers =
22194 {
22195 {
Mattias Mattsson4c066502010-07-29 20:01:13 +000022196 .eraseblocks = { {1024, 512} },
22197 .block_erase = erase_sector_jedec,
22198 }, {
22199 .eraseblocks = { {512 * 1024, 1} },
22200 .block_erase = erase_chip_block_jedec,
22201 },
22202 },
22203 .write = write_jedec_1,
22204 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022205 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022206 .prepare_access = prepare_memory_access,
22207 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022208 },
22209
22210 {
22211 .vendor = "SyncMOS/MoselVitelic",
22212 .name = "{F,S,V}29C51004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022213 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022214 .manufacture_id = SYNCMOS_MVC_ID,
22215 .model_id = SM_MVC_29C51004T,
22216 .total_size = 512,
22217 .page_size = 1024,
22218 .feature_bits = FEATURE_EITHER_RESET,
22219 .tested = TEST_UNTESTED,
22220 .probe = probe_jedec,
22221 .probe_timing = TIMING_ZERO,
22222 .block_erasers =
22223 {
22224 {
22225 .eraseblocks = { {1024, 512} },
22226 .block_erase = erase_sector_jedec,
22227 }, {
22228 .eraseblocks = { {512 * 1024, 1} },
22229 .block_erase = erase_chip_block_jedec,
22230 },
22231 },
22232 .write = write_jedec_1,
22233 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022234 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022235 .prepare_access = prepare_memory_access,
22236 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022237 },
22238
22239 {
22240 .vendor = "SyncMOS/MoselVitelic",
22241 .name = "{S,V}29C31004B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022242 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022243 .manufacture_id = SYNCMOS_MVC_ID,
22244 .model_id = SM_MVC_29C31004B,
22245 .total_size = 512,
22246 .page_size = 1024,
22247 .feature_bits = FEATURE_EITHER_RESET,
22248 .tested = TEST_UNTESTED,
22249 .probe = probe_jedec,
22250 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
22251 .block_erasers =
22252 {
22253 {
22254 .eraseblocks = { {1024, 512} },
22255 .block_erase = erase_sector_jedec,
22256 }, {
22257 .eraseblocks = { {512 * 1024, 1} },
22258 .block_erase = erase_chip_block_jedec,
22259 },
22260 },
22261 .write = write_jedec_1,
22262 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022263 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010022264 .prepare_access = prepare_memory_access,
22265 .finish_access = finish_memory_access,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022266 },
22267
22268 {
22269 .vendor = "SyncMOS/MoselVitelic",
22270 .name = "{S,V}29C31004T",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022271 .bustype = BUS_PARALLEL,
Mattias Mattsson4c066502010-07-29 20:01:13 +000022272 .manufacture_id = SYNCMOS_MVC_ID,
22273 .model_id = SM_MVC_29C31004T,
22274 .total_size = 512,
22275 .page_size = 1024,
22276 .feature_bits = FEATURE_EITHER_RESET,
22277 .tested = TEST_UNTESTED,
22278 .probe = probe_jedec,
22279 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
22280 .block_erasers =
22281 {
22282 {
22283 .eraseblocks = { {1024, 512} },
Sean Nelson56358aa2010-01-19 16:08:51 +000022284 .block_erase = erase_sector_jedec,
22285 }, {
22286 .eraseblocks = { {512 * 1024, 1} },
22287 .block_erase = erase_chip_block_jedec,
22288 },
22289 },
Sean Nelson35727f72010-01-28 23:55:12 +000022290 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000022291 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022292 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010022293 .prepare_access = prepare_memory_access,
22294 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000022295 },
22296
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022297 {
Uwe Hermanna106d152009-05-27 23:17:40 +000022298 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022299 .name = "TMS29F002RB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022300 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022301 .manufacture_id = TI_OLD_ID,
22302 .model_id = TI_TMS29F002RB,
22303 .total_size = 256,
22304 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000022305 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022306 .tested = TEST_UNTESTED,
22307 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000022308 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000022309 .block_erasers =
22310 {
22311 {
22312 .eraseblocks = {
22313 {16 * 1024, 1},
22314 {8 * 1024, 2},
22315 {32 * 1024, 1},
22316 {64 * 1024, 3},
22317 },
22318 .block_erase = erase_sector_jedec,
22319 }, {
22320 .eraseblocks = { {256 * 1024, 1} },
22321 .block_erase = erase_chip_block_jedec,
22322 },
22323 },
Sean Nelson35727f72010-01-28 23:55:12 +000022324 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022325 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022326 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022327 .prepare_access = prepare_memory_access,
22328 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022329 },
22330
22331 {
Uwe Hermanna106d152009-05-27 23:17:40 +000022332 .vendor = "TI",
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022333 .name = "TMS29F002RT",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022334 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022335 .manufacture_id = TI_OLD_ID,
22336 .model_id = TI_TMS29F002RT,
22337 .total_size = 256,
22338 .page_size = 16384, /* Non-uniform sectors */
Sean Nelson35727f72010-01-28 23:55:12 +000022339 .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022340 .tested = TEST_UNTESTED,
22341 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000022342 .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
Sean Nelson56358aa2010-01-19 16:08:51 +000022343 .block_erasers =
22344 {
22345 {
22346 .eraseblocks = {
22347 {64 * 1024, 3},
22348 {32 * 1024, 1},
22349 {8 * 1024, 2},
22350 {16 * 1024, 1},
22351 },
22352 .block_erase = erase_sector_jedec,
22353 }, {
22354 .eraseblocks = { {256 * 1024, 1} },
22355 .block_erase = erase_chip_block_jedec,
22356 },
22357 },
Sean Nelson35727f72010-01-28 23:55:12 +000022358 .write = write_jedec_1,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022359 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000022360 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010022361 .prepare_access = prepare_memory_access,
22362 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger09b4fb72009-05-26 21:26:23 +000022363 },
22364
22365 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000022366 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100022367 .name = "W25P16",
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022368 .bustype = BUS_SPI,
22369 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022370 .model_id = WINBOND_NEX_W25P16,
22371 .total_size = 2048,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022372 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022373 .feature_bits = FEATURE_WRSR_WREN,
22374 .tested = TEST_UNTESTED,
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022375 .probe = probe_spi_rdid,
22376 .probe_timing = TIMING_ZERO,
22377 .block_erasers =
22378 {
22379 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100022380 .eraseblocks = { {64 * 1024, 32} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022381 .block_erase = spi_block_erase_d8,
22382 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100022383 .eraseblocks = { {2048 * 1024, 1} },
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022384 .block_erase = spi_block_erase_c7,
22385 }
22386 },
22387 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22388 .unlock = spi_disable_blockprotect,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022389 .write = spi_chip_write_256,
22390 .read = spi_chip_read, /* Fast read (0x0B) supported */
Stefan Tauner5e27b0b2014-09-09 23:03:32 +000022391 .voltage = {2700, 3600},
22392 },
22393
22394 {
22395 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100022396 .name = "W25P32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022397 .bustype = BUS_SPI,
Rudolf Marekce1c7982010-04-20 19:34:31 +000022398 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022399 .model_id = WINBOND_NEX_W25P32,
22400 .total_size = 4096,
Rudolf Marekce1c7982010-04-20 19:34:31 +000022401 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022402 .feature_bits = FEATURE_WRSR_WREN,
22403 .tested = TEST_UNTESTED,
Rudolf Marekce1c7982010-04-20 19:34:31 +000022404 .probe = probe_spi_rdid,
22405 .probe_timing = TIMING_ZERO,
22406 .block_erasers =
22407 {
22408 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100022409 .eraseblocks = { {64 * 1024, 64} },
22410 .block_erase = spi_block_erase_d8,
Rudolf Marekce1c7982010-04-20 19:34:31 +000022411 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100022412 .eraseblocks = { {4096 * 1024, 1} },
22413 .block_erase = spi_block_erase_c7,
22414 }
22415 },
22416 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22417 .unlock = spi_disable_blockprotect,
22418 .write = spi_chip_write_256,
22419 .read = spi_chip_read, /* Fast read (0x0B) supported */
22420 .voltage = {2700, 3600},
22421 },
22422
22423 {
22424 .vendor = "Winbond",
22425 .name = "W25P80",
22426 .bustype = BUS_SPI,
22427 .manufacture_id = WINBOND_NEX_ID,
22428 .model_id = WINBOND_NEX_W25P80,
22429 .total_size = 1024,
22430 .page_size = 256,
22431 .feature_bits = FEATURE_WRSR_WREN,
22432 .tested = TEST_UNTESTED,
22433 .probe = probe_spi_rdid,
22434 .probe_timing = TIMING_ZERO,
22435 .block_erasers =
22436 {
22437 {
Rudolf Marekce1c7982010-04-20 19:34:31 +000022438 .eraseblocks = { {64 * 1024, 16} },
22439 .block_erase = spi_block_erase_d8,
22440 }, {
22441 .eraseblocks = { {1024 * 1024, 1} },
Rudolf Marekce1c7982010-04-20 19:34:31 +000022442 .block_erase = spi_block_erase_c7,
22443 }
22444 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000022445 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000022446 .unlock = spi_disable_blockprotect,
Rudolf Marekce1c7982010-04-20 19:34:31 +000022447 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022448 .read = spi_chip_read, /* Fast read (0x0B) supported */
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022449 .voltage = {2700, 3600},
David Hendricksc4acec92010-06-24 11:39:57 +000022450 },
22451
22452 {
22453 .vendor = "Winbond",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022454 .name = "W25Q128.V",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000022455 .bustype = BUS_SPI,
Antony Rheneus0fbba982011-05-26 14:28:51 +000022456 .manufacture_id = WINBOND_NEX_ID,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022457 .model_id = WINBOND_NEX_W25Q128_V,
Antony Rheneus0fbba982011-05-26 14:28:51 +000022458 .total_size = 16384,
22459 .page_size = 256,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022460 /* supports SFDP */
22461 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010022462 /* QPI: only FV & JV..M versions */
Nico Huber98970632024-08-30 02:14:05 +020022463 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020022464 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Edward O'Callaghana97e3532022-12-16 15:41:05 +110022465 .tested = TEST_OK_PREWB,
Antony Rheneus0fbba982011-05-26 14:28:51 +000022466 .probe = probe_spi_rdid,
22467 .probe_timing = TIMING_ZERO,
22468 .block_erasers =
22469 {
22470 {
22471 .eraseblocks = { {4 * 1024, 4096} },
22472 .block_erase = spi_block_erase_20,
22473 }, {
22474 .eraseblocks = { {32 * 1024, 512} },
22475 .block_erase = spi_block_erase_52,
22476 }, {
22477 .eraseblocks = { {64 * 1024, 256} },
22478 .block_erase = spi_block_erase_d8,
22479 }, {
22480 .eraseblocks = { {16 * 1024 * 1024, 1} },
22481 .block_erase = spi_block_erase_60,
22482 }, {
22483 .eraseblocks = { {16 * 1024 * 1024, 1} },
22484 .block_erase = spi_block_erase_c7,
22485 }
22486 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000022487 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Antony Rheneus0fbba982011-05-26 14:28:51 +000022488 .unlock = spi_disable_blockprotect,
22489 .write = spi_chip_write_256,
22490 .read = spi_chip_read,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022491 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020022492 /* FIXME: Older versions (e.g. 25Q128BV) use WRSR_EXT and have no WPS. */
22493 .reg_bits =
22494 {
Nico Huber2133f592024-01-06 18:30:01 +010022495 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020022496 .srp = {STATUS1, 7, RW},
22497 .srl = {STATUS2, 0, RW},
22498 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
22499 .tb = {STATUS1, 5, RW},
22500 .sec = {STATUS1, 6, RW},
22501 .cmp = {STATUS2, 6, RW},
22502 .wps = {STATUS3, 2, RW},
22503 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022504 .wp_write_cfg = spi_wp_write_cfg,
22505 .wp_read_cfg = spi_wp_read_cfg,
22506 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020022507 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022508 .prepare_access = spi_prepare_io,
22509 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000022510 },
22511
22512 {
22513 .vendor = "Winbond",
Patrick Rudolph34323492018-10-04 14:59:40 +020022514 .name = "W25Q128.V..M",
22515 .bustype = BUS_SPI,
22516 .manufacture_id = WINBOND_NEX_ID,
22517 .model_id = WINBOND_NEX_W25Q128_V_M,
22518 .total_size = 16384,
22519 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010022520 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
22521 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030022522 .tested = TEST_OK_PREWB,
Patrick Rudolph34323492018-10-04 14:59:40 +020022523 .probe = probe_spi_rdid,
22524 .probe_timing = TIMING_ZERO,
22525 .block_erasers =
22526 {
22527 {
22528 .eraseblocks = { {4 * 1024, 4096} },
22529 .block_erase = spi_block_erase_20,
22530 }, {
22531 .eraseblocks = { {32 * 1024, 512} },
22532 .block_erase = spi_block_erase_52,
22533 }, {
22534 .eraseblocks = { {64 * 1024, 256} },
22535 .block_erase = spi_block_erase_d8,
22536 }, {
22537 .eraseblocks = { {16 * 1024 * 1024, 1} },
22538 .block_erase = spi_block_erase_60,
22539 }, {
22540 .eraseblocks = { {16 * 1024 * 1024, 1} },
22541 .block_erase = spi_block_erase_c7,
22542 }
22543 },
Alan Greena1fc01d2019-09-23 17:12:44 +100022544 .printlock = spi_prettyprint_status_register_plain,
Patrick Rudolph34323492018-10-04 14:59:40 +020022545 .unlock = spi_disable_blockprotect,
22546 .write = spi_chip_write_256,
22547 .read = spi_chip_read,
22548 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022549 .reg_bits =
22550 {
Nico Huber2133f592024-01-06 18:30:01 +010022551 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022552 .srp = {STATUS1, 7, RW},
22553 .srl = {STATUS2, 0, RW},
22554 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
22555 .tb = {STATUS1, 5, RW},
22556 .sec = {STATUS1, 6, RW},
22557 .cmp = {STATUS2, 6, RW},
22558 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022559 .wp_write_cfg = spi_wp_write_cfg,
22560 .wp_read_cfg = spi_wp_read_cfg,
22561 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022562 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022563 .prepare_access = spi_prepare_io,
22564 .finish_access = spi_finish_io,
Patrick Rudolph34323492018-10-04 14:59:40 +020022565 },
22566
22567 {
22568 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100022569 .name = "W25Q128.W",
22570 .bustype = BUS_SPI,
22571 .manufacture_id = WINBOND_NEX_ID,
22572 .model_id = WINBOND_NEX_W25Q128_W,
22573 .total_size = 16384,
22574 .page_size = 256,
22575 /* supports SFDP */
22576 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010022577 /* QPI: only FW & JW..M versions */
22578 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022579 .tested = TEST_OK_PREW,
22580 .probe = probe_spi_rdid,
22581 .probe_timing = TIMING_ZERO,
22582 .block_erasers =
22583 {
22584 {
22585 .eraseblocks = { {4 * 1024, 4096} },
22586 .block_erase = spi_block_erase_20,
22587 }, {
22588 .eraseblocks = { {32 * 1024, 512} },
22589 .block_erase = spi_block_erase_52,
22590 }, {
22591 .eraseblocks = { {64 * 1024, 256} },
22592 .block_erase = spi_block_erase_d8,
22593 }, {
22594 .eraseblocks = { {16 * 1024 * 1024, 1} },
22595 .block_erase = spi_block_erase_60,
22596 }, {
22597 .eraseblocks = { {16 * 1024 * 1024, 1} },
22598 .block_erase = spi_block_erase_c7,
22599 }
22600 },
22601 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22602 .unlock = spi_disable_blockprotect,
22603 .write = spi_chip_write_256,
22604 .read = spi_chip_read,
22605 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022606 .reg_bits =
22607 {
Nico Huber2133f592024-01-06 18:30:01 +010022608 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022609 .srp = {STATUS1, 7, RW},
22610 .srl = {STATUS2, 0, RW},
22611 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
22612 .tb = {STATUS1, 5, RW},
22613 .sec = {STATUS1, 6, RW},
22614 .cmp = {STATUS2, 6, RW},
22615 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022616 .wp_write_cfg = spi_wp_write_cfg,
22617 .wp_read_cfg = spi_wp_read_cfg,
22618 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022619 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022620 .prepare_access = spi_prepare_io,
22621 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022622 },
22623
22624 {
22625 .vendor = "Winbond",
Peichao Wang1a119492019-11-11 15:26:41 +080022626 .name = "W25Q128.JW.DTR",
22627 .bustype = BUS_SPI,
22628 .manufacture_id = WINBOND_NEX_ID,
22629 .model_id = WINBOND_NEX_W25Q128_DTR,
22630 .total_size = 16384,
22631 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010022632 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
22633 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Peichao Wang1a119492019-11-11 15:26:41 +080022634 .tested = TEST_OK_PREW,
22635 .probe = probe_spi_rdid,
22636 .probe_timing = TIMING_ZERO,
22637 .block_erasers =
22638 {
22639 {
22640 .eraseblocks = { {4 * 1024, 4096} },
22641 .block_erase = spi_block_erase_20,
22642 }, {
22643 .eraseblocks = { {32 * 1024, 512} },
22644 .block_erase = spi_block_erase_52,
22645 }, {
22646 .eraseblocks = { {64 * 1024, 256} },
22647 .block_erase = spi_block_erase_d8,
22648 }, {
22649 .eraseblocks = { {16 * 1024 * 1024, 1} },
22650 .block_erase = spi_block_erase_60,
22651 }, {
22652 .eraseblocks = { {16 * 1024 * 1024, 1} },
22653 .block_erase = spi_block_erase_c7,
22654 }
22655 },
22656 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22657 .unlock = spi_disable_blockprotect,
22658 .write = spi_chip_write_256,
22659 .read = spi_chip_read,
22660 .voltage = {1650, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022661 .reg_bits =
22662 {
Nico Huber2133f592024-01-06 18:30:01 +010022663 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022664 .srp = {STATUS1, 7, RW},
22665 .srl = {STATUS2, 0, RW},
22666 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
22667 .tb = {STATUS1, 5, RW},
22668 .sec = {STATUS1, 6, RW},
22669 .cmp = {STATUS2, 6, RW},
22670 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022671 .wp_write_cfg = spi_wp_write_cfg,
22672 .wp_read_cfg = spi_wp_read_cfg,
22673 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022674 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022675 .prepare_access = spi_prepare_io,
22676 .finish_access = spi_finish_io,
Peichao Wang1a119492019-11-11 15:26:41 +080022677 },
22678
22679 {
22680 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100022681 .name = "W25Q16.V",
22682 .bustype = BUS_SPI,
22683 .manufacture_id = WINBOND_NEX_ID,
22684 .model_id = WINBOND_NEX_W25Q16_V,
22685 .total_size = 2048,
22686 .page_size = 256,
22687 /* supports SFDP */
22688 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010022689 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022690 .tested = TEST_OK_PREW,
22691 .probe = probe_spi_rdid,
22692 .probe_timing = TIMING_ZERO,
22693 .block_erasers =
22694 {
22695 {
22696 .eraseblocks = { {4 * 1024, 512} },
22697 .block_erase = spi_block_erase_20,
22698 }, {
22699 .eraseblocks = { {32 * 1024, 64} },
22700 .block_erase = spi_block_erase_52,
22701 }, {
22702 .eraseblocks = { {64 * 1024, 32} },
22703 .block_erase = spi_block_erase_d8,
22704 }, {
22705 .eraseblocks = { {2 * 1024 * 1024, 1} },
22706 .block_erase = spi_block_erase_60,
22707 }, {
22708 .eraseblocks = { {2 * 1024 * 1024, 1} },
22709 .block_erase = spi_block_erase_c7,
22710 }
22711 },
Nico Huber2133f592024-01-06 18:30:01 +010022712 .reg_bits =
22713 {
22714 .qe = {STATUS2, 1, RW},
22715 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100022716 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22717 .unlock = spi_disable_blockprotect,
22718 .write = spi_chip_write_256,
22719 .read = spi_chip_read,
22720 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020022721 .prepare_access = spi_prepare_io,
22722 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022723 },
22724
22725 {
22726 .vendor = "Winbond",
Nico Huberfea6e162024-10-20 23:11:57 +020022727 .name = "W25Q16JV_M",
22728 .bustype = BUS_SPI,
22729 .manufacture_id = WINBOND_NEX_ID,
22730 .model_id = WINBOND_NEX_W25Q16JV_M,
22731 .total_size = 2048,
22732 .page_size = 256,
22733 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
22734 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
22735 FEATURE_QPI_SRP,
22736 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
22737 .tested = TEST_UNTESTED,
22738 .probe = probe_spi_rdid,
22739 .probe_timing = TIMING_ZERO,
22740 .block_erasers =
22741 {
22742 {
22743 .eraseblocks = { {4 * 1024, 512} },
22744 .block_erase = spi_block_erase_20,
22745 }, {
22746 .eraseblocks = { {32 * 1024, 64} },
22747 .block_erase = spi_block_erase_52,
22748 }, {
22749 .eraseblocks = { {64 * 1024, 32} },
22750 .block_erase = spi_block_erase_d8,
22751 }, {
22752 .eraseblocks = { {2048 * 1024, 1} },
22753 .block_erase = spi_block_erase_60,
22754 }, {
22755 .eraseblocks = { {2048 * 1024, 1} },
22756 .block_erase = spi_block_erase_c7,
22757 },
22758 },
22759 .reg_bits =
22760 {
22761 .qe = {STATUS2, 1, RW},
22762 .srp = {STATUS1, 7, RW},
22763 .srl = {STATUS2, 0, RW},
22764 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
22765 .tb = {STATUS1, 5, RW},
22766 .sec = {STATUS1, 6, RW},
22767 .cmp = {STATUS2, 6, RW},
22768 .wps = {STATUS3, 2, RW},
22769 },
22770 .wp_write_cfg = spi_wp_write_cfg,
22771 .wp_read_cfg = spi_wp_read_cfg,
22772 .wp_get_ranges = spi_wp_get_available_ranges,
22773 .decode_range = decode_range_spi25,
22774 .printlock = spi_prettyprint_status_register_bp4_srwd,
22775 .unlock = spi_disable_blockprotect_bp4_srwd,
22776 .write = spi_chip_write_256,
22777 .read = spi_chip_read,
22778 .voltage = {2700, 3600},
22779 .prepare_access = spi_prepare_io,
22780 .finish_access = spi_finish_io,
22781 },
22782
22783 {
22784 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100022785 .name = "W25Q16.W",
22786 .bustype = BUS_SPI,
22787 .manufacture_id = WINBOND_NEX_ID,
22788 .model_id = WINBOND_NEX_W25Q16_W,
22789 .total_size = 2048,
22790 .page_size = 256,
22791 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010022792 /* QPI: only FW & JW..M versions .qpi_read_params = { 2, 4, 6, 8 } */
22793 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022794 .tested = TEST_UNTESTED,
22795 .probe = probe_spi_rdid,
22796 .probe_timing = TIMING_ZERO,
22797 .block_erasers =
22798 {
22799 {
22800 .eraseblocks = { {4 * 1024, 512} },
22801 .block_erase = spi_block_erase_20,
22802 }, {
22803 .eraseblocks = { {32 * 1024, 64} },
22804 .block_erase = spi_block_erase_52,
22805 }, {
22806 .eraseblocks = { {64 * 1024, 32} },
22807 .block_erase = spi_block_erase_d8,
22808 }, {
22809 .eraseblocks = { {2 * 1024 * 1024, 1} },
22810 .block_erase = spi_block_erase_60,
22811 }, {
22812 .eraseblocks = { {2 * 1024 * 1024, 1} },
22813 .block_erase = spi_block_erase_c7,
22814 }
22815 },
Nico Huber2133f592024-01-06 18:30:01 +010022816 .reg_bits =
22817 {
22818 .qe = {STATUS2, 1, RW},
22819 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100022820 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22821 .unlock = spi_disable_blockprotect,
22822 .write = spi_chip_write_256,
22823 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010022824 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020022825 .prepare_access = spi_prepare_io,
22826 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022827 },
22828
22829 {
22830 .vendor = "Winbond",
22831 .name = "W25Q20.W",
22832 .bustype = BUS_SPI,
22833 .manufacture_id = WINBOND_NEX_ID,
22834 .model_id = WINBOND_NEX_W25Q20_W,
22835 .total_size = 256,
22836 .page_size = 256,
22837 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010022838 /* W25Q20EW: FEATURE_WRSR2 */
22839 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022840 .tested = TEST_UNTESTED,
22841 .probe = probe_spi_rdid,
22842 .probe_timing = TIMING_ZERO,
22843 .block_erasers =
22844 {
22845 {
22846 .eraseblocks = { {4 * 1024, 64} },
22847 .block_erase = spi_block_erase_20,
22848 }, {
22849 .eraseblocks = { {32 * 1024, 8} },
22850 .block_erase = spi_block_erase_52,
22851 }, {
22852 .eraseblocks = { {64 * 1024, 4} },
22853 .block_erase = spi_block_erase_d8,
22854 }, {
22855 .eraseblocks = { {256 * 1024, 1} },
22856 .block_erase = spi_block_erase_60,
22857 }, {
22858 .eraseblocks = { {256 * 1024, 1} },
22859 .block_erase = spi_block_erase_c7,
22860 }
22861 },
Nico Huber2133f592024-01-06 18:30:01 +010022862 .reg_bits =
22863 {
22864 .qe = {STATUS2, 1, RW},
22865 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100022866 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22867 .unlock = spi_disable_blockprotect,
22868 .write = spi_chip_write_256,
22869 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010022870 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020022871 .prepare_access = spi_prepare_io,
22872 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100022873 },
22874
22875 {
22876 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020022877 .name = "W25Q256FV",
Boris Baykovaa6c3742016-06-11 18:29:01 +020022878 .bustype = BUS_SPI,
22879 .manufacture_id = WINBOND_NEX_ID,
22880 .model_id = WINBOND_NEX_W25Q256_V,
22881 .total_size = 32768,
22882 .page_size = 256,
22883 /* supports SFDP */
22884 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010022885 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
22886 FEATURE_4BA_ENTER_WREN | FEATURE_4BA_EAR_C5C8 |
22887 FEATURE_4BA_READ | FEATURE_4BA_FAST_READ |
22888 FEATURE_QPI_SRP,
22889 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons3130cbd2018-09-30 19:32:30 +020022890 .tested = TEST_OK_PREW,
Boris Baykovaa6c3742016-06-11 18:29:01 +020022891 .probe = probe_spi_rdid,
22892 .probe_timing = TIMING_ZERO,
22893 .block_erasers =
22894 {
22895 {
22896 .eraseblocks = { {4 * 1024, 8192} },
Nico Huber7a077222017-10-14 18:18:30 +020022897 .block_erase = spi_block_erase_20,
Boris Baykovaa6c3742016-06-11 18:29:01 +020022898 }, {
22899 .eraseblocks = { {32 * 1024, 1024} },
Nico Huber7a077222017-10-14 18:18:30 +020022900 .block_erase = spi_block_erase_52,
Boris Baykovaa6c3742016-06-11 18:29:01 +020022901 }, {
22902 .eraseblocks = { {64 * 1024, 512} },
Nico Huber7a077222017-10-14 18:18:30 +020022903 .block_erase = spi_block_erase_d8,
Boris Baykovaa6c3742016-06-11 18:29:01 +020022904 }, {
22905 .eraseblocks = { {32 * 1024 * 1024, 1} },
22906 .block_erase = spi_block_erase_60,
22907 }, {
22908 .eraseblocks = { {32 * 1024 * 1024, 1} },
22909 .block_erase = spi_block_erase_c7,
22910 }
22911 },
22912 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22913 .unlock = spi_disable_blockprotect,
22914 .write = spi_chip_write_256,
22915 .read = spi_chip_read,
22916 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022917 .reg_bits =
22918 {
Nico Huber2133f592024-01-06 18:30:01 +010022919 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022920 .srp = {STATUS1, 7, RW},
22921 .srl = {STATUS2, 0, RW},
22922 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
22923 .tb = {STATUS1, 6, RW},
22924 .cmp = {STATUS2, 6, RW},
22925 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022926 .wp_write_cfg = spi_wp_write_cfg,
22927 .wp_read_cfg = spi_wp_read_cfg,
22928 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110022929 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022930 .prepare_access = spi_prepare_io,
22931 .finish_access = spi_finish_io,
Boris Baykovaa6c3742016-06-11 18:29:01 +020022932 },
22933
22934 {
22935 .vendor = "Winbond",
Nico Huber5215eab2022-05-23 15:13:07 +020022936 .name = "W25Q256JV_Q",
22937 .bustype = BUS_SPI,
22938 .manufacture_id = WINBOND_NEX_ID,
22939 .model_id = WINBOND_NEX_W25Q256_V,
22940 .total_size = 32768,
22941 .page_size = 256,
22942 /* supports SFDP */
22943 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010022944 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Nico Huberddfbbe82023-12-21 16:31:27 +010022945 .tested = TEST_OK_PREW,
Nico Huber5215eab2022-05-23 15:13:07 +020022946 .probe = probe_spi_rdid,
22947 .probe_timing = TIMING_ZERO,
22948 .block_erasers =
22949 {
22950 {
22951 .eraseblocks = { {4 * 1024, 8192} },
22952 .block_erase = spi_block_erase_21,
22953 }, {
22954 .eraseblocks = { {4 * 1024, 8192} },
22955 .block_erase = spi_block_erase_20,
22956 }, {
22957 .eraseblocks = { {32 * 1024, 1024} },
22958 .block_erase = spi_block_erase_52,
22959 }, {
22960 .eraseblocks = { {64 * 1024, 512} },
22961 .block_erase = spi_block_erase_dc,
22962 }, {
22963 .eraseblocks = { {64 * 1024, 512} },
22964 .block_erase = spi_block_erase_d8,
22965 }, {
22966 .eraseblocks = { {32 * 1024 * 1024, 1} },
22967 .block_erase = spi_block_erase_60,
22968 }, {
22969 .eraseblocks = { {32 * 1024 * 1024, 1} },
22970 .block_erase = spi_block_erase_c7,
22971 }
22972 },
22973 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
22974 .unlock = spi_disable_blockprotect,
22975 .write = spi_chip_write_256,
22976 .read = spi_chip_read,
22977 .voltage = {2700, 3600},
22978 .reg_bits =
22979 {
Nico Huber2133f592024-01-06 18:30:01 +010022980 .qe = {STATUS2, 1, RW},
Nico Huber5215eab2022-05-23 15:13:07 +020022981 .srp = {STATUS1, 7, RW},
22982 .srl = {STATUS2, 0, RW},
22983 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
22984 .tb = {STATUS1, 6, RW},
22985 .cmp = {STATUS2, 6, RW},
22986 },
Nico Huberaabb3e02023-01-13 00:22:30 +010022987 .wp_write_cfg = spi_wp_write_cfg,
22988 .wp_read_cfg = spi_wp_read_cfg,
22989 .wp_get_ranges = spi_wp_get_available_ranges,
Nico Huber5215eab2022-05-23 15:13:07 +020022990 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020022991 .prepare_access = spi_prepare_io,
22992 .finish_access = spi_finish_io,
Nico Huber5215eab2022-05-23 15:13:07 +020022993 },
22994
22995 {
22996 .vendor = "Winbond",
David Hendricks49876792018-10-27 20:19:42 +000022997 .name = "W25Q256JV_M",
22998 .bustype = BUS_SPI,
22999 .manufacture_id = WINBOND_NEX_ID,
23000 .model_id = WINBOND_NEX_W25Q256JV_M,
23001 .total_size = 32768,
23002 .page_size = 256,
23003 /* supports SFDP */
23004 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023005 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
23006 FEATURE_4BA | FEATURE_QPI_SRP,
23007 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
David Hendricks49876792018-10-27 20:19:42 +000023008 .tested = TEST_OK_PREW,
23009 .probe = probe_spi_rdid,
23010 .probe_timing = TIMING_ZERO,
23011 .block_erasers =
23012 {
23013 {
23014 .eraseblocks = { {4 * 1024, 8192} },
23015 .block_erase = spi_block_erase_21,
23016 }, {
23017 .eraseblocks = { {4 * 1024, 8192} },
23018 .block_erase = spi_block_erase_20,
23019 }, {
23020 .eraseblocks = { {32 * 1024, 1024} },
23021 .block_erase = spi_block_erase_52,
23022 }, {
23023 .eraseblocks = { {64 * 1024, 512} },
23024 .block_erase = spi_block_erase_dc,
23025 }, {
23026 .eraseblocks = { {64 * 1024, 512} },
23027 .block_erase = spi_block_erase_d8,
23028 }, {
23029 .eraseblocks = { {32 * 1024 * 1024, 1} },
23030 .block_erase = spi_block_erase_60,
23031 }, {
23032 .eraseblocks = { {32 * 1024 * 1024, 1} },
23033 .block_erase = spi_block_erase_c7,
23034 }
23035 },
23036 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23037 .unlock = spi_disable_blockprotect,
23038 .write = spi_chip_write_256,
23039 .read = spi_chip_read,
23040 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110023041 .reg_bits =
23042 {
Nico Huber2133f592024-01-06 18:30:01 +010023043 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110023044 .srp = {STATUS1, 7, RW},
23045 .srl = {STATUS2, 0, RW},
23046 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
23047 .tb = {STATUS1, 6, RW},
23048 .cmp = {STATUS2, 6, RW},
23049 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023050 .wp_write_cfg = spi_wp_write_cfg,
23051 .wp_read_cfg = spi_wp_read_cfg,
23052 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110023053 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023054 .prepare_access = spi_prepare_io,
23055 .finish_access = spi_finish_io,
David Hendricks49876792018-10-27 20:19:42 +000023056 },
23057
23058 {
23059 .vendor = "Winbond",
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020023060 .name = "W25Q256JW",
el-coderon01209852020-04-29 12:12:53 +020023061 .bustype = BUS_SPI,
23062 .manufacture_id = WINBOND_NEX_ID,
23063 .model_id = WINBOND_NEX_W25Q256_W,
23064 .total_size = 32768,
23065 .page_size = 256,
23066 /* supports SFDP */
23067 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023068 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
23069 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
el-coderon01209852020-04-29 12:12:53 +020023070 .tested = TEST_OK_PREW,
23071 .probe = probe_spi_rdid,
23072 .probe_timing = TIMING_ZERO,
23073 .block_erasers =
23074 {
23075 {
23076 .eraseblocks = { {4 * 1024, 8192} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020023077 .block_erase = spi_block_erase_21,
23078 }, {
23079 .eraseblocks = { {4 * 1024, 8192} },
el-coderon01209852020-04-29 12:12:53 +020023080 .block_erase = spi_block_erase_20,
23081 }, {
23082 .eraseblocks = { {32 * 1024, 1024} },
23083 .block_erase = spi_block_erase_52,
23084 }, {
23085 .eraseblocks = { {64 * 1024, 512} },
Patrick Rudolph8f5bd982020-08-26 09:15:53 +020023086 .block_erase = spi_block_erase_dc,
23087 }, {
23088 .eraseblocks = { {64 * 1024, 512} },
el-coderon01209852020-04-29 12:12:53 +020023089 .block_erase = spi_block_erase_d8,
23090 }, {
23091 .eraseblocks = { {32 * 1024 * 1024, 1} },
23092 .block_erase = spi_block_erase_60,
23093 }, {
23094 .eraseblocks = { {32 * 1024 * 1024, 1} },
23095 .block_erase = spi_block_erase_c7,
23096 }
23097 },
Nico Huber2133f592024-01-06 18:30:01 +010023098 .reg_bits =
23099 {
23100 .qe = {STATUS2, 1, RW},
23101 },
el-coderon01209852020-04-29 12:12:53 +020023102 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23103 .unlock = spi_disable_blockprotect,
23104 .write = spi_chip_write_256,
23105 .read = spi_chip_read,
23106 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020023107 .prepare_access = spi_prepare_io,
23108 .finish_access = spi_finish_io,
el-coderon01209852020-04-29 12:12:53 +020023109 },
23110
23111 {
23112 .vendor = "Winbond",
David Hendricks31532602020-08-16 17:14:56 -070023113 .name = "W25Q256JW_DTR",
23114 .bustype = BUS_SPI,
23115 .manufacture_id = WINBOND_NEX_ID,
23116 .model_id = WINBOND_NEX_W25Q256_DTR,
23117 .total_size = 32768,
23118 .page_size = 256,
23119 /* supports SFDP */
23120 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023121 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
23122 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
23123 .dummy_cycles =
23124 {
23125 .qpi_read_params = {
23126 2, /* Datasheet Rev.K says 4 is the default, though.
23127 Will assume that the text is wrong, if not,
23128 we'll know why it doesn't work. */
23129 4, 6, 8
23130 },
23131 },
Kapil Porwal111c3802022-12-09 19:41:27 +053023132 .tested = TEST_OK_PREWB,
David Hendricks31532602020-08-16 17:14:56 -070023133 .probe = probe_spi_rdid,
23134 .probe_timing = TIMING_ZERO,
23135 .block_erasers =
23136 {
23137 {
23138 .eraseblocks = { {4 * 1024, 8192} },
23139 .block_erase = spi_block_erase_21,
23140 }, {
23141 .eraseblocks = { {4 * 1024, 8192} },
23142 .block_erase = spi_block_erase_20,
23143 }, {
23144 .eraseblocks = { {32 * 1024, 1024} },
23145 .block_erase = spi_block_erase_52,
23146 }, {
23147 .eraseblocks = { {64 * 1024, 512} },
23148 .block_erase = spi_block_erase_dc,
23149 }, {
23150 .eraseblocks = { {64 * 1024, 512} },
23151 .block_erase = spi_block_erase_d8,
23152 }, {
23153 .eraseblocks = { {32 * 1024 * 1024, 1} },
23154 .block_erase = spi_block_erase_60,
23155 }, {
23156 .eraseblocks = { {32 * 1024 * 1024, 1} },
23157 .block_erase = spi_block_erase_c7,
23158 }
23159 },
23160 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23161 .unlock = spi_disable_blockprotect,
23162 .write = spi_chip_write_256,
23163 .read = spi_chip_read,
23164 .voltage = {1700, 1950},
Kapil Porwal111c3802022-12-09 19:41:27 +053023165 .reg_bits =
23166 {
Nico Huber2133f592024-01-06 18:30:01 +010023167 .qe = {STATUS2, 1, RW},
Kapil Porwal111c3802022-12-09 19:41:27 +053023168 .srp = {STATUS1, 7, RW},
23169 .srl = {STATUS2, 0, RW},
23170 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
23171 .tb = {STATUS1, 6, RW},
23172 .cmp = {STATUS2, 6, RW},
23173 .wps = {STATUS3, 2, RW},
23174 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023175 .wp_write_cfg = spi_wp_write_cfg,
23176 .wp_read_cfg = spi_wp_read_cfg,
23177 .wp_get_ranges = spi_wp_get_available_ranges,
Kapil Porwal111c3802022-12-09 19:41:27 +053023178 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023179 .prepare_access = spi_prepare_io,
23180 .finish_access = spi_finish_io,
David Hendricks31532602020-08-16 17:14:56 -070023181 },
23182
23183 {
23184 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023185 .name = "W25Q32BV/W25Q32CV/W25Q32DV",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023186 .bustype = BUS_SPI,
23187 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023188 .model_id = WINBOND_NEX_W25Q32_V,
23189 .total_size = 4096,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023190 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023191 /* supports SFDP */
23192 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023193 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023194 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023195 .probe = probe_spi_rdid,
23196 .probe_timing = TIMING_ZERO,
23197 .block_erasers =
23198 {
23199 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023200 .eraseblocks = { {4 * 1024, 1024} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023201 .block_erase = spi_block_erase_20,
23202 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023203 .eraseblocks = { {32 * 1024, 128} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023204 .block_erase = spi_block_erase_52,
23205 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023206 .eraseblocks = { {64 * 1024, 64} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023207 .block_erase = spi_block_erase_d8,
23208 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023209 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023210 .block_erase = spi_block_erase_60,
23211 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023212 .eraseblocks = { {4 * 1024 * 1024, 1} },
23213 .block_erase = spi_block_erase_c7,
23214 }
23215 },
23216 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23217 .unlock = spi_disable_blockprotect,
23218 .write = spi_chip_write_256,
23219 .read = spi_chip_read,
23220 .voltage = {2700, 3600},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023221 .reg_bits =
23222 {
Nico Huber2133f592024-01-06 18:30:01 +010023223 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023224 .srp = {STATUS1, 7, RW},
23225 .srl = {STATUS2, 0, RW},
23226 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23227 .tb = {STATUS1, 5, RW},
23228 .sec = {STATUS1, 6, RW},
23229 .cmp = {STATUS2, 6, RW},
23230 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023231 .wp_write_cfg = spi_wp_write_cfg,
23232 .wp_read_cfg = spi_wp_read_cfg,
23233 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023234 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023235 .prepare_access = spi_prepare_io,
23236 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023237 },
23238
23239 {
23240 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023241 .name = "W25Q32FV",
23242 .bustype = BUS_SPI,
23243 .manufacture_id = WINBOND_NEX_ID,
23244 .model_id = WINBOND_NEX_W25Q32_V,
23245 .total_size = 4096,
23246 .page_size = 256,
23247 /* supports SFDP */
23248 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010023249 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023250 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010023251 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023252 .tested = TEST_OK_PREW,
23253 .probe = probe_spi_rdid,
23254 .probe_timing = TIMING_ZERO,
23255 .block_erasers =
23256 {
23257 {
23258 .eraseblocks = { {4 * 1024, 1024} },
23259 .block_erase = spi_block_erase_20,
23260 }, {
23261 .eraseblocks = { {32 * 1024, 128} },
23262 .block_erase = spi_block_erase_52,
23263 }, {
23264 .eraseblocks = { {64 * 1024, 64} },
23265 .block_erase = spi_block_erase_d8,
23266 }, {
23267 .eraseblocks = { {4 * 1024 * 1024, 1} },
23268 .block_erase = spi_block_erase_60,
23269 }, {
23270 .eraseblocks = { {4 * 1024 * 1024, 1} },
23271 .block_erase = spi_block_erase_c7,
23272 }
23273 },
23274 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23275 .unlock = spi_disable_blockprotect,
23276 .write = spi_chip_write_256,
23277 .read = spi_chip_read,
23278 .voltage = {2700, 3600},
23279 .reg_bits =
23280 {
Nico Huber2133f592024-01-06 18:30:01 +010023281 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023282 .srp = {STATUS1, 7, RW},
23283 .srl = {STATUS2, 0, RW},
23284 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23285 .tb = {STATUS1, 5, RW},
23286 .sec = {STATUS1, 6, RW},
23287 .cmp = {STATUS2, 6, RW},
23288 .wps = {STATUS3, 2, RW},
23289 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023290 .wp_write_cfg = spi_wp_write_cfg,
23291 .wp_read_cfg = spi_wp_read_cfg,
23292 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023293 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023294 .prepare_access = spi_prepare_io,
23295 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023296 },
23297
23298 {
23299 .vendor = "Winbond",
23300 .name = "W25Q32JV",
23301 .bustype = BUS_SPI,
23302 .manufacture_id = WINBOND_NEX_ID,
23303 .model_id = WINBOND_NEX_W25Q32_V,
23304 .total_size = 4096,
23305 .page_size = 256,
23306 /* supports SFDP */
23307 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023308 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023309 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
23310 .tested = TEST_OK_PREW,
23311 .probe = probe_spi_rdid,
23312 .probe_timing = TIMING_ZERO,
23313 .block_erasers =
23314 {
23315 {
23316 .eraseblocks = { {4 * 1024, 1024} },
23317 .block_erase = spi_block_erase_20,
23318 }, {
23319 .eraseblocks = { {32 * 1024, 128} },
23320 .block_erase = spi_block_erase_52,
23321 }, {
23322 .eraseblocks = { {64 * 1024, 64} },
23323 .block_erase = spi_block_erase_d8,
23324 }, {
23325 .eraseblocks = { {4 * 1024 * 1024, 1} },
23326 .block_erase = spi_block_erase_60,
23327 }, {
23328 .eraseblocks = { {4 * 1024 * 1024, 1} },
23329 .block_erase = spi_block_erase_c7,
23330 }
23331 },
23332 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23333 .unlock = spi_disable_blockprotect,
23334 .write = spi_chip_write_256,
23335 .read = spi_chip_read,
23336 .voltage = {2700, 3600},
23337 .reg_bits =
23338 {
Nico Huber2133f592024-01-06 18:30:01 +010023339 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023340 .srp = {STATUS1, 7, RW},
23341 .srl = {STATUS2, 0, RW},
23342 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23343 .tb = {STATUS1, 5, RW},
23344 .sec = {STATUS1, 6, RW},
23345 .cmp = {STATUS2, 6, RW},
23346 .wps = {STATUS3, 2, RW},
23347 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023348 .wp_write_cfg = spi_wp_write_cfg,
23349 .wp_read_cfg = spi_wp_read_cfg,
23350 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023351 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023352 .prepare_access = spi_prepare_io,
23353 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023354 },
23355
23356 {
23357 .vendor = "Winbond",
Angel Pons0d4354e2024-05-26 16:33:51 +020023358 .name = "W25Q32JV-.M",
23359 .bustype = BUS_SPI,
23360 .manufacture_id = WINBOND_NEX_ID,
23361 .model_id = WINBOND_NEX_W25Q32JV,
23362 .total_size = 4096,
23363 .page_size = 256,
23364 /* supports SFDP */
Nico Huber1412d9f2024-01-06 18:25:49 +010023365 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Angel Pons0d4354e2024-05-26 16:33:51 +020023366 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010023367 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Angel Pons0d4354e2024-05-26 16:33:51 +020023368 .tested = TEST_OK_PREW,
23369 .probe = probe_spi_rdid,
23370 .probe_timing = TIMING_ZERO,
23371 .block_erasers =
23372 {
23373 {
23374 .eraseblocks = { {4 * 1024, 1024} },
23375 .block_erase = spi_block_erase_20,
23376 }, {
23377 .eraseblocks = { {32 * 1024, 128} },
23378 .block_erase = spi_block_erase_52,
23379 }, {
23380 .eraseblocks = { {64 * 1024, 64} },
23381 .block_erase = spi_block_erase_d8,
23382 }, {
23383 .eraseblocks = { {4 * 1024 * 1024, 1} },
23384 .block_erase = spi_block_erase_60,
23385 }, {
23386 .eraseblocks = { {4 * 1024 * 1024, 1} },
23387 .block_erase = spi_block_erase_c7,
23388 }
23389 },
23390 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
23391 .unlock = spi_disable_blockprotect_bp2_srwd,
23392 .write = spi_chip_write_256,
23393 .read = spi_chip_read,
23394 .voltage = {2700, 3600},
23395 .reg_bits =
23396 {
Nico Huber2133f592024-01-06 18:30:01 +010023397 .qe = {STATUS2, 1, RW},
Angel Pons0d4354e2024-05-26 16:33:51 +020023398 .srp = {STATUS1, 7, RW},
23399 .srl = {STATUS2, 0, RW},
23400 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23401 .tb = {STATUS1, 5, RW},
23402 .sec = {STATUS1, 6, RW},
23403 .cmp = {STATUS2, 6, RW},
23404 .wps = {STATUS3, 2, RW},
23405 },
23406 .wp_write_cfg = spi_wp_write_cfg,
23407 .wp_read_cfg = spi_wp_read_cfg,
23408 .wp_get_ranges = spi_wp_get_available_ranges,
23409 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023410 .prepare_access = spi_prepare_io,
23411 .finish_access = spi_finish_io,
Angel Pons0d4354e2024-05-26 16:33:51 +020023412 },
23413
23414 {
23415 .vendor = "Winbond",
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023416 .name = "W25Q32BW/W25Q32CW/W25Q32DW",
Alan Green1f9cc7d2019-07-01 11:10:45 +100023417 .bustype = BUS_SPI,
23418 .manufacture_id = WINBOND_NEX_ID,
23419 .model_id = WINBOND_NEX_W25Q32_W,
23420 .total_size = 4096,
23421 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023422 /* OTP: 1024B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010023423 /* QPI: only DW version */
23424 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023425 .tested = TEST_OK_PREW,
23426 .probe = probe_spi_rdid,
23427 .probe_timing = TIMING_ZERO,
23428 .block_erasers =
23429 {
23430 {
23431 .eraseblocks = { {4 * 1024, 1024} },
23432 .block_erase = spi_block_erase_20,
23433 }, {
23434 .eraseblocks = { {32 * 1024, 128} },
23435 .block_erase = spi_block_erase_52,
23436 }, {
23437 .eraseblocks = { {64 * 1024, 64} },
23438 .block_erase = spi_block_erase_d8,
23439 }, {
23440 .eraseblocks = { {4 * 1024 * 1024, 1} },
23441 .block_erase = spi_block_erase_60,
23442 }, {
23443 .eraseblocks = { {4 * 1024 * 1024, 1} },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023444 .block_erase = spi_block_erase_c7,
23445 }
23446 },
23447 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23448 .unlock = spi_disable_blockprotect,
23449 .write = spi_chip_write_256,
23450 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010023451 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023452 .reg_bits =
23453 {
Nico Huber2133f592024-01-06 18:30:01 +010023454 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023455 .srp = {STATUS1, 7, RW},
23456 .srl = {STATUS2, 0, RW},
23457 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23458 .tb = {STATUS1, 5, RW},
23459 .sec = {STATUS1, 6, RW},
23460 .cmp = {STATUS2, 6, RW},
23461 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023462 .wp_write_cfg = spi_wp_write_cfg,
23463 .wp_read_cfg = spi_wp_read_cfg,
23464 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023465 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023466 .prepare_access = spi_prepare_io,
23467 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023468 },
23469
23470 {
23471 .vendor = "Winbond",
23472 .name = "W25Q32FW",
23473 .bustype = BUS_SPI,
23474 .manufacture_id = WINBOND_NEX_ID,
23475 .model_id = WINBOND_NEX_W25Q32_W,
23476 .total_size = 4096,
23477 .page_size = 256,
23478 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010023479 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023480 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Nico Huber1412d9f2024-01-06 18:25:49 +010023481 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023482 .tested = TEST_OK_PREW,
23483 .probe = probe_spi_rdid,
23484 .probe_timing = TIMING_ZERO,
23485 .block_erasers =
23486 {
23487 {
23488 .eraseblocks = { {4 * 1024, 1024} },
23489 .block_erase = spi_block_erase_20,
23490 }, {
23491 .eraseblocks = { {32 * 1024, 128} },
23492 .block_erase = spi_block_erase_52,
23493 }, {
23494 .eraseblocks = { {64 * 1024, 64} },
23495 .block_erase = spi_block_erase_d8,
23496 }, {
23497 .eraseblocks = { {4 * 1024 * 1024, 1} },
23498 .block_erase = spi_block_erase_60,
23499 }, {
23500 .eraseblocks = { {4 * 1024 * 1024, 1} },
23501 .block_erase = spi_block_erase_c7,
23502 }
23503 },
23504 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23505 .unlock = spi_disable_blockprotect,
23506 .write = spi_chip_write_256,
23507 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010023508 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023509 .reg_bits =
23510 {
Nico Huber2133f592024-01-06 18:30:01 +010023511 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023512 .srp = {STATUS1, 7, RW},
23513 .srl = {STATUS2, 0, RW},
23514 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23515 .tb = {STATUS1, 5, RW},
23516 .sec = {STATUS1, 6, RW},
23517 .cmp = {STATUS2, 6, RW},
23518 .wps = {STATUS3, 2, RW},
23519 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023520 .wp_write_cfg = spi_wp_write_cfg,
23521 .wp_read_cfg = spi_wp_read_cfg,
23522 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023523 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023524 .prepare_access = spi_prepare_io,
23525 .finish_access = spi_finish_io,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023526 },
23527
23528 {
23529 .vendor = "Winbond",
23530 .name = "W25Q32JW...Q",
23531 .bustype = BUS_SPI,
23532 .manufacture_id = WINBOND_NEX_ID,
23533 .model_id = WINBOND_NEX_W25Q32_W,
23534 .total_size = 4096,
23535 .page_size = 256,
23536 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
23537 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010023538 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023539 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
23540 .tested = TEST_OK_PREW,
23541 .probe = probe_spi_rdid,
23542 .probe_timing = TIMING_ZERO,
23543 .block_erasers =
23544 {
23545 {
23546 .eraseblocks = { {4 * 1024, 1024} },
23547 .block_erase = spi_block_erase_20,
23548 }, {
23549 .eraseblocks = { {32 * 1024, 128} },
23550 .block_erase = spi_block_erase_52,
23551 }, {
23552 .eraseblocks = { {64 * 1024, 64} },
23553 .block_erase = spi_block_erase_d8,
23554 }, {
23555 .eraseblocks = { {4 * 1024 * 1024, 1} },
23556 .block_erase = spi_block_erase_60,
23557 }, {
23558 .eraseblocks = { {4 * 1024 * 1024, 1} },
23559 .block_erase = spi_block_erase_c7,
23560 }
23561 },
23562 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23563 .unlock = spi_disable_blockprotect,
23564 .write = spi_chip_write_256,
23565 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010023566 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023567 .reg_bits =
23568 {
Nico Huber37e07a82025-02-26 23:26:59 +010023569 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023570 .srp = {STATUS1, 7, RW},
23571 .srl = {STATUS2, 0, RW},
23572 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23573 .tb = {STATUS1, 5, RW},
23574 .sec = {STATUS1, 6, RW},
23575 .cmp = {STATUS2, 6, RW},
23576 .wps = {STATUS3, 2, RW},
23577 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023578 .wp_write_cfg = spi_wp_write_cfg,
23579 .wp_read_cfg = spi_wp_read_cfg,
23580 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023581 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023582 .prepare_access = spi_prepare_io,
23583 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023584 },
23585
23586 {
23587 .vendor = "Winbond",
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100023588 .name = "W25Q32JW...M",
23589 .bustype = BUS_SPI,
23590 .manufacture_id = WINBOND_NEX_ID,
23591 .model_id = WINBOND_NEX_W25Q32JW_M,
23592 .total_size = 4096,
23593 .page_size = 256,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023594 /* OTP: 768B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
23595 /* QPI enable 0x38, disable 0xFF */
Nico Huber2133f592024-01-06 18:30:01 +010023596 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI_SRP |
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023597 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_WRSR_EXT2,
Nico Huber2133f592024-01-06 18:30:01 +010023598 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100023599 .tested = TEST_OK_PREW,
23600 .probe = probe_spi_rdid,
23601 .probe_timing = TIMING_ZERO,
23602 .block_erasers =
23603 {
23604 {
23605 .eraseblocks = { {4 * 1024, 1024} },
23606 .block_erase = spi_block_erase_20,
23607 }, {
23608 .eraseblocks = { {32 * 1024, 128} },
23609 .block_erase = spi_block_erase_52,
23610 }, {
23611 .eraseblocks = { {64 * 1024, 64} },
23612 .block_erase = spi_block_erase_d8,
23613 }, {
23614 .eraseblocks = { {4 * 1024 * 1024, 1} },
23615 .block_erase = spi_block_erase_60,
23616 }, {
23617 .eraseblocks = { {4 * 1024 * 1024, 1} },
23618 .block_erase = spi_block_erase_c7,
23619 }
23620 },
23621 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
23622 .unlock = spi_disable_blockprotect_bp2_srwd,
23623 .write = spi_chip_write_256,
23624 .read = spi_chip_read,
23625 .voltage = {1700, 1950},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023626 .reg_bits =
23627 {
Nico Huber2133f592024-01-06 18:30:01 +010023628 .qe = {STATUS2, 1, RW},
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023629 .srp = {STATUS1, 7, RW},
23630 .srl = {STATUS2, 0, RW},
23631 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23632 .tb = {STATUS1, 5, RW},
23633 .sec = {STATUS1, 6, RW},
23634 .cmp = {STATUS2, 6, RW},
23635 .wps = {STATUS3, 2, RW},
23636 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023637 .wp_write_cfg = spi_wp_write_cfg,
23638 .wp_read_cfg = spi_wp_read_cfg,
23639 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukb1fb3f72022-07-25 00:27:37 +030023640 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023641 .prepare_access = spi_prepare_io,
23642 .finish_access = spi_finish_io,
Nikolai Artemiev6ae79b12021-05-08 17:31:23 +100023643 },
23644
23645 {
23646 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100023647 .name = "W25Q40.V",
23648 .bustype = BUS_SPI,
23649 .manufacture_id = WINBOND_NEX_ID,
23650 .model_id = WINBOND_NEX_W25Q40_V,
23651 .total_size = 512,
23652 .page_size = 256,
23653 /* supports SFDP */
23654 /* OTP: 756B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023655 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023656 .tested = TEST_OK_PREW,
23657 .probe = probe_spi_rdid,
23658 .probe_timing = TIMING_ZERO,
23659 .block_erasers =
23660 {
23661 {
23662 .eraseblocks = { {4 * 1024, 128} },
23663 .block_erase = spi_block_erase_20,
23664 }, {
23665 .eraseblocks = { {32 * 1024, 16} },
23666 .block_erase = spi_block_erase_52,
23667 }, {
23668 .eraseblocks = { {64 * 1024, 8} },
23669 .block_erase = spi_block_erase_d8,
23670 }, {
23671 .eraseblocks = { {512 * 1024, 1} },
23672 .block_erase = spi_block_erase_60,
23673 }, {
23674 .eraseblocks = { {512 * 1024, 1} },
23675 .block_erase = spi_block_erase_c7,
23676 }
23677 },
Nico Huber2133f592024-01-06 18:30:01 +010023678 .reg_bits =
23679 {
23680 .qe = {STATUS2, 1, RW},
23681 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100023682 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23683 .unlock = spi_disable_blockprotect,
23684 .write = spi_chip_write_256, /* Multi I/O supported */
Nico Huber2133f592024-01-06 18:30:01 +010023685 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023686 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020023687 .prepare_access = spi_prepare_io,
23688 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023689 },
23690
23691 {
23692 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020023693 .name = "W25Q40BW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023694 .bustype = BUS_SPI,
23695 .manufacture_id = WINBOND_NEX_ID,
Nico Huber25683572018-03-30 13:50:13 +020023696 .model_id = WINBOND_NEX_W25Q40BW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023697 .total_size = 512,
23698 .page_size = 256,
23699 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023700 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Angel Pons3164a0c2018-09-30 20:26:06 +020023701 .tested = TEST_OK_PREW,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023702 .probe = probe_spi_rdid,
23703 .probe_timing = TIMING_ZERO,
23704 .block_erasers =
23705 {
23706 {
23707 .eraseblocks = { {4 * 1024, 128} },
23708 .block_erase = spi_block_erase_20,
23709 }, {
23710 .eraseblocks = { {32 * 1024, 16} },
23711 .block_erase = spi_block_erase_52,
23712 }, {
23713 .eraseblocks = { {64 * 1024, 8} },
23714 .block_erase = spi_block_erase_d8,
23715 }, {
23716 .eraseblocks = { {512 * 1024, 1} },
23717 .block_erase = spi_block_erase_60,
23718 }, {
23719 .eraseblocks = { {512 * 1024, 1} },
23720 .block_erase = spi_block_erase_c7,
23721 }
23722 },
Nico Huber2133f592024-01-06 18:30:01 +010023723 .reg_bits =
23724 {
23725 .qe = {STATUS2, 1, RW},
23726 },
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023727 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23728 .unlock = spi_disable_blockprotect,
23729 .write = spi_chip_write_256,
23730 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010023731 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020023732 .prepare_access = spi_prepare_io,
23733 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000023734 },
23735
23736 {
23737 .vendor = "Winbond",
Nico Huber25683572018-03-30 13:50:13 +020023738 .name = "W25Q40EW",
23739 .bustype = BUS_SPI,
23740 .manufacture_id = WINBOND_NEX_ID,
23741 .model_id = WINBOND_NEX_W25Q40EW,
23742 .total_size = 512,
23743 .page_size = 256,
23744 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023745 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
23746 FEATURE_OTP | FEATURE_QPI_SRP,
23747 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green07b8a172019-09-23 16:47:05 +100023748 .tested = TEST_OK_PREW,
Nico Huber25683572018-03-30 13:50:13 +020023749 .probe = probe_spi_rdid,
23750 .probe_timing = TIMING_ZERO,
23751 .block_erasers =
23752 {
23753 {
23754 .eraseblocks = { {4 * 1024, 128} },
23755 .block_erase = spi_block_erase_20,
23756 }, {
23757 .eraseblocks = { {32 * 1024, 16} },
23758 .block_erase = spi_block_erase_52,
23759 }, {
23760 .eraseblocks = { {64 * 1024, 8} },
23761 .block_erase = spi_block_erase_d8,
23762 }, {
23763 .eraseblocks = { {512 * 1024, 1} },
23764 .block_erase = spi_block_erase_60,
23765 }, {
23766 .eraseblocks = { {512 * 1024, 1} },
23767 .block_erase = spi_block_erase_c7,
23768 }
23769 },
Nico Huber2133f592024-01-06 18:30:01 +010023770 .reg_bits =
23771 {
23772 .qe = {STATUS2, 1, RW},
23773 },
Nico Huber25683572018-03-30 13:50:13 +020023774 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23775 .unlock = spi_disable_blockprotect,
23776 .write = spi_chip_write_256,
23777 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010023778 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020023779 .prepare_access = spi_prepare_io,
23780 .finish_access = spi_finish_io,
Nico Huber25683572018-03-30 13:50:13 +020023781 },
23782
Stanislav Sedovf5775442018-03-07 14:16:51 -080023783 {
23784 .vendor = "Winbond",
Joel Stanley55439612019-07-27 19:25:35 +093023785 .name = "W25Q512JV",
23786 .bustype = BUS_SPI,
23787 .manufacture_id = WINBOND_NEX_ID,
23788 .model_id = WINBOND_NEX_W25Q512JV,
23789 .total_size = 64 * 1024,
23790 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010023791 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
23792 FEATURE_OTP | FEATURE_4BA | FEATURE_QIO,
Joel Stanley55439612019-07-27 19:25:35 +093023793 .tested = TEST_OK_PREW,
23794 .probe = probe_spi_rdid,
23795 .probe_timing = TIMING_ZERO,
23796 .block_erasers =
23797 {
23798 {
23799 .eraseblocks = { {4 * 1024, 16384} },
23800 .block_erase = spi_block_erase_21,
23801 }, {
23802 .eraseblocks = { {4 * 1024, 16384} },
23803 .block_erase = spi_block_erase_20,
23804 }, {
23805 .eraseblocks = { {32 * 1024, 2048} },
23806 .block_erase = spi_block_erase_52,
23807 }, {
23808 .eraseblocks = { {64 * 1024, 1024} },
23809 .block_erase = spi_block_erase_dc,
23810 }, {
23811 .eraseblocks = { {64 * 1024, 1024} },
23812 .block_erase = spi_block_erase_d8,
23813 }, {
23814 .eraseblocks = { {64 * 1024 * 1024, 1} },
23815 .block_erase = spi_block_erase_60,
23816 }, {
23817 .eraseblocks = { {64 * 1024 * 1024, 1} },
23818 .block_erase = spi_block_erase_c7,
23819 }
23820 },
Nico Huber2133f592024-01-06 18:30:01 +010023821 .reg_bits =
23822 {
23823 .qe = {STATUS2, 1, RW},
23824 },
Joel Stanley55439612019-07-27 19:25:35 +093023825 .printlock = spi_prettyprint_status_register_plain,
23826 .unlock = spi_disable_blockprotect,
23827 .write = spi_chip_write_256,
23828 .read = spi_chip_read,
23829 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020023830 .prepare_access = spi_prepare_io,
23831 .finish_access = spi_finish_io,
Joel Stanley55439612019-07-27 19:25:35 +093023832 },
23833
23834 {
Alexandru M Stan6ce26a72024-10-11 22:47:24 -070023835 .vendor = "Winbond",
23836 .name = "W25R512NW/W74M51NW",
23837 .bustype = BUS_SPI,
23838 .manufacture_id = WINBOND_NEX_ID,
23839 .model_id = WINBOND_NEX_W25R512NW,
23840 .total_size = 65536,
23841 .page_size = 256,
23842 /* supports SFDP */
23843 /* OTP: 3X256B; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
23844 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_4BA,
23845 .tested = TEST_OK_PREW,
23846 .probe = probe_spi_rdid,
23847 .probe_timing = TIMING_ZERO,
23848 .block_erasers =
23849 {
23850 {
23851 .eraseblocks = { {4 * 1024, 16384} },
23852 .block_erase = spi_block_erase_21,
23853 }, {
23854 .eraseblocks = { {4 * 1024, 16384} },
23855 .block_erase = spi_block_erase_20,
23856 }, {
23857 .eraseblocks = { {32 * 1024, 2048} },
23858 .block_erase = spi_block_erase_52,
23859 }, {
23860 .eraseblocks = { {64 * 1024, 1024} },
23861 .block_erase = spi_block_erase_dc,
23862 }, {
23863 .eraseblocks = { {64 * 1024, 1024} },
23864 .block_erase = spi_block_erase_d8,
23865 }, {
23866 .eraseblocks = { {64 * 1024 * 1024, 1} },
23867 .block_erase = spi_block_erase_60,
23868 }, {
23869 .eraseblocks = { {64 * 1024 * 1024, 1} },
23870 .block_erase = spi_block_erase_c7,
23871 }
23872 },
23873 .printlock = spi_prettyprint_status_register_bp3_srwd,
23874 .unlock = spi_disable_blockprotect,
23875 .write = spi_chip_write_256,
23876 .read = spi_chip_read,
23877 .voltage = {1700, 1950},
23878 .prepare_access = spi_prepare_io,
23879 .finish_access = spi_finish_io,
23880 },
23881
23882 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010023883 .vendor = "Winbond",
23884 .name = "W25Q512NW-IM",
23885 .bustype = BUS_SPI,
23886 .manufacture_id = WINBOND_NEX_ID,
23887 .model_id = WINBOND_NEX_W25Q512NW_IM,
23888 .total_size = 64 * 1024,
23889 .page_size = 256,
Nico Huber2133f592024-01-06 18:30:01 +010023890 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
23891 FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
23892 .dummy_cycles =
23893 {
23894 /* Actually has 3 parameter bits, but higher values only help with DTR. */
23895 .qpi_read_params = { 2, 4, 6, 8 },
23896 },
Subrata Banikf5bffd92022-12-14 12:30:43 +053023897 .tested = TEST_OK_PREWB,
Felix Singer3c9bdb92022-12-15 23:30:16 +010023898 .probe = probe_spi_rdid,
23899 .probe_timing = TIMING_ZERO,
23900 .block_erasers =
Atul Dhudase2502dbd2021-09-21 10:02:20 +053023901 {
Felix Singer3c9bdb92022-12-15 23:30:16 +010023902 {
23903 .eraseblocks = { {4 * 1024, 16384} },
23904 .block_erase = spi_block_erase_21,
23905 }, {
23906 .eraseblocks = { {4 * 1024, 16384} },
23907 .block_erase = spi_block_erase_20,
23908 }, {
23909 .eraseblocks = { {32 * 1024, 2048} },
23910 .block_erase = spi_block_erase_52,
23911 }, {
23912 .eraseblocks = { {64 * 1024, 1024} },
23913 .block_erase = spi_block_erase_dc,
23914 }, {
23915 .eraseblocks = { {64 * 1024, 1024} },
23916 .block_erase = spi_block_erase_d8,
23917 }, {
23918 .eraseblocks = { {64 * 1024 * 1024, 1} },
23919 .block_erase = spi_block_erase_60,
23920 }, {
23921 .eraseblocks = { {64 * 1024 * 1024, 1} },
23922 .block_erase = spi_block_erase_c7,
23923 }
23924 },
23925 .unlock = spi_disable_blockprotect,
23926 .write = spi_chip_write_256,
23927 .read = spi_chip_read,
23928 .voltage = {1650, 1950},
Subrata Banikf5bffd92022-12-14 12:30:43 +053023929 .reg_bits =
23930 {
Nico Huber2133f592024-01-06 18:30:01 +010023931 .qe = {STATUS2, 1, RW},
Subrata Banikf5bffd92022-12-14 12:30:43 +053023932 .srp = {STATUS1, 7, RW},
23933 .srl = {STATUS2, 0, RW},
23934 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
23935 .tb = {STATUS1, 6, RW},
23936 .cmp = {STATUS2, 6, RW},
23937 .wps = {STATUS3, 2, RW},
23938 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023939 .wp_write_cfg = spi_wp_write_cfg,
23940 .wp_read_cfg = spi_wp_read_cfg,
23941 .wp_get_ranges = spi_wp_get_available_ranges,
Subrata Banikf5bffd92022-12-14 12:30:43 +053023942 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020023943 .prepare_access = spi_prepare_io,
23944 .finish_access = spi_finish_io,
Atul Dhudase2502dbd2021-09-21 10:02:20 +053023945 },
23946
23947 {
Joel Stanley55439612019-07-27 19:25:35 +093023948 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020023949 .name = "W25Q64BV/W25Q64CV/W25Q64FV",
Stanislav Sedovf5775442018-03-07 14:16:51 -080023950 .bustype = BUS_SPI,
23951 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023952 .model_id = WINBOND_NEX_W25Q64_V,
23953 .total_size = 8192,
Stanislav Sedovf5775442018-03-07 14:16:51 -080023954 .page_size = 256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023955 /* supports SFDP */
23956 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010023957 /* QPI: only FV version */
23958 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030023959 .tested = TEST_OK_PREWB,
Stanislav Sedovf5775442018-03-07 14:16:51 -080023960 .probe = probe_spi_rdid,
23961 .probe_timing = TIMING_ZERO,
23962 .block_erasers =
23963 {
23964 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023965 .eraseblocks = { {4 * 1024, 2048} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080023966 .block_erase = spi_block_erase_20,
23967 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023968 .eraseblocks = { {32 * 1024, 256} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080023969 .block_erase = spi_block_erase_52,
23970 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023971 .eraseblocks = { {64 * 1024, 128} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080023972 .block_erase = spi_block_erase_d8,
23973 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023974 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080023975 .block_erase = spi_block_erase_60,
23976 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100023977 .eraseblocks = { {8 * 1024 * 1024, 1} },
Stanislav Sedovf5775442018-03-07 14:16:51 -080023978 .block_erase = spi_block_erase_c7,
23979 }
23980 },
23981 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
23982 .unlock = spi_disable_blockprotect,
23983 .write = spi_chip_write_256,
23984 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100023985 .voltage = {2700, 3600},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020023986 .reg_bits =
23987 {
Nico Huber2133f592024-01-06 18:30:01 +010023988 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020023989 .srp = {STATUS1, 7, RW},
23990 .srl = {STATUS2, 0, RW},
23991 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
23992 .tb = {STATUS1, 5, RW},
23993 .sec = {STATUS1, 6, RW},
23994 .cmp = {STATUS2, 6, RW},
23995 },
Nico Huberaabb3e02023-01-13 00:22:30 +010023996 .wp_write_cfg = spi_wp_write_cfg,
23997 .wp_read_cfg = spi_wp_read_cfg,
23998 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020023999 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020024000 .prepare_access = spi_prepare_io,
24001 .finish_access = spi_finish_io,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000024002 },
24003
24004 {
24005 .vendor = "Winbond",
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024006 .name = "W25Q64JV-.Q",
24007 .bustype = BUS_SPI,
24008 .manufacture_id = WINBOND_NEX_ID,
24009 .model_id = WINBOND_NEX_W25Q64_V,
24010 .total_size = 8192,
24011 .page_size = 256,
24012 /* supports SFDP */
24013 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010024014 .feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QIO |
Nico Huber3f3c1f32022-05-28 16:48:26 +020024015 FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024016 .tested = TEST_OK_PREW,
24017 .probe = probe_spi_rdid,
24018 .probe_timing = TIMING_ZERO,
24019 .block_erasers =
24020 {
24021 {
24022 .eraseblocks = { {4 * 1024, 2048} },
24023 .block_erase = spi_block_erase_20,
24024 }, {
24025 .eraseblocks = { {32 * 1024, 256} },
24026 .block_erase = spi_block_erase_52,
24027 }, {
24028 .eraseblocks = { {64 * 1024, 128} },
24029 .block_erase = spi_block_erase_d8,
24030 }, {
24031 .eraseblocks = { {8 * 1024 * 1024, 1} },
24032 .block_erase = spi_block_erase_60,
24033 }, {
24034 .eraseblocks = { {8 * 1024 * 1024, 1} },
24035 .block_erase = spi_block_erase_c7,
24036 }
24037 },
24038 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24039 .unlock = spi_disable_blockprotect,
24040 .write = spi_chip_write_256,
24041 .read = spi_chip_read,
24042 .voltage = {2700, 3600},
24043 .reg_bits =
24044 {
Nico Huber2133f592024-01-06 18:30:01 +010024045 .qe = {STATUS2, 1, RW},
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024046 .srp = {STATUS1, 7, RW},
24047 .srl = {STATUS2, 0, RW},
24048 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
24049 .tb = {STATUS1, 5, RW},
24050 .sec = {STATUS1, 6, RW},
24051 .cmp = {STATUS2, 6, RW},
24052 .wps = {STATUS3, 2, RW},
24053 },
Nico Huberaabb3e02023-01-13 00:22:30 +010024054 .wp_write_cfg = spi_wp_write_cfg,
24055 .wp_read_cfg = spi_wp_read_cfg,
24056 .wp_get_ranges = spi_wp_get_available_ranges,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024057 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020024058 .prepare_access = spi_prepare_io,
24059 .finish_access = spi_finish_io,
Sergii Dmytrukd1af3072021-11-08 00:00:43 +020024060 },
24061
24062 {
24063 .vendor = "Winbond",
24064 .name = "W25Q64JV-.M",
Simon Buhrow236a38c2021-11-05 11:48:30 +010024065 .bustype = BUS_SPI,
24066 .manufacture_id = WINBOND_NEX_ID,
24067 .model_id = WINBOND_NEX_W25Q64JV,
24068 .total_size = 8192,
24069 .page_size = 256,
24070 /* supports SFDP */
Nico Huber2133f592024-01-06 18:30:01 +010024071 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
24072 FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010024073 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Simon Buhrow236a38c2021-11-05 11:48:30 +010024074 .tested = TEST_OK_PREW,
24075 .probe = probe_spi_rdid,
24076 .probe_timing = TIMING_ZERO,
24077 .block_erasers =
24078 {
24079 {
24080 .eraseblocks = { {4 * 1024, 2048} },
24081 .block_erase = spi_block_erase_20,
24082 }, {
24083 .eraseblocks = { {32 * 1024, 256} },
24084 .block_erase = spi_block_erase_52,
24085 }, {
24086 .eraseblocks = { {64 * 1024, 128} },
24087 .block_erase = spi_block_erase_d8,
24088 }, {
24089 .eraseblocks = { {8 * 1024 * 1024, 1} },
24090 .block_erase = spi_block_erase_60,
24091 }, {
24092 .eraseblocks = { {8 * 1024 * 1024, 1} },
24093 .block_erase = spi_block_erase_c7,
24094 }
24095 },
Nico Huber2133f592024-01-06 18:30:01 +010024096 .reg_bits =
24097 {
24098 .qe = {STATUS2, 1, RW},
24099 },
Simon Buhrow236a38c2021-11-05 11:48:30 +010024100 .printlock = spi_prettyprint_status_register_bp2_tb_bpl,
24101 .unlock = spi_disable_blockprotect_bp2_srwd,
24102 .write = spi_chip_write_256,
24103 .read = spi_chip_read,
24104 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024105 .prepare_access = spi_prepare_io,
24106 .finish_access = spi_finish_io,
Simon Buhrow236a38c2021-11-05 11:48:30 +010024107 },
24108
24109 {
24110 .vendor = "Winbond",
Nico Hubera358b142024-04-14 18:29:06 +020024111 .name = "W25Q64DW",
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000024112 .bustype = BUS_SPI,
24113 .manufacture_id = WINBOND_NEX_ID,
24114 .model_id = WINBOND_NEX_W25Q64_W,
24115 .total_size = 8192,
24116 .page_size = 256,
24117 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010024118 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QPI_SRP,
24119 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Nico Hubera358b142024-04-14 18:29:06 +020024120 .tested = TEST_OK_PREW,
24121 .probe = probe_spi_rdid,
24122 .probe_timing = TIMING_ZERO,
24123 .block_erasers =
24124 {
24125 {
24126 .eraseblocks = { {4 * 1024, 2048} },
24127 .block_erase = spi_block_erase_20,
24128 }, {
24129 .eraseblocks = { {32 * 1024, 256} },
24130 .block_erase = spi_block_erase_52,
24131 }, {
24132 .eraseblocks = { {64 * 1024, 128} },
24133 .block_erase = spi_block_erase_d8,
24134 }, {
24135 .eraseblocks = { {8 * 1024 * 1024, 1} },
24136 .block_erase = spi_block_erase_60,
24137 }, {
24138 .eraseblocks = { {8 * 1024 * 1024, 1} },
24139 .block_erase = spi_block_erase_c7,
24140 }
24141 },
24142 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24143 .unlock = spi_disable_blockprotect,
24144 .write = spi_chip_write_256,
24145 .read = spi_chip_read,
24146 .voltage = {1700, 1950}, /* Fast read (0x0B) and multi I/O supported */
24147 .reg_bits =
24148 {
Nico Huber37e07a82025-02-26 23:26:59 +010024149 .qe = {STATUS2, 1, RW},
Nico Hubera358b142024-04-14 18:29:06 +020024150 .srp = {STATUS1, 7, RW},
24151 .srl = {STATUS2, 0, RW},
24152 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
24153 .tb = {STATUS1, 5, RW},
24154 .sec = {STATUS1, 6, RW},
24155 .cmp = {STATUS2, 6, RW},
24156 },
24157 .wp_write_cfg = spi_wp_write_cfg,
24158 .wp_read_cfg = spi_wp_read_cfg,
24159 .wp_get_ranges = spi_wp_get_available_ranges,
24160 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020024161 .prepare_access = spi_prepare_io,
24162 .finish_access = spi_finish_io,
Nico Hubera358b142024-04-14 18:29:06 +020024163 },
24164
24165 {
24166 .vendor = "Winbond",
24167 .name = "W25Q64FW/W25Q64JW...Q",
24168 .bustype = BUS_SPI,
24169 .manufacture_id = WINBOND_NEX_ID,
24170 .model_id = WINBOND_NEX_W25Q64_W,
24171 .total_size = 8192,
24172 .page_size = 256,
24173 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber1412d9f2024-01-06 18:25:49 +010024174 /* FEATURE_QPI_SRP (2, 4, 6, 8): only FW version */
Nico Hubera358b142024-04-14 18:29:06 +020024175 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
Nico Huber1412d9f2024-01-06 18:25:49 +010024176 FEATURE_OTP | FEATURE_QIO,
Sergii Dmytrukc74eac22022-10-06 18:17:58 +030024177 .tested = TEST_OK_PREWB,
Yung-Chieh Lob13d4e62013-06-09 14:00:46 +000024178 .probe = probe_spi_rdid,
24179 .probe_timing = TIMING_ZERO,
24180 .block_erasers =
24181 {
24182 {
24183 .eraseblocks = { {4 * 1024, 2048} },
24184 .block_erase = spi_block_erase_20,
24185 }, {
24186 .eraseblocks = { {32 * 1024, 256} },
24187 .block_erase = spi_block_erase_52,
24188 }, {
24189 .eraseblocks = { {64 * 1024, 128} },
24190 .block_erase = spi_block_erase_d8,
24191 }, {
24192 .eraseblocks = { {8 * 1024 * 1024, 1} },
24193 .block_erase = spi_block_erase_60,
24194 }, {
24195 .eraseblocks = { {8 * 1024 * 1024, 1} },
24196 .block_erase = spi_block_erase_c7,
24197 }
24198 },
24199 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24200 .unlock = spi_disable_blockprotect,
24201 .write = spi_chip_write_256,
24202 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010024203 .voltage = {1700, 1950},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110024204 .reg_bits =
24205 {
Nico Huber2133f592024-01-06 18:30:01 +010024206 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110024207 .srp = {STATUS1, 7, RW},
24208 .srl = {STATUS2, 0, RW},
24209 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
24210 .tb = {STATUS1, 5, RW},
24211 .sec = {STATUS1, 6, RW},
24212 .cmp = {STATUS2, 6, RW},
24213 },
Nico Huberaabb3e02023-01-13 00:22:30 +010024214 .wp_write_cfg = spi_wp_write_cfg,
24215 .wp_read_cfg = spi_wp_read_cfg,
24216 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110024217 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020024218 .prepare_access = spi_prepare_io,
24219 .finish_access = spi_finish_io,
Antony Rheneus0fbba982011-05-26 14:28:51 +000024220 },
24221
24222 {
24223 .vendor = "Winbond",
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100024224 .name = "W25Q64JW...M",
Scott Chao1bbc5012020-04-08 22:10:50 +080024225 .bustype = BUS_SPI,
24226 .manufacture_id = WINBOND_NEX_ID,
Nikolai Artemiev5fa05052021-05-14 15:26:47 +100024227 .model_id = WINBOND_NEX_W25Q64JW_M,
Scott Chao1bbc5012020-04-08 22:10:50 +080024228 .total_size = 8192,
24229 .page_size = 256,
24230 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
24231 /* QPI enable 0x38, disable 0xFF */
Nico Huber1412d9f2024-01-06 18:25:49 +010024232 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR3 |
24233 FEATURE_OTP | FEATURE_QPI_SRP,
24234 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Scott Chao1bbc5012020-04-08 22:10:50 +080024235 .tested = TEST_OK_PREW,
24236 .probe = probe_spi_rdid,
24237 .probe_timing = TIMING_ZERO,
24238 .block_erasers =
24239 {
24240 {
24241 .eraseblocks = { {4 * 1024, 2048} },
24242 .block_erase = spi_block_erase_20,
24243 }, {
24244 .eraseblocks = { {32 * 1024, 256} },
24245 .block_erase = spi_block_erase_52,
24246 }, {
24247 .eraseblocks = { {64 * 1024, 128} },
24248 .block_erase = spi_block_erase_d8,
24249 }, {
24250 .eraseblocks = { {8 * 1024 * 1024, 1} },
24251 .block_erase = spi_block_erase_60,
24252 }, {
24253 .eraseblocks = { {8 * 1024 * 1024, 1} },
24254 .block_erase = spi_block_erase_c7,
24255 }
24256 },
24257 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24258 .unlock = spi_disable_blockprotect,
24259 .write = spi_chip_write_256,
24260 .read = spi_chip_read,
Nico Huber1412d9f2024-01-06 18:25:49 +010024261 .voltage = {1700, 1950},
Evan Benn29c8b5d2022-09-13 16:01:10 +100024262 .reg_bits =
24263 {
Nico Huber2133f592024-01-06 18:30:01 +010024264 .qe = {STATUS2, 1, RW},
Evan Benn29c8b5d2022-09-13 16:01:10 +100024265 .srp = {STATUS1, 7, RW},
24266 .srl = {STATUS2, 0, RW},
24267 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
24268 .tb = {STATUS1, 5, RW},
24269 .sec = {STATUS1, 6, RW},
24270 .cmp = {STATUS2, 6, RW},
24271 .wps = {STATUS3, 2, RW},
24272 },
Nico Huberaabb3e02023-01-13 00:22:30 +010024273 .wp_write_cfg = spi_wp_write_cfg,
24274 .wp_read_cfg = spi_wp_read_cfg,
24275 .wp_get_ranges = spi_wp_get_available_ranges,
Evan Benn29c8b5d2022-09-13 16:01:10 +100024276 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020024277 .prepare_access = spi_prepare_io,
24278 .finish_access = spi_finish_io,
Scott Chao1bbc5012020-04-08 22:10:50 +080024279 },
24280
24281 {
24282 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024283 .name = "W25Q80.V",
Nico Huber70eed9f2017-04-24 22:19:27 +020024284 .bustype = BUS_SPI,
24285 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024286 .model_id = WINBOND_NEX_W25Q80_V,
24287 .total_size = 1024,
Nico Huber70eed9f2017-04-24 22:19:27 +020024288 .page_size = 256,
24289 /* supports SFDP */
24290 /* OTP: 1024B total, 256B reserved; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010024291 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
David Hendricks48729d32017-12-08 14:44:07 -080024292 .tested = TEST_OK_PREW,
Nico Huber70eed9f2017-04-24 22:19:27 +020024293 .probe = probe_spi_rdid,
24294 .probe_timing = TIMING_ZERO,
24295 .block_erasers =
24296 {
24297 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024298 .eraseblocks = { {4 * 1024, 256} },
Nico Huber70eed9f2017-04-24 22:19:27 +020024299 .block_erase = spi_block_erase_20,
24300 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024301 .eraseblocks = { {32 * 1024, 32} },
Nico Huber70eed9f2017-04-24 22:19:27 +020024302 .block_erase = spi_block_erase_52,
24303 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024304 .eraseblocks = { {64 * 1024, 16} },
Nico Huber70eed9f2017-04-24 22:19:27 +020024305 .block_erase = spi_block_erase_d8,
24306 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024307 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020024308 .block_erase = spi_block_erase_60,
24309 }, {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024310 .eraseblocks = { {1024 * 1024, 1} },
Nico Huber70eed9f2017-04-24 22:19:27 +020024311 .block_erase = spi_block_erase_c7,
24312 }
24313 },
Nico Huber2133f592024-01-06 18:30:01 +010024314 .reg_bits =
24315 {
24316 .qe = {STATUS2, 1, RW},
24317 },
Nico Huber70eed9f2017-04-24 22:19:27 +020024318 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24319 .unlock = spi_disable_blockprotect,
24320 .write = spi_chip_write_256,
24321 .read = spi_chip_read,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024322 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024323 .prepare_access = spi_prepare_io,
24324 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024325 },
24326
24327 {
24328 .vendor = "Winbond",
24329 .name = "W25Q80BW",
24330 .bustype = BUS_SPI,
24331 .manufacture_id = WINBOND_NEX_ID,
24332 .model_id = WINBOND_NEX_W25Q80BW,
24333 .total_size = 1024,
24334 .page_size = 256,
24335 /* OTP: 256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010024336 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_OTP | FEATURE_QIO,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024337 .tested = TEST_OK_PREW,
24338 .probe = probe_spi_rdid,
24339 .probe_timing = TIMING_ZERO,
24340 .block_erasers =
24341 {
24342 {
24343 .eraseblocks = { {4 * 1024, 256} },
24344 .block_erase = spi_block_erase_20,
24345 }, {
24346 .eraseblocks = { {32 * 1024, 32} },
24347 .block_erase = spi_block_erase_52,
24348 }, {
24349 .eraseblocks = { {64 * 1024, 16} },
24350 .block_erase = spi_block_erase_d8,
24351 }, {
24352 .eraseblocks = { {1 * 1024 * 1024, 1} },
24353 .block_erase = spi_block_erase_60,
24354 }, {
24355 .eraseblocks = { {1 * 1024 * 1024, 1} },
24356 .block_erase = spi_block_erase_c7,
24357 }
24358 },
Nico Huber2133f592024-01-06 18:30:01 +010024359 .reg_bits =
24360 {
24361 .qe = {STATUS2, 1, RW},
24362 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100024363 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24364 .unlock = spi_disable_blockprotect,
24365 .write = spi_chip_write_256,
24366 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010024367 .voltage = {1700, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020024368 .prepare_access = spi_prepare_io,
24369 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024370 },
24371
24372 {
24373 .vendor = "Winbond",
24374 .name = "W25Q80EW",
24375 .bustype = BUS_SPI,
24376 .manufacture_id = WINBOND_NEX_ID,
24377 .model_id = WINBOND_NEX_W25Q80EW,
24378 .total_size = 1024,
24379 .page_size = 256,
24380 /* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
Nico Huber2133f592024-01-06 18:30:01 +010024381 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 |
24382 FEATURE_OTP | FEATURE_QPI_SRP,
24383 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
Alan Green1f9cc7d2019-07-01 11:10:45 +100024384 .tested = TEST_OK_PREW,
24385 .probe = probe_spi_rdid,
24386 .probe_timing = TIMING_ZERO,
24387 .block_erasers =
24388 {
24389 {
24390 .eraseblocks = { {4 * 1024, 256} },
24391 .block_erase = spi_block_erase_20,
24392 }, {
24393 .eraseblocks = { {32 * 1024, 32} },
24394 .block_erase = spi_block_erase_52,
24395 }, {
24396 .eraseblocks = { {64 * 1024, 16} },
24397 .block_erase = spi_block_erase_d8,
24398 }, {
24399 .eraseblocks = { {1 * 1024 * 1024, 1} },
24400 .block_erase = spi_block_erase_60,
24401 }, {
24402 .eraseblocks = { {1 * 1024 * 1024, 1} },
24403 .block_erase = spi_block_erase_c7,
24404 }
24405 },
Nico Huber2133f592024-01-06 18:30:01 +010024406 .reg_bits =
24407 {
24408 .qe = {STATUS2, 1, RW},
24409 },
Alan Green1f9cc7d2019-07-01 11:10:45 +100024410 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24411 .unlock = spi_disable_blockprotect,
24412 .write = spi_chip_write_256,
24413 .read = spi_chip_read,
Nico Huber2133f592024-01-06 18:30:01 +010024414 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020024415 .prepare_access = spi_prepare_io,
24416 .finish_access = spi_finish_io,
Nico Huber70eed9f2017-04-24 22:19:27 +020024417 },
24418
24419 {
24420 .vendor = "Winbond",
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040024421 .name = "W25X05",
24422 .bustype = BUS_SPI,
24423 .manufacture_id = WINBOND_NEX_ID,
24424 .model_id = WINBOND_NEX_W25X05,
24425 .total_size = 64,
24426 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024427 /* FEATURE_FAST_READ_DIO since W25X05B */
24428 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040024429 .tested = TEST_OK_PREW,
24430 .probe = probe_spi_rdid,
24431 .probe_timing = TIMING_ZERO,
24432 .block_erasers =
24433 {
24434 {
24435 .eraseblocks = { {4 * 1024, 16} },
24436 .block_erase = spi_block_erase_20,
24437 }, {
24438 .eraseblocks = { {32 * 1024, 2} },
24439 .block_erase = spi_block_erase_52,
24440 }, {
24441 .eraseblocks = { {64 * 1024, 1} },
24442 .block_erase = spi_block_erase_d8,
24443 }
24444 },
24445 .printlock = spi_prettyprint_status_register_plain,
24446 .unlock = spi_disable_blockprotect,
24447 .write = spi_chip_write_256,
24448 .read = spi_chip_read,
24449 .voltage = {2300, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024450 .prepare_access = spi_prepare_io,
24451 .finish_access = spi_finish_io,
Jacob Appelbaumebbdc022019-09-02 09:10:43 -040024452 },
24453
24454 {
24455 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024456 .name = "W25X10",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024457 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024458 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024459 .model_id = WINBOND_NEX_W25X10,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024460 .total_size = 128,
24461 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024462 /* FEATURE_FAST_READ_DIO since W25X10B */
24463 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunere34e3e82013-01-01 00:06:51 +000024464 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024465 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000024466 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024467 .block_erasers =
24468 {
24469 {
24470 .eraseblocks = { {4 * 1024, 32} },
24471 .block_erase = spi_block_erase_20,
24472 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024473 .eraseblocks = { {64 * 1024, 2} },
24474 .block_erase = spi_block_erase_d8,
24475 }, {
24476 .eraseblocks = { {128 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024477 .block_erase = spi_block_erase_c7,
24478 }
24479 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000024480 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000024481 .unlock = spi_disable_blockprotect,
Carl-Daniel Hailfinger8d497012009-05-09 02:34:18 +000024482 .write = spi_chip_write_256,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024483 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024484 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024485 .prepare_access = spi_prepare_io,
24486 .finish_access = spi_finish_io,
FENG yu ningff692fb2008-12-08 18:15:10 +000024487 },
24488
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024489 {
24490 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024491 .name = "W25X16",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024492 .bustype = BUS_SPI,
Hector Martina721ae22009-07-11 19:39:11 +000024493 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024494 .model_id = WINBOND_NEX_W25X16,
Hector Martina721ae22009-07-11 19:39:11 +000024495 .total_size = 2048,
24496 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024497 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner8179be52011-06-04 13:13:34 +000024498 .tested = TEST_OK_PREW,
Hector Martina721ae22009-07-11 19:39:11 +000024499 .probe = probe_spi_rdid,
24500 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024501 .block_erasers =
24502 {
24503 {
24504 .eraseblocks = { {4 * 1024, 512} },
24505 .block_erase = spi_block_erase_20,
24506 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024507 .eraseblocks = { {64 * 1024, 32} },
24508 .block_erase = spi_block_erase_d8,
24509 }, {
24510 .eraseblocks = { {2 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024511 .block_erase = spi_block_erase_c7,
24512 }
24513 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000024514 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000024515 .unlock = spi_disable_blockprotect,
Hector Martina721ae22009-07-11 19:39:11 +000024516 .write = spi_chip_write_256,
24517 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024518 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024519 .prepare_access = spi_prepare_io,
24520 .finish_access = spi_finish_io,
Hector Martina721ae22009-07-11 19:39:11 +000024521 },
24522
24523 {
24524 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024525 .name = "W25X20",
24526 .bustype = BUS_SPI,
24527 .manufacture_id = WINBOND_NEX_ID,
24528 .model_id = WINBOND_NEX_W25X20,
24529 .total_size = 256,
24530 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024531 /* FEATURE_FAST_READ_DIO since W25X20B */
24532 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024533 .tested = TEST_OK_PREW,
24534 .probe = probe_spi_rdid,
24535 .probe_timing = TIMING_ZERO,
24536 .block_erasers =
24537 {
24538 {
24539 .eraseblocks = { {4 * 1024, 64} },
24540 .block_erase = spi_block_erase_20,
24541 }, {
24542 .eraseblocks = { {64 * 1024, 4} },
24543 .block_erase = spi_block_erase_d8,
24544 }, {
24545 .eraseblocks = { {256 * 1024, 1} },
24546 .block_erase = spi_block_erase_c7,
24547 }
24548 },
24549 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24550 .unlock = spi_disable_blockprotect,
24551 .write = spi_chip_write_256,
24552 .read = spi_chip_read,
24553 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024554 .prepare_access = spi_prepare_io,
24555 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024556 },
24557
24558 {
24559 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024560 .name = "W25X32",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024561 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000024562 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024563 .model_id = WINBOND_NEX_W25X32,
Zheng Bao1db2b752009-11-26 11:05:01 +000024564 .total_size = 4096,
24565 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024566 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Taunerc2eec2c2014-05-03 21:33:01 +000024567 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000024568 .probe = probe_spi_rdid,
24569 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024570 .block_erasers =
24571 {
24572 {
24573 .eraseblocks = { {4 * 1024, 1024} },
24574 .block_erase = spi_block_erase_20,
24575 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024576 .eraseblocks = { {64 * 1024, 64} },
24577 .block_erase = spi_block_erase_d8,
24578 }, {
24579 .eraseblocks = { {4 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024580 .block_erase = spi_block_erase_c7,
24581 }
24582 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000024583 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000024584 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000024585 .write = spi_chip_write_256,
24586 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024587 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024588 .prepare_access = spi_prepare_io,
24589 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000024590 },
24591
24592 {
24593 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024594 .name = "W25X40",
24595 .bustype = BUS_SPI,
24596 .manufacture_id = WINBOND_NEX_ID,
24597 .model_id = WINBOND_NEX_W25X40,
24598 .total_size = 512,
24599 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024600 /* FEATURE_FAST_READ_DIO since W25X40B */
24601 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024602 .tested = TEST_OK_PREW,
24603 .probe = probe_spi_rdid,
24604 .probe_timing = TIMING_ZERO,
24605 .block_erasers =
24606 {
24607 {
24608 .eraseblocks = { {4 * 1024, 128} },
24609 .block_erase = spi_block_erase_20,
24610 }, {
24611 .eraseblocks = { {64 * 1024, 8} },
24612 .block_erase = spi_block_erase_d8,
24613 }, {
24614 .eraseblocks = { {512 * 1024, 1} },
24615 .block_erase = spi_block_erase_c7,
24616 }
24617 },
24618 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24619 .unlock = spi_disable_blockprotect,
24620 .write = spi_chip_write_256,
24621 .read = spi_chip_read,
24622 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024623 .prepare_access = spi_prepare_io,
24624 .finish_access = spi_finish_io,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024625 },
24626
24627 {
24628 .vendor = "Winbond",
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024629 .name = "W25X64",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024630 .bustype = BUS_SPI,
Zheng Bao1db2b752009-11-26 11:05:01 +000024631 .manufacture_id = WINBOND_NEX_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024632 .model_id = WINBOND_NEX_W25X64,
Zheng Bao1db2b752009-11-26 11:05:01 +000024633 .total_size = 8192,
24634 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024635 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Stefan Tauner23e10b82016-01-23 16:16:49 +000024636 .tested = TEST_OK_PREW,
Zheng Bao1db2b752009-11-26 11:05:01 +000024637 .probe = probe_spi_rdid,
24638 .probe_timing = TIMING_ZERO,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024639 .block_erasers =
24640 {
24641 {
24642 .eraseblocks = { {4 * 1024, 2048} },
24643 .block_erase = spi_block_erase_20,
24644 }, {
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024645 .eraseblocks = { {64 * 1024, 128} },
24646 .block_erase = spi_block_erase_d8,
24647 }, {
24648 .eraseblocks = { {8 * 1024 * 1024, 1} },
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024649 .block_erase = spi_block_erase_c7,
24650 }
24651 },
Stefan Tauner6ee37e22012-12-29 15:03:51 +000024652 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
Carl-Daniel Hailfinger29a1c662010-07-14 20:21:22 +000024653 .unlock = spi_disable_blockprotect,
Zheng Bao1db2b752009-11-26 11:05:01 +000024654 .write = spi_chip_write_256,
24655 .read = spi_chip_read,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024656 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024657 .prepare_access = spi_prepare_io,
24658 .finish_access = spi_finish_io,
Zheng Bao1db2b752009-11-26 11:05:01 +000024659 },
24660
24661 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100024662 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024663 .name = "W25X80",
Alan Greenfa3fcd32019-06-27 15:41:50 +100024664 .bustype = BUS_SPI,
24665 .manufacture_id = WINBOND_NEX_ID,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024666 .model_id = WINBOND_NEX_W25X80,
Alan Greenfa3fcd32019-06-27 15:41:50 +100024667 .total_size = 1024,
24668 .page_size = 256,
Nico Hubera26a3c62024-04-12 19:28:28 +020024669 /* FEATURE_FAST_READ_DIO since W25X80B */
24670 .feature_bits = FEATURE_WRSR_WREN | FEATURE_FAST_READ_DOUT,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024671 .tested = TEST_OK_PREW,
Alan Greenfa3fcd32019-06-27 15:41:50 +100024672 .probe = probe_spi_rdid,
24673 .probe_timing = TIMING_ZERO,
24674 .block_erasers =
David Hendricksc9ee0ed2018-02-11 17:40:53 -080024675 {
24676 {
Alan Green1f9cc7d2019-07-01 11:10:45 +100024677 .eraseblocks = { {4 * 1024, 256} },
24678 .block_erase = spi_block_erase_20,
24679 }, {
David Hendricksc9ee0ed2018-02-11 17:40:53 -080024680 .eraseblocks = { {64 * 1024, 16} },
24681 .block_erase = spi_block_erase_d8,
24682 }, {
24683 .eraseblocks = { {1024 * 1024, 1} },
24684 .block_erase = spi_block_erase_c7,
24685 }
24686 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100024687 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
24688 .unlock = spi_disable_blockprotect,
24689 .write = spi_chip_write_256,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024690 .read = spi_chip_read,
Alan Greenfa3fcd32019-06-27 15:41:50 +100024691 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020024692 .prepare_access = spi_prepare_io,
24693 .finish_access = spi_finish_io,
David Hendricksc9ee0ed2018-02-11 17:40:53 -080024694 },
24695
Alan Greenf29ea362019-06-27 17:14:02 +100024696 /* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
24697 {
Carl-Daniel Hailfinger2e88a9f2011-07-26 14:18:52 +000024698 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000024699 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024700 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024701 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024702 .model_id = WINBOND_W29C010,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024703 .total_size = 128,
24704 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000024705 .feature_bits = FEATURE_LONG_RESET,
David Hendricks567b7b82011-05-18 01:31:03 +000024706 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024707 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000024708 .probe_timing = 10, /* used datasheet for the W29C011A */
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024709 .block_erasers =
24710 {
24711 {
24712 .eraseblocks = { {128 * 1024, 1} },
24713 .block_erase = erase_chip_block_jedec,
24714 }
24715 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024716 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000024717 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010024718 .prepare_access = prepare_memory_access,
24719 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000024720 },
24721
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024722 {
24723 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024724 .name = "W29C010(M)/W29C011A/W29EE011/W29EE012-old",
24725 .bustype = BUS_PARALLEL,
24726 .manufacture_id = WINBOND_ID,
24727 .model_id = WINBOND_W29C010,
24728 .total_size = 128,
24729 .page_size = 128,
24730 .feature_bits = FEATURE_LONG_RESET,
24731 .tested = TEST_OK_PREW,
24732 .probe = probe_w29ee011,
24733 .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (w29ee011.c) */
24734 .block_erasers =
24735 {
24736 {
24737 .eraseblocks = { {128 * 1024, 1} },
24738 .block_erase = erase_chip_block_jedec,
24739 }
24740 },
24741 .write = write_jedec,
24742 .read = read_memmapped,
Nico Huber9eec4072023-01-12 01:17:30 +010024743 .prepare_access = prepare_memory_access,
24744 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024745 },
24746
24747 {
24748 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000024749 .name = "W29C020(C)/W29C022",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024750 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024751 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024752 .model_id = WINBOND_W29C020,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024753 .total_size = 256,
24754 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000024755 .feature_bits = FEATURE_LONG_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024756 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024757 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000024758 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024759 .block_erasers =
24760 {
24761 {
24762 .eraseblocks = { {256 * 1024, 1} },
24763 .block_erase = erase_chip_block_jedec,
24764 }
24765 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024766 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000024767 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024768 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010024769 .prepare_access = prepare_memory_access,
24770 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000024771 },
24772
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024773 {
24774 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000024775 .name = "W29C040/P",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000024776 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024777 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000024778 .model_id = WINBOND_W29C040,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024779 .total_size = 512,
24780 .page_size = 256,
Sean Nelson35727f72010-01-28 23:55:12 +000024781 .feature_bits = FEATURE_LONG_RESET,
24782 .tested = TEST_UNTESTED,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024783 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000024784 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000024785 .block_erasers =
24786 {
24787 {
24788 .eraseblocks = { {512 * 1024, 1} },
24789 .block_erase = erase_chip_block_jedec,
24790 }
24791 },
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024792 .write = write_jedec,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000024793 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000024794 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010024795 .prepare_access = prepare_memory_access,
24796 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000024797 },
24798
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000024799 {
24800 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024801 .name = "W29C512A/W29EE512",
24802 .bustype = BUS_PARALLEL,
24803 .manufacture_id = WINBOND_ID,
24804 .model_id = WINBOND_W29C512A,
24805 .total_size = 64,
24806 .page_size = 128,
24807 .feature_bits = FEATURE_LONG_RESET,
24808 .tested = TEST_OK_PREW,
24809 .probe = probe_jedec,
24810 .probe_timing = 10,
24811 .block_erasers =
24812 {
24813 {
24814 .eraseblocks = { {64 * 1024, 1} },
24815 .block_erase = erase_chip_block_jedec,
24816 }
24817 },
24818 .write = write_jedec,
24819 .read = read_memmapped,
24820 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010024821 .prepare_access = prepare_memory_access,
24822 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024823 },
24824
24825 {
24826 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024827 .name = "W29GL032CB",
24828 .bustype = BUS_PARALLEL,
24829 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24830 .model_id = WINBOND_W29GL032CB,
24831 .total_size = 4096,
24832 .page_size = 128 * 1024, /* actual page size is 16 */
24833 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24834 .tested = TEST_UNTESTED,
24835 .probe = probe_jedec_29gl,
24836 .probe_timing = TIMING_ZERO,
24837 .block_erasers =
24838 {
24839 {
24840 .eraseblocks = {
24841 {8 * 1024, 8},
24842 {64 * 1024, 63},
24843 },
24844 .block_erase = erase_sector_jedec,
24845 }, {
24846 .eraseblocks = { {4 * 1024 * 1024, 1} },
24847 .block_erase = erase_chip_block_jedec,
24848 },
24849 },
24850 .write = write_jedec_1,
24851 .read = read_memmapped,
24852 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010024853 .prepare_access = prepare_memory_access,
24854 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024855 },
24856
24857 {
24858 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024859 .name = "W29GL032CH/L",
24860 .bustype = BUS_PARALLEL,
24861 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24862 .model_id = WINBOND_W29GL032CHL,
24863 .total_size = 4096,
24864 .page_size = 128 * 1024, /* actual page size is 16 */
24865 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24866 .tested = TEST_UNTESTED,
24867 .probe = probe_jedec_29gl,
24868 .probe_timing = TIMING_ZERO,
24869 .block_erasers =
24870 {
24871 {
24872 .eraseblocks = { {64 * 1024, 64} },
24873 .block_erase = erase_sector_jedec,
24874 }, {
24875 .eraseblocks = { {4 * 1024 * 1024, 1} },
24876 .block_erase = erase_chip_block_jedec,
24877 },
24878 },
24879 .write = write_jedec_1,
24880 .read = read_memmapped,
24881 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010024882 .prepare_access = prepare_memory_access,
24883 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024884 },
24885
24886 {
24887 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024888 .name = "W29GL032CT",
24889 .bustype = BUS_PARALLEL,
24890 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24891 .model_id = WINBOND_W29GL032CT,
24892 .total_size = 4096,
24893 .page_size = 128 * 1024, /* actual page size is 16 */
24894 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24895 .tested = TEST_UNTESTED,
24896 .probe = probe_jedec_29gl,
24897 .probe_timing = TIMING_ZERO,
24898 .block_erasers =
24899 {
24900 {
24901 .eraseblocks = {
24902 {64 * 1024, 63},
24903 {8 * 1024, 8},
24904 },
24905 .block_erase = erase_sector_jedec,
24906 }, {
24907 .eraseblocks = { {4 * 1024 * 1024, 1} },
24908 .block_erase = erase_chip_block_jedec,
24909 },
24910 },
24911 .write = write_jedec_1,
24912 .read = read_memmapped,
24913 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010024914 .prepare_access = prepare_memory_access,
24915 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024916 },
24917
24918 {
24919 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024920 .name = "W29GL064CB",
24921 .bustype = BUS_PARALLEL,
24922 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24923 .model_id = WINBOND_W29GL064CB,
24924 .total_size = 8192,
24925 .page_size = 128 * 1024, /* actual page size is 16 */
24926 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24927 .tested = TEST_UNTESTED,
24928 .probe = probe_jedec_29gl,
24929 .probe_timing = TIMING_ZERO,
24930 .block_erasers =
24931 {
24932 {
24933 .eraseblocks = {
24934 {8 * 1024, 8},
24935 {64 * 1024, 127},
24936 },
24937 .block_erase = erase_sector_jedec,
24938 }, {
24939 .eraseblocks = { {8 * 1024 * 1024, 1} },
24940 .block_erase = erase_chip_block_jedec,
24941 },
24942 },
24943 .write = write_jedec_1,
24944 .read = read_memmapped,
24945 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010024946 .prepare_access = prepare_memory_access,
24947 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024948 },
24949
24950 {
24951 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100024952 .name = "W29GL064CH/L",
24953 .bustype = BUS_PARALLEL,
24954 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24955 .model_id = WINBOND_W29GL064CHL,
24956 .total_size = 8192,
24957 .page_size = 128 * 1024, /* actual page size is 16 */
24958 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24959 .tested = TEST_UNTESTED,
24960 .probe = probe_jedec_29gl,
24961 .probe_timing = TIMING_ZERO,
24962 .block_erasers =
24963 {
24964 {
24965 .eraseblocks = { {64 * 1024, 128} },
24966 .block_erase = erase_sector_jedec,
24967 }, {
24968 .eraseblocks = { {8 * 1024 * 1024, 1} },
24969 .block_erase = erase_chip_block_jedec,
24970 },
24971 },
24972 .write = write_jedec_1,
24973 .read = read_memmapped,
24974 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010024975 .prepare_access = prepare_memory_access,
24976 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100024977 },
24978
24979 {
24980 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000024981 .name = "W29GL064CT",
24982 .bustype = BUS_PARALLEL,
24983 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
24984 .model_id = WINBOND_W29GL064CT,
24985 .total_size = 8192,
24986 .page_size = 128 * 1024, /* actual page size is 16 */
24987 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
24988 .tested = TEST_UNTESTED,
24989 .probe = probe_jedec_29gl,
24990 .probe_timing = TIMING_ZERO,
24991 .block_erasers =
24992 {
24993 {
24994 .eraseblocks = {
24995 {64 * 1024, 127},
24996 {8 * 1024, 8},
24997 },
24998 .block_erase = erase_sector_jedec,
24999 }, {
25000 .eraseblocks = { {8 * 1024 * 1024, 1} },
25001 .block_erase = erase_chip_block_jedec,
25002 },
25003 },
25004 .write = write_jedec_1,
25005 .read = read_memmapped,
25006 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025007 .prepare_access = prepare_memory_access,
25008 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000025009 },
25010
25011 {
25012 .vendor = "Winbond",
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000025013 .name = "W29GL128C",
25014 .bustype = BUS_PARALLEL,
25015 .manufacture_id = AMD_ID, /* WTF: "Industry Standard compatible Manufacturer ID code of 01h" */
25016 .model_id = WINBOND_W29GL128CHL,
25017 .total_size = 16384,
25018 .page_size = 128 * 1024, /* actual page size is 16 */
25019 .feature_bits = FEATURE_ADDR_2AA | FEATURE_SHORT_RESET,
25020 .tested = TEST_UNTESTED,
25021 .probe = probe_jedec_29gl,
25022 .probe_timing = TIMING_ZERO,
25023 .block_erasers =
25024 {
25025 {
25026 .eraseblocks = { {128 * 1024, 128} },
25027 .block_erase = erase_sector_jedec,
25028 }, {
25029 .eraseblocks = { {16 * 1024 * 1024, 1} },
25030 .block_erase = erase_chip_block_jedec,
25031 },
25032 },
25033 .write = write_jedec_1,
25034 .read = read_memmapped,
25035 .voltage = {2700, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025036 .prepare_access = prepare_memory_access,
25037 .finish_access = finish_memory_access,
Stefan Tauner03a9c3c2014-08-03 14:15:14 +000025038 },
25039
25040 {
25041 .vendor = "Winbond",
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000025042 .name = "W39F010",
25043 .bustype = BUS_PARALLEL,
25044 .manufacture_id = WINBOND_ID,
25045 .model_id = WINBOND_W39F010,
25046 .total_size = 128,
25047 .page_size = 4 * 1024,
25048 .feature_bits = FEATURE_EITHER_RESET,
25049 .tested = TEST_OK_PREW,
25050 .probe = probe_jedec,
25051 .probe_timing = 10,
25052 .block_erasers =
25053 {
25054 {
25055 .eraseblocks = { {4 * 1024, 32} },
25056 .block_erase = erase_block_jedec,
25057 }, {
25058 .eraseblocks = { {128 * 1024, 1} },
25059 .block_erase = erase_chip_block_jedec,
25060 }
25061 },
25062 .printlock = printlock_w39f010,
25063 .write = write_jedec_1,
25064 .read = read_memmapped,
25065 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010025066 .prepare_access = prepare_memory_access,
25067 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000025068 },
25069
25070 {
25071 .vendor = "Winbond",
25072 .name = "W39L010",
25073 .bustype = BUS_PARALLEL,
25074 .manufacture_id = WINBOND_ID,
25075 .model_id = WINBOND_W39L010,
25076 .total_size = 128,
25077 .page_size = 4 * 1024,
25078 .feature_bits = FEATURE_EITHER_RESET,
25079 .tested = TEST_UNTESTED,
25080 .probe = probe_jedec,
25081 .probe_timing = 10,
25082 .block_erasers =
25083 {
25084 {
25085 .eraseblocks = { {4 * 1024, 32} },
25086 .block_erase = erase_block_jedec,
25087 }, {
25088 .eraseblocks = { {128 * 1024, 1} },
25089 .block_erase = erase_chip_block_jedec,
25090 }
25091 },
25092 .printlock = printlock_w39l010,
25093 .write = write_jedec_1,
25094 .read = read_memmapped,
25095 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025096 .prepare_access = prepare_memory_access,
25097 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000025098 },
25099
25100 {
25101 .vendor = "Winbond",
25102 .name = "W39L020",
25103 .bustype = BUS_PARALLEL,
25104 .manufacture_id = WINBOND_ID,
25105 .model_id = WINBOND_W39L020,
25106 .total_size = 256,
25107 .page_size = 4 * 1024,
25108 .feature_bits = FEATURE_EITHER_RESET,
25109 .tested = TEST_UNTESTED,
25110 .probe = probe_jedec,
25111 .probe_timing = 10,
25112 .block_erasers =
25113 {
25114 {
25115 .eraseblocks = { {4 * 1024, 64} },
25116 .block_erase = erase_block_jedec,
25117 }, {
25118 .eraseblocks = { {64 * 1024, 4} },
25119 .block_erase = erase_sector_jedec,
25120 }, {
25121 .eraseblocks = { {256 * 1024, 1} },
25122 .block_erase = erase_chip_block_jedec,
25123 }
25124 },
25125 .printlock = printlock_w39l020,
25126 .write = write_jedec_1,
25127 .read = read_memmapped,
25128 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025129 .prepare_access = prepare_memory_access,
25130 .finish_access = finish_memory_access,
Kyösti Mälkkic31243e2012-10-28 01:50:08 +000025131 },
25132
25133 {
25134 .vendor = "Winbond",
Michael Karcher19e0aac2011-03-06 17:58:05 +000025135 .name = "W39L040",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025136 .bustype = BUS_PARALLEL,
Michael Karcher19e0aac2011-03-06 17:58:05 +000025137 .manufacture_id = WINBOND_ID,
25138 .model_id = WINBOND_W39L040,
25139 .total_size = 512,
25140 .page_size = 64 * 1024,
25141 .feature_bits = FEATURE_EITHER_RESET,
25142 .tested = TEST_OK_PR,
25143 .probe = probe_jedec,
25144 .probe_timing = 10,
25145 .block_erasers =
25146 {
25147 {
25148 .eraseblocks = { {4 * 1024, 128} },
25149 .block_erase = erase_block_jedec,
25150 }, {
25151 .eraseblocks = { {64 * 1024, 8} },
25152 .block_erase = erase_sector_jedec,
25153 }, {
25154 .eraseblocks = { {512 * 1024, 1} },
25155 .block_erase = erase_chip_block_jedec,
25156 }
25157 },
25158 .printlock = printlock_w39l040,
25159 .write = write_jedec_1,
25160 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000025161 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025162 .prepare_access = prepare_memory_access,
25163 .finish_access = finish_memory_access,
Michael Karcher19e0aac2011-03-06 17:58:05 +000025164 },
25165
25166 {
25167 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025168 .name = "W39V040A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025169 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025170 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025171 .model_id = WINBOND_W39V040A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025172 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000025173 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000025174 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000025175 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025176 .probe = probe_jedec,
Stefan Tauner716e0982011-07-25 20:38:52 +000025177 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025178 .block_erasers =
25179 {
25180 {
25181 .eraseblocks = { {64 * 1024, 8} },
25182 .block_erase = erase_sector_jedec,
25183 }, {
25184 .eraseblocks = { {512 * 1024, 1} },
25185 .block_erase = erase_chip_block_jedec,
25186 }
25187 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025188 .printlock = printlock_w39v040a,
Sean Nelson35727f72010-01-28 23:55:12 +000025189 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025190 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025191 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025192 .prepare_access = prepare_memory_access,
25193 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025194 },
25195
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025196 {
25197 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025198 .name = "W39V040B",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025199 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025200 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025201 .model_id = WINBOND_W39V040B,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025202 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000025203 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000025204 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000025205 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025206 .probe = probe_jedec,
Paul Menzel018d4822011-10-21 12:33:07 +000025207 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025208 .block_erasers =
25209 {
25210 {
25211 .eraseblocks = { {64 * 1024, 8} },
25212 .block_erase = erase_sector_jedec,
25213 }, {
25214 .eraseblocks = { {512 * 1024, 1} },
25215 .block_erase = erase_chip_block_jedec,
25216 }
25217 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025218 .printlock = printlock_w39v040b,
Sean Nelson35727f72010-01-28 23:55:12 +000025219 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025220 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025221 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025222 .prepare_access = prepare_memory_access,
25223 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025224 },
25225
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025226 {
25227 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025228 .name = "W39V040C",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025229 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025230 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025231 .model_id = WINBOND_W39V040C,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025232 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000025233 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000025234 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzel018d4822011-10-21 12:33:07 +000025235 .tested = TEST_OK_PREW,
Sean Nelson35727f72010-01-28 23:55:12 +000025236 .probe = probe_jedec,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025237 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025238 .block_erasers =
25239 {
25240 {
25241 .eraseblocks = { {64 * 1024, 8} },
25242 .block_erase = erase_sector_jedec,
25243 }, {
25244 .eraseblocks = { {512 * 1024, 1} },
25245 .block_erase = erase_chip_block_jedec,
25246 }
25247 },
Sean Nelson6e0b9122010-02-19 00:52:10 +000025248 .printlock = printlock_w39v040c,
Sean Nelson35727f72010-01-28 23:55:12 +000025249 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025250 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025251 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025252 .prepare_access = prepare_memory_access,
25253 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025254 },
25255
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025256 {
25257 .vendor = "Winbond",
25258 .name = "W39V040FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025259 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025260 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025261 .model_id = WINBOND_W39V040FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025262 .total_size = 512,
Sean Nelson72a9a022009-12-22 22:15:33 +000025263 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010025264 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner23e10b82016-01-23 16:16:49 +000025265 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025266 .probe = probe_jedec,
Antony Rheneus0fbba982011-05-26 14:28:51 +000025267 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025268 .block_erasers =
25269 {
25270 {
25271 .eraseblocks = { {4 * 1024, 128} },
25272 .block_erase = erase_block_jedec,
25273 }, {
25274 .eraseblocks = { {64 * 1024, 8} },
25275 .block_erase = erase_sector_jedec,
25276 }, {
25277 .eraseblocks = { {512 * 1024, 1} },
25278 .block_erase = erase_chip_block_jedec,
25279 }
25280 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025281 .printlock = printlock_w39v040fa,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000025282 .unlock = unlock_regspace2_uniform_64k,
Sean Nelson35727f72010-01-28 23:55:12 +000025283 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025284 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025285 .voltage = {3000, 3600},
Nico Huberb1974022023-01-12 13:13:12 +010025286 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010025287 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025288 },
25289
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025290 {
25291 .vendor = "Winbond",
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025292 .name = "W39V040FB",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025293 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025294 .manufacture_id = WINBOND_ID,
25295 .model_id = WINBOND_W39V040B,
25296 .total_size = 512,
25297 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010025298 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner0be072c2016-03-13 15:16:30 +000025299 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025300 .probe = probe_jedec,
Stefan Tauner0554ca52013-07-25 22:54:25 +000025301 .probe_timing = 10,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025302 .block_erasers =
25303 {
25304 {
25305 .eraseblocks = { {64 * 1024, 8} },
25306 .block_erase = erase_sector_jedec,
25307 }, {
25308 .eraseblocks = { {512 * 1024, 1} },
25309 .block_erase = erase_chip_block_jedec,
25310 }
25311 },
25312 .printlock = printlock_w39v040fb,
Carl-Daniel Hailfingeref3ac8a2014-08-03 13:05:34 +000025313 .unlock = unlock_regspace2_uniform_64k,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025314 .write = write_jedec_1,
25315 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000025316 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010025317 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010025318 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025319 },
25320
25321 {
25322 .vendor = "Winbond",
25323 .name = "W39V040FC",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025324 .bustype = BUS_FWH,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025325 .manufacture_id = WINBOND_ID,
25326 .model_id = WINBOND_W39V040C,
25327 .total_size = 512,
25328 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010025329 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauneraf2db612011-12-02 21:48:17 +000025330 .tested = TEST_OK_PREW,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025331 .probe = probe_jedec,
25332 .probe_timing = 10,
25333 .block_erasers =
25334 {
25335 {
25336 .eraseblocks = { {64 * 1024, 8} },
25337 .block_erase = erase_sector_jedec,
25338 }, {
25339 .eraseblocks = { {512 * 1024, 1} },
25340 .block_erase = erase_chip_block_jedec,
25341 }
25342 },
25343 .printlock = printlock_w39v040fc,
25344 .write = write_jedec_1,
25345 .read = read_memmapped,
Steven Zakulec7d257b42011-07-19 08:50:18 +000025346 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010025347 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010025348 .finish_access = finish_memory_access,
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025349 },
25350
25351 {
25352 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025353 .name = "W39V080A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025354 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025355 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025356 .model_id = WINBOND_W39V080A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025357 .total_size = 1024,
Sean Nelson72a9a022009-12-22 22:15:33 +000025358 .page_size = 64 * 1024,
Sean Nelson35727f72010-01-28 23:55:12 +000025359 .feature_bits = FEATURE_EITHER_RESET,
Paul Menzelac427b22012-02-16 21:07:07 +000025360 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025361 .probe = probe_jedec,
Paul Menzelac427b22012-02-16 21:07:07 +000025362 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025363 .block_erasers =
25364 {
25365 {
25366 .eraseblocks = { {64 * 1024, 16} },
25367 .block_erase = erase_sector_jedec,
25368 }, {
25369 .eraseblocks = { {1024 * 1024, 1} },
25370 .block_erase = erase_chip_block_jedec,
25371 }
25372 },
Carl-Daniel Hailfinger91882402010-12-05 16:33:59 +000025373 .printlock = printlock_w39v080a,
Sean Nelson35727f72010-01-28 23:55:12 +000025374 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025375 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025376 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025377 .prepare_access = prepare_memory_access,
25378 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025379 },
25380
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025381 {
25382 .vendor = "Winbond",
Alan Green1f9cc7d2019-07-01 11:10:45 +100025383 .name = "W39V080FA",
25384 .bustype = BUS_FWH,
25385 .manufacture_id = WINBOND_ID,
25386 .model_id = WINBOND_W39V080FA,
25387 .total_size = 1024,
25388 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010025389 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100025390 .tested = TEST_OK_PREW,
25391 .probe = probe_jedec,
25392 .probe_timing = 10,
25393 .block_erasers =
25394 {
25395 {
25396 .eraseblocks = { {64 * 1024, 16} },
25397 .block_erase = erase_sector_jedec,
25398 }, {
25399 .eraseblocks = { {1024 * 1024, 1} },
25400 .block_erase = erase_chip_block_jedec,
25401 }
25402 },
25403 .printlock = printlock_w39v080fa,
25404 .unlock = unlock_regspace2_uniform_64k,
25405 .write = write_jedec_1,
25406 .read = read_memmapped,
25407 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010025408 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010025409 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100025410 },
25411
25412 {
25413 .vendor = "Winbond",
25414 .name = "W39V080FA (dual mode)",
25415 .bustype = BUS_FWH,
25416 .manufacture_id = WINBOND_ID,
25417 .model_id = WINBOND_W39V080FA_DM,
25418 .total_size = 512,
25419 .page_size = 64 * 1024,
Nico Huberb1974022023-01-12 13:13:12 +010025420 .feature_bits = FEATURE_EITHER_RESET,
Alan Green1f9cc7d2019-07-01 11:10:45 +100025421 .tested = TEST_UNTESTED,
25422 .probe = probe_jedec,
25423 .probe_timing = 10,
25424 .block_erasers =
25425 {
25426 {
25427 .eraseblocks = { {64 * 1024, 8} },
25428 .block_erase = erase_sector_jedec,
25429 }, {
25430 .eraseblocks = { {512 * 1024, 1} },
25431 .block_erase = erase_chip_block_jedec,
25432 }
25433 },
25434 .printlock = printlock_w39v080fa_dual,
25435 .write = write_jedec_1,
25436 .read = read_memmapped,
25437 .voltage = {3000, 3600}, /* Also has 12V fast program */
Nico Huberb1974022023-01-12 13:13:12 +010025438 .prepare_access = prepare_memory_register_access,
Nico Huber9eec4072023-01-12 01:17:30 +010025439 .finish_access = finish_memory_access,
Alan Green1f9cc7d2019-07-01 11:10:45 +100025440 },
25441
25442 {
25443 .vendor = "Winbond",
Mattias Mattssona745cf42010-09-14 23:56:56 +000025444 .name = "W49F002U/N",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025445 .bustype = BUS_PARALLEL,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025446 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025447 .model_id = WINBOND_W49F002U,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025448 .total_size = 256,
25449 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000025450 .feature_bits = FEATURE_EITHER_RESET,
Stefan Tauner716e0982011-07-25 20:38:52 +000025451 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025452 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000025453 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025454 .block_erasers =
25455 {
25456 {
25457 .eraseblocks = {
25458 {128 * 1024, 1},
25459 {96 * 1024, 1},
25460 {8 * 1024, 2},
25461 {16 * 1024, 1},
25462 },
25463 .block_erase = erase_sector_jedec,
25464 }, {
25465 .eraseblocks = { {256 * 1024, 1} },
25466 .block_erase = erase_chip_block_jedec,
25467 }
25468 },
Sean Nelson35727f72010-01-28 23:55:12 +000025469 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025470 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025471 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010025472 .prepare_access = prepare_memory_access,
25473 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025474 },
25475
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025476 {
25477 .vendor = "Winbond",
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000025478 .name = "W49F020",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025479 .bustype = BUS_PARALLEL,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000025480 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025481 .model_id = WINBOND_W49F020,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000025482 .total_size = 256,
25483 .page_size = 128,
25484 .feature_bits = FEATURE_EITHER_RESET,
25485 .tested = TEST_OK_PROBE,
25486 .probe = probe_jedec,
25487 .probe_timing = 10,
25488 .block_erasers =
25489 {
25490 {
25491 .eraseblocks = { {256 * 1024, 1} },
25492 .block_erase = erase_chip_block_jedec,
25493 }
25494 },
25495 .write = write_jedec_1,
25496 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025497 .voltage = {4500, 5500},
Nico Huber9eec4072023-01-12 01:17:30 +010025498 .prepare_access = prepare_memory_access,
25499 .finish_access = finish_memory_access,
Carl-Daniel Hailfingerabebe6b2010-07-17 13:45:42 +000025500 },
25501
25502 {
25503 .vendor = "Winbond",
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025504 .name = "W49V002A",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025505 .bustype = BUS_LPC,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025506 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025507 .model_id = WINBOND_W49V002A,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025508 .total_size = 256,
25509 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000025510 .feature_bits = FEATURE_EITHER_RESET,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000025511 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025512 .probe = probe_jedec,
Cristian Măgherușan-Stanciu9932c7b2011-07-07 19:56:58 +000025513 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025514 .block_erasers =
25515 {
25516 {
25517 .eraseblocks = {
25518 {64 * 1024, 3},
25519 {32 * 1024, 1},
25520 {8 * 1024, 2},
25521 {16 * 1024, 1},
25522 },
25523 .block_erase = erase_sector_jedec,
25524 }, {
25525 .eraseblocks = { {256 * 1024, 1} },
25526 .block_erase = erase_chip_block_jedec,
25527 }
25528 },
Sean Nelson35727f72010-01-28 23:55:12 +000025529 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025530 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025531 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025532 .prepare_access = prepare_memory_access,
25533 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025534 },
25535
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025536 {
25537 .vendor = "Winbond",
25538 .name = "W49V002FA",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000025539 .bustype = BUS_FWH,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025540 .manufacture_id = WINBOND_ID,
Mattias Mattssona745cf42010-09-14 23:56:56 +000025541 .model_id = WINBOND_W49V002FA,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025542 .total_size = 256,
25543 .page_size = 128,
Sean Nelson35727f72010-01-28 23:55:12 +000025544 .feature_bits = FEATURE_EITHER_RESET,
Stefan Taunereb582572012-09-21 12:52:50 +000025545 .tested = TEST_OK_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025546 .probe = probe_jedec,
Udu Ogahc04ee222009-09-05 01:31:32 +000025547 .probe_timing = 10,
Sean Nelsoncfc35cd2010-01-19 03:24:55 +000025548 .block_erasers =
25549 {
25550 {
25551 .eraseblocks = {
25552 {64 * 1024, 3},
25553 {32 * 1024, 1},
25554 {8 * 1024, 2},
25555 {16 * 1024, 1},
25556 },
25557 .block_erase = erase_sector_jedec,
25558 }, {
25559 .eraseblocks = { {256 * 1024, 1} },
25560 .block_erase = erase_chip_block_jedec,
25561 }
25562 },
Sean Nelson35727f72010-01-28 23:55:12 +000025563 .write = write_jedec_1,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000025564 .read = read_memmapped,
Steven Zakuleccbe370e2011-06-03 07:26:31 +000025565 .voltage = {3000, 3600},
Nico Huber9eec4072023-01-12 01:17:30 +010025566 .prepare_access = prepare_memory_access,
25567 .finish_access = finish_memory_access,
FENG yu ningff692fb2008-12-08 18:15:10 +000025568 },
25569
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000025570 {
luke heef884232020-12-28 18:22:21 +080025571 .vendor = "XMC",
25572 .name = "XM25QH128C",
25573 .bustype = BUS_SPI,
25574 .manufacture_id = ST_ID,
25575 .model_id = XMC_XM25QH128C,
25576 .total_size = 16384,
25577 .page_size = 256,
Nico Huber1412d9f2024-01-06 18:25:49 +010025578 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
25579 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025580 .tested = TEST_UNTESTED,
25581 .probe = probe_spi_rdid,
25582 .probe_timing = TIMING_ZERO,
25583 .block_erasers =
25584 {
25585 {
25586 .eraseblocks = { {4 * 1024, 4096} },
25587 .block_erase = spi_block_erase_20,
25588 }, {
25589 .eraseblocks = { {32 * 1024, 512} },
25590 .block_erase = spi_block_erase_52,
25591 }, {
25592 .eraseblocks = { {64 * 1024, 256} },
25593 .block_erase = spi_block_erase_d8,
25594 }, {
25595 .eraseblocks = { {16 * 1024 * 1024, 1} },
25596 .block_erase = spi_block_erase_60,
25597 }, {
25598 .eraseblocks = { {16 * 1024 * 1024, 1} },
25599 .block_erase = spi_block_erase_c7,
25600 }
25601 },
25602 .printlock = spi_prettyprint_status_register_plain,
25603 .unlock = spi_disable_blockprotect,
25604 .write = spi_chip_write_256,
25605 .read = spi_chip_read,
25606 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025607 .reg_bits =
25608 {
Nico Huber96786d02024-01-06 18:30:15 +010025609 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025610 .srp = {STATUS1, 7, RW},
25611 .srl = {STATUS2, 0, RW},
25612 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
25613 .tb = {STATUS1, 5, RW},
25614 .sec = {STATUS1, 6, RW},
25615 .cmp = {STATUS2, 6, RW},
25616 },
Nico Huberaabb3e02023-01-13 00:22:30 +010025617 .wp_write_cfg = spi_wp_write_cfg,
25618 .wp_read_cfg = spi_wp_read_cfg,
25619 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025620 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020025621 .prepare_access = spi_prepare_io,
25622 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025623 },
25624
25625 {
25626 .vendor = "XMC",
25627 .name = "XM25QH256C",
25628 .bustype = BUS_SPI,
25629 .manufacture_id = ST_ID,
25630 .model_id = XMC_XM25QH256C,
25631 .total_size = 32768,
25632 .page_size = 256,
25633 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010025634 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
25635 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
25636 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025637 .tested = TEST_UNTESTED,
25638 .probe = probe_spi_rdid,
25639 .probe_timing = TIMING_ZERO,
25640 .block_erasers =
25641 {
25642 {
25643 .eraseblocks = { {4 * 1024, 8192} },
25644 .block_erase = spi_block_erase_21,
25645 }, {
25646 .eraseblocks = { {4 * 1024, 8192} },
25647 .block_erase = spi_block_erase_20,
25648 }, {
25649 .eraseblocks = { {32 * 1024, 1024} },
25650 .block_erase = spi_block_erase_52,
25651 }, {
25652 .eraseblocks = { {64 * 1024, 512} },
25653 .block_erase = spi_block_erase_dc,
25654 }, {
25655 .eraseblocks = { {64 * 1024, 512} },
25656 .block_erase = spi_block_erase_d8,
25657 }, {
25658 .eraseblocks = { {32 * 1024 * 1024, 1} },
25659 .block_erase = spi_block_erase_60,
25660 }, {
25661 .eraseblocks = { {32 * 1024 * 1024, 1} },
25662 .block_erase = spi_block_erase_c7,
25663 }
25664 },
25665 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
25666 .unlock = spi_disable_blockprotect,
25667 .write = spi_chip_write_256,
25668 .read = spi_chip_read,
25669 .voltage = {2700, 3600},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025670 .reg_bits =
25671 {
Nico Huber96786d02024-01-06 18:30:15 +010025672 .qe = {STATUS2, 1, RW},
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025673 .srp = {STATUS1, 7, RW},
25674 .srl = {STATUS2, 0, RW},
25675 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
25676 .tb = {STATUS1, 6, RW},
25677 },
Nico Huberaabb3e02023-01-13 00:22:30 +010025678 .wp_write_cfg = spi_wp_write_cfg,
25679 .wp_read_cfg = spi_wp_read_cfg,
25680 .wp_get_ranges = spi_wp_get_available_ranges,
Nikolai Artemievd32e18b2022-02-15 18:06:55 +110025681 .decode_range = decode_range_spi25,
Nico Huber930d4212024-05-04 18:59:15 +020025682 .prepare_access = spi_prepare_io,
25683 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025684 },
25685
25686 {
25687 .vendor = "XMC",
25688 .name = "XM25QH64C",
25689 .bustype = BUS_SPI,
25690 .manufacture_id = ST_ID,
25691 .model_id = XMC_XM25QH64C,
25692 .total_size = 8192,
25693 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010025694 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010025695 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025696 .tested = TEST_UNTESTED,
25697 .probe = probe_spi_rdid,
25698 .probe_timing = TIMING_ZERO,
25699 .block_erasers =
25700 {
25701 {
25702 .eraseblocks = { {4 * 1024, 2048} },
25703 .block_erase = spi_block_erase_20,
25704 }, {
25705 .eraseblocks = { {32 * 1024, 256} },
25706 .block_erase = spi_block_erase_52,
25707 }, {
25708 .eraseblocks = { {64 * 1024, 128} },
25709 .block_erase = spi_block_erase_d8,
25710 }, {
25711 .eraseblocks = { {8 * 1024 * 1024, 1} },
25712 .block_erase = spi_block_erase_60,
25713 }, {
25714 .eraseblocks = { {8 * 1024 * 1024, 1} },
25715 .block_erase = spi_block_erase_c7,
25716 }
25717 },
Nico Huber96786d02024-01-06 18:30:15 +010025718 .reg_bits =
25719 {
25720 .qe = {STATUS2, 1, RW},
25721 },
luke heef884232020-12-28 18:22:21 +080025722 .printlock = spi_prettyprint_status_register_plain,
25723 .unlock = spi_disable_blockprotect,
25724 .write = spi_chip_write_256,
25725 .read = spi_chip_read,
25726 .voltage = {2700, 3600},
Nico Huber930d4212024-05-04 18:59:15 +020025727 .prepare_access = spi_prepare_io,
25728 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025729 },
25730
25731 {
25732 .vendor = "XMC",
25733 .name = "XM25QU128C",
25734 .bustype = BUS_SPI,
25735 .manufacture_id = ST_ID,
25736 .model_id = XMC_XM25QU128C,
25737 .total_size = 16384,
25738 .page_size = 256,
25739 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010025740 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010025741 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025742 .tested = TEST_UNTESTED,
25743 .probe = probe_spi_rdid,
25744 .probe_timing = TIMING_ZERO,
25745 .block_erasers =
25746 {
25747 {
25748 .eraseblocks = { {4 * 1024, 4096} },
25749 .block_erase = spi_block_erase_20,
25750 }, {
25751 .eraseblocks = { {32 * 1024, 512} },
25752 .block_erase = spi_block_erase_52,
25753 }, {
25754 .eraseblocks = { {64 * 1024, 256} },
25755 .block_erase = spi_block_erase_d8,
25756 }, {
25757 .eraseblocks = { {16 * 1024 * 1024, 1} },
25758 .block_erase = spi_block_erase_60,
25759 }, {
25760 .eraseblocks = { {16 * 1024 * 1024, 1} },
25761 .block_erase = spi_block_erase_c7,
25762 }
25763 },
Nico Huber96786d02024-01-06 18:30:15 +010025764 .reg_bits =
25765 {
25766 .qe = {STATUS2, 1, RW},
25767 },
luke heef884232020-12-28 18:22:21 +080025768 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
25769 .unlock = spi_disable_blockprotect,
25770 .write = spi_chip_write_256,
25771 .read = spi_chip_read,
25772 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020025773 .prepare_access = spi_prepare_io,
25774 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025775 },
25776
25777 {
25778 .vendor = "XMC",
25779 .name = "XM25QU256C",
25780 .bustype = BUS_SPI,
25781 .manufacture_id = ST_ID,
25782 .model_id = XMC_XM25QU256C,
25783 .total_size = 32768,
25784 .page_size = 256,
25785 /* supports SFDP */
Nico Huber96786d02024-01-06 18:30:15 +010025786 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP |
25787 FEATURE_4BA_WREN | FEATURE_QPI_SRP,
25788 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025789 .tested = TEST_UNTESTED,
25790 .probe = probe_spi_rdid,
25791 .probe_timing = TIMING_ZERO,
25792 .block_erasers =
25793 {
25794 {
25795 .eraseblocks = { {4 * 1024, 8192} },
25796 .block_erase = spi_block_erase_21,
25797 }, {
25798 .eraseblocks = { {4 * 1024, 8192} },
25799 .block_erase = spi_block_erase_20,
25800 }, {
25801 .eraseblocks = { {32 * 1024, 1024} },
25802 .block_erase = spi_block_erase_52,
25803 }, {
25804 .eraseblocks = { {64 * 1024, 512} },
25805 .block_erase = spi_block_erase_dc,
25806 }, {
25807 .eraseblocks = { {64 * 1024, 512} },
25808 .block_erase = spi_block_erase_d8,
25809 }, {
25810 .eraseblocks = { {32 * 1024 * 1024, 1} },
25811 .block_erase = spi_block_erase_60,
25812 }, {
25813 .eraseblocks = { {32 * 1024 * 1024, 1} },
25814 .block_erase = spi_block_erase_c7,
25815 }
25816 },
Nico Huber96786d02024-01-06 18:30:15 +010025817 .reg_bits =
25818 {
25819 .qe = {STATUS2, 1, RW},
25820 },
luke heef884232020-12-28 18:22:21 +080025821 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
25822 .unlock = spi_disable_blockprotect,
25823 .write = spi_chip_write_256,
25824 .read = spi_chip_read,
25825 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020025826 .prepare_access = spi_prepare_io,
25827 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025828 },
25829
25830 {
25831 .vendor = "XMC",
25832 .name = "XM25QU64C",
25833 .bustype = BUS_SPI,
25834 .manufacture_id = ST_ID,
25835 .model_id = XMC_XM25QU64C,
25836 .total_size = 8192,
25837 .page_size = 256,
Nico Huber96786d02024-01-06 18:30:15 +010025838 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_OTP | FEATURE_QPI_SRP,
Nico Huber1412d9f2024-01-06 18:25:49 +010025839 .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
luke heef884232020-12-28 18:22:21 +080025840 .tested = TEST_UNTESTED,
25841 .probe = probe_spi_rdid,
25842 .probe_timing = TIMING_ZERO,
25843 .block_erasers =
25844 {
25845 {
25846 .eraseblocks = { {4 * 1024, 2048} },
25847 .block_erase = spi_block_erase_20,
25848 }, {
25849 .eraseblocks = { {32 * 1024, 256} },
25850 .block_erase = spi_block_erase_52,
25851 }, {
25852 .eraseblocks = { {64 * 1024, 128} },
25853 .block_erase = spi_block_erase_d8,
25854 }, {
25855 .eraseblocks = { {8 * 1024 * 1024, 1} },
25856 .block_erase = spi_block_erase_60,
25857 }, {
25858 .eraseblocks = { {8 * 1024 * 1024, 1} },
25859 .block_erase = spi_block_erase_c7,
25860 }
25861 },
Nico Huber96786d02024-01-06 18:30:15 +010025862 .reg_bits =
25863 {
25864 .qe = {STATUS2, 1, RW},
25865 },
luke heef884232020-12-28 18:22:21 +080025866 .printlock = spi_prettyprint_status_register_plain,
25867 .unlock = spi_disable_blockprotect,
25868 .write = spi_chip_write_256,
25869 .read = spi_chip_read,
25870 .voltage = {1650, 1950},
Nico Huber930d4212024-05-04 18:59:15 +020025871 .prepare_access = spi_prepare_io,
25872 .finish_access = spi_finish_io,
luke heef884232020-12-28 18:22:21 +080025873 },
25874
25875 {
Nico Huber46e42092024-10-20 18:21:43 +020025876 .vendor = "XTX Technology",
25877 .name = "XT25F02E",
25878 .bustype = BUS_SPI,
25879 .manufacture_id = XTX_ID,
25880 .model_id = XTX_XT25F02E,
25881 .total_size = 256,
25882 .page_size = 256,
25883 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_DIO,
25884 .tested = TEST_UNTESTED,
25885 .probe = probe_spi_rdid,
25886 .probe_timing = TIMING_ZERO,
25887 .block_erasers =
25888 {
25889 {
25890 .eraseblocks = { {4 * 1024, 64} },
25891 .block_erase = spi_block_erase_20,
25892 }, {
25893 .eraseblocks = { {64 * 1024, 4} },
25894 .block_erase = spi_block_erase_d8,
25895 }, {
25896 .eraseblocks = { {256 * 1024, 1} },
25897 .block_erase = spi_block_erase_60,
25898 }, {
25899 .eraseblocks = { {256 * 1024, 1} },
25900 .block_erase = spi_block_erase_c7,
25901 },
25902 },
25903 .printlock = spi_prettyprint_status_register_default_welwip,
25904 .unlock = spi_disable_blockprotect,
25905 .write = spi_chip_write_256,
25906 .read = spi_chip_read,
25907 .voltage = {2700, 3600},
25908 .prepare_access = spi_prepare_io,
25909 .finish_access = spi_finish_io,
25910 },
25911
25912 {
25913 .vendor = "XTX Technology",
25914 .name = "XT25F04D",
25915 .bustype = BUS_SPI,
25916 .manufacture_id = XTX_ID,
25917 .model_id = XTX_XT25F04D,
25918 .total_size = 512,
25919 .page_size = 256,
25920 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_DIO,
25921 .tested = TEST_UNTESTED,
25922 .probe = probe_spi_rdid,
25923 .probe_timing = TIMING_ZERO,
25924 .block_erasers =
25925 {
25926 {
25927 .eraseblocks = { {4 * 1024, 128} },
25928 .block_erase = spi_block_erase_20,
25929 }, {
25930 .eraseblocks = { {32 * 1024, 16} },
25931 .block_erase = spi_block_erase_52,
25932 }, {
25933 .eraseblocks = { {64 * 1024, 8} },
25934 .block_erase = spi_block_erase_d8,
25935 }, {
25936 .eraseblocks = { {512 * 1024, 1} },
25937 .block_erase = spi_block_erase_60,
25938 }, {
25939 .eraseblocks = { {512 * 1024, 1} },
25940 .block_erase = spi_block_erase_c7,
25941 },
25942 },
25943 .printlock = spi_prettyprint_status_register_bp2_srwd,
25944 .unlock = spi_disable_blockprotect_bp2_srwd,
25945 .write = spi_chip_write_256,
25946 .read = spi_chip_read,
25947 .voltage = {2700, 3600},
25948 .prepare_access = spi_prepare_io,
25949 .finish_access = spi_finish_io,
25950 },
25951
25952 {
25953 .vendor = "XTX Technology",
25954 .name = "XT25F08B",
25955 .bustype = BUS_SPI,
25956 .manufacture_id = XTX_ID,
25957 .model_id = XTX_XT25F08B,
25958 .total_size = 1024,
25959 .page_size = 256,
Nico Huber37e07a82025-02-26 23:26:59 +010025960 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_QIO,
Nico Huber46e42092024-10-20 18:21:43 +020025961 .tested = TEST_UNTESTED,
25962 .probe = probe_spi_rdid,
25963 .probe_timing = TIMING_ZERO,
25964 .block_erasers =
25965 {
25966 {
25967 .eraseblocks = { {4 * 1024, 256} },
25968 .block_erase = spi_block_erase_20,
25969 }, {
25970 .eraseblocks = { {32 * 1024, 32} },
25971 .block_erase = spi_block_erase_52,
25972 }, {
25973 .eraseblocks = { {64 * 1024, 16} },
25974 .block_erase = spi_block_erase_d8,
25975 }, {
25976 .eraseblocks = { {1024 * 1024, 1} },
25977 .block_erase = spi_block_erase_60,
25978 }, {
25979 .eraseblocks = { {1024 * 1024, 1} },
25980 .block_erase = spi_block_erase_c7,
25981 },
25982 },
Nico Huber37e07a82025-02-26 23:26:59 +010025983 .reg_bits =
25984 {
25985 .qe = {STATUS2, 1, RW},
25986 },
Nico Huber46e42092024-10-20 18:21:43 +020025987 .printlock = spi_prettyprint_status_register_bp3_srwd,
25988 .unlock = spi_disable_blockprotect_bp3_srwd,
25989 .write = spi_chip_write_256,
25990 .read = spi_chip_read,
25991 .voltage = {2700, 3600},
25992 .prepare_access = spi_prepare_io,
25993 .finish_access = spi_finish_io,
25994 },
25995
25996 {
Nico Huberc64a8032024-10-20 19:14:19 +020025997 .vendor = "XTX Technology",
25998 .name = "XT25F16B",
25999 .bustype = BUS_SPI,
26000 .manufacture_id = XTX_ID,
26001 .model_id = XTX_XT25F16B,
26002 .total_size = 2048,
26003 .page_size = 256,
26004 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26005 FEATURE_OTP | FEATURE_QIO,
26006 .tested = TEST_UNTESTED,
26007 .probe = probe_spi_rdid,
26008 .probe_timing = TIMING_ZERO,
26009 .block_erasers =
26010 {
26011 {
26012 .eraseblocks = { {4 * 1024, 512} },
26013 .block_erase = spi_block_erase_20,
26014 }, {
26015 .eraseblocks = { {32 * 1024, 64} },
26016 .block_erase = spi_block_erase_52,
26017 }, {
26018 .eraseblocks = { {64 * 1024, 32} },
26019 .block_erase = spi_block_erase_d8,
26020 }, {
26021 .eraseblocks = { {2048 * 1024, 1} },
26022 .block_erase = spi_block_erase_60,
26023 }, {
26024 .eraseblocks = { {2048 * 1024, 1} },
26025 .block_erase = spi_block_erase_c7,
26026 },
26027 },
26028 .reg_bits =
26029 {
26030 .qe = {STATUS2, 1, RW},
26031 .srp = {STATUS1, 7, RW},
26032 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26033 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26034 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26035 .cmp = {STATUS2, 6, RW},
26036 },
26037 .wp_write_cfg = spi_wp_write_cfg,
26038 .wp_read_cfg = spi_wp_read_cfg,
26039 .wp_get_ranges = spi_wp_get_available_ranges,
26040 .decode_range = decode_range_spi25,
26041 .printlock = spi_prettyprint_status_register_bp4_srwd,
26042 .unlock = spi_disable_blockprotect_bp4_srwd,
26043 .write = spi_chip_write_256,
26044 .read = spi_chip_read,
26045 .voltage = {2700, 3600},
26046 .prepare_access = spi_prepare_io,
26047 .finish_access = spi_finish_io,
26048 },
26049
26050 {
26051 .vendor = "XTX Technology",
26052 .name = "XT25F32B",
26053 .bustype = BUS_SPI,
26054 .manufacture_id = XTX_ID,
26055 .model_id = XTX_XT25F32B,
26056 .total_size = 4096,
26057 .page_size = 256,
26058 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26059 FEATURE_OTP | FEATURE_QPI_SRP,
26060 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26061 .tested = TEST_UNTESTED,
26062 .probe = probe_spi_rdid,
26063 .probe_timing = TIMING_ZERO,
26064 .block_erasers =
26065 {
26066 {
26067 .eraseblocks = { {4 * 1024, 1024} },
26068 .block_erase = spi_block_erase_20,
26069 }, {
26070 .eraseblocks = { {32 * 1024, 128} },
26071 .block_erase = spi_block_erase_52,
26072 }, {
26073 .eraseblocks = { {64 * 1024, 64} },
26074 .block_erase = spi_block_erase_d8,
26075 }, {
26076 .eraseblocks = { {4096 * 1024, 1} },
26077 .block_erase = spi_block_erase_60,
26078 }, {
26079 .eraseblocks = { {4096 * 1024, 1} },
26080 .block_erase = spi_block_erase_c7,
26081 },
26082 },
26083 .reg_bits =
26084 {
26085 .qe = {STATUS2, 1, RW},
26086 .srp = {STATUS1, 7, RW},
26087 .srl = {STATUS2, 0, RW},
26088 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26089 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26090 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26091 .cmp = {STATUS2, 6, RW},
26092 },
26093 .wp_write_cfg = spi_wp_write_cfg,
26094 .wp_read_cfg = spi_wp_read_cfg,
26095 .wp_get_ranges = spi_wp_get_available_ranges,
26096 .decode_range = decode_range_spi25,
26097 .printlock = spi_prettyprint_status_register_bp4_srwd,
26098 .unlock = spi_disable_blockprotect_bp4_srwd,
26099 .write = spi_chip_write_256,
26100 .read = spi_chip_read,
26101 .voltage = {2700, 3600},
26102 .prepare_access = spi_prepare_io,
26103 .finish_access = spi_finish_io,
26104 },
26105
26106 {
26107 .vendor = "XTX Technology",
26108 .name = "XT25F64B",
26109 .bustype = BUS_SPI,
26110 .manufacture_id = XTX_ID,
26111 .model_id = XTX_XT25F64B,
26112 .total_size = 8192,
26113 .page_size = 256,
26114 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 |
26115 FEATURE_OTP | FEATURE_QPI_SRP,
26116 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26117 .tested = TEST_UNTESTED,
26118 .probe = probe_spi_rdid,
26119 .probe_timing = TIMING_ZERO,
26120 .block_erasers =
26121 {
26122 {
26123 .eraseblocks = { {4 * 1024, 2048} },
26124 .block_erase = spi_block_erase_20,
26125 }, {
26126 .eraseblocks = { {32 * 1024, 256} },
26127 .block_erase = spi_block_erase_52,
26128 }, {
26129 .eraseblocks = { {64 * 1024, 128} },
26130 .block_erase = spi_block_erase_d8,
26131 }, {
26132 .eraseblocks = { {8192 * 1024, 1} },
26133 .block_erase = spi_block_erase_60,
26134 }, {
26135 .eraseblocks = { {8192 * 1024, 1} },
26136 .block_erase = spi_block_erase_c7,
26137 },
26138 },
26139 .reg_bits =
26140 {
26141 .qe = {STATUS2, 1, RW},
26142 .srp = {STATUS1, 7, RW},
26143 .srl = {STATUS2, 0, RW},
26144 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26145 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26146 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26147 .cmp = {STATUS2, 6, RW},
26148 },
26149 .wp_write_cfg = spi_wp_write_cfg,
26150 .wp_read_cfg = spi_wp_read_cfg,
26151 .wp_get_ranges = spi_wp_get_available_ranges,
26152 .decode_range = decode_range_spi25,
26153 .printlock = spi_prettyprint_status_register_bp4_srwd,
26154 .unlock = spi_disable_blockprotect_bp4_srwd,
26155 .write = spi_chip_write_256,
26156 .read = spi_chip_read,
26157 .voltage = {2700, 3600},
26158 .prepare_access = spi_prepare_io,
26159 .finish_access = spi_finish_io,
26160 },
26161
26162 {
26163 .vendor = "XTX Technology",
26164 .name = "XT25F128B",
26165 .bustype = BUS_SPI,
26166 .manufacture_id = XTX_ID,
26167 .model_id = XTX_XT25F128B,
26168 .total_size = 16384,
26169 .page_size = 256,
26170 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR_EXT2 |
26171 FEATURE_OTP | FEATURE_QPI_SRP,
26172 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26173 .tested = TEST_UNTESTED,
26174 .probe = probe_spi_rdid,
26175 .probe_timing = TIMING_ZERO,
26176 .block_erasers =
26177 {
26178 {
26179 .eraseblocks = { {4 * 1024, 4096} },
26180 .block_erase = spi_block_erase_20,
26181 }, {
26182 .eraseblocks = { {32 * 1024, 512} },
26183 .block_erase = spi_block_erase_52,
26184 }, {
26185 .eraseblocks = { {64 * 1024, 256} },
26186 .block_erase = spi_block_erase_d8,
26187 }, {
26188 .eraseblocks = { {16384 * 1024, 1} },
26189 .block_erase = spi_block_erase_60,
26190 }, {
26191 .eraseblocks = { {16384 * 1024, 1} },
26192 .block_erase = spi_block_erase_c7,
26193 },
26194 },
26195 .reg_bits =
26196 {
26197 .qe = {STATUS2, 1, RW},
26198 .srp = {STATUS1, 7, RW},
26199 .srl = {STATUS2, 0, RW},
26200 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26201 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26202 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26203 .cmp = {STATUS2, 6, RW},
26204 .wps = {STATUS2, 4, RW},
26205 },
26206 .wp_write_cfg = spi_wp_write_cfg,
26207 .wp_read_cfg = spi_wp_read_cfg,
26208 .wp_get_ranges = spi_wp_get_available_ranges,
26209 .decode_range = decode_range_spi25,
26210 .printlock = spi_prettyprint_status_register_bp4_srwd,
26211 .unlock = spi_disable_blockprotect_bp4_srwd,
26212 .write = spi_chip_write_256,
26213 .read = spi_chip_read,
26214 .voltage = {2700, 3600},
26215 .prepare_access = spi_prepare_io,
26216 .finish_access = spi_finish_io,
26217 },
26218
26219 {
Nico Huber56d727e2024-10-20 22:46:12 +020026220 .vendor = "XTX Technology",
26221 .name = "XT25F16F",
26222 .bustype = BUS_SPI,
26223 .manufacture_id = XTX_ID,
26224 .model_id = XTX_XT25F16B,
26225 .total_size = 2048,
26226 .page_size = 256,
26227 /* Supports full QIO but has a non-volatile DC bit. */
26228 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26229 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
26230 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
26231 .tested = TEST_UNTESTED,
26232 .probe = probe_spi_rdid,
26233 .probe_timing = TIMING_ZERO,
26234 .block_erasers =
26235 {
26236 {
26237 .eraseblocks = { {4 * 1024, 512} },
26238 .block_erase = spi_block_erase_20,
26239 }, {
26240 .eraseblocks = { {32 * 1024, 64} },
26241 .block_erase = spi_block_erase_52,
26242 }, {
26243 .eraseblocks = { {64 * 1024, 32} },
26244 .block_erase = spi_block_erase_d8,
26245 }, {
26246 .eraseblocks = { {2048 * 1024, 1} },
26247 .block_erase = spi_block_erase_60,
26248 }, {
26249 .eraseblocks = { {2048 * 1024, 1} },
26250 .block_erase = spi_block_erase_c7,
26251 },
26252 },
26253 .reg_bits =
26254 {
26255 .qe = {STATUS2, 1, RW},
26256 .dc = {{STATUS3, 0, RW}},
26257 .srp = {STATUS1, 7, RW},
26258 .srl = {STATUS2, 0, RW},
26259 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26260 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26261 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26262 .cmp = {STATUS2, 6, RW},
26263 },
26264 .wp_write_cfg = spi_wp_write_cfg,
26265 .wp_read_cfg = spi_wp_read_cfg,
26266 .wp_get_ranges = spi_wp_get_available_ranges,
26267 .decode_range = decode_range_spi25,
26268 .printlock = spi_prettyprint_status_register_bp4_srwd,
26269 .unlock = spi_disable_blockprotect_bp4_srwd,
26270 .write = spi_chip_write_256,
26271 .read = spi_chip_read,
26272 .voltage = {2700, 3600},
26273 .prepare_access = spi_prepare_io,
26274 .finish_access = spi_finish_io,
26275 },
26276
26277 {
26278 .vendor = "XTX Technology",
26279 .name = "XT25F32F",
26280 .bustype = BUS_SPI,
26281 .manufacture_id = XTX_ID,
26282 .model_id = XTX_XT25F32B,
26283 .total_size = 4096,
26284 .page_size = 256,
26285 /* Supports full QIO but has a non-volatile DC bit. */
26286 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26287 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
26288 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
26289 .tested = TEST_UNTESTED,
26290 .probe = probe_spi_rdid,
26291 .probe_timing = TIMING_ZERO,
26292 .block_erasers =
26293 {
26294 {
26295 .eraseblocks = { {4 * 1024, 1024} },
26296 .block_erase = spi_block_erase_20,
26297 }, {
26298 .eraseblocks = { {32 * 1024, 128} },
26299 .block_erase = spi_block_erase_52,
26300 }, {
26301 .eraseblocks = { {64 * 1024, 64} },
26302 .block_erase = spi_block_erase_d8,
26303 }, {
26304 .eraseblocks = { {4096 * 1024, 1} },
26305 .block_erase = spi_block_erase_60,
26306 }, {
26307 .eraseblocks = { {4096 * 1024, 1} },
26308 .block_erase = spi_block_erase_c7,
26309 },
26310 },
26311 .reg_bits =
26312 {
26313 .qe = {STATUS2, 1, RW},
26314 .dc = {{STATUS3, 0, RW}},
26315 .srp = {STATUS1, 7, RW},
26316 .srl = {STATUS2, 0, RW},
26317 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26318 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26319 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26320 .cmp = {STATUS2, 6, RW},
26321 },
26322 .wp_write_cfg = spi_wp_write_cfg,
26323 .wp_read_cfg = spi_wp_read_cfg,
26324 .wp_get_ranges = spi_wp_get_available_ranges,
26325 .decode_range = decode_range_spi25,
26326 .printlock = spi_prettyprint_status_register_bp4_srwd,
26327 .unlock = spi_disable_blockprotect_bp4_srwd,
26328 .write = spi_chip_write_256,
26329 .read = spi_chip_read,
26330 .voltage = {2700, 3600},
26331 .prepare_access = spi_prepare_io,
26332 .finish_access = spi_finish_io,
26333 },
26334
26335 {
26336 .vendor = "XTX Technology",
26337 .name = "XT25F64F",
26338 .bustype = BUS_SPI,
26339 .manufacture_id = XTX_ID,
26340 .model_id = XTX_XT25F64B,
26341 .total_size = 8192,
26342 .page_size = 256,
26343 /* Supports full QIO but has a non-volatile DC bit. */
26344 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26345 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
26346 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
26347 .tested = TEST_UNTESTED,
26348 .probe = probe_spi_rdid,
26349 .probe_timing = TIMING_ZERO,
26350 .block_erasers =
26351 {
26352 {
26353 .eraseblocks = { {4 * 1024, 2048} },
26354 .block_erase = spi_block_erase_20,
26355 }, {
26356 .eraseblocks = { {32 * 1024, 256} },
26357 .block_erase = spi_block_erase_52,
26358 }, {
26359 .eraseblocks = { {64 * 1024, 128} },
26360 .block_erase = spi_block_erase_d8,
26361 }, {
26362 .eraseblocks = { {8192 * 1024, 1} },
26363 .block_erase = spi_block_erase_60,
26364 }, {
26365 .eraseblocks = { {8192 * 1024, 1} },
26366 .block_erase = spi_block_erase_c7,
26367 },
26368 },
26369 .reg_bits =
26370 {
26371 .qe = {STATUS2, 1, RW},
26372 .dc = {{STATUS3, 0, RW}},
26373 .srp = {STATUS1, 7, RW},
26374 .srl = {STATUS2, 0, RW},
26375 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26376 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26377 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26378 .cmp = {STATUS2, 6, RW},
26379 },
26380 .wp_write_cfg = spi_wp_write_cfg,
26381 .wp_read_cfg = spi_wp_read_cfg,
26382 .wp_get_ranges = spi_wp_get_available_ranges,
26383 .decode_range = decode_range_spi25,
26384 .printlock = spi_prettyprint_status_register_bp4_srwd,
26385 .unlock = spi_disable_blockprotect_bp4_srwd,
26386 .write = spi_chip_write_256,
26387 .read = spi_chip_read,
26388 .voltage = {2700, 3600},
26389 .prepare_access = spi_prepare_io,
26390 .finish_access = spi_finish_io,
26391 },
26392
26393 {
26394 .vendor = "XTX Technology",
26395 .name = "XT25F128F/XT25BF128F",
26396 .bustype = BUS_SPI,
26397 .manufacture_id = XTX_ID,
26398 .model_id = XTX_XT25F128B,
26399 .total_size = 16384,
26400 .page_size = 256,
26401 /* Supports full QIO but has a non-volatile DC bit. */
26402 .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 |
26403 FEATURE_WRSR2 | FEATURE_WRSR3 | FEATURE_OTP |
26404 FEATURE_FAST_READ | FEATURE_FAST_READ_DOUT | FEATURE_FAST_READ_QOUT,
26405 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26406 .tested = TEST_UNTESTED,
26407 .probe = probe_spi_rdid,
26408 .probe_timing = TIMING_ZERO,
26409 .block_erasers =
26410 {
26411 {
26412 .eraseblocks = { {4 * 1024, 4096} },
26413 .block_erase = spi_block_erase_20,
26414 }, {
26415 .eraseblocks = { {32 * 1024, 512} },
26416 .block_erase = spi_block_erase_52,
26417 }, {
26418 .eraseblocks = { {64 * 1024, 256} },
26419 .block_erase = spi_block_erase_d8,
26420 }, {
26421 .eraseblocks = { {16384 * 1024, 1} },
26422 .block_erase = spi_block_erase_60,
26423 }, {
26424 .eraseblocks = { {16384 * 1024, 1} },
26425 .block_erase = spi_block_erase_c7,
26426 },
26427 },
26428 .reg_bits =
26429 {
26430 .qe = {STATUS2, 1, RW},
26431 .dc = {{STATUS3, 0, RW}, {STATUS3, 1, RW}},
26432 .srp = {STATUS1, 7, RW},
26433 .srl = {STATUS2, 0, RW},
26434 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26435 .tb = {STATUS1, 5, RW}, /* Called BP3 in datasheet, acts like TB */
26436 .sec = {STATUS1, 6, RW}, /* Called BP4 in datasheet, acts like SEC */
26437 .cmp = {STATUS2, 6, RW},
26438 .wps = {STATUS3, 2, RW},
26439 },
26440 .wp_write_cfg = spi_wp_write_cfg,
26441 .wp_read_cfg = spi_wp_read_cfg,
26442 .wp_get_ranges = spi_wp_get_available_ranges,
26443 .decode_range = decode_range_spi25,
26444 .printlock = spi_prettyprint_status_register_bp4_srwd,
26445 .unlock = spi_disable_blockprotect_bp4_srwd,
26446 .write = spi_chip_write_256,
26447 .read = spi_chip_read,
26448 .voltage = {2700, 3600},
26449 .prepare_access = spi_prepare_io,
26450 .finish_access = spi_finish_io,
26451 },
26452
26453 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100026454 .vendor = "Zetta Device",
26455 .name = "ZD25D20",
26456 .bustype = BUS_SPI,
26457 .manufacture_id = ZETTADEVICE_ID,
26458 .model_id = ZETTADEVICE_ZD25D20,
26459 .total_size = 256,
26460 .page_size = 256,
26461 .feature_bits = FEATURE_WRSR_WREN,
26462 .tested = TEST_UNTESTED,
26463 .probe = probe_spi_rdid,
26464 .probe_timing = TIMING_ZERO,
26465 .block_erasers =
David Hendricksa72d5a92018-02-11 17:58:44 -080026466 {
26467 {
26468 .eraseblocks = { {4 * 1024, 64} },
26469 .block_erase = spi_block_erase_20,
26470 }, {
26471 .eraseblocks = { {32 * 1024, 8} },
26472 .block_erase = spi_block_erase_52,
26473 }, {
26474 .eraseblocks = { {64 * 1024, 4} },
26475 .block_erase = spi_block_erase_d8,
26476 }, {
26477 .eraseblocks = { {256 * 1024, 1} },
26478 .block_erase = spi_block_erase_60,
26479 }, {
26480 .eraseblocks = { {256 * 1024, 1} },
26481 .block_erase = spi_block_erase_c7,
26482 }
26483 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100026484 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
26485 .unlock = spi_disable_blockprotect,
26486 .write = spi_chip_write_256,
26487 .read = spi_chip_read,
26488 .voltage = {2700, 3600},
David Hendricksa72d5a92018-02-11 17:58:44 -080026489 },
26490
26491 {
Alan Greenfa3fcd32019-06-27 15:41:50 +100026492 .vendor = "Zetta Device",
26493 .name = "ZD25D40",
26494 .bustype = BUS_SPI,
26495 .manufacture_id = ZETTADEVICE_ID,
26496 .model_id = ZETTADEVICE_ZD25D40,
26497 .total_size = 512,
26498 .page_size = 256,
26499 .feature_bits = FEATURE_WRSR_WREN,
26500 .tested = TEST_UNTESTED,
26501 .probe = probe_spi_rdid,
26502 .probe_timing = TIMING_ZERO,
26503 .block_erasers =
nybashcbb46e22018-02-11 17:53:49 -080026504 {
26505 {
26506 .eraseblocks = { {4 * 1024, 128} },
26507 .block_erase = spi_block_erase_20,
26508 }, {
26509 .eraseblocks = { {32 * 1024, 16} },
26510 .block_erase = spi_block_erase_52,
26511 }, {
26512 .eraseblocks = { {64 * 1024, 8} },
26513 .block_erase = spi_block_erase_d8,
26514 }, {
26515 .eraseblocks = { {512 * 1024, 1} },
26516 .block_erase = spi_block_erase_60,
26517 }, {
26518 .eraseblocks = { {512 * 1024, 1} },
26519 .block_erase = spi_block_erase_c7,
26520 }
26521 },
Alan Greenfa3fcd32019-06-27 15:41:50 +100026522 .printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
26523 .unlock = spi_disable_blockprotect,
26524 .write = spi_chip_write_256,
26525 .read = spi_chip_read,
26526 .voltage = {2700, 3600},
nybashcbb46e22018-02-11 17:53:49 -080026527 },
26528
Stefan Taunerac1b4c82012-02-17 14:51:04 +000026529 {
Nico Huber34e3de62024-10-20 13:00:12 +020026530 .vendor = "Zetta Device",
26531 .name = "ZD25LQ64",
26532 .bustype = BUS_SPI,
26533 .manufacture_id = ZETTADEVICE_ID,
26534 .model_id = ZETTADEVICE_ZD25LQ64,
26535 .total_size = 8192,
26536 .page_size = 256,
26537 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR_EXT2 |
26538 FEATURE_OTP | FEATURE_QPI_SRP,
26539 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26540 .tested = TEST_UNTESTED,
26541 .probe = probe_spi_rdid,
26542 .probe_timing = TIMING_ZERO,
26543 .block_erasers =
26544 {
26545 {
26546 .eraseblocks = { {4 * 1024, 2048} },
26547 .block_erase = spi_block_erase_20,
26548 }, {
26549 .eraseblocks = { {32 * 1024, 256} },
26550 .block_erase = spi_block_erase_52,
26551 }, {
26552 .eraseblocks = { {64 * 1024, 128} },
26553 .block_erase = spi_block_erase_d8,
26554 }, {
26555 .eraseblocks = { {8192 * 1024, 1} },
26556 .block_erase = spi_block_erase_60,
26557 }, {
26558 .eraseblocks = { {8192 * 1024, 1} },
26559 .block_erase = spi_block_erase_c7,
26560 },
26561 },
26562 .reg_bits =
26563 {
26564 .qe = {STATUS2, 1, RW},
26565 .srp = {STATUS1, 7, RW},
26566 .srl = {STATUS2, 0, RW},
26567 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26568 .tb = {STATUS1, 5, RW},
26569 .sec = {STATUS1, 6, RW},
26570 .cmp = {STATUS2, 6, RW},
26571 },
26572 .wp_write_cfg = spi_wp_write_cfg,
26573 .wp_read_cfg = spi_wp_read_cfg,
26574 .wp_get_ranges = spi_wp_get_available_ranges,
26575 .decode_range = decode_range_spi25,
26576 .printlock = spi_prettyprint_status_register_bp2_srwd,
26577 .unlock = spi_disable_blockprotect_bp2_srwd,
26578 .write = spi_chip_write_256,
26579 .read = spi_chip_read,
26580 .voltage = {1650, 1950},
26581 .prepare_access = spi_prepare_io,
26582 .finish_access = spi_finish_io,
26583 },
26584
26585 {
26586 .vendor = "Zetta Device",
26587 .name = "ZD25LQ128",
26588 .bustype = BUS_SPI,
26589 .manufacture_id = ZETTADEVICE_ID,
26590 .model_id = ZETTADEVICE_ZD25LQ128,
26591 .total_size = 16384,
26592 .page_size = 256,
26593 .feature_bits = FEATURE_WRSR_WREN | FEATURE_WRSR2 | FEATURE_WRSR_EXT2 |
26594 FEATURE_OTP | FEATURE_QPI_SRP,
26595 .dummy_cycles = { .qpi_read_params = { 4, 4, 6, 8 } },
26596 .tested = TEST_UNTESTED,
26597 .probe = probe_spi_rdid,
26598 .probe_timing = TIMING_ZERO,
26599 .block_erasers =
26600 {
26601 {
26602 .eraseblocks = { {4 * 1024, 4096} },
26603 .block_erase = spi_block_erase_20,
26604 }, {
26605 .eraseblocks = { {32 * 1024, 512} },
26606 .block_erase = spi_block_erase_52,
26607 }, {
26608 .eraseblocks = { {64 * 1024, 256} },
26609 .block_erase = spi_block_erase_d8,
26610 }, {
26611 .eraseblocks = { {16384 * 1024, 1} },
26612 .block_erase = spi_block_erase_60,
26613 }, {
26614 .eraseblocks = { {16384 * 1024, 1} },
26615 .block_erase = spi_block_erase_c7,
26616 },
26617 },
26618 .reg_bits =
26619 {
26620 .qe = {STATUS2, 1, RW},
26621 .srp = {STATUS1, 7, RW},
26622 .srl = {STATUS2, 0, RW},
26623 .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}},
26624 .tb = {STATUS1, 5, RW},
26625 .sec = {STATUS1, 6, RW},
26626 .cmp = {STATUS2, 6, RW},
26627 },
26628 .wp_write_cfg = spi_wp_write_cfg,
26629 .wp_read_cfg = spi_wp_read_cfg,
26630 .wp_get_ranges = spi_wp_get_available_ranges,
26631 .decode_range = decode_range_spi25,
26632 .printlock = spi_prettyprint_status_register_bp2_srwd,
26633 .unlock = spi_disable_blockprotect_bp2_srwd,
26634 .write = spi_chip_write_256,
26635 .read = spi_chip_read,
26636 .voltage = {1650, 1950},
26637 .prepare_access = spi_prepare_io,
26638 .finish_access = spi_finish_io,
26639 },
26640
26641 {
Alan Greendd592202019-08-23 10:11:37 +100026642 .vendor = "Unknown",
26643 .name = "SFDP-capable chip",
26644 .bustype = BUS_SPI,
26645 .manufacture_id = GENERIC_MANUF_ID,
26646 .model_id = SFDP_DEVICE_ID,
26647 .total_size = 0, /* set by probing function */
26648 .page_size = 0, /* set by probing function */
26649 .feature_bits = 0, /* set by probing function */
26650 /* We present our own "report this" text hence we do not */
26651 /* want the default "This flash part has status UNTESTED..." */
26652 /* text to be printed. */
26653 .tested = TEST_OK_PREW,
26654 .probe = probe_spi_sfdp,
26655 .block_erasers = {}, /* set by probing function */
26656 .unlock = spi_disable_blockprotect, /* is this safe? */
26657 .write = NULL, /* set by probing function */
26658 .read = spi_chip_read,
26659 /* FIXME: some vendor extensions define this */
26660 .voltage = {0},
26661 },
26662
26663 {
Carl-Daniel Hailfinger532c7172011-11-04 21:35:26 +000026664 .vendor = "Programmer",
26665 .name = "Opaque flash chip",
26666 .bustype = BUS_PROG,
26667 .manufacture_id = PROGMANUF_ID,
26668 .model_id = PROGDEV_ID,
26669 .total_size = 0,
26670 .page_size = 256,
26671 /* probe is assumed to work, rest will be filled in by probe */
26672 .tested = TEST_OK_PROBE,
26673 .probe = probe_opaque,
26674 /* eraseblock sizes will be set by the probing function */
26675 .block_erasers =
26676 {
26677 {
26678 .block_erase = erase_opaque,
26679 }
26680 },
26681 .write = write_opaque,
26682 .read = read_opaque,
26683 },
26684
26685 {
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000026686 .vendor = "AMIC",
26687 .name = "unknown AMIC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026688 .bustype = BUS_SPI,
Daniel Lenskidf90d3a2010-07-22 11:44:38 +000026689 .manufacture_id = AMIC_ID,
26690 .model_id = GENERIC_DEVICE_ID,
26691 .total_size = 0,
26692 .page_size = 256,
26693 .tested = TEST_BAD_PREW,
26694 .probe = probe_spi_rdid4,
26695 .probe_timing = TIMING_ZERO,
26696 .write = NULL,
26697 .read = NULL,
26698 },
26699
26700 {
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026701 .vendor = "Atmel",
26702 .name = "unknown Atmel SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026703 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026704 .manufacture_id = ATMEL_ID,
26705 .model_id = GENERIC_DEVICE_ID,
26706 .total_size = 0,
26707 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026708 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026709 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026710 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026711 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026712 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026713 },
26714
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026715 {
Carl-Daniel Hailfingerf792c7d2010-07-28 22:20:20 +000026716 .vendor = "Eon",
26717 .name = "unknown Eon SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026718 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026719 .manufacture_id = EON_ID_NOPREFIX,
26720 .model_id = GENERIC_DEVICE_ID,
26721 .total_size = 0,
26722 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026723 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026724 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026725 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026726 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026727 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026728 },
26729
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026730 {
26731 .vendor = "Macronix",
26732 .name = "unknown Macronix SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026733 .bustype = BUS_SPI,
Mattias Mattsson6eabe282010-09-15 23:31:03 +000026734 .manufacture_id = MACRONIX_ID,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026735 .model_id = GENERIC_DEVICE_ID,
26736 .total_size = 0,
26737 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026738 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026739 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026740 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026741 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026742 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026743 },
26744
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026745 {
26746 .vendor = "PMC",
26747 .name = "unknown PMC SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026748 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026749 .manufacture_id = PMC_ID,
26750 .model_id = GENERIC_DEVICE_ID,
26751 .total_size = 0,
26752 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026753 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026754 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026755 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026756 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026757 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026758 },
26759
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026760 {
26761 .vendor = "SST",
26762 .name = "unknown SST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026763 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026764 .manufacture_id = SST_ID,
26765 .model_id = GENERIC_DEVICE_ID,
26766 .total_size = 0,
26767 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026768 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026769 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026770 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026771 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026772 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026773 },
26774
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026775 {
26776 .vendor = "ST",
26777 .name = "unknown ST SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026778 .bustype = BUS_SPI,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026779 .manufacture_id = ST_ID,
26780 .model_id = GENERIC_DEVICE_ID,
26781 .total_size = 0,
26782 .page_size = 256,
Carl-Daniel Hailfinger42882fd2009-04-22 13:33:43 +000026783 .tested = TEST_BAD_PREW,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026784 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger2bc020b2009-06-05 13:46:17 +000026785 .probe_timing = TIMING_ZERO,
Stephan Guilloux5c5b5252009-01-08 03:40:17 +000026786 .write = NULL,
Carl-Daniel Hailfinger03b4e712009-05-08 12:49:03 +000026787 .read = NULL,
FENG yu ningff692fb2008-12-08 18:15:10 +000026788 },
Uwe Hermannfc425e82008-03-16 02:06:25 +000026789
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026790 {
Sean Nelson118e1d62009-11-24 02:08:11 +000026791 .vendor = "Sanyo",
26792 .name = "unknown Sanyo SPI chip",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026793 .bustype = BUS_SPI,
Sean Nelson118e1d62009-11-24 02:08:11 +000026794 .manufacture_id = SANYO_ID,
26795 .model_id = GENERIC_DEVICE_ID,
26796 .total_size = 0,
26797 .page_size = 256,
26798 .tested = TEST_BAD_PREW,
26799 .probe = probe_spi_rdid,
26800 .probe_timing = TIMING_ZERO,
Sean Nelson118e1d62009-11-24 02:08:11 +000026801 .write = NULL,
26802 .read = NULL,
26803 },
26804
26805 {
Stefan Taunereb582572012-09-21 12:52:50 +000026806 .vendor = "Winbond",
26807 .name = "unknown Winbond (ex Nexcom) SPI chip",
26808 .bustype = BUS_SPI,
26809 .manufacture_id = WINBOND_NEX_ID,
26810 .model_id = GENERIC_DEVICE_ID,
26811 .total_size = 0,
26812 .page_size = 256,
26813 .tested = TEST_BAD_PREW,
26814 .probe = probe_spi_rdid,
26815 .probe_timing = TIMING_ZERO,
26816 .write = NULL,
26817 .read = NULL,
26818 },
26819
26820 {
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026821 .vendor = "Generic",
26822 .name = "unknown SPI chip (RDID)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026823 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026824 .manufacture_id = GENERIC_MANUF_ID,
26825 .model_id = GENERIC_DEVICE_ID,
26826 .total_size = 0,
26827 .page_size = 256,
26828 .tested = TEST_BAD_PREW,
26829 .probe = probe_spi_rdid,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026830 .write = NULL,
26831 },
Stefan Tauneraf2db612011-12-02 21:48:17 +000026832
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026833 {
26834 .vendor = "Generic",
26835 .name = "unknown SPI chip (REMS)",
Carl-Daniel Hailfinger1a227952011-07-27 07:13:06 +000026836 .bustype = BUS_SPI,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026837 .manufacture_id = GENERIC_MANUF_ID,
26838 .model_id = GENERIC_DEVICE_ID,
26839 .total_size = 0,
26840 .page_size = 256,
26841 .tested = TEST_BAD_PREW,
26842 .probe = probe_spi_rems,
Carl-Daniel Hailfinger01d49ed2009-11-20 01:12:45 +000026843 .write = NULL,
26844 },
26845
Stefan Tauner96658be2014-05-26 22:05:31 +000026846 {0}
Stephan Guilloux72cf5652009-04-21 01:46:07 +000026847};
Stefan Tauner96658be2014-05-26 22:05:31 +000026848
26849const unsigned int flashchips_size = ARRAY_SIZE(flashchips);